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
public class Hypervisor extends Cloud
Represents a virtual datacenter.- Author:
- Marco Mornati, Philipp Bartsch
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
Hypervisor.DescriptorImpl
-
Nested 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
-
-
Method Summary
-
Methods inherited from class hudson.slaves.Cloud
all, canProvision, doConfigSubmit, doDoDelete, getACL, getDisplayName, getIcon, getIconAltText, getIconClassName, getSearchUrl, getUrl, provision, reconfigure, registerPermissions
-
Methods inherited from class hudson.model.Actionable
addAction, addOrReplaceAction, doContextMenu, getAction, getAction, getActions, getActions, getAllActions, getDynamic, removeAction, removeActions, replaceAction, replaceActions
-
Methods inherited from class hudson.model.AbstractModelObject
getSearch, getSearchIndex, getSearchName, makeSearchIndex, requirePOST, 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
-
-
-
-
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()
-
getDomains
public Map<String,IDomain> getDomains() throws VirtException
- Throws:
VirtException
-
getVirtualMachines
public List<VirtualMachine> 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
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)
-
canProvision
public boolean canProvision(Label label)
- Overrides:
canProvision
in classCloud
-
markVMOffline
public void markVMOffline(String slaveName, String vmName) throws VirtException
- Throws:
VirtException
-
finalize
protected void finalize() throws Throwable
-
getDescriptor
public Hypervisor.DescriptorImpl getDescriptor()
- Specified by:
getDescriptor
in interfaceDescribable<Cloud>
- Overrides:
getDescriptor
in classCloud
-
lookupSystemCredentials
public static com.cloudbees.plugins.credentials.common.StandardUsernamePasswordCredentials lookupSystemCredentials(String credentialsId)
-
getHypervisorURI
public String getHypervisorURI()
-
-