def test_list_sg(self): cxt = AliContext(KEY_ID, KEY_SECRET, host='ecs.aliyuncs.com', port=443, region='cn-shenzhen') sg = AliSecurityGroupSupport(cxt) ret = sg.list_security_group() print(ret) self.assertIsNotNone(ret)
def test_create_sg(self): cxt = AliContext(KEY_ID, KEY_SECRET, host='ecs.aliyuncs.com', port=443, region='cn-shenzhen') sg = AliSecurityGroupSupport(cxt) ret = sg.create_security_group(name='wantest', description='wanwan') print(ret) self.assertIsNotNone(ret)