Added resource groups to HEAT parser
authorpeusterm <manuel.peuster@uni-paderborn.de>
Mon, 19 Jun 2017 10:01:13 +0000 (12:01 +0200)
committerpeusterm <manuel.peuster@uni-paderborn.de>
Mon, 19 Jun 2017 10:01:13 +0000 (12:01 +0200)
src/emuvim/api/openstack/heat_parser.py

index 376659b..a641647 100755 (executable)
@@ -217,6 +217,16 @@ class HeatParser:
                 print('Could not create Router: ' + e.message)
             return
 
+        if 'OS::Heat::ResourceGroup' in resource['type']:
+            try:
+                embedded_resource = resource['properties']['resource_def']
+                LOG.debug("Found resource in resource group: {}".format(embedded_resource))
+                # recursively parse embedded resource
+                self.handle_resource(embedded_resource, stack, dc_label, stack_update)
+            except Exception as e:
+                print('Could not create Router: ' + e.message)
+            return
+
         LOG.warning('Could not determine resource type: {}'.format(resource['type']))
         return