|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.novell.zos.jdl.GridObjectInfo com.novell.zos.jdl.MatrixInfo
public class MatrixInfo
The MatrixInfo class is a representation of the matrix grid object.
This provides operations for retrieving and creating grid objects
in the system.
MatrixInfo is retrieved using the built-in getMatrix()
function.
Write capability is dependent on the context in which getMatrix()
is called.
For example, in a Joblet process on a resource or in a Computed Fact, creating new grid objects is not
supported.
Method Summary | |
---|---|
GridObjectInfo |
createGridObject(java.lang.String objectType,
java.lang.String objectName)
Create a Grid Object using supplied type and name. |
GroupInfo |
createGroup(java.lang.String gridObjectType,
java.lang.String groupName)
Create and return a Group Grid Object using the supplied grid object type and group name. |
ResourceInfo |
createResource(java.lang.String name)
Create a Physical Resource Grid Object with supplied name. |
ResourceInfo |
createResource(java.lang.String name,
java.lang.String type)
Create a Resource Grid Object using supplied Resource type. |
ResourceInfo |
createResource(java.lang.String name,
java.lang.String type,
boolean addSuffix)
Create a Resource Grid Object using supplied Resource type. |
java.lang.String |
deploy(java.lang.String path)
Deploy a component to this server. |
void |
discoverAll(java.lang.String provisioningAdapterName)
Initiate a discovery of all VmHosts and Repositories under management of the supplied provisioning adapter name. |
org.python.core.PyList |
getActiveJobs()
Retrieve a list of Job Instance Grid Objects representing the currently active job instances. |
GridObjectInfo |
getGridObject(java.lang.String objectType,
java.lang.String objectName)
Retrieve a named Grid Object of the requested type. |
org.python.core.PyList |
getGridObjects(java.lang.String objectType,
Constraint constraint)
Return a list of all matching grid objects of the requested type that match the constraints. |
org.python.core.PyList |
getGridObjects(java.lang.String objectType,
Constraint constraint,
java.lang.String[] rankBy)
Return a list of all matching grid objects of the requested type that match the constraints and in the supplied order ranking. |
org.python.core.PyList |
getGridObjects(java.lang.String objectType,
java.lang.String constraintStr)
Return a list of all matching grid objects of the requested type that match the constraints. |
org.python.core.PyList |
getGridObjects(java.lang.String objectType,
java.lang.String constraintStr,
java.lang.String[] rankBy)
Return a list of all matching grid objects of the requested type that match the constraints and in the supplied order ranking. |
GroupInfo |
getGroup(java.lang.String gridObjectType,
java.lang.String groupName)
Retrieve Group Grid Object supplying a grid object type and a group name. |
PolicyInfo |
getPolicy(java.lang.String name)
Retrieve a Policy object. |
java.lang.String |
getTempDir()
Retrieve the system temporary directory to use for creating temporary files. |
void |
removeGridObject(java.lang.String objectType,
java.lang.String objectName)
Remove a Grid Object from the system using supplied type and name. |
void |
removeGroup(java.lang.String gridObjectType,
java.lang.String groupName)
Remove Group Grid Object supplying a grid object type and a group name. |
void |
undeploy(java.lang.String component)
Undeploy a component from this server. |
Methods inherited from class com.novell.zos.jdl.GridObjectInfo |
---|
deleteFact, factExists, getFact, getFactLastModified, getFactNames, refresh, setArrayFact, setBooleanArrayFact, setDateArrayFact, setDateFact, setFact, setIntegerArrayFact, setRealArrayFact, setStringArrayFact, setTimeArrayFact, setTimeFact |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public ResourceInfo createResource(java.lang.String name)
name
- Name of new Resource Grid Object
java.lang.Exception
- if resource already existspublic ResourceInfo createResource(java.lang.String name, java.lang.String type)
The Resource type must be one of the constants from ResourceInfo
.
ResourceInfo.TYPE_FIXED,ResourceInfo.TYPE_VM_INSTANCE,ResourceInfo.TYPE_VM_TEMPLATE
name
- Name of new Resource Grid Objecttype
- One of the Resource types.
java.lang.Exception
- if resource already existspublic ResourceInfo createResource(java.lang.String name, java.lang.String type, boolean addSuffix)
The Resource type must be one of the constants from ResourceInfo
.
ResourceInfo.TYPE_FIXED,ResourceInfo.TYPE_VM_INSTANCE,ResourceInfo.TYPE_VM_TEMPLATE
name
- Name of new Resource Grid Objecttype
- One of the Resource types.addSuffix
- true to make the name unique by automatically adding
a numeric suffix
java.lang.Exception
- if resource already existspublic GroupInfo createGroup(java.lang.String gridObjectType, java.lang.String groupName)
Built-in "object type" variable constants:
TYPE_USER TYPE_JOB TYPE_RESOURCE TYPE_REPOSITORY
gridObjectType
- One of the known grid object typesgroupName
- Name of group to retrieve. It must not exist.
exception
- if group already existspublic void removeGroup(java.lang.String gridObjectType, java.lang.String groupName)
gridObjectType
- One of the known grid object typesgroupName
- Name of group to retrieve. It must exist.
exception
- if group does not existpublic GroupInfo getGroup(java.lang.String gridObjectType, java.lang.String groupName)
Built-in "object type" variable constants:
TYPE_USER TYPE_JOB TYPE_RESOURCE TYPE_REPOSITORY
gridObjectType
- One of the known grid object typesgroupName
- Name of group to retrieve. It must exist.
java.lang.Exception
- if grid object type is invalidpublic PolicyInfo getPolicy(java.lang.String name)
name
- Name of policy. Policy must exist
exception
- if policy does not existpublic GridObjectInfo createGridObject(java.lang.String objectType, java.lang.String objectName)
Built-in "object type" variable constants:
TYPE_USER TYPE_RESOURCE TYPE_REPOSITORYCreating an object of
TYPE_RESOURCE
will create a physical resource.
Use createResource
to supply a resource type (such as VM, VM Template).
Job, Job Instance and Policy objects cannot be created this way. Jobs and policies are deployed
and Job Instance objects are created as a result of starting a job.
objectType
- Grid Object typeobjectName
- Grid Object name
java.lang.Exception
- if object already existspublic void removeGridObject(java.lang.String objectType, java.lang.String objectName)
objectType
- Grid Object typeobjectName
- Grid Object name
java.lang.Exception
- if object does not existpublic GridObjectInfo getGridObject(java.lang.String objectType, java.lang.String objectName)
Example to retrieve the Grid Object for the user named 'foo' and
print the value of the user object's id
fact:
gridObject = getMatrix().getGridObject(TYPE_USER,"foo") print gridObject.getFact("user.id")
Built-in "object type" variable constants:
TYPE_USER TYPE_JOB TYPE_JOBINSTANCE TYPE_RESOURCE TYPE_VMHOST TYPE_REPOSITORY TYPE_USERGROUP TYPE_JOBGROUP TYPE_RESOURCEGROUP TYPE_REPOSITORYGROUP
objectType
- Grid Object typeobjectName
- Grid Object name
java.lang.Exception
- if supplied object type is invalidpublic org.python.core.PyList getGridObjects(java.lang.String objectType, java.lang.String constraintStr)
The constraint is expected to only contain facts that relate to the object being searched. Other supplied constraints (if otherwise valid) will always evaluate to false and thus will always result in no matches.
objectType
- the Grid Object type to search forconstraintStr
- the string representation of the constraint to be
used in the search.
GridAuthenticationException
- is the supplied credentials are
invalid or do no permit the operation.
GridException
- if any error occurs such as an illegal constraintpublic org.python.core.PyList getGridObjects(java.lang.String objectType, java.lang.String constraintStr, java.lang.String[] rankBy)
The constraint is expected to only contain facts that relate to the object being searched. Other supplied constraints (if otherwise valid) will always evaluate to false and thus will always result in no matches.
Ordering is specified as an array of strings with each element in the form "<factname>/<ascending|descending". The ascending/decending order may be shortened to 'a|d'.
objectType
- the Grid Object type to search forconstraintStr
- the string representation of the constraint to be
used in the search.rankBy
- the specification used to order the returned array or
None for don't care
GridAuthenticationException
- is the supplied credentials are
invalid or do no permit the operation.
GridException
- if any error occurs such as an illegal constraintpublic org.python.core.PyList getGridObjects(java.lang.String objectType, Constraint constraint)
Example to get all resources running on a specific operating system:
constraint = EqConstraint() constraint.setFact("resource.os.name") constraint.setValue("Windows XP") resources = getMatrix().getGridObjects("resource",constraint)
constraint
- the constraint to be used in the search.objectType
- the Grid Object type to search for
GridAuthenticationException
- is the supplied credentials are
invalid or do no permit the operation.
GridException
- if any error occurs such as an illegal constraintpublic org.python.core.PyList getGridObjects(java.lang.String objectType, Constraint constraint, java.lang.String[] rankBy)
Ordering is specified as an array of strings with each element in the form "<factname>/<ascending|descending". The ascending/decending order may be shortened to 'a|d'.
constraint
- the constraint to be used in the search.objectType
- the Grid Object type to search forrankBy
- the specification used to order the returned array or
None for don't care
GridAuthenticationException
- is the supplied credentials are
invalid or do no permit the operation.
GridException
- if any error occurs such as an illegal constraintpublic void discoverAll(java.lang.String provisioningAdapterName)
provisioningAdapterName
- the name of the provisioning adapter
to use for discovery.
java.lang.Exception
- if an error occurs launching or running the
provisioning adpater or a discovery is already in progres.public org.python.core.PyList getActiveJobs()
public java.lang.String deploy(java.lang.String path)
path
- Path to a deployable file or directory of deployables
public void undeploy(java.lang.String component)
component
- Deployment session identifierpublic java.lang.String getTempDir()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |