Package org.jenkinsci.plugins
Class vSphereCloudSlaveTemplate
java.lang.Object
org.jenkinsci.plugins.vSphereCloudSlaveTemplate
- All Implemented Interfaces:
Describable<vSphereCloudSlaveTemplate>
public class vSphereCloudSlaveTemplate
extends Object
implements Describable<vSphereCloudSlaveTemplate>
- Author:
- ksmith
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected static final com.cloudbees.plugins.credentials.domains.SchemeRequirementprotected static final com.cloudbees.plugins.credentials.domains.SchemeRequirementprotected vSphereCloud -
Constructor Summary
ConstructorsConstructorDescriptionvSphereCloudSlaveTemplate(String cloneNamePrefix, String masterImageName, Boolean useSnapshot, String snapshotName, boolean linkedClone, String cluster, String resourcePool, String datastore, String folder, String customizationSpec, String templateDescription, int templateInstanceCap, int numberOfExecutors, String remoteFS, String labelString, Node.Mode mode, boolean forceVMLaunch, boolean waitForVMTools, int launchDelay, int limitedRunCount, boolean saveFailure, String targetResourcePool, String targetHost, int instancesMin, String credentialsId, ComputerLauncher launcher, RetentionStrategy<?> retentionStrategy, List<? extends NodeProperty<?>> nodeProperties, List<? extends VSphereGuestInfoProperty> guestInfoProperties, List<ReconfigureStep> reconfigureSteps) -
Method Summary
Modifier and TypeMethodDescriptionDeprecated.booleanList<? extends VSphereGuestInfoProperty> Canonical form, for pipeline/API/JCasC consumers.For the classic config UI textbox, and pipeline/JCasC callers that prefer a plain string.Opt-in override of the cloud's default: only consider hosts that currently have at least as much memory free as the VM is configured with, so it is not swapped by the hypervisor.For the classic config UI, where an unset ("inherit") value has to survive a round trip as an empty string; pipeline and JCasC callers should usegetHostSelectionRequireAvailableMemory().Opt-in override of the cloud's default: only consider hosts with at least as many physical CPU cores as the VM has vCPUs.For the classic config UI, where an unset ("inherit") value has to survive a round trip as an empty string; pipeline and JCasC callers should usegetHostSelectionRequireCores().Opt-in override of the cloud's default: only consider hosts with at least as much physical RAM as the VM is configured with.For the classic config UI, where an unset ("inherit") value has to survive a round trip as an empty string; pipeline and JCasC callers should usegetHostSelectionRequireMemory().intintintbooleangetMode()List<? extends NodeProperty<?>> intintbooleanintbooleanbooleanprovision(String cloneName, TaskListener listener) protected ObjectvoidsetHostSelectionCandidates(Collection<String> hostSelectionCandidates) Takes a flat list of individual host names - the natural shape for a pipeline or JCasC YAML caller that already has one.voidsetHostSelectionCandidatesAsString(String hostSelectionCandidatesCsv) voidsetHostSelectionMode(String hostSelectionMode) voidsetHostSelectionRequireAvailableMemory(Boolean hostSelectionRequireAvailableMemory) voidsetHostSelectionRequireAvailableMemoryAsString(String hostSelectionRequireAvailableMemoryAsString) voidsetHostSelectionRequireCores(Boolean hostSelectionRequireCores) voidsetHostSelectionRequireCoresAsString(String hostSelectionRequireCoresAsString) voidsetHostSelectionRequireMemory(Boolean hostSelectionRequireMemory) voidsetHostSelectionRequireMemoryAsString(String hostSelectionRequireMemoryAsString) voidsetHostWeightFreeCpuMhz(String hostWeightFreeCpuMhz) voidsetHostWeightFreeCpuPercent(String hostWeightFreeCpuPercent) voidsetHostWeightFreeMemoryMB(String hostWeightFreeMemoryMB) voidsetHostWeightFreeMemoryPercent(String hostWeightFreeMemoryPercent) voidsetReconfigureStartTimeoutSeconds(int reconfigureStartTimeoutSeconds)
-
Field Details
-
HTTP_SCHEME
protected static final com.cloudbees.plugins.credentials.domains.SchemeRequirement HTTP_SCHEME -
HTTPS_SCHEME
protected static final com.cloudbees.plugins.credentials.domains.SchemeRequirement HTTPS_SCHEME -
parent
-
-
Constructor Details
-
vSphereCloudSlaveTemplate
@DataBoundConstructor public vSphereCloudSlaveTemplate(String cloneNamePrefix, String masterImageName, Boolean useSnapshot, String snapshotName, boolean linkedClone, String cluster, String resourcePool, String datastore, String folder, String customizationSpec, String templateDescription, int templateInstanceCap, int numberOfExecutors, String remoteFS, String labelString, Node.Mode mode, boolean forceVMLaunch, boolean waitForVMTools, int launchDelay, int limitedRunCount, boolean saveFailure, String targetResourcePool, String targetHost, int instancesMin, String credentialsId, ComputerLauncher launcher, RetentionStrategy<?> retentionStrategy, List<? extends NodeProperty<?>> nodeProperties, List<? extends VSphereGuestInfoProperty> guestInfoProperties, List<ReconfigureStep> reconfigureSteps)
-
-
Method Details
-
getCloneNamePrefix
-
getMasterImageName
-
getUseSnapshot
public boolean getUseSnapshot() -
getSnapshotName
-
getLinkedClone
public boolean getLinkedClone() -
getCluster
-
getResourcePool
-
getDatastore
-
getFolder
-
getCustomizationSpec
-
getTemplateDescription
-
getTemplateInstanceCap
public int getTemplateInstanceCap() -
getNumberOfExecutors
public int getNumberOfExecutors() -
getRemoteFS
-
getLabelString
-
getMode
-
getForceVMLaunch
public boolean getForceVMLaunch() -
getWaitForVMTools
public boolean getWaitForVMTools() -
getLaunchDelay
public int getLaunchDelay() -
getLimitedRunCount
public int getLimitedRunCount() -
getInstancesMin
public int getInstancesMin() -
getSaveFailure
public boolean getSaveFailure() -
getTargetResourcePool
-
getTargetHost
-
getHostSelectionMode
-
setHostSelectionMode
-
getReconfigureStartTimeoutSeconds
public int getReconfigureStartTimeoutSeconds()- See Also:
-
setReconfigureStartTimeoutSeconds
@DataBoundSetter public void setReconfigureStartTimeoutSeconds(int reconfigureStartTimeoutSeconds) -
getHostSelectionCandidates
Canonical form, for pipeline/API/JCasC consumers. -
setHostSelectionCandidates
Takes a flat list of individual host names - the natural shape for a pipeline or JCasC YAML caller that already has one. SeesetHostSelectionCandidatesAsString(java.lang.String)for the comma-separated-string equivalent (used by the classic UI textbox). Both are kept as separate, concretely-typed properties rather than one that accepts either shape: Jenkins' JCasC introspection resolves exactly one configurator per property type, so a singleObject-typed (or overloaded) setter is not reliably usable from YAML, even though pipeline's looser binding tolerates it. -
getHostSelectionCandidatesAsString
For the classic config UI textbox, and pipeline/JCasC callers that prefer a plain string. Blank means "inherit the cloud's default candidate list" (seevSphereCloud.getHostSelectionCandidates()); a single comma explicitly overrides to "no restriction at this call site" - seeVSphereHostSelection.toAllowListString(java.util.Set<java.lang.String>). -
setHostSelectionCandidatesAsString
-
getHostSelectionRequireCores
Opt-in override of the cloud's default: only consider hosts with at least as many physical CPU cores as the VM has vCPUs.null(the default) inherits the cloud's setting;true/falseoverride it for this call site. -
setHostSelectionRequireCores
-
getHostSelectionRequireCoresAsString
For the classic config UI, where an unset ("inherit") value has to survive a round trip as an empty string; pipeline and JCasC callers should usegetHostSelectionRequireCores(). -
setHostSelectionRequireCoresAsString
@DataBoundSetter public void setHostSelectionRequireCoresAsString(String hostSelectionRequireCoresAsString) -
getHostSelectionRequireMemory
Opt-in override of the cloud's default: only consider hosts with at least as much physical RAM as the VM is configured with.null(the default) inherits the cloud's setting;true/falseoverride it for this call site. -
setHostSelectionRequireMemory
-
getHostSelectionRequireMemoryAsString
For the classic config UI, where an unset ("inherit") value has to survive a round trip as an empty string; pipeline and JCasC callers should usegetHostSelectionRequireMemory(). -
setHostSelectionRequireMemoryAsString
@DataBoundSetter public void setHostSelectionRequireMemoryAsString(String hostSelectionRequireMemoryAsString) -
getHostSelectionRequireAvailableMemory
Opt-in override of the cloud's default: only consider hosts that currently have at least as much memory free as the VM is configured with, so it is not swapped by the hypervisor.null(the default) inherits the cloud's setting;true/falseoverride it for this call site. -
setHostSelectionRequireAvailableMemory
@DataBoundSetter public void setHostSelectionRequireAvailableMemory(Boolean hostSelectionRequireAvailableMemory) -
getHostSelectionRequireAvailableMemoryAsString
For the classic config UI, where an unset ("inherit") value has to survive a round trip as an empty string; pipeline and JCasC callers should usegetHostSelectionRequireAvailableMemory(). -
setHostSelectionRequireAvailableMemoryAsString
@DataBoundSetter public void setHostSelectionRequireAvailableMemoryAsString(String hostSelectionRequireAvailableMemoryAsString) -
getHostWeightFreeCpuMhz
-
setHostWeightFreeCpuMhz
-
getHostWeightFreeCpuPercent
-
setHostWeightFreeCpuPercent
-
getHostWeightFreeMemoryMB
-
setHostWeightFreeMemoryMB
-
getHostWeightFreeMemoryPercent
-
setHostWeightFreeMemoryPercent
-
getCredentialsId
Deprecated.credentials are now in thegetLauncher()property.Gets the old (deprecated) credentialsId field.- Returns:
- the old, deprecated, credentialsId field.
-
getNodeProperties
-
getGuestInfoProperties
-
getLabelSet
-
getParent
-
getLauncher
-
getRetentionStrategy
-
getReconfigureSteps
-
readResolve
-
provision
public vSphereCloudProvisionedSlave provision(String cloneName, TaskListener listener) throws VSphereException, Descriptor.FormException, IOException, InterruptedException -
getDescriptor
- Specified by:
getDescriptorin interfaceDescribable<vSphereCloudSlaveTemplate>
-
getLauncher()property.