diff options
author | 2016-11-17 10:57:56 -0800 | |
---|---|---|
committer | 2016-11-17 14:39:00 -0800 | |
commit | 0d1a7cbd73b3a42eb1dc32b598ed78080a7155bc (patch) | |
tree | ba1158782257d75f7bfcbbe9d787de37caaf7839 /lib/mapper | |
parent | a442c7788064542fe14c2e2e5d802fe2e1b14512 (diff) |
Replace toscaparser with native yaml to load published Tosca file into memory
Change-Id: I2ab06c97d103f95d53db256675b6949fa2b7b308
Signed-off-by: Ulas Kozat <ulas.kozat@gmail.com>
Diffstat (limited to 'lib/mapper')
-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: |