ProvisionSpec

Defines the attributes for starting a provision. An instance of this class is passed to self.provision(). As shown in Examples, defining a provision to reserve a provisioned resource "nightly" for a user is an instance of when this function might be used: spec = ProvisionSpec() spec.setReserveForUser('nightly') self.provision(spec)

Constructor

ProvisionSpec(): Construct a default ProvisionSpec.

Methods

Summary:

setReserveForJob(String jobID)

Set the job ID to reserve the provisioned resource for. Default is the job initiating the provision.

getReserveForJob()

setReserveForUser(String userID)

Set the user ID to reserve the provisioned resource for. Default is the user of the initiating job.

getReserveForUser()

setIdleTimeout(int idleTimeout)

Set idle timeout for provisioned resource. Default is value of resource.provisioned.timeout.

getIdleTimeout()

setPriority(String priority)

Set a priority for this provision using supplied string. Default is the user's priority.

setPriority(int priority)

Set a priority for this provision using supplied integer constant. Default is the user's priority.

getPriority()

setReserveWithPolicy(String policyText)

Set a policy to use for reserving the provisioned resource. Default is no policy.

getReserveWithPolicy()

setPolicyName(String policyName)

Set a policy to use for reserving the provisioned resource. Default is no policy.

getPolicyName()

setReserveWithConstraint(Constraint constraint)

Set a constraint to use for reserving the provisioned resource. Default is no constraint.

getConstraint()

setHost(String host)

Set the host to provision the resource on. Default is to provision on the affiliated host.

getHost()

setRepository(String repository)

Set the repository to provision the resource on. Default is to use the same repository as source.

getRepository()

setAssignHostImmediately(boolean value)

Set whether to wait or assign the host immediately. Default is false.

getAssignHostImmediately()

Examples

Example of using ProvisionSpec for defining a provision to reserve a provisioned resource for user “nightly”:

      spec = ProvisionSpec()
      spec.setReserveForUser('nightly')
      self.provision(spec)    

See Also

Javadoc: ProvisionSpec