Пример #1
0
 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
0
 def test_start_basic(self):
     server = Server.start('test')
     self.assertEquals(str(server),
         u"ec2-host -- running (host) [default] {}")
Пример #3
0
 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
0
 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
0
 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-1e6f6176')
Пример #6
0
 def test_start_with_size(self):
     server = Server.start("test", ("size", "c1.xlarge"))
     self.assertEqual(server.instance.instance_type, "c1.xlarge")
Пример #7
0
 def test_start_with_roles(self):
     server = Server.start("test", "postgres", "smarthost")
     self.assertEquals(str(server), u"ec2-host -- running (host) [default] {}")
Пример #8
0
 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')
Пример #9
0
 def test_start_oneiric(self):
     server = Server.start("test", "ami.oneiric")
     self.assertEqual(server.instance.image_id, "ami-0bcb0262")
Пример #10
0
 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"])
Пример #11
0
 def test_start_natty(self):
     server = Server.start("test", "ami.natty")
     self.assertEqual(server.instance.image_id, "ami-639b530a")
Пример #12
0
 def test_start_lucid(self):
     server = Server.start("test", "ami.lucid")
     self.assertEqual(server.instance.image_id, "ami-2cc83145")
Пример #13
0
 def test_start_lucid(self):
     server = Server.start('test', 'ami.lucid')
     self.assertEqual(server.instance.image_id, 'ami-1c6f6174')
Пример #14
0
 def test_start_with_roles(self):
     server = Server.start('test', 'postgres', 'smarthost')
     self.assertEquals(str(server),
         u"ec2-host -- running (host) [default] {}")
Пример #15
0
 def test_start_with_ami(self):
     server = Server.start("test", ("ami", "test-ami"))
     self.assertEqual(server.instance.image_id, "test-ami")
Пример #16
0
 def test_start_with_ami(self):
     server = Server.start('test', ('ami', 'test-ami'))
     self.assertEqual(server.instance.image_id, 'test-ami')
Пример #17
0
 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")
Пример #18
0
 def test_start_with_size(self):
     server = Server.start('test', ('size', 'c1.xlarge'))
     self.assertEqual(server.instance.instance_type, 'c1.xlarge')
Пример #19
0
 def test_create(self):
     server = Server.start('test-volume')
     volume = Volume.create(server, 2)
     self.assertTrue(volume.attached)