summaryrefslogtreecommitdiffstats
path: root/tosca2heat
diff options
context:
space:
mode:
Diffstat (limited to 'tosca2heat')
-rw-r--r--tosca2heat/heat-translator/translator/hot/tests/test_translate_outputs.py4
-rw-r--r--tosca2heat/heat-translator/translator/hot/tosca/tosca_compute.py2
-rw-r--r--tosca2heat/heat-translator/translator/hot/translate_node_templates.py12
-rw-r--r--tosca2heat/heat-translator/translator/tests/data/hot_output/hot_elk.yaml25
-rw-r--r--tosca2heat/heat-translator/translator/tests/data/hot_output/hot_elk_from_csar.yaml27
-rw-r--r--tosca2heat/heat-translator/translator/tests/data/hot_output/hot_host_assignment.yaml2
-rw-r--r--tosca2heat/heat-translator/translator/tests/data/hot_output/hot_nfv_sample.yaml19
-rw-r--r--tosca2heat/heat-translator/translator/tests/data/hot_output/hot_nodejs_mongodb_two_instances.yaml8
-rw-r--r--tosca2heat/heat-translator/translator/tests/data/hot_output/hot_single_instance_wordpress.yaml2
-rw-r--r--tosca2heat/heat-translator/translator/tests/data/hot_output/hot_single_instance_wordpress_from_csar.yaml2
-rw-r--r--tosca2heat/heat-translator/translator/tests/data/hot_output/hot_single_server.yaml2
-rw-r--r--tosca2heat/heat-translator/translator/tests/data/hot_output/hot_single_server_with_defaults_with_input.yaml2
-rw-r--r--tosca2heat/heat-translator/translator/tests/data/hot_output/hot_single_server_with_defaults_without_input.yaml2
-rw-r--r--tosca2heat/heat-translator/translator/tests/data/hot_output/storage/hot_blockstorage_with_attachment.yaml2
-rw-r--r--tosca2heat/heat-translator/translator/tests/data/hot_output/storage/hot_blockstorage_with_attachment_notation1_alt1.yaml4
-rw-r--r--tosca2heat/heat-translator/translator/tests/data/hot_output/storage/hot_blockstorage_with_attachment_notation1_alt2.yaml4
-rw-r--r--tosca2heat/heat-translator/translator/tests/data/hot_output/storage/hot_blockstorage_with_attachment_notation2_alt1.yaml4
-rw-r--r--tosca2heat/heat-translator/translator/tests/data/hot_output/storage/hot_blockstorage_with_attachment_notation2_alt2.yaml4
-rw-r--r--tosca2heat/heat-translator/translator/tests/data/hot_output/storage/hot_blockstorage_with_custom_relationship_type.yaml2
-rw-r--r--tosca2heat/heat-translator/translator/tests/data/hot_output/storage/hot_blockstorage_with_relationship_template.yaml2
-rw-r--r--tosca2heat/heat-translator/translator/tests/data/hot_output/storage/hot_multiple_blockstorage_with_attachment_alt1.yaml4
-rw-r--r--tosca2heat/heat-translator/translator/tests/data/hot_output/storage/hot_multiple_blockstorage_with_attachment_alt2.yaml4
-rw-r--r--tosca2heat/heat-translator/translator/tests/data/test_tosca_nfv_sample.yaml19
-rw-r--r--tosca2heat/heat-translator/translator/tests/data/vRNC/Scripts/CM/cm_active_configure.sh4
-rw-r--r--tosca2heat/heat-translator/translator/tests/data/vRNC/Scripts/CM/cm_install.sh4
-rw-r--r--tosca2heat/heat-translator/translator/tests/data/vRNC/Scripts/CM/cm_passive_configure.sh4
-rw-r--r--tosca2heat/heat-translator/translator/tests/data/vRNC/Scripts/DM/dm_configure.sh4
-rw-r--r--tosca2heat/heat-translator/translator/tests/data/vRNC/Scripts/DM/dm_install.sh4
-rw-r--r--tosca2heat/heat-translator/translator/tests/data/vRNC/Scripts/LB/lb_configure.sh4
-rw-r--r--tosca2heat/heat-translator/translator/tests/data/vRNC/Scripts/LB/lb_install.sh4
-rw-r--r--tosca2heat/heat-translator/translator/tests/data/vRNC/Scripts/MM/mm_active_configure.sh4
-rw-r--r--tosca2heat/heat-translator/translator/tests/data/vRNC/Scripts/MM/mm_install.sh4
-rw-r--r--tosca2heat/heat-translator/translator/tests/data/vRNC/Scripts/MM/mm_passive_configure.sh4
-rw-r--r--tosca2heat/heat-translator/translator/tests/data/vRNC/Scripts/MM/mm_storage_configure.sh4
34 files changed, 91 insertions, 111 deletions
diff --git a/tosca2heat/heat-translator/translator/hot/tests/test_translate_outputs.py b/tosca2heat/heat-translator/translator/hot/tests/test_translate_outputs.py
index 955150e..c02a547 100644
--- a/tosca2heat/heat-translator/translator/hot/tests/test_translate_outputs.py
+++ b/tosca2heat/heat-translator/translator/hot/tests/test_translate_outputs.py
@@ -33,12 +33,12 @@ class ToscaTemplateOutputTest(TestCase):
'server, http://<IP>:3000',
'value':
{'get_attr':
- ['app_server', 'networks', 'private', 0]}},
+ ['app_server', 'networks']}},
'mongodb_url':
{'description': 'URL for the mongodb server.',
'value':
{'get_attr':
- ['mongo_server', 'networks', 'private', 0]}}}
+ ['mongo_server', 'networks']}}}
hot_translation_dict = \
toscaparser.utils.yamlparser.simple_parse(hot_translation)
diff --git a/tosca2heat/heat-translator/translator/hot/tosca/tosca_compute.py b/tosca2heat/heat-translator/translator/hot/tosca/tosca_compute.py
index 45637ec..9ceb049 100644
--- a/tosca2heat/heat-translator/translator/hot/tosca/tosca_compute.py
+++ b/tosca2heat/heat-translator/translator/hot/tosca/tosca_compute.py
@@ -332,7 +332,7 @@ class ToscaCompute(HotResource):
attriute.'))
if attribute == 'private_address' or \
attribute == 'public_address':
- attr['get_attr'] = [self.name, 'networks', 'private', 0]
+ attr['get_attr'] = [self.name, 'networks']
return attr
diff --git a/tosca2heat/heat-translator/translator/hot/translate_node_templates.py b/tosca2heat/heat-translator/translator/hot/translate_node_templates.py
index f32d42b..4dd9556 100644
--- a/tosca2heat/heat-translator/translator/hot/translate_node_templates.py
+++ b/tosca2heat/heat-translator/translator/hot/translate_node_templates.py
@@ -533,14 +533,20 @@ class TranslateNodeTemplates(object):
def _get_attachment_node(self, node, suffix, volume_name):
attach = False
ntpl = self.nodetemplates
- for key, value in node.relationships.items():
- if key.is_derived_from('tosca.relationships.AttachesTo'):
- if value.is_derived_from('tosca.nodes.BlockStorage'):
+ for key_r, value_n in node.relationships.items():
+ if key_r.is_derived_from('tosca.relationships.AttachesTo'):
+ if value_n.is_derived_from('tosca.nodes.BlockStorage'):
attach = True
if attach:
relationship_tpl = None
for req in node.requirements:
for key, val in req.items():
+ if isinstance(val, dict):
+ if value_n.name != val.get('node'):
+ continue
+ else:
+ if value_n.name != val:
+ continue
attach = val
relship = val.get('relationship')
for rkey, rval in val.items():
diff --git a/tosca2heat/heat-translator/translator/tests/data/hot_output/hot_elk.yaml b/tosca2heat/heat-translator/translator/tests/data/hot_output/hot_elk.yaml
index a298745..1fbd44e 100644
--- a/tosca2heat/heat-translator/translator/tests/data/hot_output/hot_elk.yaml
+++ b/tosca2heat/heat-translator/translator/tests/data/hot_output/hot_elk.yaml
@@ -52,8 +52,6 @@ resources:
get_attr:
- mongo_server
- networks
- - private
- - 0
server:
get_resource: app_server
depends_on:
@@ -110,8 +108,6 @@ resources:
get_attr:
- mongo_server
- networks
- - private
- - 0
server:
get_resource: mongo_server
depends_on:
@@ -186,8 +182,6 @@ resources:
get_attr:
- logstash_server
- networks
- - private
- - 0
server:
get_resource: app_server
depends_on:
@@ -279,8 +273,6 @@ resources:
get_attr:
- logstash_server
- networks
- - private
- - 0
server:
get_resource: app_server
depends_on:
@@ -355,8 +347,6 @@ resources:
get_attr:
- elasticsearch_server
- networks
- - private
- - 0
server:
get_resource: logstash_server
depends_on:
@@ -430,14 +420,10 @@ resources:
get_attr:
- elasticsearch_server
- networks
- - private
- - 0
kibana_ip:
get_attr:
- kibana_server
- networks
- - private
- - 0
server:
get_resource: kibana_server
depends_on:
@@ -510,8 +496,6 @@ outputs:
get_attr:
- app_server
- networks
- - private
- - 0
mongodb_url:
description: URL for the mongodb server.
@@ -519,8 +503,6 @@ outputs:
get_attr:
- mongo_server
- networks
- - private
- - 0
logstash_url:
description: URL for the logstash server.
@@ -528,8 +510,6 @@ outputs:
get_attr:
- logstash_server
- networks
- - private
- - 0
elasticsearch_url:
description: URL for the elasticsearch server.
@@ -537,8 +517,6 @@ outputs:
get_attr:
- elasticsearch_server
- networks
- - private
- - 0
kibana_url:
description: URL for the kibana server.
@@ -546,6 +524,3 @@ outputs:
get_attr:
- kibana_server
- networks
- - private
- - 0
-
diff --git a/tosca2heat/heat-translator/translator/tests/data/hot_output/hot_elk_from_csar.yaml b/tosca2heat/heat-translator/translator/tests/data/hot_output/hot_elk_from_csar.yaml
index 5eb1701..50491ef 100644
--- a/tosca2heat/heat-translator/translator/tests/data/hot_output/hot_elk_from_csar.yaml
+++ b/tosca2heat/heat-translator/translator/tests/data/hot_output/hot_elk_from_csar.yaml
@@ -52,8 +52,7 @@ resources:
get_attr:
- mongo_server
- networks
- - private
- - 0
+
server:
get_resource: app_server
depends_on:
@@ -110,8 +109,7 @@ resources:
get_attr:
- mongo_server
- networks
- - private
- - 0
+
server:
get_resource: mongo_server
depends_on:
@@ -186,8 +184,6 @@ resources:
get_attr:
- logstash_server
- networks
- - private
- - 0
server:
get_resource: app_server
depends_on:
@@ -279,8 +275,6 @@ resources:
get_attr:
- logstash_server
- networks
- - private
- - 0
server:
get_resource: app_server
depends_on:
@@ -355,8 +349,6 @@ resources:
get_attr:
- elasticsearch_server
- networks
- - private
- - 0
server:
get_resource: logstash_server
depends_on:
@@ -430,14 +422,11 @@ resources:
get_attr:
- elasticsearch_server
- networks
- - private
- - 0
kibana_ip:
get_attr:
- kibana_server
- networks
- - private
- - 0
+
server:
get_resource: kibana_server
depends_on:
@@ -510,8 +499,6 @@ outputs:
get_attr:
- app_server
- networks
- - private
- - 0
mongodb_url:
description: URL for the mongodb server.
@@ -519,8 +506,6 @@ outputs:
get_attr:
- mongo_server
- networks
- - private
- - 0
logstash_url:
description: URL for the logstash server.
@@ -528,8 +513,6 @@ outputs:
get_attr:
- logstash_server
- networks
- - private
- - 0
elasticsearch_url:
description: URL for the elasticsearch server.
@@ -537,8 +520,6 @@ outputs:
get_attr:
- elasticsearch_server
- networks
- - private
- - 0
kibana_url:
description: URL for the kibana server.
@@ -546,6 +527,4 @@ outputs:
get_attr:
- kibana_server
- networks
- - private
- - 0
diff --git a/tosca2heat/heat-translator/translator/tests/data/hot_output/hot_host_assignment.yaml b/tosca2heat/heat-translator/translator/tests/data/hot_output/hot_host_assignment.yaml
index 33f3059..29f12cc 100644
--- a/tosca2heat/heat-translator/translator/tests/data/hot_output/hot_host_assignment.yaml
+++ b/tosca2heat/heat-translator/translator/tests/data/hot_output/hot_host_assignment.yaml
@@ -59,8 +59,6 @@ resources:
get_attr:
- logstash_server
- networks
- - private
- - 0
server:
get_resource: app_server
depends_on:
diff --git a/tosca2heat/heat-translator/translator/tests/data/hot_output/hot_nfv_sample.yaml b/tosca2heat/heat-translator/translator/tests/data/hot_output/hot_nfv_sample.yaml
index d66569d..79750d4 100644
--- a/tosca2heat/heat-translator/translator/tests/data/hot_output/hot_nfv_sample.yaml
+++ b/tosca2heat/heat-translator/translator/tests/data/hot_output/hot_nfv_sample.yaml
@@ -8,23 +8,38 @@ resources:
VDU1:
type: OS::Nova::Server
properties:
- flavor: m1.medium
+ flavor: m1.tiny
image: rhel-6.5-test-image
networks:
- port: { get_resource: CP1 }
user_data_format: SOFTWARE_CONFIG
depends_on:
- VDU2
+ - BlockStorage
VDU2:
type: OS::Nova::Server
properties:
- flavor: m1.medium
+ flavor: m1.tiny
image: rhel-6.5-test-image
networks:
- port: { get_resource: CP2 }
user_data_format: SOFTWARE_CONFIG
+ BlockStorage:
+ type: OS::Cinder::Volume
+ properties:
+ size: 1
+
+ tosca.relationships.attachesto_1:
+ type: OS::Cinder::VolumeAttachment
+ properties:
+ instance_uuid:
+ get_resource: VDU1
+ mountpoint: /dev/vdb1
+ volume_id:
+ get_resource: BlockStorage
+
CP1:
type: OS::Neutron::Port
properties:
diff --git a/tosca2heat/heat-translator/translator/tests/data/hot_output/hot_nodejs_mongodb_two_instances.yaml b/tosca2heat/heat-translator/translator/tests/data/hot_output/hot_nodejs_mongodb_two_instances.yaml
index b95120b..3406b51 100644
--- a/tosca2heat/heat-translator/translator/tests/data/hot_output/hot_nodejs_mongodb_two_instances.yaml
+++ b/tosca2heat/heat-translator/translator/tests/data/hot_output/hot_nodejs_mongodb_two_instances.yaml
@@ -46,8 +46,6 @@ resources:
get_attr:
- mongo_server
- networks
- - private
- - 0
server:
get_resource: mongo_server
depends_on:
@@ -120,8 +118,6 @@ resources:
get_attr:
- mongo_server
- networks
- - private
- - 0
server:
get_resource: app_server
depends_on:
@@ -173,13 +169,9 @@ outputs:
get_attr:
- mongo_server
- networks
- - private
- - 0
nodejs_url:
description: URL for the nodejs server, http://<IP>:3000
value:
get_attr:
- app_server
- networks
- - private
- - 0
diff --git a/tosca2heat/heat-translator/translator/tests/data/hot_output/hot_single_instance_wordpress.yaml b/tosca2heat/heat-translator/translator/tests/data/hot_output/hot_single_instance_wordpress.yaml
index 8c10a93..fbbeab2 100644
--- a/tosca2heat/heat-translator/translator/tests/data/hot_output/hot_single_instance_wordpress.yaml
+++ b/tosca2heat/heat-translator/translator/tests/data/hot_output/hot_single_instance_wordpress.yaml
@@ -205,5 +205,3 @@ outputs:
get_attr:
- server
- networks
- - private
- - 0
diff --git a/tosca2heat/heat-translator/translator/tests/data/hot_output/hot_single_instance_wordpress_from_csar.yaml b/tosca2heat/heat-translator/translator/tests/data/hot_output/hot_single_instance_wordpress_from_csar.yaml
index 3598540..02c0543 100644
--- a/tosca2heat/heat-translator/translator/tests/data/hot_output/hot_single_instance_wordpress_from_csar.yaml
+++ b/tosca2heat/heat-translator/translator/tests/data/hot_output/hot_single_instance_wordpress_from_csar.yaml
@@ -203,5 +203,3 @@ outputs:
get_attr:
- server
- networks
- - private
- - 0
diff --git a/tosca2heat/heat-translator/translator/tests/data/hot_output/hot_single_server.yaml b/tosca2heat/heat-translator/translator/tests/data/hot_output/hot_single_server.yaml
index 5cffb43..e494791 100644
--- a/tosca2heat/heat-translator/translator/tests/data/hot_output/hot_single_server.yaml
+++ b/tosca2heat/heat-translator/translator/tests/data/hot_output/hot_single_server.yaml
@@ -32,5 +32,3 @@ outputs:
get_attr:
- my_server
- networks
- - private
- - 0
diff --git a/tosca2heat/heat-translator/translator/tests/data/hot_output/hot_single_server_with_defaults_with_input.yaml b/tosca2heat/heat-translator/translator/tests/data/hot_output/hot_single_server_with_defaults_with_input.yaml
index 1eb88a7..6211cad 100644
--- a/tosca2heat/heat-translator/translator/tests/data/hot_output/hot_single_server_with_defaults_with_input.yaml
+++ b/tosca2heat/heat-translator/translator/tests/data/hot_output/hot_single_server_with_defaults_with_input.yaml
@@ -32,5 +32,3 @@ outputs:
get_attr:
- my_server
- networks
- - private
- - 0
diff --git a/tosca2heat/heat-translator/translator/tests/data/hot_output/hot_single_server_with_defaults_without_input.yaml b/tosca2heat/heat-translator/translator/tests/data/hot_output/hot_single_server_with_defaults_without_input.yaml
index 4e7e6b5..22a0198 100644
--- a/tosca2heat/heat-translator/translator/tests/data/hot_output/hot_single_server_with_defaults_without_input.yaml
+++ b/tosca2heat/heat-translator/translator/tests/data/hot_output/hot_single_server_with_defaults_without_input.yaml
@@ -32,5 +32,3 @@ outputs:
get_attr:
- my_server
- networks
- - private
- - 0
diff --git a/tosca2heat/heat-translator/translator/tests/data/hot_output/storage/hot_blockstorage_with_attachment.yaml b/tosca2heat/heat-translator/translator/tests/data/hot_output/storage/hot_blockstorage_with_attachment.yaml
index 5ff5382..6803858 100644
--- a/tosca2heat/heat-translator/translator/tests/data/hot_output/storage/hot_blockstorage_with_attachment.yaml
+++ b/tosca2heat/heat-translator/translator/tests/data/hot_output/storage/hot_blockstorage_with_attachment.yaml
@@ -63,8 +63,6 @@ outputs:
get_attr:
- my_server
- networks
- - private
- - 0
volume_id:
description: The volume id of the block storage instance.
value:
diff --git a/tosca2heat/heat-translator/translator/tests/data/hot_output/storage/hot_blockstorage_with_attachment_notation1_alt1.yaml b/tosca2heat/heat-translator/translator/tests/data/hot_output/storage/hot_blockstorage_with_attachment_notation1_alt1.yaml
index 9ffaf23..0450b1f 100644
--- a/tosca2heat/heat-translator/translator/tests/data/hot_output/storage/hot_blockstorage_with_attachment_notation1_alt1.yaml
+++ b/tosca2heat/heat-translator/translator/tests/data/hot_output/storage/hot_blockstorage_with_attachment_notation1_alt1.yaml
@@ -76,16 +76,12 @@ outputs:
get_attr:
- my_web_app_tier_1
- networks
- - private
- - 0
private_ip_2:
description: The private IP address of the applications second tier.
value:
get_attr:
- my_web_app_tier_2
- networks
- - private
- - 0
volume_id:
description: The volume id of the block storage instance.
value:
diff --git a/tosca2heat/heat-translator/translator/tests/data/hot_output/storage/hot_blockstorage_with_attachment_notation1_alt2.yaml b/tosca2heat/heat-translator/translator/tests/data/hot_output/storage/hot_blockstorage_with_attachment_notation1_alt2.yaml
index 9b5e71c..e65e789 100644
--- a/tosca2heat/heat-translator/translator/tests/data/hot_output/storage/hot_blockstorage_with_attachment_notation1_alt2.yaml
+++ b/tosca2heat/heat-translator/translator/tests/data/hot_output/storage/hot_blockstorage_with_attachment_notation1_alt2.yaml
@@ -76,16 +76,12 @@ outputs:
get_attr:
- my_web_app_tier_1
- networks
- - private
- - 0
private_ip_2:
description: The private IP address of the applications second tier.
value:
get_attr:
- my_web_app_tier_2
- networks
- - private
- - 0
volume_id:
description: The volume id of the block storage instance.
value:
diff --git a/tosca2heat/heat-translator/translator/tests/data/hot_output/storage/hot_blockstorage_with_attachment_notation2_alt1.yaml b/tosca2heat/heat-translator/translator/tests/data/hot_output/storage/hot_blockstorage_with_attachment_notation2_alt1.yaml
index 1b4eb73..a8c114e 100644
--- a/tosca2heat/heat-translator/translator/tests/data/hot_output/storage/hot_blockstorage_with_attachment_notation2_alt1.yaml
+++ b/tosca2heat/heat-translator/translator/tests/data/hot_output/storage/hot_blockstorage_with_attachment_notation2_alt1.yaml
@@ -80,16 +80,12 @@ outputs:
get_attr:
- my_web_app_tier_1
- networks
- - private
- - 0
private_ip_2:
description: The private IP address of the applications second tier.
value:
get_attr:
- my_web_app_tier_2
- networks
- - private
- - 0
volume_id:
description: The volume id of the block storage instance.
value:
diff --git a/tosca2heat/heat-translator/translator/tests/data/hot_output/storage/hot_blockstorage_with_attachment_notation2_alt2.yaml b/tosca2heat/heat-translator/translator/tests/data/hot_output/storage/hot_blockstorage_with_attachment_notation2_alt2.yaml
index 0311a55..59b46ae 100644
--- a/tosca2heat/heat-translator/translator/tests/data/hot_output/storage/hot_blockstorage_with_attachment_notation2_alt2.yaml
+++ b/tosca2heat/heat-translator/translator/tests/data/hot_output/storage/hot_blockstorage_with_attachment_notation2_alt2.yaml
@@ -80,16 +80,12 @@ outputs:
get_attr:
- my_web_app_tier_1
- networks
- - private
- - 0
private_ip_2:
description: The private IP address of the applications second tier.
value:
get_attr:
- my_web_app_tier_2
- networks
- - private
- - 0
volume_id:
description: The volume id of the block storage instance.
value:
diff --git a/tosca2heat/heat-translator/translator/tests/data/hot_output/storage/hot_blockstorage_with_custom_relationship_type.yaml b/tosca2heat/heat-translator/translator/tests/data/hot_output/storage/hot_blockstorage_with_custom_relationship_type.yaml
index bce4603..639832c 100644
--- a/tosca2heat/heat-translator/translator/tests/data/hot_output/storage/hot_blockstorage_with_custom_relationship_type.yaml
+++ b/tosca2heat/heat-translator/translator/tests/data/hot_output/storage/hot_blockstorage_with_custom_relationship_type.yaml
@@ -64,8 +64,6 @@ outputs:
get_attr:
- my_server
- networks
- - private
- - 0
volume_id:
description: The volume id of the block storage instance.
value:
diff --git a/tosca2heat/heat-translator/translator/tests/data/hot_output/storage/hot_blockstorage_with_relationship_template.yaml b/tosca2heat/heat-translator/translator/tests/data/hot_output/storage/hot_blockstorage_with_relationship_template.yaml
index e17dff9..20b77c2 100644
--- a/tosca2heat/heat-translator/translator/tests/data/hot_output/storage/hot_blockstorage_with_relationship_template.yaml
+++ b/tosca2heat/heat-translator/translator/tests/data/hot_output/storage/hot_blockstorage_with_relationship_template.yaml
@@ -57,8 +57,6 @@ outputs:
get_attr:
- my_server
- networks
- - private
- - 0
volume_id:
description: The volume id of the block storage instance.
value:
diff --git a/tosca2heat/heat-translator/translator/tests/data/hot_output/storage/hot_multiple_blockstorage_with_attachment_alt1.yaml b/tosca2heat/heat-translator/translator/tests/data/hot_output/storage/hot_multiple_blockstorage_with_attachment_alt1.yaml
index 55ada08..cff83f9 100644
--- a/tosca2heat/heat-translator/translator/tests/data/hot_output/storage/hot_multiple_blockstorage_with_attachment_alt1.yaml
+++ b/tosca2heat/heat-translator/translator/tests/data/hot_output/storage/hot_multiple_blockstorage_with_attachment_alt1.yaml
@@ -89,16 +89,12 @@ outputs:
get_attr:
- my_server
- networks
- - private
- - 0
server_ip_2:
description: The private IP address of the applications second server.
value:
get_attr:
- my_server2
- networks
- - private
- - 0
volume_id_1:
description: The volume id of the first block storage instance.
value:
diff --git a/tosca2heat/heat-translator/translator/tests/data/hot_output/storage/hot_multiple_blockstorage_with_attachment_alt2.yaml b/tosca2heat/heat-translator/translator/tests/data/hot_output/storage/hot_multiple_blockstorage_with_attachment_alt2.yaml
index 3386d79..0fdcb4b 100644
--- a/tosca2heat/heat-translator/translator/tests/data/hot_output/storage/hot_multiple_blockstorage_with_attachment_alt2.yaml
+++ b/tosca2heat/heat-translator/translator/tests/data/hot_output/storage/hot_multiple_blockstorage_with_attachment_alt2.yaml
@@ -89,16 +89,12 @@ outputs:
get_attr:
- my_server
- networks
- - private
- - 0
server_ip_2:
description: The private IP address of the applications second server.
value:
get_attr:
- my_server2
- networks
- - private
- - 0
volume_id_1:
description: The volume id of the first block storage instance.
value:
diff --git a/tosca2heat/heat-translator/translator/tests/data/test_tosca_nfv_sample.yaml b/tosca2heat/heat-translator/translator/tests/data/test_tosca_nfv_sample.yaml
index e5c8d3c..5803bd2 100644
--- a/tosca2heat/heat-translator/translator/tests/data/test_tosca_nfv_sample.yaml
+++ b/tosca2heat/heat-translator/translator/tests/data/test_tosca_nfv_sample.yaml
@@ -10,8 +10,8 @@ topology_template:
capabilities:
host:
properties:
- num_cpus: 2
- disk_size: 10 GB
+ num_cpus: 1
+ disk_size: 1 GB
mem_size: 512 MB
# Guest Operating System properties
os:
@@ -23,14 +23,25 @@ topology_template:
version: 6.5
requirements:
- high_availability: VDU2
+ - local_storage:
+ node: BlockStorage
+ relationship:
+ type: tosca.relationships.AttachesTo
+ properties:
+ location: /dev/vdb1
+
+ BlockStorage:
+ type: tosca.nodes.BlockStorage
+ properties:
+ size: 1 GB
VDU2:
type: tosca.nodes.nfv.VDU
capabilities:
host:
properties:
- num_cpus: 2
- disk_size: 10 GB
+ num_cpus: 1
+ disk_size: 1 GB
mem_size: 512 MB
# Guest Operating System properties
os:
diff --git a/tosca2heat/heat-translator/translator/tests/data/vRNC/Scripts/CM/cm_active_configure.sh b/tosca2heat/heat-translator/translator/tests/data/vRNC/Scripts/CM/cm_active_configure.sh
new file mode 100644
index 0000000..9ad8b7e
--- /dev/null
+++ b/tosca2heat/heat-translator/translator/tests/data/vRNC/Scripts/CM/cm_active_configure.sh
@@ -0,0 +1,4 @@
+#!/bin/bash
+echo "CM active configuring..." >> ~/vRNC_CM.log
+sleep 3
+echo "CM active configured" >> ~/vRNC_CM.log
diff --git a/tosca2heat/heat-translator/translator/tests/data/vRNC/Scripts/CM/cm_install.sh b/tosca2heat/heat-translator/translator/tests/data/vRNC/Scripts/CM/cm_install.sh
new file mode 100644
index 0000000..ebd3c1d
--- /dev/null
+++ b/tosca2heat/heat-translator/translator/tests/data/vRNC/Scripts/CM/cm_install.sh
@@ -0,0 +1,4 @@
+#!/bin/bash
+echo "CM installing..." >> ~/vRNC_CM.log
+sleep 3
+echo "CM installed" >> ~/vRNC_CM.log
diff --git a/tosca2heat/heat-translator/translator/tests/data/vRNC/Scripts/CM/cm_passive_configure.sh b/tosca2heat/heat-translator/translator/tests/data/vRNC/Scripts/CM/cm_passive_configure.sh
new file mode 100644
index 0000000..79ad229
--- /dev/null
+++ b/tosca2heat/heat-translator/translator/tests/data/vRNC/Scripts/CM/cm_passive_configure.sh
@@ -0,0 +1,4 @@
+#!/bin/bash
+echo "CM passive configuring..." >> ~/vRNC_CM.log
+sleep 3
+echo "CM passive configured" >> ~/vRNC_CM.log
diff --git a/tosca2heat/heat-translator/translator/tests/data/vRNC/Scripts/DM/dm_configure.sh b/tosca2heat/heat-translator/translator/tests/data/vRNC/Scripts/DM/dm_configure.sh
new file mode 100644
index 0000000..c72a9f4
--- /dev/null
+++ b/tosca2heat/heat-translator/translator/tests/data/vRNC/Scripts/DM/dm_configure.sh
@@ -0,0 +1,4 @@
+#!/bin/bash
+echo "DM configuring..." >> ~/vRNC_DM.log
+sleep 3
+echo "DM configured" >> ~/vRNC_DM.log
diff --git a/tosca2heat/heat-translator/translator/tests/data/vRNC/Scripts/DM/dm_install.sh b/tosca2heat/heat-translator/translator/tests/data/vRNC/Scripts/DM/dm_install.sh
new file mode 100644
index 0000000..9bef6de
--- /dev/null
+++ b/tosca2heat/heat-translator/translator/tests/data/vRNC/Scripts/DM/dm_install.sh
@@ -0,0 +1,4 @@
+#!/bin/bash
+echo "DM installing..." >> ~/vRNC_DM.log
+sleep 3
+echo "DM installed" >> ~/vRNC_DM.log
diff --git a/tosca2heat/heat-translator/translator/tests/data/vRNC/Scripts/LB/lb_configure.sh b/tosca2heat/heat-translator/translator/tests/data/vRNC/Scripts/LB/lb_configure.sh
new file mode 100644
index 0000000..baf6305
--- /dev/null
+++ b/tosca2heat/heat-translator/translator/tests/data/vRNC/Scripts/LB/lb_configure.sh
@@ -0,0 +1,4 @@
+#!/bin/bash
+echo "LB configuring..." >> ~/vRNC_LB.log
+sleep 3
+echo "LB configured" >> ~/vRNC_LB.log
diff --git a/tosca2heat/heat-translator/translator/tests/data/vRNC/Scripts/LB/lb_install.sh b/tosca2heat/heat-translator/translator/tests/data/vRNC/Scripts/LB/lb_install.sh
new file mode 100644
index 0000000..59cba36
--- /dev/null
+++ b/tosca2heat/heat-translator/translator/tests/data/vRNC/Scripts/LB/lb_install.sh
@@ -0,0 +1,4 @@
+#!/bin/bash
+echo "LB installing..." >> ~/vRNC_LB.log
+sleep 3
+echo "LB installed" >> ~/vRNC_LB.log
diff --git a/tosca2heat/heat-translator/translator/tests/data/vRNC/Scripts/MM/mm_active_configure.sh b/tosca2heat/heat-translator/translator/tests/data/vRNC/Scripts/MM/mm_active_configure.sh
new file mode 100644
index 0000000..ef479a8
--- /dev/null
+++ b/tosca2heat/heat-translator/translator/tests/data/vRNC/Scripts/MM/mm_active_configure.sh
@@ -0,0 +1,4 @@
+#!/bin/bash
+echo "MM active configuring..." >> ~/vRNC_MM.log
+sleep 3
+echo "MM active configured" >> ~/vRNC_MM.log
diff --git a/tosca2heat/heat-translator/translator/tests/data/vRNC/Scripts/MM/mm_install.sh b/tosca2heat/heat-translator/translator/tests/data/vRNC/Scripts/MM/mm_install.sh
new file mode 100644
index 0000000..fc44a12
--- /dev/null
+++ b/tosca2heat/heat-translator/translator/tests/data/vRNC/Scripts/MM/mm_install.sh
@@ -0,0 +1,4 @@
+#!/bin/bash
+echo "MM installing..." >> ~/vRNC_MM.log
+sleep 3
+echo "MM installed" >> ~/vRNC_MM.log
diff --git a/tosca2heat/heat-translator/translator/tests/data/vRNC/Scripts/MM/mm_passive_configure.sh b/tosca2heat/heat-translator/translator/tests/data/vRNC/Scripts/MM/mm_passive_configure.sh
new file mode 100644
index 0000000..b6d6706
--- /dev/null
+++ b/tosca2heat/heat-translator/translator/tests/data/vRNC/Scripts/MM/mm_passive_configure.sh
@@ -0,0 +1,4 @@
+#!/bin/bash
+echo "MM passive configuring..." >> ~/vRNC_MM.log
+sleep 3
+echo "MM passive configured" >> ~/vRNC_MM.log
diff --git a/tosca2heat/heat-translator/translator/tests/data/vRNC/Scripts/MM/mm_storage_configure.sh b/tosca2heat/heat-translator/translator/tests/data/vRNC/Scripts/MM/mm_storage_configure.sh
new file mode 100644
index 0000000..0f6d63a
--- /dev/null
+++ b/tosca2heat/heat-translator/translator/tests/data/vRNC/Scripts/MM/mm_storage_configure.sh
@@ -0,0 +1,4 @@
+#!/bin/bash
+echo "MM storage installing..." >> ~/vRNC_MM.log
+sleep 3
+echo "MM storage installed" >> ~/vRNC_MM.log