summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCédric Ollivier <cedric.ollivier@orange.com>2018-09-22 23:48:15 +0200
committerCédric Ollivier <cedric.ollivier@orange.com>2018-09-23 03:42:26 +0200
commit4b74bff051cda42bfd308a0934d3ca363f7f3d7c (patch)
tree3373ded7aa07c0190ec4d6d09e74f9702f07a1e7
parent4a1fa0c50c4fe90f31eb3909a33b9a60b550f60d (diff)
Set default_domain_id in tempest.conf
It allows verifying via non-default domain. Change-Id: I95ae26fd3bfd1c10421c02d2b4f6e8a9b6aa49e6 Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com> (cherry picked from commit 11d28aaf2e726859b59b7511d64dc4dd4b422e1e)
-rw-r--r--functest/opnfv_tests/openstack/tempest/conf_utils.py6
-rw-r--r--functest/opnfv_tests/openstack/tempest/tempest.py3
2 files changed, 6 insertions, 3 deletions
diff --git a/functest/opnfv_tests/openstack/tempest/conf_utils.py b/functest/opnfv_tests/openstack/tempest/conf_utils.py
index 62fec4831..87afbe389 100644
--- a/functest/opnfv_tests/openstack/tempest/conf_utils.py
+++ b/functest/opnfv_tests/openstack/tempest/conf_utils.py
@@ -177,8 +177,9 @@ def update_tempest_conf_file(conf_file, rconfig):
def configure_tempest_update_params(
tempest_conf_file, image_id=None, flavor_id=None,
compute_cnt=1, image_alt_id=None, flavor_alt_id=None,
- admin_role_name='admin', cidr='192.168.120.0/24'):
- # pylint: disable=too-many-branches, too-many-arguments
+ admin_role_name='admin', cidr='192.168.120.0/24',
+ domain_id='default'):
+ # pylint: disable=too-many-branches,too-many-arguments,too-many-statements
"""
Add/update needed parameters into tempest.conf file
"""
@@ -221,6 +222,7 @@ def configure_tempest_update_params(
rconfig.set('identity', 'auth_version', 'v3')
rconfig.set('identity', 'admin_role', admin_role_name)
rconfig.set('identity', 'admin_domain_scope', True)
+ rconfig.set('identity', 'default_domain_id', domain_id)
rconfig.set('identity-feature-enabled', 'api_v2', False)
rconfig.set('identity-feature-enabled', 'api_v2_admin', False)
if not rconfig.has_section('neutron'):
diff --git a/functest/opnfv_tests/openstack/tempest/tempest.py b/functest/opnfv_tests/openstack/tempest/tempest.py
index 071755b2a..cdd98e9ef 100644
--- a/functest/opnfv_tests/openstack/tempest/tempest.py
+++ b/functest/opnfv_tests/openstack/tempest/tempest.py
@@ -348,7 +348,8 @@ class TempestCommon(singlevm.VmReady2):
compute_cnt=compute_cnt,
image_alt_id=self.image_alt.id,
flavor_alt_id=self.flavor_alt.id,
- admin_role_name=self.role_name, cidr=self.cidr)
+ admin_role_name=self.role_name, cidr=self.cidr,
+ domain_id=self.project.domain.id)
self.update_scenario_section()
self.backup_tempest_config(self.conf_file, self.res_dir)