Beispiel #1
0
 def test_list_volume(self):
     # 用不了
     cxt = AliContext(KEY_ID, KEY_SECRET, host='ecs.aliyuncs.com', port=443, region='cn-shenzhen')
     volume = AliVolumeSupport(cxt)
     ret = volume.list_volume()
     print(ret)
     self.assertIsNotNone(ret)
Beispiel #2
0
 def test_list_volume(self):
     # 用不了
     cxt = AliContext(KEY_ID,
                      KEY_SECRET,
                      host='ecs.aliyuncs.com',
                      port=443,
                      region='cn-shenzhen')
     volume = AliVolumeSupport(cxt)
     ret = volume.list_volume()
     print(ret)
     self.assertIsNotNone(ret)
Beispiel #3
0
 def test_create_volume(self):
     cxt = AliContext(KEY_ID,
                      KEY_SECRET,
                      host='ecs.aliyuncs.com',
                      port=443,
                      region='cn-shenzhen')
     volume = AliVolumeSupport(cxt)
     ret = volume.create_volume(name='wantest',
                                size=5,
                                ZoneId='cn-shenzhen-st3004-a')
     print(ret)
     self.assertIsNotNone(ret)
Beispiel #4
0
 def test_create_volume(self):
     cxt = AliContext(KEY_ID, KEY_SECRET, host='ecs.aliyuncs.com', port=443, region='cn-shenzhen')
     volume = AliVolumeSupport(cxt)
     ret = volume.create_volume(name='wantest', size=5, ZoneId='cn-shenzhen-st3004-a')
     print(ret)
     self.assertIsNotNone(ret)