Add ip output in compute node 97/29397/2
authorshangxdy <shang.xiaodong@zte.com.cn>
Sun, 26 Feb 2017 17:19:10 +0000 (01:19 +0800)
committershangxdy <shang.xiaodong@zte.com.cn>
Sun, 26 Feb 2017 17:27:13 +0000 (01:27 +0800)
After sync the latest heat-translator code from upstream, there is not
ip output in compute node, it's necessary to add.

JIRA:PARSER-121

Change-Id: Idb0126f9d2bcb6100be6083e2a661cc1cdbe0f27
Signed-off-by: shangxdy <shang.xiaodong@zte.com.cn>
21 files changed:
tosca2heat/heat-translator/translator/hot/tests/test_translate_outputs.py
tosca2heat/heat-translator/translator/hot/tosca/tosca_compute.py
tosca2heat/heat-translator/translator/tests/data/hot_output/hot_elk.yaml
tosca2heat/heat-translator/translator/tests/data/hot_output/hot_elk_from_csar.yaml
tosca2heat/heat-translator/translator/tests/data/hot_output/hot_host_assignment.yaml
tosca2heat/heat-translator/translator/tests/data/hot_output/hot_nodejs_mongodb_two_instances.yaml
tosca2heat/heat-translator/translator/tests/data/hot_output/hot_single_instance_wordpress.yaml
tosca2heat/heat-translator/translator/tests/data/hot_output/hot_single_instance_wordpress_from_csar.yaml
tosca2heat/heat-translator/translator/tests/data/hot_output/hot_single_server.yaml
tosca2heat/heat-translator/translator/tests/data/hot_output/hot_single_server_with_defaults_with_input.yaml
tosca2heat/heat-translator/translator/tests/data/hot_output/hot_single_server_with_defaults_without_input.yaml
tosca2heat/heat-translator/translator/tests/data/hot_output/hot_vRNC.yaml
tosca2heat/heat-translator/translator/tests/data/hot_output/storage/hot_blockstorage_with_attachment.yaml
tosca2heat/heat-translator/translator/tests/data/hot_output/storage/hot_blockstorage_with_attachment_notation1_alt1.yaml
tosca2heat/heat-translator/translator/tests/data/hot_output/storage/hot_blockstorage_with_attachment_notation1_alt2.yaml
tosca2heat/heat-translator/translator/tests/data/hot_output/storage/hot_blockstorage_with_attachment_notation2_alt1.yaml
tosca2heat/heat-translator/translator/tests/data/hot_output/storage/hot_blockstorage_with_attachment_notation2_alt2.yaml
tosca2heat/heat-translator/translator/tests/data/hot_output/storage/hot_blockstorage_with_custom_relationship_type.yaml
tosca2heat/heat-translator/translator/tests/data/hot_output/storage/hot_blockstorage_with_relationship_template.yaml
tosca2heat/heat-translator/translator/tests/data/hot_output/storage/hot_multiple_blockstorage_with_attachment_alt1.yaml
tosca2heat/heat-translator/translator/tests/data/hot_output/storage/hot_multiple_blockstorage_with_attachment_alt2.yaml

index 955150e..12ea355 100644 (file)
@@ -33,12 +33,12 @@ class ToscaTemplateOutputTest(TestCase):
                             'server, http://<IP>:3000',
                             'value':
                             {'get_attr':
-                             ['app_server', 'networks', 'private', 0]}},
+                             ['app_server', 'first_address']}},
                            'mongodb_url':
                            {'description': 'URL for the mongodb server.',
                             'value':
                             {'get_attr':
-                             ['mongo_server', 'networks', 'private', 0]}}}
+                             ['mongo_server', 'first_address']}}}
 
         hot_translation_dict = \
             toscaparser.utils.yamlparser.simple_parse(hot_translation)
index 85f312d..5f6b751 100644 (file)
@@ -211,7 +211,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, 'first_address']
 
         return attr
 
index 5dda261..c7bc9cd 100644 (file)
@@ -52,9 +52,7 @@ resources:
         mongodb_ip:
           get_attr:
           - mongo_server
-          - networks
-          - private
-          - 0
+          - first_address
       server:
         get_resource: app_server
       signal_transport: HEAT_SIGNAL
@@ -113,9 +111,7 @@ resources:
         mongodb_ip:
           get_attr:
           - mongo_server
-          - networks
-          - private
-          - 0
+          - first_address
       server:
         get_resource: mongo_server
       signal_transport: HEAT_SIGNAL
@@ -193,9 +189,7 @@ resources:
         logstash_ip:
           get_attr:
           - logstash_server
-          - networks
-          - private
-          - 0
+          - first_address
       server:
         get_resource: app_server
       signal_transport: HEAT_SIGNAL
@@ -291,9 +285,7 @@ resources:
         logstash_ip:
           get_attr:
           - logstash_server
-          - networks
-          - private
-          - 0
+          - first_address
       server:
         get_resource: app_server
       signal_transport: HEAT_SIGNAL
@@ -371,9 +363,7 @@ resources:
         elasticsearch_ip:
           get_attr:
           - elasticsearch_server
-          - networks
-          - private
-          - 0
+          - first_address
       server:
         get_resource: logstash_server
       signal_transport: HEAT_SIGNAL
@@ -450,15 +440,11 @@ resources:
         elasticsearch_ip:
           get_attr:
           - elasticsearch_server
-          - networks
-          - private
-          - 0
+          - first_address
         kibana_ip:
           get_attr:
           - kibana_server
-          - networks
-          - private
-          - 0
+          - first_address
       server:
         get_resource: kibana_server
       signal_transport: HEAT_SIGNAL
@@ -537,43 +523,33 @@ outputs:
     value:
       get_attr:
       - app_server
-      - networks
-      - private
-      - 0
+      - first_address
 
   mongodb_url:
     description: URL for the mongodb server.
     value:
       get_attr:
       - mongo_server
-      - networks
-      - private
-      - 0
+      - first_address
 
   logstash_url:
     description: URL for the logstash server.
     value:
       get_attr:
       - logstash_server
-      - networks
-      - private
-      - 0
+      - first_address
 
   elasticsearch_url:
     description: URL for the elasticsearch server.
     value:
       get_attr:
       - elasticsearch_server
-      - networks
-      - private
-      - 0
+      - first_address
 
   kibana_url:
     description: URL for the kibana server.
     value:
       get_attr:
       - kibana_server
-      - networks
-      - private
-      - 0
+      - first_address
 
index d3ae8b1..2966391 100644 (file)
@@ -52,9 +52,7 @@ resources:
         mongodb_ip:
           get_attr:
           - mongo_server
-          - networks
-          - private
-          - 0
+          - first_address
       server:
         get_resource: app_server
       signal_transport: HEAT_SIGNAL
@@ -113,9 +111,7 @@ resources:
         mongodb_ip:
           get_attr:
           - mongo_server
-          - networks
-          - private
-          - 0
+          - first_address
       server:
         get_resource: mongo_server
       signal_transport: HEAT_SIGNAL
@@ -193,9 +189,7 @@ resources:
         logstash_ip:
           get_attr:
           - logstash_server
-          - networks
-          - private
-          - 0
+          - first_address
       server:
         get_resource: app_server
       signal_transport: HEAT_SIGNAL
@@ -291,9 +285,7 @@ resources:
         logstash_ip:
           get_attr:
           - logstash_server
-          - networks
-          - private
-          - 0
+          - first_address
       server:
         get_resource: app_server
       signal_transport: HEAT_SIGNAL
@@ -371,9 +363,7 @@ resources:
         elasticsearch_ip:
           get_attr:
           - elasticsearch_server
-          - networks
-          - private
-          - 0
+          - first_address
       server:
         get_resource: logstash_server
       signal_transport: HEAT_SIGNAL
@@ -450,15 +440,11 @@ resources:
         elasticsearch_ip:
           get_attr:
           - elasticsearch_server
-          - networks
-          - private
-          - 0
+          - first_address
         kibana_ip:
           get_attr:
           - kibana_server
-          - networks
-          - private
-          - 0
+          - first_address
       server:
         get_resource: kibana_server
       signal_transport: HEAT_SIGNAL
@@ -537,43 +523,33 @@ outputs:
     value:
       get_attr:
       - app_server
-      - networks
-      - private
-      - 0
+      - first_address
 
   mongodb_url:
     description: URL for the mongodb server.
     value:
       get_attr:
       - mongo_server
-      - networks
-      - private
-      - 0
+      - first_address
 
   logstash_url:
     description: URL for the logstash server.
     value:
       get_attr:
       - logstash_server
-      - networks
-      - private
-      - 0
+      - first_address
 
   elasticsearch_url:
     description: URL for the elasticsearch server.
     value:
       get_attr:
       - elasticsearch_server
-      - networks
-      - private
-      - 0
+      - first_address
 
   kibana_url:
     description: URL for the kibana server.
     value:
       get_attr:
       - kibana_server
-      - networks
-      - private
-      - 0
+      - first_address
 
index ff657cb..8a031e2 100644 (file)
@@ -61,9 +61,7 @@ resources:
         logstash_ip:
           get_attr:
           - logstash_server
-          - networks
-          - private
-          - 0
+          - first_address
       server:
         get_resource: app_server
       signal_transport: HEAT_SIGNAL
index 4cdfcfb..df35a10 100644 (file)
@@ -46,9 +46,7 @@ resources:
         mongodb_ip:
           get_attr:
           - mongo_server
-          - networks
-          - private
-          - 0
+          - first_address
       server:
         get_resource: mongo_server
       signal_transport: HEAT_SIGNAL
@@ -124,9 +122,7 @@ resources:
         mongodb_ip:
           get_attr:
           - mongo_server
