diff options
-rwxr-xr-x | functest/ci/check_os.sh | 6 | ||||
-rwxr-xr-x | functest/ci/exec_test.sh | 4 | ||||
-rw-r--r-- | functest/opnfv_tests/openstack/tempest/conf_utils.py | 2 | ||||
-rwxr-xr-x | functest/opnfv_tests/sdn/odl/odl.py | 2 | ||||
-rw-r--r-- | functest/tests/unit/odl/test_odl.py | 14 |
5 files changed, 23 insertions, 5 deletions
diff --git a/functest/ci/check_os.sh b/functest/ci/check_os.sh index e2471026c..b875a173e 100755 --- a/functest/ci/check_os.sh +++ b/functest/ci/check_os.sh @@ -57,11 +57,11 @@ echo " ...OK" echo "Checking OpenStack basic services:" -commands=('openstack endpoint list' 'nova list' 'neutron net-list' \ - 'glance image-list' 'cinder list') +commands=('openstack endpoint list' 'openstack server list' 'openstack network list' \ + 'openstack image list' 'openstack volume list') for cmd in "${commands[@]}" do - service=$(echo $cmd | awk '{print $1}') + service=$(echo $cmd | awk '{print $1, $2}') echo ">>Checking $service service..." $cmd &>/dev/null result=$? diff --git a/functest/ci/exec_test.sh b/functest/ci/exec_test.sh index b288fe367..6a2b55a29 100755 --- a/functest/ci/exec_test.sh +++ b/functest/ci/exec_test.sh @@ -54,6 +54,10 @@ function odl_tests(){ odl_ip=$SDN_CONTROLLER_IP odl_port=8081 odl_restport=8081 + elif [ "$INSTALLER_TYPE" == "netvirt" ]; then + odl_ip=$SDN_CONTROLLER_IP + odl_port=8081 + odl_restport=8081 elif [ "$INSTALLER_TYPE" == "joid" ]; then odl_ip=$SDN_CONTROLLER elif [ "$INSTALLER_TYPE" == "compass" ]; then diff --git a/functest/opnfv_tests/openstack/tempest/conf_utils.py b/functest/opnfv_tests/openstack/tempest/conf_utils.py index 0c9064a14..91a5bb4b0 100644 --- a/functest/opnfv_tests/openstack/tempest/conf_utils.py +++ b/functest/opnfv_tests/openstack/tempest/conf_utils.py @@ -208,7 +208,7 @@ def configure_tempest_multisite(deployment_dir): # cmd = ("openstack endpoint show kingbird | grep publicurl |" # "awk '{print $4}' | awk -F '/' '{print $4}'") # kingbird_api_version = os.popen(cmd).read() - kingbird_api_version = os_utils.get_endpoint(service_type='kingbird') + kingbird_api_version = os_utils.get_endpoint(service_type='multisite') if CI_INSTALLER_TYPE == 'fuel': # For MOS based setup, the service is accessible diff --git a/functest/opnfv_tests/sdn/odl/odl.py b/functest/opnfv_tests/sdn/odl/odl.py index 9502be93f..250759572 100755 --- a/functest/opnfv_tests/sdn/odl/odl.py +++ b/functest/opnfv_tests/sdn/odl/odl.py @@ -164,7 +164,7 @@ class ODLTests(testcase_base.TestcaseBase): kwargs['ospassword'] = os.environ['OS_PASSWORD'] if installer_type == 'fuel': kwargs['odlwebport'] = '8282' - elif installer_type == 'apex': + elif installer_type == 'apex' or installer_type == 'netvirt': kwargs['odlip'] = os.environ['SDN_CONTROLLER_IP'] kwargs['odlwebport'] = '8081' kwargs['odlrestconfport'] = '8081' diff --git a/functest/tests/unit/odl/test_odl.py b/functest/tests/unit/odl/test_odl.py index 810b35920..8f2a5d7e4 100644 --- a/functest/tests/unit/odl/test_odl.py +++ b/functest/tests/unit/odl/test_odl.py @@ -443,6 +443,20 @@ class ODLTesting(unittest.TestCase): odlip=self._sdn_controller_ip, odlwebport='8081', odlrestconfport='8081') + def test_run_netvirt_missing_sdn_controller_ip(self): + with mock.patch('functest.utils.openstack_utils.get_endpoint', + side_effect=self._fake_url_for): + os.environ["INSTALLER_TYPE"] = "netvirt" + self.assertEqual(self.test.run(), + testcase_base.TestcaseBase.EX_RUN_ERROR) + + def test_run_netvirt(self): + os.environ["SDN_CONTROLLER_IP"] = self._sdn_controller_ip + os.environ["INSTALLER_TYPE"] = "netvirt" + self._test_run(testcase_base.TestcaseBase.EX_OK, + odlip=self._sdn_controller_ip, odlwebport='8081', + odlrestconfport='8081') + def test_run_joid_missing_sdn_controller(self): with mock.patch('functest.utils.openstack_utils.get_endpoint', side_effect=self._fake_url_for): |