From eb398a207a6f0f74505597c0ecfbf4145e7787f3 Mon Sep 17 00:00:00 2001 From: peusterm Date: Mon, 19 Jun 2017 12:01:13 +0200 Subject: [PATCH] Added resource groups to HEAT parser --- src/emuvim/api/openstack/heat_parser.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/emuvim/api/openstack/heat_parser.py b/src/emuvim/api/openstack/heat_parser.py index 376659b..a641647 100755 --- a/src/emuvim/api/openstack/heat_parser.py +++ b/src/emuvim/api/openstack/heat_parser.py @@ -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 -- 2.25.1