Beispiel #1
0
    def testCase2919(self):
        vm = self.connection.getVM('8dbf182f-0a1a-43b5-93ae-b4354252059c')
        devicelist = []
        devicelist.append(self.RAID_Device1)
        devicelist.append(self.RAID_Device2)
        deviceID = str(uuid.uuid4())

        # create raid device object
        dev = Device(self.connection)
        dev.name = 'testCase2919'
        dev.description = testlib.RandomString(
            string.ascii_uppercase + string.digits, 1025)
        dev.msUID = deviceID
        dev.raidLevel = 'RAID0'
        dev.fileSystem = self.filesystem
        dev.volume = Volume(self.connection)
        dev.volume.mountPoint = self.mountpoint

        for d in devicelist:
            new = Device(self.connection)
            new.msUID = d
            dev.subDevices.append(new)

        # call create RAID API
        ret = self.connection.get_status('vm/%s/device/raid/' % (vm.imageGUID),
                                         Device,
                                         data=dev.tostring(),
                                         method='POST')
        self.assertEqual(ret, None)
Beispiel #2
0
    def testCase2903(self):
        newvm = self.connection.getVM(self.TestVM_ID)
        target = VirtualMachine(self.connection)
        target.imageGUID = newvm.imageGUID

        # should be removed
        target.SecurityGroupGUID = newvm.SecurityGroupGUID
        target.autoProvision = newvm.autoProvision

        target.imageName = testlib.RandomString(
            string.ascii_uppercase + string.digits, 36)
        updated = target.update()
        self.assertEqual(updated.imageName, target.imageName)
Beispiel #3
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)
Beispiel #4
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)