public class SharedNodeCloud
extends hudson.slaves.Cloud
Modifier and Type | Class and Description |
---|---|
static class |
SharedNodeCloud.ConfigRepoUpdater |
static class |
SharedNodeCloud.DescriptorImpl |
Modifier and Type | Field and Description |
---|---|
static boolean |
isWsCleanupAvailable |
Constructor and Description |
---|
SharedNodeCloud(String configRepoUrl,
String orchestratorCredentialsId)
Constructor for Config Page.
|
SharedNodeCloud(String configRepoUrl,
String orchestratorCredentialsId,
boolean disabled)
Constructor for Config Page.
|
Modifier and Type | Method and Description |
---|---|
boolean |
canProvision(hudson.model.Label label) |
SharedNode |
createNode(NodeDefinition definition) |
boolean |
disabled(boolean disabled)
Set temporary disabled status to the new state.
|
static Collection<SharedNodeCloud> |
getAll()
Get all configured
SharedNodeCloud s. |
Api |
getApi()
Get associated API object.
|
static SharedNodeCloud |
getByName(String name)
Get Shared node cloud using provided name.
|
String |
getConfigRepoUrl()
Get Config repo url.
|
ConfigRepo.Snapshot |
getLatestConfig()
Get latest config repo snapshot.
|
String |
getName()
Get Cloud name.
|
String |
getNodeName(String nodeName)
Make unique name per Cloud.
|
NodeStatusResponse.Status |
getNodeStatus(String nodeName)
Get the node status.
|
String |
getOrchestratorCredentialsId() |
boolean |
isDisabled()
Check whether cloud is temporary disabled.
|
boolean |
isOperational()
The cloud is considered operational once it can get data from Config Repo and talk to orchestrator.
|
Collection<hudson.slaves.NodeProvisioner.PlannedNode> |
provision(hudson.model.Label label,
int excessWorkload) |
all, checkPermission, getACL, getDescriptor, getDisplayName, getSearchUrl, hasPermission
@Restricted(value=org.kohsuke.accmod.restrictions.NoExternalUse.class) public static boolean isWsCleanupAvailable
public SharedNodeCloud(@Nonnull String configRepoUrl, @Nonnull String orchestratorCredentialsId)
configRepoUrl
- ConfigRepo urlorchestratorCredentialsId
- Orchestrator credential.@DataBoundConstructor public SharedNodeCloud(@Nonnull String configRepoUrl, @Nonnull String orchestratorCredentialsId, boolean disabled)
configRepoUrl
- ConfigRepo urlorchestratorCredentialsId
- Orchestrator credential.disabled
- true if cloud is disabled temporary.@Nonnull public final Api getApi() throws IllegalStateException
IllegalStateException
- In case cloud is not able to obtain the config.@Nonnull public String getConfigRepoUrl()
@CheckForNull public ConfigRepo.Snapshot getLatestConfig()
@Nonnull public String getNodeName(@Nonnull String nodeName)
nodeName
- node name from the config repo.@Nonnull public NodeStatusResponse.Status getNodeStatus(@Nonnull String nodeName)
nodeName
- The node name.@Nonnull public SharedNode createNode(@Nonnull NodeDefinition definition) throws IllegalArgumentException
IllegalArgumentException
public boolean canProvision(hudson.model.Label label)
canProvision
in class hudson.slaves.Cloud
@Nonnull public Collection<hudson.slaves.NodeProvisioner.PlannedNode> provision(@CheckForNull hudson.model.Label label, int excessWorkload)
provision
in class hudson.slaves.Cloud
@CheckForNull public static SharedNodeCloud getByName(@Nonnull String name) throws IllegalArgumentException
name
- Cloud name.IllegalArgumentException
@Nonnull public static Collection<SharedNodeCloud> getAll()
SharedNodeCloud
s.public boolean isOperational()
public boolean isDisabled()
public boolean disabled(boolean disabled)
disabled
- new disabled status.Copyright © 2016–2020. All rights reserved.