Commit Graph

107 Commits

Author SHA1 Message Date
Peter Baumgartner
94c676b9cf
include=["TAGS"] for describe_task_definition (#3265)
* include=["TAGS"] for describe_task_definition

* Different approach

* describe_services tags and tests
2020-09-01 10:24:08 +01:00
Steve Pulec
41427a78b6
Merge pull request #3147 from bblommers/enhancement/3139
ECS - UpdateService - Allow service ARN to be passed in
2020-07-26 15:31:12 -05:00
Aaron Hill
1e5b8acac6
Implementation: ECS Task Sets (#3152)
* initial implementation of taskSets.  Fixed a bug with ECS Service where task_definition was a required parameter.

* Added update_task_set and tests.  DRYed up ClusterNotFoundException. General cleanup.

* Added support for filtering tags on include parameter to describe_task_sets.  Added additional tests.

* Fix copy/pasta in ClusterNotFoundException

* styling updates

* Added TODO for delete_task_set force parameter

* Updated multiple function and constructor calls to use named variables.  Updated tests to reference variables instead of hardcoded strings.

* Run black for formatting

* Updated create_service function call to use named variables
2020-07-21 07:17:37 +01:00
Bert Blommers
f69688b064 ECS - UpdateService - Allow Service ARNs 2020-07-17 12:50:06 +01:00
Rifqi Al Fatih
f23f706825 Implement placement constraints model 2020-05-02 18:47:59 +02:00
Theodore Wong
0163eb6a9d Changed mock_ecs to support ecs.run_task calls with a default cluster 2020-04-07 15:32:44 -07:00
Asher Foa
d9d055c75d Fix more typos. 2020-01-23 10:15:02 -08:00
Don Kuntz
fd1fdde1bf
Allow black to reformat correctly 2020-01-09 23:45:14 -06:00
Don Kuntz
2cb3f327de
Store 'networkMode' in ECS Task Definitions instead of just throwing it away 2020-01-09 23:00:33 -06:00
Alex Tareshawty
df2279d39c Add familyPrefix option to ecs:ListTaskDefinitions
AWS defines this option as:
```
--family-prefix (string)
  The full family name with which to filter the ListTaskDefinitions
  results. Specifying a familyPrefix limits the listed task
  defini-tions to task definition revisions that belong to that
  family.
```

This option behaves differently than ecs:ListTaskDefinitionFamilies.
Instead of doing a comparison like `startswith`, it does a full string
comparison by matching the entire task definition family to the prefix.
For example, let's say there exists a task definition with the family
`super-cool-task-def`.

ListTaskDefinitionFamilies would look like this:

```
aws ecs list-task-definition-families --family-prefix super-cool
{
    "families": [
      "super-cool-task-def"
    ]
}
```

ListTaskDefinitions would look like this:

```
aws ecs list-task-definitions --family-prefix super-cool
{
    "taskDefinitionArns": []
}
```
2019-11-26 09:40:01 -05:00
Steve Pulec
a9fe5d462c More linting. 2019-11-22 09:39:07 -05:00
Steve Pulec
72da9e96c2 Lint. 2019-11-21 17:53:58 -05:00
Asher Foa
96e5b1993d Run black on moto & test directories. 2019-10-31 10:36:05 -07:00
Jamie Starke
017cbb52ca Added Exception to for describe_container_instances to match aws api 2019-10-11 22:13:55 -07:00
Steve Pulec
7de11b672b
Merge pull request #2449 from nadlerjessie/events-and-ecs-multi-region
Events and ecs multi region
2019-10-03 16:20:30 -05:00
Jim Shields
6cb1173719 Add tag_resource and untag_resource for ECS services
* Refactor resource ARN parsing
2019-10-03 15:16:07 -04:00
Jessie Nadler
4fe66f521d Use region to create and describe ECS resources 2019-10-03 15:12:05 -04:00
Jim Shields
d8333fdd7e Add support for tagging of ECS services
* Add tags to create_service
* Add service to list_tags_for_resource
2019-10-03 14:30:08 -04:00
wndhydrnt
3c19f0a02d Convert fields createdAt and updatedAt of deployment to timestamp 2019-08-04 10:23:50 +02:00
Michael van Tellingen
64e2a74e8c Add support for setting tags on ecs task definitions
This also implements the ecs.list_tags_for_resources, although the
resources it checks for are currently only the task definitions
2019-07-29 09:58:08 +02:00
Kyle Decot
8cb4db1896 Adds Support for filtering on schedulingStrategy in ECS#list_services (#2180) 2019-05-02 19:00:28 +01:00
Nick Venenga
d181897ec9
Add proper failure response to describe_clusters 2019-03-28 14:50:48 -04:00
Steve Pulec
77bf143f80
Merge pull request #1906 from jrstarke/1009
Support full ARN in update_container_instance_state calls
2018-12-28 19:57:57 -05:00
Steve Pulec
75f2c56a36 Fix ecs error response to be json. 2018-10-30 22:03:16 -04:00
Jamie Starke
090cad8c88 [1009] Converts ECS Instance full arn to instance_id for storage 2018-10-26 21:54:01 -07:00
Manuel Adarve
b75e78a3cd ECS: Added schedulingStrategy support
Co-authored-by: Jonas Gratz <jgratz@newstore.com>
2018-08-13 18:30:05 +02:00
Steve Pulec
bb6da93891
Merge pull request #1697 from spulec/ecs-tasks
Improve ECS update_service and describing tasks.
2018-06-24 20:39:16 -04:00
Steve Pulec
7c1fd0a2f1 Fix ECS update_service and describing tasks. 2018-06-24 20:13:39 -04:00
Flavio Ferrara
5298b221b5 Add support for creating ECS services with Load Balancer 2018-06-06 09:50:03 +01:00
Steve Pulec
080e3c5f5d
Merge pull request #1537 from william-richard/cloudformation-ecs-cluster-name-optional
If Properies isn't set, cloudformation will just use default values
2018-04-12 18:52:16 -04:00
Steve Pulec
97708fdbed
Merge pull request #1551 from william-richard/add-physical-resource-id-to-ecs-task-definition
Add physical_resource_id to ECS task definition
2018-04-12 18:48:43 -04:00
William Richard
1f46543ae2
ECS CPU, memory hard limits and host ports are all optional.
http://boto3.readthedocs.io/en/latest/reference/services/ecs.html#ECS.Client.register_task_definition
2018-04-11 17:20:58 -04:00
William Richard
4636a2afc3
Add physical_resource_id to ECS task definition 2018-04-04 15:15:22 -04:00
William Richard
0ed388b4b8
If Properies isn't set, cloudformation will just use default values 2018-03-26 14:15:16 -04:00
Jessie Nadler
04c5198a0c Add default ecs attributes and format in response obj (#1346)
* Initialize EC2ContainerServiceBackend and ContainerInstance objects with region_name

* Initialize ContainerInstance with default attributes
  * These attributes are automatically applied by ECS when a container is registered
  * Docs: http://docs.aws.amazon.com/AmazonECS/latest/developerguide/task-placement-constraints.html#attributes

* Format container_instance.attributes for response_object

* Python3

* Only use available ECS regions for ecs_backends

* Sort dictionaries on key='name' using lambda

* Sort all dicts in tests using lambda
2017-11-17 18:25:08 +00:00
Terry Cain
6e28c58e26 Added ecs attributes methods 2017-10-28 19:18:39 +01:00
Tom Elliff
a6c38913a7 Add more tests for task count of container instance 2017-10-13 09:37:39 +01:00
Tom Elliff
51afd54229 Fix runningTasksCount ECS container instance attribute
ECS container instances have attributes of 'runningTasksCount' and 'pendingTasksCount'.
See Boto3 docs here: http://boto3.readthedocs.io/en/latest/reference/services/ecs.html#ECS.Client.describe_container_instances
REST API docs here: http://docs.aws.amazon.com/AmazonECS/latest/APIReference/API_DescribeContainerInstances.html#API_DescribeContainerInstances_ResponseSyntax
2017-10-12 13:26:19 +01:00
Steve Pulec
df84675ae6 Merge pull request #897 from gjtempleton/TaskDraining
ContainerInstance deregistration
2017-04-15 23:47:47 -04:00
Steve Pulec
a83a235637 Merge pull request #903 from mvantellingen/ecs-deployments
Add deployments to the ecs services (describe_services)
2017-04-15 23:46:02 -04:00
Michael van Tellingen
0ae6e404d0 Add deployments to the ecs services (describe_services) 2017-04-14 18:40:47 +02:00
Michael van Tellingen
18ed73292c Return the revision in ecs.register_task_definition
This matches boto, see
http://boto3.readthedocs.io/en/latest/reference/services/ecs.html#ECS.Client.register_task_definition
2017-04-14 18:16:24 +02:00
GuyTempleton
acb6c3ce01
Implement container instance deregistration 2017-04-13 17:46:15 +01:00
GuyTempleton
880f3fb950
Container Instance Resource implementation 2017-04-12 13:30:32 +01:00
Steve Pulec
3b4ef2cf15 Merge in master. 2017-03-05 09:58:39 -05:00
Guy Templeton
7d75c3ba18 Feat: ECS container status updating (#831)
* Uptick boto3 version to version supporting ECS container instance state changes

* Add initial status update

* Only place tasks on active instances

* PEP8 cleanup
2017-03-04 22:30:36 -05:00
Steve Pulec
f37bad0e00 Lints. 2017-02-23 21:37:43 -05:00
Hugo Lopes Tavares
b5ff3345be Add service ARNs support to the DescribeServices ECS API (#796) 2016-12-20 10:37:49 -05:00
Hugo Lopes Tavares
0115267f2a Add ECS CloudFormation support (#795)
* Add cloudformation support to AWS::ECS::Cluster

* Add CloudFormation support to AWS::ECS::TaskDefinition

* Add CloudFormation support to AWS::ECS::Service

* Add support to update AWS::ECS::Cluster through CloudFormation

* Fix Cluster.update_from_cloudformation_json to return original_resource if nothing changed

* Implement TaskDefinition.update_from_cloudformation_json

* Implement Service.update_from_cloudformation_json
2016-12-20 10:37:18 -05:00
Paul Cieslar
ee8e72766a Support for ecs describe_task_definition (#777)
* describe_task_definition support

* Refactor fetch_task_definition

* Add ECS Descriptors  (#772)

* Add support for "DescribeServices" in ecs mock

* Add support for "DescribeTaskDefinition" in ecs

* Let ecs responses handle baseobject for services

* Update Cloudformation/parsing#load_parameters to split commadelimitedlists into lists (#774)

* Fix JSON dump error in ecs.update_service with task_definition (#775)

* Fix s3bucketpath handling for IP based requests (#765)

* check HTTP header for IPv4 or IPv6 addresses and default to path based S3

* improved IPv4 and IPv6 checking with optional ports

* typo

* Freezetime.

* Add S3 ACL for aws-exec-read. Closes #740.

* Fixed time formatting in ec2/models.py (#778)

* Fixed time formatting in ec2/models.py

* Used freezegun on test that was failing due to time progression causing timestamp differences.

* rename duplicate rds/models db_instance_identifier to physical_resource_id (#776)

* rename duplicate db_instance_identifier to physical_resource_id

* Update create_from_cloudformation_json to use db_source_identifier str

* Update code to be more conventional.

* describe_task_definition support

* Refactor fetch_task_definition
2016-12-03 18:12:22 -05:00
Pior Bastida
09ca1c4388 Fix JSON dump error in ecs.update_service with task_definition (#775) 2016-11-23 19:01:48 -06:00
Robert Sheehy
17584e9aa4 Add ECS Descriptors (#772)
* Add support for "DescribeServices" in ecs mock

* Add support for "DescribeTaskDefinition" in ecs

* Let ecs responses handle baseobject for services
2016-11-23 18:56:12 -06:00
Georges Chaudy
dc75e5d6ad add ecs tasks methods 2016-08-30 00:26:13 +01:00
Riccardo M. Cefala
27095638d9 map() returns a map object iterable instead of a list in python3 2016-06-15 10:41:34 +02:00
Riccardo M. Cefala
137791e960 add ECS describe_container_instances 2016-06-14 17:58:11 +02:00
Riccardo M. Cefala
262bf07608 add tests for ECS ContainerInstance list and register actions 2016-06-11 12:52:53 +02:00
jbencook
3737b39e15 create, list, delete for cluster, task and service 2015-12-17 17:13:00 +00:00