yumapro  24.10-3
YumaPro SDK
Loading...
Searching...
No Matches
YANG Validation Support

Process some YANG validation statements, such as unique-stmt. More...

Collaboration diagram for YANG Validation Support:

Typedefs

typedef void(* record_unique_error_t) (ses_cb_t *scb, xml_msg_hdr_t *msghdr, val_value_t *errval, dlq_hdr_t *valuniqueQ)
 Callback function to generate an rpc_err_rec_t and save it in the msg Use the provided error info record for <rpc-error> fields. More...
 

Functions

status_t val_unique_stmt_check (ses_cb_t *scb, xml_msg_hdr_t *msg, obj_template_t *obj, val_value_t *parent, val_value_t *firstval, val_value_t *root, record_unique_error_t error_fn)
 Check for the proper uniqueness of the tuples within the set of list instances for the specified node. More...
 

Detailed Description

Process some YANG validation statements, such as unique-stmt.

The YANG validation is done mostly in the server but some processing such as must, when, and unique are done in the NCX library.

Typedef Documentation

◆ record_unique_error_t

typedef void(* record_unique_error_t) (ses_cb_t *scb, xml_msg_hdr_t *msghdr, val_value_t *errval, dlq_hdr_t *valuniqueQ)

Callback function to generate an rpc_err_rec_t and save it in the msg Use the provided error info record for <rpc-error> fields.

For YANG 'data-not-unique' error-app-tag

Parameters
scbsession control block
  • NULL and no stats will be recorded
  • scb->stats may be updated if scb non-NULL
msghdrXML msg header with error Q
  • NULL, no errors will be recorded!
  • errQ has error message added if no malloc errors
errvallist value node that contains the unique-stmt
valuniqueQQ of val_unique_t structs for error-info

Function Documentation

◆ val_unique_stmt_check()

status_t val_unique_stmt_check ( ses_cb_t scb,
xml_msg_hdr_t msg,
obj_template_t obj,
val_value_t parent,
val_value_t firstval,
val_value_t root,
record_unique_error_t  error_fn 
)

Check for the proper uniqueness of the tuples within the set of list instances for the specified node.

Parameters
scbsession control block (may be NULL; no session stats)
msgxml_msg_hdr t from msg in progress
  • NULL MEANS NO RPC-ERRORS ARE RECORDED
  • msg->msg_errQ may have rpc_err_rec_t structs added to it which must be freed by the called with the rpc_err_free_record function
objchild object of 'parent' that needs the unique test
parentparent node to search for 'obj' instances
firstvalfirst instance of 'obj'
rootXPath docroot to use
error_fnerror handler callback for agt; NULL if not used
Returns
status of the operation, NO_ERR if no validation errors found
Here is the call graph for this function:
Here is the caller graph for this function: