public class Cloud
extends hudson.slaves.AbstractCloudImpl
Cloud contains the main configuration values for running
slaves on DigitalOcean, e.g. apiKey/clientId to connect to the API.
The provision(hudson.model.Label, int) method will be called
by Jenkins as soon as a new slave needs to be provisioned.
The number of| Modifier and Type | Class and Description |
|---|---|
static class |
Cloud.DescriptorImpl |
| Constructor and Description |
|---|
Cloud(String name,
String apiKey,
String clientId,
String privateKey,
String sshKeyId,
String instanceCapStr,
List<? extends SlaveTemplate> templates)
Constructor parameters are injected via jelly in the jenkins global configuration
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
canProvision(hudson.model.Label label) |
int |
countCurrentDropletsSlaves(Integer imageId)
Count the number of droplets provisioned with the specified Image ID
|
com.myjeeva.digitalocean.impl.DigitalOceanClient |
getApiClient() |
String |
getApiKey() |
String |
getClientId() |
String |
getName() |
String |
getPrivateKey() |
int |
getSshKeyId() |
SlaveTemplate |
getTemplate(hudson.model.Label label) |
List<SlaveTemplate> |
getTemplates() |
Collection<hudson.slaves.NodeProvisioner.PlannedNode> |
provision(hudson.model.Label label,
int excessWorkload)
The actual logic for provisioning a new droplet when it's needed by Jenkins.
|
protected Object |
readResolve() |
getInstanceCap, getInstanceCapStr, setInstanceCap, setInstanceCapStrall, checkPermission, getACL, getDescriptor, getDisplayName, getSearchUrl, hasPermission@DataBoundConstructor public Cloud(String name, String apiKey, String clientId, String privateKey, String sshKeyId, String instanceCapStr, List<? extends SlaveTemplate> templates)
name - apiKey - clientId - privateKey - sshKeyId - instanceCapStr - templates - protected Object readResolve()
public int countCurrentDropletsSlaves(Integer imageId) throws com.myjeeva.digitalocean.exception.RequestUnsuccessfulException, com.myjeeva.digitalocean.exception.AccessDeniedException, com.myjeeva.digitalocean.exception.ResourceNotFoundException
imageId - com.myjeeva.digitalocean.exception.RequestUnsuccessfulExceptioncom.myjeeva.digitalocean.exception.AccessDeniedExceptioncom.myjeeva.digitalocean.exception.ResourceNotFoundExceptionpublic Collection<hudson.slaves.NodeProvisioner.PlannedNode> provision(hudson.model.Label label, int excessWorkload)
provision in class hudson.slaves.Cloudlabel - excessWorkload - public boolean canProvision(hudson.model.Label label)
canProvision in class hudson.slaves.Cloudpublic List<SlaveTemplate> getTemplates()
public SlaveTemplate getTemplate(hudson.model.Label label)
public String getName()
public String getApiKey()
public String getClientId()
public String getPrivateKey()
public int getSshKeyId()
public com.myjeeva.digitalocean.impl.DigitalOceanClient getApiClient()
Copyright © 2004-2014. All Rights Reserved.