3.1.4.2.44 ApiDeleteGroup (Opnum 43)
(Protocol Version 3) The ApiDeleteGroup method removes the designated group from the nonvolatile cluster state.
The server MUST fail this method using ERROR_DIR_NOT_EMPTY if one or more resources are contained in the group and the force parameter is set to false, unless the resource is one of core resources, in which case server returns ERROR_CORE_RESOURCE.
A client SHOULD immediately close the HGROUP_RPC handle to the group using the ApiCloseGroup method upon successful completion of this method.
The server MUST accept an ApiDeleteGroup request only if its protocol server state is read/write, as specified in section 3.1.1.
The server MUST require that the access level associated with the Group context handle is "All" (section 3.1.4).
-
error_status_t ApiDeleteGroup( [in] HGROUP_RPC Group, [in] BOOL force, [out] error_status_t *rpc_status );
Group: An HGROUP_RPC context handle that was obtained in a previous ApiOpenGroup, ApiOpenGroupEx, or ApiCreateGroup method call.
force: When set to TRUE, the server MUST bring all resources contained within the group to either the ClusterResourceOffline or ClusterResourceFailed state, delete the resources, and delete the group.
rpc_status: A 32-bit integer used to indicate success or failure. The RPC runtime MUST indicate, by writing to this parameter, whether the runtime succeeded in executing this method on the server. The encoding of the value passed in this parameter MUST conform to encoding for comm_status and fault_status, as specified in Appendix E of [C706].
Return Values: The method MUST return the following error codes for the specified conditions.
-
Return value/code
Description
0x00000000
ERROR_SUCCESS
Success.
0x00000006
ERROR_INVALID_HANDLE
The hGroup parameter does not represent a valid HGROUP_RPC context handle.
0x00000091
ERROR_DIR_NOT_EMPTY
One or more resources are contained in the group.
0x00001394
ERROR_GROUP_NOT_AVAILABLE
The group represented by the hGroup parameter is not part of the nonvolatile cluster state.
0x00001395
ERROR_GROUP_NOT_FOUND
The group represented by the hGroup parameter no longer exists in the nonvolatile cluster state.
0x000013A2
ERROR_CORE_RESOURCE
One or more of the resources contained in the group is a core resource.
For any other condition, the server MUST set Status to a value that is not one of the values listed in the preceding table. The client MUST treat all values that are not listed in the preceding table the same, except as specified in section 3.2.4.6.
The server MUST return ERROR_GROUP_NOT_AVAILABLE if, at the time the server receives the request from the client, the group represented by the hGroup parameter is not part of the nonvolatile cluster state.
The server SHOULD return ERROR_GROUP_NOT_FOUND if the server determines that the group represented by the hGroup parameter has already been deleted. This is determined while communicating with other servers to delete the group from the nonvolatile cluster state. The manner of determination is implementation-specific.