Bert Blommers
77dd35e3b8
Use known ImageID in internal tests ( #3555 )
2021-01-13 09:02:11 +00:00
Brian Pandola
1a98c4f14a
Fix: handling of boolean value privateDnsEnabled
in ec2:VpcEndpoint ( #3566 )
...
* Properly coerce `privateDnsEnabled` to boolean value when parsing requests.
* Per AWS spec, default `privateDnsEnabled` request value to `True`.
* Properly serialize `privateDnsEnabled` as boolean value in responses.
* Add test coverage.
Ref: #3540
2021-01-08 08:05:44 +00:00
usmangani1
bce682a867
Fix:Added nat-gateway tags ( #3560 )
...
* Fix:Added nat-gateway tags
* Removed changes
2021-01-07 17:59:46 +00:00
usmangani1
af60306371
Fix:Ec2-VPC:Added functionality describe-vpc-endpoint ( #3524 )
...
* Fix:Ec2:Added fucntionality describe-vpc-endpoint
* Refactor
* Added test cases for errors
2020-12-07 21:39:57 +00:00
usmangani1
cfaaa70ea9
FIX:Ec2:Added:Tags for EIP ( #3505 )
...
* FIX:Ec2:Added:Tags for EIP
* removed files
* Fix tests
2020-12-06 00:04:46 +00:00
Bert Blommers
936fb19539
DescribeInstanceTypeOfferings - script that hardcodes all offerings
2020-12-02 14:41:24 +00:00
Bert Blommers
5d208bfd04
Merge branch 'master' into add_instance_type_offerings
2020-12-02 10:57:07 +00:00
Brian Pandola
ae85c539fd
Remove boto
package dependency
...
The `boto` library (long ago superseded by `boto3`) has not had an official
release in over two years or even a commit in the last 18 months. Importing
the package (or indirectly importing it by via `moto`) generates a deprecation
warning. Additionally, an ever-increasing number of `moto` users who have
left `boto` behind for `boto3` are still being forced to install `boto`.
This commit vendors a very small subset of the `boto` library--only the code
required by `moto` to run--into the /packages subdirectory. A README file
is included explaining the origin of the files and a recommendation for how
they can be removed entirely in a future release.
NOTE: Users of `boto` will still be able to use `moto` after this is merged.
closes #2978
closes #3013
closes #3170
closes #3418
relates to #2950
2020-11-26 23:59:15 -08:00
Nuwan Goonasekera
c658cfea0d
Run black and fix tests
2020-11-24 00:51:00 +05:30
Nuwan Goonasekera
114a8efac8
Improved describe instance types + tests
2020-11-23 15:30:52 +05:30
Nuwan Goonasekera
a69bad57ef
Added instance type offer filters
2020-11-23 15:30:52 +05:30
Mykola Mykhalov
689cd8f285
Implement IAM instance profile associations ( #3482 )
...
* Add associate_iam_instance_profile describe_iam_instance_profile_associations, disassociate_iam_instance_profile, replace_iam_instance_profile_association
* More tests, removed type hints, filter fix
* Ec2 fix
2020-11-20 22:00:53 +00:00
Brian Pandola
93453eba05
Improve ec2:DescribeSubnets filtering ( #3457 )
...
* Add response/model/test coverage for filtering by `state`
* Add explicit test case for filtering by `vpc-id`
Closes #801
2020-11-16 08:17:36 +00:00
Bert Blommers
273ca63d59
Linting
2020-11-11 15:55:37 +00:00
Bert Blommers
cb6731f340
Convert fixtures/exceptions to Pytest
2020-11-11 15:54:01 +00:00
Matěj Cepl
6d364dc7aa
Pytest model of exceptions uses 'value' attribute instead of 'exception'.
2020-11-11 12:21:04 +01:00
Matěj Cepl
5697ff87a8
Back to Black
2020-11-10 14:12:38 +01:00
Matěj Cepl
ea489bce6c
Finish porting from nose to pytest.
2020-11-10 08:25:05 +01:00
Matěj Cepl
77dc60ea97
Port test suite from nose to pytest.
...
This just eliminates all errors on the tests collection. Elimination of
failures is left to the next commit.
2020-11-10 08:23:44 +01:00
usmangani1
f57a77451c
Fix:Added Tags for Network-ACL,RouteTable,InternetGateway ( #3430 )
...
* Fix:Added Tags for Network-ACL,RouteTable,InternetGateway
* Modified internet-gateway tags
* Lint
Co-authored-by: usmankb <usman@krazybee.com>
2020-11-02 13:30:02 +00:00
Brian Pandola
c0a25bbd9a
Fix: VpnGatewayId
parameter casing in ec2:CreateVpnConnection request ( #3401 )
...
Fixes #3397
2020-10-27 07:41:01 +00:00
davidaah
2fe3aee359
Allow creation of subnets from secondary VPC IPv4 CIDR blocks ( #3391 )
...
* allow subnets to be created from secondary vpc cidr block
* add additional test case for invalid cidr
2020-10-16 16:02:01 +01:00
Brian Pandola
ccda76898a
Add KMS Support to EBS Encrypted Volumes ( #3383 )
...
* Properly coerce `Encrypted` attribute to bool on request/response.
* Create and use a default AWS managed CMK for EBS when clients request
an encrypted volume without specifying a KmsKeyId.
NOTE: A client-provided KmsKeyId is simply stored as-is, and is not validated
against the KMS backend. This is in keeping with other moto backends (RDS, Redshift)
that currently also accept unvalidated customer master key (CMK) parameters, but could
be an area for future improvement.
Closes #3248
2020-10-14 15:18:50 +01:00
Brian Pandola
d00cefa25c
Add tagging to ec2.CopySnapshot ( #3365 )
...
The `@freeze_time` decorator was removed because it is not necessary (and was
causing the test to be skipped).
Closes #2940
2020-10-09 12:33:07 +01:00
ljakimczuk
3bc18455a2
WIP: Introducing VPC Flow Logs ( #3337 )
...
* Start working on flow logs
* Change test
* Constructing tests
* Changing exceptions and adding more tests
* Adding more tests
* Changing model and adding more tests
* Adding support for tags
* Mocking Access error with non-existing Log Group Name
* Adding FlowLogAlreadyExists support
* Changing style
* Reformatted code
* Reformatted tests
* Removing needless test
* Adding support for CloudFormation
* Reformatting slightly
* Removing arnparse and using split
* Rearranging tests
* Fixing FilterNotImplementedError test
* Moving imports to 'if' clauses and adding explicit test for 'cloud-watch-logs' type
* Setting names matching boto3 API and restoring 'not-implementd-filter' test
* Reformatting tests with black
2020-09-28 07:16:06 +01:00
usmangani1
55e7caccfe
Fix:EC2 Tags in create vpc and create subnet ( #3338 )
...
Co-authored-by: usmankb <usman@krazybee.com>
2020-09-27 09:24:17 +01:00
Wolfgang Bauer
a4701dbbe6
Add tags to Elastic IP Addresses ( #3310 )
...
* Make ElasticAddress a tagged resource
To be able to filter on tags on ElasticAddresses, I need to have tags.
* remove unneeded commented lines
Was beginning of how to to it before further checking how it is done with other resources.
* do not ignore network-interface-owner-id filter
* add TODO about currently hardcoded region
* remove hardcoding region
* add testing for tags
creating and allocation, adding tags and querying for it
* separate test for tags into own method
* Linting
Co-authored-by: Bert Blommers <info@bertblommers.nl>
2020-09-25 15:25:30 +01:00
Bert Blommers
db1d7123f6
List dependencies for services - add integration test to verify
2020-09-13 16:08:23 +01:00
Karthikeyan Singaravelan
7054143701
Fix deprecation warnings due to invalid escape sequences. ( #3273 )
...
* Fix deprecation warnings due to invalid escape sequences.
* Fix linter error.
2020-09-10 09:20:26 +01:00
Karthikeyan Singaravelan
3fb7cf75d4
Fix deprecation warning due to base64.decodestring in Python 3. ( #3272 )
2020-09-02 11:10:29 +01:00
usmangani1
1c939a5f06
Fix:EC2-Create-Subnet availability Zone Id support ( #3198 )
...
* Fix:EC2-Create-Subnet availability Zone Id support
* Linting
* Fix:fixed build errors
* linting
Co-authored-by: Bert Blommers <bblommers@users.noreply.github.com>
Co-authored-by: Bert Blommers <info@bertblommers.nl>
Co-authored-by: usmankb <usman@krazybee.com>
2020-08-27 16:31:39 +01:00
jmbollard
2a27e457bf
Security group egress ip permissions fix ( #3250 )
...
* Add support for Description in egress rule response
* Update SecurityGroup default egress rule ip range
* Remove extra commas
* Remove extra commas
* Lower docker package in Travis
* Add more lambda vars per PR 3247
* Remove code added in 3247
* Add tests for egress rules with Descriptions
* Reformat based on black
Co-authored-by: spillin <jmbollard@me.com>
2020-08-26 14:27:45 +01:00
usmangani1
9894e1785a
Enhancement : Ec2 - Add describe-vpc-endpoint-services method support. ( #3108 )
...
* Enhancement : Ec2 - Add describe-vpc-endpoint-services method support.
* Fix:EC2-describe_vpc_endPoint_services changed the template
* Fixed comments
* Linting
Co-authored-by: usmankb <usman@krazybee.com>
Co-authored-by: Bert Blommers <info@bertblommers.nl>
2020-08-06 06:26:44 +01:00
usmangani1
a7ddcd7da3
Fix:EC2-authorize_security_group_ingress- add description to IP-Ranges ( #3196 )
...
* Fix:EC2-authorize_security_group_ingress- add description to IP-Ranges
* Fix:EC2-authorize_security_group_ingress- add test when description is not present.
* part commit
* Fix:fixed build errors
* Linting
* Allow for Python2 string/unicodes
Co-authored-by: usmankb <usman@krazybee.com>
Co-authored-by: Bert Blommers <info@bertblommers.nl>
2020-08-04 06:50:57 +01:00
Larry Aiello
06ed67a8e5
Implement UserIds for Snapshot Attributes ( #3192 )
...
* implement register_image
* format code
* add user_ids to snapshot model
* implement register_image
* format code
* add user_ids to snapshot model
* trying to un-deprecate tests
* Write tests and finalize implementation
* Add region parameter to boto3 resource call
* fixed test error
2020-08-01 17:03:54 +01:00
Matt Williams
50d71eccbe
Fix XML schema for ec2.describe_instance_types ( #3194 )
...
* Add test for describe_instance_types
It currently fails due to an invalid XML schema
* Add more detail to test
* Fix the XML schema for describe_instance_types
2020-07-29 18:36:37 +01:00
Larry Aiello
2504a398f9
Implement ec2.register_image() ( #3177 )
...
* implement register_image
* format code
2020-07-26 13:51:26 +01:00
Alan Baldwin
b09c8034e6
Adding VPN Gateway filters ( #3155 )
...
* Adding attchment.vpc-id, attachment.state, type, and vpn-gateway-id filters for VPN Gateways. fixes #3154
* Run formatting on tests
Co-authored-by: Alan Baldwin <alan.baldwin.jr@gmail.com>
2020-07-21 16:08:49 +01:00
usmangani1
552b1294df
Fix : EC2 - Added ownerId filter for describe instances ( #3149 )
...
* Fix : EC2 - Added ownerId filter for describe instances
* linting
2020-07-19 10:44:58 +01:00
usmangani1
81be4b37a1
Fix: Ec2 - add destinationIpv6CIDR support. ( #3106 )
...
* Fix: Ec2 - add destinationIpv6CIDR support.
* removing unneccessary debug statements
* modifying existing test case
* Linting
Co-authored-by: usmankb <usman@krazybee.com>
Co-authored-by: Bert Blommers <info@bertblommers.nl>
2020-07-07 14:32:55 +01:00
Ninh Khong
b7671819df
Update code lint
2020-07-05 23:04:34 +07:00
Ninh Khong
87eb8a21d6
Update unittest checking region response in accept_vpc_peering_connection and describe_vpc_peering_connects functions
2020-07-05 22:09:57 +07:00
Maxim Kirilov
610bf36f3b
Improve parsing of string values that represents booleans during block device mapping construction ( #3073 )
...
* convert str into bool
* Fix python2
* Fix python2
* pylint
2020-06-16 06:03:02 +01:00
usmangani1
5988e5efaa
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>
2020-06-15 10:32:43 +01:00
usmangani1
475f022b78
Enhancement: EC2 added create route with networkInterfaceId ( #3063 )
...
* Enhancement:EC2- create route with network interfcaeID
* modifying existing test case
* Linting
Co-authored-by: usmankb <usman@krazybee.com>
Co-authored-by: Bert Blommers <info@bertblommers.nl>
2020-06-12 16:16:55 +01:00
André Nardy
97a6e8d9e8
Enhancement/describe network acls ( #3003 )
...
* update describe_network_acls and create unit test
* add fail test case
* adjustment after feedback
* fix result test
2020-05-26 11:04:59 +01:00
Maxim Kirilov
2320e82647
Add support for detaching volumes upon instance termination ( #2999 )
2020-05-24 12:22:45 +01:00
Maxim Kirilov
1e0a7380d5
Add support for BlockDeviceMappings argument ( #2949 )
...
* Add support for BlockDeviceMappings argument upon run_instances execution
* Remove redundant check for Ebs existence
2020-05-11 13:23:45 +01:00
Bert Blommers
2d0087d500
Linting
2020-04-29 16:29:25 +01:00
usmankb
f4888da334
added test asserts and review comments
2020-04-29 18:02:02 +05:30
usmankb
84100c4483
enhancement Create-VPC-endpoint
2020-04-29 00:28:19 +05:30
Matthew Gladney
ff1beea280
Merge https://github.com/spulec/moto into support_optin_regions
2020-04-27 18:27:40 -04:00
Steve Pulec
fbc431dbff
Merge pull request #2837 from bblommers/bug/2810
...
EC2 - Explicitly set ebs_optimized to false if not specified
2020-04-25 18:44:48 -05:00
Steve Pulec
9c3f6c7592
Merge pull request #2825 from bblommers/feature/2699
...
EC2 - Add option to add volumes using CloudFormation
2020-04-25 18:36:26 -05:00
Matthew Gladney
59c1f0e131
black reformatting changes
2020-04-24 14:20:58 -04:00
Matthew Gladney
908468edb6
Support OptInStatus for EC2 describe_region calls
2020-04-24 14:15:22 -04:00
Mike Grima
bdeeeb701a
Merge pull request #2880 from bblommers/bugfix/2877
...
EC2 - Ensure NCI always has a Subnet
2020-04-16 15:02:45 -07:00
usmankb
7a9cdd4fd2
Adding missing Param zoneId in the describe-availability-zone
2020-04-11 08:37:00 +05:30
Bert Blommers
8475804a8b
Simplify tests
2020-04-08 14:02:35 +01:00
Bert Blommers
5c7e0b56af
#2877 - Ensure NetworkInterfaces are assigned to the default Subnet
2020-04-08 13:53:53 +01:00
Bert Blommers
aae49493c4
Linting
2020-04-07 08:52:37 +01:00
usmankb
81ca5c3ab0
Implemented describe_instance_credit_specifications function in ec2 #2150 localstack
2020-04-06 21:25:59 +05:30
mickeypash
a6864f483d
Use Python 2 format
2020-04-03 14:17:55 +01:00
mickeypash
d3367b8a90
Black formatting
2020-04-03 02:27:46 +01:00
mickeypash
76b9cbe16d
Fix test
2020-04-03 02:14:14 +01:00
mickeypash
231b100057
Add test scaffold. Currently broken
2020-04-03 01:58:14 +01:00
Bert Blommers
11526ced18
#2810 - EC2 - Explicitly set ebs_optimized to False if not specified
2020-03-24 09:24:38 +00:00
Bert Blommers
5b596c8a78
#2699 - EC2 - Add Volumes using CloudFormation
2020-03-20 15:17:55 +00:00
Bert Blommers
9eeb375911
Add region to test case
2020-03-10 09:26:44 +00:00
Bert Blommers
dc98fca853
#718 - Allow filtering by multiple tags
2020-03-09 15:14:51 +00:00
Steve Pulec
a92f862e86
Merge pull request #2764 from bblommers/feature/ec2-describe-instance-filters
...
Feature - EC2 describe_instance_status now uses filters
2020-03-07 11:47:05 -06:00
aimannajjar
639c1abcb4
clarifying comment in test case
2020-03-01 08:23:31 -05:00
aimannajjar
5b9b965647
[ec2-sg] added logic to create a second default egress rule for ipv6
2020-02-29 21:05:05 -05:00
Bert Blommers
3aeb5f5043
Linting
2020-02-24 13:43:58 +00:00
Bert Blommers
939bd1cd86
EC2 - Add some filters for describe_instance_status
2020-02-24 13:43:19 +00:00
Steve Pulec
b252ab6675
Merge pull request #2173 from sthuber90/master
...
Extending IoT Policy and Jobs functionality
2020-02-17 17:55:03 -06:00
Bert Blommers
df031d0f33
#2732 - Created AMI should have AccountID as the OwnerID
2020-02-08 10:58:31 +00:00
Stephan Huber
5543a91cc1
Merge remote-tracking branch 'upstream/master'
2020-01-24 10:38:19 +01:00
Asher Foa
d9d055c75d
Fix more typos.
2020-01-23 10:15:02 -08:00
Stephan Huber
84210f6011
Merge remote-tracking branch 'upstream/master'
2020-01-23 15:37:40 +01:00
gruebel
cd9b7072a2
Adjust ec2 regions tests
2019-12-28 21:22:16 +01:00
gruebel
d7ba355a65
Add missing regions to all services
2019-12-26 17:12:22 +01:00
Stephan Huber
0527e88d46
Merge remote-tracking branch 'upstream/master'
2019-12-23 08:38:53 +01:00
Fabio Dias
743dd46399
black linting
2019-12-16 21:25:20 -05:00
Fabio Dias
fd9ac4b9a5
ACCOUNT_ID moved to moto.core, MOTO_ACCOUNT_ID env var override
2019-12-16 21:05:29 -05:00
Fabio Dias
b83a750630
Added references to moto.iam.models.ACCOUNT_ID instead of hardcoded id
2019-12-16 19:56:11 -05:00
Mike Grima
4386999ea7
Merge pull request #2613 from levinine/add_nat_gateway_id_to_route_and_describe_route_tables
...
Add nat_gateway_id to route and describe_route_tables
2019-12-12 18:33:11 -08:00
Mike Grima
ab73ab3ff5
Merge pull request #2609 from levinine/describe_nat_gateway_filter_support
...
Add describe_nat_gateway filters support
2019-12-12 18:29:05 -08:00
Berislav Kovacki
43070a03ba
Add nat_gateway_id to route and describe_route_tables
2019-12-02 19:20:00 +01:00
Berislav Kovacki
4322ecb254
Add describe_nat_gateway filters support
...
Support describe_nat_gateway filters by using nat-gateway-id, vpc-id,
subnet-id and state filter parameters.
2019-11-28 23:36:00 +01:00
gruebel
5895231b5c
Fix ec2.revoke_security_group_egress for IpProtocol -1
2019-11-24 17:17:53 +01:00
Mike Grima
028aafd05b
Merge pull request #2555 from catherinetcai/feature/ec2-vpc-classic-link
...
Adds basic implementations for vpc-classic-link and vpc-classic-link-dns-support - Redo
2019-11-16 10:21:29 -08:00
Cat Cai
528cf0e21d
Run black to fix linting
2019-11-12 14:51:31 -08:00
Cat Cai
9169b87748
Tests pass
2019-11-12 11:16:34 -08:00
Cat Cai
9cb105f5c2
Ensure test is sorted
2019-11-12 10:32:27 -08:00
Cat Cai
3398244f14
Fix styling problems
2019-11-11 12:09:52 -08:00
Wessel van der Veen
6d52cd06cb
Adds support for enable/disable/describe vpc-classic-link-dns-support.
2019-11-11 10:55:09 -08:00
Wessel van der Veen
17cc46b91e
adds basic support for vpc-classic-link
2019-11-11 10:54:36 -08:00
Bert Blommers
179bdd6caa
#2002 - Take ElasticNetworkInterfaces into account when requesting available IP addresses
2019-11-08 16:40:17 +00:00
Asher Foa
96e5b1993d
Run black on moto & test directories.
2019-10-31 10:36:05 -07:00