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)
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)