Commit Graph

517 Commits

Author SHA1 Message Date
keirbadger
fecdf388c2 Add in filtering of EBS volumes on availability-zone (#1468) 2018-03-21 08:58:32 -07: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
Steve Pulec
924c99bcea
Merge pull request #1448 from grahamlyons/fix-ebs-tagging
Change `'image'` for `'volume'` when getting tags
2018-03-06 22:16:59 -05:00
Steve Pulec
6826b82cfb
Merge pull request #1455 from grahamlyons/snapshot-search-bug
Snapshot search bug
2018-03-06 22:06:33 -05:00
Hugo Lopes Tavares
5f61950096 Make SpotPrice optional when requesting a spot fleet
When price is omitted, AWS will default to the on-demand price
2018-02-01 18:07:35 -05:00
grahamlyons
f3debf8f6f Test and fix bug for snapshot searching
The logic which contructed a list of values for parameters with
multiple values was flawed in that e.g. `Subnet.1` and `Subnet.10`
would be have their values counted against `Subnet.1` because they
share a prefix.

This now checks for a starting `.` before counting that name as
having the requested prefix.
2018-01-29 14:30:21 +00: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
Jack Danger
4520cd930f
Merge pull request #1378 from william-richard/start-running-ami-tests
Make test_amis not executable, so nose runs it
2018-01-24 18:28:40 -08:00
dbfr3qs
597676c59c add tags when creating ebs volume 2018-01-15 21:52:32 +13:00
William Richard
09c5407b86
Fix tests that were introduced in PR #1398 2018-01-11 15:02:03 -05:00
William Richard
e0d4728c5d
Fix ami tests
- missing and malformed image ids
- test_ami_filters

- test_ami_copy tests

- test_ami_create_and_delete test

- test_ami_filter_wildcard test

- the rest of the tests by using the non-deprecated mock_ec2
2018-01-11 15:02:01 -05:00
William Richard
00a4249b74
Make test_amis not executable, so nose runs it
In trying to debug changes to the ami mock introduced in 1.1.25,
I noticed that the ami tests were not running.  Turns out that nose does not
run test files that are executable.

http://nose.readthedocs.io/en/latest/finding_tests.html

The ami test file was the only test file I could find that had the executable bit set.
2018-01-11 15:00:38 -05:00
Nuwan Goonasekera
56ce26a728 Added support for filtering AMIs by self (#1398)
* Added support for filtering AMIs by self

Closes: https://github.com/spulec/moto/issues/1396

* Adjusted regex to also match signature v4 and fixed py3 compatibility
2018-01-04 10:01:17 +00:00
Gordon Irving
4d9833b972 add test for descrie_regions with args 2017-12-28 21:02:58 +00:00
Nuwan Goonasekera
c68cd650e7 Make sure invalid or malformed AMIs raise an exception
Closes: https://github.com/spulec/moto/issues/1408
2017-12-22 18:50:22 +05:30
Archa91
474023f9a1 fix EC2 instances ebsOptimized not handled (#1340)
* fix EC2 instances ebsOptimized not handled

* add test_create_instance_ebs_optimized
2017-11-14 14:31:54 +00:00
Terry Cain
bd8c1e4567
adding owner id to amis v2 (#1331)
* Adding owner-id/OwnerId to the AMI classes to allow the value to be specified to test filtering images based on owner.

* Added default AMIs and filtering by owner-id

* Fixed some tests

* Fixed more random tests

* Updated MANIFEST

* .
2017-11-12 11:18:25 +00:00
Terry Cain
9ddf7fe436
Fixed some tests.
Some subnets were bogus so fixed that. Fixed issue where EC2-Classic was not respected.
RDS Deepcopy was breaking on subnet generator
2017-10-25 19:29:56 +01:00
Terry Cain
5b0e463554
Fixed a few ip issues
Fixes #1175
2017-10-24 23:57:43 +01:00
Terry Cain
f3623e3cd3 Fix for #1258 (#1260)
* Fix for #1258

* Updated doc link
2017-10-12 13:59:02 -07:00
William Johansson
88fb732302 Support wildcard tag filters on SecurityGroups 2017-10-06 21:55:01 +02:00
David Morrison
fa3268b7b7 fix tests 2017-10-06 08:07:21 -07:00
David Morrison
3d3d0e916e minor bugfixes and added tests 2017-10-05 18:46:58 -07:00
David Morrison
8ca7ccfcb5 add support for the modify_spot_fleet_request operation 2017-10-05 12:50:42 -07:00
Nuwan Goonasekera
5b01071bd4 Fix for regression in get_console_output() 2017-09-27 20:26:45 +05:30
Nuwan Goonasekera
ca56955a97 Added invalid id exceptions when filtering vpcs and subnets 2017-09-18 23:38:39 +05:30
Nuwan Goonasekera
08c4eff0b2 Added invalid id exceptions when filtering snapshots and volumes 2017-09-18 23:38:04 +05:30
Nuwan Goonasekera
298772ca92 Raise InvalidGroup.NotFound in DescribeSecurityGroups 2017-09-18 19:51:01 +05:30
Nuwan Goonasekera
0953ddde51 Fix for instance public ip not being cleared on eip disassociation 2017-09-16 12:26:43 +05:30
Jack Danger
b3ce255eee Merge pull request #1148 from gvlproject/vpc_address_filtering
Improved support for VPC Address filtering
2017-09-15 14:22:21 -07:00
Nuwan Goonasekera
8776129816 Improved support for VPC Address filtering 2017-09-16 01:49:57 +05:30
Nuwan Goonasekera
c116c57eb8 Ensure root device is listed in block device mappings 2017-09-15 21:30:32 +05:30
Nuwan Goonasekera
d0c610c5ac Added keypair filtering 2017-09-14 14:59:13 +05:30
Jack Danger
d2a234f75d falling back to use nic' 2017-09-08 16:30:21 -07:00
Jack Danger
5a03497367 rendering vpc_id in ec2 responses 2017-09-08 15:07:44 -07:00
Daniel Lutsch
1f6b1b8c4a Add list support to filters (#1083)
* initial pass with TODOs

* add list support to get_object_value

* fix group-id filters

* add tests for sg name and id filters
2017-08-25 23:43:29 -07:00
Daniel Lutsch
945b984538 Add private-dns-name filter and fix regional DNS (#1076)
* add private-dns-name to filter_dict_attribute_mapping

* add region_name attribute to Instance and InstanceResponse

* set dns name based on region

* test private-dns-name and network-interface.private-dns-name filters. checking both regional dns formats

* update test_ec2_classic_has_public_ip_address to use correct dns values
2017-08-23 01:39:50 -07:00
Christian Hellman
63b09eae13 Added DescribeAccountAttributes 2017-07-17 23:33:40 +00:00
Jeff Hardy
4e2f775c1f Use region list from Boto.
Boto can be configured with extra regions, but moto will fail to import
if they are not in the hardcoded list in ec2/models.py. Instead, use the
region list from boto to build the ec2_backends dict to ensure all
regions are available.
2017-05-26 12:47:28 -07:00
Jerome Bosman
b6d9b4f584 Replace and delete Network ACL Entries 2017-05-14 13:03:43 +01:00
Steve Pulec
97b920f6cf Fix ec2 tags in instance create. Closes #938. 2017-05-12 19:48:24 -04:00
Steve Pulec
0adebeed24 Merge #913. 2017-05-10 21:58:42 -04:00
Steve Pulec
408a70992c Fix filter wildcards. Closes #910. 2017-05-10 21:33:34 -04:00
Valentín Gutiérrez
6e209bb14c Implement availability-zone filter for DescribeNetworkInterfaces 2017-03-22 14:36:20 +01:00
Steve Pulec
3c0c4c2996 Fix tests for py3. 2017-02-23 22:28:09 -05:00
Steve Pulec
f37bad0e00 Lints. 2017-02-23 21:37:43 -05:00
Steve Pulec
81836b6981 Get standalone server mode working for all tests. 2017-02-23 19:43:48 -05:00
Steve Pulec
fde721bed7 Testing new version of decorator. 2017-02-15 22:35:45 -05:00
David Wilcox
012dd497f2 make get_all_security_groups filter AND match group ids, not OR them (#822) 2017-02-08 21:29:37 -05:00
Jason DeTiberus
1045dca7b2 make instanceTenancy configurable for VPCs (#819)
* make instanceTenancy configurable for VPCs

* fix issue with setting tenenancy
2017-02-08 21:23:49 -05:00
Jesse Szwedko
55f39265dd Upgrade to boto 2.45 (#803)
Adds support for additional regions:

* ca-central-1
* eu-west-2

Signed-off-by: Andrew Harris <andrew.harris@getbraintree.com>
2017-01-18 22:55:22 -05:00
costypetrisor
a967ec0d39 made the Security Group backend throw the same error as AWS if the nb of sec groups limit is hit (#742)
* made the Security Group backend throw the same error as AWS if the security group limit is hit

* included in the security group limit the count of grants to other security groups & updated the unit tests to cover these

* refactored a few things about the sec group rule count limit
2017-01-18 21:37:55 -05:00
Steve Pulec
a292150087 Throw exception if same security group rule added twice. Closes #737. 2017-01-11 22:35:27 -05:00
Taro Sato
02324ad708 Add more availability regions and implement default VPC (#773)
Fix filter name for availability zone

Fix bug assuming dict keys are ordered

Fix tests

Fix tests

Fix bug
2017-01-11 20:37:57 -05:00
Steve Pulec
05c6fc6738 Fix tests for py3. 2016-11-11 17:22:45 -05:00
Steve Pulec
5c3d9b4ae1 Have spot requests launch instances. 2016-11-07 23:08:30 -05:00
Steve Pulec
5371044b6f Spot fleet (#760)
* initial spot fleet.

* Add cloudformation spot fleet support.

* If no spot fleet ids, return all.
2016-11-07 09:53:44 -05:00
Steve Pulec
44636d1f73 Merge pull request #755 from dtenenba/master
bump tag limit from 10 to 50 to align with actual AWS limit
2016-11-06 09:52:20 -05:00
Steve Pulec
721d1b3a3f Merge pull request #736 from okomestudio/ts/botocore_update
Remove botocore version pinning
2016-11-06 09:50:28 -05:00
Dan Tenenbaum
ed7ea86f7b add positional argument for python 2.6 compatiblity 2016-11-03 14:42:23 -07:00
Dan Tenenbaum
de0a741309 syntax fix 2016-11-03 14:30:35 -07:00
Dan Tenenbaum
ffa6b1d9c1 should pass unit tests 2016-11-03 14:24:47 -07:00
Costy Petrisor
8689b40d23 made the security group endpoints that authorize or revoke firewall rules
to support batch rules (boto doesn't expose this, but botocore/boto3 does)
2016-10-20 19:34:11 +00:00
Costy Petrisor
6f622b9689 an unit test for the bulk authorization and revokation of security group
rules
2016-10-20 18:14:22 +00:00
Taro Sato
ed91b093cd Ignore RetryAttempts field generated by recent botocore versions 2016-10-16 21:50:21 -07:00
rocky4570fft
95e9ce2d42 fixup merge issue with test_elastic_ip_addresses.py 2016-10-16 00:37:14 +10:00
rocky4570fft
d6f76cbb43 Add dry_run to a number of EC2 services 2016-10-16 00:34:52 +10:00
rocky4570fft
015c92ac44 Add dry_run to a number of EC2 services 2016-10-15 23:08:44 +10:00
Steve Pulec
27f1bece9b Fix assigning public ip to instances. Closes #729. 2016-10-12 22:02:13 -04:00
Rene Martin
bd9e7deb95 Merge branch 'master' of https://github.com/spulec/moto 2016-10-10 07:47:11 +01:00
Steve Pulec
fef3437db2 Throw error on terminating empty instance list. Closes #697. 2016-10-09 21:20:53 -04:00
Rene Martin
b06d439a81 Set the right dhcp_options id in the response
If the vpc has a dhcp_options associated with it the response should
include the right association.
2016-10-08 10:34:55 +01:00
Mervyn Russell
43ff874b68 Amended test_ami_create_and_delete to include test for existence of creation date 2016-08-26 15:14:04 +01:00
rocky4570fft
0161422d21 additional filters to get_all_vpcs 2016-08-14 16:58:35 +10:00
Steve Pulec
ae938223d4 Cleanup headers popping. 2016-07-24 09:50:39 -04:00
Steve Pulec
8e8f3d99f6 Merge pull request #655 from 2rs2ts/work-around-httpheaders
Remove HTTPHeaders from ResponseMetadata in some tests
2016-07-24 09:36:58 -04:00
Andrew Gross
b4176050e2 Add volume attachment status 2016-07-22 14:23:42 -04:00
Steve Pulec
3e797d9c50 Merge pull request #658 from kierandoonan/master
Add encrypted attribute to Volumes/Snapshots
2016-07-09 21:11:52 -04:00
Steve Pulec
c34481a476 Merge pull request #659 from kierandoonan/fix-tag-filter
Fix tag filter
2016-07-09 21:11:12 -04:00
Kieran Doonan
5f770ffabb added more wildcard test for tags 2016-07-05 11:31:47 +01:00
Kieran Doonan
20e00dd095 added tests for broken tag filter 2016-07-05 11:20:28 +01:00
Kieran Doonan
e9af4c9065 changed equal to be for booleans 2016-07-04 14:21:31 +01:00
Kieran Doonan
2d73052eef added tests for encrypted snapshots 2016-07-04 14:19:29 +01:00
Kieran Doonan
bf73cb603d added tests for unencrypted filter 2016-07-04 14:09:15 +01:00
Kieran Doonan
8ccc210eef added tests for encrypted ec2 volumes 2016-07-04 11:01:48 +01:00
Andrew Garrett
aab137ae66 Remove HTTPHeaders from ResponseMetadata in some tests
botocore 1.4.29 started adding this. I'd match against it, but it
contains a date object and it's just not worth rewriting the assertions
for a key-by-key approach.
2016-06-29 23:45:21 +00:00
Paul Cieslar
8e6dd13738 Addition of region to test_security_group_tagging_boto3 2016-06-23 12:38:17 +01:00
Paul Cieslar
35d200c420 Update to test for security group tagging
Support for describe_security_groups() in boto3
2016-06-23 12:03:29 +01:00
Yann Lambret
52a5346c9e Add support for VPC attributes management, and fix a bug about the default - not default status of a VPC 2016-05-12 22:36:09 +02:00
Yann Lambret
864594ab91 Add tests for new filters 2016-05-08 00:19:47 +02:00
Adam Romanek
b32fbf090a Fix security group ingress authorization for all protocols with no port spec 2016-04-26 11:00:04 +02:00
Steve Pulec
6be53cf8c2 Merge pull request #594 from yannlambret/fix-security-groups
Fix security groups
2016-04-23 19:43:19 -04:00
Steve Pulec
224e92ba17 Merge pull request #592 from aiell0/hotifx/add-additional-instance-filters-issue-581
Added ec2 describe-instances filter: 'architecture'
2016-04-23 19:40:15 -04:00
Yann Lambret
232b832563 Change type for IpProtocol key 2016-04-20 23:21:39 +02:00
Yann Lambret
f9267cff6c Fix egress rules management to autorize or revoke a security group 2016-04-20 23:01:09 +02:00
Yann Lambret
de68c94a0a Add the default outboud rule for security groups 2016-04-19 23:50:46 +02:00
Lawrence Aiello
cf529ec3f9 Filter dicts have not been implemented in Moto for '%s' yet - mock_ec2 2016-04-18 16:41:57 -04:00
Yann Lambret
c793e0a23d Filtering implementation for DHCP options sets 2016-04-13 23:19:46 +02:00
Yann Lambret
6d4a48b019 Add support for 'ModifySubnetAttribute' action 2016-04-05 00:17:56 +02:00
Steve Pulec
d8a277ed55 Merge pull request #555 from yannlambret/fix-describe-route-tables-response
Fix a typo in DESCRIBE_ROUTE_TABLES_RESPONSE
2016-03-02 15:10:33 -05:00
Yann Lambret
a06fa082a4 Add two tests for both boto and boto3 as the problem only affects boto3 client 2016-03-02 12:15:47 +01:00
Hugo Lopes Tavares
21fb961c6a Implement NAT Gateway resource 2016-03-01 12:02:57 -05:00
andy
7120b5e4b1 Support placement when starting new instances 2016-02-10 17:59:48 +00:00
Steve Pulec
f35986b3fc Merge pull request #517 from DenverJ/volume_snapshot_filters
Add filter for volume-id on volumes.
2016-01-24 16:19:55 -05:00
Denver Janke
ee33ff582c Add filter for volume-id on volumes. 2016-01-20 12:24:33 +10:00
kevgliss
6bc4a8b38a Adds support for authorizing and revoking egress permissions 2016-01-15 12:36:11 -08:00
Steve Pulec
defd106523 Merge pull request #506 from DenverJ/volume_snapshot_filters
Add filters for describeVolumes and describeSnapshots.
2016-01-11 13:30:56 -05:00
Denver Janke
82b0b12e45 Add filters for describeVolumes and describeSnapshots. 2016-01-11 15:46:30 +10:00
Steve Pulec
35478f3a44 Fix AZs for run_instances. Closes #490. 2016-01-10 00:54:53 -05:00
Steve Pulec
d2302bae21 Add Customer Gateway Support. Closes #465 2016-01-08 16:48:01 -05:00
Steve Pulec
39fef4d367 Merge pull request #468 from EarthmanT/add_support_for_vpn_connections
Adding Support for VPN Connections
2015-12-21 15:18:05 -05:00
Steve Pulec
5d421dc343 Cleanup querying missing ELB error. 2015-12-13 22:41:17 -05:00
Marco Rucci
284641e8cf Add support for default VPCs and subnets.
The first VPC created will be elected as default.
All subnets of the default VPC are considered default for their availability zone.
2015-12-06 20:58:54 +01:00
earthmant
e98dfb1648 corrected unused import in test_vpn_connectins 2015-12-03 13:51:48 +02:00
earthmant
76a939cee6 making requested fix
used sequence_from_querystring and removed added functon vpn_connection_ids_from_query_string
added tests
2015-12-03 13:35:48 +02:00
Steve Pulec
44f0377cc4 Fix root volume to show up in other EC2 volume API calls. Closes 470 2015-11-28 09:19:45 -05:00
Steve Pulec
cddf139bbc Add ability to create EBS volumes from snapshots. Closes #447. 2015-11-03 09:37:02 -05:00
Steve Pulec
d3e4c2c4b5 Add ability for specific backends to enable template escaping. Closes #441. 2015-11-03 09:25:47 -05:00
Steve Pulec
73452c79f7 Add milliseconds to EC2 launch time. Closes #445. 2015-11-02 23:33:39 -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
Steve Pulec
37f86626cc Merge pull request #425 from ZuluPro/random_key_pair
Remade ec2.utils.random_key_pair for be really random
2015-10-05 18:25:17 -04:00
ZuluPro
b85b415977 Implemented import key pair 2015-09-24 17:34:08 +02:00
ZuluPro
23c2e7835e Remade ec2.utils.random_key_pair for be really random 2015-09-15 20:09:35 -04:00
Ilya Sukhanov
6a89786007 Remove hardcoded region in ebs test 2015-08-03 10:45:01 -04:00
Rob Walker
7b3f17e8f0 add modified tests for volume and snapshot changes. 2015-07-26 09:53:03 +10:00
Steve Pulec
4020141478 Fix cloudformation subnet tagging. 2015-07-13 19:27:00 -04:00
Hugo Lopes Tavares
65d51a5844 Make availability zone dynamic in Subnet Response templates 2015-04-08 16:47:43 -04:00
Hugo Lopes Tavares
56cb06041c Add filter "availabilityZone" to DescribeSubnets and add availability zone support too 2015-04-08 15:07:29 -04:00
Steve Pulec
82214d2bc2 Fix bug with empty string for instance vpc_id. Closes #337. 2015-03-28 14:30:30 -04:00
Steve Pulec
c0d19ab178 General cleanup. 2015-03-14 18:55:44 -04:00
Steve Pulec
6c9bba2ca1 Cleanup EC2 classic default security group. 2015-03-14 18:50:41 -04:00
Steve Pulec
c0e80de4d3 Merge pull request #317 from spulec/ec2-security-group-tag-filtering
Add support to tag filtering to Security Groups
2015-02-24 18:00:51 -05:00
Hugo Lopes Tavares
20d8318997 Add support to tag filtering to Security Groups 2015-02-24 17:56:26 -05:00
Andy Altepeter
b987914c72 slight change in formatting 2015-02-24 07:43:43 -06:00
Andy Altepeter
b66ee09abe fix test for ec2 instance type filter 2015-02-24 07:39:50 -06:00
Andy Altepeter
e17c7bbd7a support 'instance_type' filter 2015-02-23 11:03:59 -06:00
Andy Altepeter
d2d82333f9 support tag-value instance filter 2015-02-23 10:52:47 -06:00
Andy Altepeter
53ec30e3ba support 'tag-key' instance type 2015-02-23 10:45:16 -06:00
Steve Pulec
747563e4ff Cleanup tag escape testing. 2015-02-17 22:18:40 -05:00
Steve Pulec
136873d49e Cleanup public IPs for EC2 classic instances and fix some default ENI things. 2015-02-14 14:42:20 -05:00
Steve Pulec
5ededbb297 Fix security group tags. Closes #301. 2015-02-14 08:57:14 -05:00
dreadpirateshawn
d631f869c1 ModifyImageAttribute: Added support for user permissions. 2015-01-23 09:43:54 -08:00
Steve Pulec
b1c41820f7 Cleanup EC2 launch time code a bit. 2015-01-19 13:44:15 -05:00
Chris Henry
40b97d1bb2 Test that launch_time is a iso 8601 string. 2015-01-18 16:30:39 -05:00
Steve Pulec
845c468f32 Merge pull request #278 from cameron-r/master
Add filtering of instances by security group id
2014-12-10 20:11:25 -05:00
Cameron Rowshanbin
573a73aa01 With @ethome, add filtering of instances by security group id 2014-12-10 11:53:40 -06:00
Tyler Sanders
b513d69313 Add support for route table routes to target virtual private gateways. 2014-12-09 12:07:14 -06:00
Tyler Sanders
db7757347a Detach virtual private gateway support 2014-12-02 10:40:05 -06:00
Tyler Sanders
166fd69515 Virtual Private Gateway functionality 2014-12-02 10:28:09 -06:00
Steve Pulec
1a015d0e39 Cleanup some incorrect date formats. 2014-11-29 23:34:40 -05:00
Tyler Sanders
9cbe8d57f4 Support instance security group/groupSet attribute modification and description 2014-11-27 11:05:39 -06:00
Tyler Sanders
1fc32fa5cb Add support for Route Table tagging 2014-11-20 14:08:38 -06:00
Tyler Sanders
d511fd829b Add support for Network ACL tagging 2014-11-20 12:04:34 -06:00
Steve Pulec
8954242086 Better is_public support for AMIs including filtering. Closes #263. 2014-11-19 20:09:46 -05:00
Tyler Sanders
2a6c4c89bf Fix conflict with subnet/network ACL association during subnet creation. 2014-11-17 09:37:38 -06:00
Steve Pulec
2a61ef6f91 Cleanup some tests to work across regions. cc #232 2014-11-15 13:50:58 -05:00
Steve Pulec
b39861052b Make AMI test more explicit with region. 2014-11-15 10:06:14 -05:00
Tyler Sanders
400d12b175 Add default Network ACL during VPC creation. Associate default Network ACL with a new subnet. Add support for associating a new Network ACL with a subnet. 2014-11-14 17:23:56 -06:00
Tyler Sanders
0f18dd597c Add basic Network ACL create, describe support 2014-11-12 15:33:31 -06:00
Peter Van Bouwel
f28ad8ee29 Alter get_tags to use the backend associated with the taggable object. Also give volume and snapshot an additional backend attribute. 2014-11-11 10:26:02 +01: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
53fdf330ee Tests are added that verify that when a tag is being set on an (EBS) volume or on an instance that upon retrieval
from the resource, the tag are set on the instance.  Important is that the tags are set using create_tags but that
the presence is validated by getting the resource using either (get_all_volumes or get_all_instances).

When running the tests using nosetests it shows that the tags for the instances are correctly retrieved but the tags
for the volume are missing
2014-11-08 12:12:20 +01:00
Hugo Lopes Tavares
32af875386 Implement InternetGateway filters support
More information about IGW filters: http://docs.aws.amazon.com/AWSEC2/latest/APIReference/ApiReference-query-DescribeInternetGateways.html#query-DescribeInternetGateways-filters
2014-11-05 12:26:29 -05:00
Hugo Lopes Tavares
faa55efe21 Implement vpc-id Instance filter 2014-11-05 11:06:14 -05:00
Steve Pulec
41282c9e48 Merge pull request #251 from joekiller/cfn_eni
enable cloudformation of NetworkInterface
2014-11-04 17:22:32 -05:00
Hugo Lopes Tavares
8a0a10b0d1 Add support to filtering instances by source-dest-check 2014-11-04 16:56:56 -05:00
Joseph Lawson
8299b5c312 enable cloudformation of NetworkInterface 2014-11-03 14:24:22 -05:00
Steve Pulec
2d65b0a020 Some EC2 fixes for alternative regions. 2014-10-30 22:46:24 -04:00
Steve Pulec
2881c9b20c Merge pull request #244 from DataDog/master
Add support for DescribeInstanceStatus' IncludeAllInstances option
2014-10-27 11:21:00 -04:00
Arthur Wang
3bafebee04 Limit test for describe instance status filter by boto version 2014-10-27 14:48:17 +00:00
Steve Pulec
83481b589b Merge pull request #241 from DreadPirateShawn/RouteVPCPeeringConnection
Route vpc peering connection
2014-10-26 20:02:51 -04:00
Arthur Wang
d67c5b80a3 Add describe instance status test for new option 2014-10-24 16:18:52 -04:00
dreadpirateshawn
b10d16e583 Routes: Fixed vpc_peering_connection_id in describe route tables. (Upgrade: Boto 2.32.1 ~> 2.34.0) 2014-10-23 11:54:20 -07:00
dreadpirateshawn
4f847cfb4b ModifyInstanceAttribute: Added support for 'SourceDestCheck.Value'. 2014-10-22 15:11:37 -07:00
Steve Pulec
bcef13700d Merge pull request #234 from DataDog/add_instance_reason
EC2: Add instance state reason
2014-10-21 22:11:23 -04:00
Arthur Wang
c0049578cb Test filtering get_instances by reason code 2014-10-20 21:00:33 +00:00
dreadpirateshawn
89fd71eb16 Route Tables: Added support for associate/disassociate subnets. (fixed idempotency) 2014-10-14 14:23:14 -07:00
dreadpirateshawn
50d74b4811 Route Tables: Added support for associate/disassociate subnets. (added test threshold for Boto 2.16) 2014-10-14 11:34:58 -07:00
dreadpirateshawn
db044df0a9 Route Tables: Added support for associate/disassociate subnets. (added replace route table association) 2014-10-14 11:23:42 -07:00
dreadpirateshawn
d6b93af7fd Route Tables: Added support for associate/disassociate subnets. (removed wayward print) 2014-10-14 07:55:36 -07:00
dreadpirateshawn
5d046c76e5 Route Tables: Added support for associate/disassociate subnets. 2014-10-13 16:19:54 -07:00
Steve Pulec
68d2db55d4 Add VPC state. 2014-10-12 21:51:12 -04:00
Hugo Lopes Tavares
aee47395f7 Implement "name" filter to ec2.models.AMI 2014-10-10 15:14:46 -04:00
Joseph Lawson
b9f747fb4f test ip_ranges when authorizing security group ingress rules 2014-10-06 14:49:37 -04:00
Steve Pulec
b82507e41b Add instance_id to spot instance requests. Closes #210. 2014-10-05 22:55:36 -04:00
Steve Pulec
9de7969d2b Fix merge conflicts. 2014-10-05 21:55:23 -04:00
Steve Pulec
f0724d458e Merge pull request #216 from DreadPirateShawn/ImplementCopyImage
AMI: Implement copy_image.
2014-10-05 10:55:48 -04:00
Omer Katz
efa687f41d Added tag filters to some of the entities. 2014-10-01 16:18:46 +03:00
Omer Katz
4ec95bac74 Merge branch 'feature/vpc-filters' 2014-10-01 15:56:23 +03:00
Omer Katz
298cf65569 Added the ability to filter by tag-value and refactored the filters to be generic. 2014-10-01 15:44:54 +03:00
Omer Katz
444ab96b4f Added the ability to filter by tag-key. 2014-10-01 15:33:12 +03:00
Steve Pulec
27ef345b64 Merge pull request #218 from thedrow/feature/vpc-filters
Added the cider block, dhcp options id and tag filter to the VPC backend
2014-10-01 08:04:12 -04:00
Omer Katz
8b50844961 Tests will now pass on Python 3.3. 2014-10-01 12:56:32 +03:00
Joseph Lawson
7fca88e732 Test Fixes and tag: filter.
* fixed test_ec2.test_amis.test_ami_filters to test for AMIs in the state of 'available'
  * enhanced AMI's to be able to take `tag:` filter.
  * added tag: tests for AMIs
2014-09-30 16:42:52 -04:00
Joseph Lawson
866d8b4ea8 allow get_filter_value to return state of ami and test
* updated Ami.get_filter_value to return the state value of the AMI
  * updated test_ec2.test_amis.test_ami_filters to test for AMIs in the state of 'available'
2014-09-30 16:12:23 -04:00
Omer Katz
89bd78b927 Added the ability to filter vpcs by tags. 2014-09-30 17:58:02 +03:00
Omer Katz
ecb23485d0 VPCs can now be filtered by cider block and dhcp options id 2014-09-30 17:29:50 +03:00
Omer Katz
a1be4b7f61 VPCs can now be filtered by id. 2014-09-30 17:08:36 +03:00
dreadpirateshawn
635a0e0f64 AMI: Implement copy_image. (part 3, added boto version threshold) 2014-09-29 12:28:53 -07:00
dreadpirateshawn
a4fdce2e55 AMI: Implement copy_image. 2014-09-29 12:06:36 -07:00
dreadpirateshawn
b847d420e9 Network Interfaces: Added attach/detach support. (added test threshold for Boto 2.32) 2014-09-12 11:51:50 -07:00
dreadpirateshawn
04a4ae88bf Network Interfaces: Added attach/detach support. 2014-09-12 10:53:37 -07:00
dreadpirateshawn
f4d2623a4c DescribeInstances: Added block_device_mapping to XML 2014-09-11 11:29:20 -07:00
Steve Pulec
b8afb3be90 Merge pull request #198 from DreadPirateShawn/VPCDefaultSecurityGroup
VPC: Added default security group upon creation.
2014-09-10 20:57:47 -04:00
Shawn Falkner-Horine
c2cd5b346f Routes: Fixed vpc_peering_connection_id in describe route tables. 2014-09-10 12:22:01 -07:00
Shawn Falkner-Horine
2cf97ef193 VPC: Added default security group upon creation. 2014-09-10 11:15:43 -07:00
Shawn Falkner-Horine
3f266ebc2b Security Groups: Fix for filtering support. 2014-09-10 09:42:38 -07:00
Steve Pulec
f0a6510ca3 Merge pull request #191 from DreadPirateShawn/ImplementNetworkInterfaces
Network Interfaces: Initial implementation.
2014-09-09 21:12:06 -04:00
Steve Pulec
1bbb7a70ad Merge pull request #188 from DreadPirateShawn/ImplementRouteTables
Route Tables / Routes: Initial implementation.
2014-09-09 20:48:43 -04:00
DreadPirateShawn
182436a5bf Network Interfaces: Initial implementation. (Fixed unit test Boto version threshold for modify_network_interface_attribute.) 2014-09-08 23:05:40 -07:00
Steve Pulec
2cbdef663f Merge pull request #186 from bobbyi/spot_instance_tags
Spot instance tags
2014-09-08 23:22:13 -04:00
Steve Pulec
3feaa39bd3 Merge pull request #185 from bobbyi/filter_instances_by_tag
Support filtering instances by tag
2014-09-08 23:19:43 -04:00
Shawn Falkner-Horine
42f8cea5e6 Network Interfaces: Initial implementation. 2014-09-08 16:50:18 -07:00
Shawn Falkner-Horine
02f1dc0b3e Route Tables / Routes: Initial implementation. (Fixed deletion of main route table via deletion of VPC.) 2014-09-05 08:45:36 -07:00
Shawn Falkner-Horine
8aaa4c9873 Route Tables / Routes: Initial implementation. (Fixed unit test Boto version threshold for interface_id kwarg.) 2014-09-04 17:13:25 -07:00
Shawn Falkner-Horine
c4bae8af4f Route Tables / Routes: Initial implementation. (Commented out test which requires not-yet-released Boto 2.32.2.) 2014-09-04 16:50:36 -07:00
Shawn Falkner-Horine
22e6166e4e Route Tables / Routes: Initial implementation. 2014-09-04 16:23:59 -07:00
Bobby Impollonia
8ac549569e Add support for filtering spot instance requests 2014-09-04 12:39:14 -07:00
Bobby Impollonia
f029fe672d Add support for getting spot instance request tags 2014-09-04 12:38:09 -07:00
Bobby Impollonia
4403ea955f Support filtering instances by tag 2014-09-04 07:30:19 -07:00
Rory-Finnegan
665beda466 Added support to get_all_security_groups endpoint to actually filter groups.
- Filters by groupnames, group_ids and a filters. However, the filters option doesn't
   support owner-id and tags since neither attribute was readily available via the SecurityGroup object.

 - Also included a basic test to confirm it works.
2014-09-03 16:57:51 -04:00
David Baumgold
eedb4c4b73 Support Python 3 using six 2014-08-28 10:57:43 -04:00
Steve Pulec
cfda83dcba Merge pull request #180 from DreadPirateShawn/AMIsModifyAndDescribe
AMIs: Added ModifyImageAttribute and DescribeImages filtering.
2014-08-27 21:28:15 -04:00
Steve Pulec
ca13c141d3 Merge pull request #176 from singingwolfboy/unicode_literals
Unicode literals
2014-08-27 21:19:50 -04:00
Shawn Falkner-Horine
f9246def75 AMIs: Added ModifyImageAttribute and DescribeImages filtering. 2014-08-27 11:53:44 -07:00
Shawn Falkner-Horine
acaad7026b Remove VIM swap files. 2014-08-27 08:59:51 -07:00
David Baumgold
4201e6b430 from __future__ import unicode_literals 2014-08-27 11:33:55 -04:00
Steve Pulec
b69179818c Merge pull request #175 from DreadPirateShawn/SnapshotAttributes
Implementation for ModifySnapshotAttribute and DescribeSnapshotAttribute.
2014-08-26 20:53:46 -04:00
Steve Pulec
8f79d71f3f Merge pull request #172 from DreadPirateShawn/CreateSubnetVPCValidation
Create subnet vpc validation
2014-08-26 20:36:26 -04:00
Steve Pulec
1846f28b41 Merge pull request #170 from DreadPirateShawn/DescribeSubnetsFiltering
DescribeSubnets: Added support for 'filters' parameter.
2014-08-26 20:35:19 -04:00
Hugo Lopes Tavares
55400038a8 Change test_regions.py to work with old boto versions 2014-08-26 18:44:19 -04:00
Shawn Falkner-Horine
ebc0037659 Implementation for ModifySnapshotAttribute and DescribeSnapshotAttribute. 2014-08-26 15:16:58 -07:00
Hugo Lopes Tavares
7e69c69ae0 Add multi-region support to Autoscaling 2014-08-26 17:56:56 -04:00
Hugo Lopes Tavares
82eef28937 Add multi-region support to EC2 Instances 2014-08-26 17:56:56 -04:00
Shawn Falkner-Horine
0ecae450a1 CreateSubnet: Added VPC ID validation. 2014-08-26 14:04:34 -07:00
Shawn Falkner-Horine
d683c3b291 DescribeSubnets: Added support for 'filters' parameter. 2014-08-26 13:25:37 -07:00
Shawn Falkner-Horine
5b56e89b60 Error handling: Model-level validations, proper error responses. (fixed typo) 2014-08-25 15:14:45 -07:00
Shawn Falkner-Horine
c97417d8e7 Error handling: Model-level validations, proper error responses. (backport assert_raises as context manager for Python 2.6) 2014-08-25 15:09:38 -07:00
Shawn Falkner-Horine
9938995e05 Error handling: Model-level validations, proper error responses. (added coverage for new instance status call) 2014-08-25 14:00:35 -07:00
Shawn Falkner-Horine
5c46898b17 Merge remote-tracking branch 'upstream/master'
Conflicts:
	moto/ec2/responses/instances.py
2014-08-25 13:43:23 -07:00
Shawn Falkner-Horine
071c03e216 Error handling: Model-level validations, proper error responses. 2014-08-25 10:54:47 -07:00
Andres Riancho
c65ff170b2 Fix NotImplementedError: The describe_instance_status action has not been implemented #163 2014-08-20 14:52:23 -03:00
Steve Pulec
195505948b Merge pull request #162 from andresriancho/master
Fix block device mapping #160
2014-08-20 07:39:24 -04:00
Steve Pulec
9d06ccf0cd Merge pull request #156 from DreadPirateShawn/VPCPeeringConnections
Add support for VPCPeeringConnections.
2014-08-20 07:38:28 -04:00
Andres Riancho
9c1032da58 Fix #160, implemented blockDeviceMapping modify_attribute set 2014-08-20 08:20:08 -03:00
Andres Riancho
e94a7ed6ff First, we make it crash #160 2014-08-20 08:20:06 -03:00
Shawn Falkner-Horine
bfafaf70df Update support for VPCPeeringConnections. (New boto version in Travis matrix and gte threshold for tests.) 2014-08-18 11:54:11 -07:00
Steve Pulec
d2fc7bb7f9 Merge pull request #139 from kouk/backendaccess
general support for access to backend models
2014-08-02 10:43:35 -04:00
Shawn Falkner-Horine
42a305239c Add support for VPCPeeringConnections. 2014-07-31 14:41:30 -07:00
Konstantinos Koukopoulos
955bd6feef add a test for model accessor 2014-07-29 15:29:52 +03:00