Package jenkins.plugins.jclouds.compute
Class JCloudsComputer
- java.lang.Object
-
- hudson.model.AbstractModelObject
-
- hudson.model.Actionable
-
- hudson.model.Computer
-
- hudson.slaves.SlaveComputer
-
- hudson.slaves.AbstractCloudComputer<JCloudsSlave>
-
- jenkins.plugins.jclouds.compute.JCloudsComputer
-
- All Implemented Interfaces:
ExtensionPoint
,DescriptorByNameOwner
,ExecutorListener
,ModelObject
,SearchableModelObject
,SearchItem
,AccessControlled
,ModelObjectWithContextMenu
,org.jenkinsci.plugins.cloudstats.TrackedItem
,StaplerProxy
public class JCloudsComputer extends AbstractCloudComputer<JCloudsSlave> implements org.jenkinsci.plugins.cloudstats.TrackedItem
JClouds version of JenkinsSlaveComputer
- responsible for terminating an instance.- Author:
- Vijay Kiran
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class hudson.model.Computer
Computer.DisplayExecutor, Computer.TerminationRequest
-
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
-
-
Field Summary
-
Fields inherited from class hudson.model.Computer
BUILD, CONFIGURE, CONNECT, CREATE, DELETE, DISCONNECT, EXTENDED_READ, EXTENDED_READ_AND_CONNECT, nodeName, offlineCause, PERMISSIONS, SKIP_PERMISSION_CHECK, statusChangeLock, threadPoolForRemoting, transientActions
-
-
Constructor Summary
Constructors Constructor Description JCloudsComputer(JCloudsSlave slave)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
deleteSlave()
Delete the slave, terminate or suspend the instance.void
deleteSlave(boolean logging)
Delete the slave, terminate or suspend the instance.HttpResponse
doDoDelete()
Deletes a jenkins slave node.String
getCloudName()
org.jenkinsci.plugins.cloudstats.ProvisioningActivity.Id
getId()
String
getInstanceId()
String
getPrivateIpAddresses()
String
getPrivateIpAddressHeader()
String
getPublicIpAddresses()
String
getPublicIpAddressHeader()
int
getRetentionTime()
-
Methods inherited from class hudson.slaves.AbstractCloudComputer
getNode
-
Methods inherited from class hudson.slaves.SlaveComputer
_connect, disconnect, doDoDisconnect, doJenkinsAgentJnlp, doLaunchSlaveAgent, doSlaveAgentJnlp, getAbsoluteRemoteFs, getAbsoluteRemotePath, getChannel, getChannelToMaster, getClassLoadingCount, getClassLoadingPrefetchCacheCount, getClassLoadingTime, getDefaultCharset, getDelegatedLauncher, getEnvVarsFull, getIconClassName, getJnlpJars, getJnlpMac, getLauncher, getListener, getLogRecords, getOSDescription, getResourceLoadingCount, getResourceLoadingTime, getRetentionStrategy, getSlaveVersion, getSystemInfoExtensions, getTarget, grabLauncher, isAcceptingTasks, isConnecting, isJnlpAgent, isLaunchSupported, isUnix, kill, openLogFile, setAcceptingTasks, setChannel, setChannel, setChannel, setChannel, setNode, taskAccepted, taskCompleted, taskCompletedWithProblems, taskStarted, tryReconnect
-
Methods inherited from class hudson.model.Computer
_doScript, addAction, buildEnvironment, cliConnect, cliDisconnect, cliOffline, cliOnline, connect, countBusy, countExecutors, countIdle, currentComputer, disconnect, doChangeOfflineCause, doConfigDotXml, doConfigSubmit, doDumpExportTable, doProgressiveLog, doRssAll, doRssFailed, doRssLatest, doScript, doScriptText, doToggleOffline, getACL, getActions, getAllExecutors, getApi, getAssignedLabels, getBuilds, getCaption, getComputerPanelBoxs, getConnectTime, getDemandStartMilliseconds, getDescription, getDisplayExecutors, getDisplayName, getEnvironment, getEnvVars, getExecutors, getHeapDump, getHostName, getIcon, getIconAltText, getIdleStartMilliseconds, getLoadStatistics, getLog, getLogDir, getLogFile, getLogText, getMonitorData, getName, getNumExecutors, getOfflineCause, getOfflineCauseReason, getOneOffExecutors, getSearchUrl, getSystemProperties, getTerminatedBy, getThreadDump, getTiedJobs, getTimeline, getUrl, getWorkspaceList, interrupt, isAlive, isIdle, isManualLaunchAllowed, isOffline, isOnline, isPartiallyIdle, isTemporarilyOffline, launch, onRemoved, recordTermination, relocateOldLogs, removeExecutor, resolveForCLI, setTemporarilyOffline, setTemporarilyOffline, updateByXml, waitUntilOffline, waitUntilOnline
-
Methods inherited from class hudson.model.Actionable
addOrReplaceAction, doContextMenu, getAction, getAction, 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, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface hudson.security.AccessControlled
checkAnyPermission, checkPermission, hasAnyPermission, hasPermission, hasPermission, hasPermission2
-
Methods inherited from interface hudson.model.DescriptorByNameOwner
getDescriptorByName
-
-
-
-
Constructor Detail
-
JCloudsComputer
public JCloudsComputer(JCloudsSlave slave)
-
-
Method Detail
-
getInstanceId
public String getInstanceId()
-
getRetentionTime
public int getRetentionTime()
-
getCloudName
@CheckForNull public String getCloudName()
-
doDoDelete
public HttpResponse doDoDelete() throws IOException
Deletes a jenkins slave node. The not is first marked pending delete and the actual deletion will be performed at the next run ofJCloudsCleanupThread
. If called again after already being marked, the deletion is performed immediately.- Overrides:
doDoDelete
in classAbstractCloudComputer<JCloudsSlave>
- Throws:
IOException
-
deleteSlave
public void deleteSlave() throws IOException, InterruptedException
Delete the slave, terminate or suspend the instance. Can be called either by doDoDelete() or from JCloudsRetentionStrategy. Whether the instance gets terminated or suspended is handled inJCloudsSlave._terminate(hudson.model.TaskListener)
- Throws:
InterruptedException
- if the deletion gets interrupted.IOException
- if an error occurs.
-
deleteSlave
public void deleteSlave(boolean logging)
Delete the slave, terminate or suspend the instance. LikedeleteSlave()
, but catching all exceptions and logging the if desired.- Parameters:
logging
-true
, if exception logging is desired.
-
getPublicIpAddressHeader
public String getPublicIpAddressHeader()
-
getPrivateIpAddressHeader
public String getPrivateIpAddressHeader()
-
getPublicIpAddresses
public String getPublicIpAddresses()
-
getPrivateIpAddresses
public String getPrivateIpAddresses()
-
getId
@Nullable public org.jenkinsci.plugins.cloudstats.ProvisioningActivity.Id getId()
- Specified by:
getId
in interfaceorg.jenkinsci.plugins.cloudstats.TrackedItem
-
-