Use resource_id instead of phy res name OS::Heat::AutoScalingGroup
We now will uses resource_id instead of physical resource name when we use
get_resource in template.
If you run `get_resource: {physical autoscalinggroup_1}`, will now
return resource id for `autoscalinggroup_1`.
Change-Id: I71ec0f28d3c8251e776d014a38e6a1984daf52ae
Story: #2007007
Task: #37787
This commit is contained in:
@@ -23,6 +23,7 @@ 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
|
||||
@@ -207,6 +208,9 @@ 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)
|
||||
|
||||
|
||||
@@ -0,0 +1,9 @@
|
||||
---
|
||||
fixes:
|
||||
- |
|
||||
The behavior of ``get_resource`` on an ``OS::Heat::AutoScalingGroup``
|
||||
resource has changed. Previously it returned the physical resource name
|
||||
(i.e. the name of the nested Heat stack which implemented the group). It
|
||||
will now return the UUID of the nested stack if available. This will also
|
||||
apply to any resource type that inherits from
|
||||
``OS::Heat::AutoScalingGroup``.
|
||||
Reference in New Issue
Block a user