diff options
-rw-r--r-- | docker/Dockerfile | 2 | ||||
-rw-r--r-- | docker/smoke/Dockerfile | 2 | ||||
-rw-r--r-- | functest/opnfv_tests/sdn/odl/odl.py | 17 | ||||
-rw-r--r-- | functest/tests/unit/odl/test_odl.py | 29 |
4 files changed, 44 insertions, 6 deletions
diff --git a/docker/Dockerfile b/docker/Dockerfile index 603bc38b..072ea1da 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -14,7 +14,7 @@ LABEL version="0.1" description="OPNFV Functest Docker container" # Environment variables ARG BRANCH=master ARG RALLY_TAG=stable/0.9 -ARG ODL_TAG=27b7911a5c2315145f2cf06726303dadfe508940 +ARG ODL_TAG=35e415b6873b39d72775c88a337e92dac26012e2 ARG OPENSTACK_TAG=stable/ocata ARG VIMS_TAG=stable ARG REPOS_DIR=/home/opnfv/repos diff --git a/docker/smoke/Dockerfile b/docker/smoke/Dockerfile index 3b1e8d2e..3e73d195 100644 --- a/docker/smoke/Dockerfile +++ b/docker/smoke/Dockerfile @@ -2,7 +2,7 @@ FROM opnfv/functest-core ARG BRANCH=master ARG OPENSTACK_TAG=stable/ocata -ARG ODL_TAG=27b7911a5c2315145f2cf06726303dadfe508940 +ARG ODL_TAG=35e415b6873b39d72775c88a337e92dac26012e2 ARG FDS_TAG=master COPY thirdparty-requirements.txt thirdparty-requirements.txt diff --git a/functest/opnfv_tests/sdn/odl/odl.py b/functest/opnfv_tests/sdn/odl/odl.py index ab70ba10..d09532cb 100644 --- a/functest/opnfv_tests/sdn/odl/odl.py +++ b/functest/opnfv_tests/sdn/odl/odl.py @@ -157,7 +157,11 @@ class ODLTests(testcase.TestCase): 'NEUTRON:' + kwargs['neutronip'], 'OS_AUTH_URL:"' + osauthurl + '"', 'OSUSERNAME:"' + kwargs['osusername'] + '"', + ('OSUSERDOMAINNAME:"' + + kwargs['osuserdomainname'] + '"'), 'OSTENANTNAME:"' + kwargs['ostenantname'] + '"', + ('OSPROJECTDOMAINNAME:"' + + kwargs['osprojectdomainname'] + '"'), 'OSPASSWORD:"' + kwargs['ospassword'] + '"', 'ODL_SYSTEM_IP:' + kwargs['odlip'], 'PORT:' + kwargs['odlwebport'], @@ -221,7 +225,11 @@ class ODLTests(testcase.TestCase): if 'INSTALLER_TYPE' in os.environ: installer_type = os.environ['INSTALLER_TYPE'] kwargs['osusername'] = os.environ['OS_USERNAME'] + kwargs['osuserdomainname'] = os.environ.get( + 'OS_USER_DOMAIN_NAME', 'Default') kwargs['ostenantname'] = os.environ['OS_TENANT_NAME'] + kwargs['osprojectdomainname'] = os.environ.get( + 'OS_PROJECT_DOMAIN_NAME', 'Default') kwargs['osauthurl'] = os.environ['OS_AUTH_URL'] kwargs['ospassword'] = os.environ['OS_PASSWORD'] if installer_type == 'fuel': @@ -263,14 +271,21 @@ class ODLParser(object): # pylint: disable=too-few-public-methods default='127.0.0.1') self.parser.add_argument( '-k', '--osauthurl', help='OS_AUTH_URL as defined by OpenStack', - default='http://127.0.0.1:5000/v2.0') + default='http://127.0.0.1:5000/v3') self.parser.add_argument( '-a', '--osusername', help='Username for OpenStack', default='admin') self.parser.add_argument( + '-f', '--osuserdomainname', help='User domain name for OpenStack', + default='Default') + self.parser.add_argument( '-b', '--ostenantname', help='Tenantname for OpenStack', default='admin') self.parser.add_argument( + '-g', '--osprojectdomainname', + help='Project domain name for OpenStack', + default='Default') + self.parser.add_argument( '-c', '--ospassword', help='Password for OpenStack', default='admin') self.parser.add_argument( diff --git a/functest/tests/unit/odl/test_odl.py b/functest/tests/unit/odl/test_odl.py index 878d47dd..338a4e69 100644 --- a/functest/tests/unit/odl/test_odl.py +++ b/functest/tests/unit/odl/test_odl.py @@ -69,7 +69,7 @@ class ODLTesting(unittest.TestCase): _keystone_ip = "127.0.0.1" _neutron_ip = "127.0.0.2" _sdn_controller_ip = "127.0.0.3" - _os_auth_url = "http://{}:5000/v2.0".format(_keystone_ip) + _os_auth_url = "http://{}:5000/v3".format(_keystone_ip) _os_tenantname = "admin" _os_username = "admin" _os_password = "admin" @@ -77,6 +77,8 @@ class ODLTesting(unittest.TestCase): _odl_restconfport = "8181" _odl_username = "admin" _odl_password = "admin" + _os_userdomainname = 'Default' + _os_projectdomainname = 'Default' def setUp(self): for var in ("INSTALLER_TYPE", "SDN_CONTROLLER", "SDN_CONTROLLER_IP"): @@ -84,15 +86,20 @@ class ODLTesting(unittest.TestCase): del os.environ[var] os.environ["OS_AUTH_URL"] = self._os_auth_url 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_DOMAIN_NAME"] = self._os_projectdomainname + os.environ["OS_PASSWORD"] = self._os_password self.test = odl.ODLTests(case_name='odl', project_name='functest') self.defaultargs = {'odlusername': self._odl_username, 'odlpassword': self._odl_password, 'neutronip': self._keystone_ip, 'osauthurl': self._os_auth_url, 'osusername': self._os_username, + 'osuserdomainname': self._os_userdomainname, 'ostenantname': self._os_tenantname, + 'osprojectdomainname': self._os_projectdomainname, 'ospassword': self._os_password, 'odlip': self._keystone_ip, 'odlwebport': self._odl_webport, @@ -211,7 +218,9 @@ class ODLMainTesting(ODLTesting): 'neutronip': self._neutron_ip, 'osauthurl': self._os_auth_url, 'osusername': self._os_username, + 'osuserdomainname': self._os_userdomainname, 'ostenantname': self._os_tenantname, + 'osprojectdomainname': self._os_projectdomainname, 'ospassword': self._os_password, 'odlip': self._sdn_controller_ip, 'odlwebport': self._odl_webport, @@ -231,7 +240,11 @@ class ODLMainTesting(ODLTesting): 'NEUTRON:{}'.format(self._neutron_ip), 'OS_AUTH_URL:"{}"'.format(self._os_auth_url), 'OSUSERNAME:"{}"'.format(self._os_username), + 'OSUSERDOMAINNAME:"{}"'.format( + self._os_userdomainname), 'OSTENANTNAME:"{}"'.format(self._os_tenantname), + 'OSPROJECTDOMAINNAME:"{}"'.format( + self._os_projectdomainname), 'OSPASSWORD:"{}"'.format(self._os_password), 'ODL_SYSTEM_IP:{}'.format(self._sdn_controller_ip), 'PORT:{}'.format(self._odl_webport), @@ -383,7 +396,9 @@ class ODLRunTesting(ODLTesting): odlusername=self._odl_username, odlwebport=odlwebport, osauthurl=self._os_auth_url, ospassword=self._os_password, ostenantname=self._os_tenantname, - osusername=self._os_username) + osusername=self._os_username, + osprojectdomainname=self._os_projectdomainname, + osuserdomainname=self._os_userdomainname) def _test_multiple_suites(self, suites, status=testcase.TestCase.EX_OK, **kwargs): @@ -404,7 +419,9 @@ class ODLRunTesting(ODLTesting): odlusername=self._odl_username, odlwebport=odlwebport, osauthurl=self._os_auth_url, ospassword=self._os_password, ostenantname=self._os_tenantname, - osusername=self._os_username) + osusername=self._os_username, + osprojectdomainname=self._os_projectdomainname, + osuserdomainname=self._os_userdomainname) def test_exc(self): with mock.patch('functest.utils.openstack_utils.get_endpoint', @@ -579,9 +596,15 @@ class ODLArgParserTesting(ODLTesting): def test_osusername(self): self._test_arg('osusername', 'foo') + def test_osuserdomainname(self): + self._test_arg('osuserdomainname', 'domain') + def test_ostenantname(self): self._test_arg('ostenantname', 'foo') + def test_osprojectdomainname(self): + self._test_arg('osprojectdomainname', 'domain') + def test_ospassword(self): self._test_arg('ospassword', 'foo') |