Merge pull request #238 from DreadPirateShawn/ModifyInstanceAttributeSourceDestCheck

ModifyInstanceAttribute: Added support for 'SourceDestCheck.Value'.
This commit is contained in:
Steve Pulec 2014-10-22 20:25:09 -04:00
commit ef3fcecc87
4 changed files with 45 additions and 6 deletions

View file

@ -280,6 +280,7 @@ class Instance(BotoInstance, TaggedEC2Resource):
self.instance_type = kwargs.get("instance_type", "m1.small")
self.subnet_id = kwargs.get("subnet_id")
self.key_name = kwargs.get("key_name")
self.source_dest_check = "true"
self.block_device_mapping = BlockDeviceMapping()
self.block_device_mapping['/dev/sda1'] = BlockDeviceType(volume_id=random_volume_id())

View file

@ -72,7 +72,9 @@ CREATE_NETWORK_INTERFACE_RESPONSE = """
{% if eni.private_ip_address %}
<privateIpAddress>{{ eni.private_ip_address }}</privateIpAddress>
{% endif %}
<sourceDestCheck>true</sourceDestCheck>
{% if eni.instance %}
<sourceDestCheck>{{ eni.instance.source_dest_check }}</sourceDestCheck>
{% endif %}
<groupSet>
{% for group in eni.group_set %}
<item>
@ -114,7 +116,9 @@ DESCRIBE_NETWORK_INTERFACES_RESPONSE = """<DescribeNetworkInterfacesResponse xml
<privateIpAddress>{{ eni.private_ip_address }}</privateIpAddress>
{% endif %}
<privateDnsName>ip-10-0-0-134.us-west-2.compute.internal</privateDnsName>
<sourceDestCheck>true</sourceDestCheck>
{% if eni.instance %}
<sourceDestCheck>{{ eni.instance.source_dest_check }}</sourceDestCheck>
{% endif %}
<groupSet>
{% for group in eni.group_set %}
<item>

View file

@ -206,7 +206,7 @@ EC2_RUN_INSTANCES = """<RunInstancesResponse xmlns="http://ec2.amazonaws.com/doc
{% else %}
<subnetId>{{ instance.subnet_id }}</subnetId>
{% endif %}
<sourceDestCheck>true</sourceDestCheck>
<sourceDestCheck>{{ instance.source_dest_check }}</sourceDestCheck>
<groupSet>
{% for group in instance.dynamic_group_list %}
<item>
@ -235,7 +235,7 @@ EC2_RUN_INSTANCES = """<RunInstancesResponse xmlns="http://ec2.amazonaws.com/doc
<status>in-use</status>
<macAddress>1b:2b:3c:4d:5e:6f</macAddress>
<privateIpAddress>{{ nic.private_ip_address }}</privateIpAddress>
<sourceDestCheck>true</sourceDestCheck>
<sourceDestCheck>{{ instance.source_dest_check }}</sourceDestCheck>
<groupSet>
{% for group in nic.group_set %}
<item>
@ -328,7 +328,7 @@ EC2_DESCRIBE_INSTANCES = """<DescribeInstancesResponse xmlns='http://ec2.amazona
<ipAddress>46.51.219.63</ipAddress>
{% endif %}
{% endif %}
<sourceDestCheck>true</sourceDestCheck>
<sourceDestCheck>{{ instance.source_dest_check }}</sourceDestCheck>
<groupSet>
{% for group in instance.dynamic_group_list %}
<item>
@ -380,7 +380,7 @@ EC2_DESCRIBE_INSTANCES = """<DescribeInstancesResponse xmlns='http://ec2.amazona
<status>in-use</status>
<macAddress>1b:2b:3c:4d:5e:6f</macAddress>
<privateIpAddress>{{ nic.private_ip_address }}</privateIpAddress>
<sourceDestCheck>true</sourceDestCheck>
<sourceDestCheck>{{ instance.source_dest_check }}</sourceDestCheck>
<groupSet>
{% for group in nic.group_set %}
<item>