mirror of
https://github.com/ansible-collections/google.cloud.git
synced 2025-04-18 17:01:22 -07:00
Formatting changes related to upstream code generator cleanup. (#162)
Signed-off-by: Modular Magician <magic-modules@google.com>
This commit is contained in:
parent
f2746afceb
commit
99d5da337c
94 changed files with 1515 additions and 1845 deletions
|
@ -198,7 +198,7 @@ def main():
|
|||
description=dict(type='str'),
|
||||
name=dict(required=True, type='str'),
|
||||
proxy_header=dict(type='str', choices=['NONE', 'PROXY_V1']),
|
||||
service=dict(required=True)
|
||||
service=dict(required=True),
|
||||
)
|
||||
)
|
||||
|
||||
|
@ -239,8 +239,7 @@ def create(module, link, kind):
|
|||
|
||||
|
||||
def update(module, link, kind, fetch):
|
||||
update_fields(module, resource_to_request(module),
|
||||
response_to_hash(module, fetch))
|
||||
update_fields(module, resource_to_request(module), response_to_hash(module, fetch))
|
||||
return fetch_resource(module, self_link(module), kind)
|
||||
|
||||
|
||||
|
@ -254,26 +253,16 @@ def update_fields(module, request, response):
|
|||
def proxy_header_update(module, request, response):
|
||||
auth = GcpSession(module, 'compute')
|
||||
auth.post(
|
||||
''.join([
|
||||
"https://www.googleapis.com/compute/v1/",
|
||||
"projects/{project}/global/targetTcpProxies/{name}/setProxyHeader"
|
||||
]).format(**module.params),
|
||||
{
|
||||
u'proxyHeader': module.params.get('proxy_header')
|
||||
}
|
||||
''.join(["https://www.googleapis.com/compute/v1/", "projects/{project}/global/targetTcpProxies/{name}/setProxyHeader"]).format(**module.params),
|
||||
{u'proxyHeader': module.params.get('proxy_header')},
|
||||
)
|
||||
|
||||
|
||||
def service_update(module, request, response):
|
||||
auth = GcpSession(module, 'compute')
|
||||
auth.post(
|
||||
''.join([
|
||||
"https://www.googleapis.com/compute/v1/",
|
||||
"projects/{project}/global/targetTcpProxies/{name}/setBackendService"
|
||||
]).format(**module.params),
|
||||
{
|
||||
u'service': replace_resource_dict(module.params.get(u'service', {}), 'selfLink')
|
||||
}
|
||||
''.join(["https://www.googleapis.com/compute/v1/", "projects/{project}/global/targetTcpProxies/{name}/setBackendService"]).format(**module.params),
|
||||
{u'service': replace_resource_dict(module.params.get(u'service', {}), 'selfLink')},
|
||||
)
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue