Merge "Replace test file from test_tosca_nfv_sample with vRNC"
[parser.git] / tosca2heat / heat-translator / translator / hot / tosca / tosca_compute.py
index b8ad83c..16d0518 100644 (file)
@@ -104,6 +104,7 @@ class ToscaCompute(HotResource):
             self.nodetemplate.get_capability('host'),
             self.nodetemplate.get_capability('os'))
         self.properties['user_data_format'] = 'SOFTWARE_CONFIG'
+        self.properties['software_config_transport'] = 'POLL_SERVER_HEAT'
         tosca_props = self.get_tosca_props()
         for key, value in tosca_props.items():
             if key in self.ALLOWED_NOVA_SERVER_PROPS:
@@ -263,7 +264,7 @@ class ToscaCompute(HotResource):
         images = IMAGES
         if translator.common.utils.check_for_env_variables():
             resp = self._populate_image_dict()
-            if len(resp.keys()) > 0:
+            if resp and len(resp.keys()) > 0:
                 images = resp
         match_all = images.keys()
         architecture = properties.get(self.ARCHITECTURE)
@@ -332,7 +333,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