summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--sdnvpn/lib/openstack_utils.py2
-rw-r--r--sdnvpn/lib/utils.py5
-rw-r--r--sdnvpn/test/functest/testcase_13.py2
-rw-r--r--sdnvpn/test/functest/testcase_3.py6
4 files changed, 6 insertions, 9 deletions
diff --git a/sdnvpn/lib/openstack_utils.py b/sdnvpn/lib/openstack_utils.py
index 49771d5..fd29c87 100644
--- a/sdnvpn/lib/openstack_utils.py
+++ b/sdnvpn/lib/openstack_utils.py
@@ -361,7 +361,7 @@ def create_flavor(nova_client, flavor_name, ram, disk, vcpus, public=True):
flavor = nova_client.flavors.create(
flavor_name, ram, vcpus, disk, is_public=public)
try:
- extra_specs = getattr(config.CONF, 'flavor_extra_specs')
+ extra_specs = {'hw:mem_page_size':'large'}
flavor.set_keys(extra_specs)
except ValueError:
# flavor extra specs are not configured, therefore skip the update
diff --git a/sdnvpn/lib/utils.py b/sdnvpn/lib/utils.py
index ac7ffb7..8fde5e4 100644
--- a/sdnvpn/lib/utils.py
+++ b/sdnvpn/lib/utils.py
@@ -686,10 +686,7 @@ def cleanup_neutron(neutron_client, floatingip_ids, bgpvpn_ids, interfaces,
def cleanup_nova(nova_client, instance_ids, flavor_ids=None):
if flavor_ids is not None and len(flavor_ids) != 0:
for flavor_id in flavor_ids:
- if not nova_client.flavors.delete(flavor_id):
- logging.error('Fail to delete flavor. '
- 'Flavor with id {} was not deleted.'.
- format(flavor_id))
+ nova_client.flavors.delete(flavor_id)
if len(instance_ids) != 0:
for instance_id in instance_ids:
if not os_utils.delete_instance(nova_client, instance_id):
diff --git a/sdnvpn/test/functest/testcase_13.py b/sdnvpn/test/functest/testcase_13.py
index dc8f3bc..bc11533 100644
--- a/sdnvpn/test/functest/testcase_13.py
+++ b/sdnvpn/test/functest/testcase_13.py
@@ -196,7 +196,7 @@ def main():
raise
finally:
test_utils.update_router_no_extra_route(neutron_client, router_ids)
- test_utils.cleanup_nova(nova_client, instance_ids)
+ test_utils.cleanup_nova(nova_client, instance_ids, flavor_ids)
test_utils.cleanup_glance(glance_client, image_ids)
test_utils.cleanup_neutron(neutron_client, floatingip_ids,
bgpvpn_ids, interfaces, subnet_ids,
diff --git a/sdnvpn/test/functest/testcase_3.py b/sdnvpn/test/functest/testcase_3.py
index 97c0601..a09f95d 100644
--- a/sdnvpn/test/functest/testcase_3.py
+++ b/sdnvpn/test/functest/testcase_3.py
@@ -155,6 +155,9 @@ def main():
subnet_ids, interfaces, bgpvpn_ids, flavor_ids) = ([] for i in range(9))
try:
+ _, flavor_id = test_utils.create_custom_flavor()
+ flavor_ids.append(flavor_id)
+
sg_id = os_utils.create_security_group_full(
neutron_client, TESTCASE_CONFIG.secgroup_name,
TESTCASE_CONFIG.secgroup_descr)
@@ -230,9 +233,6 @@ def main():
fake_fip['fip_addr'],
ext_net_mask)
- _, flavor_id = test_utils.create_custom_flavor()
- flavor_ids.append(flavor_id)
-
quagga_vm = test_utils.create_instance(
nova_client,
TESTCASE_CONFIG.quagga_instance_name,