java.lang.Object
org.jenkinsci.plugins.vsphere.VSphereBuildStep
org.jenkinsci.plugins.vsphere.builders.Clone
All Implemented Interfaces:
ExtensionPoint, Describable<VSphereBuildStep>

public class Clone extends VSphereBuildStep
  • Constructor Details

  • Method Details

    • getSourceName

      public String getSourceName()
    • getClone

      public String getClone()
    • isLinkedClone

      public boolean isLinkedClone()
    • getNamedSnapshot

      public String getNamedSnapshot()
    • isUseCurrentSnapshot

      public boolean isUseCurrentSnapshot()
    • getCluster

      public String getCluster()
    • getResourcePool

      public String getResourcePool()
    • getDatastore

      public String getDatastore()
    • getFolder

      public String getFolder()
    • getCustomizationSpec

      public String getCustomizationSpec()
    • isPowerOn

      public boolean isPowerOn()
    • getTimeoutInSeconds

      public int getTimeoutInSeconds()
    • getExtraConfigParameters

      public Map<String,String> getExtraConfigParameters()
    • getHost

      public String 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

      @DataBoundSetter public void setHost(String host)
    • getHostSelectionMode

      public String getHostSelectionMode()
    • setHostSelectionMode

      @DataBoundSetter public void setHostSelectionMode(String hostSelectionMode)
    • getHostSelectionCandidates

      public Set<String> getHostSelectionCandidates()
      Canonical form, for pipeline/API/JCasC consumers.
    • setHostSelectionCandidates

      @DataBoundSetter public void setHostSelectionCandidates(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. See setHostSelectionCandidatesAsString(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 single Object-typed (or overloaded) setter is not reliably usable from YAML, even though pipeline's looser binding tolerates it.
    • getHostSelectionCandidatesAsString

      public String 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" (see vSphereCloud.getHostSelectionCandidates()); a single comma explicitly overrides to "no restriction at this call site" - see VSphereHostSelection.toAllowListString(java.util.Set<java.lang.String>).
    • setHostSelectionCandidatesAsString

      @DataBoundSetter public void setHostSelectionCandidatesAsString(String hostSelectionCandidatesCsv)
    • getCpuCores

      public String getCpuCores()
      Optional: number of vCPUs to create the VM with, as ReconfigureCpu's; may use variables.
    • setCpuCores

      @DataBoundSetter public void setCpuCores(String cpuCores)
    • getCoresPerSocket

      public String getCoresPerSocket()
      Optional: cores per socket to create the VM with, as ReconfigureCpu's; may use variables.
    • setCoresPerSocket

      @DataBoundSetter public void setCoresPerSocket(String coresPerSocket)
    • getCpuLimitMHz

      public String getCpuLimitMHz()
      Optional: CPU reservation in MHz to create the VM with, as ReconfigureCpu's; may use variables.
    • setCpuLimitMHz

      @DataBoundSetter public void setCpuLimitMHz(String cpuLimitMHz)
    • getMemorySize

      public String getMemorySize()
      Optional: memory size in MB to create the VM with, as ReconfigureMemory's; may use variables.
    • setMemorySize

      @DataBoundSetter public void setMemorySize(String memorySize)
    • getHostSelectionRequireCores

      public Boolean 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/false override it for this call site.
    • setHostSelectionRequireCores

      @DataBoundSetter public void setHostSelectionRequireCores(Boolean hostSelectionRequireCores)
    • getHostSelectionRequireCoresAsString

      public String 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 use getHostSelectionRequireCores().
    • setHostSelectionRequireCoresAsString

      @DataBoundSetter public void setHostSelectionRequireCoresAsString(String hostSelectionRequireCoresAsString)
    • getHostSelectionRequireMemory

      public Boolean 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/false override it for this call site.
    • setHostSelectionRequireMemory

      @DataBoundSetter public void setHostSelectionRequireMemory(Boolean hostSelectionRequireMemory)
    • getHostSelectionRequireMemoryAsString

      public String 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 use getHostSelectionRequireMemory().
    • setHostSelectionRequireMemoryAsString

      @DataBoundSetter public void setHostSelectionRequireMemoryAsString(String hostSelectionRequireMemoryAsString)
    • getHostSelectionRequireAvailableMemory

      public Boolean 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/false override it for this call site.
    • setHostSelectionRequireAvailableMemory

      @DataBoundSetter public void setHostSelectionRequireAvailableMemory(Boolean hostSelectionRequireAvailableMemory)
    • getHostSelectionRequireAvailableMemoryAsString

      public String 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 use getHostSelectionRequireAvailableMemory().
    • setHostSelectionRequireAvailableMemoryAsString

      @DataBoundSetter public void setHostSelectionRequireAvailableMemoryAsString(String hostSelectionRequireAvailableMemoryAsString)
    • getHostWeightFreeCpuMhz

      public String getHostWeightFreeCpuMhz()
    • setHostWeightFreeCpuMhz

      @DataBoundSetter public void setHostWeightFreeCpuMhz(String hostWeightFreeCpuMhz)
    • getHostWeightFreeCpuPercent

      public String getHostWeightFreeCpuPercent()
    • setHostWeightFreeCpuPercent

      @DataBoundSetter public void setHostWeightFreeCpuPercent(String hostWeightFreeCpuPercent)
    • getHostWeightFreeMemoryMB

      public String getHostWeightFreeMemoryMB()
    • setHostWeightFreeMemoryMB

      @DataBoundSetter public void setHostWeightFreeMemoryMB(String hostWeightFreeMemoryMB)
    • getHostWeightFreeMemoryPercent

      public String getHostWeightFreeMemoryPercent()
    • setHostWeightFreeMemoryPercent

      @DataBoundSetter public void setHostWeightFreeMemoryPercent(String hostWeightFreeMemoryPercent)
    • perform

      public void perform(@NonNull Run<?,?> run, @NonNull FilePath filePath, @NonNull Launcher launcher, @NonNull TaskListener listener) throws InterruptedException, IOException
      Specified by:
      perform in class VSphereBuildStep
      Throws:
      InterruptedException
      IOException
    • getIP

      public String getIP()
      Overrides:
      getIP in class VSphereBuildStep
    • perform

      public boolean perform(AbstractBuild<?,?> build, Launcher launcher, BuildListener listener) throws AbortException
      Description copied from class: VSphereBuildStep
      Flavour for freestyle builds, kept for callers that still use it: it does exactly what the Run flavour does, so that a failure is reported by exception rather than swallowed (JENKINS-38472).
      Overrides:
      perform in class VSphereBuildStep
      Throws:
      AbortException