Class Hypervisor

    • Constructor Detail

      • Hypervisor

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

      • 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()
      • 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)
      • lookupSystemCredentials

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

        public String getHypervisorURI()