EC2 : Fix - modified volume type in ec2 describe images. (#3074)
* "modified volume type in ec2 describe images" * removed unncessary comments * Linting Co-authored-by: usmankb <usman@krazybee.com> Co-authored-by: Bert Blommers <info@bertblommers.nl>
This commit is contained in:
parent
09c061e8a8
commit
5988e5efaa
@ -125,7 +125,7 @@ DESCRIBE_IMAGES_RESPONSE = """<DescribeImagesResponse xmlns="http://ec2.amazonaw
|
|||||||
<snapshotId>{{ image.ebs_snapshot.id }}</snapshotId>
|
<snapshotId>{{ image.ebs_snapshot.id }}</snapshotId>
|
||||||
<volumeSize>15</volumeSize>
|
<volumeSize>15</volumeSize>
|
||||||
<deleteOnTermination>false</deleteOnTermination>
|
<deleteOnTermination>false</deleteOnTermination>
|
||||||
<volumeType>{{ image.root_device_type }}</volumeType>
|
<volumeType>standard</volumeType>
|
||||||
</ebs>
|
</ebs>
|
||||||
</item>
|
</item>
|
||||||
</blockDeviceMapping>
|
</blockDeviceMapping>
|
||||||
|
@ -843,7 +843,11 @@ def test_ami_snapshots_have_correct_owner():
|
|||||||
]
|
]
|
||||||
existing_snapshot_ids = owner_id_to_snapshot_ids.get(owner_id, [])
|
existing_snapshot_ids = owner_id_to_snapshot_ids.get(owner_id, [])
|
||||||
owner_id_to_snapshot_ids[owner_id] = existing_snapshot_ids + snapshot_ids
|
owner_id_to_snapshot_ids[owner_id] = existing_snapshot_ids + snapshot_ids
|
||||||
|
# adding an assertion to volumeType
|
||||||
|
assert (
|
||||||
|
image.get("BlockDeviceMappings", {})[0].get("Ebs", {}).get("VolumeType")
|
||||||
|
== "standard"
|
||||||
|
)
|
||||||
for owner_id in owner_id_to_snapshot_ids:
|
for owner_id in owner_id_to_snapshot_ids:
|
||||||
snapshots_rseponse = ec2_client.describe_snapshots(
|
snapshots_rseponse = ec2_client.describe_snapshots(
|
||||||
SnapshotIds=owner_id_to_snapshot_ids[owner_id]
|
SnapshotIds=owner_id_to_snapshot_ids[owner_id]
|
||||||
|
Loading…
Reference in New Issue
Block a user