Commit 036f5ec2 authored by Spiros Koulouzis's avatar Spiros Koulouzis

correct indentation for BEIA.yml

parent 30e1928d
This diff is collapsed.
......@@ -82,9 +82,9 @@ def handle_delivery(message):
def test_local():
home = expanduser("~")
transformer = DockerComposeTransformer(home+"/workspace/DRIP/docs/input_tosca_files/BEIA_cardif.yml")
transformer = DockerComposeTransformer(home+"/workspace/DRIP/docs/input_tosca_files/BEIA.yml")
compose = transformer.getnerate_compose()
print yaml.dump(compose)
# print yaml.dump(compose)
response = {}
current_milli_time = lambda: int(round(time.time() * 1000))
response["creationDate"] = current_milli_time()
......
......@@ -34,6 +34,7 @@ class DockerComposeTransformer:
if node_types[node_type_key] and isinstance(node_types[node_type_key],dict) and'derived_from' in node_types[node_type_key].keys():
if node_types[node_type_key]['derived_from'] == self.DOCKER_TYPE:
docker_types.add(node_type_key)
print node_type_key
return docker_types
def get_node_templates(self):
......@@ -80,7 +81,7 @@ class DockerComposeTransformer:
services['services'] = {}
for node_template_key in node_templates:
for docker_type in docker_types:
if docker_type in node_templates[node_template_key]['type']:
if isinstance(node_templates[node_template_key],dict) and 'type' in node_templates[node_template_key] and docker_type in node_templates[node_template_key]['type']:
service = {}
artifacts = self.get_artifacts(node_templates[node_template_key])
if artifacts:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment