[NETCONF-505] Restconf fails to deserialize URL if leafref from external module is present Created: 30/Jan/18  Updated: 05/Mar/18  Resolved: 05/Mar/18

Status: Resolved
Project: netconf
Component/s: restconf-nb
Affects Version/s: None
Fix Version/s: Nitrogen SR1, Oxygen

Type: Bug Priority: Medium
Reporter: Marek Gradzki Assignee: Marek Gradzki
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Description   

Issue similar to NETCONF-382, but applies to leafrefs.

 

Restconf is using global schema context to deserialize external leafrefs.

For URLs such as:

/restconf/config/network-topology:network-topology/topology/topology-netconf/node/vpp/yang-ext:mount/openconfig-network-instance:network-instances/network-instance/global-bgp

where global-bgp is leafref and openconfig-network-instance is not present in global schema context,

restconf fails with error:

 

java.lang.IllegalArgumentException: Module reference cannot be NULL

    at com.google.common.base.Preconditions.checkArgument(Preconditions.java:134)
    at org.opendaylight.yangtools.yang.model.util.SchemaContextUtil.findDataSchemaNode(SchemaContextUtil.java:125)
    at org.opendaylight.yangtools.yang.model.util.SchemaContextUtil.getBaseTypeForLeafRef(SchemaContextUtil.java:659)
    at org.opendaylight.netconf.sal.restconf.impl.ControllerContext.addKeyValue(ControllerContext.java:771)

 

 



 Comments   
Comment by Marek Gradzki [ 30/Jan/18 ]

stable/nitrogen:

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

Comment by Marek Gradzki [ 30/Jan/18 ]

master:

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

Comment by Marek Gradzki [ 05/Mar/18 ]

stable/carbon:

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

Comment by Marek Gradzki [ 05/Mar/18 ]

Also fixed in Carbon, but after Carbon-SR3 was released.

Generated at Wed Feb 07 20:15:12 UTC 2024 using Jira 8.20.10#820010-sha1:ace47f9899e9ee25d7157d59aa17ab06aee30d3d.