OpenClovis Logo

Files | Classes | Macros | Typedefs | Functions | Variables
API Reference Pages
Provisioning Library

Defines, Structures, Typedefs, Functions. More...

Files

file  clProvApi.h
 Header file of Provision Library related APIs.
file  clProvErrors.h
 Header file of Provision Library related Error Codes.
file  clProvOmApi.h
 Header file of Provision OM Class Definition and Callbacks.

Classes

struct  ClProvTxnCallbacksT
 This structure is used to get the start and end callbacks for a transaction from the user. More...
struct  ClProvTxnData
 The structure is used to pass the job information while calling the object implementer's callback functions. More...

Macros

#define CL_PROV_ERR_NO_MEMORY   CL_ERR_NO_MEMORY
 Provision Library returns this when memory allocation failed.
#define CL_PROV_ERR_NOT_INITIALIZED   CL_ERR_NOT_INITIALIZED
 Provision Library returns this error if the provision initialization was not done.
#define CL_PROV_INTERNAL_ERROR   0x100
 Provision Library returns this error when internal error happens.

Typedefs

typedef struct ClProvTxnData ClProvTxnDataT
 The structure is used to pass the job information while calling the object implementer's callback functions.
typedef void(* ClProvTxnEndCallbackT )(CL_IN ClHandleT txnHandle)
 Transaction end callback function which will be provided by the user.
typedef void(* ClProvTxnStartCallbackT )(CL_IN ClHandleT txnHandle)
 Transaction start callback function which will be provided by the user.

Functions

ClRcT clProvFinalize ()
 Cleans up the Provision Manager library.
ClRcT clProvInitialize ()
 Initializes the Provision Manager library.
ClRcT clProvObjectCreate (CL_IN ClCorMOIdPtrT pMoId, CL_IN ClCorAttributeValueListPtrT attrList, CL_OUT ClCorObjectHandleT *pHandle)
 Create Prov MSO object.
ClRcT clProvObjectDelete (CL_IN ClCorObjectHandleT handle)
 Delete Prov MSO object.
ClRcT clProvVersionCheck (CL_INOUT ClVersionT *pVersion)
 Verify the provision library version.

Variables

void(* clProvObjectEnd )(ClCorMOIdPtrT pMoId, ClHandleT txnHandle)
 Object operations end callback function which will be provided by the user.
ClRcT(* clProvObjectRead )(CL_OM_PROV_CLASS *pThis, ClHandleT txnHandle, ClProvTxnDataT *pProvTxnDataList, ClUint32T txnDataEntries)
 Get all the attributes values.
ClRcT(* clProvObjectRollback )(CL_OM_PROV_CLASS *pThis, ClHandleT txnHandle, ClProvTxnDataT *pProvTxnDataList, ClUint32T txnDataEntries)
 Group rollback proivision attributes changes.
void(* clProvObjectStart )(ClCorMOIdPtrT pMoId, ClHandleT txnHandle)
 Object operations start callback function which will be provided by the user.
ClRcT(* clProvObjectUpdate )(CL_OM_PROV_CLASS *pThis, ClHandleT txnHandle, ClProvTxnDataT *pProvTxnDataList, ClUint32T txnDataEntries)
 Group update proivision attributes changes.
ClRcT(* clProvObjectValidate )(CL_OM_PROV_CLASS *pThis, ClHandleT txnHandle, ClProvTxnDataT *pProvTxnDataList, ClUint32T txnDataEntries)
 Group validate proivision attributes change requests.
ClRcT(* clProvRead )(CL_OM_PROV_CLASS *pThis, ClHandleT txnHandle, ClProvTxnDataT *pProvTxn)
 Get attribute value.
ClRcT(* clProvRollback )(CL_OM_PROV_CLASS *pThis, ClHandleT txnHandle, ClProvTxnDataT *pProvTxn)
 Rollback provision attribute change request.
ClRcT(* clProvUpdate )(CL_OM_PROV_CLASS *pThis, ClHandleT txnHandle, ClProvTxnDataT *pProvTxn)
 Update provision attribute change request.
ClRcT(* clProvValidate )(CL_OM_PROV_CLASS *pThis, ClHandleT txnHandle, ClProvTxnDataT *pProvTxn)
 Provision Library base class.

Detailed Description

Defines, Structures, Typedefs, Functions.

Typedef Documentation

typedef struct ClProvTxnData ClProvTxnDataT

