YANG Action (RFC 7950 Section 7.15)
See [Support for "action" statement](https://github.com/clicon/clixon/issues/101)
This commit is contained in:
parent
87c65c3541
commit
bdb516fec9
16 changed files with 583 additions and 104 deletions
|
|
@ -867,7 +867,6 @@ from_client_kill_session(clicon_handle h,
|
|||
return retval;
|
||||
}
|
||||
|
||||
|
||||
/*! Create a notification subscription
|
||||
* @param[in] h Clicon handle
|
||||
* @param[in] xe Request: <rpc><xn></rpc>
|
||||
|
|
@ -1203,7 +1202,6 @@ from_client_hello(clicon_handle h,
|
|||
return retval;
|
||||
}
|
||||
|
||||
|
||||
/*! An internal clicon message has arrived from a client. Receive and dispatch.
|
||||
* @param[in] h Clicon handle
|
||||
* @param[in] s Socket where message arrived. read from this.
|
||||
|
|
@ -1509,6 +1507,9 @@ backend_rpc_init(clicon_handle h)
|
|||
if (rpc_callback_register(h, from_client_kill_session, NULL,
|
||||
NETCONF_BASE_NAMESPACE, "kill-session") < 0)
|
||||
goto done;
|
||||
if (rpc_callback_register(h, action_callback_call, NULL,
|
||||
YANG_XML_NAMESPACE, "action") < 0)
|
||||
goto done;
|
||||
/* In backend_commit.? */
|
||||
if (rpc_callback_register(h, from_client_commit, NULL,
|
||||
NETCONF_BASE_NAMESPACE, "commit") < 0)
|
||||
|
|
|
|||
|
|
@ -353,8 +353,6 @@ netconf_edit_config(clicon_handle h,
|
|||
|
||||
/*! Get running configuration and device state information
|
||||
*
|
||||
*
|
||||
|
||||
* @param[in] h Clicon handle
|
||||
* @param[in] xn Sub-tree (under xorig) at <rpc>...</rpc> level.
|
||||
* @param[out] xret Return XML, error or OK
|
||||
|
|
@ -726,7 +724,9 @@ netconf_rpc_dispatch(clicon_handle h,
|
|||
strcmp(xml_name(xe), "validate") == 0 || /* :validate */
|
||||
strcmp(xml_name(xe), "commit") == 0 || /* :candidate */
|
||||
strcmp(xml_name(xe), "cancel-commit") == 0 ||
|
||||
strcmp(xml_name(xe), "discard-changes") == 0){
|
||||
strcmp(xml_name(xe), "discard-changes") == 0 ||
|
||||
strcmp(xml_name(xe), "action") == 0
|
||||
){
|
||||
if (clicon_rpc_netconf_xml(h, xml_parent(xe), xret, NULL) < 0)
|
||||
goto done;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue