summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCédric Ollivier <cedric.ollivier@orange.com>2018-03-16 07:14:40 +0100
committerCédric Ollivier <cedric.ollivier@orange.com>2018-03-16 07:32:52 +0100
commit2185f7ba88abae4c5b575a98cffd1fe9cfcfb42d (patch)
tree3fb72d646e06939406113778b109e2340d3cef2d
parentf1fb5363b83721853e1c8e376ac06961bbc53595 (diff)
Set project_name arg when creating users
It also print snaps_creds to ease debugging [1]. [1] https://build.opnfv.org/ci/view/functest/job/functest-joid-baremetal-daily-master/22/console Change-Id: I5b0d0dcffe3e45d8fa7d1d7d8ce19172fc42aaa1 Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
-rw-r--r--functest/core/vnf.py1
-rw-r--r--functest/opnfv_tests/vnf/epc/juju_epc.py6
-rw-r--r--functest/opnfv_tests/vnf/router/cloudify_vrouter.py2
3 files changed, 8 insertions, 1 deletions
diff --git a/functest/core/vnf.py b/functest/core/vnf.py
index 2f9c5a71f..a6afd4e6b 100644
--- a/functest/core/vnf.py
+++ b/functest/core/vnf.py
@@ -110,6 +110,7 @@ class VnfOnBoarding(vnf.VnfOnBoarding):
user_creator.create()
self.created_object.append(user_creator)
self.snaps_creds = user_creator.get_os_creds(self.tenant_name)
+ self.__logger.debug("snaps creds: %s", self.snaps_creds)
return vnf.VnfOnBoarding.EX_OK
except Exception: # pylint: disable=broad-except
diff --git a/functest/opnfv_tests/vnf/epc/juju_epc.py b/functest/opnfv_tests/vnf/epc/juju_epc.py
index 39678916d..9e5f8d33b 100644
--- a/functest/opnfv_tests/vnf/epc/juju_epc.py
+++ b/functest/opnfv_tests/vnf/epc/juju_epc.py
@@ -130,7 +130,9 @@ class JujuEpc(vnf.VnfOnBoarding):
user_creator = OpenStackUser(
self.snaps_creds,
UserConfig(
- name=name, password=str(uuid.uuid4()),
+ name=name,
+ password=str(uuid.uuid4()),
+ project_name=self.tenant_name,
domain=self.snaps_creds.user_domain_name,
roles={'_member_': self.tenant_name}))
user_creator.create()
@@ -161,6 +163,7 @@ class JujuEpc(vnf.VnfOnBoarding):
user_creator = self._bypass_juju_network_discovery_bug(
'juju_network_discovery_bug')
snaps_creds = user_creator.get_os_creds(self.snaps_creds.project_name)
+ self.__logger.debug("snaps creds: %s", snaps_creds)
credentials_yaml = os.path.join(self.res_dir, "credentials.yaml")
creds_data = {
'pass': snaps_creds.password,
@@ -178,6 +181,7 @@ class JujuEpc(vnf.VnfOnBoarding):
user_creator = self._bypass_juju_network_discovery_bug(
'juju_network_discovery_bug')
snaps_creds = user_creator.get_os_creds(self.snaps_creds.project_name)
+ self.__logger.debug("snaps creds: %s", snaps_creds)
credentials_yaml = os.path.join(self.res_dir, "credentials.yaml")
creds_data = {
'pass': snaps_creds.password,
diff --git a/functest/opnfv_tests/vnf/router/cloudify_vrouter.py b/functest/opnfv_tests/vnf/router/cloudify_vrouter.py
index 14269ad36..e23bba119 100644
--- a/functest/opnfv_tests/vnf/router/cloudify_vrouter.py
+++ b/functest/opnfv_tests/vnf/router/cloudify_vrouter.py
@@ -334,11 +334,13 @@ class CloudifyVrouter(vrouter_base.VrouterOnBoardingBase):
UserConfig(
name='cloudify_network_bug-{}'.format(self.uuid),
password=str(uuid.uuid4()),
+ project_name=self.tenant_name,
domain=self.snaps_creds.user_domain_name,
roles={'_member_': self.tenant_name}))
user_creator.create()
self.created_object.append(user_creator)
snaps_creds = user_creator.get_os_creds(self.snaps_creds.project_name)
+ self.__logger.debug("snaps creds: %s", snaps_creds)
self.vnf['inputs'].update(dict(target_vnf_image_id=image.id))
self.vnf['inputs'].update(dict(reference_vnf_image_id=image.id))