diff options
author | Nikolas Hermanns <nikolas.hermanns@ericsson.com> | 2017-03-17 16:21:41 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@opnfv.org> | 2017-03-17 16:21:41 +0000 |
commit | a168ebdb0fc192e0185a150fbf146a53f3a0eec7 (patch) | |
tree | 9e6351831b8813694e307fbd93370db4d2779a70 /sdnvpn/lib | |
parent | 28c5fc2391e133e4b76f1bed8675bc9610ebdf9b (diff) | |
parent | f368948e25f78c64c328662b52d6b139b02826b4 (diff) |
Merge "Create flavor for Quagga ubuntu VM"
Diffstat (limited to 'sdnvpn/lib')
-rw-r--r-- | sdnvpn/lib/config.py | 4 | ||||
-rw-r--r-- | sdnvpn/lib/utils.py | 7 |
2 files changed, 11 insertions, 0 deletions
diff --git a/sdnvpn/lib/config.py b/sdnvpn/lib/config.py index 4fd40ed..52e328d 100644 --- a/sdnvpn/lib/config.py +++ b/sdnvpn/lib/config.py @@ -47,6 +47,10 @@ class CommonConfig(object): self.ubuntu_image_path = '{0}/{1}'.format( CONST.dir_functest_data, "ubuntu-16.04-server-cloudimg-amd64-disk1.img") + self.custom_flavor_name = 'm1.custom' + self.custom_flavor_ram = 1024 + self.custom_flavor_disk = 10 + self.custom_flavor_vcpus = 1 class TestcaseConfig(object): diff --git a/sdnvpn/lib/utils.py b/sdnvpn/lib/utils.py index 98a1e87..27fd5b3 100644 --- a/sdnvpn/lib/utils.py +++ b/sdnvpn/lib/utils.py @@ -28,6 +28,13 @@ ODL_USER = 'admin' ODL_PASS = 'admin' +def create_custom_flavor(): + return os_utils.get_or_create_flavor(common_config.custom_flavor_name, + common_config.custom_flavor_ram, + common_config.custom_flavor_disk, + common_config.custom_flavor_vcpus) + + def create_net(neutron_client, name): logger.debug("Creating network %s", name) net_id = os_utils.create_neutron_net(neutron_client, name) |