本文整理汇总了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))