diff options
author | ying.yunlong <ying.yunlong@zte.com.cn> | 2017-10-27 17:16:40 +0800 |
---|---|---|
committer | ying.yunlong <ying.yunlong@zte.com.cn> | 2017-10-27 17:16:40 +0800 |
commit | f7d70cfa33dd783474ca3f2c25debd13a1d4a38e (patch) | |
tree | 30d726a6f6750425eaa5e5d75e37fddb1ef6a124 | |
parent | dd2386894b96b0dbe93817d327e41c19d09fbbf1 (diff) |
Fix vfc-catalog convert dependencies bug
Change-Id: Ic3b10ce735fbd305f4579e2e9114b91109f352a2
Issue-ID: VFC-558
Signed-off-by: ying.yunlong <ying.yunlong@zte.com.cn>
-rw-r--r-- | catalog/pub/utils/toscaparser/basemodel.py | 2 | ||||
-rw-r--r-- | catalog/pub/utils/toscaparser/nsdmodel.py | 3 |
2 files changed, 3 insertions, 2 deletions
diff --git a/catalog/pub/utils/toscaparser/basemodel.py b/catalog/pub/utils/toscaparser/basemodel.py index 177551dc..ef5e5205 100644 --- a/catalog/pub/utils/toscaparser/basemodel.py +++ b/catalog/pub/utils/toscaparser/basemodel.py @@ -273,7 +273,7 @@ class BaseInfoModel(object): if 'requirements' in node: for item in node['requirements']: for key, value in item.items(): - if key.upper().find('VIRTUALLINK') >= 0: + if key.upper().find('VIRTUAL_LINK') >= 0: rets.append({"key_name": key, "vl_id": self.get_requirement_node_name(value)}) return rets diff --git a/catalog/pub/utils/toscaparser/nsdmodel.py b/catalog/pub/utils/toscaparser/nsdmodel.py index 47a05f09..e4291884 100644 --- a/catalog/pub/utils/toscaparser/nsdmodel.py +++ b/catalog/pub/utils/toscaparser/nsdmodel.py @@ -101,7 +101,8 @@ class EtsiNsdInfoModel(BaseInfoModel): vnf['properties'].update(csarType=vnf['properties'].pop(key)) if key.endswith('_vnfm_type') or key.endswith('_vnfmType'): vnf['properties'].update(vnfmType=vnf['properties'].pop(key)) - vnf['dependencies'] = map(lambda x: self.get_requirement_node_name(x), self.getNodeDependencys(node)) + # vnf['dependencies'] = map(lambda x: self.get_requirement_node_name(x), self.getNodeDependencys(node)) + vnf['dependencies'] = self.get_networks(node) vnf['networks'] = self.get_networks(node) vnfs.append(vnf) |