Class JCloudsSlave
java.lang.Object
hudson.model.AbstractModelObject
hudson.model.Node
hudson.model.Slave
hudson.slaves.AbstractCloudSlave
jenkins.plugins.openstack.compute.JCloudsSlave
- All Implemented Interfaces:
ExtensionPoint
,Describable<Node>
,ModelObject
,ReconfigurableDescribable<Node>
,Saveable
,SearchableModelObject
,SearchItem
,AccessControlled
,Serializable
,OnMaster
,org.jenkinsci.plugins.cloudstats.TrackedItem
public class JCloudsSlave
extends AbstractCloudSlave
implements org.jenkinsci.plugins.cloudstats.TrackedItem
Jenkins Slave node.
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class hudson.model.Slave
Slave.JnlpJar, Slave.SlaveDescriptor
Nested classes/interfaces inherited from class hudson.model.Node
Node.InternalComputerListener, Node.Mode
Nested classes/interfaces inherited from interface hudson.ExtensionPoint
ExtensionPoint.LegacyInstancesAreScopedToHudson
-
Field Summary
Fields inherited from class hudson.model.Node
holdOffLaunchUntilSave, SKIP_BUILD_CHECK_ON_FLYWEIGHTS
-
Constructor Summary
ConstructorDescriptionJCloudsSlave
(org.jenkinsci.plugins.cloudstats.ProvisioningActivity.Id id, org.openstack4j.model.compute.Server metadata, String labelString, SlaveOptions slaveOptions) -
Method Summary
Modifier and TypeMethodDescriptionprotected void
_terminate
(TaskListener listener) long
org.jenkinsci.plugins.cloudstats.ProvisioningActivity.Id
getId()
Get settings from OpenStack about the Server for this slave.Gets most of the Server settings that were provided to Openstack when the slave was created by the plugin.Get public IP address of the server.Get effective options used to configure this slave.boolean
protected Object
Methods inherited from class hudson.slaves.AbstractCloudSlave
terminate
Methods inherited from class hudson.model.Slave
createLauncher, equals, getClockDifferenceCallable, getDescriptor, getLabelString, getLauncher, getMode, getNodeDescription, getNodeName, getNodeProperties, getNumExecutors, getRemoteFS, getRootPath, getUserId, getWorkspaceFor, getWorkspaceRoot, hashCode, setLabelString, setLauncher, setMode, setNodeDescription, setNodeName, setNodeProperties, setNumExecutors, setRetentionStrategy, setUserId, toString
Methods inherited from class hudson.model.Node
canTake, canTake, createPath, getACL, getAssignedLabels, getChannel, getClockDifference, getDisplayName, getFileSystemProvisioner, getLabelCloud, getNodeProperty, getNodeProperty, getNodePropertyDescriptors, getSearchUrl, getSelfLabel, getTemporaryOfflineCause, isAcceptingTasks, isHoldOffLaunchUntilSave, reconfigure, save, toComputer
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, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface hudson.security.AccessControlled
checkAnyPermission, checkPermission, hasAnyPermission, hasPermission, hasPermission, hasPermission2
-
Constructor Details
-
JCloudsSlave
public JCloudsSlave(@Nonnull org.jenkinsci.plugins.cloudstats.ProvisioningActivity.Id id, @Nonnull org.openstack4j.model.compute.Server metadata, @Nonnull String labelString, @Nonnull SlaveOptions slaveOptions) throws IOException, Descriptor.FormException - Throws:
IOException
Descriptor.FormException
-
-
Method Details
-
readResolve
- Overrides:
readResolve
in classSlave
-
getOpenstackSlaveData
@Restricted(org.kohsuke.accmod.restrictions.DoNotUse.class) @Nonnull public Map<String,String> getOpenstackSlaveData()Gets most of the Server settings that were provided to Openstack when the slave was created by the plugin. Not all settings are interesting and any that are empty/null are omitted.- Returns:
- A Map of option name to value. This will not be null or empty.
-
getLiveOpenstackServerDetails
@Restricted(org.kohsuke.accmod.restrictions.DoNotUse.class) @Nonnull public Map<String,String> getLiveOpenstackServerDetails()Get settings from OpenStack about the Server for this slave.- Returns:
- A Map of fieldName to value. This will not be null or empty.
-
getPublicAddress
Get public IP address of the server.- Throws:
NoSuchElementException
- The server does not exist anymore. Plugin should not get slave to this state ever but there is no way to prevent external machine deletion.
-
getSlaveOptions
Get effective options used to configure this slave. -
getLauncherFactory
-
getRetentionStrategy
- Overrides:
getRetentionStrategy
in classSlave
-
getServerId
@Restricted(org.kohsuke.accmod.restrictions.NoExternalUse.class) @Nonnull public String getServerId() -
createComputer
- Specified by:
createComputer
in classAbstractCloudSlave
-
getId
@Nonnull public org.jenkinsci.plugins.cloudstats.ProvisioningActivity.Id getId()- Specified by:
getId
in interfaceorg.jenkinsci.plugins.cloudstats.TrackedItem
-
getCreatedTime
public long getCreatedTime() -
isLaunchTimedOut
public boolean isLaunchTimedOut()- Returns:
- True if the agent should have been up by now, and it is not. Note it could have been up momentarily before.
-
getComputer
- Overrides:
getComputer
in classSlave
-
_terminate
- Specified by:
_terminate
in classAbstractCloudSlave
-