diff options
author | Linda Wang <wangwulin@huawei.com> | 2017-11-16 04:10:58 +0000 |
---|---|---|
committer | Linda Wang <wangwulin@huawei.com> | 2017-11-17 08:07:48 +0000 |
commit | f8460182ebb264212f395e873594f84d41963243 (patch) | |
tree | 4bcc0e08bf106353e7bf36cb9fbbf8738dea2135 /functest/ci | |
parent | a62233a19e60ca2c13bcbf0f477a0652842c89b6 (diff) |
Check external network
Change-Id: I1ff199fcad99aefccb92807c8f416d4f32ec91a6
Signed-off-by: Linda Wang <wangwulin@huawei.com>
Diffstat (limited to 'functest/ci')
-rw-r--r-- | functest/ci/check_deployment.py | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/functest/ci/check_deployment.py b/functest/ci/check_deployment.py index e593e17b..e1ad137c 100644 --- a/functest/ci/check_deployment.py +++ b/functest/ci/check_deployment.py @@ -22,6 +22,8 @@ import pkg_resources import socket from urlparse import urlparse +from functest.opnfv_tests.openstack.snaps import snaps_utils + from snaps.openstack.utils import glance_utils from snaps.openstack.utils import keystone_utils from snaps.openstack.utils import neutron_utils @@ -125,6 +127,14 @@ class CheckDeployment(object): LOGGER.error("Glance service ...FAILED") raise error + def check_ext_net(self): + """ checks if external network exists """ + ext_net = snaps_utils.get_ext_net_name(self.os_creds) + if ext_net: + LOGGER.info("External network found: %s" % ext_net) + else: + raise Exception("ERROR: No external networks in the deployment.") + def check_all(self): """ Calls all the class functions and returns 0 if all of them succeed. @@ -147,6 +157,7 @@ class CheckDeployment(object): self.check_nova() self.check_neutron() self.check_glance() + self.check_ext_net() return 0 |