Commit Graph

38 Commits

Author SHA1 Message Date
Tom Elliff
e2af8bc836 Allow tagging snapshots on creation
Largely copying what was done for volume creation in https://github.com/spulec/moto/pull/1432
2018-04-04 17:46:51 +01:00
Graham Lyons
5d51329c34 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.
2018-03-21 08:55:58 -07:00
grahamlyons
3ce57644cd Change 'image' for 'volume' when getting tags
The AWS docs say that: "Currently, the resource types that support
tagging on creation are instance and volume." Calling `create_volume`
and passing `image` as the resource type in tag specifications causes
an `InvalidParameterValue` error.
2018-01-26 11:12:50 +00:00
dbfr3qs
597676c59c add tags when creating ebs volume 2018-01-15 21:52:32 +13:00
Nuwan Goonasekera
08c4eff0b2 Added invalid id exceptions when filtering snapshots and volumes 2017-09-18 23:38:04 +05:30
Nuwan Goonasekera
7ed1036ba8 Replaced direct querystring access with inherited _get_param 2017-09-16 19:05:32 +05:30
Steve Pulec
5f3fbff627 Standardize on one account id (123456789012). 2017-03-15 22:21:04 -04:00
Steve Pulec
f37bad0e00 Lints. 2017-02-23 21:37:43 -05:00
rocky4570fft
d6f76cbb43 Add dry_run to a number of EC2 services 2016-10-16 00:34:52 +10:00
Kieran Doonan
44195a9151 added encrypted attribute to snapshots 2016-07-04 14:29:33 +01:00
Kieran Doonan
a3c16bcc77 updated ebs response 2016-07-04 14:09:41 +01:00
Kieran Doonan
f9f0d4b7d9 encrypted attribute now respected in create_volume 2016-07-04 11:30:17 +01:00
Kieran Doonan
957678d33d create volume response updated 2016-07-04 11:25:51 +01:00
Kieran Doonan
9ea06399ba describe instances response now shows encrypted status 2016-07-04 11:24:13 +01:00
Steve Pulec
d82d64b8bd Add EBS snapshot filter. Closes #525. 2016-05-01 22:24:49 -04:00
gigimon
52eb16d765 * change api version to 2013-10-15 2016-02-02 16:15:18 +03:00
Denver Janke
82b0b12e45 Add filters for describeVolumes and describeSnapshots. 2016-01-11 15:46:30 +10:00
Steve Pulec
cddf139bbc Add ability to create EBS volumes from snapshots. Closes #447. 2015-11-03 09:37:02 -05:00
nuwan_ag
0b3ad166c0 Set snapshots to be in a completed state after being created and added
test case
2015-10-14 02:34:36 +11:00
Rob Walker
2bb79824ce Volume attachments to show in instance.
Volumes and Snapshots to be searchable by their id
Placement of instance to match region connection
Times for creation and attachment to show based on api call
2015-07-26 09:37:20 +10:00
Francisco De Freitas
e320190b42 Use dummy date instead of an invalid date 2015-04-28 13:39:48 +02:00
dreadpirateshawn
9affa7753d Performance: Leverage jinja2's Environment to cache compiled Templates. 2014-12-12 12:46:07 -08:00
Steve Pulec
8bc8f09b47 Some flake8 cleanup. 2014-11-15 09:35:52 -05:00
Peter Van Bouwel
2f1f993793 Extend the DESCRIBE_SNAPSHOTS_RESPONSE to include the tagSet as documented by AWS. Also refactor the names of the tests I introduced in previous commits to be more descriptive. Finally some code cleanup, removing the get_tags method from classes and instead inherit from the TaggedEC2Resource class. 2014-11-09 15:00:40 +01:00
Peter Van Bouwel
17356fe56c Extend the DESCRIBE_VOLUMES_RESPONSE to include the tagSet as documented by AWS on http://docs.aws.amazon.com/AWSEC2/latest/APIReference/ApiReference-ItemType-DescribeVolumesSetItemResponseType.html . This is needed to pass the test that was added in previous commit. 2014-11-09 12:21:19 +01:00
Steve Pulec
2d65b0a020 Some EC2 fixes for alternative regions. 2014-10-30 22:46:24 -04:00
David Baumgold
4201e6b430 from __future__ import unicode_literals 2014-08-27 11:33:55 -04:00
Shawn Falkner-Horine
ebc0037659 Implementation for ModifySnapshotAttribute and DescribeSnapshotAttribute. 2014-08-26 15:16:58 -07:00
Shawn Falkner-Horine
071c03e216 Error handling: Model-level validations, proper error responses. 2014-08-25 10:54:47 -07:00
Steve Pulec
ec938ef904 Convert all EC2Response Mixins to subclasses. 2013-12-29 08:25:13 -05:00
Steve Pulec
3bddbb4af3 Test out py26 with new HTTPretty 2013-10-03 20:34:13 -04:00
Steve Pulec
47bd4c49a3 attempting to move to upstream httpretty 2013-05-03 19:33:13 -04:00
Steve Pulec
2d98a9caef some more tests to bump coverage 2013-03-11 00:12:22 -04:00
Steve Pulec
459697508e remove extra newline 2013-02-27 01:20:10 -05:00
Steve Pulec
e261b82f29 add most of the snapshot implementation 2013-02-23 18:01:41 -05:00
Steve Pulec
f92a3ec00f volume attaching and detaching working 2013-02-23 17:37:55 -05:00
Steve Pulec
0bd4d57ef2 raise NotImplementedError if not implemented 2013-02-22 07:55:48 -05:00
Steve Pulec
27a086409e adding ec2 stubs 2013-02-21 23:13:01 -05:00