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

correct indentation for BEIA.yml

parent 30e1928d
...@@ -71,8 +71,8 @@ topology_template: ...@@ -71,8 +71,8 @@ topology_template:
name: volume_ID name: volume_ID
link: "/var/pool/bla" link: "/var/pool/bla"
mount_type: r/rw mount_type: r/rw
- monitoring_proxy: "Monitoring Proxy" - monitoring_proxy: "Monitoring Proxy"
- sip_notifier: "SIPNotifyer" - sip_notifier: "SIPNotifyer"
# So this(below) should just map to # So this(below) should just map to
# volumes: # volumes:
# graphite_data: # graphite_data:
......
This diff is collapsed.
...@@ -82,9 +82,9 @@ def handle_delivery(message): ...@@ -82,9 +82,9 @@ def handle_delivery(message):
def test_local(): def test_local():
home = expanduser("~") 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() compose = transformer.getnerate_compose()
print yaml.dump(compose) # print yaml.dump(compose)
response = {} response = {}
current_milli_time = lambda: int(round(time.time() * 1000)) current_milli_time = lambda: int(round(time.time() * 1000))
response["creationDate"] = current_milli_time() response["creationDate"] = current_milli_time()
......
...@@ -34,7 +34,8 @@ class DockerComposeTransformer: ...@@ -34,7 +34,8 @@ 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] 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: if node_types[node_type_key]['derived_from'] == self.DOCKER_TYPE:
docker_types.add(node_type_key) docker_types.add(node_type_key)
return docker_types print node_type_key
return docker_types
def get_node_templates(self): def get_node_templates(self):
return self.yaml_dict_tpl['topology_template']['node_templates'] return self.yaml_dict_tpl['topology_template']['node_templates']
...@@ -80,7 +81,7 @@ class DockerComposeTransformer: ...@@ -80,7 +81,7 @@ class DockerComposeTransformer:
services['services'] = {} services['services'] = {}
for node_template_key in node_templates: for node_template_key in node_templates:
for docker_type in docker_types: 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 = {} service = {}
artifacts = self.get_artifacts(node_templates[node_template_key]) artifacts = self.get_artifacts(node_templates[node_template_key])
if artifacts: 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