Hello,
I am trying to use netconf_config module on vEdge 18.3 without success.
Hello,
I am trying to use netconf_config module on vEdge 18.3 without success.
“Element [{http://tail-f.com/ns/config/1.0}config] does not meet requirement”
Based on the error received from netconf server running on target host it seems the rooted xml payload is not supported
by the server. As per netconf rfc for edit-config RPC the config value should have “config” element mandatory as root.
What the value of “content” option when using netconf_rpc module?
The only difference with the RPC call is that I have to put in.
ok: [sdw-ssc-vbond-g01] => {
“changed”: false,
“invocation”: {
“module_args”: {
“content”: “\n \n\n<config xmlns="http://tail-f.com/ns/config/1.0\”>\n <system xmlns="http://viptela.com/system\“>\n scooberdoober\n \n\n”,
“display”: null,
“rpc”: “edit-config”,
“xmlns”: null
}
},
“output”: null,
“stdout”: “<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" xmlns:nc="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="urn:uuid:1e74d2f9-be5e-4be1-8543-a990b7d207e4">”,
“stdout_lines”: [
“<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" xmlns:nc="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="urn:uuid:1e74d2f9-be5e-4be1-8543-a990b7d207e4">”
]
}
The error is reported from ncclient. For edit-config RPC it tries to validate if the is the root element of XML payload [1] & [2].
Since namespace is added to the config element it results in failure. Please remove namespace from “config” element and try again.
[1] https://github.com/ncclient/ncclient/blob/master/ncclient/operations/edit.py#L62
[2] https://github.com/ncclient/ncclient/blob/master/ncclient/xml_.py#L147
Thanks Ganesh, thought I had tried that but apparently not :-). Working now.
-Rob