The structure is used to pass the job information while calling the object implementer's callback functions.

These functions include the validate, update and rollback callbacks used for processing the object modification request (create/set/delete) and the read callback for processing the get request on a transient attribute of a managed resource. The object implementer registers the callbacks which will be called in its context if any operation is done on its managed resources.

typedef void(* ClProvTxnEndCallbackT)(CL_IN ClHandleT txnHandle)

Transaction end callback function which will be provided by the user.

Header File:
clProvApi.h
Parameters
txnHandle(in) Unique handle for the transaction.
Return values
none
Description:
This callback function is used to let the user know that a transaction is getting ended. This will be called after all the transaction requests are completed. The 'txnHandle' contains the unique handle of the transaction. If the user doesn't want this callback to be called, then he can pass NULL as the value for this callback.
Library File:
ClProv
Note
None.
typedef void(* ClProvTxnStartCallbackT)(CL_IN ClHandleT txnHandle)

Transaction start callback function which will be provided by the user.

Header File:
clProvApi.h
Parameters
txnHandle(in) Unique handle for the transaction.
Return values
none
Description:
This callback function is used to let the user know that a transaction is getting started. This will be called before starting any of the transaction requests. The 'txnHandle' contains the unique handle for the transaction. If the user doesn't want this callback to be called, then he can pass NULL as the value for this callback.
Library File:
ClProv
Note
None.

Function Documentation

ClRcT clProvFinalize ( )

Cleans up the Provision Manager library.

Header File:
clProvApi.h
Parameters
None.
Return values
CL_OKThe function is executed successfully.
Description:
This API is used to clean up the Provision Manager library from the invoking component.
Library File:
ClProv
Note
None.
ClRcT clProvInitialize ( )

Initializes the Provision Manager library.

Header File:
clProvApi.h
Parameters
None.
Return values
CL_OKThe function is executed successfully.
Description:
This API is used to initialize the Provision library for the component. It takes care of pre-provisioned information for a given resource(s), which are controlled by the invoking component.
Library File:
ClProv
Note
None.
ClRcT clProvObjectCreate ( CL_IN ClCorMOIdPtrT  pMoId,
CL_IN ClCorAttributeValueListPtrT  attrList,
CL_OUT ClCorObjectHandleT pHandle 
)

Create Prov MSO object.

Header File:
clProvApi.h
Parameters
pMoId(in) MOID of given resource for which creating Prov MSO
attrList(in) List of attributes to be initialized. This should contain the value for all the 'WRITE-INITIALIZED' attributes in that MO. In case if there is no 'WRITE-INITIALIZED' attributes in given MO, we can pass NULL for this argument.
pHandle(out) Pointer to the object handle. This will be updated after creation of the object. pHandle is used to delete Prov MSO
Return values
CL_OKThe function is executed successfully.
Description:
This API is used to create Prov MSO from caller context. This function has to called from corresponding OI process context. This function takes attribute list, which needs to be filled if given Prov MSO has any WRITE-INITIALIZED attribute. If given Prov MSO is already there it will return CL_OK. If given MO is not there then it creates the same along with Prov MSO. It also adds given Prov MSO in COR route list using clCorOIRegister function.
Library File:
ClProv
Note
None.
ClRcT clProvObjectDelete ( CL_IN ClCorObjectHandleT  handle)

Delete Prov MSO object.

Header File:
clProvApi.h
Parameters
handle(in) The object handle, which is return by clProvObjectCreate API.
Return values
CL_OKThe function is executed successfully.
Description:
This API is used to delete Prov MSO from caller context. If there are no MSOs other than Prov MSO for given MO, then this function deletes given MO also. If there are other MSOs other than prov MSO in given MO, then given MO will be deleted.
Library File:
ClProv
Note
None.
ClRcT clProvVersionCheck ( CL_INOUT ClVersionT pVersion)

Verify the provision library version.

Header File:
clProvApi.h
Parameters
pVersion(in/out) This can be either an input or an output parameter. As an input parameter, version is a pointer to the required Prov version. Here, minorVersion is ignored and should be set to 0x00.
Return values
CL_OKThe function is executed successfully.
Description:
This API is used to verify the version which are supported by provision library.
Library File:
ClProv
Note
None.

Variable Documentation

void(* clProvObjectEnd)(ClCorMOIdPtrT pMoId, ClHandleT txnHandle)

Object operations end callback function which will be provided by the user.

