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


Python Server.connect方法代码示例

本文整理汇总了Python中profab.server.Server.connect方法的典型用法代码示例。如果您正苦于以下问题:Python Server.connect方法的具体用法?Python Server.connect怎么用?Python Server.connect使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在profab.server.Server的用法示例。


在下文中一共展示了Server.connect方法的12个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: test_connect_to_reservation_name

# 需要导入模块: from profab.server import Server [as 别名]
# 或者: from profab.server.Server import connect [as 别名]
 def test_connect_to_reservation_name(self):
     server = Server.connect('test', 'r-reservation')
     self.assertEquals(server.reservation.id, 'r-reservation')
开发者ID:Proteus-tech,项目名称:profab,代码行数:5,代码来源:test_server.py

示例2: test_connect_and_stop

# 需要导入模块: from profab.server import Server [as 别名]
# 或者: from profab.server.Server import connect [as 别名]
 def test_connect_and_stop(self):
     server = Server.connect('test', 'ec2-host')
     server.stop()
开发者ID:Proteus-tech,项目名称:profab,代码行数:5,代码来源:test_server.py

示例3: test_wsgi_without_www_data_homedir

# 需要导入模块: from profab.server import Server [as 别名]
# 或者: from profab.server.Server import connect [as 别名]
 def test_wsgi_without_www_data_homedir(self):
     server = Server.connect('test', 'ec2-host')
     server.add_role('wsgi')
开发者ID:AttakornP,项目名称:profab,代码行数:5,代码来源:test_roles.py

示例4: test_connect_and_upgrade

# 需要导入模块: from profab.server import Server [as 别名]
# 或者: from profab.server.Server import connect [as 别名]
 def test_connect_and_upgrade(self):
     server = Server.connect('test', 'ec2-host')
     server.dist_upgrade()
开发者ID:Proteus-tech,项目名称:profab,代码行数:5,代码来源:test_server.py

示例5: test_try_connect_to_invalid_host

# 需要导入模块: from profab.server import Server [as 别名]
# 或者: from profab.server.Server import connect [as 别名]
 def test_try_connect_to_invalid_host(self):
     server = Server.connect('test', 'not-a-host')
     self.assertIs(server, None)
开发者ID:Proteus-tech,项目名称:profab,代码行数:5,代码来源:test_server.py

示例6: test_connect_and_add_role

# 需要导入模块: from profab.server import Server [as 别名]
# 或者: from profab.server.Server import connect [as 别名]
 def test_connect_and_add_role(self):
     server = Server.connect('test', 'ec2-host')
     server.add_role('postgres')
     server.add_role('wsgi')
开发者ID:Proteus-tech,项目名称:profab,代码行数:6,代码来源:test_server.py

示例7: test_connect_and_configure

# 需要导入模块: from profab.server import Server [as 别名]
# 或者: from profab.server.Server import connect [as 别名]
 def test_connect_and_configure(self):
     server = Server.connect("test", "ec2-host")
     server.add_role("munin", "monitor.example.com")
     server.add_role("eip", "10.43.56.9")
开发者ID:AttakornP,项目名称:profab,代码行数:6,代码来源:test_server.py

示例8: test_connect_and_terminate

# 需要导入模块: from profab.server import Server [as 别名]
# 或者: from profab.server.Server import connect [as 别名]
 def test_connect_and_terminate(self):
     server = Server.connect("test", "ec2-host")
     server.terminate()
开发者ID:AttakornP,项目名称:profab,代码行数:5,代码来源:test_server.py

示例9: test_connect_and_restart

# 需要导入模块: from profab.server import Server [as 别名]
# 或者: from profab.server.Server import connect [as 别名]
 def test_connect_and_restart(self):
     server = Server.connect("test", "r-reservation")
     server.restart()
开发者ID:AttakornP,项目名称:profab,代码行数:5,代码来源:test_server.py

示例10: test_server_role_not_found

# 需要导入模块: from profab.server import Server [as 别名]
# 或者: from profab.server.Server import connect [as 别名]
 def test_server_role_not_found(self):
     server = Server.connect("test", "ec2-host")
     with self.assertRaises(ImportError):
         server.add_role("not-a-role")
开发者ID:AttakornP,项目名称:profab,代码行数:6,代码来源:test_server.py

示例11: test_munin

# 需要导入模块: from profab.server import Server [as 别名]
# 或者: from profab.server.Server import connect [as 别名]
 def test_munin(self):
     server = Server.connect('test', 'ec2-host')
     server.add_role('munin')
     server.add_role('munin', 'monitor.example.com')
开发者ID:AttakornP,项目名称:profab,代码行数:6,代码来源:test_roles.py

示例12: test_wsgi_with_default_site

# 需要导入模块: from profab.server import Server [as 别名]
# 或者: from profab.server.Server import connect [as 别名]
 def test_wsgi_with_default_site(self):
     server = Server.connect('test', 'ec2-host')
     server.add_role('wsgi')
开发者ID:AttakornP,项目名称:profab,代码行数:5,代码来源:test_roles.py


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