I’m trying to use the netconf-console to edit a super simple running config.
Here’s the yang:
module wibble {
namespace "http://wibble.com/ns/link";
prefix wib;
container config {
leaf name {
type string;
description "name of this device";
}
}
}
and here’s an xml file that successfully changes the name field
<edit-config>
<target>
<running/>
</target>
<config xmlns="http://wibble.com/ns/link">
<config>
<name>this-method-works</name>
</config>
</config>
</edit-config>
using this netconf-console command:
> netconf-console --user=admin --password=admin --rpc setName.xml
I want to add / remove items from a list which needs to use commands from the ietf netconf namespace but I kept getting an “unexpected EOF” message from the console. I can reproduce this problem for this super simple example.
Here’s the xml netconf - with the rpc wrapper because of the need to specify the xmlns:nc namespace.
<rpc message-id="100" xmlns="urn:ietf:params:xml:ns:netconf:base:1.0"
xmlns:nc="urn:ietf:params:xml:ns:netconf:base:1.0"
xmlns:yang="urn:ietf:params:xml:ns:yang:1">
<edit-config>
<target>
<running/>
</target>
<config xmlns:rv="http://wibble.com/ns/link">
<name>but this one reports unexpected EOF</name>
</config>
</edit-config>
</rpc>
that I send using this netconf-console command - note I didn’t use the --rpc option:
> netconf-console --user=admin --password=admin whyEOF.xml unexpected EOF in NETCONF transport
I tried adding the framing marker on the last line of whyEOF.xml like this:
`]]>]]>’
but it didn’t make any difference.
I’m sure it’s something stupid/obvious as I’m a newbie to netconf & yang, but I’d be grateful for your help.
update: set the --outputStyle=raw option and got this info back about /rpc being a bad element???
<!-- Error: bad element: /rpc (closing session) -->