Don't create volumes for AMIs (#1456)
* Delete the volume used during AMI creation Creating an AMI doesn't actually result in the creation of an EBS volume, although the associated snapshot does reference one. To that end, delete the volume once we've used it. * Add `owner_id` to `Snapshot`, verify AMI snapshots The default AMIs which are created by moto have EBS volume mappings but the snapshots associated with those don't have the correct owners set. This adds the owner to the snapshot model and passes it through from the JSON data.
This commit is contained in:
parent
39e9379195
commit
5d51329c34
3 changed files with 54 additions and 20 deletions
|
|
@ -229,7 +229,7 @@ CREATE_SNAPSHOT_RESPONSE = """<CreateSnapshotResponse xmlns="http://ec2.amazonaw
|
|||
<status>pending</status>
|
||||
<startTime>{{ snapshot.start_time}}</startTime>
|
||||
<progress>60%</progress>
|
||||
<ownerId>123456789012</ownerId>
|
||||
<ownerId>{{ snapshot.owner_id }}</ownerId>
|
||||
<volumeSize>{{ snapshot.volume.size }}</volumeSize>
|
||||
<description>{{ snapshot.description }}</description>
|
||||
<encrypted>{{ snapshot.encrypted }}</encrypted>
|
||||
|
|
@ -245,7 +245,7 @@ DESCRIBE_SNAPSHOTS_RESPONSE = """<DescribeSnapshotsResponse xmlns="http://ec2.am
|
|||
<status>{{ snapshot.status }}</status>
|
||||
<startTime>{{ snapshot.start_time}}</startTime>
|
||||
<progress>100%</progress>
|
||||
<ownerId>123456789012</ownerId>
|
||||
<ownerId>{{ snapshot.owner_id }}</ownerId>
|
||||
<volumeSize>{{ snapshot.volume.size }}</volumeSize>
|
||||
<description>{{ snapshot.description }}</description>
|
||||
<encrypted>{{ snapshot.encrypted }}</encrypted>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue