OpenClovis Logo

API Usage Examples

Code Examples.

Code Examples.

The following code snippet requests the cold reset of a blade in physical slot 6 in chassis 0. Before the actual call, it first verifies the version of the client library. The code relies on an imaginary handleCriticalError() function for reporting exceptions.

ClRcT rc = CL_OK;
rc = clCmVersionVerify(&version);
if (CL_OK != rc) {
/* We simply bail out if we detect a version mismatch */
handleCriticalError(rc, "CM service version mismatch");
}
if (CL_OK != rc) {
handleCriticalError(rc, "Blade reset failed");
}
#define clCmBladeOperationRequest(chassisId, physSlot, request)
Operates on the Blade or any platform hardware.
Definition: clCmApi.h:350
#define clCmVersionVerify(version)
This api can be used to verify the version supported by the CM.
Definition: clCmApi.h:312
#define CL_CM_VERSION
Latest supported version of the Chassis Manager client service.
Definition: clCmApi.h:64
@ CL_CM_RESET_REQUEST
Request a cold reset of FRU.
Definition: clCmApi.h:217
ClUint32T ClRcT
Clovis return code type.
Definition: clCommon.h:168
#define CL_OK
Every thing is OK.
Definition: clCommonErrors.h:68
Version Information for various services.
Definition: clCommon.h:250

Generated on Tue Jan 10 10:29:15 PST 2012 for OpenClovis SDK using Doxygen