Package com.abiquo.hypervisor.model

Source Code of com.abiquo.hypervisor.model.HypervisorDefinition

/**
* Copyright (C) 2008 - Abiquo Holdings S.L. All rights reserved.
*
* Please see /opt/abiquo/tomcat/webapps/legal/ on Abiquo server
* or contact contact@abiquo.com for licensing information.
*/
package com.abiquo.hypervisor.model;

import java.util.LinkedList;
import java.util.List;

import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlType;

import com.abiquo.hypervisor.model.VirtualMachineDefinition.HardwareConfiguration;
import com.fasterxml.jackson.annotation.JsonIgnore;

/**
* Hypervisor host info including status, access info, hardware profile, disk and network devices
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "hypervisorDefinition", //
propOrder = {"name", "description", "version", "status", "statusInfo", "hardwareConfiguration",
"remoteManagementIp", "networkInterfaces", "datastores", "initiatorIQN", "vncIp"})
public class HypervisorDefinition
{
    /** Host name. (UCS distinguished name). */
    protected String name;

    /** UCS only. Friendly name (label). */
    protected String description;

    /** Hypervisor version. */
    protected String version;

    /** Current management state of the hypervisor. */
    protected HypervisorConnectionStatusType status;

    /** Additional state info. */
    protected String statusInfo;

    /** Hardware profile including CPU and RAM. */
    @XmlElement
    protected HardwareConfiguration hardwareConfiguration;

    /** List of network devices. */
    protected List<NetworkInterface> networkInterfaces;

    /** List of physical disk devices in the hypervisor host. */
    protected List<Datastore> datastores;

    /** Client IQN of the iSCSI driver in the hypervisor host. */
    private String initiatorIQN; // optional

    /** Whether it is a host management center (vCenter, for instance) */
    private String remoteManagementIp;

    /** The VNC ip */
    private String vncIp;

    /** Define the media type */
    @JsonIgnore
    public static final String MEDIA_TYPE_XML = "application/vnd.abiquo.hypervisordefinition+xml";

    public String getVersion()
    {
        return version;
    }

    public void setVersion(final String version)
    {
        this.version = version;
    }

    public HypervisorConnectionStatusType getStatus()
    {
        return status;
    }

    public void setStatus(final HypervisorConnectionStatusType status)
    {
        this.status = status;
    }

    public String getStatusInfo()
    {
        return statusInfo;
    }

    public void setStatusInfo(final String statusInfo)
    {
        this.statusInfo = statusInfo;
    }

    public String getInitiatorIQN()
    {
        return initiatorIQN;
    }

    public void setInitiatorIQN(final String initiatorIQN)
    {
        this.initiatorIQN = initiatorIQN;
    }

    public String getDescription()
    {
        return description;
    }

    public void setDescription(final String description)
    {
        this.description = description;
    }

    public String getName()
    {
        return name;
    }

    public void setName(final String name)
    {
        this.name = name;
    }

    public HardwareConfiguration getHardwareConfiguration()
    {
        if (this.hardwareConfiguration == null)
        {
            this.hardwareConfiguration = new HardwareConfiguration();
        }
        return hardwareConfiguration;
    }

    public void setHardwareConfiguration(final HardwareConfiguration hardwareConfiguration)
    {
        this.hardwareConfiguration = hardwareConfiguration;
    }

    public List<NetworkInterface> getNetworkInterfaces()
    {
        if (networkInterfaces == null)
        {
            networkInterfaces = new LinkedList<NetworkInterface>();
        }
        return networkInterfaces;
    }

    public void setNetworkInterfaces(final List<NetworkInterface> networkInterfaces)
    {
        this.networkInterfaces = networkInterfaces;
    }

    public List<Datastore> getDatastores()
    {
        if (datastores == null)
        {
            datastores = new LinkedList<Datastore>();
        }
        return datastores;
    }

    public void setDatastores(final List<Datastore> datastores)
    {
        this.datastores = datastores;
    }

    public String getRemoteManagementIp()
    {
        return remoteManagementIp;
    }

    public void setRemoteManagementIp(final String remoteManagementIp)
    {
        this.remoteManagementIp = remoteManagementIp;
    }

    public String getVncIp()
    {
        return vncIp;
    }

    public void setVncIp(final String vncIp)
    {
        this.vncIp = vncIp;
    }
}
TOP

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

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.