diff options
author | Cédric Ollivier <cedric.ollivier@orange.com> | 2018-02-14 23:08:29 +0100 |
---|---|---|
committer | Cédric Ollivier <cedric.ollivier@orange.com> | 2018-02-15 17:18:57 +0100 |
commit | 13e71a2fff4618eebbb37afeaef6b9560b8b00a6 (patch) | |
tree | cc419c028299b73749aef0d7fdc38cfdfc9fe2dc /functest/core | |
parent | 91929a9263638847491f1423eebfdcd528aa08cc (diff) |
Add suffixes to OpenStack resource names
All vnf testcases have to add suffixes in OpenStack resources names
simply because the password is now generated before any run [1].
Snaps mainly creates the resource only if unfound in all tenants [2].
Then one remaining resource could easily raise permissions denied.
It avoid conflicts between vrouter and cloudify_ims which are using the
same names.
[1] https://gerrit.opnfv.org/gerrit/#/c/50747/
[2] https://jira.opnfv.org/browse/SNAPS-257
Depends-On: If56cc44fe35ca06bc9033af620ddd3c0586877fe
Change-Id: I1800886e575189b64fdc580a5ee6b59c81fcde5c
Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
Diffstat (limited to 'functest/core')
-rw-r--r-- | functest/core/vnf.py | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/functest/core/vnf.py b/functest/core/vnf.py index 0da8f6db..05baf432 100644 --- a/functest/core/vnf.py +++ b/functest/core/vnf.py @@ -50,8 +50,9 @@ class VnfOnBoarding(testcase.TestCase): def __init__(self, **kwargs): super(VnfOnBoarding, self).__init__(**kwargs) - self.user_name = self.case_name - self.tenant_name = self.case_name + self.uuid = uuid.uuid4() + self.user_name = "{}-{}".format(self.case_name, self.uuid) + self.tenant_name = "{}-{}".format(self.case_name, self.uuid) self.snaps_creds = {} self.created_object = [] self.os_project = None @@ -106,7 +107,7 @@ class VnfOnBoarding(testcase.TestCase): """ try: self.__logger.info( - "Prepare VNF: %s, description: %s", self.tenant_name, + "Prepare VNF: %s, description: %s", self.case_name, self.tenant_description) snaps_creds = openstack_tests.get_credentials( os_env_file=self.env_file) |