Skip to Content.
Sympa Menu

rare-dev - Re: [rare-dev] netconf

Subject: Rare project developers

List archive

Re: [rare-dev] netconf


Chronological Thread 
  • From: David Schmitz <>
  • To: mc36 <>
  • Cc:
  • Subject: Re: [rare-dev] netconf
  • Date: Tue, 14 Feb 2023 09:02:14 +0100 (CET)
  • Authentication-results: postout.lrz.de (amavisd-new); dkim=pass (2048-bit key) reason="pass (just generated, assumed good)" header.d=lrz.de

Hi,

On Tue, 14 Feb 2023, mc36 wrote:

Date: Tue, 14 Feb 2023 08:23:00 +0100
From: mc36 <>
To: , David Schmitz <>
Subject: Re: [rare-dev] netconf

hi,

tbh i feel a bit lost now as i'm already sending in the first format suggestion of yours,
and i remember that it was not a week ago when we removed the nc: tag because some other
xml parser complained about it... surely i can revert it but now seeking for your confirmation...
Sorry for the confusion.

We might require both namespace declarations in the <rpc-reply> element,
i.e.,
the xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" for the un-prefixed elements including the <rpc-reply> itself
and maybe - if needed - the xmlns:nc="urn:ietf:params:xml:ns:netconf:base:1.0" for "nc:"-refixed XML elements
which maybe still appear somewhere within the response.


I tried the newest commit (4d404aab00ce76d93f57a6dec5aec9c18b29fb0d v23.2.14)
(
...
myr1#show version freeRouter v23.2.14-cur, done by cs@nop.

place on the web: http://www.freertr.org/
license: http://creativecommons.org/licenses/by-sa/4.0/
quote1: make the world better
quote2: if a machine can learn the value of human life, maybe we can too
quote4: let bloom all the flowers
quote5: keep it stupid simple
quote6: be liberal in what you accept, and conservative in what you send
quote7: the beer-ware license for selected group of people:
cs@nop wrote these files. as long as you retain this notice you
can do whatever you want with this stuff. if we meet some day, and
you think this stuff is worth it, you can buy me a beer in return
...
)

and in the rpc-replies from freertr the ncclient library still sees the
following:

...
MainProcess[1171815] 2023-02-14 07:42:08,687 ncclient.transport.ssh DEBUG:
[host 10.0.3.219 session-id 428984427] Received:
<?xml version="1.0" encoding="UTF-8"?>
<rpc-reply xmlns:nc="urn:ietf:params:xml:ns:netconf:base:1.0"
message-id="urn:uuid:6177bac4-41fe-4948-9ea8-4ad6ad7f96dd"><data><config><hostname><myr1></myr1></hostname><buggy></buggy><no><locale></locale></no><no><identifier-value>identifier-escapepassword&#45;encrypt</identifier-value></no><no><enable></enable></no><banner><encoded></encoded></banner><client><identifier-value>identifier-escapelabel&#45;range<identifier-value>identifier-escape&#51;2<identifier-value>identifier-escape&#49;048560</identifier-value></identifier-value></identifier-value></client><no><logging><milliseconds>
....

That is consistent with debug from freertr ("debug line netconf"):
debug userNetconf.doSend:userNetconf.java:439 tx: <rpc-reply
xmlns:nc="urn:ietf:params:xml:ns:netconf:base:1.0"
message-id="urn:uuid:cc0688e8-7844-4b1e-9e2a-5fb86e03d5f5"><ok></ok></rpc-reply>

Other NETCONF messages from freertr do not use the xmlns:nc="...":
debug userNetconf.doSend:userNetconf.java:439 tx: <hello
xmlns="urn:ietf:params:xml:ns:netconf:base:1.0"><capabilities><capability>urn:ietf:params:netconf:base:1.0</capability><capability>urn:ietf:params:netconf:base:1.1</capability><capability>urn:ietf:params:netconf:capability:writable-running:1.0</capability><capability>urn:ietf:params:netconf:capability:startup:1.0</capability><capability>http://www.freertr.org/yang/bgp4pe2e?module=bgp4pe2e</capability><capability>http://www.freertr.org/yang/freertr-bgp4peer?module=freertr-bgp4peer</capability><capability>http://www.freertr.org/yang/freertr-bgp4perf?module=freertr-bgp4perf</capability></capabilities><session-id>428984427</session-id></hello>

Furtermore, I can see that in
net/freertr/user/userNetconf.java:
...
l.58: public final static String namespace =
"xmlns=\"urn:ietf:params:xml:ns:netconf:base:1.0\"";
...

BTW, before bothering you last week with this namespace stuff,
I tried to fix the issue in the code myself, with same change in net/freertr/user/userNetconf.java
(in now line 58) from
...
namespace = "xmlns:nc=\"urn:ietf:params:xml:ns:netconf:base:1.0\"";
...
to
...
namespace = "xmlns=\"urn:ietf:params:xml:ns:netconf:base:1.0\"";
...

But this change alone did not work.
So, I assumed that maybe there is more tricky stuff going on in the code
and so to let you figure out how to accomplish it.


Am I using the right commit?


Best Regards
David


thanks,
cs


2023-02-14 08:19:34.007 debug userNetconf.doSend:userNetconf.java:439 tx: <?xml version="1.0" encoding="UTF-8"?>
2023-02-14 08:19:34.024 debug userNetconf.doSend:userNetconf.java:439 tx: <rpc-reply message-id="1" xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
2023-02-14 08:19:34.025 debug userNetconf.doSend:userNetconf.java:439 tx: <data><config><hostname><sid>
2023-02-14 08:19:34.025 debug userNetconf.doSend:userNetconf.java:439 tx: </sid></hostname>


On 2/13/23 16:52, David Schmitz wrote:

So, could you make the reponse look like this:

<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="urn:uuid:407d289f-567d-4130-a76c-82dca0612e09">

or maybe

<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:407d289f-567d-4130-a76c-82dca0612e09">


--

David Schmitz

Boltzmannstrasse 1, 85748 Garching
Telefon: +49 89 35831-8765
Leibniz-Rechenzentrum, Germany
Mail:





Archive powered by MHonArc 2.6.19.

Top of Page