aboutsummaryrefslogtreecommitdiffstats
path: root/functest/opnfv_tests/openstack
diff options
context:
space:
mode:
Diffstat (limited to 'functest/opnfv_tests/openstack')
-rw-r--r--functest/opnfv_tests/openstack/rally/rally.py23
-rw-r--r--functest/opnfv_tests/openstack/rally/scenario/full/opnfv-cinder.yaml21
-rw-r--r--functest/opnfv_tests/openstack/refstack_client/refstack_client.py7
-rw-r--r--functest/opnfv_tests/openstack/tempest/conf_utils.py12
4 files changed, 7 insertions, 56 deletions
diff --git a/functest/opnfv_tests/openstack/rally/rally.py b/functest/opnfv_tests/openstack/rally/rally.py
index 2042b2d15..8c482545d 100644
--- a/functest/opnfv_tests/openstack/rally/rally.py
+++ b/functest/opnfv_tests/openstack/rally/rally.py
@@ -66,7 +66,6 @@ class RallyBase(testcase.OSGCTestCase):
BLACKLIST_FILE = os.path.join(RALLY_DIR, "blacklist.txt")
TEMP_DIR = os.path.join(RALLY_DIR, "var")
- CINDER_VOLUME_TYPE_NAME = "volume_test"
RALLY_PRIVATE_NET_NAME = CONST.__getattribute__('rally_network_name')
RALLY_PRIVATE_SUBNET_NAME = CONST.__getattribute__('rally_subnet_name')
RALLY_PRIVATE_SUBNET_CIDR = CONST.__getattribute__('rally_subnet_cidr')
@@ -80,9 +79,7 @@ class RallyBase(testcase.OSGCTestCase):
self.scenario_dir = ''
self.nova_client = os_utils.get_nova_client()
self.neutron_client = os_utils.get_neutron_client()
- self.cinder_client = os_utils.get_cinder_client()
self.network_dict = {}
- self.volume_type = None
self.smoke = None
self.test_name = None
self.image_exists = None
@@ -179,7 +176,7 @@ class RallyBase(testcase.OSGCTestCase):
@staticmethod
def live_migration_supported():
- """Determine is live migration is supported."""
+ """Determine if live migration is supported."""
config = iniparse.ConfigParser()
if (config.read(RallyBase.TEMPEST_CONF_FILE) and
config.has_section('compute-feature-enabled') and
@@ -448,20 +445,6 @@ class RallyBase(testcase.OSGCTestCase):
if self.test_name not in self.TESTS:
raise Exception("Test name '%s' is invalid" % self.test_name)
- volume_types = os_utils.list_volume_types(self.cinder_client,
- private=False)
- if volume_types:
- LOGGER.debug("Using existing volume type(s)...")
- else:
- LOGGER.debug('Creating volume type...')
- self.volume_type = os_utils.create_volume_type(
- self.cinder_client, self.CINDER_VOLUME_TYPE_NAME)
- if self.volume_type is None:
- raise Exception("Failed to create volume type '%s'" %
- self.CINDER_VOLUME_TYPE_NAME)
- LOGGER.debug("Volume type '%s' is created succesfully.",
- self.CINDER_VOLUME_TYPE_NAME)
-
LOGGER.debug('Getting or creating image...')
self.image_exists, self.image_id = os_utils.get_or_create_image(
self.GLANCE_IMAGE_NAME,
@@ -562,10 +545,6 @@ class RallyBase(testcase.OSGCTestCase):
self.case_name, success_rate)
def _clean_up(self):
- if self.volume_type:
- LOGGER.debug("Deleting volume type '%s'...", self.volume_type)
- os_utils.delete_volume_type(self.cinder_client, self.volume_type)
-
if not self.image_exists:
LOGGER.debug("Deleting image '%s' with ID '%s'...",
self.GLANCE_IMAGE_NAME, self.image_id)
diff --git a/functest/opnfv_tests/openstack/rally/scenario/full/opnfv-cinder.yaml b/functest/opnfv_tests/openstack/rally/scenario/full/opnfv-cinder.yaml
index e844e33f6..5f46f5192 100644
--- a/functest/opnfv_tests/openstack/rally/scenario/full/opnfv-cinder.yaml
+++ b/functest/opnfv_tests/openstack/rally/scenario/full/opnfv-cinder.yaml
@@ -101,7 +101,6 @@
CinderVolumes.create_snapshot_and_attach_volume:
-
args:
- volume_type: false
size:
min: 1
max: 5
@@ -119,26 +118,6 @@
{{ constant_runner(concurrency=concurrency, times=iterations, is_smoke=smoke) }}
sla:
{{ no_failures_sla() }}
- -
- args:
- volume_type: true
- size:
- min: 1
- max: 5
- context:
- {% call user_context(tenants_amount, users_amount, use_existing_users) %}
- quotas:
- {{ unlimited_volumes() }}
- servers:
- {{ vm_params(image_name,flavor_name,none)|indent(2,true) }}
- servers_per_tenant: 2
- auto_assign_nic: true
- network: {}
- {% endcall %}
- runner:
- {{ constant_runner(concurrency=concurrency, times=iterations, is_smoke=smoke) }}
- sla:
- {{ no_failures_sla() }}
CinderVolumes.create_volume:
-
diff --git a/functest/opnfv_tests/openstack/refstack_client/refstack_client.py b/functest/opnfv_tests/openstack/refstack_client/refstack_client.py
index 10ffddf54..42befe221 100644
--- a/functest/opnfv_tests/openstack/refstack_client/refstack_client.py
+++ b/functest/opnfv_tests/openstack/refstack_client/refstack_client.py
@@ -1,6 +1,7 @@
#!/usr/bin/env python
+
# Copyright (c) 2017 Huawei Technologies Co.,Ltd and others.
-# matthew.lijun@huawei.com wangwulin@huawei.com
+#
# All rights reserved. This program and the accompanying materials
# are made available under the terms of the Apache License, Version 2.0
# which accompanies this distribution, and is available at
@@ -10,7 +11,6 @@
from __future__ import division
-
import argparse
import logging
import os
@@ -29,6 +29,9 @@ from functest.opnfv_tests.openstack.tempest import conf_utils
from functest.utils.constants import CONST
import functest.utils.functest_utils as ft_utils
+__author__ = ("Matthew Li <matthew.lijun@huawei.com>,"
+ "Linda Wang <wangwulin@huawei.com>")
+
# logging configuration """
LOGGER = logging.getLogger(__name__)
diff --git a/functest/opnfv_tests/openstack/tempest/conf_utils.py b/functest/opnfv_tests/openstack/tempest/conf_utils.py
index 72ea5ce72..7f7db35eb 100644
--- a/functest/opnfv_tests/openstack/tempest/conf_utils.py
+++ b/functest/opnfv_tests/openstack/tempest/conf_utils.py
@@ -115,17 +115,6 @@ def get_verifier_deployment_dir(verifier_id, deployment_id):
'for-deployment-{}'.format(deployment_id))
-def get_repo_tag(repo):
- """
- Returns last tag of current branch
- """
- cmd = ("git -C {0} describe --abbrev=0 HEAD".format(repo))
- p = subprocess.Popen(cmd, stdout=subprocess.PIPE, shell=True)
- tag = p.stdout.readline().rstrip()
-
- return str(tag)
-
-
def backup_tempest_config(conf_file):
"""
Copy config file to tempest results directory
@@ -227,6 +216,7 @@ def configure_tempest_update_params(tempest_conf_file, image_id=None,
if compute_cnt > 1:
# enable multinode tests
config.set('compute', 'min_compute_nodes', compute_cnt)
+ config.set('compute-feature-enabled', 'live_migration', True)
config.set('identity', 'region', 'RegionOne')
if os_utils.is_keystone_v3():