Пример #1
0
    def test_create_sg(self):
        ctx = AWSContext(AWS_KEY, SECRET_KEY, host='ec2.amazonaws.com',
                         port=443, region='us-east-1')

        sg = AWSSecurityGroupSupport(ctx)
        ret = sg.create_security_group(name='wan', description="testnime")
        print(ret)
        self.assertIsNotNone(ret)
Пример #2
0
    def test_list_sg(self):
        ctx = AWSContext(AWS_KEY, SECRET_KEY, host='ec2.amazonaws.com',
                         port=443, region='us-east-1')

        sg = AWSSecurityGroupSupport(ctx)
        ret = sg.list_security_group()
        print(ret)
        self.assertIsNotNone(ret)
Пример #3
0
    def test_create_sg(self):
        ctx = AWSContext(AWS_KEY,
                         SECRET_KEY,
                         host='ec2.amazonaws.com',
                         port=443,
                         region='us-east-1')

        sg = AWSSecurityGroupSupport(ctx)
        ret = sg.create_security_group(name='wan', description="testnime")
        print(ret)
        self.assertIsNotNone(ret)
Пример #4
0
    def test_list_sg(self):
        ctx = AWSContext(AWS_KEY,
                         SECRET_KEY,
                         host='ec2.amazonaws.com',
                         port=443,
                         region='us-east-1')

        sg = AWSSecurityGroupSupport(ctx)
        ret = sg.list_security_group()
        print(ret)
        self.assertIsNotNone(ret)