public class SlaveTemplate extends Object implements hudson.model.Describable<SlaveTemplate>
SlaveTemplate represents the configuration values for creating a
new slave via a DigitalOcean droplet.
Holds things like Image ID, size and region used for the specific droplet.
The provision(com.myjeeva.digitalocean.impl.DigitalOceanClient, String, Integer, hudson.util.StreamTaskListener) method
is the main entry point to create a new droplet via the DigitalOcean API when a new slave needs to be provisioned.| Modifier and Type | Class and Description |
|---|---|
static class |
SlaveTemplate.DescriptorImpl |
| Modifier and Type | Field and Description |
|---|---|
Integer |
imageId
The Image to be used for the droplet.
|
String |
labels |
protected Cloud |
parent |
| Constructor and Description |
|---|
SlaveTemplate(String imageId,
String sizeId,
String regionId,
String idleTerminationInMinutes,
String labelString)
Data is injected from the global Jenkins configuration via jelly.
|
| Modifier and Type | Method and Description |
|---|---|
hudson.model.Descriptor<SlaveTemplate> |
getDescriptor() |
String |
getDropletName() |
int |
getIdleTerminationInMinutes() |
int |
getImageId() |
String |
getLabels() |
Set<hudson.model.labels.LabelAtom> |
getLabelSet() |
String |
getLabelString() |
int |
getNumExecutors() |
Cloud |
getParent() |
int |
getRegionId() |
int |
getSizeId() |
Slave |
provision(com.myjeeva.digitalocean.impl.DigitalOceanClient apiClient,
String privateKey,
Integer sshKeyId,
hudson.util.StreamTaskListener listener)
Creates a new droplet on DigitalOcean to be used as a Jenkins slave.
|
protected Object |
readResolve() |
public final String labels
public final Integer imageId
protected transient Cloud parent
@DataBoundConstructor public SlaveTemplate(String imageId, String sizeId, String regionId, String idleTerminationInMinutes, String labelString)
imageId - sizeId - regionId - idleTerminationInMinutes - labelString - protected Object readResolve()
public Slave provision(com.myjeeva.digitalocean.impl.DigitalOceanClient apiClient, String privateKey, Integer sshKeyId, hudson.util.StreamTaskListener listener) throws IOException, com.myjeeva.digitalocean.exception.RequestUnsuccessfulException, com.myjeeva.digitalocean.exception.AccessDeniedException, com.myjeeva.digitalocean.exception.ResourceNotFoundException, hudson.model.Descriptor.FormException
apiClient - privateKey - sshKeyId - listener - @returnIOExceptioncom.myjeeva.digitalocean.exception.RequestUnsuccessfulExceptioncom.myjeeva.digitalocean.exception.AccessDeniedExceptioncom.myjeeva.digitalocean.exception.ResourceNotFoundExceptionDescriptor.FormExceptionpublic hudson.model.Descriptor<SlaveTemplate> getDescriptor()
getDescriptor in interface hudson.model.Describable<SlaveTemplate>public String getDropletName()
public int getSizeId()
public int getRegionId()
public String getLabels()
public String getLabelString()
public Set<hudson.model.labels.LabelAtom> getLabelSet()
public Cloud getParent()
public int getImageId()
public int getNumExecutors()
public int getIdleTerminationInMinutes()
Copyright © 2004-2014. All Rights Reserved.