diff options
author | Cédric Ollivier <cedric.ollivier@orange.com> | 2019-09-14 11:55:58 +0200 |
---|---|---|
committer | Cédric Ollivier <cedric.ollivier@orange.com> | 2019-09-15 10:43:44 +0200 |
commit | cf052c809b027d6167c93399715bcd330cc0782c (patch) | |
tree | 2a84accaab239be0685e2a7dff9eb991edd9ffe4 | |
parent | d0ce372aeae75c099ade1b742b2bbd826ddb0380 (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>
-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 {} ' |