[NETCONF-240] Data augmentation doesn't work with notifications Created: 28/Jul/16  Updated: 15/Mar/19  Resolved: 28/Nov/16

Status: Resolved
Project: netconf
Component/s: restconf-nb
Affects Version/s: None
Fix Version/s: None

Type: Bug
Reporter: Harinath Mallepally Assignee: Jakub Toth
Resolution: Duplicate Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Operating System: All
Platform: All


Issue Links:
Blocks
is blocked by NETCONF-245 Notifications stream output is not sa... Resolved
Duplicate
duplicates NETCONF-245 Notifications stream output is not sa... Resolved
External issue ID: 6301

 Description   

Observed an interesting situation with notifications.

when I have data that got augmented (by some other yang file),and use the base data for notification, it doesn't work.

I think as per RFC (https://tools.ietf.org/pdf/rfc6020.pdf) it is supposed to work.

I keep getting the following error(and similar ones) during Delivery.

2016-07-27 13:57:06,788 | ERROR | pool-28-thread-1 | DOMNotificationRouterEvent | 115 - org.opendaylight.controller.sal-broker-impl - 1.3.1.Beryllium-SR1 | Delivery of notification org.opendaylight.controller.md.sal.binding.impl.LazySerializedDOMNotification@5baeac9 caused an error in listener org.opendaylight.netconf.sal.streams.listeners.NotificationListenerAdapter@c087ae7
org.opendaylight.yangtools.binding.data.codec.impl.IncorrectNestingException: Child interface org.opendaylight.yang.gen.v1.urn.infinera.params.xml.ns.yang.infn.otn.service.rev160425.TunnelUpdateTimeAugment is not valid child.
at org.opendaylight.yangtools.binding.data.codec.impl.IncorrectNestingException.create(IncorrectNestingException.java:28)
at org.opendaylight.yangtools.binding.data.codec.impl.DataContainerCodecContext.childNonNull(DataContainerCodecContext.java:180)[66:org.opendaylight.mdsal.binding-dom-codec:0.8.1.Beryllium-SR1]
at o

I will update the bug with more details



 Comments   
Comment by Harinath Mallepally [ 01/Aug/16 ]

Additional inputs

The we I could make it work is in all yang files that I used for data augmentation, I duplicated it to augment notification data too.

example:

augment "/te:te/te:tunnels/te:tunnel/te:config/te:endpoint"

{ description "Augment with additional parameters required for OTN service."; ext:augment-identifier otn-tunnel-endpoint-config-augment; uses otn-tunnel-endpoint; }

augment "/te:tunnel-lifecycle-event/te:config/te:endpoint"

{ description "Augment the tunnel lifecycle event with additional parameters required for OTN service."; ext:augment-identifier tunnel-lifecycle-event-otn-tunnel-endpoint-config-augment; uses otn-tunnel-endpoint; }

Then I could make it work, but this is error prone right? I think we should have the augmented data be processed through notification without any explicit augmentation again, as this will result in duplicate code (mostly) and if missed, it will cause notifications delivery to fail.

Comment by Martin Ciglan [ 17/Oct/16 ]

1. based on discussion with Jakub Toth, moving this bug to Restconf.
He will come back with tests if this stays as restconf bug or we should
move it to mdsal or yangtools (based on his results).
2. since latest beryllium SR4 code freeze happened yesterday,
this should be fixed for Boron onwards.

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