aboutsummaryrefslogtreecommitdiffstats
path: root/sfc/lib
diff options
context:
space:
mode:
Diffstat (limited to 'sfc/lib')
-rw-r--r--sfc/lib/config.py1
-rw-r--r--sfc/lib/openstack_utils.py10
2 files changed, 7 insertions, 4 deletions
diff --git a/sfc/lib/config.py b/sfc/lib/config.py
index 8adf668c..b8b0c148 100644
--- a/sfc/lib/config.py
+++ b/sfc/lib/config.py
@@ -56,6 +56,7 @@ class CommonConfig(object):
self.config_file = os.path.join(self.sfc_test_dir,
"config-pike.yaml")
+ logger.info("The config file used is {}".format(self.config_file))
self.vim_file = os.path.join(self.sfc_test_dir, "register-vim.json")
self.installer_type = env.get('INSTALLER_TYPE')
diff --git a/sfc/lib/openstack_utils.py b/sfc/lib/openstack_utils.py
index 7eef2850..d518ec6f 100644
--- a/sfc/lib/openstack_utils.py
+++ b/sfc/lib/openstack_utils.py
@@ -346,8 +346,9 @@ def create_vnfd(tacker_client, tosca_file=None, vnfd_name=None):
vnfd_body = {}
if tosca_file is not None:
with open(tosca_file) as tosca_fd:
- vnfd_body = tosca_fd.read()
- logger.info('VNFD template:\n{0}'.format(vnfd_body))
+ vnfd = tosca_fd.read()
+ vnfd_body = yaml.safe_load(vnfd)
+ logger.info('VNFD template:\n{0}'.format(vnfd))
return tacker_client.create_vnfd(
body={"vnfd": {"attributes": {"vnfd": vnfd_body},
"name": vnfd_name}})
@@ -515,8 +516,9 @@ def create_vnffgd(tacker_client, tosca_file=None, vnffgd_name=None):
vnffgd_body = {}
if tosca_file is not None:
with open(tosca_file) as tosca_fd:
- vnffgd_body = yaml.safe_load(tosca_fd)
- logger.info('VNFFGD template:\n{0}'.format(vnffgd_body))
+ vnffgd = tosca_fd.read()
+ vnffgd_body = yaml.safe_load(vnffgd)
+ logger.info('VNFFGD template:\n{0}'.format(vnffgd))
return tacker_client.create_vnffgd(
body={'vnffgd': {'name': vnffgd_name,
'template': {'vnffgd': vnffgd_body}}})