def update(module, link, kind):
    auth = GcpSession(module, 'compute')
    return wait_for_operation(module,
                              auth.patch(link, resource_to_request(module)))
Esempio n. 2
0
def allow_global_access_update(module, request, response):
    auth = GcpSession(module, 'compute')
    auth.patch(
        ''.join(["https://www.googleapis.com/compute/v1/", "projects/{project}/regions/{region}/forwardingRules/{name}"]).format(**module.params),
        {u'allowGlobalAccess': module.params.get('allow_global_access')},
    )
def update(module, link):
    auth = GcpSession(module, 'spanner')
    return wait_for_operation(module,
                              auth.patch(link, resource_to_update(module)))
def update(module, link):
    auth = GcpSession(module, 'cloudbuild')
    return return_if_object(module, auth.patch(link, resource_to_request(module)))
Esempio n. 5
0
def update(module, link, fetch):
    auth = GcpSession(module, 'redis')
    params = {'updateMask': updateMask(resource_to_request(module), response_to_hash(module, fetch))}
    request = resource_to_request(module)
    del request['name']
    return wait_for_operation(module, auth.patch(link, request, params=params))
Esempio n. 6
0
def routing_config_update(module, request, response):
    auth = GcpSession(module, 'compute')
    auth.patch(
        ''.join(["https://www.googleapis.com/compute/v1/", "projects/{project}/global/networks/{name}"]).format(**module.params),
        {u'routingConfig': NetworkRoutingconfig(module.params.get('routing_config', {}), module).to_request()},
    )
Esempio n. 7
0
def update(module, link, kind, fetch):
    update_fields(module, resource_to_request(module),
                  response_to_hash(module, fetch))
    auth = GcpSession(module, 'compute')
    return wait_for_operation(module,
                              auth.patch(link, resource_to_request(module)))
Esempio n. 8
0
def update(module, link, fetch):
    auth = GcpSession(module, 'pubsub')
    params = {'updateMask': updateMask(resource_to_request(module), response_to_hash(module, fetch))}
    request = resource_to_request(module)
    del request['name']
    return return_if_object(module, auth.patch(link, request, params=params))
Esempio n. 9
0
def update(module, link):
    auth = GcpSession(module, 'spanner')
    return return_if_object(module, auth.patch(link,
                                               resource_to_update(module)))
Esempio n. 10
0
def secondary_ip_ranges_update(module, request, response):
    auth = GcpSession(module, 'compute')
    auth.patch(
        ''.join(["https://www.googleapis.com/compute/v1/", "projects/{project}/regions/{region}/subnetworks/{name}"]).format(**module.params),
        {u'secondaryIpRanges': SubnetworkSecondaryiprangesArray(module.params.get('secondary_ip_ranges', []), module).to_request()},
    )