aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorhewei-cmss <hewei@cmss.chinamobile.com>2019-06-17 19:47:48 +0800
committerhewei-cmss <hewei@cmss.chinamobile.com>2019-06-17 19:47:48 +0800
commit6450bd0de59d6551cf9174c6530c2ee97284a1e6 (patch)
tree15842b88971f61b72c3c6f120f47f14618b02341
parent1b7f3c47c81322c8f158f62779e7f08cdea19192 (diff)
avoid substitution_mappings key error
properties may be not in substitution_mappings. Issue-ID: VFC-1422 Change-Id: I624c1d3e6be51d0d9ce8c3963920f97f0b679256 Signed-off-by: hewei-cmss <hewei@cmss.chinamobile.com>
-rw-r--r--catalog/pub/utils/toscaparser/pnfmodel.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/catalog/pub/utils/toscaparser/pnfmodel.py b/catalog/pub/utils/toscaparser/pnfmodel.py
index e092e927..9ad86860 100644
--- a/catalog/pub/utils/toscaparser/pnfmodel.py
+++ b/catalog/pub/utils/toscaparser/pnfmodel.py
@@ -37,7 +37,7 @@ class PnfdInfoModel(BaseInfoModel):
pnf_substitution_mappings = tosca.tpl['topology_template'].get('substitution_mappings', None)
if pnf_substitution_mappings:
self.pnf['type'] = pnf_substitution_mappings['node_type']
- self.pnf['properties'] = pnf_substitution_mappings['properties']
+ self.pnf['properties'] = pnf_substitution_mappings.get('properties', {})
def get_all_cp(self, nodeTemplates):
self.pnf['ExtPorts'] = []