summaryrefslogtreecommitdiffstats
path: root/tosca2heat
diff options
context:
space:
mode:
authorshangxdy <shang.xiaodong@zte.com.cn>2016-09-29 17:01:31 +0000
committerGerrit Code Review <gerrit@172.30.200.206>2016-09-29 17:01:31 +0000
commit9d425078f44d463dbb20b1e7e74b1c3e6ce928b2 (patch)
tree498b8c6d39d6a72b287aa9654a8b77c83c941d71 /tosca2heat
parent4fcb3c5ed4446092cdcfceb88edf79b1ffaaddc6 (diff)
parent86f92e7761cb6a06d96fbeee984432ce90f8af65 (diff)
Merge "Add ip output in compute translation"
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/tests/data/hot_output/hot_elk.yaml24
-rw-r--r--tosca2heat/heat-translator/translator/tests/data/hot_output/hot_elk_from_csar.yaml25
-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_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/hot_vRNC.yaml8
-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
21 files changed, 56 insertions, 57 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 c02a547..12ea355 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']}},
+ ['app_server', 'first_address']}},
'mongodb_url':
{'description': 'URL for the mongodb server.',
'value':
{'get_attr':
- ['mongo_server', 'networks']}}}
+ ['mongo_server', 'first_address']}}}
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 8a959d1..b685d6a 100644
--- a/tosca2heat/heat-translator/translator/hot/tosca/tosca_compute.py
+++ b/tosca2heat/heat-translator/translator/hot/tosca/tosca_compute.py
@@ -324,7 +324,7 @@ class ToscaCompute(HotResource):
attriute.'))
if attribute == 'private_address' or \
attribute == 'public_address':
- attr['get_attr'] = [self.name, 'networks']
+ attr['get_attr'] = [self.name, 'first_address']
return attr
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 debbcf7..7d0a038 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,7 +52,7 @@ resources:
mongodb_ip:
get_attr:
- mongo_server
- - networks
+ - first_address
server:
get_resource: app_server
signal_transport: HEAT_SIGNAL
@@ -111,7 +111,7 @@ resources:
mongodb_ip:
get_attr:
- mongo_server
- - networks
+ - first_address
server:
get_resource: mongo_server
signal_transport: HEAT_SIGNAL
@@ -189,7 +189,7 @@ resources:
logstash_ip:
get_attr:
- logstash_server
- - networks
+ - first_address
server:
get_resource: app_server
signal_transport: HEAT_SIGNAL
@@ -285,7 +285,7 @@ resources:
logstash_ip:
get_attr:
- logstash_server
- - networks
+ - first_address
server:
get_resource: app_server
signal_transport: HEAT_SIGNAL
@@ -363,7 +363,7 @@ resources:
elasticsearch_ip:
get_attr:
- elasticsearch_server
- - networks
+ - first_address
server:
get_resource: logstash_server
signal_transport: HEAT_SIGNAL
@@ -440,11 +440,11 @@ resources:
elasticsearch_ip:
get_attr:
- elasticsearch_server
- - networks
+ - first_address
kibana_ip:
get_attr:
- kibana_server
- - networks
+ - first_address
server:
get_resource: kibana_server
signal_transport: HEAT_SIGNAL
@@ -523,32 +523,32 @@ outputs:
value:
get_attr:
- app_server
- - networks
+ - first_address
mongodb_url:
description: URL for the mongodb server.
value:
get_attr:
- mongo_server
- - networks
+ - first_address
logstash_url:
description: URL for the logstash server.
value:
get_attr:
- logstash_server
- - networks
+ - first_address
elasticsearch_url:
description: URL for the elasticsearch server.
value:
get_attr:
- elasticsearch_server
- - networks
+ - first_address
kibana_url:
description: URL for the kibana server.
value:
get_attr:
- kibana_server
- - networks
+ - first_address
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 28ac520..e5df8d2 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,7 +52,7 @@ resources:
mongodb_ip:
get_attr:
- mongo_server
- - networks
+ - first_address
server:
get_resource: app_server
@@ -112,7 +112,7 @@ resources:
mongodb_ip:
get_attr:
- mongo_server
- - networks
+ - first_address
server:
get_resource: mongo_server
@@ -191,7 +191,7 @@ resources:
logstash_ip:
get_attr:
- logstash_server
- - networks
+ - first_address
server:
get_resource: app_server
signal_transport: HEAT_SIGNAL
@@ -287,7 +287,7 @@ resources:
logstash_ip:
get_attr:
- logstash_server
- - networks
+ - first_address
server:
get_resource: app_server
signal_transport: HEAT_SIGNAL
@@ -365,7 +365,7 @@ resources:
elasticsearch_ip:
get_attr:
- elasticsearch_server
- - networks
+ - first_address
server:
get_resource: logstash_server
signal_transport: HEAT_SIGNAL
@@ -442,11 +442,11 @@ resources:
elasticsearch_ip:
get_attr:
- elasticsearch_server
- - networks
+ - first_address
kibana_ip:
get_attr:
- kibana_server
- - networks
+ - first_address
server:
get_resource: kibana_server
@@ -526,33 +526,32 @@ outputs:
value:
get_attr:
- app_server
- - networks
+ - first_address
mongodb_url:
description: URL for the mongodb server.
value:
get_attr:
- mongo_server
- - networks
+ - first_address
logstash_url:
description: URL for the logstash server.
value:
get_attr:
- logstash_server
- - networks
+ - first_address
elasticsearch_url:
description: URL for the elasticsearch server.
value:
get_attr:
- elasticsearch_server
- - networks
+ - first_address
kibana_url:
description: URL for the kibana server.
value:
get_attr:
- kibana_server
- - networks
-
+ - first_address
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 b3c9a64..8a031e2 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
@@ -61,7 +61,7 @@ resources:
logstash_ip:
get_attr:
- logstash_server
- - networks
+ - first_address
server:
get_resource: app_server
signal_transport: HEAT_SIGNAL
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 b8de0e0..df35a10 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,7 +46,7 @@ resources:
mongodb_ip:
get_attr:
- mongo_server
- - networks
+ - first_address
server:
get_resource: mongo_server
signal_transport: HEAT_SIGNAL
@@ -122,7 +122,7 @@ resources:
mongodb_ip:
get_attr:
- mongo_server
- - networks
+ - first_address
server:
get_resource: app_server
signal_transport: HEAT_SIGNAL
@@ -177,10 +177,10 @@ outputs:
value:
get_attr:
- mongo_server
- - networks
+ - first_address
nodejs_url:
description: URL for the nodejs server, http://<IP>:3000
value:
get_attr:
- app_server
- - networks
+ - first_address
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 c43c125..22c5212 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
@@ -213,4 +213,4 @@ outputs:
value:
get_attr:
- server
- - networks
+ - first_address
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 0f954cf..7d01352 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
@@ -211,4 +211,4 @@ outputs:
value:
get_attr:
- server
- - networks
+ - first_address
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 43c73dc..44a53d0 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,4 +32,4 @@ outputs:
value:
get_attr:
- my_server
- - networks
+ - first_address
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 1afe185..8235ebf 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,4 +32,4 @@ outputs:
value:
get_attr:
- my_server
- - networks
+ - first_address
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 3c98514..cb92d01 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,4 +32,4 @@ outputs:
value:
get_attr:
- my_server
- - networks
+ - first_address
diff --git a/tosca2heat/heat-translator/translator/tests/data/hot_output/hot_vRNC.yaml b/tosca2heat/heat-translator/translator/tests/data/hot_output/hot_vRNC.yaml
index c669f19..4f9d562 100644
--- a/tosca2heat/heat-translator/translator/tests/data/hot_output/hot_vRNC.yaml
+++ b/tosca2heat/heat-translator/translator/tests/data/hot_output/hot_vRNC.yaml
@@ -491,25 +491,25 @@ outputs:
value:
get_attr:
- MM_Active_Host
- - networks
+ - first_address
private_ip_of_CM:
description: The private IP address of the CM.
value:
get_attr:
- CM_Active_Host
- - networks
+ - first_address
private_ip_of_DM:
description: The private IP address of the DM.
value:
get_attr:
- DM_Host
- - networks
+ - first_address
private_ip_of_LB:
description: The private IP address of the LB.
value:
get_attr:
- LB_Host
- - networks
+ - first_address
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 fe52053..e664124 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,7 +63,7 @@ outputs:
value:
get_attr:
- my_server
- - networks
+ - first_address
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 b5724eb..5e1c3eb 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
@@ -77,13 +77,13 @@ outputs:
value:
get_attr:
- my_web_app_tier_1
- - networks
+ - first_address
private_ip_2:
description: The private IP address of the applications second tier.
value:
get_attr:
- my_web_app_tier_2
- - networks
+ - first_address
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 9c1cfbf..487501d 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
@@ -77,13 +77,13 @@ outputs:
value:
get_attr:
- my_web_app_tier_1
- - networks
+ - first_address
private_ip_2:
description: The private IP address of the applications second tier.
value:
get_attr:
- my_web_app_tier_2
- - networks
+ - first_address
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 586edf7..d615a8d 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
@@ -81,13 +81,13 @@ outputs:
value:
get_attr:
- my_web_app_tier_1
- - networks
+ - first_address
private_ip_2:
description: The private IP address of the applications second tier.
value:
get_attr:
- my_web_app_tier_2
- - networks
+ - first_address
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 1bb9059..73a574b 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
@@ -81,13 +81,13 @@ outputs:
value:
get_attr:
- my_web_app_tier_1
- - networks
+ - first_address
private_ip_2:
description: The private IP address of the applications second tier.
value:
get_attr:
- my_web_app_tier_2
- - networks
+ - first_address
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 efc9be8..a520c83 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,7 +64,7 @@ outputs:
value:
get_attr:
- my_server
- - networks
+ - first_address
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 fb83841..2dc574c 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,7 +57,7 @@ outputs:
value:
get_attr:
- my_server
- - networks
+ - first_address
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 5d72b01..dc5fad6 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
@@ -90,13 +90,13 @@ outputs:
value:
get_attr:
- my_server
- - networks
+ - first_address
server_ip_2:
description: The private IP address of the applications second server.
value:
get_attr:
- my_server2
- - networks
+ - first_address
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 d3dbed6..ec5c61f 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
@@ -90,13 +90,13 @@ outputs:
value:
get_attr:
- my_server
- - networks
+ - first_address
server_ip_2:
description: The private IP address of the applications second server.
value:
get_attr:
- my_server2
- - networks
+ - first_address
volume_id_1:
description: The volume id of the first block storage instance.
value: