Class Clone
java.lang.Object
org.jenkinsci.plugins.vsphere.VSphereBuildStep
org.jenkinsci.plugins.vsphere.builders.Clone
- All Implemented Interfaces:
ExtensionPoint,Describable<VSphereBuildStep>
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from class org.jenkinsci.plugins.vsphere.VSphereBuildStep
VSphereBuildStep.VSphereBuildStepDescriptorNested classes/interfaces inherited from interface hudson.ExtensionPoint
ExtensionPoint.LegacyInstancesAreScopedToHudson -
Field Summary
Fields inherited from class org.jenkinsci.plugins.vsphere.VSphereBuildStep
sourceCloud, vsphere -
Constructor Summary
ConstructorsConstructorDescriptionClone(String sourceName, String clone, boolean linkedClone, String resourcePool, String cluster, String datastore, String folder, boolean powerOn, Integer timeoutInSeconds, String customizationSpec, Boolean useCurrentSnapshot, String namedSnapshot, Map<String, String> extraConfigParameters) -
Method Summary
Modifier and TypeMethodDescriptiongetClone()Optional: cores per socket to create the VM with, asReconfigureCpu's; may use variables.Optional: number of vCPUs to create the VM with, asReconfigureCpu's; may use variables.Optional: CPU reservation in MHz to create the VM with, asReconfigureCpu's; may use variables.getHost()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().getIP()Optional: memory size in MB to create the VM with, asReconfigureMemory's; may use variables.intbooleanWhether failing to obtain the VM's IP address within the timeout fails this step (default: only warn).booleanbooleanbooleanbooleanperform(AbstractBuild<?, ?> build, Launcher launcher, BuildListener listener) Flavour for freestyle builds, kept for callers that still use it: it does exactly what theRunflavour does, so that a failure is reported by exception rather than swallowed (JENKINS-38472).voidperform(Run<?, ?> run, FilePath filePath, Launcher launcher, TaskListener listener) voidsetCoresPerSocket(String coresPerSocket) voidsetCpuCores(String cpuCores) voidsetCpuLimitMHz(String cpuLimitMHz) voidsetFailOnNoAddress(boolean failOnNoAddress) voidvoidsetHostSelectionCandidates(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) voidsetMemorySize(String memorySize) Methods inherited from class org.jenkinsci.plugins.vsphere.VSphereBuildStep
all, allowDelete, getDescriptor, getSourceCloud, getVsphere, setSourceCloud, setVsphere
-
Constructor Details
-
Clone
@DataBoundConstructor public Clone(String sourceName, String clone, boolean linkedClone, String resourcePool, String cluster, String datastore, String folder, boolean powerOn, Integer timeoutInSeconds, String customizationSpec, Boolean useCurrentSnapshot, String namedSnapshot, Map<String, String> extraConfigParameters) throws VSphereException- Throws:
VSphereException
-
-
Method Details
-
getSourceName
-
getClone
-
isLinkedClone
public boolean isLinkedClone() -
getNamedSnapshot
-
isUseCurrentSnapshot
public boolean isUseCurrentSnapshot() -
getCluster
-
getResourcePool
-
getDatastore
-
getFolder
-
getCustomizationSpec
-
isPowerOn
public boolean isPowerOn() -
getTimeoutInSeconds
public int getTimeoutInSeconds() -
getExtraConfigParameters
-
getHost
-
isFailOnNoAddress
public boolean isFailOnNoAddress()Whether failing to obtain the VM's IP address within the timeout fails this step (default: only warn). -
setFailOnNoAddress
@DataBoundSetter public void setFailOnNoAddress(boolean failOnNoAddress) -
setHost
-
getHostSelectionMode
-
setHostSelectionMode
-
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
-
getCpuCores
Optional: number of vCPUs to create the VM with, asReconfigureCpu's; may use variables. -
setCpuCores
-
getCoresPerSocket
Optional: cores per socket to create the VM with, asReconfigureCpu's; may use variables. -
setCoresPerSocket
-
getCpuLimitMHz
Optional: CPU reservation in MHz to create the VM with, asReconfigureCpu's; may use variables. -
setCpuLimitMHz
-
getMemorySize
Optional: memory size in MB to create the VM with, asReconfigureMemory's; may use variables. -
setMemorySize
-
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
-
perform
public void perform(@NonNull Run<?, ?> run, @NonNull FilePath filePath, @NonNull Launcher launcher, @NonNull TaskListener listener) throws InterruptedException, IOException- Specified by:
performin classVSphereBuildStep- Throws:
InterruptedExceptionIOException
-
getIP
- Overrides:
getIPin classVSphereBuildStep
-
perform
public boolean perform(AbstractBuild<?, ?> build, Launcher launcher, BuildListener listener) throws AbortExceptionDescription copied from class:VSphereBuildStepFlavour for freestyle builds, kept for callers that still use it: it does exactly what theRunflavour does, so that a failure is reported by exception rather than swallowed (JENKINS-38472).- Overrides:
performin classVSphereBuildStep- Throws:
AbortException
-