Adding tags to AutoScalingGroups
This commit is contained in:
parent
123d1e3965
commit
3c38a551b2
3 changed files with 20 additions and 1 deletions
|
|
@ -113,7 +113,8 @@ class FakeAutoScalingGroup(object):
|
|||
def __init__(self, name, availability_zones, desired_capacity, max_size,
|
||||
min_size, launch_config_name, vpc_zone_identifier,
|
||||
default_cooldown, health_check_period, health_check_type,
|
||||
load_balancers, placement_group, termination_policies, autoscaling_backend):
|
||||
load_balancers, placement_group, termination_policies,
|
||||
autoscaling_backend, tags):
|
||||
self.autoscaling_backend = autoscaling_backend
|
||||
self.name = name
|
||||
self.availability_zones = availability_zones
|
||||
|
|
@ -133,6 +134,7 @@ class FakeAutoScalingGroup(object):
|
|||
|
||||
self.instance_states = []
|
||||
self.set_desired_capacity(desired_capacity)
|
||||
self.tags = tags if tags else []
|
||||
|
||||
@classmethod
|
||||
def create_from_cloudformation_json(cls, resource_name, cloudformation_json, region_name):
|
||||
|
|
|
|||
|
|
@ -60,6 +60,7 @@ class AutoScalingResponse(BaseResponse):
|
|||
load_balancers=self._get_multi_param('LoadBalancerNames.member'),
|
||||
placement_group=self._get_param('PlacementGroup'),
|
||||
termination_policies=self._get_multi_param('TerminationPolicies.member'),
|
||||
tags=self._get_multi_param('Tags.member'),
|
||||
)
|
||||
template = self.response_template(CREATE_AUTOSCALING_GROUP_TEMPLATE)
|
||||
return template.render()
|
||||
|
|
@ -85,6 +86,7 @@ class AutoScalingResponse(BaseResponse):
|
|||
load_balancers=self._get_multi_param('LoadBalancerNames.member'),
|
||||
placement_group=self._get_param('PlacementGroup'),
|
||||
termination_policies=self._get_multi_param('TerminationPolicies.member'),
|
||||
tags=self._get_multi_param('Tags.member'),
|
||||
)
|
||||
template = self.response_template(UPDATE_AUTOSCALING_GROUP_TEMPLATE)
|
||||
return template.render()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue