diff --git a/moto/autoscaling/models.py b/moto/autoscaling/models.py index 7a119ecb2..812323781 100644 --- a/moto/autoscaling/models.py +++ b/moto/autoscaling/models.py @@ -37,12 +37,14 @@ class FakeScalingPolicy(object): class FakeLaunchConfiguration(object): - def __init__(self, name, image_id, key_name, security_groups, user_data, + def __init__(self, name, image_id, key_name, ramdisk_id, kernel_id, security_groups, user_data, instance_type, instance_monitoring, instance_profile_name, spot_price, ebs_optimized, associate_public_ip_address, block_device_mapping_dict): self.name = name self.image_id = image_id self.key_name = key_name + self.ramdisk_id = ramdisk_id + self.kernel_id = kernel_id self.security_groups = security_groups if security_groups else [] self.user_data = user_data self.instance_type = instance_type @@ -63,6 +65,8 @@ class FakeLaunchConfiguration(object): config = backend.create_launch_configuration( name=resource_name, image_id=properties.get("ImageId"), + kernel_id=properties.get("KernelId"), + ramdisk_id=properties.get("RamdiskId"), key_name=properties.get("KeyName"), security_groups=properties.get("SecurityGroups"), user_data=properties.get("UserData"), @@ -231,7 +235,7 @@ class AutoScalingBackend(BaseBackend): self.__dict__ = {} self.__init__(ec2_backend, elb_backend) - def create_launch_configuration(self, name, image_id, key_name, + def create_launch_configuration(self, name, image_id, key_name, kernel_id, ramdisk_id, security_groups, user_data, instance_type, instance_monitoring, instance_profile_name, spot_price, ebs_optimized, associate_public_ip_address, block_device_mappings): @@ -239,6 +243,8 @@ class AutoScalingBackend(BaseBackend): name=name, image_id=image_id, key_name=key_name, + kernel_id=kernel_id, + ramdisk_id=ramdisk_id, security_groups=security_groups, user_data=user_data, instance_type=instance_type, diff --git a/moto/autoscaling/responses.py b/moto/autoscaling/responses.py index 70fda4526..d6fc7a12b 100644 --- a/moto/autoscaling/responses.py +++ b/moto/autoscaling/responses.py @@ -20,6 +20,8 @@ class AutoScalingResponse(BaseResponse): name=self._get_param('LaunchConfigurationName'), image_id=self._get_param('ImageId'), key_name=self._get_param('KeyName'), + ramdisk_id=self._get_param('RamdiskId'), + kernel_id=self._get_param('KernelId'), security_groups=self._get_multi_param('SecurityGroups.member'), user_data=self._get_param('UserData'), instance_type=self._get_param('InstanceType'), @@ -155,7 +157,7 @@ DESCRIBE_LAUNCH_CONFIGURATIONS_TEMPLATE = """ 2013-01-21T23:04:42.200Z - + {{ launch_configuration.kernel_id }} {% if launch_configuration.instance_profile_name %} {{ launch_configuration.instance_profile_name }} {% endif %} @@ -202,7 +204,7 @@ DESCRIBE_LAUNCH_CONFIGURATIONS_TEMPLATE = """ {% endif %} - + {{ launch_configuration.ramdisk_id }} {{ launch_configuration.ebs_optimized }} {{ launch_configuration.instance_monitoring_enabled }}