From 7c66723a09668c9f42b0959c7c42e8eb1e566533 Mon Sep 17 00:00:00 2001 From: Fabian Fuelling Date: Wed, 20 Sep 2017 18:38:04 +0200 Subject: [PATCH 1/2] Allow taskRoleArn to be empty --- ecs_deploy/ecs.py | 10 +++++----- tests/test_ecs.py | 1 - 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/ecs_deploy/ecs.py b/ecs_deploy/ecs.py index 466d5df..6b47673 100644 --- a/ecs_deploy/ecs.py +++ b/ecs_deploy/ecs.py @@ -45,7 +45,7 @@ def register_task_definition(self, family, containers, volumes, role_arn, family=family, containerDefinitions=containers, volumes=volumes, - taskRoleArn=role_arn or u'', + taskRoleArn=role_arn, **additional_properties ) @@ -140,16 +140,16 @@ def get_warnings(self, since=None, until=None): class EcsTaskDefinition(object): def __init__(self, containerDefinitions, volumes, family, revision, - taskRoleArn, status, taskDefinitionArn, requiresAttributes, - **kwargs): + status, taskDefinitionArn, requiresAttributes, + taskRoleArn=None, **kwargs): self.containers = containerDefinitions self.volumes = volumes self.family = family self.revision = revision - self.role_arn = taskRoleArn - self.arn = taskDefinitionArn self.status = status + self.arn = taskDefinitionArn self.requires_attributes = requiresAttributes + self.role_arn = taskRoleArn or u'' self.additional_properties = kwargs self._diff = [] diff --git a/tests/test_ecs.py b/tests/test_ecs.py index dd48336..eeb8e41 100644 --- a/tests/test_ecs.py +++ b/tests/test_ecs.py @@ -59,7 +59,6 @@ u'family': TASK_DEFINITION_FAMILY_2, u'revision': TASK_DEFINITION_REVISION_2, u'volumes': deepcopy(TASK_DEFINITION_VOLUMES_2), - u'taskRoleArn': '', u'containerDefinitions': deepcopy(TASK_DEFINITION_CONTAINERS_2), u'status': u'active', u'requiresAttributes': {}, From d579d6fa3db74ce677376a073b5587d26f4e2941 Mon Sep 17 00:00:00 2001 From: Fabian Fuelling Date: Wed, 20 Sep 2017 18:38:45 +0200 Subject: [PATCH 2/2] Dump version to 1.3.1 --- setup.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/setup.py b/setup.py index d02a3e9..e1c1d4e 100644 --- a/setup.py +++ b/setup.py @@ -7,9 +7,9 @@ setup( name='ecs-deploy', - version='1.3.0', + version='1.3.1', url='https://github.com/fabfuel/ecs-deploy', - download_url='https://github.com/fabfuel/ecs-deploy/archive/1.3.0.tar.gz', + download_url='https://github.com/fabfuel/ecs-deploy/archive/1.3.1.tar.gz', license='BSD', author='Fabian Fuelling', author_email='pypi@fabfuel.de',