-          - networks
-          - private
-          - 0
+          - first_address
       server:
         get_resource: app_server
       signal_transport: HEAT_SIGNAL
@@ -181,14 +177,10 @@ outputs:
     value:
       get_attr:
       - mongo_server
-      - networks
-      - private
-      - 0
+      - first_address
   nodejs_url:
     description: URL for the nodejs server, http://<IP>:3000
     value:
       get_attr:
       - app_server
-      - networks
-      - private
-      - 0
+      - first_address
index b6de70f..904189b 100644 (file)
@@ -491,33 +491,25 @@ outputs:
     value:
       get_attr:
       - MM_Active_Host
-      - networks
-      - private
-      - 0
+      - first_address
 
   private_ip_of_CM:
     description: The private IP address of the CM.
     value:
       get_attr:
       - CM_Active_Host
-      - networks
-      - private
-      - 0
+      - first_address
 
   private_ip_of_DM:
     description: The private IP address of the DM.
     value:
       get_attr:
       - DM_Host
-      - networks
-      - private
-      - 0
+      - first_address
 
   private_ip_of_LB:
     description: The private IP address of the LB.
     value:
       get_attr:
       - LB_Host
-      - networks
-      - private
-      - 0
+      - first_address
index 60c81ae..e664124 100644 (file)
@@ -63,9 +63,7 @@ outputs:
     value:
       get_attr:
       - my_server
-      - networks
-      - private
-      - 0
+      - first_address
   volume_id:
     description: The volume id of the block storage instance.
     value:
index 069e03d..5e1c3eb 100644 (file)
@@ -77,17 +77,13 @@ outputs:
     value:
       get_attr:
       - my_web_app_tier_1
-      - networks
-      - private
-      - 0
+      - first_address
   private_ip_2:
     description: The private IP address of the applications second tier.
     value:
       get_attr:
       - my_web_app_tier_2
-      - networks
-      - private
-      - 0
+      - first_address
   volume_id:
     description: The volume id of the block storage instance.
     value:
index 9114e12..487501d 100644 (file)
@@ -77,17 +77,13 @@ outputs:
     value:
       get_attr:
       - my_web_app_tier_1
-      - networks
-      - private
-      - 0
+      - first_address
   private_ip_2:
     description: The private IP address of the applications second tier.
     value:
       get_attr:
       - my_web_app_tier_2
-      - networks
-      - private
-      - 0
+      - first_address
   volume_id:
     description: The volume id of the block storage instance.
     value:
index cd7a330..d615a8d 100644 (file)
@@ -81,17 +81,13 @@ outputs:
     value:
       get_attr:
       - my_web_app_tier_1
-      - networks
-      - private
-      - 0
+      - first_address
   private_ip_2:
     description: The private IP address of the applications second tier.
     value:
       get_attr:
       - my_web_app_tier_2
-      - networks
-      - private
-      - 0
+      - first_address
   volume_id:
     description: The volume id of the block storage instance.
     value:
index 322a1f4..73a574b 100644 (file)
@@ -81,17 +81,13 @@ outputs:
     value:
       get_attr:
       - my_web_app_tier_1
-      - networks
-      - private
-      - 0
+      - first_address
   private_ip_2:
     description: The private IP address of the applications second tier.
     value:
       get_attr:
       - my_web_app_tier_2
-      - networks
-      - private
-      - 0
+      - first_address
   volume_id:
     description: The volume id of the block storage instance.
     value:
index 2b7ee4b..a520c83 100644 (file)
@@ -64,9 +64,7 @@ outputs:
     value:
       get_attr:
       - my_server
-      - networks
-      - private
-      - 0
+      - first_address
   volume_id:
     description: The volume id of the block storage instance.
     value:
index 3991bee..2dc574c 100644 (file)
@@ -57,9 +57,7 @@ outputs:
     value:
       get_attr:
       - my_server
-      - networks
-      - private
-      - 0
+      - first_address
   volume_id:
     description: The volume id of the block storage instance.
     value:
index a37bf92..dc5fad6 100644 (file)
@@ -90,17 +90,13 @@ outputs:
     value:
       get_attr:
       - my_server
-      - networks
-      - private
-      - 0
+      - first_address
   server_ip_2:
     description: The private IP address of the applications second server.
     value:
       get_attr:
       - my_server2
-      - networks
-      - private
-      - 0
+      - first_address
   volume_id_1:
     description: The volume id of the first block storage instance.
     value:
index 10b02a9..ec5c61f 100644 (file)
@@ -90,17 +90,13 @@ outputs:
     value:
       get_attr:
       - my_server
-      - networks
-      - private
-      - 0
+      - first_address
   server_ip_2:
     description: The private IP address of the applications second server.
     value:
       get_attr:
       - my_server2
-      - networks
-      - private
-      - 0
+      - first_address
   volume_id_1:
     description: The volume id of the first block storage instance.
     value: