Skip to content

Commit

Permalink
Empty input section fix
Browse files Browse the repository at this point in the history
  • Loading branch information
alexmaslenn committed Feb 17, 2021
1 parent d0c450d commit 7ee3cbb
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/iacparser.py
Original file line number Diff line number Diff line change
Expand Up @@ -423,7 +423,7 @@ def transform_aadm(cls, aadm):
"node_templates": {},
"input": {}
}

top_key = None
for key, value in aadm.items():

if "topology_template_inputs" in key:
Expand Down Expand Up @@ -456,7 +456,8 @@ def transform_aadm(cls, aadm):
cls.transform_optimization(result)

result["topology_template"] = {}
result["topology_template"]["inputs"] = result["input"][top_key]
if top_key:
result["topology_template"]["inputs"] = result["input"][top_key]
result["topology_template"]["node_templates"] = result["node_templates"]
del result["node_templates"]
del result["input"]
Expand Down

0 comments on commit 7ee3cbb

Please sign in to comment.