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
This commit is contained in:
Michael van Tellingen 2017-04-14 18:16:24 +02:00
parent 34c711189f
commit 18ed73292c
2 changed files with 2 additions and 0 deletions

View File

@ -89,6 +89,7 @@ class TaskDefinition(BaseObject):
def __init__(self, family, revision, container_definitions, volumes=None):
self.family = family
self.revision = revision
self.arn = 'arn:aws:ecs:us-east-1:012345678910:task-definition/{0}:{1}'.format(
family, revision)
self.container_definitions = container_definitions

View File

@ -86,6 +86,7 @@ def test_register_task_definition():
]
)
type(response['taskDefinition']).should.be(dict)
response['taskDefinition']['revision'].should.equal(1)
response['taskDefinition']['taskDefinitionArn'].should.equal(
'arn:aws:ecs:us-east-1:012345678910:task-definition/test_ecs_task:1')
response['taskDefinition']['containerDefinitions'][