diff options
author | Cédric Ollivier <cedric.ollivier@orange.com> | 2017-09-28 12:42:30 +0200 |
---|---|---|
committer | Cédric Ollivier <cedric.ollivier@orange.com> | 2017-09-28 12:42:30 +0200 |
commit | 5c178f0d30f0701dee0d0a629023f05edfde338e (patch) | |
tree | 1e09ec594e60f1c05c893d3b43c1c9c9c7a0a461 /functest | |
parent | 405a0872282f5b29bb9e60ba19b11b17c8047647 (diff) |
Switch to OS_PROJECT_NAME
It simply conforms with OpenStack keystone v3.
JIRA: FUNCTEST-877
Change-Id: I989a6eb4d8564948927c184a899b62ca763ef824
Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
Diffstat (limited to 'functest')
-rw-r--r-- | functest/opnfv_tests/sdn/odl/odl.py | 8 | ||||
-rw-r--r-- | functest/tests/unit/odl/test_odl.py | 28 |
2 files changed, 19 insertions, 17 deletions
diff --git a/functest/opnfv_tests/sdn/odl/odl.py b/functest/opnfv_tests/sdn/odl/odl.py index dd313ffe..a8312ab3 100644 --- a/functest/opnfv_tests/sdn/odl/odl.py +++ b/functest/opnfv_tests/sdn/odl/odl.py @@ -127,7 +127,7 @@ class ODLTests(testcase.TestCase): * osauthurl, * neutronurl, * osusername, - * ostenantname, + * osprojectname, * ospassword, * odlip, * odlwebport, @@ -161,7 +161,7 @@ class ODLTests(testcase.TestCase): 'OSUSERNAME:"' + kwargs['osusername'] + '"', ('OSUSERDOMAINNAME:"' + kwargs['osuserdomainname'] + '"'), - 'OSTENANTNAME:"' + kwargs['ostenantname'] + '"', + 'OSTENANTNAME:"' + kwargs['osprojectname'] + '"', ('OSPROJECTDOMAINNAME:"' + kwargs['osprojectdomainname'] + '"'), 'OSPASSWORD:"' + kwargs['ospassword'] + '"', @@ -229,7 +229,7 @@ class ODLTests(testcase.TestCase): kwargs['osusername'] = os.environ['OS_USERNAME'] kwargs['osuserdomainname'] = os.environ.get( 'OS_USER_DOMAIN_NAME', 'Default') - kwargs['ostenantname'] = os.environ['OS_TENANT_NAME'] + kwargs['osprojectname'] = os.environ['OS_PROJECT_NAME'] kwargs['osprojectdomainname'] = os.environ.get( 'OS_PROJECT_DOMAIN_NAME', 'Default') kwargs['osauthurl'] = os.environ['OS_AUTH_URL'] @@ -281,7 +281,7 @@ class ODLParser(object): # pylint: disable=too-few-public-methods '-f', '--osuserdomainname', help='User domain name for OpenStack', default='Default') self.parser.add_argument( - '-b', '--ostenantname', help='Tenantname for OpenStack', + '-b', '--osprojectname', help='Projet name for OpenStack', default='admin') self.parser.add_argument( '-g', '--osprojectdomainname', diff --git a/functest/tests/unit/odl/test_odl.py b/functest/tests/unit/odl/test_odl.py index a653b042..7258cd5e 100644 --- a/functest/tests/unit/odl/test_odl.py +++ b/functest/tests/unit/odl/test_odl.py @@ -71,7 +71,7 @@ class ODLTesting(unittest.TestCase): _neutron_url = "http://127.0.0.2:9696" _sdn_controller_ip = "127.0.0.3" _os_auth_url = "http://{}:5000/v3".format(_keystone_ip) - _os_tenantname = "admin" + _os_projectname = "admin" _os_username = "admin" _os_password = "admin" _odl_webport = "8080" @@ -89,7 +89,7 @@ class ODLTesting(unittest.TestCase): os.environ["OS_USERNAME"] = self._os_username os.environ["OS_USER_DOMAIN_NAME"] = self._os_userdomainname os.environ["OS_PASSWORD"] = self._os_password - os.environ["OS_TENANT_NAME"] = self._os_tenantname + os.environ["OS_PROJECT_NAME"] = self._os_projectname os.environ["OS_PROJECT_DOMAIN_NAME"] = self._os_projectdomainname os.environ["OS_PASSWORD"] = self._os_password self.test = odl.ODLTests(case_name='odl', project_name='functest') @@ -100,7 +100,7 @@ class ODLTesting(unittest.TestCase): 'osauthurl': self._os_auth_url, 'osusername': self._os_username, 'osuserdomainname': self._os_userdomainname, - 'ostenantname': self._os_tenantname, + 'osprojectname': self._os_projectname, 'osprojectdomainname': self._os_projectdomainname, 'ospassword': self._os_password, 'odlip': self._keystone_ip, @@ -225,7 +225,7 @@ class ODLMainTesting(ODLTesting): 'osauthurl': self._os_auth_url, 'osusername': self._os_username, 'osuserdomainname': self._os_userdomainname, - 'ostenantname': self._os_tenantname, + 'osprojectname': self._os_projectname, 'osprojectdomainname': self._os_projectdomainname, 'ospassword': self._os_password, 'odlip': self._sdn_controller_ip, @@ -250,7 +250,7 @@ class ODLMainTesting(ODLTesting): 'OS_AUTH_URL:"{}"'.format(self._os_auth_url), 'OSUSERNAME:"{}"'.format(self._os_username), 'OSUSERDOMAINNAME:"{}"'.format(self._os_userdomainname), - 'OSTENANTNAME:"{}"'.format(self._os_tenantname), + 'OSTENANTNAME:"{}"'.format(self._os_projectname), 'OSPROJECTDOMAINNAME:"{}"'.format(self._os_projectdomainname), 'OSPASSWORD:"{}"'.format(self._os_password), 'ODL_SYSTEM_IP:{}'.format(self._sdn_controller_ip), @@ -288,8 +288,8 @@ class ODLMainTesting(ODLTesting): def test_no_osusername(self): self._test_no_keyword('osusername') - def test_no_ostenantname(self): - self._test_no_keyword('ostenantname') + def test_no_osprojectname(self): + self._test_no_keyword('osprojectname') def test_no_ospassword(self): self._test_no_keyword('ospassword') @@ -400,7 +400,8 @@ class ODLRunTesting(ODLTesting): odlrestconfport=odlrestconfport, odlusername=self._odl_username, odlwebport=odlwebport, osauthurl=self._os_auth_url, - ospassword=self._os_password, ostenantname=self._os_tenantname, + ospassword=self._os_password, + osprojectname=self._os_projectname, osusername=self._os_username, osprojectdomainname=self._os_projectdomainname, osuserdomainname=self._os_userdomainname) @@ -422,7 +423,8 @@ class ODLRunTesting(ODLTesting): odlrestconfport=odlrestconfport, odlusername=self._odl_username, odlwebport=odlwebport, osauthurl=self._os_auth_url, - ospassword=self._os_password, ostenantname=self._os_tenantname, + ospassword=self._os_password, + osprojectname=self._os_projectname, osusername=self._os_username, osprojectdomainname=self._os_projectdomainname, osuserdomainname=self._os_userdomainname) @@ -442,8 +444,8 @@ class ODLRunTesting(ODLTesting): def test_no_os_password(self): self._test_no_env_var("OS_PASSWORD") - def test_no_os_tenant_name(self): - self._test_no_env_var("OS_TENANT_NAME") + def test_no_os__name(self): + self._test_no_env_var("OS_PROJECT_NAME") def test_run_suites_false(self): os.environ["SDN_CONTROLLER_IP"] = self._sdn_controller_ip @@ -600,8 +602,8 @@ class ODLArgParserTesting(ODLTesting): def test_osuserdomainname(self): self._test_arg('osuserdomainname', 'domain') - def test_ostenantname(self): - self._test_arg('ostenantname', 'foo') + def test_osprojectname(self): + self._test_arg('osprojectname', 'foo') def test_osprojectdomainname(self): self._test_arg('osprojectdomainname', 'domain') |