Hi,
I've been working with writing ONAP Service Layer Adapters that speak netconf
to a device. I've been looking at both the NetconfClientJsch class and the
netconf libraries that come with ODL. The NetconfClientJsch that comes with
the APPC code is fairly compact and light-weight, but I found a fatal flaw that
forced me to change the source code in this class.
When I do a netconf edit-config, I sling my own XML and send that down the
netconf/ssh connection. The response I get from my device is well-formed XML
and it indicates success on the device's part. This is what's sent back:
<rpc-reply message-id="101"
xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
<ok />
</rpc-reply>
The ONAP code determines success/failure with a string match
if(!response.contains("<ok/>")) {
throw new IOException("Error response from netconf device: \n" +
response);
}
The problem is that <ok /> is not the same as <ok/>. But I believe that XML
allows white spaces in tags (they just get stripped out). This additional XML
constructs are valid, but ONAP doesn't accept it (but ODL's netconf code does)
<ok></ok>
I thought I'd ask ... shouldn't we put the response from the Netconf server
through an XML parser?
Jim
This communication is the property of CenturyLink and may contain confidential
or privileged information. Unauthorized use of this communication is strictly
prohibited and may be unlawful. If you have received this communication in
error, please immediately notify the sender by reply e-mail and destroy all
copies of the communication and any attachments.
_______________________________________________
onap-discuss mailing list
[email protected]
https://lists.onap.org/mailman/listinfo/onap-discuss