本文整理汇总了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')
示例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()
示例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')
示例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()
示例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)
示例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')
示例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")
示例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()
示例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()
示例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")
示例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')
示例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')