diff options
author | Ulas Kozat <ulas.kozat@huawei.com> | 2016-11-17 22:41:32 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@opnfv.org> | 2016-11-17 22:41:32 +0000 |
commit | 825ff565d9ebebe06f915c977bf8782fcc9de8fa (patch) | |
tree | 0c84d2a0feb9c25391da8c234538ec73b2570d14 /lib | |
parent | 5d434724bf89cffaa9b21a0b02fd0e5f74c0293f (diff) | |
parent | 0d1a7cbd73b3a42eb1dc32b598ed78080a7155bc (diff) |
Merge "Replace toscaparser with native yaml to load published Tosca file into memory"
Diffstat (limited to 'lib')
-rw-r--r-- | lib/mapper/label.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/mapper/label.py b/lib/mapper/label.py index 8591d7c..3298aea 100644 --- a/lib/mapper/label.py +++ b/lib/mapper/label.py @@ -10,12 +10,12 @@ #Parses policy rules, extracts targets, extracts policy properties #Returns set of policy properties for each target in a dictionary object #e.g., node_labels['VNF1'] = {label1, label2, ..., labeln} -def extract_labels(tosca): +def extract_labels(tpl): node_labels = dict() #stores labels for each node - if tosca.tpl.has_key('topology_template'): - if tosca.tpl['topology_template'].has_key('policies'): - policies = tosca.tpl['topology_template']['policies'] + if tpl.has_key('topology_template'): + if tpl['topology_template'].has_key('policies'): + policies = tpl['topology_template']['policies'] else: return node_labels else: |