Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The rpc-reply element tag is not always in the correct namespace #15

Closed
p-jean opened this issue Nov 8, 2016 · 3 comments
Closed

The rpc-reply element tag is not always in the correct namespace #15

p-jean opened this issue Nov 8, 2016 · 3 comments

Comments

@p-jean
Copy link

p-jean commented Nov 8, 2016

Summary:
If the client uses a prefix for the NETCONF namespace then the rpc-reply element tag is not in the NETCONF namespace

Details:
The Python library ncclient sends an rpc beginning as follows. Note that there is an 'nc' prefix on the rpc tag:
<nc:rpc xmlns:nc="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="urn:uuid:b9e28b4b-6bf2-4606-9e5a-9bc08074d609"><nc:edit-config>

The reply from libnetconf2 is as follows:
<rpc-reply xmlns:nc="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="urn:uuid:b9e28b4b-6bf2-4606-9e5a-9bc08074d609"><ok/></rpc-reply>

Note that there is no 'nc' prefix on the rpc-reply tag. The response is not recognized and ncclient times out. I believe that it is because the rpc-reply element tag is not in the NETCONF namespace.

I think that the correct response would need to have a prefix on the rpc-reply tag:
<nc:rpc-reply xmlns:nc="urn:ietf:params:xml:ns:netconf:base:1.0"

NETCONF seems to require that the rpc attributes are echoed back verbatim.

I made an attempt to fix it, however I don't suppose my change is very clean. I have done limited testing so far, but I was able to get further with ncclient.

Thanks
fix_reply_namespace .patch.txt

@michalvasko
Copy link
Member

Hi,
it should be fixed, thanks for the patch.

Regards,
Michal

@p-jean
Copy link
Author

p-jean commented Nov 15, 2016

Hi Michal,

Thanks for the great libraries.

BTW - is there any sort of forum or place online to discuss libyang,
libnetconf2, or Netopeer2?

..PJ

On Tue, Nov 15, 2016, at 02:06 AM, michalvasko wrote:

Hi,
it should be fixed, thanks for the patch.
Regards,
Michal
— You are receiving this because you authored the thread. Reply to
this email directly, view it on GitHub[1], or mute the thread[2].

Links:

  1. The rpc-reply element tag is not always in the correct namespace #15 (comment)
  2. https://github.com/notifications/unsubscribe-auth/ALM2wVgjZuq8kXJMtD8CbM1Zn6_Bua_yks5q-YQYgaJpZM4KszKd

@rkrejci
Copy link
Collaborator

rkrejci commented Nov 16, 2016

Hi PJ,
we use mainly the github issue trackers for the projects, but there are also mailing lists of sysrepo which is closely connected with the Netopeer2, so you can discuss the general things there.

Regards,
Radek

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants