-
Bug
-
Resolution: Unresolved
-
None
-
None
-
Operating System: All
Platform: All
-
4440
Context:
I'm using the controller's ability to mount netconf devices to make it easy to script RESTCONF clients to access such devices's configuration. So I'd like to pass RPC get-config requests through RESTCONF yang-ext:mount which will only work if they include XML attributes and/or the json equivalent as per the NETCONF spec.
JSON Example:
1. Mount a netconf device, any will do
2. POST to http://localhost:8181/restconf/config/opendaylight-inventory:nodes/node/1-netconf-device/yang-ext:mount/ietf-netconf:get-config
with payload:
{
"ietf-netconf:input": {
"source":
,
"filter": {
},
"@filter":
}
}
<errors
xmlns="urn:ietf:params:xml:ns:yang:ietf-restconf">
<error>
<error-type>protocol</error-type>
<error-tag>malformed-message</error-tag>
<error-message>Error parsing input: Schema node with name @filter wasn't found under (urn:ietf:params:xml:ns:netconf:base:1.0?revision=2011-06-01)input.</error-message>
<error-info>java.lang.IllegalStateException: Schema node with name @filter wasn't found under (urn:ietf:params:xml:ns:netconf:base:1.0?revision=2011-06-01)input.
at org.opendaylight.yangtools.yang.data.codec.gson.JsonParserStream.resolveNamespace(JsonParserStream.java:253)
at org.opendaylight.yangtools.yang.data.codec.gson.JsonParserStream.read(JsonParserStream.java:154)
.
.
.
XML Example:
1. Mount a netconf device, any will do
2. POST to http://localhost:8181/restconf/config/opendaylight-inventory:nodes/node/1-netconf-device/yang-ext:mount/ietf-netconf:get-config
With payload:
<input xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
<source>
<running/>
</source>
<filter type="xpath" select="//users"/>
</input>
This will strip the attributes and return the entire configuration instead of the filtered config.
- is blocked by
-
NETCONF-718 Switch to using asynchronous JAX-RS interface
- Resolved
-
NETCONF-1256 Use specialized NETCONF base schemas
- Resolved
- relates to
-
NETCONF-52 Using restconf rpc to edit the configuration of netconf enabled device, controller will remove the attribute of content
- Confirmed