Class Hypervisor

All Implemented Interfaces:
ExtensionPoint, Describable<Cloud>, ModelObject, SearchableModelObject, SearchItem, AccessControlled, ModelObjectWithContextMenu

public class Hypervisor extends Cloud
Represents a virtual datacenter.
Author:
Marco Mornati, Philipp Bartsch
  • Constructor Details

    • Hypervisor

      @DataBoundConstructor public Hypervisor(String hypervisorType, String hypervisorTransport, String hypervisorHost, int hypervisorSshPort, String hypervisorSystemUrl, String username, int maxOnlineSlaves, String credentialsId)
  • Method Details

    • ensureLists

      protected void ensureLists()
    • getHypervisorHost

      public String getHypervisorHost()
    • getHypervisorSshPort

      public int getHypervisorSshPort()
    • getHypervisorType

      public String getHypervisorType()
    • getHypervisorTransport

      public String getHypervisorTransport()
    • getHypervisorSystemUrl

      public String getHypervisorSystemUrl()
    • getUsername

      public String getUsername()
    • getCredentialsId

      public String getCredentialsId()
    • getMaxOnlineSlaves

      public int getMaxOnlineSlaves()
    • getCurrentOnlineSlaveCount

      public int getCurrentOnlineSlaveCount()
    • getHypervisorDescription

      public String getHypervisorDescription()
    • getDomains

      public Map<String,IDomain> getDomains() throws VirtException
      Throws:
      VirtException
    • getVirtualMachines

      public List<VirtualMachine> getVirtualMachines()
      Returns a List of VMs configured on the hypervisor. This method always retrieves the current list of VMs to ensure that newly available instances show up right away.
      Returns:
      the virtual machines
    • getSnapshots

      public String[] getSnapshots(String virtualMachineName)
      Returns an array of snapshots names/ids of a given VM as found by libvirt.
      Parameters:
      virtualMachineName - the name of the vm
      Returns:
      the array of snapshot ids (can be empty)
    • provision

      public Collection<NodeProvisioner.PlannedNode> provision(Label label, int i)
      Overrides:
      provision in class Cloud
    • canProvision

      public boolean canProvision(Label label)
      Overrides:
      canProvision in class Cloud
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • canMarkVMOnline

      public Boolean canMarkVMOnline(String slaveName, String vmName)
    • markVMOnline

      public Boolean markVMOnline(String slaveName, String vmName)
    • markVMOffline

      public void markVMOffline(String slaveName, String vmName) throws VirtException
      Throws:
      VirtException
    • finalize

      protected void finalize() throws Throwable
      Overrides:
      finalize in class Object
      Throws:
      Throwable
    • getDescriptor

      public Hypervisor.DescriptorImpl getDescriptor()
      Specified by:
      getDescriptor in interface Describable<Cloud>
      Overrides:
      getDescriptor in class Cloud
    • lookupSystemCredentials

      public static com.cloudbees.plugins.credentials.common.StandardUsernamePasswordCredentials lookupSystemCredentials(String credentialsId)
    • getHypervisorURI

      public String getHypervisorURI()