Defines, Structures, Typedefs, Functions.
More...
Files |
file | clNameApi.h |
| Header file of Name Service Related APIs.
|
file | clNameConfigApi.h |
| Header file of Name Service lifecycle module related datastructures and APIs.
|
file | clNameErrors.h |
| Header file of Name Service Related Error Codes.
|
Functions |
ClRcT | clNameComponentDeregister (CL_IN ClUint32T compId) |
| De-registers all entries of a component with Name Service.
|
ClRcT | clNameContextCreate (CL_IN ClNameSvcContextT contextType, CL_IN ClUint32T contextMapCookie, CL_OUT ClUint32T *contextId) |
| Creates a context.
|
ClRcT | clNameContextDelete (CL_IN ClUint32T contextId) |
| Deletes a context.
|
ClRcT | clNameLibFinalize (void) |
| Finalizes the name service library.
|
ClRcT | clNameLibInitialize () |
| Initializes the name service library.
|
ClRcT | clNameLibVersionVerify (CL_INOUT ClVersionT *pVersion) |
| Verifies the version with the name service library.
|
ClRcT | clNameObjectMappingCleanup (CL_IN ClNameSvcEntryPtrT pObjMapping) |
| Frees the object mapping entry.
|
ClRcT | clNameRegister (CL_IN ClUint32T contextId, CL_IN ClNameSvcRegisterT *pNSRegisInfo, CL_INOUT ClUint64T *pObjReference) |
| Registers name to object reference mapping with Name Service.
|
ClRcT | clNameServiceDeregister (CL_IN ClUint32T contextId, CL_IN ClUint32T compId, CL_IN ClNameT *serviceName) |
| De-registers a particular service provided by a component.
|
ClRcT | clNameToObjectMappingGet (CL_IN ClNameT *pName, CL_IN ClUint32T attrCount, CL_IN ClNameSvcAttrEntryT *pAttr, CL_IN ClUint32T contextMapCookie, CL_OUT ClNameSvcEntryPtrT *pOutBuff) |
| Returns the entry of the service.
|
ClRcT | clNameToObjectReferenceGet (CL_IN ClNameT *pName, CL_IN ClUint32T attrCount, CL_IN ClNameSvcAttrEntryT *pAttr, CL_IN ClUint32T contextMapCookie, CL_OUT ClUint64T *pObjReference) |
| Returns the object reference for a service.
|
Detailed Description
Defines, Structures, Typedefs, Functions.
Enumeration Type Documentation
Type of context to be created.
- Enumerator:
CL_NS_USER_NODELOCAL |
User defined node local context.
|
CL_NS_USER_GLOBAL |
User defined global context.
|
Type of operation that invoked event publish.
- Enumerator:
CL_NS_COMPONENT_DEREGISTER_OP |
Deregistration of a component on an API request.
|
CL_NS_SERVICE_DEREGISTER_OP |
Deregistration of service provided by a component.
|
CL_NS_EO_DEREGISTER_OP |
Deregister the entries based on EoID.
|
CL_NS_COMP_DEATH_DEREGISTER_OP |
Deregister the entries based on the component death event.
|
CL_NS_NODE_DEREGISTER_OP |
Deregister entries based on the node IOC address.
|
Component Priority values.
- Enumerator:
CL_NS_PRIORITY_LOW |
Low priority.
|
CL_NS_PRIORITY_MEDIUM |
Medium priority.
|
CL_NS_PRIORITY_HIGH |
High priority.
|
Function Documentation
ClRcT clNameComponentDeregister |
( |
CL_IN ClUint32T |
compId | ) |
|
De-registers all entries of a component with Name Service.
- Header File:
- clNameApi.h
- Parameters
-
compId | Id of the component. |
- Return values
-
CL_OK | The API executed successfully. |
CL_ERR_NOT_INITIALIZED | NS Library not initialized. |
- Description:
- This API is used to deregister entries of all the services being provided by a given component. In Clovis High Availability scenario, this is called by Component Manager whenever it detects that a component has died. This can also be called by a component when it does down gracefully.
- Library Files:
- libClNameClient
- See Also
- clNameServiceDeregister(), clNameRegister()
Creates a context.
- Header File:
- clNameApi.h
- Parameters
-
- Return values
-
CL_OK | The API executed successfully. |
CL_NS_ERR_LIMIT_EXCEEDED | On creating or registering the contexts and entries more than the maximum allowed. |
CL_ERR_NO_MEMORY | On memory allocation failure. |
CL_ERR_INVALID_PARAMETER | On passing an invalid parameter. |
CL_ERR_NULL_POINTER | On passing a NULL pointer. |
CL_NS_ERR_CONTEXT_ALREADY_CREATED | On trying to cretae a context with a contextMapCookie which is already in use. |
CL_ERR_NOT_INITIALIZED | NS Library not initialized. |
- Description:
- This API is used to create a user-defined context (both global scope and node local scope).
- Library Files:
- libClNameClient
- See Also
- clNameContextDelete()
ClRcT clNameContextDelete |
( |
CL_IN ClUint32T |
contextId | ) |
|
Deletes a context.
- Header File:
- clNameApi.h
- Parameters
-
contextId | Context to be deleted. |
- Return values
-
CL_OK | The API executed successfully. |
CL_NS_ERR_CONTEXT_NOT_CREATED | On registering, deregistering or querying a context that does not exist. |
CL_NS_ERR_OPERATION_NOT_PERMITTED | On trying to delete default contexts. |
CL_ERR_NOT_INITIALIZED | NS Library not initialized. |
- Description:
- This API is used to delete a user-defined context (both global scope and node local scope).
- Library Files:
- libClNameClient
- See Also
- clNameContextCreate()
ClRcT clNameLibFinalize |
( |
void |
| ) |
|
Finalizes the name service library.
- Header File:
- clNameApi.h
- Parameters
-
- Return values
-
CL_OK | The API executed successfully. |
- Description:
- This API is for initializing the name service library. It must be invoked before invoking any of the Log service APIs.
- Library Files:
- libClNameClient
- See Also
- clNameLibInitialize()
ClRcT clNameLibInitialize |
( |
| ) |
|
Initializes the name service library.
- Header File:
- clNameApi.h
- Parameters
-
- Return values
-
CL_OK | The API executed successfully. |
CL_ERR_NULL_POINTER | On passing a NULL pointer. |
CL_ERR_INITIALIZED | Library already initialized |
- Description:
- This API is for initializing the name service library. It must be invoked before invoking any of the Name service APIs.
- Library Files:
- libClNameClient
- See Also
- clNameLibFinalize()
Verifies the version with the name service library.
- Header File:
- clNameApi.h
- Parameters
-
pVersion | Version of NS Library with the user. If version mismatch happens then this will carry out the version supported by the NS Library. |
- Return values
-
CL_OK | The API executed successfully. |
CL_ERR_NULL_POINTER | On passing a NULL pointer. |
- Description:
- This API is for verifing the version with name service library. It must be invoked after initializing the NS library and before invoking any of the Name service APIs.
- Library Files:
- libClNameClient
Frees the object mapping entry.
- Header File:
- clNameApi.h
- Parameters
-
pObjMapping | Pointer to the object mapping being deleted. |
- Return values
-
CL_OK | The API executed successfully. |
CL_ERR_NULL_POINTER | On passing a NULL pointer. |
- Description:
- This API is used to clean up the object mapping returned during the lookup.
- Library Files:
- libClNameClient
- See Also
- clNameToObjectMappingGet()
Registers name to object reference mapping with Name Service.
- Header File:
- clNameApi.h
- Note
- For registering to user defined context, first the context must be created using clNameContextCreate API.
- Parameters
-
contextId | Context in which the service will be provided. It can have the following values:
CL_NS_DEFT_GLOBAL_CONTEXT: for registering to default global context.
CL_NS_DEFT_LOCAL_CONTEXT: for registering to default node local context.
- Id returned by clNameContextCreate API: for user-defined contexts.
|
pNSRegisInfo | Registration related information |
pObjReference | This will carry the object reference. If object reference is known, pObjReference will carry the known value. If object reference is unknown, pObjReference SHOULD carry CL_NS_GET_OBJ_REF. The allocated object reference will be returned in pObjReference. |
- Return values
-
CL_OK | The API executed successfully. |
CL_ERR_NULL_POINTER | On passing a NULL pointer. |
CL_NS_ERR_CONTEXT_NOT_CREATED | On registering, deregistering or querying a context that does not exist. |
CL_NS_ERR_LIMIT_EXCEEDED | On creating or registering the contexts and entries more than the maximum allowed. |
CL_ERR_NO_MEMORY | On memory allocation failure. |
CL_ERR_NOT_INITIALIZED | NS Library not initialized. |
- Description:
- This API is used to register a name to object reference mapping with Name Service. In Clovis High Availability scenario, whenever a component is assigned as an ACTIVE HA state for a given service, it registers the same with Name Service.
- Library Files:
- libClNameClient
- See Also
- clNameComponentRegister(), clNameServiceDeregister()
De-registers a particular service provided by a component.
- Header File:
- clNameApi.h
- Parameters
-
contextId | Context in which the service will be provided. It can have the following values:
CL_NS_DEFT_GLOBAL_CONTEXT: for deregistering to default global context.
CL_NS_DEFT_LOCAL_CONTEXT: for deregistering to default node local context.
- Id returned by clNameContextCreate API: for user-defined contexts.
|
compId | Id of the component. |
serviceName | Name of the service |
- Return values
-
CL_OK | The API executed successfully. |
CL_ERR_NULL_POINTER | On passing a NULL pointer. |
CL_NS_ERR_CONTEXT_NOT_CREATED | On registering, deregistering or querying a context that does not exist. |
CL_NS_ERR_SERVICE_NOT_REGISTERED | Trying to deregister an unregistered service. |
CL_ERR_NOT_INITIALIZED | NS Library not initialized. |
- Description:
- This API is to deregister a service being provided by a given component.
- Library Files:
- libClNameClient
- See Also
- clNameComponentDeregister(), clNameRegister()
Returns the entry of the service.
- Header File:
- clNameApi.h
- Parameters
-
pName | Name of the service. |
attrCount | Number of attributes being passed in the query. If the number of attributes is unknown, then this value can be passed as CL_NS_DEFT_ATTR_LIST In such case, the object reference of component with the highest priority will be returned. |
pAttr | List of attributes. If attrCount=CL_NS_DEFT_ATTR_LIST , then this parameter must be passed as NULL. |
contextMapCookie | Cookie to find the context. There is one-to-one mapping between contextMapCookie and context. This parameter can accept the following two values:
CL_NS_DEFT_GLOBAL_MAP_COOKIE: for querying the default global context.
CL_NS_DEFT_LOCAL_MAP_COOKIE: for querying the default local context.
|
pOutBuff | (out) Contains the entry. You must free the memory after successful execution of this API. |
- Return values
-
CL_OK | The API executed successfully. |
CL_NS_ERR_CONTEXT_NOT_CREATED | On registering, deregistering or querying a context that does not exist. |
CL_NS_ERR_ENTRY_NOT_FOUND | On querying an entry that is not present. |
CL_ERR_NULL_POINTER | On passing a NULL pointer. |
CL_ERR_NOT_INITIALIZED | NS Library not initialized. |
- Description:
- This API is used to query and return the entire entry for a given service name.
- Library Files:
- libClNameClient
- See Also
- clNameObjectMappingCleanup(), clNameToObjectReferenceGet()
Returns the object reference for a service.
- Header File:
- clNameApi.h
- Parameters
-
pName | Name of the service. |
attrCount | Number of attributes being passed in the query. If the number of attributes is unknown, then this value can be passed as CL_NS_DEFT_ATTR_LIST In such case, the object reference of component with the highest priority will be returned. |
pAttr | List of attributes. If attrCount=CL_NS_DEFT_ATTR_LIST , then this parameter must be passed as NULL. |
contextMapCookie | Cookie to find the context. There is one-to-one mapping between contextMapCookie and context. This parameter can accept the following two values:
CL_NS_DEFT_GLOBAL_MAP_COOKIE: for querying the default global context.
CL_NS_DEFT_LOCAL_MAP_COOKIE: for querying the default local context.
|
pObjReference | (out) Object reference associated with the service. |
- Return values
-
CL_OK | The API executed successfully. |
CL_NS_ERR_CONTEXT_NOT_CREATED | On registering, deregistering or querying a context that does not exist. |
CL_NS_ERR_ENTRY_NOT_FOUND | On querying an entry that is not present. |
CL_ERR_NULL_POINTER | On passing a NULL pointer. |
CL_ERR_NOT_INITIALIZED | NS Library not initialized. |
- Description:
- This API is used to query and retrieve the object reference for a given service name.
- Library Files:
- libClNameClient
- See Also
- clNameToObjectMappingGet()