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

GetConfig xml order (with filter) #5

Open
GoogleCodeExporter opened this issue Sep 14, 2015 · 2 comments
Open

GetConfig xml order (with filter) #5

GoogleCodeExporter opened this issue Sep 14, 2015 · 2 comments

Comments

@GoogleCodeExporter
Copy link

What steps will reproduce the problem?
1. Create 
GetConfig conf = new GetConfig(handler.getSession(), Datastore.running);
conf.setXPathFilter(" /filter");

the xml output is:
<?xml version="1.0" encoding="UTF-8"?><nc:rpc 
xmlns:nc="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="1">
<nc:get-config>
<nc:filter nc:select=" /filter" nc:type="xpath"/>
<nc:source>
<nc:running/>
</nc:source>
</nc:get-config>
</nc:rpc>

response is:
<?xml version="1.0" encoding="UTF-8"?>
<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="1" 
xmlns:nc="urn:ietf:params:xml:ns:netconf:base:1.0"><rpc-error>
<error-type>protocol</error-type>
<error-tag>missing-element</error-tag>
<error-severity>error</error-severity>
<error-path>
    /rpc/get-config/source
  </error-path><error-info><bad-element>source</bad-element>
</error-info>
</rpc-error>
</rpc-reply>


The generated msg sent should be (filter is at the end of the message)

<?xml version="1.0" encoding="UTF-8"?><nc:rpc 
xmlns:nc="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="1">
<nc:get-config>
<nc:source>
<nc:running/>
</nc:source>
<nc:filter nc:select=" /filter" nc:type="xpath"/>
</nc:get-config>
</nc:rpc>

Original issue reported on code.google.com by [email protected] on 5 Aug 2013 at 9:35

@GoogleCodeExporter
Copy link
Author

[deleted comment]

@GoogleCodeExporter
Copy link
Author

actually fixed it maybe you should update the code (GetConfig.java ctor - order 
change)

filter = operation.getInput().linkAnyxml(
        operation.createAnyxml("filter"));  

sou = operation.getInput().linkContainer(
        operation.createContainer("source"));

changed to      
sou = operation.getInput().linkContainer(
        operation.createContainer("source"));
filter = operation.getInput().linkAnyxml(
        operation.createAnyxml("filter"));  

Original comment by [email protected] on 5 Aug 2013 at 9:45

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

1 participant