netconf-examples
netconf-examples copied to clipboard
Fails with bad element
It appears this lab is not in a functional state with NETCONF currently, in general, regardless of the scripts provided in this repo.
Enabling Debug yields:
<?xml version="1.0" encoding="UTF-8"?><rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0"><rpc-error><error-type>rpc</error-type><error-tag>unknown-element</error-tag><error-severity>error</error-severity><error-info><bad-element>cisco-ia</bad-element></error-info></rpc-error></rpc-reply>
In the Netconf-102 lab, I wasn't able to get the lab to work with the provided get_interfaces.xml filter file. I had to use this in the get_interfaces.xml filter instead:
After that, I was able to get the get_config_csr1000V.py script to run properly.
Hello everyone, You need to include the filter such as:
giga1 = """ <filter xmlns="urn:ietf:params:xml:ns:netconf:base:1.0"> <interfaces xmlns="urn:ietf:params:xml:ns:yang:ietf-interfaces"> <interface> <name>GigabitEthernet1</name> </interface> </interfaces> </filter> """
Yes, its working. but Why ?
Because you need to specify the NETCONF version when you type the whole RPC in CLI , you specify the version in (rpc xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="1") but since you use a predefined function, you don't access (rpc) part so you specify the version in the first tag which is (filter)