public class ComputeCloud
extends hudson.slaves.AbstractCloudImpl
| Modifier and Type | Class and Description |
|---|---|
static class |
ComputeCloud.DescriptorImpl |
| Modifier and Type | Field and Description |
|---|---|
static String |
AGENT_NAME_PREFIX
The prefix to add to the names of provisioned agents.
|
static String |
NAME_PREFIX
The prefix to add to names provided by the user in the UI to ensure that
names of clouds in different plugins do not conflict.
|
static String |
ORCHESTRATION_NAME_PREFIX
The prefix to add to the names of created orchestrations.
|
| Constructor and Description |
|---|
ComputeCloud(String cloudName,
String apiEndpoint,
String identityDomainName,
String userName,
String password,
String instanceCapStr,
int nextTemplateId,
List<? extends ComputeCloudAgentTemplate> templates) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
canProvision(hudson.model.Label label) |
int |
countCurrentComputeCloudAgents() |
ComputeCloudClient |
createClient() |
org.kohsuke.stapler.HttpResponse |
doIndex()
The breadcrumb on the
provision.jelly page contains a link to
this object. |
void |
doProvision(int templateId,
org.kohsuke.stapler.StaplerRequest req,
org.kohsuke.stapler.StaplerResponse rsp)
Called by
computerSet.jelly when explicitly provisioning a new
node via the nodes page. |
String |
getApiEndpoint() |
URI |
getApiEndpointUrl() |
String |
getCloudName() |
String |
getDisplayName() |
protected String |
getEncryptedValue(String str) |
String |
getFullDisplayName()
Called by
provision.jelly. |
String |
getIdentityDomainName() |
int |
getNextTemplateId() |
String |
getPassword() |
protected String |
getPlainText(String str) |
Class<?> |
getProvisionSidePanelClass()
Called by
provision.jelly to show a sidepanel. |
String |
getProvisionStartedMessage(javax.servlet.http.HttpServletRequest req)
Display a provisioning message based on request attributes set by
doProvision(int, org.kohsuke.stapler.StaplerRequest, org.kohsuke.stapler.StaplerResponse). |
ComputeCloudAgentTemplate |
getTemplate(hudson.model.Label label) |
List<? extends ComputeCloudAgentTemplate> |
getTemplates() |
ComputeCloudUser |
getUser() |
String |
getUserName() |
Collection<hudson.slaves.NodeProvisioner.PlannedNode> |
provision(hudson.model.Label label,
int excessWorkload) |
void |
recycleCloudResources(String orchName)
recycle orchestration related cloud resources with specified orchestration name
|
protected void |
stopAndDeleteOrchestration(ComputeCloudClient client,
long timeoutNanos,
String orchName) |
getInstanceCap, getInstanceCapStr, setInstanceCap, setInstanceCapStrall, checkPermission, getACL, getDescriptor, getSearchUrl, hasPermissionpublic static final String NAME_PREFIX
public static final String ORCHESTRATION_NAME_PREFIX
public static final String AGENT_NAME_PREFIX
public String getDisplayName()
getDisplayName in interface hudson.model.ModelObjectgetDisplayName in class hudson.slaves.Cloudpublic String getFullDisplayName()
provision.jelly.public String getCloudName()
public int getNextTemplateId()
public List<? extends ComputeCloudAgentTemplate> getTemplates()
public String getApiEndpoint()
public URI getApiEndpointUrl()
public String getIdentityDomainName()
public String getUserName()
public ComputeCloudUser getUser()
public final String getPassword()
public Collection<hudson.slaves.NodeProvisioner.PlannedNode> provision(hudson.model.Label label, int excessWorkload)
provision in class hudson.slaves.Cloudprotected void stopAndDeleteOrchestration(ComputeCloudClient client, long timeoutNanos, String orchName) throws ComputeCloudClientException, InterruptedException, IOException
public void recycleCloudResources(String orchName) throws InterruptedException, IOException
orchName - the name of orchestration to be recycled.InterruptedException - if thread is interrupted.IOException - if request hit IO exception.public int countCurrentComputeCloudAgents()
public ComputeCloudAgentTemplate getTemplate(hudson.model.Label label)
public void doProvision(@QueryParameter
int templateId,
org.kohsuke.stapler.StaplerRequest req,
org.kohsuke.stapler.StaplerResponse rsp)
throws javax.servlet.ServletException,
IOException
computerSet.jelly when explicitly provisioning a new
node via the nodes page.templateId - template idreq - requestrsp - responsejavax.servlet.ServletException - if a servlet exception occursIOException - if a IO error occurspublic Class<?> getProvisionSidePanelClass()
provision.jelly to show a sidepanel.public String getProvisionStartedMessage(javax.servlet.http.HttpServletRequest req)
doProvision(int, org.kohsuke.stapler.StaplerRequest, org.kohsuke.stapler.StaplerResponse).req - requestpublic org.kohsuke.stapler.HttpResponse doIndex()
throws IOException
provision.jelly page contains a link to
this object. We have no data to display, so redirect the user to the
computer set page.IOException - if an IO error occurspublic ComputeCloudClient createClient()
public boolean canProvision(hudson.model.Label label)
canProvision in class hudson.slaves.CloudCopyright © 2016–2018. All rights reserved.