1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2024-09-14 20:13:21 +02:00

Bug fixes for GCP modules (#51576)

This commit is contained in:
Alex Stephen 2019-01-31 14:02:56 -08:00 committed by ansibot
parent 7502df4435
commit 6a79468acf
5 changed files with 9 additions and 9 deletions

View file

@ -789,7 +789,7 @@ def wait_for_completion(status, op_result, module):
while status != 'DONE': while status != 'DONE':
raise_if_errors(op_result, ['error', 'errors'], module) raise_if_errors(op_result, ['error', 'errors'], module)
time.sleep(1.0) time.sleep(1.0)
op_result = fetch_resource(module, op_uri, 'sql#operation') op_result = fetch_resource(module, op_uri, 'sql#operation', False)
status = navigate_hash(op_result, ['status']) status = navigate_hash(op_result, ['status'])
return op_result return op_result

View file

@ -335,7 +335,7 @@ def wait_for_completion(status, op_result, module):
while status != 'DONE': while status != 'DONE':
raise_if_errors(op_result, ['error', 'errors'], module) raise_if_errors(op_result, ['error', 'errors'], module)
time.sleep(1.0) time.sleep(1.0)
op_result = fetch_resource(module, op_uri, 'sql#operation') op_result = fetch_resource(module, op_uri, 'sql#operation', False)
status = navigate_hash(op_result, ['status']) status = navigate_hash(op_result, ['status'])
return op_result return op_result

View file

@ -1281,7 +1281,7 @@ class BucketCondition(object):
def from_response(self): def from_response(self):
return remove_nones_from_dict( return remove_nones_from_dict(
{ {
u'age': self.request.get(u'ageDays'), u'age': self.request.get(u'age'),
u'createdBefore': self.request.get(u'createdBefore'), u'createdBefore': self.request.get(u'createdBefore'),
u'isLive': self.request.get(u'isLive'), u'isLive': self.request.get(u'isLive'),
u'matchesStorageClass': self.request.get(u'matchesStorageClass'), u'matchesStorageClass': self.request.get(u'matchesStorageClass'),

View file

@ -117,7 +117,7 @@ EXAMPLES = '''
- name: create a bucket access control - name: create a bucket access control
gcp_storage_bucket_access_control: gcp_storage_bucket_access_control:
bucket: "{{ bucket }}" bucket: "test_object"
entity: user-alexstephen@google.com entity: user-alexstephen@google.com
role: WRITER role: WRITER
project: "test_project" project: "test_project"

View file

@ -23,7 +23,7 @@
register: bucket register: bucket
- name: delete a bucket access control - name: delete a bucket access control
gcp_storage_bucket_access_control: gcp_storage_bucket_access_control:
bucket: "{{ bucket }}" bucket: "{{ resource_name }}"
entity: user-alexstephen@google.com entity: user-alexstephen@google.com
role: WRITER role: WRITER
project: "{{ gcp_project }}" project: "{{ gcp_project }}"
@ -33,7 +33,7 @@
#---------------------------------------------------------- #----------------------------------------------------------
- name: create a bucket access control - name: create a bucket access control
gcp_storage_bucket_access_control: gcp_storage_bucket_access_control:
bucket: "{{ bucket }}" bucket: "{{ resource_name }}"
entity: user-alexstephen@google.com entity: user-alexstephen@google.com
role: WRITER role: WRITER
project: "{{ gcp_project }}" project: "{{ gcp_project }}"
@ -49,7 +49,7 @@
# ---------------------------------------------------------------------------- # ----------------------------------------------------------------------------
- name: create a bucket access control that already exists - name: create a bucket access control that already exists
gcp_storage_bucket_access_control: gcp_storage_bucket_access_control:
bucket: "{{ bucket }}" bucket: "{{ resource_name }}"
entity: user-alexstephen@google.com entity: user-alexstephen@google.com
role: WRITER role: WRITER
project: "{{ gcp_project }}" project: "{{ gcp_project }}"
@ -65,7 +65,7 @@
#---------------------------------------------------------- #----------------------------------------------------------
- name: delete a bucket access control - name: delete a bucket access control
gcp_storage_bucket_access_control: gcp_storage_bucket_access_control:
bucket: "{{ bucket }}" bucket: "{{ resource_name }}"
entity: user-alexstephen@google.com entity: user-alexstephen@google.com
role: WRITER role: WRITER
project: "{{ gcp_project }}" project: "{{ gcp_project }}"
@ -81,7 +81,7 @@
# ---------------------------------------------------------------------------- # ----------------------------------------------------------------------------
- name: delete a bucket access control that does not exist - name: delete a bucket access control that does not exist
gcp_storage_bucket_access_control: gcp_storage_bucket_access_control:
bucket: "{{ bucket }}" bucket: "{{ resource_name }}"
entity: user-alexstephen@google.com entity: user-alexstephen@google.com
role: WRITER role: WRITER
project: "{{ gcp_project }}" project: "{{ gcp_project }}"