s3_bucket: accept NetApp StorageGRID create_bucket response. (#67462)
This commit is contained in:
parent
c5ec0fcb34
commit
d317cc71c7
2 changed files with 6 additions and 4 deletions
|
@ -0,0 +1,2 @@
|
||||||
|
bugfixes:
|
||||||
|
- s3_bucket - Accept XNotImplemented response to support NetApp StorageGRID.
|
|
@ -24,9 +24,9 @@ ANSIBLE_METADATA = {'metadata_version': '1.1',
|
||||||
DOCUMENTATION = '''
|
DOCUMENTATION = '''
|
||||||
---
|
---
|
||||||
module: s3_bucket
|
module: s3_bucket
|
||||||
short_description: Manage S3 buckets in AWS, DigitalOcean, Ceph, Walrus and FakeS3
|
short_description: Manage S3 buckets in AWS, DigitalOcean, Ceph, Walrus, FakeS3 and StorageGRID
|
||||||
description:
|
description:
|
||||||
- Manage S3 buckets in AWS, DigitalOcean, Ceph, Walrus and FakeS3
|
- Manage S3 buckets in AWS, DigitalOcean, Ceph, Walrus, FakeS3 and StorageGRID
|
||||||
version_added: "2.0"
|
version_added: "2.0"
|
||||||
requirements: [ boto3 ]
|
requirements: [ boto3 ]
|
||||||
author: "Rob White (@wimnat)"
|
author: "Rob White (@wimnat)"
|
||||||
|
@ -247,7 +247,7 @@ def create_or_update_bucket(s3_client, module, location):
|
||||||
except BotoCoreError as exp:
|
except BotoCoreError as exp:
|
||||||
module.fail_json_aws(exp, msg="Failed to get bucket request payment")
|
module.fail_json_aws(exp, msg="Failed to get bucket request payment")
|
||||||
except ClientError as exp:
|
except ClientError as exp:
|
||||||
if exp.response['Error']['Code'] != 'NotImplemented' or requester_pays:
|
if exp.response['Error']['Code'] not in ('NotImplemented', 'XNotImplemented') or requester_pays:
|
||||||
module.fail_json_aws(exp, msg="Failed to get bucket request payment")
|
module.fail_json_aws(exp, msg="Failed to get bucket request payment")
|
||||||
else:
|
else:
|
||||||
if requester_pays:
|
if requester_pays:
|
||||||
|
@ -305,7 +305,7 @@ def create_or_update_bucket(s3_client, module, location):
|
||||||
except BotoCoreError as exp:
|
except BotoCoreError as exp:
|
||||||
module.fail_json_aws(exp, msg="Failed to get bucket tags")
|
module.fail_json_aws(exp, msg="Failed to get bucket tags")
|
||||||
except ClientError as exp:
|
except ClientError as exp:
|
||||||
if exp.response['Error']['Code'] != 'NotImplemented' or tags is not None:
|
if exp.response['Error']['Code'] not in ('NotImplemented', 'XNotImplemented') or tags is not None:
|
||||||
module.fail_json_aws(exp, msg="Failed to get bucket tags")
|
module.fail_json_aws(exp, msg="Failed to get bucket tags")
|
||||||
else:
|
else:
|
||||||
if tags is not None:
|
if tags is not None:
|
||||||
|
|
Loading…
Reference in a new issue