yumapro
24.10-3
YumaPro SDK
|
YANG Patch server implementation. More...
Functions | |
status_t | agt_yangpatch_edit (ses_cb_t *scb, yangapi_cb_t *rcb, rpc_msg_t *msg) |
Handle a YANG Patch edit. More... | |
status_t | agt_yangpatch_gnmi_edit (ses_cb_t *scb, yangapi_cb_t *rcb, yang_patch_cb_t *pcb, rpc_msg_t *msg) |
Handle a YP-GNMI edit. More... | |
YANG Patch server implementation.
Used by RESTCONF but also some NETCONF usageand internal YP-HA update format.
status_t agt_yangpatch_edit | ( | ses_cb_t * | scb, |
yangapi_cb_t * | rcb, | ||
rpc_msg_t * | msg | ||
) |
Handle a YANG Patch edit.
HA/RESTCONF/NETCONF YANG-PATCH handling function. This function is expecting that rpc_input is already parsed, valid, and is really meant to be a yang-patch request.
It's expected that rpc_input val_value contains the whole patch request.
Only present if WITH_RESTCONF=1 or WITH_YCONTROL=1
OR TBD: This fn can be changed so the caller is pasing the val_value here
The val tree here will be split into YANG Patch control block and one or multiple edit control block(s).
RESTCONF YANG-PATCH: yang-patch val_value tree is in the msg->rpc_inputQ in case of JSON in the msg->rpc_input in case of XML
HA YANG-PATCH: val_value most likely will be in the XML format and in the msg->rpc_input
NETCONF YANG-PATCH: val_value most likely will be in the XML format and in the msg->rpc_input
For HA and NETCONF mode 'target' should specify path from the root in order to make edit valid
In RESTCONF case 'target' specifies just target node and rcb->target_value specifies the path to this target node
Perform multiple internal <edit-config> and <commit> if needed Also write result to NV-storage if separate :startup config multiple yang-patch edit requests, record errors
scb | session to use |
rcb | yangapi control block to use |
msg | response message in progress |
status_t agt_yangpatch_gnmi_edit | ( | ses_cb_t * | scb, |
yangapi_cb_t * | rcb, | ||
yang_patch_cb_t * | pcb, | ||
rpc_msg_t * | msg | ||
) |
Handle a YP-GNMI edit.
Only present if WITH_RESTCONF=1 and WITH_YCONTROL=1 and WITH_GNMI=1
gNMI YANG-PATCH mode: val_value is not set. The values are comming from the already parsed EIDTs. The values for the edit are NOT parsed yet.
The patch_id, patch_comment, patch_target have default values.
Perform multiple internal <edit-config> and <commit> if needed Also write result to NV-storage if separate :startup config multiple yang-patch edit requests, record errors
scb | session to use |
rcb | yangapi control block to use |
pcb | patch control block to use |
msg | message in progress |