summaryrefslogtreecommitdiffstats
path: root/robotframework-onap/vcpeutils/csar_parser.py
diff options
context:
space:
mode:
authorDR695H <dr695h@att.com>2019-05-01 18:52:33 -0400
committerDR695H <dr695h@att.com>2019-05-01 18:53:14 -0400
commitae6fedd18ad51f175d6a2e2346f284a68b6e4967 (patch)
tree40cf730e4178000533b83ebffdf6abe04011ce06 /robotframework-onap/vcpeutils/csar_parser.py
parent308b44cc1e6b95df3051e5f7db94389696763cca (diff)
support python 3
support python 3 in all files, also support python 2 however so everything should continue to work Change-Id: I4ace08d2bb0623c0fdc61f2fe39d2339817aa916 Issue-ID: TEST-141 Signed-off-by: DR695H <dr695h@att.com>
Diffstat (limited to 'robotframework-onap/vcpeutils/csar_parser.py')
-rwxr-xr-xrobotframework-onap/vcpeutils/csar_parser.py12
1 files changed, 6 insertions, 6 deletions
diff --git a/robotframework-onap/vcpeutils/csar_parser.py b/robotframework-onap/vcpeutils/csar_parser.py
index f101364..7440310 100755
--- a/robotframework-onap/vcpeutils/csar_parser.py
+++ b/robotframework-onap/vcpeutils/csar_parser.py
@@ -115,7 +115,7 @@ class CsarParser:
},
"""
node_dic = svc_template['topology_template']['node_templates']
- for node_name, v in node_dic.items():
+ for node_name, v in list(node_dic.items()):
model = {
'modelInvariantId': v['metadata']['invariantUUID'],
'modelVersionId': v['metadata']['UUID'],
@@ -177,7 +177,7 @@ class CsarParser:
},
"""
node_dic = svc_template['topology_template']['groups']
- for node_name, v in node_dic.items():
+ for node_name, v in list(node_dic.items()):
if v['type'].startswith('org.openecomp.groups.VfModule'):
model = {
'modelType': 'vfModule',
@@ -212,19 +212,19 @@ class CsarParser:
def print_models(self):
print('---------Service Model----------')
- print(json.dumps(self.svc_model, indent=2, sort_keys=True))
+ print((json.dumps(self.svc_model, indent=2, sort_keys=True)))
print('---------Network Model(s)----------')
for model in self.net_models:
- print(json.dumps(model, indent=2, sort_keys=True))
+ print((json.dumps(model, indent=2, sort_keys=True)))
print('---------VNF Model(s)----------')
for model in self.vnf_models:
- print(json.dumps(model, indent=2, sort_keys=True))
+ print((json.dumps(model, indent=2, sort_keys=True)))
print('---------VF Module Model(s)----------')
for model in self.vfmodule_models:
- print(json.dumps(model, indent=2, sort_keys=True))
+ print((json.dumps(model, indent=2, sort_keys=True)))
def test(self):
self.parse_csar('csar/service-Vcpesvcinfra111601-csar.csar')