ResourceInfo is a representation of a resource grid object. This class inherits the base fact operations from GridObjectInfo and adds the provisioning operations for provisionable resources such as VMs. See MatrixInfo for how to script creation of Resource objects.
ResourceInfo Construct a ResourceInfo
Construct a ResourceInfo
Assign resource manager API
Shut down the agent on this resource if it is online. Operation has no effect if agent is already offline.
The ProvisioningContainer is implemented by the NodeManager. This sets the redirection.
Provision this resource for general use. If this resource is a template, a new instance is created.
Provision this resource using the supplied <code>ProvisionSpec</code> instance. If this resource is a template, a new instance is created.
Return all provisioned instances of this resource.
Initiate a soft shut down of this provisioned resource.
Move the disk images for this VM to new repository.
Shut down this provisioned resource. Optionally initiating a hard shut down.
Suspend this provisioned resource.
Suspend this provisioned resource. Optionally initiating a hard shut down.
Pause this provisioned resource.
Resume a previsously paused provisioned resource.
Personalize (autoprep) a provisioned resource.
Save VM config of a provisioned resource.
Apply VM config to a provisioned resource.
Restart this provisioned resource.
Restart this provisioned resource. Optionally initiating a hard shut down.
Create a new Template resource from this resource using the supplied name.
Create a new Template resource from this resource using the supplied <code>VmSpec</code> instance.
Create a copy of this Resource using the supplied name.
Create a copy of this Resource using the supplied <code>VmSpec</code>.
Migrate this provisioned resource to another host.
Migrate this provisioned resource to the supplied host.
Check and resync the state of this resource. If this is a provisioned resource, this will determine whether the resource is up or down or does not exist.
Create a new provisionable resource. The name of the new resource is generated.
Create a new provisionable resource using the supplied <code>VmSpec</code>.
Destroy this provisionable resource.
Cancel the current action on this resource.
Create a checkpoint for a provisioned resource.
Create a checkpoint for a provisioned resource supplying a checkpoint name.
Restore a provisioned resource to a checkpoint
Restore a provisioned resource to a checkpoint
Remove dependencies from provisionable instance to a parent template This allows the template to be removed from the system without affecting the instance.
Install a GMS Agent on this provisionable resource. The new GMS Agent will communicate with this GMS server.
Install a GMS Agent on this provisionable resource. The new GMS Agent will communicate with this GMS server or the server specified in the params dictionary. The key value pairs supplied in the dictionary are the equivalent to the install command line <pre>-D</pre> options.
Create a new Vm host grid object associated with this physical resource. <p> The supplied provisioning adapter job name is required for qualifying the name of the new Vm Host. This operation is not supported if this is not a physical resource object.
Retrieve an existing Vm host grid object associated with this physical resource. <p> The supplied provisioning adapter job name is required for qualifying which Vm Host to retrieve. This operation is not supported if this is not a physical resource object.
VmSpec is used here for creating a clone on a named host from a template resource:
resource = getMatrix().getGridObject(TYPE_RESOURCE,"myTemplate") spec = VmSpec() spec.setNewName("newvm") spec.setHost('vmhost-qa') resource.clone(spec)
VmSpec is used here to retrieve an existing ResourceInfo and print the value of a fact:
resource = getMatrix().getGridObject("resource","redhat_lab1") print resource.getFact("resource.os.name")
VmSpec is used here to retrieve an existing ResourceInfo and initiate a provision operation on the Resource:
vm = getMatrix().getGridObject("resource","winxpvm") vm.provision()
GridObjectInfo and MatrixInfo.
Javadoc: ResourceInfo