netconf-examples icon indicating copy to clipboard operation
netconf-examples copied to clipboard

Fails with bad element

Open DataKnox opened this issue 6 years ago • 4 comments

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>

DataKnox avatar Jul 08 '19 15:07 DataKnox

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.

jedeane avatar May 10 '20 17:05 jedeane

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> """

luizpolli avatar Oct 21 '21 19:10 luizpolli

Yes, its working. but Why ?

devopsnetworks avatar Oct 13 '23 10:10 devopsnetworks

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)

iTosy avatar Jun 26 '24 17:06 iTosy