Merge pull request #494 from jbencook/BasicECS

Basic ECS support
This commit is contained in:
Steve Pulec 2016-01-08 17:02:40 -05:00
commit 3a2eedc03c
10 changed files with 739 additions and 0 deletions

View file

@ -10,6 +10,10 @@ class AutoScalingResponse(BaseResponse):
def autoscaling_backend(self):
return autoscaling_backends[self.region]
@property
def boto3_request(self):
return 'Boto3' in self.headers.get('User-Agent', [])
def create_launch_configuration(self):
instance_monitoring_string = self._get_param('InstanceMonitoring.Enabled')
if instance_monitoring_string == 'true':
@ -68,6 +72,11 @@ class AutoScalingResponse(BaseResponse):
def describe_auto_scaling_groups(self):
names = self._get_multi_param("AutoScalingGroupNames.member")
groups = self.autoscaling_backend.describe_autoscaling_groups(names)
if self.boto3_request:
for group in groups:
if group.health_check_period is None:
group.health_check_period = 300
self.autoscaling_backend.autoscaling_groups[group.name] = group
template = self.response_template(DESCRIBE_AUTOSCALING_GROUPS_TEMPLATE)
return template.render(groups=groups)