diff options
author | 2017-02-15 13:59:00 +0200 | |
---|---|---|
committer | 2017-02-15 13:59:00 +0200 | |
commit | 0ab99ba102cfa888f8219af5b4cdb1271ae577d2 (patch) | |
tree | 0d4f5ff0b7e0f0f85f0764cfb7064c04008f9240 | |
parent | 128f37f591eddae669cb606b65bb1e7ed632e965 (diff) |
Add parameterized vnfd capabilities on vnf create
JIRA: SFC-73
We can pass parameters to vnfds when creating a vnf. We need this now to
specify the availability zone
Change-Id: I8d6533ca331361f1581059050aa773936b4dff66
Signed-off-by: George Paraskevopoulos <geopar@intracom-telecom.com>
-rw-r--r-- | functest/utils/openstack_tacker.py | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/functest/utils/openstack_tacker.py b/functest/utils/openstack_tacker.py index c7ac89af..f3597965 100644 --- a/functest/utils/openstack_tacker.py +++ b/functest/utils/openstack_tacker.py @@ -108,7 +108,8 @@ def list_vnfs(tacker_client, verbose=False): return None -def create_vnf(tacker_client, vnf_name, vnfd_id=None, vnfd_name=None): +def create_vnf(tacker_client, vnf_name, vnfd_id=None, + vnfd_name=None, param_file=None): try: vnf_body = { 'vnf': { @@ -116,6 +117,10 @@ def create_vnf(tacker_client, vnf_name, vnfd_id=None, vnfd_name=None): 'name': vnf_name } } + if param_file is not None: + with open(param_file) as f: + params = f.read() + vnf_body['vnf']['attributes']['param_values'] = params if vnfd_id is not None: vnf_body['vnf']['vnfd_id'] = vnfd_id else: |