Make sure that AutoScaling group has it's tag set correctly

At the moment we have to rely on the base classes metering.groupname
and this AutoScalingGroupName is effectively lost.

Change-Id: I6f4c099bde83fba5ad89e43297503943136b717e
Partial-bug: #1373247
This commit is contained in:
Angus Salkeld 2014-09-25 17:37:37 +10:00
parent a7d10dc43b
commit b0903a5598
2 changed files with 2 additions and 2 deletions

View File

@ -671,7 +671,7 @@ class AutoScalingGroup(InstanceGroup, cooldown.CooldownMixin):
the groupname and stack id.
Note: the group name must match what is returned from FnGetRefId
"""
autoscaling_tag = [{self.TAG_KEY: 'AutoScalingGroupName',
autoscaling_tag = [{self.TAG_KEY: 'metering.AutoScalingGroupName',
self.TAG_VALUE: self.FnGetRefId()}]
return super(AutoScalingGroup, self)._tags() + autoscaling_tag

View File

@ -288,7 +288,7 @@ class ServerTagsTest(HeatTestCase):
group_refid = utils.PhysName(stack.name, group.name)
nova_tags['metering.groupname'] = group_refid
nova_tags['AutoScalingGroupName'] = group_refid
nova_tags['metering.AutoScalingGroupName'] = group_refid
self.m.VerifyAll()
self.m.UnsetStubs()