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,PersistenceRoot,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 ClassesNested classes/interfaces inherited from class hudson.model.Slave
Slave.JnlpJar, Slave.SlaveDescriptorNested 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
ConstructorsConstructorDescriptionJCloudsSlave(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) longorg.jenkinsci.plugins.cloudstats.ProvisioningActivity.IdgetId()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.booleanprotected ObjectMethods inherited from class hudson.slaves.AbstractCloudSlave
terminateMethods inherited from class hudson.model.Slave
createLauncher, equals, getClockDifferenceCallable, getDescriptor, getLabelAtomSet, getLabelString, getLauncher, getMode, getNodeDescription, getNodeName, getNodeProperties, getNumExecutors, getRemoteFS, getRootPath, getUserId, getWorkspaceFor, getWorkspaceRoot, hashCode, save, setLabelString, setLauncher, setMode, setNodeDescription, setNodeName, setNodeProperties, setNumExecutors, setRetentionStrategy, setUserId, toStringMethods inherited from class hudson.model.Node
canTake, canTake, createPath, getACL, getAssignedLabels, getChannel, getClockDifference, getConfigFile, getDisplayName, getFileSystemProvisioner, getLabelCloud, getNodeProperty, getNodeProperty, getNodePropertyDescriptors, getRootDir, getSearchUrl, getSelfLabel, getTemporaryOfflineCause, isAcceptingTasks, isHoldOffLaunchUntilSave, onLoad, reconfigure, reconfigure, toComputerMethods 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, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface hudson.security.AccessControlled
checkAnyPermission, checkPermission, hasAnyPermission, hasPermission, hasPermission, hasPermission2Methods inherited from interface hudson.search.SearchItem
getSearchGroup, getSearchIcon
-
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:
IOExceptionDescriptor.FormException
-
-
Method Details
-
readResolve
- Overrides:
readResolvein 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:
getRetentionStrategyin classSlave
-
getServerId
@Restricted(org.kohsuke.accmod.restrictions.NoExternalUse.class) @Nonnull public String getServerId() -
createComputer
- Specified by:
createComputerin classAbstractCloudSlave
-
getId
@Nonnull public org.jenkinsci.plugins.cloudstats.ProvisioningActivity.Id getId()- Specified by:
getIdin 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:
getComputerin classSlave
-
_terminate
- Specified by:
_terminatein classAbstractCloudSlave
-