summaryrefslogtreecommitdiffstats
path: root/testcases/OpenStack
diff options
context:
space:
mode:
Diffstat (limited to 'testcases/OpenStack')
-rwxr-xr-xtestcases/OpenStack/rally/run_rally-cert.py46
-rw-r--r--testcases/OpenStack/tempest/custom_tests/blacklist.txt27
-rwxr-xr-xtestcases/OpenStack/tempest/run_tempest.py45
-rw-r--r--testcases/OpenStack/vPing/vping_util.py23
4 files changed, 53 insertions, 88 deletions
diff --git a/testcases/OpenStack/rally/run_rally-cert.py b/testcases/OpenStack/rally/run_rally-cert.py
index 92dbddff6..f3eb79d26 100755
--- a/testcases/OpenStack/rally/run_rally-cert.py
+++ b/testcases/OpenStack/rally/run_rally-cert.py
@@ -376,7 +376,6 @@ def main():
nova_client = os_utils.get_nova_client()
neutron_client = os_utils.get_neutron_client()
- glance_client = os_utils.get_glance_client()
cinder_client = os_utils.get_cinder_client()
start_time = time.time()
@@ -402,44 +401,19 @@ def main():
else:
logger.debug("Using existing volume type(s)...")
- image_id = os_utils.get_image_id(glance_client, GLANCE_IMAGE_NAME)
- image_exists = False
-
- if image_id == '':
- logger.debug("Creating image '%s' from '%s'..." % (GLANCE_IMAGE_NAME,
- GLANCE_IMAGE_PATH))
- image_id = os_utils.create_glance_image(glance_client,
- GLANCE_IMAGE_NAME,
- GLANCE_IMAGE_PATH,
- GLANCE_IMAGE_FORMAT)
- if not image_id:
- logger.error("Failed to create the Glance image...")
- exit(-1)
- else:
- logger.debug("Image '%s' with ID '%s' created succesfully ."
- % (GLANCE_IMAGE_NAME, image_id))
- else:
- logger.debug("Using existing image '%s' with ID '%s'..."
- % (GLANCE_IMAGE_NAME, image_id))
- image_exists = True
+ image_exists, image_id = os_utils.get_or_create_image(GLANCE_IMAGE_NAME,
+ GLANCE_IMAGE_PATH,
+ GLANCE_IMAGE_FORMAT)
+ if not image_id:
+ exit(-1)
logger.debug("Creating network '%s'..." % PRIVATE_NET_NAME)
- network_dict = os_utils.create_network_full(neutron_client,
- PRIVATE_NET_NAME,
- PRIVATE_SUBNET_NAME,
- ROUTER_NAME,
- PRIVATE_SUBNET_CIDR)
+ network_dict = os_utils.create_shared_network_full(PRIVATE_NET_NAME,
+ PRIVATE_SUBNET_NAME,
+ ROUTER_NAME,
+ PRIVATE_SUBNET_CIDR)
if not network_dict:
- logger.error("Failed to create network...")
- exit(-1)
- else:
- if not os_utils.update_neutron_net(neutron_client,
- network_dict['net_id'],
- shared=True):
- logger.error("Failed to update network...")
- exit(-1)
- else:
- logger.debug("Network '%s' available..." % PRIVATE_NET_NAME)
+ exit(1)
if args.test_name == "all":
for test_name in tests:
diff --git a/testcases/OpenStack/tempest/custom_tests/blacklist.txt b/testcases/OpenStack/tempest/custom_tests/blacklist.txt
index 6dd7fad5c..42e1a327a 100644
--- a/testcases/OpenStack/tempest/custom_tests/blacklist.txt
+++ b/testcases/OpenStack/tempest/custom_tests/blacklist.txt
@@ -11,6 +11,8 @@
- tempest.api.compute.servers.test_create_server.ServersTestManualDisk.test_list_servers
- tempest.api.compute.servers.test_create_server.ServersTestManualDisk.test_verify_server_details
- tempest.api.compute.servers.test_server_actions.ServerActionsTestJSON.test_reboot_server_hard
+ - tempest.api.network.test_floating_ips.FloatingIPTestJSON.test_create_list_show_update_delete_floating_ip
+ - tempest.api.network.test_floating_ips.FloatingIPTestJSON.test_create_floating_ip_specifying_a_fixed_ip_address
- tempest.scenario.test_network_basic_ops.TestNetworkBasicOps.test_network_basic_ops
- tempest.scenario.test_server_basic_ops.TestServerBasicOps.test_server_basic_ops
- tempest.scenario.test_volume_boot_pattern.TestVolumeBootPattern.test_volume_boot_pattern
@@ -22,12 +24,23 @@
- os-odl_l2-nofeature-noha
- os-nosdn-nofeature-ha
- os-nosdn-nofeature-noha
+ installers:
+ - joid
+ tests:
+ - tempest.api.object_storage
+
+-
+ scenarios:
- os-nosdn-lxd-ha
- os-nosdn-lxd-noha
installers:
- joid
tests:
- tempest.api.object_storage
+ - tempest.scenario.test_network_basic_ops.TestNetworkBasicOps.test_network_basic_ops
+ - tempest.scenario.test_server_basic_ops.TestServerBasicOps.test_server_basic_ops
+ - tempest.scenario.test_volume_boot_pattern.TestVolumeBootPattern.test_volume_boot_pattern
+ - tempest.scenario.test_volume_boot_pattern.TestVolumeBootPatternV2.test_volume_boot_pattern
-
scenarios:
@@ -61,3 +74,17 @@
- tempest.scenario.test_server_basic_ops.TestServerBasicOps.test_server_basic_ops
- tempest.scenario.test_volume_boot_pattern.TestVolumeBootPattern.test_volume_boot_pattern
- tempest.scenario.test_volume_boot_pattern.TestVolumeBootPatternV2.test_volume_boot_pattern
+
+-
+ # https://bugs.launchpad.net/tempest/+bug/1586931
+ scenarios:
+ - os-odl_l2-nofeature-ha
+ - os-odl_l2-sfc-ha
+ - os-odl_l3-nofeature-ha
+ - os-nosdn-kvm-ha
+ - os-nosdn-nofeature-ha
+ - os-nosdn-ovs-ha
+ installers:
+ - fuel
+ tests:
+ - tempest.scenario.test_server_basic_ops.TestServerBasicOps.test_server_basic_ops
diff --git a/testcases/OpenStack/tempest/run_tempest.py b/testcases/OpenStack/tempest/run_tempest.py
index 64a5ed778..306664feb 100755
--- a/testcases/OpenStack/tempest/run_tempest.py
+++ b/testcases/OpenStack/tempest/run_tempest.py
@@ -125,8 +125,6 @@ def get_info(file_result):
def create_tempest_resources():
keystone_client = os_utils.get_keystone_client()
- neutron_client = os_utils.get_neutron_client()
- glance_client = os_utils.get_glance_client()
logger.debug("Creating tenant and user for Tempest suite")
tenant_id = os_utils.create_tenant(keystone_client,
@@ -141,40 +139,19 @@ def create_tempest_resources():
logger.error("Error : Failed to create %s user" % USER_NAME)
logger.debug("Creating private network for Tempest suite")
- network_dic = os_utils.create_network_full(neutron_client,
- PRIVATE_NET_NAME,
- PRIVATE_SUBNET_NAME,
- ROUTER_NAME,
- PRIVATE_SUBNET_CIDR)
- if network_dic:
- if not os_utils.update_neutron_net(neutron_client,
- network_dic['net_id'],
- shared=True):
- logger.error("Failed to update private network...")
- exit(-1)
- else:
- logger.debug("Network '%s' is available..." % PRIVATE_NET_NAME)
- else:
- logger.error("Private network creation failed")
- exit(-1)
+ network_dic = os_utils.create_shared_network_full(PRIVATE_NET_NAME,
+ PRIVATE_SUBNET_NAME,
+ ROUTER_NAME,
+ PRIVATE_SUBNET_CIDR)
+ if not network_dic:
+ exit(1)
logger.debug("Creating image for Tempest suite")
- # Check if the given image exists
- image_id = os_utils.get_image_id(glance_client, GLANCE_IMAGE_NAME)
- if image_id != '':
- logger.info("Using existing image '%s'..." % GLANCE_IMAGE_NAME)
- else:
- logger.info("Creating image '%s' from '%s'..." % (GLANCE_IMAGE_NAME,
- GLANCE_IMAGE_PATH))
- image_id = os_utils.create_glance_image(glance_client,
- GLANCE_IMAGE_NAME,
- GLANCE_IMAGE_PATH,
- GLANCE_IMAGE_FORMAT)
- if not image_id:
- logger.error("Failed to create a Glance image...")
- exit(-1)
- logger.debug("Image '%s' with ID=%s created successfully."
- % (GLANCE_IMAGE_NAME, image_id))
+ _, image_id = os_utils.get_or_create_image(GLANCE_IMAGE_NAME,
+ GLANCE_IMAGE_PATH,
+ GLANCE_IMAGE_FORMAT)
+ if not image_id:
+ exit(-1)
def configure_tempest(deployment_dir):
diff --git a/testcases/OpenStack/vPing/vping_util.py b/testcases/OpenStack/vPing/vping_util.py
index c16c5d659..3f4adae73 100644
--- a/testcases/OpenStack/vPing/vping_util.py
+++ b/testcases/OpenStack/vPing/vping_util.py
@@ -147,24 +147,11 @@ def create_security_group():
def create_image():
- EXIT_CODE = -1
-
- # Check if the given image exists
- image_id = os_utils.get_image_id(glance_client, GLANCE_IMAGE_NAME)
- if image_id != '':
- logger.info("Using existing image '%s'..." % GLANCE_IMAGE_NAME)
- else:
- logger.info("Creating image '%s' from '%s'..." % (GLANCE_IMAGE_NAME,
- GLANCE_IMAGE_PATH))
- image_id = os_utils.create_glance_image(glance_client,
- GLANCE_IMAGE_NAME,
- GLANCE_IMAGE_PATH,
- GLANCE_IMAGE_FORMAT)
- if not image_id:
- logger.error("Failed to create a Glance image...")
- exit(EXIT_CODE)
- logger.debug("Image '%s' with ID=%s created successfully."
- % (GLANCE_IMAGE_NAME, image_id))
+ _, image_id = os_utils.get_or_create_image(GLANCE_IMAGE_NAME,
+ GLANCE_IMAGE_PATH,
+ GLANCE_IMAGE_FORMAT)
+ if not image_id:
+ exit(-1)
return image_id