[CONTROLLER-1201] netconf client check base1.1 capability wrong Created: 13/Mar/15  Updated: 23/Mar/15  Resolved: 23/Mar/15

Status: Resolved
Project: controller
Component/s: netconf
Affects Version/s: Helium
Fix Version/s: None

Type: Bug
Reporter: Bo Li Assignee: Maros Marsalek
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Operating System: All
Platform: All


External issue ID: 2837

 Description   

I have a netconf server that does not advertise urn:ietf:params:netconf:base:1.1
. but advertise a private capability "urn:com:xxx:yyy:ebase:1.1.1"

In the following method, it only check capability with string base:1.1. and get a wrong capability to make ODL sending the base1.1 separators in RPC messages.

private boolean containsBase11Capability(final Document doc) {
final NodeList nList = doc.getElementsByTagName("capability");
for (int i = 0; i < nList.getLength(); i++) {
if (nList.item.getTextContent().contains("base:1.1"))

{ return true; }

}
return false;
}

I think the the check should use full capability string "urn:ietf:params:netconf:base:1.1"



 Comments   
Comment by Maros Marsalek [ 20/Mar/15 ]

Pushed the fix:

https://git.opendaylight.org/gerrit/#/c/16920/

Would you mind performing a review on that (giving +1 or -1) ?

Comment by Bo Li [ 20/Mar/15 ]

(In reply to Maros Marsalek from comment #1)
> Pushed the fix:
>
> https://git.opendaylight.org/gerrit/#/c/16920/
>
> Would you mind performing a review on that (giving +1 or -1) ?

Hi Maros,

I have review the code change, it's fine. but I did not see the code change in the xmlcontants.java...

Comment by Bo Li [ 23/Mar/15 ]

The code change looks good for me

Comment by Maros Marsalek [ 23/Mar/15 ]

The XmlNetconfConstants did not change, it already contains the full capability string defined as:

public static final String URN_IETF_PARAMS_NETCONF_BASE_1_1 = "urn:ietf:params:netconf:base:1.1";

Just using it in AbstractNetconfSessionNegotiator instead of hardcoded "base:1.1"

Generated at Wed Feb 07 19:54:56 UTC 2024 using Jira 8.20.10#820010-sha1:ace47f9899e9ee25d7157d59aa17ab06aee30d3d.