From ce75381bdce754d40f632894f81a31ba6771a39f Mon Sep 17 00:00:00 2001 From: Cédric Ollivier Date: Sat, 11 May 2019 19:35:28 +0200 Subject: Add all RefStack lists MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit It adds platform and object targets. refstack_defcore is renamed to refstack_compute. Change-Id: Iad5bfb27be614aada98eef5b3148965e65210725 Signed-off-by: Cédric Ollivier --- functest/opnfv_tests/openstack/refstack/refstack.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'functest/opnfv_tests/openstack') diff --git a/functest/opnfv_tests/openstack/refstack/refstack.py b/functest/opnfv_tests/openstack/refstack/refstack.py index 9eb937165..5e06c8c07 100644 --- a/functest/opnfv_tests/openstack/refstack/refstack.py +++ b/functest/opnfv_tests/openstack/refstack/refstack.py @@ -24,12 +24,9 @@ class Refstack(tempest.TempestCommon): __logger = logging.getLogger(__name__) - defcorelist = os.path.join( - getattr(config.CONF, 'dir_refstack_data'), 'defcore.txt') - - def _extract_refstack_data(self): + def _extract_refstack_data(self, refstack_list): yaml_data = "" - with open(self.defcorelist) as def_file: + with open(refstack_list) as def_file: for line in def_file: try: grp = re.search(r'^([^\[]*)(\[.*\])\n*$', line) @@ -63,8 +60,11 @@ class Refstack(tempest.TempestCommon): return yaml.full_load(yaml_data2) def generate_test_list(self, **kwargs): + refstack_list = os.path.join( + getattr(config.CONF, 'dir_refstack_data'), + "{}.txt".format(kwargs.get('target', 'compute'))) self.backup_tempest_config(self.conf_file, '/etc') - refstack_data = self._extract_refstack_data() + refstack_data = self._extract_refstack_data(refstack_list) tempest_data = self._extract_tempest_data() with open(self.list, 'w') as ref_file: for key in refstack_data.keys(): -- cgit 1.2.3-korg