Netconf-console --edit-config error

Hi,
I am using the 1-2-3…example in the intro section. Cannot do the edit-config, but can do other operations such as hello and get-schema, anything that needs to be done to the default example in 1-2-3… Below is the command and the error:

netconf-console --edit-config=cmd-set-dhcp-defaultLeaseTime-1h.xml

------------error response-------------------

<?xml version="1.0" encoding="UTF-8"?>
<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="1">
  <rpc-error>
    <error-type>application</error-type>
    <error-tag>unknown-element</error-tag>
    <error-severity>error</error-severity>
    <error-path>
    /rpc/edit-config/config
  </error-path>
    <error-info>
      <bad-element>hello</bad-element>
    </error-info>
  </rpc-error>
</rpc-reply>

Hello,

please can you check the cmd-set-dhcp-defaultLeaseTime-1h.xml corresponds to your data model?
Seems like you are setting element hello which is not in the data model (in the path corresponding to XML).

Hi,
I am using everything as default. Whatever came with installing confd 6.4.2 intro directory. I had this working when I was using version 6.4.1.

If you like me to copy a certain item, please let me know.

Thanks

In order to use the cmd-set-dhcp-defaultLeaseTime-1h.xml file as is, following is how you should be using netconf-console:

 $ netconf-console cmd-set-dhcp-defaultLeaseTime-1h.xml

To use the --edit-config argument of netconf-console, following is the man page info on the --edit-config argument:

--edit-config=EDIT  Takes a filename (or '-' for standard input) as
                    argument. The contents of the file is data for a
                    single NETCONF edit-config operation (put into the
                    <config> XML element). Takes an optional --db
                    argument, default is 'running'.

If you follow the above man page information, you will modify the contents of the xml file that you supply with the --edit-config argument as follows:

  <dhcp xmlns="http://tail-f.com/ns/example/dhcpd"
        xmlns:nc="urn:ietf:params:xml:ns:netconf:base:1.0">
    <defaultLeaseTime nc:operation="merge">
      PT1H
    </defaultLeaseTime>
  </dhcp>

Thank you for your response.


image
How this “bad namespace” error arises though the namespace given is correct?
Please help me in resolving this

Pretty much the only possible explanation is that you haven’t loaded the relevant .fxs file. Follow the 1-README_start file in the example.

Hi mnovak,

Is it possible to use netconf-console with end devices supporting netconf protocol like Cisco IOSXR Netconf device.

If yes , could you please provide the example of get-config and edit-config

Yes, it should be passible as netconf-console is netconf client.

Example of edit-config is posted above Netconf-console --edit-config error - #4 by waitai