mirror of
https://github.com/ansible-collections/google.cloud.git
synced 2025-04-06 19:00:27 -07:00
SQL Databases (#12)
This commit is contained in:
parent
6667a7820b
commit
c9fedfb626
1 changed files with 7 additions and 0 deletions
|
@ -726,6 +726,13 @@ def return_if_object(module, response, kind, allow_not_found=False):
|
|||
|
||||
return result
|
||||
|
||||
if navigate_hash(result, ['error', 'errors']):
|
||||
module.fail_json(msg=navigate_hash(result, ['error', 'errors']))
|
||||
if result['kind'] != kind:
|
||||
module.fail_json(msg="Incorrect result: {kind}".format(**result))
|
||||
|
||||
return result
|
||||
|
||||
|
||||
def is_different(module, response):
|
||||
request = resource_to_request(module)
|
||||
|
|
Loading…
Add table
Reference in a new issue