diff options
author | Nakul Dahiwade <nakul.dahiwade@intel.com> | 2018-09-13 21:47:49 +0000 |
---|---|---|
committer | David Peacock <david.j.peacock@gmail.com> | 2019-12-23 18:47:00 +0000 |
commit | fd411158052455ec2ee7e505adfbe2af9f011faa (patch) | |
tree | 0a9a3f74af37b037402e963df875f454ad8f7f18 /heat/engine/resources/server_base.py | |
parent | 28ce9f3ad42e1a4713dea845bcc4bdc5a6d08fb9 (diff) | |
download | heat-fd411158052455ec2ee7e505adfbe2af9f011faa.tar.gz |
Support for shared services in multi region mode
The services are declared in a list in config.
shared_services_types=image, volume, volumev2
Change-Id: I64c00756cc28db616e9e49e6eb1613b76a19068e
Story: 2003772
Task: 26464
Diffstat (limited to 'heat/engine/resources/server_base.py')
-rw-r--r-- | heat/engine/resources/server_base.py | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/heat/engine/resources/server_base.py b/heat/engine/resources/server_base.py index 5f0b5d00c..ce12693a0 100644 --- a/heat/engine/resources/server_base.py +++ b/heat/engine/resources/server_base.py @@ -61,14 +61,15 @@ class BaseServer(stack_user.StackUser): return container_name, object_name + def _get_region_name(self): + return self.client_plugin()._get_region_name() + def _populate_deployments_metadata(self, meta, props): meta['deployments'] = meta.get('deployments', []) meta['os-collect-config'] = meta.get('os-collect-config', {}) occ = meta['os-collect-config'] collectors = list(self.default_collectors) occ['collectors'] = collectors - region_name = (self.context.region_name or - cfg.CONF.region_name_for_services) # set existing values to None to override any boot-time config occ_keys = ('heat', 'zaqar', 'cfn', 'request') @@ -89,7 +90,7 @@ class BaseServer(stack_user.StackUser): 'project_id': self.stack.stack_user_project_id, 'stack_id': self.stack.identifier().stack_path(), 'resource_name': self.name, - 'region_name': region_name}}) + 'region_name': self._get_region_name()}}) collectors.append('heat') elif self.transport_zaqar_message(props): @@ -101,7 +102,7 @@ class BaseServer(stack_user.StackUser): fallback_endpoint=self.context.auth_url), 'project_id': self.stack.stack_user_project_id, 'queue_id': queue_id, - 'region_name': region_name}}) + 'region_name': self._get_region_name()}}) collectors.append('zaqar') elif self.transport_poll_server_cfn(props): |