Examples of MemorySizeUnit


Examples of com.abiquo.am.model.MemorySizeUnit

                    if (rasdType.getAllocationUnits() != null
                        & rasdType.getAllocationUnits().getValue() != null)
                    {
                        final String allocationUnits = rasdType.getAllocationUnits().getValue();

                        final MemorySizeUnit ramSizeUnit = getMemoryUnitsFromOVF(allocationUnits);
                    }
                }
                else if (CIMResourceTypeEnum.Disk_Drive.getNumericResourceType() == resTnumeric)
                {
                    // HD requirements are extracted from the associated Disk on ''hostResource''
                    String diskId = getVirtualSystemDiskId(rasdType.getHostResource());

                    if (!diskIdToDiskFormat.containsKey(diskId))
                    {
                        throw new RequiredAttributeException(
                            "Virtual System makes reference to an undeclared disk " + diskId);
                    }

                    VirtualDiskDescType diskDescType = diskIdToDiskFormat.get(diskId);

                    String capacity = diskDescType.getCapacity();

                    hd = Long.parseLong(capacity);

                    final String allocationUnits = diskDescType.getCapacityAllocationUnits();
                    final MemorySizeUnit hdSizeUnit = getMemoryUnitsFromOVF(allocationUnits);
                }
            }// rasd

            if (cpu == null)
            {
View Full Code Here

Examples of com.abiquo.am.model.MemorySizeUnit

                if (rasdType.getAllocationUnits() != null
                    & rasdType.getAllocationUnits().getValue() != null)
                {
                    final String allocationUnits = rasdType.getAllocationUnits().getValue();

                    final MemorySizeUnit ramSizeUnit = getMemoryUnitsFromOVF(allocationUnits);

                    dReq.setRamSizeUnit(ramSizeUnit);
                }
            }
            else if (CIMResourceTypeEnum.Disk_Drive.getNumericResourceType() == resTnumeric)
            {
                // HD requirements are extracted from the associated Disk on ''hostResource''
                String diskId = getVirtualSystemDiskId(rasdType.getHostResource());

                if (!diskDescByName.containsKey(diskId))
                {
                    String msg = "DiskId [" + diskId + "] not found on disk section";
                    throw new IdAlreadyExistsException(msg);
                }

                if (!diskIdToVSs.containsKey(diskId))
                {
                    List<String> vss = new LinkedList<String>();
                    vss.add(vsystem.getId()); // XXX

                    diskIdToVSs.put(diskId, vss);
                }
                else
                {
                    diskIdToVSs.get(diskId).add(vsystem.getId());
                }

                VirtualDiskDescType diskDescType = diskDescByName.get(diskId);

                String capacity = diskDescType.getCapacity();

                dReq.setHd(Long.parseLong(capacity));

                final String allocationUnits = diskDescType.getCapacityAllocationUnits();
                final MemorySizeUnit hdSizeUnit = getMemoryUnitsFromOVF(allocationUnits);

                dReq.setHdSizeUnit(hdSizeUnit);
                // dReq.setImageSize(diskDescType.get);
            }
            else if (CIMResourceTypeEnum.Ethernet_Adapter.getNumericResourceType() == resTnumeric)
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.