Netconf operation attribute namespace check is enforced

This commit is contained in:
Olof hagsand 2019-07-31 16:45:48 +02:00
parent 2d9d204f69
commit c97346921b
19 changed files with 86 additions and 73 deletions

View file

@ -749,7 +749,7 @@ clixon_plugin_init(clicon_handle h)
/* Called after the regular system copy_config callback */
if (rpc_callback_register(h, example_copy_extra,
NULL,
"urn:ietf:params:xml:ns:netconf:base:1.0",
NETCONF_BASE_NAMESPACE,
"copy-config"
) < 0)
goto done;

View file

@ -95,7 +95,8 @@ example_client_rpc(clicon_handle h,
/* User supplied variable in CLI command */
cva = cvec_find(cvv, "a"); /* get a cligen variable from vector */
/* Create XML for example netconf RPC */
if (xml_parse_va(&xtop, NULL, "<rpc message-id=\"101\" xmlns=\"urn:ietf:params:xml:ns:netconf:base:1.0\" username=\"%s\"><example xmlns=\"urn:example:clixon\"><x>%s</x></example></rpc>",
if (xml_parse_va(&xtop, NULL, "<rpc message-id=\"101\" xmlns=\"%s\" username=\"%s\"><example xmlns=\"urn:example:clixon\"><x>%s</x></example></rpc>",
NETCONF_BASE_NAMESPACE,
clicon_username_get(h),
cv_string_get(cva)) < 0)
goto done;