Header File:
clProvOmApi.h
Parameters
pMoId(in) This contains the MoId of the object which is involved in the transaction.
txnHandle(in) Unique transaction identifier.
Return values
None
Description:
This callback function is used to let the user know that the transactional operations are getting ended on the object. This function will be called after all the transaction requests are completed on the object. The 'txnHandle' contains the unique handle for the transaction. If the user doesn't want this callback to be called, then he can pass NULL as the value for this callback.
Library File:
ClProv
Note
None.
ClRcT(* clProvObjectRead)(CL_OM_PROV_CLASS *pThis, ClHandleT txnHandle, ClProvTxnDataT *pProvTxnDataList, ClUint32T txnDataEntries)

Get all the attributes values.

Header File:
clProvOmApi.h
Parameters
pThis(in) : This is a pointer to the Prov class.
txnHandle(in) : Unique handle for the request.
pProvTxnDataList(in/out) : This is pointer to the list of structures containing the information about the set/create/delete jobs. The different fields of the structure are explained as part of the definition of ClProvTxnDataT structure in the API reference guide.
txnDataEntries(in) : No. of jobs in pProvTxnDataList.
Return values
CL_OKThe function is executed successfully.
Description:
This callback function will be called to read all the transient attributes values from the Primary Object Implementer (POI).
Library File:
ClProv
Note
None.
ClRcT(* clProvObjectRollback)(CL_OM_PROV_CLASS *pThis, ClHandleT txnHandle, ClProvTxnDataT *pProvTxnDataList, ClUint32T txnDataEntries)

Group rollback proivision attributes changes.

Header File:
clProvOmApi.h
Parameters
pThis(in) : This is a pointer to the Prov class.
txnHandle(in) : Unique handle for the request.
pProvTxnDataList(in) : This is pointer to the list of structures containing the information about the set/create/delete jobs. The different fields of the structure are explained as part of the definition of ClProvTxnDataT structure in the API reference guide.
txnDataEntries(in) : No. of jobs in pProvTxnDataList.
Return values
CL_OKThe function is executed successfully.
Description:
This callback function will be called if the validation has failed, so that the user can rollback all the changes done in the validation for all the requests.
Library File:
ClProv
Note
None.
See Also
clProvObjectValidate(), clProvObjectUpdate()
void(* clProvObjectStart)(ClCorMOIdPtrT pMoId, ClHandleT txnHandle)

Object operations start callback function which will be provided by the user.

Header File:
clProvOmApi.h
Parameters
pMoId(in) This contains the MoId of the object which is involved in the transaction.
txnHandle(in) Unique transaction identifier.
Return values
None
Description:
This callback function is used to let the user know that the transactional operations are getting started on the object. This function will be called before starting any of the transaction requests on the object. The 'txnHandle' contains the unique handle for the transaction. If the user doesn't want this callback to be called, then he can pass NULL as the value for this callback.
Library File:
ClProv
Note
None.
ClRcT(* clProvObjectUpdate)(CL_OM_PROV_CLASS *pThis, ClHandleT txnHandle, ClProvTxnDataT *pProvTxnDataList, ClUint32T txnDataEntries)

Group update proivision attributes changes.

Header File:
clProvOmApi.h
Parameters
pThis(in) : This is a pointer to the Prov class.
txnHandle(in) : Unique handle for the request.
pProvTxnDataList(in) : This is pointer to the list of structures containing the information about the set/create/delete jobs. The different fields of the structure are explained as part of the definition of ClProvTxnDataT structure in the API reference guide.
txnDataEntries(in) : No. of jobs in pProvTxnDataList.
Return values
CL_OKThe function is executed successfully.
Description:
This callback function will be called only if the validation was successful so that the user can group update all the attributes changes of an object.
Library File:
ClProv
Note
None.
See Also
clProvObjectValidate(), clProvObjectRollback()
ClRcT(* clProvObjectValidate)(CL_OM_PROV_CLASS *pThis, ClHandleT txnHandle, ClProvTxnDataT *pProvTxnDataList, ClUint32T txnDataEntries)

Group validate proivision attributes change requests.

