本文整理汇总了Python中appcontroller_client.AppControllerClient.get_deployment_id方法的典型用法代码示例。如果您正苦于以下问题:Python AppControllerClient.get_deployment_id方法的具体用法?Python AppControllerClient.get_deployment_id怎么用?Python AppControllerClient.get_deployment_id使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类appcontroller_client.AppControllerClient
的用法示例。
在下文中一共展示了AppControllerClient.get_deployment_id方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: test_set_deployment_id
# 需要导入模块: from appcontroller_client import AppControllerClient [as 别名]
# 或者: from appcontroller_client.AppControllerClient import get_deployment_id [as 别名]
def test_set_deployment_id(self):
host = 'boo'
secret = 'baz'
# The function should return whatever run_with_timeout_returns.
flexmock(AppControllerClient).should_receive('run_with_timeout')\
.and_return()
acc = AppControllerClient(host, secret)
acc.get_deployment_id()
示例2: test_get_deployment_id
# 需要导入模块: from appcontroller_client import AppControllerClient [as 别名]
# 或者: from appcontroller_client.AppControllerClient import get_deployment_id [as 别名]
def test_get_deployment_id(self):
# The function should return whatever run_with_timeout_returns.
host = 'boo'
secret = 'baz'
deployment_id = 'foo'
flexmock(AppControllerClient).should_receive('run_with_timeout')\
.and_return(deployment_id)
acc = AppControllerClient(host, secret)
self.assertEqual(deployment_id, acc.get_deployment_id())
示例3: get_deployment_id
# 需要导入模块: from appcontroller_client import AppControllerClient [as 别名]
# 或者: from appcontroller_client.AppControllerClient import get_deployment_id [as 别名]
def get_deployment_id(cls, head_node, keyname):
""" Retrieve this AppScale deployment's ID.
Args:
head_node: A string containing the IP address of the head node.
keyname: A string representing the SSH keypair name used for this
AppScale deployment.
"""
secret = LocalState.get_secret_key(keyname)
acc = AppControllerClient(head_node, secret)
return acc.get_deployment_id()