Package com.abiquo.hypervisor.model

Examples of com.abiquo.hypervisor.model.SecondaryDiskStandard


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

        final SecondaryDiskStandard hdDisk = new SecondaryDiskStandard();
        hdDisk.setDiskManagementId(diskManagementId);
        hdDisk.setDiskManagementUUID(diskManagementUUID);
        hdDisk.setDestinationDatastore(datastorePath);
        hdDisk.setCapacityInBytes(diskCapacityInBytes);
        hdDisk.setDiskFileSizeInBytes(diskFileSizeInBytes);
        hdDisk.setFormat(null);
        hdDisk.setPath(null);
        hdDisk.setRepository(null);
        hdDisk.setRepositoryManagerAddress(null);
        hdDisk.setSequence(sequence);
        hdDisk.setDiskControllerType(controllerType);

        secondaryDisks.getStandardDisks().add(hdDisk);

        return this;
    }
View Full Code Here


        List<SecondaryDiskStandard> oldDisks = oldDefinition.getSecondaryDisks().getStandardDisks();
        List<SecondaryDiskStandard> newDisks = newDefinition.getSecondaryDisks().getStandardDisks();

        for (SecondaryDiskStandard newDisk : newDisks)
        {
            SecondaryDiskStandard oldDisk = isStandardDiskContained(newDisk, oldDisks);
            if (oldDisk == null)
            {
                disks.add(new ReconfigureStandardDisk(newDisk, DiskOp.ATTACH));
            }
            else if (!detectMovesbySequence && isChangedBusOrUnitNumber(oldDisk, newDisk)
                || detectMovesbySequence && oldDisk.getSequence() != newDisk.getSequence())
            {
                disks.add(new ReconfigureStandardDisk(newDisk, DiskOp.MOVE_UNIT_NUMBER));
            }
            else if (oldDisk.getCapacityInBytes() != newDisk.getCapacityInBytes())
            {
                disks.add(new ReconfigureStandardDisk(newDisk, DiskOp.RESIZE));
            }
        }

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

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

        final SecondaryDiskStandard hdDisk = new SecondaryDiskStandard();
        hdDisk.setDiskManagementId(diskManagementId);
        hdDisk.setDiskManagementUUID(diskManagementUUID);
        hdDisk.setDestinationDatastore(datastorePath);
        hdDisk.setCapacityInBytes(diskCapacityInBytes);
        hdDisk.setDiskFileSizeInBytes(diskFileSizeInBytes);
        hdDisk.setFormat(null);
        hdDisk.setPath(null);
        hdDisk.setRepository(null);
        hdDisk.setRepositoryManagerAddress(null);
        hdDisk.setSequence(sequence);
        hdDisk.setDiskControllerType(controllerType);

        secondaryDisks.getStandardDisks().add(hdDisk);

        return this;
    }
View Full Code Here

        List<SecondaryDiskStandard> oldDisks = oldDefinition.getSecondaryDisks().getStandardDisks();
        List<SecondaryDiskStandard> newDisks = newDefinition.getSecondaryDisks().getStandardDisks();

        for (SecondaryDiskStandard newDisk : newDisks)
        {
            SecondaryDiskStandard oldDisk = isStandardDiskContained(newDisk, oldDisks);
            if (oldDisk == null)
            {
                disks.add(new ReconfigureStandardDisk(newDisk, DiskOp.ATTACH));
            }
            else if (!detectMovesbySequence && isChangedBusOrUnitNumber(oldDisk, newDisk)
                || detectMovesbySequence && oldDisk.getSequence() != newDisk.getSequence())
            {
                disks.add(new ReconfigureStandardDisk(newDisk, DiskOp.MOVE_UNIT_NUMBER));
            }
            else if (oldDisk.getCapacityInBytes() != newDisk.getCapacityInBytes())
            {
                final long oldCapacity = oldDisk.getCapacityInBytes();
                final long newCapacity = newDisk.getCapacityInBytes();

                if (oldCapacity < newCapacity)
                {
                    disks.add(new ReconfigureStandardDisk(newDisk, DiskOp.INCREASE_SIZE));
                }
                else
                {
                    disks.add(new ReconfigureStandardDisk(newDisk, DiskOp.DECREASE_SIZE));
                }
            }
        }

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

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

        final SecondaryDiskStandard hdDisk = new SecondaryDiskStandard();
        hdDisk.setDiskManagementId(diskManagementId);
        hdDisk.setDiskManagementUUID(diskManagementUUID);
        hdDisk.setDestinationDatastore(datastorePath);
        hdDisk.setCapacityInBytes(diskCapacityInBytes);
        hdDisk.setDiskFileSizeInBytes(diskFileSizeInBytes);
        hdDisk.setFormat(null);
        hdDisk.setPath(null);
        hdDisk.setRepository(null);
        hdDisk.setRepositoryManagerAddress(null);
        hdDisk.setSequence(sequence);
        hdDisk.setDiskControllerType(controllerType);

        secondaryDisks.getStandardDisks().add(hdDisk);

        return this;
    }
View Full Code Here

TOP

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

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.