Class AgentTemplate

All Implemented Interfaces:
Describable<AgentTemplate>, Serializable

public class AgentTemplate extends AbstractDescribableImpl<AgentTemplate> implements Serializable
Per-VM-type configuration. One AgentTemplate maps to one VM type in Parallels DevOps Service. The available provisioning strategies are rendered via <f:dropdownDescriptorSelector>; incompatible combinations (e.g. Clone in Orchestrator mode) are rejected at save time by PrlDevopsCloud.DescriptorImpl.newInstance(org.kohsuke.stapler.StaplerRequest2, net.sf.json.JSONObject).
See Also:
  • Constructor Details

    • AgentTemplate

      @DataBoundConstructor public AgentTemplate(String templateLabel)
  • Method Details

    • getTemplateLabel

      public String getTemplateLabel()
    • getVmUser

      public String getVmUser()
    • getSshCredentialsId

      public String getSshCredentialsId()
    • getSshPort

      public int getSshPort()
    • getJavaPath

      public String getJavaPath()
    • getJvmOptions

      public String getJvmOptions()
    • getSshRetries

      public int getSshRetries()
    • getSshRetryDelaySec

      public int getSshRetryDelaySec()
    • getAgentWorkspaceDir

      public String getAgentWorkspaceDir()
    • getNumExecutors

      public int getNumExecutors()
    • getVmReadyTimeoutSeconds

      public int getVmReadyTimeoutSeconds()
    • getVmReadyPollIntervalSeconds

      public int getVmReadyPollIntervalSeconds()
    • getProvisioningConfig

      public ProvisioningConfig getProvisioningConfig()
    • canProvision

      public boolean canProvision()
    • provision

      public PrlDevopsPlannedNode provision(String cloudName, Label label, PrlDevopsApiClient apiClient, Duration timeout, Duration pollInterval, ExecutorService executor) throws PrlApiException
      Throws:
      PrlApiException
    • readResolve

      protected Object readResolve()
      XStream deserialization hook. Migrates old configs that stored baseVmName directly on this class (before the ProvisioningConfig refactor) into a CloneProvisioningConfig. Also guards against null for configs that predate both fields.
    • getBaseVmName

      public String getBaseVmName()
    • getArchitecture

      public String getArchitecture()
    • getCatalogId

      public String getCatalogId()
    • getCatalogVersion

      public String getCatalogVersion()
    • getCatalogUrl

      public String getCatalogUrl()
    • getCatalogCredentialsId

      public String getCatalogCredentialsId()
    • setVmUser

      @DataBoundSetter public void setVmUser(String vmUser)
    • setSshCredentialsId

      @DataBoundSetter public void setSshCredentialsId(String sshCredentialsId)
    • setSshPort

      @DataBoundSetter public void setSshPort(int sshPort)
    • setJavaPath

      @DataBoundSetter public void setJavaPath(String javaPath)
    • setJvmOptions

      @DataBoundSetter public void setJvmOptions(String jvmOptions)
    • setSshRetries

      @DataBoundSetter public void setSshRetries(int sshRetries)
    • setSshRetryDelaySec

      @DataBoundSetter public void setSshRetryDelaySec(int sshRetryDelaySec)
    • setAgentWorkspaceDir

      @DataBoundSetter public void setAgentWorkspaceDir(String agentWorkspaceDir)
    • setNumExecutors

      @DataBoundSetter public void setNumExecutors(int numExecutors)
    • setVmReadyTimeoutSeconds

      @DataBoundSetter public void setVmReadyTimeoutSeconds(int vmReadyTimeoutSeconds)
    • setVmReadyPollIntervalSeconds

      @DataBoundSetter public void setVmReadyPollIntervalSeconds(int vmReadyPollIntervalSeconds)
    • setProvisioningConfig

      @DataBoundSetter public void setProvisioningConfig(ProvisioningConfig provisioningConfig)
    • matches

      public boolean matches(Label label)
      Returns true when this template's label set satisfies the given Jenkins Label expression.