Export (0) Print
Expand All
This topic has not yet been rated - Rate this topic

3.2.4.2 Cluster Resources and Groups

In order to operate on a clusterresource or group, a client MUST establish a ClusAPI RPC interface connection to an active node, as specified in section 3.2.3.

In order to operate on a cluster resource, the client MAY call ApiOpenResource (section 3.1.4.1.9 for protocol version 2, or 3.1.4.2.9 for protocol version 3), designating either the resource name or ID. If the resource does not have a well-known name, the client MAY determine the name by using a mechanism such as a resource enumeration.

For example, to access a resource of a particular resource type, a client obtains an enumeration of all resources in the cluster by using ApiCreateEnum (section 3.1.4.1.8 for protocol version 2, or 3.1.4.2.8 for protocol version 3) with enumeration type CLUSTER_ENUM_RESOURCE. For each resource name in the enumeration, the client calls ApiOpenResource followed by ApiGetResourceType (section 3.1.4.1.16 for protocol version 2, or 3.1.4.2.16 for protocol version 3), and the client compares the returned resource type name to the name of the resource type it is searching for.

As another example, to open all resources that are not in the ClusterResourceOnline state (as specified in ApiGetResourceState; section 3.1.4.1.13 for protocol version 2, or 3.1.4.2.13 for protocol version 3), the client calls ApiCreateEnum with enumeration type CLUSTER_ENUM_RESOURCE, and for each resource name in the enumeration, the client calls ApiOpenResource followed by ApiGetResourceState.

After a resource is opened and a client has an HRES_RPC context handle, the client can perform operations on the resource, such as:

  • Bringing it online: ApiOnlineResource (section 3.1.4.1.18 for protocol version 2, or 3.1.4.2.18 for protocol version 3)

  • Bringing it offline: ApiOfflineResource (section 3.1.4.1.19 for protocol version 2, or 3.1.4.2.19 for protocol version 3)

  • Adding dependencies: ApiAddResourceDependency (section 3.1.4.1.20 for protocol version 2, or 3.1.4.2.20 for protocol version 3)

  • Removing dependencies: ApiRemoveResourceDependency (section 3.1.4.1.21 for protocol version 2, or 3.1.4.2.21 for protocol version 3)

When a client has finished performing operations with an HRES_RPC context handle, it SHOULD release the context handle by calling ApiCloseResource (section 3.1.4.1.12 for protocol version 2, or 3.1.4.2.12 for protocol version 3).

In order to operate on a cluster group, the client MAY call ApiOpenGroup (section 3.1.4.1.42 for protocol version 2, or 3.1.4.2.42 for protocol version 3) designating the name of the group. If the group does not have a well-known name, the client MAY obtain the group name by querying the state of one of the group resources (see ApiGetResourceState).

After a group is opened and a client has an HGROUP_RPC context handle, the client MAY perform operations on the group, such as moving it using ApiMoveGroup (section 3.1.4.1.52 for protocol version 2, or 3.1.4.2.52 for protocol version 3), moving it using ApiMoveGroupToNode (section 3.1.4.1.53 for protocol version 2, or 3.1.4.2.53 for protocol version 3), and querying its state using ApiGetGroupState (section 3.1.4.1.46 for protocol version 2, or 3.1.4.2.46 for protocol version 3).

When a client has finished performing operations with an HGROUP_RPC context handle, it MAY release the context handle by calling ApiCloseGroup (section 3.1.4.1.45 for protocol version 2, or 3.1.4.2.45 for protocol version 3).

 
Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2014 Microsoft. All rights reserved.