summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xfunctest/ci/prepare_env.py24
-rw-r--r--functest/utils/openstack_tacker.py5
2 files changed, 28 insertions, 1 deletions
diff --git a/functest/ci/prepare_env.py b/functest/ci/prepare_env.py
index 6b24fe086..d2e773125 100755
--- a/functest/ci/prepare_env.py
+++ b/functest/ci/prepare_env.py
@@ -21,6 +21,8 @@ import subprocess
import sys
import yaml
+
+from opnfv.deployment import factory
from opnfv.utils import constants as opnfv_constants
import functest.utils.functest_logger as ft_logger
@@ -107,6 +109,27 @@ def check_env_variables():
logger.info(" IS_CI_RUN=%s" % CONST.IS_CI_RUN)
+def print_deployment_info():
+ handler = None
+ if CONST.INSTALLER_IP:
+ if CONST.INSTALLER_TYPE == 'apex':
+ pkey = '/root/.ssh/id_rsa'
+ if os.path.isfile(pkey):
+ handler = factory.Factory.get_handler(CONST.INSTALLER_TYPE,
+ CONST.INSTALLER_IP,
+ 'stack',
+ pkey_file=pkey)
+ elif CONST.INSTALLER_TYPE == 'fuel':
+ handler = factory.Factory.get_handler(CONST.INSTALLER_TYPE,
+ CONST.INSTALLER_IP,
+ 'root',
+ installer_pwd='r00tme')
+
+ if handler:
+ logger.info('\n\nDeployment information:\n%s' %
+ handler.get_deployment_info())
+
+
def create_directories():
print_separator()
logger.info("Creating needed directories...")
@@ -286,6 +309,7 @@ def main(**kwargs):
elif kwargs['action'] == "start":
logger.info("######### Preparing Functest environment #########\n")
check_env_variables()
+ print_deployment_info()
create_directories()
source_rc_file()
patch_config_file()
diff --git a/functest/utils/openstack_tacker.py b/functest/utils/openstack_tacker.py
index 68ff32072..d745f1052 100644
--- a/functest/utils/openstack_tacker.py
+++ b/functest/utils/openstack_tacker.py
@@ -195,7 +195,8 @@ def list_sfcs(tacker_client, verbose=False):
def create_sfc(tacker_client, sfc_name,
chain_vnf_ids=None,
- chain_vnf_names=None):
+ chain_vnf_names=None,
+ symmetrical=False):
try:
sfc_body = {
'sfc': {
@@ -204,6 +205,8 @@ def create_sfc(tacker_client, sfc_name,
'chain': []
}
}
+ if symmetrical:
+ sfc_body['sfc']['symmetrical'] = True
if chain_vnf_ids is not None:
sfc_body['sfc']['chain'] = chain_vnf_ids
else: