本文整理汇总了Python中profab.server.Server.start方法的典型用法代码示例。如果您正苦于以下问题:Python Server.start方法的具体用法?Python Server.start怎么用?Python Server.start使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类profab.server.Server
的用法示例。
在下文中一共展示了Server.start方法的13个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: test_security_groups
# 需要导入模块: from profab.server import Server [as 别名]
# 或者: from profab.server.Server import start [as 别名]
def test_security_groups(self):
server = Server.start('kirit', ('security_group', 'web'), ('security_group', 'ssh'))
self.assertItemsEqual([g.id for g in server.instance.groups], ['web', 'ssh'])
示例2: test_start_basic
# 需要导入模块: from profab.server import Server [as 别名]
# 或者: from profab.server.Server import start [as 别名]
def test_start_basic(self):
server = Server.start('test')
self.assertEquals(str(server),
u"ec2-host -- running (host) [default] {}")
示例3: test_start_customise_bits
# 需要导入模块: from profab.server import Server [as 别名]
# 或者: from profab.server.Server import start [as 别名]
def test_start_customise_bits(self):
server = Server.start("test", ("size", "t1.micro"), ("bits", "64"))
self.assertEqual(server.instance.instance_type, "t1.micro")
self.assertEqual(server.instance.image_id, "ami-63be790a")
示例4: test_start_customise_bits
# 需要导入模块: from profab.server import Server [as 别名]
# 或者: from profab.server.Server import start [as 别名]
def test_start_customise_bits(self):
server = Server.start('test', ('size', 't1.micro'), ('bits', '64'), ('ami.precise', None))
self.assertEqual(server.instance.instance_type, 't1.micro')
self.assertEqual(server.instance.image_id, 'ami-f8d4f9ef')
示例5: test_start_with_size
# 需要导入模块: from profab.server import Server [as 别名]
# 或者: from profab.server.Server import start [as 别名]
def test_start_with_size(self):
server = Server.start("test", ("size", "c1.xlarge"))
self.assertEqual(server.instance.instance_type, "c1.xlarge")
示例6: test_start_with_roles
# 需要导入模块: from profab.server import Server [as 别名]
# 或者: from profab.server.Server import start [as 别名]
def test_start_with_roles(self):
server = Server.start("test", "postgres", "smarthost")
self.assertEquals(str(server), u"ec2-host -- running (host) [default] {}")
示例7: test_start_with_region
# 需要导入模块: from profab.server import Server [as 别名]
# 或者: from profab.server.Server import start [as 别名]
def test_start_with_region(self):
server = Server.start('test', ('region', 'bangkok'), ('ami', 'test-ami'))
self.assertEqual(server.instance.region.name, 'bangkok')
self.assertEqual(server.instance.image_id, 'test-ami')
示例8: test_start_oneiric
# 需要导入模块: from profab.server import Server [as 别名]
# 或者: from profab.server.Server import start [as 别名]
def test_start_oneiric(self):
server = Server.start("test", "ami.oneiric")
self.assertEqual(server.instance.image_id, "ami-0bcb0262")
示例9: test_start_natty
# 需要导入模块: from profab.server import Server [as 别名]
# 或者: from profab.server.Server import start [as 别名]
def test_start_natty(self):
server = Server.start("test", "ami.natty")
self.assertEqual(server.instance.image_id, "ami-639b530a")
示例10: test_start_lucid
# 需要导入模块: from profab.server import Server [as 别名]
# 或者: from profab.server.Server import start [as 别名]
def test_start_lucid(self):
server = Server.start("test", "ami.lucid")
self.assertEqual(server.instance.image_id, "ami-2cc83145")
示例11: test_start_with_roles
# 需要导入模块: from profab.server import Server [as 别名]
# 或者: from profab.server.Server import start [as 别名]
def test_start_with_roles(self):
server = Server.start('test', 'postgres', 'smarthost')
self.assertEquals(str(server),
u"ec2-host -- running (host) [default] {}")
示例12: test_start_with_ami
# 需要导入模块: from profab.server import Server [as 别名]
# 或者: from profab.server.Server import start [as 别名]
def test_start_with_ami(self):
server = Server.start("test", ("ami", "test-ami"))
self.assertEqual(server.instance.image_id, "test-ami")
示例13: test_create
# 需要导入模块: from profab.server import Server [as 别名]
# 或者: from profab.server.Server import start [as 别名]
def test_create(self):
server = Server.start('test-volume')
volume = Volume.create(server, 2)
self.assertTrue(volume.attached)