Exemplo n.º 1
0
 def test_remove_instance(self):
     cxt = AliContext(KEY_ID,
                      KEY_SECRET,
                      host='ecs.aliyuncs.com',
                      port=443,
                      region='cn-shenzhen')
     instance = AliInstanceSupport(cxt)
     instance.remove('i-94dqulg0q')
Exemplo n.º 2
0
 def test_create_instance(self):
     cxt = AliContext(KEY_ID,
                      KEY_SECRET,
                      host='ecs.aliyuncs.com',
                      port=443,
                      region='cn-shenzhen')
     instance = AliInstanceSupport(cxt)
     rsp = instance.launch(image='m-94fdnlshi',
                           flavor='ecs.t1.xsmall',
                           SecurityGroupId='sg-94meu1xof')
     self.assertIsNotNone(rsp)
Exemplo n.º 3
0
 def test_create_instance(self):
     cxt = AliContext(KEY_ID, KEY_SECRET, host='ecs.aliyuncs.com', port=443, region='cn-shenzhen')
     instance = AliInstanceSupport(cxt)
     rsp = instance.launch(image='m-94fdnlshi', flavor='ecs.t1.xsmall', SecurityGroupId='sg-94meu1xof')
     self.assertIsNotNone(rsp)
Exemplo n.º 4
0
 def test_remove_instance(self):
     cxt = AliContext(KEY_ID, KEY_SECRET, host='ecs.aliyuncs.com', port=443, region='cn-shenzhen')
     instance = AliInstanceSupport(cxt)
     instance.remove('i-94dqulg0q')