Package com.abiquo.hypervisor.model

Examples of com.abiquo.hypervisor.model.SecondaryDiskStateful


        if (secondaryDisks == null)
        {
            secondaryDisks = new SecondaryDisks();
        }

        final SecondaryDiskStateful auxDisk = new SecondaryDiskStateful();
        auxDisk.setFormat(format);
        auxDisk.setCapacityInBytes(capacityInBytes);
        auxDisk.setType(type);
        auxDisk.setLocation(address);
        auxDisk.setDestinationDatastore(destinationDatastore);
        auxDisk.setSequence(sequence);
        auxDisk.setDiskControllerType(controllerType);
        auxDisk.setName(name); // Used in XenServer

        secondaryDisks.getStatefulDisks().add(auxDisk);

        return this;
    }
View Full Code Here


        List<SecondaryDiskStateful> oldDisks = oldDefinition.getSecondaryDisks().getStatefulDisks();
        List<SecondaryDiskStateful> newDisks = newDefinition.getSecondaryDisks().getStatefulDisks();

        for (SecondaryDiskStateful newDisk : newDisks)
        {
            SecondaryDiskStateful oldDisk = isPersistentDiskContained(newDisk, oldDisks);
            if (oldDisk == null)
            {
                disks.add(new ReconfigureStatefulDisk(newDisk, DiskOp.ATTACH));
            }
            else if (!detectMovesbySequence && isChangedBusOrUnitNumber(oldDisk, newDisk)
                || detectMovesbySequence && oldDisk.getSequence() != newDisk.getSequence())
            {
                disks.add(new ReconfigureStatefulDisk(newDisk, DiskOp.MOVE_UNIT_NUMBER));
            }
        }

        for (SecondaryDiskStateful oldDisk : oldDisks)
        {
            SecondaryDiskStateful newDisk = isPersistentDiskContained(oldDisk, newDisks);
            if (newDisk == null)
            {
                disks.add(new ReconfigureStatefulDisk(oldDisk, DiskOp.DETACH));
            }
        }
View Full Code Here

        if (secondaryDisks == null)
        {
            secondaryDisks = new SecondaryDisks();
        }

        final SecondaryDiskStateful auxDisk = new SecondaryDiskStateful();
        auxDisk.setFormat(format);
        auxDisk.setCapacityInBytes(capacityInBytes);
        auxDisk.setType(type);
        auxDisk.setLocation(address);
        auxDisk.setDestinationDatastore(destinationDatastore);
        auxDisk.setSequence(sequence);
        auxDisk.setDiskControllerType(controllerType);
        auxDisk.setName(name); // Used in XenServer

        secondaryDisks.getStatefulDisks().add(auxDisk);

        return this;
    }
View Full Code Here

        List<SecondaryDiskStateful> oldDisks = oldDefinition.getSecondaryDisks().getStatefulDisks();
        List<SecondaryDiskStateful> newDisks = newDefinition.getSecondaryDisks().getStatefulDisks();

        for (SecondaryDiskStateful newDisk : newDisks)
        {
            SecondaryDiskStateful oldDisk = isPersistentDiskContained(newDisk, oldDisks);
            if (oldDisk == null)
            {
                disks.add(new ReconfigureStatefulDisk(newDisk, DiskOp.ATTACH));
            }
            else if (!detectMovesbySequence && isChangedBusOrUnitNumber(oldDisk, newDisk)
                || detectMovesbySequence && oldDisk.getSequence() != newDisk.getSequence())
            {
                disks.add(new ReconfigureStatefulDisk(newDisk, DiskOp.MOVE_UNIT_NUMBER));
            }
        }

        for (SecondaryDiskStateful oldDisk : oldDisks)
        {
            SecondaryDiskStateful newDisk = isPersistentDiskContained(oldDisk, newDisks);
            if (newDisk == null)
            {
                disks.add(new ReconfigureStatefulDisk(oldDisk, DiskOp.DETACH));
            }
        }
View Full Code Here

        if (secondaryDisks == null)
        {
            secondaryDisks = new SecondaryDisks();
        }

        final SecondaryDiskStateful auxDisk = new SecondaryDiskStateful();
        auxDisk.setFormat(format);
        auxDisk.setCapacityInBytes(capacityInBytes);
        auxDisk.setType(type);
        auxDisk.setLocation(address);
        auxDisk.setDestinationDatastore(destinationDatastore);
        auxDisk.setSequence(sequence);
        auxDisk.setDiskControllerType(controllerType);
        auxDisk.setName(name); // Used in XenServer

        secondaryDisks.getStatefulDisks().add(auxDisk);

        return this;
    }
View Full Code Here

TOP

Related Classes of com.abiquo.hypervisor.model.SecondaryDiskStateful

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.