Header File:
clProvOmApi.h
Parameters
pThis(in) : This is a pointer to the Prov class.
txnHandle(in) : Unique handle for the request.
pProvTxnDataList(in) : This is pointer to the list of structures containing the information about the set/create/delete jobs. The different fields of the structure are explained as part of the definition of ClProvTxnDataT structure in the API reference guide.
txnDataEntries(in) : No. of jobs in pProvTxnDataList.
Return values
CL_OKThe function is executed successfully.
Description:
This callback function will be called to group validate all the attributes changes of an object. In this function the user need to have necessary logic to verify the attributes changes and can return non CL_OK if the validation fails. If the return value is non CL_OK then clProvObjectRollback() function will get called otherwise clProvObjectUpdate() function will get called.
Library File:
ClProv
Note
None.
See Also
clProvObjectRollback(), clProvObjectUpdate()
ClRcT(* clProvRead)(CL_OM_PROV_CLASS *pThis, ClHandleT txnHandle, ClProvTxnDataT *pProvTxn)

Get attribute value.

Header File:
clProvOmApi.h
Parameters
pThis(in) Ignore this argument, this is obsolete.
txnHandle(in) Unique transaction identification.
pProvTxn(in) Pointer to the structure contains necessary information to identify which attribute in given Prov MSO is changed, its value and its property
Return values
CL_OKThe function is executed successfully.
Description:
This callback function will be called when get request for Run-Time attribute of Prov MSO.
Library File:
ClProv
Note
This function is being deprecated, if clProvObjectRead() callback function has been defined, then that function will be called instead of this to read all the attributes values in an object.
See Also
clProvObjectRead()
ClRcT(* clProvRollback)(CL_OM_PROV_CLASS *pThis, ClHandleT txnHandle, ClProvTxnDataT *pProvTxn)

Rollback provision attribute change request.

Header File:
clProvOmApi.h
Parameters
pThis(in) Ignore this argument, this is obsolete.
txnHandle(in) Unique transaction identification.
pProvTxn(in) Pointer to the structure contains necessary information to identify which attribute in given Prov MSO is changed, its value and its property
Return values
CL_OKThe function is executed successfully.
Description:
This callback function will be called when clProvValidate function returns non CL_OK.
Library File:
ClProv
Note
This function is being deprecated, if clProvObjectRollback() has been defined, then that function will be called instead of this to group rollback all the changes in an object.
See Also
clProvObjectRollback()
ClRcT(* clProvUpdate)(CL_OM_PROV_CLASS *pThis, ClHandleT txnHandle, ClProvTxnDataT *pProvTxn)

Update provision attribute change request.

Header File:
clProvOmApi.h
Parameters
pThis(in) Ignore this argument, this is obsolete.
txnHandle(in) Unique transaction identification.
pProvTxn(in) Pointer to the structure contains necessary information to identify which attribute in given Prov MSO is changed, its value and its property
Return values
CL_OKThe function is executed successfully.
Description:
This callback function will be called for change in any attribute. In this function needs to have a logic to take any action for attribute change. This function will called after clProvValidate function is called for all the attributes which are changed in given transation.
Library File:
ClProv
Note
This function is being deprecated, if clProvObjectUpdate() callback function has been defined, then that function will be called instead of this to group update all the requests in an object.
See Also
clProvObjectUpdate()
ClRcT(* clProvValidate)(CL_OM_PROV_CLASS *pThis, ClHandleT txnHandle, ClProvTxnDataT *pProvTxn)

Provision Library base class.

Validating provision attribute change request

Header File:
clProvOmApi.h
Parameters
pThis(in) Ignore this argument, this is obsolete.
txnHandle(in) Unique transaction identification.
pProvTxn(in) Pointer to the structure contains necessary information to identify which attribute in given Prov MSO is changed, its value and its property
Return values
CL_OKThe function is executed successfully.
Description:
This callback function will be called for change in any attribute. In this function need to have necessary logic to verify attribute change can be accepected by given OI. If not it can return non CL_OK. If the return value is non CL_OK then clProvRollback function will be get called. If return value is CL_OK then clProvUpdate function will be get called. This is the first function called in the two phase transaction for given change in attribute. If more than one attribute is change for given Prov MSO, then this function will called for all those attributes one by one. If validation for all the attribute is success then clProvUpdate function will be called. For example given transation 5 attributes are changed. For first three attributes validation sucessed and 4th attribute is failed. Then clProvRollback function will be called only for first 3 three attributes.
Library File:
ClProv
Note
This function is being deprecated, if clProvObjectValidate() callback function has been defined in the Object Implementer, then that will be called instead of this to group validate all the requests in an object.
See Also
clProvObjectValidate()

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