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

Unable to handle prefixed xml values (e.g. yang leaf of type identityref) #63

Closed
GoogleCodeExporter opened this issue Jun 11, 2015 · 2 comments

Comments

@GoogleCodeExporter
Copy link

What steps will reproduce the problem?
1. Start netopeer (we have tested this against the netconf server in netopeer).
2. Connect from cmd: ssh root@localhost -p 1831 -s netconf
3. Send hello:
<hello xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
        <capabilities>
            <capability>urn:ietf:params:netconf:base:1.0</capability>
        </capabilities>
    </hello>
]]>]]>
4. Send get-schema RPC:
<rpc message-id="m-3" xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
<get-schema xmlns="urn:ietf:params:xml:ns:yang:ietf-netconf-monitoring">
<identifier>toaster</identifier>
<version>2009-11-20</version>
<format 
xmlns:x="urn:ietf:params:xml:ns:yang:ietf-netconf-monitoring">x:yang</format>
</get-schema>
</rpc>
]]>]]>


What is the expected output? What do you see instead?

Netopeer responds to this with:
<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="m-3">
  <rpc-error xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
    <error-type>protocol</error-type>
    <error-tag>invalid-value</error-tag>
    <error-severity>error</error-severity>
    <error-message>The requested schema does not exist.</error-message>
  </rpc-error>
</rpc-reply>

But if we try get-schema in slightly different format (notice the leaf 
"format"):
<rpc message-id="m-3" xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
<get-schema xmlns="urn:ietf:params:xml:ns:yang:ietf-netconf-monitoring">
<identifier>toaster</identifier>
<version>2009-11-20</version>
<format>yang</format>
</get-schema>
</rpc>]]>]]>
Netopeer responds with correct rpc-reply. But it should be able to handle both 
formats, since they are correct. Not sure if this affects only get-schema or 
every other prefixed XML value.


What version of the product are you using? On what operating system?
We used Ubuntu 14 VM with netopeer running inside a docker container with the 
latest available image 
(https://registry.hub.docker.com/u/dockeruser/netopeer/dockerfile/)

Please provide any additional information below.
The workaround with non-prefixed value was pointed out by netopeer developers.

Original issue reported on code.google.com by maros.m...@gmail.com on 10 Jun 2015 at 2:37

@GoogleCodeExporter
Copy link
Author

We are working on libyang as a replacement for libxml2 used in libnetconf. It 
should solve the problem in future.

Original comment by rkre...@cesnet.cz on 10 Jun 2015 at 7:31

  • Changed state: WontFix

@GoogleCodeExporter
Copy link
Author

Changing status to keep the issue visible. Anyway, we don't plan to fix the 
issue in the current libnetconf version.

Original comment by rkre...@cesnet.cz on 10 Jun 2015 at 7:34

  • Changed state: Accepted

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

No branches or pull requests

2 participants