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.CloudState
Nested classes/interfaces inherited from interface hudson.ExtensionPoint
ExtensionPoint.LegacyInstancesAreScopedToHudson
Nested 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) boolean
canProvision
(Label label) protected void
protected void
finalize()
int
int
int
String[]
getSnapshots
(String virtualMachineName) Returns an array of snapshots names/ids of a given VM as found by libvirt.Returns aList
of VMs configured on the hypervisor.static com.cloudbees.plugins.credentials.common.StandardUsernamePasswordCredentials
lookupSystemCredentials
(String credentialsId) void
markVMOffline
(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, registerPermissions
Methods inherited from class hudson.model.Actionable
addAction, addOrReplaceAction, doContextMenu, doContextMenu, getAction, getAction, getActions, getActions, getAllActions, getDynamic, getDynamic, removeAction, removeActions, replaceAction, replaceActions
Methods inherited from class hudson.model.AbstractModelObject
getSearch, getSearchIndex, getSearchName, makeSearchIndex, requirePOST, sendError, sendError, sendError, sendError, sendError, sendError, sendError, sendError
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods 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 aList
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
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:
canProvision
in classCloud
-
toString
-
canMarkVMOnline
-
markVMOnline
-
markVMOffline
- Throws:
VirtException
-
finalize
-
getDescriptor
- Specified by:
getDescriptor
in interfaceDescribable<Cloud>
- Overrides:
getDescriptor
in classCloud
-
lookupSystemCredentials
public static com.cloudbees.plugins.credentials.common.StandardUsernamePasswordCredentials lookupSystemCredentials(String credentialsId) -
getHypervisorURI
-