[NETCONF-472] ReadDataTransactionUtil creates two NotificationListenerAdapters for JSON stream Created: 14/Sep/17 Updated: 15/Mar/19 Resolved: 28/May/18 |
|
| Status: | Resolved |
| Project: | netconf |
| Component/s: | restconf-nb |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Bug | ||
| Reporter: | wu sandi | Assignee: | Unassigned |
| Resolution: | Done | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Environment: |
Operating System: All |
||
| External issue ID: | 9160 |
| Description |
|
when you get http://localhost:8181/restconf/18/data/ietf-restconf-monitoring:restconf-state/streams, ReadDataTransactionUtil for (final NotificationDefinition notificationDefinition : schemaContextRef.get().getNotifications()) { for (final NotificationListenerAdapter listener : notifiStreamJSON) { final URI uri = SubscribeToStreamUtil.prepareUriByStreamName(uriInfo, listener.getStreamName()); final NormalizedNode mapToStreams = RestconfMappingNodeUtil.mapYangNotificationStreamByIetfRestconfMonitoring( listener.getSchemaPath().getLastComponent(), schemaContext.getNotifications(), null, listener.getOutputType(), uri, SubscribeToStreamUtil.getMonitoringModule(schemaContext), exist); SubscribeToStreamUtil.writeDataToDS(schemaContext, listener.getSchemaPath().getLastComponent().getLocalName(), wTx, exist, mapToStreams); } } Obviously, it's wrong to add the notifiStreamXML object to notifiStreamJSON. It leads that two NotificationListenerAdapter will exist in Notifcator for JSON streamName: one is for XML, one if for JSON. It's not what we want. So I change it to like this below: public static NormalizedNode<?, ?> readData(final String identifier, final String content, for (final NotificationDefinition notificationDefinition : schemaContextRef.get().getNotifications()) { List<NotificationListenerAdapter> notifiStream = Lists.newArrayList(); } |
| Comments |
| Comment by wu sandi [ 14/Sep/17 ] |
|
I have fix this bug by commit https://git.opendaylight.org/gerrit/#/c/63122/. |
| Comment by OpenDaylight Release [ 03/May/18 ] |
|
Andrew, moving it to you for now. Please decide to who this should be assigned. |
| Comment by Andrew Grimberg [ 03/May/18 ] |
|
You must have meant some other Andrew. I have no knowledge of how to do anything related to this! |