* Added message-id attributes in error and hello replies

* See [namespace prefix nc is not supported in full #154](https://github.com/clicon/clixon/issues/154)
* Removed mandatory loading of clixon_restconf.yang
This commit is contained in:
Olof hagsand 2020-12-01 12:13:46 +01:00
parent 26a4b14060
commit c32950c8a9
20 changed files with 119 additions and 56 deletions

View file

@ -790,8 +790,8 @@ clicon_rpc_close_session(clicon_handle h)
goto done;
username = clicon_username_get(h);
if ((msg = clicon_msg_encode(session_id,
"<rpc xmlns=\"%s\" username=\"%s\"><close-session/></rpc>",
NETCONF_BASE_NAMESPACE, username?username:"")) == NULL)
"<rpc xmlns=\"%s\" username=\"%s\" message-id=\"%u\"><close-session/></rpc>",
NETCONF_BASE_NAMESPACE, username?username:"", 42)) == NULL)
goto done;
if (clicon_rpc_msg(h, msg, &xret, NULL) < 0)
goto done;
@ -1084,7 +1084,7 @@ clicon_hello_req(clicon_handle h,
int ret;
username = clicon_username_get(h);
if ((msg = clicon_msg_encode(0, "<hello username=\"%s\" xmlns=\"%s\"><capabilities><capability>urn:ietf:params:netconf:base:1.0</capability></capabilities></hello>",
if ((msg = clicon_msg_encode(0, "<hello username=\"%s\" xmlns=\"%s\" message-id=\"42\"><capabilities><capability>urn:ietf:params:netconf:base:1.0</capability></capabilities></hello>",
username?username:"",
NETCONF_BASE_NAMESPACE)) == NULL)
goto done;
@ -1111,5 +1111,3 @@ clicon_hello_req(clicon_handle h,
xml_free(xret);
return retval;
}