From 4524cc1e27b7fffc65e86003ef47320f1cfd2677 Mon Sep 17 00:00:00 2001 From: Mark Chance Date: Thu, 10 Sep 2015 08:22:40 -0600 Subject: [PATCH] update version, fix fail msgs --- cloud/amazon/ecs_service.py | 6 +++--- cloud/amazon/ecs_service_facts.py | 6 ++---- 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/cloud/amazon/ecs_service.py b/cloud/amazon/ecs_service.py index a946fbaf287..cd2b046e1c1 100644 --- a/cloud/amazon/ecs_service.py +++ b/cloud/amazon/ecs_service.py @@ -25,7 +25,7 @@ notes: for the ecs service, ecs.amazonaws.com) dependecies: - An IAM role must have been created -version_added: "0.9" +version_added: "2.0" options: ''' @@ -92,7 +92,7 @@ class EcsServiceManager: module.fail_json(msg="Region must be specified as a parameter, in EC2_REGION or AWS_REGION environment variables or in boto configuration file") self.ecs = boto3_conn(module, conn_type='client', resource='ecs', region=region, endpoint=ec2_url, **aws_connect_kwargs) except boto.exception.NoAuthHandlerFound, e: - self.module.fail_json(msg=str(e)) + self.module.fail_json(msg="Can't authorize connection - "+str(e)) # def list_clusters(self): # return self.client.list_clusters() @@ -190,7 +190,7 @@ def main(): try: existing = service_mgr.describe_service(module.params['cluster'], module.params['name']) except Exception, e: - module.fail_json(msg=str(e)) + module.fail_json(msg="Exception describing service '"+module.params['name']+"' in cluster '"+module.params['cluster']+"': "+str(e)) results = dict(changed=False ) if module.params['state'] == 'present': diff --git a/cloud/amazon/ecs_service_facts.py b/cloud/amazon/ecs_service_facts.py index 08c21ee3213..87d568de800 100644 --- a/cloud/amazon/ecs_service_facts.py +++ b/cloud/amazon/ecs_service_facts.py @@ -20,7 +20,7 @@ module: ecs_service_facts short_description: list or describe services in ecs description: - Lists or describes services in ecs. -version_added: "0.9" +version_added: "2.0" options: details: description: @@ -28,13 +28,11 @@ options: required: false default: 'false' choices: ['true', 'false'] - version_added: 1.9 cluster: description: - The cluster ARNS in which to list the services. required: false default: 'default' - version_added: 1.9 ''' EXAMPLES = ''' @@ -103,7 +101,7 @@ class EcsServiceManager: module.fail_json(msg="Region must be specified as a parameter, in EC2_REGION or AWS_REGION environment variables or in boto configuration file") self.ecs = boto3_conn(module, conn_type='client', resource='ecs', region=region, endpoint=ec2_url, **aws_connect_kwargs) except boto.exception.NoAuthHandlerFound, e: - self.module.fail_json(msg=str(e)) + self.module.fail_json(msg="Can't authorize connection - "+str(e)) # def list_clusters(self): # return self.client.list_clusters()