From b0903a5598b6812342e230a03ff0310d068cb450 Mon Sep 17 00:00:00 2001 From: Angus Salkeld <asalkeld@mirantis.com> Date: Thu, 25 Sep 2014 17:37:37 +1000 Subject: [PATCH] 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 --- heat/engine/resources/autoscaling.py | 2 +- heat/tests/test_server_tags.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/heat/engine/resources/autoscaling.py b/heat/engine/resources/autoscaling.py index 39afeb34f6..b0778c9801 100644 --- a/heat/engine/resources/autoscaling.py +++ b/heat/engine/resources/autoscaling.py @@ -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 diff --git a/heat/tests/test_server_tags.py b/heat/tests/test_server_tags.py index d8b1f45b06..dc151b0eb8 100644 --- a/heat/tests/test_server_tags.py +++ b/heat/tests/test_server_tags.py @@ -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()