Commit Graph

65 Commits

Author SHA1 Message Date
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
Brian Pandola
ea19466c38
Fix missing properties when ecs:TaskDefinition created via CloudFormation (#3378)
There's a larger problem here that needs a more generalized solution,
but this solves the immediate issue with a minimum amount of code.

Closes #3171
2020-10-12 20:53:30 +01:00
Brian Pandola
c54f182ca1
Implement additional filters for ecs.ListTasks (#3376)
Closes #1785
2020-10-10 20:02:08 +01:00
Anton Grübel
349b9a990d
Add registeredAt to ecs container instance (#3358) 2020-10-05 15:39:59 +01:00
Bert Blommers
0ab21f62a8 Linting 2020-09-13 19:42:38 +01:00
Bert Blommers
db1d7123f6 List dependencies for services - add integration test to verify 2020-09-13 16:08:23 +01:00
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