Exemple #1
0
 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)
Exemple #2
0
 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)
Exemple #3
0
 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)
Exemple #4
0
 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)