com.novell.zos.jdl
Class ProvisionSpec

java.lang.Object
  extended by com.novell.zos.jdl.ProvisionSpec

public class ProvisionSpec
extends java.lang.Object

Defines the attributes for starting a provision. An instance of this class is passed to the resource.provision() method.

Example of using ProvisionSpec for defining a provision to reserve a VM resource named 'sles10' for user 'nightly'

      vm = getMatrix().getGridObject(TYPE_RESOURCE,"sles10")
      spec = ProvisionSpec()
      spec.setReserveForUser('nightly')
      vm.provision(spec)
 

If no reservations are specifed the lifecycle mode is MODE_MANUAL.


Constructor Summary
ProvisionSpec()
          Construct a default ProvisionSpec.
 
Method Summary
 void setAssignHostImmediately(boolean value)
          Set whether to wait or assign the host immediately.
 void setHost(java.lang.String host)
          Set the host to provision the resource on.
 void setIdleTimeout(int idleTimeout)
          Set idle timeout for provisioned resource.
 void setPriority(int priority)
          Set a priority for VM host allocation for this provision using supplied integer constant.
 void setPriority(java.lang.String priority)
          Set a priority for VM host allocation for this provision using supplied string.
 void setRepository(java.lang.String repository)
          Set the repository to provision the resource on.
 void setReserveForJob(java.lang.String jobID)
          Set the job ID to reserve the provisioned resource for.
 void setReserveForUser(java.lang.String userID)
          Set the user ID to reserve the provisioned resource for.
 void setReserveWithPolicy(java.lang.String policyText)
          Set a policy to use for reserving the provisioned resource.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ProvisionSpec

public ProvisionSpec()
Construct a default ProvisionSpec.

Method Detail

setReserveForJob

public void setReserveForJob(java.lang.String jobID)
Set the job ID to reserve the provisioned resource for. Default is no job. If set the mode of the provision will be MODE_FORJOB.
Note: policy reservation or user reservation will override.

Parameters:
jobID - ID for job to reserve for

setReserveForUser

public void setReserveForUser(java.lang.String userID)
Set the user ID to reserve the provisioned resource for. Default is no user. If set the mode of the provision will be MODE_FORUSER and the jobid reservation settings will ignored.
Note: policy reservation will override

Parameters:
userID - ID of user to reserve for

setIdleTimeout

public void setIdleTimeout(int idleTimeout)
Set idle timeout for provisioned resource. Default is value of resource.provisioned.timeout

Parameters:
idleTimeout - Idle timeout in seconds for provisioned resource

setPriority

public void setPriority(java.lang.String priority)
Set a priority for VM host allocation for this provision using supplied string. Default is the user's priority.

Parameters:
priority - Priority to set in the user's band

setPriority

public void setPriority(int priority)
Set a priority for VM host allocation for this provision using supplied integer constant. Default is the user's priority.

Parameters:
priority - Priority to set in the user's band

setReserveWithPolicy

public void setReserveWithPolicy(java.lang.String policyText)
Set a policy to use for reserving the provisioned resource. Default is no policy. If set the mode of the provision will be MODE_WITHPOLICY and the user and jobid reservation settings will be ignored.

Parameters:
policyText - Policy text

setHost

public void setHost(java.lang.String host)
Set the host to provision the resource on. Default is to provision on the affiliated host.

Parameters:
host - ID of host to provision on

setRepository

public void setRepository(java.lang.String repository)
Set the repository to provision the resource on. Default is to use the same repository as source.

Parameters:
repository - ID of repository to provision on

setAssignHostImmediately

public void setAssignHostImmediately(boolean value)
Set whether to wait or assign the host immediately. Default is false.

Parameters:
value - True to assign immediately, false to wait


Copyright (c) 2008 Novell, Inc. All rights reserved.