yumapro  20.10-10
YumaPro SDK
YANG-API and DB-API Support

YANG-API and DB-API message support. More...

Collaboration diagram for YANG-API and DB-API Support:

Functions

status_t agt_yangapi_init (void)
 Initialize the agt_yangapi module. More...
 
void agt_yangapi_cleanup (void)
 Cleanup the agt_yangapi module. More...
 
boolean agt_yangapi_dispatch (ses_cb_t *scb)
 Dispatch an incoming Yuma REST API request. More...
 
boolean agt_yangapi_dispatch_db_api (ses_cb_t *scb, yang_patch_cb_t *pcb, boolean skip_sil, boolean skip_save, const xmlChar *comment_str, status_t *res)
 Dispatch an incoming YControl DB-API request. More...
 
status_t agt_yangapi_validate_method_params (ses_cb_t *scb, yangapi_cb_t *rcb, rpc_msg_t *msg)
 validate that the operation is supported for the URI parameters given. More...
 
agt_yangapi_context_tagt_yangapi_get_context (void)
 Get the YANG-API Context structure. More...
 
status_t agt_yangapi_edit_request (ses_cb_t *scb, yangapi_cb_t *rcb, rpc_msg_t *msg)
 Perform an internal <edit-config> and <commit> if needed. More...
 
status_t agt_yangapi_edit_request_ex (ses_cb_t *scb, yangapi_cb_t *rcb, rpc_msg_t *msg, val_value_t *force_editval, op_editop_t force_editop, boolean skip_sil, boolean skip_save, const xmlChar *comment_str, yang_patch_edit_t *edit)
 Perform an internal <edit-config> and <commit> if needed. More...
 

Detailed Description

YANG-API and DB-API message support.

Dispatch an DB-API request. Old YANG-API protocol support.

Function Documentation

void agt_yangapi_cleanup ( void  )

Cleanup the agt_yangapi module.

Called by the server during shutdown.

boolean agt_yangapi_dispatch ( ses_cb_t scb)

Dispatch an incoming Yuma REST API request.

Parameters
scbsession control block
Returns
TRUE if scb is still valid
FALSE if scb has been deleted during this call

Here is the call graph for this function:

Here is the caller graph for this function:

boolean agt_yangapi_dispatch_db_api ( ses_cb_t scb,
yang_patch_cb_t pcb,
boolean  skip_sil,
boolean  skip_save,
const xmlChar *  comment_str,
status_t res 
)

Dispatch an incoming YControl DB-API request.

Parameters
scbsession control block
pcbYANG Patch control block to use
skip_silTRUE is SIL and SIL-SA callbacks should be skipped This is a DB-API edit and the system instrumentation has been updated externally. This call is just to update the server data structures
FALSE this is a normal edit and SIL, SIL-SA should be called
skip_saveTRUE if save-to-NV-storage should be skipped
FALSE for normal NV-save procedure
comment_stroptional comment for the augit log record
resaddress of return status
Return values
*resreturn status
Returns
TRUE if scb is still valid
FALSE if scb has been deleted during this call

Here is the call graph for this function:

status_t agt_yangapi_edit_request ( ses_cb_t scb,
yangapi_cb_t rcb,
rpc_msg_t msg 
)

Perform an internal <edit-config> and <commit> if needed.

Also write result to NV-storage if separate :startup config

Parameters
scbsession to use
rcbyangapi control block to use
msgresponse message in progress
Returns
status

Here is the call graph for this function:

Here is the caller graph for this function:

status_t agt_yangapi_edit_request_ex ( ses_cb_t scb,
yangapi_cb_t rcb,
rpc_msg_t msg,
val_value_t force_editval,
op_editop_t  force_editop,
boolean  skip_sil,
boolean  skip_save,
const xmlChar *  comment_str,
yang_patch_edit_t edit 
)

Perform an internal <edit-config> and <commit> if needed.

Extended.

Also write result to NV-storage if separate :startup config

Parameters
scbsession to use
rcbyangapi control block to use
msgresponse message in progress
force_editvaledit value to use instead of msg input
force_editopforced edit op to use instead of PATCH=merge
skip_silTRUE to skip SIL and SIL-SA callbacks
skip_saveTRUE to skip NV-save
comment_stroptional comment string for this edit request
editYANG Patch edit control block
Returns
status

Here is the call graph for this function:

Here is the caller graph for this function:

agt_yangapi_context_t* agt_yangapi_get_context ( void  )

Get the YANG-API Context structure.

Returns
YANG-API namespace ID

Here is the caller graph for this function:

status_t agt_yangapi_init ( void  )

Initialize the agt_yangapi module.

Returns
status

Here is the call graph for this function:

Here is the caller graph for this function:

status_t agt_yangapi_validate_method_params ( ses_cb_t scb,
yangapi_cb_t rcb,
rpc_msg_t msg 
)

validate that the operation is supported for the URI parameters given.

Errors are recorded by this function. Do not call record_error again if error returned

Parameters
scbsession control block to use
rcbrestapi control block to use
msgmsg to use for storing error records
Returns
status

Here is the call graph for this function:

Here is the caller graph for this function: