yumapro  24.10-2
YumaPro SDK
Loading...
Searching...
No Matches

YANG Patch server implementation. More...

Collaboration diagram for YANG Patch:

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...
 

Detailed Description

YANG Patch server implementation.

Used by RESTCONF but also some NETCONF usageand internal YP-HA update format.

Function Documentation

◆ agt_yangpatch_edit()

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

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:

◆ agt_yangpatch_gnmi_edit()

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.

  • patch_id NCX_EL_EMPTY
  • patch_comment "gNMI YANG-PATCH patch"
  • patch_target "/"

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

Parameters
scbsession to use
rcbyangapi control block to use
pcbpatch control block to use
msgmessage in progress
Returns
status
Here is the call graph for this function: