コード例 #1
0
def create_change(original, updated, module):
    auth = GcpSession(module, 'dns')
    return return_if_change_object(module,
                                   auth.post(collection(module),
                                             resource_to_change_request(
                                                 original, updated, module)
                                             ))
コード例 #2
0
def delete(module, link):
    auth = GcpSession(module, 'pubsub')
    return return_if_object(module, auth.delete(link))
コード例 #3
0
def update(module, link, kind):
    auth = GcpSession(module, 'storage')
    return return_if_object(module, auth.put(link, resource_to_request(module)), kind)
コード例 #4
0
def fetch_resource(module, link, allow_not_found=True):
    auth = GcpSession(module, 'pubsub')
    return return_if_object(module, auth.get(link), allow_not_found)
コード例 #5
0
def create(module, link, kind):
    auth = GcpSession(module, 'compute')
    return wait_for_operation(module, auth.post(link, resource_to_request(module)))
コード例 #6
0
def delete(module, link, kind, fetch):
    auth = GcpSession(module, 'compute')
    return wait_for_operation(module, auth.delete(link))
コード例 #7
0
def create(module, link):
    auth = GcpSession(module, 'pubsub')
    return return_if_object(module, auth.put(link,
                                             resource_to_request(module)))
コード例 #8
0
def fetch_resource(module, link, kind):
    auth = GcpSession(module, 'compute')
    return return_if_object(module, auth.get(link), kind)
コード例 #9
0
def create(module, link):
    auth = GcpSession(module, 'filestore')
    return wait_for_operation(module, auth.post(link, resource_to_request(module)))
コード例 #10
0
def update(module, link, kind, fetch):
    auth = GcpSession(module, 'compute')
    return wait_for_operation(module, auth.put(link, resource_to_request(module)))
コード例 #11
0
def fetch_list(module, link, query):
    auth = GcpSession(module, 'compute')
    return auth.list(link,
                     return_if_object,
                     array_name='items',
                     params={'filter': query})
コード例 #12
0
def delete(module, link):
    auth = GcpSession(module, 'spanner')
    return return_if_object(module, auth.delete(link))
コード例 #13
0
def update(module, link):
    auth = GcpSession(module, 'spanner')
    return return_if_object(module, auth.put(link,
                                             resource_to_request(module)))
コード例 #14
0
def delete(module, link):
    auth = GcpSession(module, 'container')
    return wait_for_operation(module, auth.delete(link))
コード例 #15
0
def create(module, link, kind):
    auth = GcpSession(module, 'dns')
    return return_if_object(module, auth.post(link, resource_to_request(module)), kind)
コード例 #16
0
def update(module, link, fetch):
    auth = GcpSession(module, 'filestore')
    params = {'updateMask': updateMask(resource_to_request(module), response_to_hash(module, fetch))}
    request = resource_to_request(module)
    return wait_for_operation(module, auth.patch(link, request, params=params))
コード例 #17
0
def create(module, link, kind):
    auth = GcpSession(module, 'compute')
    return wait_for_operation(module, auth.post(link, resource_to_request(module)))
コード例 #18
0
def delete(module, link):
    auth = GcpSession(module, 'filestore')
    return wait_for_operation(module, auth.delete(link))
コード例 #19
0
def fetch_list(module, link):
    auth = GcpSession(module, 'sourcerepo')
    return auth.list(link, return_if_object, array_name='repos')
コード例 #20
0
def fetch_list(module, link):
    auth = GcpSession(module, 'sourcerepo')
    response = auth.get(link)
    return return_if_object(module, response)
コード例 #21
0
def delete(module, link):
    auth = GcpSession(module, 'pubsub')
    return return_if_object(module, auth.delete(link))
コード例 #22
0
def update(module, link):
    auth = GcpSession(module, 'resourcemanager')
    return wait_for_operation(module,
                              auth.put(link, resource_to_request(module)))
def fetch_list(module, link, query):
    auth = GcpSession(module, 'compute')
    response = auth.get(link, params={'filter': query})
    return return_if_object(module, response)
コード例 #24
0
def delete(module, link):
    auth = GcpSession(module, 'resourcemanager')
    return wait_for_operation(module, auth.delete(link))
コード例 #25
0
def delete(module, link, fetch):
    auth = GcpSession(module, 'container')
    return wait_for_operation(module, auth.delete(link))
コード例 #26
0
def update(module, link, kind):
    auth = GcpSession(module, 'storage')
    return return_if_object(module, auth.put(link, resource_to_request(module)), kind)
コード例 #27
0
def get_change_status(change_id, module):
    auth = GcpSession(module, 'dns')
    link = collection(module, "/%s" % change_id)
    return return_if_change_object(module, auth.get(link))['status']
コード例 #28
0
def delete(module, link, kind):
    auth = GcpSession(module, 'storage')
    return return_if_object(module, auth.delete(link), kind)
コード例 #29
0
def create(module, link):
    auth = GcpSession(module, 'pubsub')
    return return_if_object(module, auth.put(link, resource_to_request(module)))
コード例 #30
0
def fetch_list(module, link, query):
    auth = GcpSession(module, 'dns')
    response = auth.get(link, params={'dnsName': query})
    return return_if_object(module, response)
コード例 #31
0
def fetch_resource(module, link):
    auth = GcpSession(module, 'pubsub')
    return return_if_object(module, auth.get(link))
コード例 #32
0
def fetch_list(module, link):
    auth = GcpSession(module, 'iam')
    return auth.list(link, return_if_object, array_name='accounts')
コード例 #33
0
def delete(module, link, kind):
    auth = GcpSession(module, 'dns')
    return return_if_object(module, auth.delete(link), kind)
コード例 #34
0
ファイル: gcp_iam_role.py プロジェクト: wolfman-rack/ansible
def create(module, link):
    auth = GcpSession(module, 'iam')
    return return_if_object(module, auth.post(link, resource_to_create(module)))
コード例 #35
0
def update(module, link, kind, fetch):
    auth = GcpSession(module, 'compute')
    return wait_for_operation(module, auth.put(link, resource_to_request(module)))
コード例 #36
0
ファイル: gcp_iam_role.py プロジェクト: wolfman-rack/ansible
def update(module, link, fetch):
    auth = GcpSession(module, 'iam')
    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.put(link, request, params=params))
コード例 #37
0
def fetch_resource(module, link, kind):
    auth = GcpSession(module, 'compute')
    return return_if_object(module, auth.get(link), kind)
コード例 #38
0
ファイル: gcp_redis_instance.py プロジェクト: zopar/ansible
def delete(module, link):
    auth = GcpSession(module, 'redis')
    return wait_for_operation(module, auth.delete(link))