当前位置: 首页>>代码示例>>Python>>正文


Python AppControllerClient.get_deployment_id方法代码示例

本文整理汇总了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()
开发者ID:cdonati,项目名称:appscale-tools,代码行数:10,代码来源:test_appcontroller_client.py

示例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())
开发者ID:cdonati,项目名称:appscale-tools,代码行数:11,代码来源:test_appcontroller_client.py

示例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()
开发者ID:Git-Host,项目名称:appscale-tools,代码行数:13,代码来源:registration_helper.py


注:本文中的appcontroller_client.AppControllerClient.get_deployment_id方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。