aboutsummaryrefslogtreecommitdiffstats
path: root/functest/utils
diff options
context:
space:
mode:
Diffstat (limited to 'functest/utils')
-rw-r--r--functest/utils/env.py3
-rw-r--r--functest/utils/openstack_utils.py9
2 files changed, 10 insertions, 2 deletions
diff --git a/functest/utils/env.py b/functest/utils/env.py
index 2fb766d3..d7b396ea 100644
--- a/functest/utils/env.py
+++ b/functest/utils/env.py
@@ -32,7 +32,8 @@ class Environment(object):
if k not in os.environ:
self.__setattr__(k, v)
self._set_ci_run()
- self._set_ci_loop()
+ if 'CI_LOOP' not in os.environ:
+ self._set_ci_loop()
def _set_ci_run(self):
if self.BUILD_TAG:
diff --git a/functest/utils/openstack_utils.py b/functest/utils/openstack_utils.py
index 335f14cd..8b59c954 100644
--- a/functest/utils/openstack_utils.py
+++ b/functest/utils/openstack_utils.py
@@ -22,8 +22,8 @@ from heatclient import client as heatclient
from novaclient import client as novaclient
from keystoneclient import client as keystoneclient
from neutronclient.neutron import client as neutronclient
-from functest.utils.constants import CONST
+from functest.utils.constants import CONST
import functest.utils.functest_utils as ft_utils
logger = logging.getLogger(__name__)
@@ -713,6 +713,8 @@ def get_private_net(neutron_client):
def get_external_net(neutron_client):
+ if (hasattr(CONST, 'EXTERNAL_NETWORK')):
+ return CONST.__getattribute__('EXTERNAL_NETWORK')
for network in neutron_client.list_networks()['networks']:
if network['router:external']:
return network['name']
@@ -720,6 +722,11 @@ def get_external_net(neutron_client):
def get_external_net_id(neutron_client):
+ if (hasattr(CONST, 'EXTERNAL_NETWORK')):
+ networks = neutron_client.list_networks(
+ name=CONST.__getattribute__('EXTERNAL_NETWORK'))
+ net_id = networks['networks'][0]['id']
+ return net_id
for network in neutron_client.list_networks()['networks']:
if network['router:external']:
return network['id']