コード例 #1
0
    def testCase2944(self):
        policy = SecurityGroup(self)
        policy.name = "testCase2944"
        # default values
        policy.description = testlib.RandomString(
            "~!@#$%^&*()_+=-`][}{;?><,./)", 361)

        data = policy.tostring()
        policy = self.connection.get_object('%s/' % (self.connection.REST_SECURITY_GROUP),
                                            SecurityGroup, data=data, method='POST')
        # create policy
        self.assertEqual(policy, None)
コード例 #2
0
    def testCase2943(self):
        policy = SecurityGroup(self)
        policy.name = "testCase2943"
        # default values
        policy.description = testlib.RandomString(
            string.ascii_uppercase + string.digits, 361)

        data = policy.tostring()
        policy = self.connection.get_object('%s/' % (self.connection.REST_SECURITY_GROUP),
                                            SecurityGroup, data=data, method='POST')
        # create policy
        self.assertEqual(policy, None)
コード例 #3
0
    def createSecurityGroup(self, name):
        if self.authentication is None: 
            return None

        policy = SecurityGroup(self)
        policy.name = name
        # Test default value here
        #========================

        data = policy.tostring()
        policy = self.get_object( '%s/' % (self.REST_SECURITY_GROUP), 
                                  SecurityGroup, data=data, method='POST')
        return policy
コード例 #4
0
    def testCase2940(self):
        policy = SecurityGroup(self)
        policy.name = "testCase2940"
        # default values
        vm = VirtualMachine(self)
        vm.imageGUID = '245e35df-492a-40c8-8543-b07e1e252744'
        policy.addVM(vm)

        data = policy.tostring()
        policy = self.connection.get_object('%s/' % (self.connection.REST_SECURITY_GROUP),
                                            SecurityGroup, data=data, method='POST')

        # create policy
        self.assertEqual(policy, None)
コード例 #5
0
    def testCase2944(self):
        policy = SecurityGroup(self)
        policy.name = "testCase2944"
        # default values
        policy.description = testlib.RandomString(
            "~!@#$%^&*()_+=-`][}{;?><,./)", 361)

        data = policy.tostring()
        policy = self.connection.get_object(
            '%s/' % (self.connection.REST_SECURITY_GROUP),
            SecurityGroup,
            data=data,
            method='POST')
        # create policy
        self.assertEqual(policy, None)
コード例 #6
0
    def testCase2943(self):
        policy = SecurityGroup(self)
        policy.name = "testCase2943"
        # default values
        policy.description = testlib.RandomString(
            string.ascii_uppercase + string.digits, 361)

        data = policy.tostring()
        policy = self.connection.get_object(
            '%s/' % (self.connection.REST_SECURITY_GROUP),
            SecurityGroup,
            data=data,
            method='POST')
        # create policy
        self.assertEqual(policy, None)
コード例 #7
0
    def createSecurityGroup(self, name):
        if self.authentication is None:
            return None

        policy = SecurityGroup(self)
        policy.name = name
        # Test default value here
        #========================

        data = policy.tostring()
        policy = self.get_object('%s/' % (self.REST_SECURITY_GROUP),
                                 SecurityGroup,
                                 data=data,
                                 method='POST')
        return policy
コード例 #8
0
    def testCase2940(self):
        policy = SecurityGroup(self)
        policy.name = "testCase2940"
        # default values
        vm = VirtualMachine(self)
        vm.imageGUID = '245e35df-492a-40c8-8543-b07e1e252744'
        policy.addVM(vm)

        data = policy.tostring()
        policy = self.connection.get_object(
            '%s/' % (self.connection.REST_SECURITY_GROUP),
            SecurityGroup,
            data=data,
            method='POST')

        # create policy
        self.assertEqual(policy, None)