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 (#51572)

This commit is contained in:
Alex Stephen 2019-01-31 14:03:50 -08:00 committed by ansibot
parent 27c5e38e10
commit d1a9ba5cc0
19 changed files with 21 additions and 21 deletions

View file

@ -379,7 +379,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, 'compute#operation') op_result = fetch_resource(module, op_uri, 'compute#operation', False)
status = navigate_hash(op_result, ['status']) status = navigate_hash(op_result, ['status'])
return op_result return op_result

View file

@ -42,7 +42,7 @@ requirements:
options: options:
filters: filters:
description: description:
- A list of filter value pairs. Available filters are listed here U(U(https://cloud.google.com/sdk/gcloud/reference/topic/filters).) - A list of filter value pairs. Available filters are listed here U(https://cloud.google.com/sdk/gcloud/reference/topic/filters.)
- Each additional filter in the list will act be added as an AND condition (filter1 - Each additional filter in the list will act be added as an AND condition (filter1
and filter2) . and filter2) .
region: region:

View file

@ -318,7 +318,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, 'compute#operation') op_result = fetch_resource(module, op_uri, 'compute#operation', False)
status = navigate_hash(op_result, ['status']) status = navigate_hash(op_result, ['status'])
return op_result return op_result

View file

@ -42,7 +42,7 @@ requirements:
options: options:
filters: filters:
description: description:
- A list of filter value pairs. Available filters are listed here U(U(https://cloud.google.com/sdk/gcloud/reference/topic/filters).) - A list of filter value pairs. Available filters are listed here U(https://cloud.google.com/sdk/gcloud/reference/topic/filters.)
- Each additional filter in the list will act be added as an AND condition (filter1 - Each additional filter in the list will act be added as an AND condition (filter1
and filter2) . and filter2) .
extends_documentation_fragment: gcp extends_documentation_fragment: gcp

View file

@ -856,7 +856,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, 'compute#operation') op_result = fetch_resource(module, op_uri, 'compute#operation', False)
status = navigate_hash(op_result, ['status']) status = navigate_hash(op_result, ['status'])
return op_result return op_result

View file

@ -42,7 +42,7 @@ requirements:
options: options:
filters: filters:
description: description:
- A list of filter value pairs. Available filters are listed here U(U(https://cloud.google.com/sdk/gcloud/reference/topic/filters).) - A list of filter value pairs. Available filters are listed here U(https://cloud.google.com/sdk/gcloud/reference/topic/filters.)
- Each additional filter in the list will act be added as an AND condition (filter1 - Each additional filter in the list will act be added as an AND condition (filter1
and filter2) . and filter2) .
extends_documentation_fragment: gcp extends_documentation_fragment: gcp

View file

@ -638,7 +638,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, 'compute#operation') op_result = fetch_resource(module, op_uri, 'compute#operation', False)
status = navigate_hash(op_result, ['status']) status = navigate_hash(op_result, ['status'])
return op_result return op_result

View file

@ -42,7 +42,7 @@ requirements:
options: options:
filters: filters:
description: description:
- A list of filter value pairs. Available filters are listed here U(U(https://cloud.google.com/sdk/gcloud/reference/topic/filters).) - A list of filter value pairs. Available filters are listed here U(https://cloud.google.com/sdk/gcloud/reference/topic/filters.)
- Each additional filter in the list will act be added as an AND condition (filter1 - Each additional filter in the list will act be added as an AND condition (filter1
and filter2) . and filter2) .
zone: zone:

View file

@ -624,7 +624,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, 'compute#operation') op_result = fetch_resource(module, op_uri, 'compute#operation', False)
status = navigate_hash(op_result, ['status']) status = navigate_hash(op_result, ['status'])
return op_result return op_result
@ -669,7 +669,7 @@ class FirewallAllowedArray(object):
return remove_nones_from_dict({u'IPProtocol': item.get('ip_protocol'), u'ports': item.get('ports')}) return remove_nones_from_dict({u'IPProtocol': item.get('ip_protocol'), u'ports': item.get('ports')})
def _response_from_item(self, item): def _response_from_item(self, item):
return remove_nones_from_dict({u'IPProtocol': item.get(u'ip_protocol'), u'ports': item.get(u'ports')}) return remove_nones_from_dict({u'IPProtocol': item.get(u'IPProtocol'), u'ports': item.get(u'ports')})
class FirewallDeniedArray(object): class FirewallDeniedArray(object):
@ -696,7 +696,7 @@ class FirewallDeniedArray(object):
return remove_nones_from_dict({u'IPProtocol': item.get('ip_protocol'), u'ports': item.get('ports')}) return remove_nones_from_dict({u'IPProtocol': item.get('ip_protocol'), u'ports': item.get('ports')})
def _response_from_item(self, item): def _response_from_item(self, item):
return remove_nones_from_dict({u'IPProtocol': item.get(u'ip_protocol'), u'ports': item.get(u'ports')}) return remove_nones_from_dict({u'IPProtocol': item.get(u'IPProtocol'), u'ports': item.get(u'ports')})
if __name__ == '__main__': if __name__ == '__main__':

View file

@ -42,7 +42,7 @@ requirements:
options: options:
filters: filters:
description: description:
- A list of filter value pairs. Available filters are listed here U(U(https://cloud.google.com/sdk/gcloud/reference/topic/filters).) - A list of filter value pairs. Available filters are listed here U(https://cloud.google.com/sdk/gcloud/reference/topic/filters.)
- Each additional filter in the list will act be added as an AND condition (filter1 - Each additional filter in the list will act be added as an AND condition (filter1
and filter2) . and filter2) .
extends_documentation_fragment: gcp extends_documentation_fragment: gcp

View file

@ -607,7 +607,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, 'compute#operation') op_result = fetch_resource(module, op_uri, 'compute#operation', False)
status = navigate_hash(op_result, ['status']) status = navigate_hash(op_result, ['status'])
return op_result return op_result

View file

@ -42,7 +42,7 @@ requirements:
options: options:
filters: filters:
description: description:
- A list of filter value pairs. Available filters are listed here U(U(https://cloud.google.com/sdk/gcloud/reference/topic/filters).) - A list of filter value pairs. Available filters are listed here U(https://cloud.google.com/sdk/gcloud/reference/topic/filters.)
- Each additional filter in the list will act be added as an AND condition (filter1 - Each additional filter in the list will act be added as an AND condition (filter1
and filter2) . and filter2) .
region: region:

View file

@ -344,7 +344,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, 'compute#operation') op_result = fetch_resource(module, op_uri, 'compute#operation', False)
status = navigate_hash(op_result, ['status']) status = navigate_hash(op_result, ['status'])
return op_result return op_result

View file

@ -42,7 +42,7 @@ requirements:
options: options:
filters: filters:
description: description:
- A list of filter value pairs. Available filters are listed here U(U(https://cloud.google.com/sdk/gcloud/reference/topic/filters).) - A list of filter value pairs. Available filters are listed here U(https://cloud.google.com/sdk/gcloud/reference/topic/filters.)
- Each additional filter in the list will act be added as an AND condition (filter1 - Each additional filter in the list will act be added as an AND condition (filter1
and filter2) . and filter2) .
extends_documentation_fragment: gcp extends_documentation_fragment: gcp

View file

@ -602,7 +602,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, 'compute#operation') op_result = fetch_resource(module, op_uri, 'compute#operation', False)
status = navigate_hash(op_result, ['status']) status = navigate_hash(op_result, ['status'])
return op_result return op_result

View file

@ -42,7 +42,7 @@ requirements:
options: options:
filters: filters:
description: description:
- A list of filter value pairs. Available filters are listed here U(U(https://cloud.google.com/sdk/gcloud/reference/topic/filters).) - A list of filter value pairs. Available filters are listed here U(https://cloud.google.com/sdk/gcloud/reference/topic/filters.)
- Each additional filter in the list will act be added as an AND condition (filter1 - Each additional filter in the list will act be added as an AND condition (filter1
and filter2) . and filter2) .
extends_documentation_fragment: gcp extends_documentation_fragment: gcp

View file

@ -747,7 +747,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, 'compute#operation') op_result = fetch_resource(module, op_uri, 'compute#operation', False)
status = navigate_hash(op_result, ['status']) status = navigate_hash(op_result, ['status'])
return op_result return op_result

View file

@ -42,7 +42,7 @@ requirements:
options: options:
filters: filters:
description: description:
- A list of filter value pairs. Available filters are listed here U(U(https://cloud.google.com/sdk/gcloud/reference/topic/filters).) - A list of filter value pairs. Available filters are listed here U(https://cloud.google.com/sdk/gcloud/reference/topic/filters.)
- Each additional filter in the list will act be added as an AND condition (filter1 - Each additional filter in the list will act be added as an AND condition (filter1
and filter2) . and filter2) .
extends_documentation_fragment: gcp extends_documentation_fragment: gcp

View file

@ -387,7 +387,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, 'compute#operation') op_result = fetch_resource(module, op_uri, 'compute#operation', False)
status = navigate_hash(op_result, ['status']) status = navigate_hash(op_result, ['status'])
return op_result return op_result