Bug fixes for GCP modules (#60092)
This commit is contained in:
parent
de8d428157
commit
0234937ca3
20 changed files with 5 additions and 29 deletions
|
@ -49,7 +49,6 @@ EXAMPLES = '''
|
|||
project: test_project
|
||||
auth_kind: serviceaccount
|
||||
service_account_file: "/tmp/auth.pem"
|
||||
state: facts
|
||||
'''
|
||||
|
||||
RETURN = '''
|
||||
|
|
|
@ -49,7 +49,6 @@ EXAMPLES = '''
|
|||
project: test_project
|
||||
auth_kind: serviceaccount
|
||||
service_account_file: "/tmp/auth.pem"
|
||||
state: facts
|
||||
'''
|
||||
|
||||
RETURN = '''
|
||||
|
|
|
@ -55,7 +55,6 @@ EXAMPLES = '''
|
|||
project: test_project
|
||||
auth_kind: serviceaccount
|
||||
service_account_file: "/tmp/auth.pem"
|
||||
state: facts
|
||||
'''
|
||||
|
||||
RETURN = '''
|
||||
|
|
|
@ -49,7 +49,6 @@ EXAMPLES = '''
|
|||
project: test_project
|
||||
auth_kind: serviceaccount
|
||||
service_account_file: "/tmp/auth.pem"
|
||||
state: facts
|
||||
'''
|
||||
|
||||
RETURN = '''
|
||||
|
|
|
@ -49,7 +49,6 @@ EXAMPLES = '''
|
|||
project: test_project
|
||||
auth_kind: serviceaccount
|
||||
service_account_file: "/tmp/auth.pem"
|
||||
state: facts
|
||||
'''
|
||||
|
||||
RETURN = '''
|
||||
|
|
|
@ -186,8 +186,7 @@ def create(module, link):
|
|||
|
||||
|
||||
def update(module, link):
|
||||
delete(module, self_link(module))
|
||||
create(module, collection(module))
|
||||
module.fail_json(msg="Spanner objects can't be updated to ensure data safety")
|
||||
|
||||
|
||||
def delete(module, link):
|
||||
|
|
|
@ -60,7 +60,6 @@ EXAMPLES = '''
|
|||
project: test_project
|
||||
auth_kind: serviceaccount
|
||||
service_account_file: "/tmp/auth.pem"
|
||||
state: facts
|
||||
'''
|
||||
|
||||
RETURN = '''
|
||||
|
|
|
@ -202,8 +202,7 @@ def create(module, link):
|
|||
|
||||
|
||||
def update(module, link):
|
||||
auth = GcpSession(module, 'spanner')
|
||||
return wait_for_operation(module, auth.patch(link, resource_to_update(module)))
|
||||
module.fail_json(msg="Spanner objects can't be updated to ensure data safety")
|
||||
|
||||
|
||||
def delete(module, link):
|
||||
|
|
|
@ -49,7 +49,6 @@ EXAMPLES = '''
|
|||
project: test_project
|
||||
auth_kind: serviceaccount
|
||||
service_account_file: "/tmp/auth.pem"
|
||||
state: facts
|
||||
'''
|
||||
|
||||
RETURN = '''
|
||||
|
|
|
@ -187,8 +187,7 @@ def create(module, link, kind):
|
|||
|
||||
|
||||
def update(module, link, kind):
|
||||
auth = GcpSession(module, 'sql')
|
||||
return wait_for_operation(module, auth.put(link, resource_to_request(module)))
|
||||
module.fail_json(msg="SQL objects can't be updated to ensure data safety")
|
||||
|
||||
|
||||
def delete(module, link, kind):
|
||||
|
|
|
@ -55,7 +55,6 @@ EXAMPLES = '''
|
|||
project: test_project
|
||||
auth_kind: serviceaccount
|
||||
service_account_file: "/tmp/auth.pem"
|
||||
state: facts
|
||||
'''
|
||||
|
||||
RETURN = '''
|
||||
|
|
|
@ -763,8 +763,7 @@ def create(module, link, kind):
|
|||
|
||||
|
||||
def update(module, link, kind, fetch):
|
||||
auth = GcpSession(module, 'sql')
|
||||
return wait_for_operation(module, auth.put(link, resource_to_request(module)))
|
||||
module.fail_json(msg="SQL objects can't be updated to ensure data safety")
|
||||
|
||||
|
||||
def delete(module, link, kind, fetch):
|
||||
|
|
|
@ -49,7 +49,6 @@ EXAMPLES = '''
|
|||
project: test_project
|
||||
auth_kind: serviceaccount
|
||||
service_account_file: "/tmp/auth.pem"
|
||||
state: facts
|
||||
'''
|
||||
|
||||
RETURN = '''
|
||||
|
|
|
@ -215,7 +215,7 @@ def resource_to_request(module):
|
|||
|
||||
|
||||
def unwrap_resource_filter(module):
|
||||
return {'host': module.params['host'], 'name': module.params['name']}
|
||||
return {'name': module.params['name'], 'host': module.params['host']}
|
||||
|
||||
|
||||
def unwrap_resource(result, module):
|
||||
|
|
|
@ -60,7 +60,6 @@ EXAMPLES = '''
|
|||
project: test_project
|
||||
auth_kind: serviceaccount
|
||||
service_account_file: "/tmp/auth.pem"
|
||||
state: facts
|
||||
'''
|
||||
|
||||
RETURN = '''
|
||||
|
|
|
@ -52,7 +52,6 @@
|
|||
assert:
|
||||
that:
|
||||
- result.changed == true
|
||||
- "result.kind == 'sql#database'"
|
||||
- name: verify that database was created
|
||||
gcp_sql_database_facts:
|
||||
instance: "{{ instance }}"
|
||||
|
@ -81,7 +80,6 @@
|
|||
assert:
|
||||
that:
|
||||
- result.changed == false
|
||||
- "result.kind == 'sql#database'"
|
||||
#----------------------------------------------------------
|
||||
- name: delete a database
|
||||
gcp_sql_database:
|
||||
|
|
|
@ -47,7 +47,6 @@
|
|||
assert:
|
||||
that:
|
||||
- result.changed == true
|
||||
- "result.kind == 'sql#instance'"
|
||||
- name: verify that instance was created
|
||||
gcp_sql_instance_facts:
|
||||
project: "{{ gcp_project }}"
|
||||
|
@ -80,7 +79,6 @@
|
|||
assert:
|
||||
that:
|
||||
- result.changed == false
|
||||
- "result.kind == 'sql#instance'"
|
||||
#----------------------------------------------------------
|
||||
- name: delete a instance
|
||||
gcp_sql_instance:
|
||||
|
|
|
@ -54,7 +54,6 @@
|
|||
assert:
|
||||
that:
|
||||
- result.changed == true
|
||||
- "result.kind == 'sql#user'"
|
||||
- name: verify that user was created
|
||||
gcp_sql_user_facts:
|
||||
instance: "{{ instance }}"
|
||||
|
@ -84,7 +83,6 @@
|
|||
assert:
|
||||
that:
|
||||
- result.changed == false
|
||||
- "result.kind == 'sql#user'"
|
||||
#----------------------------------------------------------
|
||||
- name: delete a user
|
||||
gcp_sql_user:
|
||||
|
|
|
@ -33,7 +33,6 @@
|
|||
assert:
|
||||
that:
|
||||
- result.changed == true
|
||||
- "result.kind == 'storage#bucket'"
|
||||
# ----------------------------------------------------------------------------
|
||||
- name: create a bucket that already exists
|
||||
gcp_storage_bucket:
|
||||
|
@ -47,7 +46,6 @@
|
|||
assert:
|
||||
that:
|
||||
- result.changed == false
|
||||
- "result.kind == 'storage#bucket'"
|
||||
#----------------------------------------------------------
|
||||
- name: delete a bucket
|
||||
gcp_storage_bucket:
|
||||
|
|
|
@ -45,7 +45,6 @@
|
|||
assert:
|
||||
that:
|
||||
- result.changed == true
|
||||
- "result.kind == 'storage#bucketAccessControl'"
|
||||
# ----------------------------------------------------------------------------
|
||||
- name: create a bucket access control that already exists
|
||||
gcp_storage_bucket_access_control:
|
||||
|
@ -61,7 +60,6 @@
|
|||
assert:
|
||||
that:
|
||||
- result.changed == false
|
||||
- "result.kind == 'storage#bucketAccessControl'"
|
||||
#----------------------------------------------------------
|
||||
- name: delete a bucket access control
|
||||
gcp_storage_bucket_access_control:
|
||||
|
|
Loading…
Reference in a new issue