jenkins.plugins.jclouds.compute
Class JCloudsSlave

java.lang.Object
  extended by hudson.model.AbstractModelObject
      extended by hudson.model.Node
          extended by hudson.model.Slave
              extended by jenkins.plugins.jclouds.compute.JCloudsSlave
All Implemented Interfaces:
hudson.ExtensionPoint, hudson.model.Describable<hudson.model.Node>, hudson.model.ModelObject, hudson.model.ReconfigurableDescribable<hudson.model.Node>, hudson.search.SearchableModelObject, hudson.search.SearchItem, hudson.security.AccessControlled, Serializable

public class JCloudsSlave
extends hudson.model.Slave

Jenkins Slave node - managed by JClouds.

Author:
Vijay Kiran
See Also:
Serialized Form

Nested Class Summary
static class JCloudsSlave.JCloudsSlaveDescriptor
           
 
Nested classes/interfaces inherited from class hudson.model.Slave
hudson.model.Slave.JnlpJar, hudson.model.Slave.SlaveDescriptor
 
Nested classes/interfaces inherited from class hudson.model.Node
hudson.model.Node.InternalComputerListener, hudson.model.Node.Mode
 
Nested classes/interfaces inherited from interface hudson.ExtensionPoint
hudson.ExtensionPoint.LegacyInstancesAreScopedToHudson
 
Field Summary
 boolean stopOnTerminate
           
 
Fields inherited from class hudson.model.Slave
name, remoteFS
 
Fields inherited from class hudson.model.Node
holdOffLaunchUntilSave
 
Constructor Summary
JCloudsSlave(String cloudName, String fsRoot, org.jclouds.compute.domain.NodeMetadata metadata, String labelString, String description, String numExecutors, boolean stopOnTerminate, int overrideRetentionTime)
          Constructs a new slave from JCloud's NodeMetadata
JCloudsSlave(String cloudName, String name, String nodeDescription, String remoteFS, String numExecutors, hudson.model.Node.Mode mode, String labelString, hudson.slaves.ComputerLauncher launcher, hudson.slaves.RetentionStrategy retentionStrategy, List<? extends hudson.slaves.NodeProperty<?>> nodeProperties, boolean stopOnTerminate, int overrideRetentionTime)
           
 
Method Summary
 hudson.model.Computer createComputer()
          
 String getCloudName()
          Get the JClouds profile identifier for the Cloud associated with this slave.
 org.jclouds.compute.domain.NodeMetadata getNodeMetaData()
          Get Jclouds NodeMetadata associated with this Slave.
 int getRetentionTime()
          Get the retention time for this slave, defaulting to the parent cloud's if not set.
 boolean isPendingDelete()
           
 void setPendingDelete(boolean pendingDelete)
           
 void terminate()
          Destroy the node calls ComputeService.destroyNode(java.lang.String)
 
Methods inherited from class hudson.model.Slave
createLauncher, equals, getClockDifference, getComputer, getDescriptor, getLabelString, getLauncher, getMode, getNodeDescription, getNodeName, getNodeProperties, getNumExecutors, getRemoteFS, getRetentionStrategy, getRootPath, getWorkspaceFor, getWorkspaceRoot, hashCode, readResolve, setLauncher, setMode, setNodeName, setRetentionStrategy
 
Methods inherited from class hudson.model.Node
canTake, canTake, checkPermission, createPath, getACL, getAssignedLabels, getChannel, getDisplayName, getFileSystemProvisioner, getLabelCloud, getNodePropertyDescriptors, getSearchUrl, getSelfLabel, hasPermission, isHoldOffLaunchUntilSave, reconfigure, 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, toString, wait, wait, wait
 

Field Detail

stopOnTerminate

public final boolean stopOnTerminate
Constructor Detail

JCloudsSlave

@DataBoundConstructor
public JCloudsSlave(String cloudName,
                                         String name,
                                         String nodeDescription,
                                         String remoteFS,
                                         String numExecutors,
                                         hudson.model.Node.Mode mode,
                                         String labelString,
                                         hudson.slaves.ComputerLauncher launcher,
                                         hudson.slaves.RetentionStrategy retentionStrategy,
                                         List<? extends hudson.slaves.NodeProperty<?>> nodeProperties,
                                         boolean stopOnTerminate,
                                         int overrideRetentionTime)
             throws hudson.model.Descriptor.FormException,
                    IOException
Throws:
hudson.model.Descriptor.FormException
IOException

JCloudsSlave

public JCloudsSlave(String cloudName,
                    String fsRoot,
                    org.jclouds.compute.domain.NodeMetadata metadata,
                    String labelString,
                    String description,
                    String numExecutors,
                    boolean stopOnTerminate,
                    int overrideRetentionTime)
             throws IOException,
                    hudson.model.Descriptor.FormException
Constructs a new slave from JCloud's NodeMetadata

Parameters:
cloudName - - the name of the cloud that's provisioning this slave.
fsRoot - - where on the slave the Jenkins slave root is.
metadata - - JCloudsNodeMetadata
labelString - - Label(s) for this slave.
description - - Description of this slave.
numExecutors - - Number of executors for this slave.
stopOnTerminate - - if true, suspend the slave rather than terminating it.
overrideRetentionTime - - Retention time to use specifically for this slave, overriding the cloud default.
Throws:
IOException
Descriptor.FormException
Method Detail

getNodeMetaData

public org.jclouds.compute.domain.NodeMetadata getNodeMetaData()
Get Jclouds NodeMetadata associated with this Slave.

Returns:
NodeMetadata

getRetentionTime

public int getRetentionTime()
Get the retention time for this slave, defaulting to the parent cloud's if not set.

Returns:
overrideTime

getCloudName

public String getCloudName()
Get the JClouds profile identifier for the Cloud associated with this slave.

Returns:
cloudName

isPendingDelete

public boolean isPendingDelete()

setPendingDelete

public void setPendingDelete(boolean pendingDelete)

createComputer

public hudson.model.Computer createComputer()

Overrides:
createComputer in class hudson.model.Slave

terminate

public void terminate()
Destroy the node calls ComputeService.destroyNode(java.lang.String)



Copyright © 2004-2012. All Rights Reserved.