diff options
author | ricolin <rico.lin.guanyu@gmail.com> | 2020-04-08 16:59:43 +0800 |
---|---|---|
committer | ricolin <rico.lin.guanyu@gmail.com> | 2020-04-16 14:22:06 +0800 |
commit | f8ef790e96e99deedf2a1a5241c460d585778ba5 (patch) | |
tree | 24af4cb3b5129b7f201d14e660fb054c774daa8e /heat | |
parent | 96c4dbe3ea2681b5d53cec3f6904f5d9d221d914 (diff) | |
download | heat-f8ef790e96e99deedf2a1a5241c460d585778ba5.tar.gz |
Use resource_id instead of phy rsrc name in InstanceGroup
Use default resource implementation for get_reference_id in:
* OS::Heat::InstanceGroup
* OS::Heat::AutoScalingGroup
* AWS::AutoScaling::AutoScalingGroup
Story: #2007007
Task: #37870
Change-Id: I7fd223a3bde1c5d2ecd073124a25675567e406d2
Diffstat (limited to 'heat')
-rw-r--r-- | heat/engine/resources/openstack/heat/autoscaling_group.py | 4 | ||||
-rw-r--r-- | heat/engine/resources/openstack/heat/instance_group.py | 3 | ||||
-rw-r--r-- | heat/tests/openstack/heat/test_instance_group.py | 6 |
3 files changed, 1 insertions, 12 deletions
diff --git a/heat/engine/resources/openstack/heat/autoscaling_group.py b/heat/engine/resources/openstack/heat/autoscaling_group.py index e288fe20f..ed48bebf3 100644 --- a/heat/engine/resources/openstack/heat/autoscaling_group.py +++ b/heat/engine/resources/openstack/heat/autoscaling_group.py @@ -23,7 +23,6 @@ from heat.engine import constraints from heat.engine.hot import template from heat.engine import output from heat.engine import properties -from heat.engine import resource from heat.engine.resources.aws.autoscaling import autoscaling_group as aws_asg from heat.engine import rsrc_defn from heat.engine import support @@ -208,9 +207,6 @@ class AutoScalingResourceGroup(aws_asg.AutoScalingGroup): self)._create_template(num_instances, num_replace, template_version=template_version) - def get_reference_id(self): - return resource.Resource.get_reference_id(self) - def _attribute_output_name(self, *attr_path): return ', '.join(six.text_type(a) for a in attr_path) diff --git a/heat/engine/resources/openstack/heat/instance_group.py b/heat/engine/resources/openstack/heat/instance_group.py index 103737d44..9ef901cb0 100644 --- a/heat/engine/resources/openstack/heat/instance_group.py +++ b/heat/engine/resources/openstack/heat/instance_group.py @@ -422,9 +422,6 @@ class InstanceGroup(stack_resource.StackResource): lbs = [self.stack[name] for name in lb_names] lbutils.reconfigure_loadbalancers(lbs, id_list) - def get_reference_id(self): - return self.physical_resource_name_or_FnGetRefId() - def _group_data(self, refresh=False): """Return a cached GroupInspector object for the nested stack.""" if refresh or getattr(self, '_group_inspector', None) is None: diff --git a/heat/tests/openstack/heat/test_instance_group.py b/heat/tests/openstack/heat/test_instance_group.py index c13214c8e..858c1488c 100644 --- a/heat/tests/openstack/heat/test_instance_group.py +++ b/heat/tests/openstack/heat/test_instance_group.py @@ -18,7 +18,6 @@ import six from heat.common import exception from heat.common import grouputils -from heat.common import short_id from heat.common import template_format from heat.engine.clients.os import neutron from heat.engine import resource @@ -173,12 +172,9 @@ class TestInstanceGroup(common.HeatTestCase): def test_instance_group_refid_rsrc_name(self): self.instance_group.id = '123' - self.instance_group.uuid = '9bfb9456-3fe8-41f4-b318-9dba18eeef74' self.instance_group.action = 'CREATE' - expected = '%s-%s-%s' % (self.instance_group.stack.name, - self.instance_group.name, - short_id.get_id(self.instance_group.uuid)) + expected = self.instance_group.name self.assertEqual(expected, self.instance_group.FnGetRefId()) def test_instance_group_refid_rsrc_id(self): |