本文整理匯總了Python中ansible.module_utils.gcp_utils.GcpSession類的典型用法代碼示例。如果您正苦於以下問題:Python GcpSession類的具體用法?Python GcpSession怎麽用?Python GcpSession使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。
在下文中一共展示了GcpSession類的13個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。
示例1: create_change
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: fetch_resource
def fetch_resource(module, link, kind):
auth = GcpSession(module, 'compute')
return return_if_object(module, auth.get(link), kind)
示例3: delete
def delete(module, link, kind, fetch):
auth = GcpSession(module, 'compute')
return wait_for_operation(module, auth.delete(link))
示例4: update
def update(module, link, kind, fetch):
auth = GcpSession(module, 'compute')
return wait_for_operation(module, auth.put(link, resource_to_request(module)))
示例5: create
def create(module, link, kind):
auth = GcpSession(module, 'compute')
return wait_for_operation(module, auth.post(link, resource_to_request(module)))
示例6: delete
def delete(module, link, kind):
auth = GcpSession(module, 'dns')
return return_if_object(module, auth.delete(link), kind)
示例7: create
def create(module, link, kind):
auth = GcpSession(module, 'dns')
return return_if_object(module, auth.post(link, resource_to_request(module)), kind)
示例8: fetch_resource
def fetch_resource(module, link):
auth = GcpSession(module, 'pubsub')
return return_if_object(module, auth.get(link))
示例9: delete
def delete(module, link):
auth = GcpSession(module, 'pubsub')
return return_if_object(module, auth.delete(link))
示例10: create
def create(module, link):
auth = GcpSession(module, 'pubsub')
return return_if_object(module, auth.put(link, resource_to_request(module)))
示例11: update
def update(module, link, kind):
auth = GcpSession(module, 'storage')
return return_if_object(module, auth.put(link, resource_to_request(module)), kind)
示例12: get_change_status
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']
示例13: delete
def delete(module, link, fetch):
auth = GcpSession(module, 'container')
return wait_for_operation(module, auth.delete(link))