diff options
author | 2019-09-14 11:55:58 +0200 | |
---|---|---|
committer | 2019-09-15 10:44:21 +0200 | |
commit | 03fa7eceba965e77edab90ddea088d0f9b684c51 (patch) | |
tree | 0402b5e5498c5d7921f43199e5011006066e780d | |
parent | a58363a7b437b3fcc737062339e8c53a240c6ff7 (diff) |
Add punctuations in password generator
It adds a subset of string.punctuation to conform with a few
password rules (see ONAP Openlab).
Change-Id: I7751031bcb9b908d4162d70f8acaa4bdc87e3c79
Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
(cherry picked from commit cf052c809b027d6167c93399715bcd330cc0782c)
-rw-r--r-- | functest/core/tenantnetwork.py | 4 | ||||
-rw-r--r-- | functest/opnfv_tests/openstack/shaker/shaker.py | 2 |
2 files changed, 4 insertions, 2 deletions
diff --git a/functest/core/tenantnetwork.py b/functest/core/tenantnetwork.py index 604e49ae5..a7b4e9ccd 100644 --- a/functest/core/tenantnetwork.py +++ b/functest/core/tenantnetwork.py @@ -56,7 +56,9 @@ class NewProject(): assert self.orig_cloud assert self.case_name self.password = ''.join(random.choice( - string.ascii_letters + string.digits) for _ in range(30)) + string.ascii_letters + string.digits + + '!()*+,-.<=>?@[]^_{|}~') for _ in range(30)) + self.__logger.debug("password: %s", self.password) self.domain = self.orig_cloud.get_domain( name_or_id=self.orig_cloud.auth.get( "project_domain_name", "Default")) diff --git a/functest/opnfv_tests/openstack/shaker/shaker.py b/functest/opnfv_tests/openstack/shaker/shaker.py index fd31ea689..03aeccafc 100644 --- a/functest/opnfv_tests/openstack/shaker/shaker.py +++ b/functest/opnfv_tests/openstack/shaker/shaker.py @@ -100,7 +100,7 @@ class Shaker(singlevm.SingleVm2): 'unset OS_TENANT_NAME && ' 'unset OS_TENANT_ID && ' 'unset OS_ENDPOINT_TYPE && ' - 'export OS_PASSWORD={} && ' + 'export OS_PASSWORD="{}" && ' '{}' 'env && ' 'timeout {} shaker --image-name {} --flavor-name {} ' |