All Downloads are FREE. Search and download functionalities are using the official Maven repository.

types.Vm Maven / Gradle / Ivy

There is a newer version: 4.6.0
Show newest version
/*
Copyright (c) 2015-2016 Red Hat, Inc.

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

  http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/

package types;

import org.ovirt.api.metamodel.annotations.Link;
import org.ovirt.api.metamodel.annotations.Type;

import java.util.Date;

/**
 * Represents a virtual machine.
 *
 * @author Marek Libra 
 * @date 12 Dec 2016
 * @status added
 */
@Type
public interface Vm extends VmBase {
    /**
     * The current status of the virtual machine.
     *
     * @author Marek Libra 
     * @date 12 Dec 2016
     * @status added
     */
    VmStatus status();

    /**
     * Human readable detail of current status.
     *
     * @author Marek Libra 
     * @date 12 Dec 2016
     * @status added
     */
    String statusDetail();

    /**
     * The reason the virtual machine was stopped.
     * Optionally set by user when shutting down the virtual machine.
     *
     * @author Marek Libra 
     * @date 12 Dec 2016
     * @status added
     */
    String stopReason();

    /**
     * The date in which the virtual machine was started.
     *
     * @author Marek Libra 
     * @date 12 Dec 2016
     * @status added
     */
    Date startTime();

    /**
     * The date in which the virtual machine was stopped.
     *
     * @author Marek Libra 
     * @date 12 Dec 2016
     * @status added
     */
    Date stopTime();

    /**
     * If `true`, the virtual machine has been started using the _run once_ command, meaning
     * it's configuration might differ from the stored one for the purpose of this single run.
     *
     * @author Marek Libra 
     * @date 12 Dec 2016
     * @status added
     */
    Boolean runOnce();

    /**
     * Optional payloads of the virtual machine, used for ISOs to configure it.
     *
     * @author Marek Libra 
     * @date 12 Dec 2016
     * @status added
     */
    Payload[] payloads();

    /**
     * Fully qualified domain name of the virtual machine.
     *
     * @author Marek Libra 
     * @date 12 Dec 2016
     * @status added
     */
    String fqdn();

    /**
     * If `true`, the virtual machine is reconfigured to the latest version of it's template when it is started.
     *
     * @author Marek Libra 
     * @date 12 Dec 2016
     * @status added
     */
    Boolean useLatestTemplateVersion();

    /**
     * Virtual machine configuration has been changed and requires restart of the virtual machine.
     * Changed configuration is applied at processing the virtual machine's _shut down_.
     *
     * @author Marek Libra 
     * @date 12 Dec 2016
     * @status added
     */
    Boolean nextRunConfigurationExists();

    /**
     * How the NUMA topology is applied.
     * Deprecated in favor of NUMA tune per vNUMA node.
     *
     * @author Marek Libra 
     * @author Liran Rotenberg 
     * @date 23 Nov 2020
     * @status added
     */
    @Deprecated
    NumaTuneMode numaTuneMode();

    /**
     * What time zone is used by the virtual machine (as returned by guest agent).
     *
     * @author Marek Libra 
     * @date 12 Dec 2016
     * @status added
     */
    TimeZone guestTimeZone();

    /**
     * What operating system is installed on the virtual machine.
     *
     * @author Marek Libra 
     * @date 12 Dec 2016
     * @status added
     */
    GuestOperatingSystem guestOperatingSystem();

    /**
     * Indicates whether the virtual machine has snapshots with disks in `ILLEGAL` state.
     *
     * @author Ala Hino 
     * @author Tahlia Richardson 
     * @date 11 Aug 2017
     * @status updated_by_docs
     * @since 4.1.9
     */
    Boolean hasIllegalImages();


    /**
     * Reference to the host the virtual machine is running on.
     *
     * @author Marek Libra 
     * @date 12 Dec 2016
     * @status added
     */
    @Link Host host();

    /**
     * Reference to the template the virtual machine is based on.
     *
     * @author Marek Libra 
     * @date 12 Dec 2016
     * @status added
     */
    @Link Template template();

    /**
     * References the original template used to create the virtual machine.
     *
     * If the virtual machine is cloned from a template or another virtual machine,
     * the `template` links to the Blank template, and the `original_template`
     * is used to track history.
     *
     * Otherwise the `template` and `original_template` are the same.
     *
     * @author Marek Libra 
     * @author Byron Gravenorst 
     * @date 02 Dec 2016
     * @status updated_by_docs
     */
    @Link Template originalTemplate();

    /**
     * The virtual machine configuration can be optionally predefined via one of the instance types.
     *
     * @author Marek Libra 
     * @date 12 Dec 2016
     * @status added
     */
    @Link InstanceType instanceType();

    /**
     * References the list of network interface devices on the virtual machine.
     *
     * @author Martin Mucha 
     * @author Byron Gravenorst 
     * @date 02 Dec 2016
     * @status updated_by_docs
     */
    @Link Nic[] nics();

    /**
     * Refers to all snapshots taken from the virtual machine.
     *
     * @author Marek Libra 
     * @date 12 Dec 2016
     * @status added
     */
    @Link Snapshot[] snapshots();

    /**
     * Reference to the pool the virtual machine is optionally member of.
     *
     * @author Marek Libra 
     * @date 12 Dec 2016
     * @status added
     */
    @Link VmPool vmPool();

    /**
     * Reference to the ISO mounted to the CDROM.
     *
     * @author Marek Libra 
     * @date 12 Dec 2016
     * @status added
     */
    @Link Cdrom[] cdroms();

    /**
     * Reference to the ISO mounted to the floppy.
     *
     * @author Marek Libra 
     * @date 12 Dec 2016
     * @status added
     */
    @Link Floppy[] floppies();
    @Link ReportedDevice[] reportedDevices();

    /**
     * Refers to the Watchdog configuration.
     *
     * @author Marek Libra 
     * @date 12 Dec 2016
     * @status added
     */
    @Link Watchdog[] watchdogs();

    /**
     * Permissions set for this virtual machine.
     *
     * @author Marek Libra 
     * @date 12 Dec 2016
     * @status added
     */
    @Link Permission[] permissions();
    @Link ExternalHostProvider externalHostProvider();

    /**
     * Optional. Used for labeling of sub-clusters.
     *
     * @author Marek Libra 
     * @date 12 Dec 2016
     * @status added
     */
    @Link AffinityLabel[] affinityLabels();

    /**
     * List of applications installed on the virtual machine.
     *
     * @author Marek Libra 
     * @date 12 Dec 2016
     * @status added
     */
    @Link Application[] applications();

    /**
     * List of graphics consoles configured for this virtual machine.
     *
     * @author Marek Libra 
     * @date 12 Dec 2016
     * @status added
     */
    @Link GraphicsConsole[] graphicsConsoles();

    /**
     * References devices associated to this virtual machine.
     *
     * @author Marek Libra 
     * @date 12 Dec 2016
     * @status added
     */
    @Link HostDevice[] hostDevices();

    /**
     * Lists all the Katello errata assigned to the virtual machine.
     *
     * [source]
     * ----
     * GET /ovirt-engine/api/vms/123/katelloerrata
     * ----
     *
     * You will receive response in XML like this one:
     *
     * [source,xml]
     * ----
     * 
     *   
     *     RHBA-2013:XYZ
     *     The description of the erratum
     *     some bug fix update
     *     bugfix
     *     2013-11-20T02:00:00.000+02:00
     *     Few guidelines regarding the solution
     *     Updated packages that fix one bug are now available for XYZ
     *     
     *       
     *         libipa_hbac-1.9.2-82.11.el6_4.i686
     *       
     *       ...
     *     
     *   
     *   ...
     * 
     * ----
     *
     * @author Moti Asayag 
     * @date 12 Dec 2016
     * @status added
     */
    @Link KatelloErratum[] katelloErrata();

    /**
     * Refers to the NUMA Nodes configuration used by this virtual machine.
     *
     * @author Marek Libra 
     * @date 12 Dec 2016
     * @status added
     */
    @Link NumaNode[] numaNodes();

    /**
     * List of user sessions opened for this virtual machine.
     *
     * @author Marek Libra 
     * @date 12 Dec 2016
     * @status added
     */
    @Link Session[] sessions();

    /**
     * Statistics data collected from this virtual machine.
     *
     * Note that some statistics, notably `memory.buffered` and `memory.cached`
     * are available only when https://www.ovirt.org/documentation/vmm-guide/chap-Installing_Linux_Virtual_Machines.html#installing-guest-agents-and-drivers[oVirt guest agent]
     * is installed in the virtual machine.
     *
     * @author Marek Libra 
     * @date 12 Dec 2016
     * @status added
     */
    @Link Statistic[] statistics();
    @Link Tag[] tags();

    /**
     * References the disks attached to the virtual machine.
     *
     * @author Byron Gravenorst 
     * @date 02 Dec 2016
     * @status updated_by_docs
     */
    @Link DiskAttachment[] diskAttachments();
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy