Examples of VirtualHardwareSectionType


Examples of org.dmtf.schemas.ovf.envelope._1.VirtualHardwareSectionType

    {
        VirtualSystemType vsystem =
            OVFEnvelopeUtils.createVirtualSystem(disk.getName(), disk.getName(), disk
                .getDescription());

        VirtualHardwareSectionType vhs = createVirtualHardwareSection(disk);

        OVFEnvelopeUtils.addSection(vsystem, vhs);

        return vsystem;
    }
View Full Code Here

Examples of org.dmtf.schemas.ovf.envelope._1.VirtualHardwareSectionType

     * on the OVF Envelope.
     */
    private static VirtualHardwareSectionType createVirtualHardwareSection(final TemplateDto disk)
        throws RequiredAttributeException
    {
        VirtualHardwareSectionType vhsection = new VirtualHardwareSectionType();

        VSSDType vsystem = new VSSDType();
        vsystem.setVirtualSystemType(CIMTypesUtils.createString(VIRTUAL_SYSTEM_TYPE));
        vhsection.setSystem(vsystem);

        CIMResourceAllocationSettingDataType cpu =
            CIMResourceAllocationSettingDataUtils.createResourceAllocationSettingData("Cpu", "1",
                CIMResourceTypeEnum.Processor, disk.getCpu(), null);

View Full Code Here

Examples of org.dmtf.schemas.ovf.envelope._1.VirtualHardwareSectionType

                        + "abicloud only deal with single virtual system based OVFs");
            }

            VirtualSystemType vsystem = (VirtualSystemType) content;

            VirtualHardwareSectionType hardwareSectionType;
            Integer cpu = null;
            Long hd = null;
            Long ram = null;

            try
            {
                hardwareSectionType =
                    OVFEnvelopeUtils.getSection(vsystem, VirtualHardwareSectionType.class);
            }
            catch (InvalidSectionException e)
            {
                throw new SectionNotPresentException("VirtualHardware on a virtualSystem", e);
            }

            for (RASDType rasdType : hardwareSectionType.getItem())
            {

                ResourceType resourceType = rasdType.getResourceType();
                if (resourceType == null) // empty rasd element
                {
View Full Code Here

Examples of org.dmtf.schemas.ovf.envelope._1.VirtualHardwareSectionType

        final Map<String, VirtualDiskDescType> diskDescByName,
        final Map<String, List<String>> diskIdToVSs) throws IdAlreadyExistsException,
        RequiredAttributeException, SectionNotPresentException
    {
        TemplateDto dReq = new TemplateDto();
        VirtualHardwareSectionType hardwareSectionType;

        try
        {
            hardwareSectionType =
                OVFEnvelopeUtils.getSection(vsystem, VirtualHardwareSectionType.class);
        }
        catch (InvalidSectionException e)
        {
            throw new SectionNotPresentException("VirtualHardware on a virtualSystem", e);
        }

        dReq.setCpu(-1);
        dReq.setHd(Long.valueOf(-1));
        dReq.setRam(Long.valueOf(-1));

        // XXX now we are using ONLY the Disk format

        // XXX String vsType = hardwareSectionType.getSystem().getVirtualSystemType().getValue();
        // XXX dReq.setImageType(vsType);
        // XXX log.debug("Using ''virtualSystemType'' [{}]", vsType);

        for (RASDType rasdType : hardwareSectionType.getItem())
        {
            ResourceType resourceType = rasdType.getResourceType();
            int resTnumeric = Integer.parseInt(resourceType.getValue());

            // TODO use CIMResourceTypeEnum from value and then a SWITCH
View Full Code Here

Examples of org.dmtf.schemas.ovf.envelope._1.VirtualHardwareSectionType

                    + "abicloud only deal with single virtual system based OVFs");
            }

            VirtualSystemType vsystem = (VirtualSystemType) content;

            VirtualHardwareSectionType hardwareSectionType;
            Integer cpu = null;
            Long hd = null;
            Long ram = null;

            try
            {
                hardwareSectionType =
                    OVFEnvelopeUtils.getSection(vsystem, VirtualHardwareSectionType.class);
            }
            catch (InvalidSectionException e)
            {
                throw new SectionNotPresentException("VirtualHardware on a virtualSystem", e);
            }

            for (RASDType rasdType : hardwareSectionType.getItem())
            {

                ResourceType resourceType = rasdType.getResourceType();
                if (resourceType == null) // empty rasd element
                {
View Full Code Here

Examples of org.dmtf.schemas.ovf.envelope._1.VirtualHardwareSectionType

        final Map<String, VirtualDiskDescType> diskDescByName,
        final Map<String, List<String>> diskIdToVSs) throws IdAlreadyExistsException,
        RequiredAttributeException, SectionNotPresentException
    {
        TemplateDto dReq = new TemplateDto();
        VirtualHardwareSectionType hardwareSectionType;

        try
        {
            hardwareSectionType =
                OVFEnvelopeUtils.getSection(vsystem, VirtualHardwareSectionType.class);
        }
        catch (InvalidSectionException e)
        {
            throw new SectionNotPresentException("VirtualHardware on a virtualSystem", e);
        }

        dReq.setRequiredCpu(-1);
        dReq.setRequiredRamInMB(-1l);
        dReq.setRequiredHDInMB(-1l);

        // XXX now we are using ONLY the Disk format

        // XXX String vsType = hardwareSectionType.getSystem().getVirtualSystemType().getValue();
        // XXX dReq.setImageType(vsType);
        // XXX log.debug("Using ''virtualSystemType'' [{}]", vsType);

        for (RASDType rasdType : hardwareSectionType.getItem())
        {
            ResourceType resourceType = rasdType.getResourceType();
            int resTnumeric = Integer.parseInt(resourceType.getValue());

            // TODO use CIMResourceTypeEnum from value and then a SWITCH
View Full Code Here

Examples of org.dmtf.schemas.ovf.envelope._1.VirtualHardwareSectionType

    {
        VirtualSystemType vsystem =
            OVFEnvelopeUtils.createVirtualSystem(disk.getName(), disk.getName(),
                disk.getDescription());

        VirtualHardwareSectionType vhs = createVirtualHardwareSection(disk);

        OVFEnvelopeUtils.addSection(vsystem, vhs);

        return vsystem;
    }
View Full Code Here

Examples of org.dmtf.schemas.ovf.envelope._1.VirtualHardwareSectionType

     * on the OVF Envelope.
     */
    private static VirtualHardwareSectionType createVirtualHardwareSection(final TemplateDto disk)
        throws RequiredAttributeException
    {
        VirtualHardwareSectionType vhsection = new VirtualHardwareSectionType();

        VSSDType vsystem = new VSSDType();
        vsystem.setVirtualSystemType(CIMTypesUtils.createString(VIRTUAL_SYSTEM_TYPE));
        vhsection.setSystem(vsystem);

        CIMResourceAllocationSettingDataType cpu =
            CIMResourceAllocationSettingDataUtils.createResourceAllocationSettingData("Cpu", "1",
                CIMResourceTypeEnum.Processor, disk.getRequiredCpu(), null);

View Full Code Here

Examples of org.dmtf.schemas.ovf.envelope._1.VirtualHardwareSectionType

    {
        VirtualSystemType vsystem =
            OVFEnvelopeUtils.createVirtualSystem(disk.getName(), disk.getName(),
                disk.getDescription());

        VirtualHardwareSectionType vhs = createVirtualHardwareSection(disk);

        OVFEnvelopeUtils.addSection(vsystem, vhs);

        return vsystem;
    }
View Full Code Here

Examples of org.dmtf.schemas.ovf.envelope._1.VirtualHardwareSectionType

     * on the OVF Envelope.
     */
    private static VirtualHardwareSectionType createVirtualHardwareSection(final TemplateDto disk)
        throws RequiredAttributeException
    {
        VirtualHardwareSectionType vhsection = new VirtualHardwareSectionType();

        VSSDType vsystem = new VSSDType();
        vsystem.setVirtualSystemType(CIMTypesUtils.createString(VIRTUAL_SYSTEM_TYPE));
        vhsection.setSystem(vsystem);

        CIMResourceAllocationSettingDataType cpu =
            CIMResourceAllocationSettingDataUtils.createResourceAllocationSettingData("Cpu", "1",
                CIMResourceTypeEnum.Processor, disk.getRequiredCpu(), null);

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.