yumapro  24.10-3
YumaPro SDK
Loading...
Searching...
No Matches
YP-gNMI Support

gNMI Get and Set support More...

Collaboration diagram for YP-gNMI Support:

Data Structures

struct  ypgnmi_get_cb_t
 gNMI GET control block More...
 
struct  ypgnmi_edit_t
 Delete/Replace/Update edit requests Q. More...
 
struct  ypgnmi_edit_cb_t
 gNMI Edit Control Block More...
 

Functions

ypgnmi_get_cb_typgnmi_new_gcb (void)
 Create a new ypgnmi_get_cb_t control block. More...
 
void ypgnmi_free_gcb (ypgnmi_get_cb_t *cb)
 Clean and free a ypgnmi_get_cb_t control block. More...
 
ypgnmi_edit_tget_first_edit_entry (ypgnmi_edit_cb_t *cb)
 Get the first edit entry in editsQ. More...
 
ypgnmi_edit_tget_next_edit_entry (ypgnmi_edit_t *entry)
 Get the next edit entry in the editsQ. More...
 
ypgnmi_edit_typgnmi_new_edit (xmlChar *path_str, xmlChar *input, op_editop_t editop)
 Create a new yp-gnmi Edit entriy. More...
 
void ypgnmi_free_edit (ypgnmi_edit_t *entry)
 Free a yp-gnmi Edit entries. More...
 
ypgnmi_edit_cb_typgnmi_new_ecb (void)
 Create a new ypgnmi_edit_cb_t control block. More...
 
void ypgnmi_free_ecb (ypgnmi_edit_cb_t *cb)
 Clean and free a ypgnmi_edit_cb_t control block. More...
 
void ypgnmi_set_edit_status (rpc_msg_t *msg, const xmlChar *edit_id, status_t res)
 Set the error status to the gNMI edit. More...
 
boolean ypgnmi_check_edits_status (ypgnmi_edit_cb_t *ecb)
 Check if any of the requested edits failed. More...
 

Detailed Description

gNMI Get and Set support

Function Documentation

◆ get_first_edit_entry()

ypgnmi_edit_t * get_first_edit_entry ( ypgnmi_edit_cb_t cb)

Get the first edit entry in editsQ.

Parameters
cbgnmi edits control block
Returns
pointer to the first entry or NULL if empty Q
Here is the caller graph for this function:

◆ get_next_edit_entry()

ypgnmi_edit_t * get_next_edit_entry ( ypgnmi_edit_t entry)

Get the next edit entry in the editsQ.

Parameters
entryedit entry
Returns
pointer to the next entry or NULL
Here is the caller graph for this function:

◆ ypgnmi_check_edits_status()

boolean ypgnmi_check_edits_status ( ypgnmi_edit_cb_t ecb)

Check if any of the requested edits failed.

If so, need to set all other successfull or not completed edits to aborted status

Parameters
ecbedit control block to use
Returns
TRUE if any edit had an error
Here is the call graph for this function:

◆ ypgnmi_free_ecb()

void ypgnmi_free_ecb ( ypgnmi_edit_cb_t cb)

Clean and free a ypgnmi_edit_cb_t control block.

Parameters
cbypgnmi_edit_cb_t control block to clean and free
Here is the call graph for this function:
Here is the caller graph for this function:

◆ ypgnmi_free_edit()

void ypgnmi_free_edit ( ypgnmi_edit_t entry)

Free a yp-gnmi Edit entries.

Parameters
entryypgnmi_edit_t control block to clean and free
Here is the caller graph for this function:

◆ ypgnmi_free_gcb()

void ypgnmi_free_gcb ( ypgnmi_get_cb_t cb)

Clean and free a ypgnmi_get_cb_t control block.

Parameters
cbypgnmi_get_cb_t control block to clean and free
Here is the caller graph for this function:

◆ ypgnmi_new_ecb()

ypgnmi_edit_cb_t * ypgnmi_new_ecb ( void  )

Create a new ypgnmi_edit_cb_t control block.

Returns
malloced new ypgnmi_edit_cb_t control block that must be freed later
Here is the call graph for this function:
Here is the caller graph for this function:

◆ ypgnmi_new_edit()

ypgnmi_edit_t * ypgnmi_new_edit ( xmlChar *  path_str,
xmlChar *  input,
op_editop_t  editop 
)

Create a new yp-gnmi Edit entriy.

Parameters
path_strspecified path for the edit
inputinput if not DELETE op
editopedit operation
Returns
pointer to initialized edit entry, or NULL if malloc error
Here is the call graph for this function:

◆ ypgnmi_new_gcb()

ypgnmi_get_cb_t * ypgnmi_new_gcb ( void  )

Create a new ypgnmi_get_cb_t control block.

Returns
malloced new ypgnmi_get_cb_t control block that must be freed later
Here is the caller graph for this function:

◆ ypgnmi_set_edit_status()

void ypgnmi_set_edit_status ( rpc_msg_t msg,
const xmlChar *  edit_id,
status_t  res 
)

Set the error status to the gNMI edit.

To be used in the return message.

In the case that any operation within the SetRequest message fails, then (as per Section 3.4.3), the target MUST NOT apply any of the specified changes, and MUST consider the transaction as failed. The target SHOULD set the status code of the SetResponse message to Aborted (10), along with an appropriate error message, and MUST set the message field of the UpdateResult corresponding to the failed operation to an Error message indicating failure. In the case that the processed operation is not the only operation within the SetRequest the target MUST set the message field of the UpdateResult messages for all other operations, setting the code field to Aborted (10).

Parameters
msgcurrent msg header containing the ECB
edit_idedit to update the status
resstatus to set
Here is the call graph for this function:
Here is the caller graph for this function: