Package hudson.plugins.libvirt
Class Hypervisor
java.lang.Object
hudson.model.AbstractModelObject
hudson.model.Actionable
hudson.slaves.Cloud
hudson.plugins.libvirt.Hypervisor
- All Implemented Interfaces:
ExtensionPoint,Describable<Cloud>,ModelObject,SearchableModelObject,SearchItem,AccessControlled,ModelObjectWithContextMenu
Represents a virtual datacenter.
- Author:
- Marco Mornati, Philipp Bartsch
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from class hudson.slaves.Cloud
Cloud.CloudStateNested classes/interfaces inherited from interface hudson.ExtensionPoint
ExtensionPoint.LegacyInstancesAreScopedToHudsonNested classes/interfaces inherited from interface jenkins.model.ModelObjectWithContextMenu
ModelObjectWithContextMenu.ContextMenu, ModelObjectWithContextMenu.ContextMenuVisibility, ModelObjectWithContextMenu.MenuItem, ModelObjectWithContextMenu.MenuItemType -
Field Summary
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncanMarkVMOnline(String slaveName, String vmName) booleancanProvision(Label label) protected voidprotected voidfinalize()intintintString[]getSnapshots(String virtualMachineName) Returns an array of snapshots names/ids of a given VM as found by libvirt.Returns aListof VMs configured on the hypervisor.static com.cloudbees.plugins.credentials.common.StandardUsernamePasswordCredentialslookupSystemCredentials(String credentialsId) voidmarkVMOffline(String slaveName, String vmName) markVMOnline(String slaveName, String vmName) toString()Methods inherited from class hudson.slaves.Cloud
all, canProvision, doConfigSubmit, doDoDelete, getACL, getDisplayName, getIcon, getIconAltText, getIconClassName, getSearchUrl, getUrl, provision, reconfigure, reconfigure, registerPermissionsMethods inherited from class hudson.model.Actionable
addAction, addOrReplaceAction, doContextMenu, doContextMenu, getAction, getAction, getActions, getActions, getAllActions, getDynamic, getDynamic, removeAction, removeActions, replaceAction, replaceActionsMethods inherited from class hudson.model.AbstractModelObject
getSearch, getSearchIndex, getSearchName, makeSearchIndex, requirePOST, sendError, sendError, sendError, sendError, sendError, sendError, sendError, sendErrorMethods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface hudson.security.AccessControlled
checkAnyPermission, checkPermission, hasAnyPermission, hasPermission, hasPermission, hasPermission2
-
Constructor Details
-
Hypervisor
-
-
Method Details
-
ensureLists
protected void ensureLists() -
getHypervisorHost
-
getHypervisorSshPort
public int getHypervisorSshPort() -
getHypervisorType
-
getHypervisorTransport
-
getHypervisorSystemUrl
-
getUsername
-
getCredentialsId
-
getMaxOnlineSlaves
public int getMaxOnlineSlaves() -
getCurrentOnlineSlaveCount
public int getCurrentOnlineSlaveCount() -
getHypervisorDescription
-
getDomains
- Throws:
VirtException
-
getVirtualMachines
Returns aListof 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
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
-
canProvision
- Overrides:
canProvisionin classCloud
-
toString
-
canMarkVMOnline
-
markVMOnline
-
markVMOffline
- Throws:
VirtException
-
finalize
-
getDescriptor
- Specified by:
getDescriptorin interfaceDescribable<Cloud>- Overrides:
getDescriptorin classCloud
-
lookupSystemCredentials
public static com.cloudbees.plugins.credentials.common.StandardUsernamePasswordCredentials lookupSystemCredentials(String credentialsId) -
getHypervisorURI
-