def delete(module, link):
    auth = GcpSession(module, 'container')
    return wait_for_operation(module, auth.delete(link))
def delete(module, link, kind):
    auth = GcpSession(module, 'compute')
    return wait_for_operation(module, auth.delete(link))
def fetch_list(module, link, query):
    auth = GcpSession(module, 'compute')
    return auth.list(link,
                     return_if_object,
                     array_name='items',
                     params={'filter': query})
def create(module, link):
    auth = GcpSession(module, 'mlengine')
    return return_if_object(module, auth.post(link, resource_to_request(module)))
def fetch_resource(module, link, allow_not_found=True):
    auth = GcpSession(module, 'mlengine')
    return return_if_object(module, auth.get(link), allow_not_found)
def fetch_resource(module):
    auth = GcpSession(module, 'iam')
    return return_if_object(module, auth.get(self_link_from_file(module)))
示例#7
0
def delete(module, link):
    auth = GcpSession(module, 'pubsub')
    return return_if_object(module, auth.delete(link))
示例#8
0
def update(module, link, kind):
    auth = GcpSession(module, 'storage')
    return return_if_object(module, auth.put(link, resource_to_request(module)), kind)
示例#9
0
def delete(module, link, kind):
    auth = GcpSession(module, 'storage')
    return return_if_object(module, auth.delete(link), kind)
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()},
    )
示例#11
0
def fetch_list(module, link):
    auth = GcpSession(module, 'mlengine')
    return auth.list(link, return_if_object, array_name='versions')
def update(module, link):
    auth = GcpSession(module, 'cloudbuild')
    return return_if_object(module,
                            auth.patch(link, resource_to_request(module)))
def fetch_list(module, link):
    auth = GcpSession(module, 'appengine')
    return auth.list(link, return_if_object, array_name='ingressRules')
示例#14
0
def fetch_list(module, link):
    auth = GcpSession(module, 'cloudbuild')
    return auth.list(link, return_if_object, array_name='triggers')
def fetch_list(module, link):
    auth = GcpSession(module, 'sourcerepo')
    return auth.list(link, return_if_object, array_name='repos')
def delete(module, link):
    auth = GcpSession(module, 'sourcerepo')
    return return_if_object(module, auth.delete(link))
def delete(module):
    auth = GcpSession(module, 'iam')
    return return_if_object(module, auth.delete(self_link_from_file(module)))
def update(module, link):
    auth = GcpSession(module, 'cloudtasks')
    return return_if_object(module, auth.put(link,
                                             resource_to_request(module)))
示例#19
0
def create(module, link):
    auth = GcpSession(module, 'pubsub')
    return return_if_object(module, auth.put(link,
                                             resource_to_request(module)))
def delete(module, link):
    auth = GcpSession(module, 'cloudtasks')
    return return_if_object(module, auth.delete(link))
def fetch_list(module, link):
    auth = GcpSession(module, 'spanner')
    return auth.list(link, return_if_object, array_name='databases')
 def stop(self):
     auth = GcpSession(self.module, 'cloudtasks')
     return_if_object(self.module, auth.post(self._stop_url()))
def delete(module, link):
    auth = GcpSession(module, 'mlengine')
    return wait_for_operation(module, auth.delete(link))
def fetch_list(module, link):
    auth = GcpSession(module, 'redis')
    return auth.list(link, return_if_object, array_name='instances')
def create(module, link, kind):
    auth = GcpSession(module, 'compute')
    return wait_for_operation(module,
                              auth.post(link, resource_to_request(module)))
示例#26
0
def delete(module, link, kind, fetch):
    auth = GcpSession(module, 'sql')
    return wait_for_operation(module, auth.delete(link))
def fetch_resource(module, link, kind, allow_not_found=True):
    auth = GcpSession(module, 'compute')
    return return_if_object(module, auth.get(link), kind, allow_not_found)
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.put(link, resource_to_request(module)))
def fetch_list(module, link):
    auth = GcpSession(module, 'pubsub')
    return auth.list(link, return_if_object, array_name='topics')
def update(module, link):
    auth = GcpSession(module, 'container')
    return wait_for_operation(module,
                              auth.put(link, resource_to_request(module)))