Skip to content
This repository has been archived by the owner on Aug 30, 2024. It is now read-only.

Commit

Permalink
Merge pull request #1610 from eucalyptus/GUI-2126
Browse files Browse the repository at this point in the history
GUI-2126: Remove errant scaling group dimension when adding a scaling policy to allow ELB alarms to work
  • Loading branch information
dkavanagh committed Oct 5, 2015
2 parents 6c0b33e + b53e7c8 commit c930ad1
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion eucaconsole/views/scalinggroups.py
Original file line number Diff line number Diff line change
Expand Up @@ -658,7 +658,8 @@ def scalinggroup_policy_create(self):
# Attach policy to alarm
alarm_name = self.request.params.get('alarm')
alarm = self.cloudwatch_conn.describe_alarms(alarm_names=[alarm_name])[0]
alarm.dimensions.update({"AutoScalingGroupName": self.scaling_group.name})
if 'EC2' in alarm.namespace:
alarm.dimensions.update({"AutoScalingGroupName": self.scaling_group.name})
alarm.comparison = alarm._cmp_map.get(alarm.comparison) # See https://github.com/boto/boto/issues/1311
# TODO: Detect if an alarm has 5 scaling policies attached to it and abort accordingly
if created_scaling_policy.policy_arn not in alarm.alarm_actions:
Expand Down

0 comments on commit c930ad1

Please sign in to comment.