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