[NETCONF-483] Netconf Notification event-Time will not reach the end user Created: 08/Nov/17 Updated: 23/Feb/23 Resolved: 23/Feb/23 |
|
| Status: | Resolved |
| Project: | netconf |
| Component/s: | netconf |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Bug | Priority: | High |
| Reporter: | Karthik Holla | Assignee: | Yaroslav Lastivka |
| Resolution: | Cannot Reproduce | Votes: | 0 |
| Labels: | pt | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Attachments: |
|
||||||||||||||||
| Issue Links: |
|
||||||||||||||||
| Description |
|
Netconf notifications from devices will sent with a parameter called event-time When these notification are about to delivered to the registered listeners, an instance of generated POJO (from notification event model ) will be used to deliver the notification. Only modelled data is forwarded. Event time will be ignored. Due to this end user will not able to get when this event is generated. So Is there any way end user will be able to get this data as part of notification ? |
| Comments |
| Comment by OpenDaylight Release [ 03/May/18 ] |
|
Since the bug is unassigned I'm currently assigning it to you. Please assign to the relevant person. |
| Comment by Robert Varga [ 11/Feb/20 ] |
|
As long as NETCONF performs encoding to an object which implements org.opendaylight.mdsal.dom.api.DOMEvent, this should actually work – users can either access it via DOMEvent or its Binding counterpart (org.opendaylight.yangtools.yang.binding.EventInstantAware) – i.e. upon reception of the DTO perform an instanceof check and cast it. This time will not be part of DTOs directly, as they are transport-level property – see RFC6241 figure 1, POJOs are layer 4, event-time is at layer 2 (as part of <notification/>) |
| Comment by Ivan Hrasko [ 01/Feb/23 ] |
|
We need to verify this with RFC8040. According to bierman-02 based steps to reproduce issue is no more present. |
| Comment by Yaroslav Lastivka [ 08/Feb/23 ] |
|
I have tried to reproduce these steps and found out that with SSE the issue is not present. My logs: odl@odl-Latitude-5521:~$ curl -v -X GET http://localhost:8181/rests/notif/data-change-event-subscription/network-topology:network-topology/datastore=CONFIGURATION/scope=SUBTREE -H "Content-Type: text/event-stream" -H "Authorization: Basic YWRtaW46YWRtaW4=" Note: Unnecessary use of -X or --request, GET is already inferred. Trying 127.0.0.1:8181... Connected to localhost (127.0.0.1) port 8181 (#0) > GET /rests/notif/data-change-event-subscription/network-topology:network-topology/datastore=CONFIGURATION/scope=SUBTREE HTTP/1.1 > Host: localhost:8181 > User-Agent: curl/7.81.0 > Accept: / > Content-Type: text/event-stream > Authorization: Basic YWRtaW46YWRtaW4= > Mark bundle as not supporting multiuse < HTTP/1.1 200 OK < Set-Cookie: JSESSIONID=node012x3457ld74yg1mvgjkzj18fst0.node0; Path=/rests; HttpOnly < Expires: Thu, 01 Jan 1970 00:00:00 GMT < Set-Cookie: rememberMe=deleteMe; Path=/rests; Max-Age=0; Expires=Tue, 07-Feb-2023 17:22:02 GMT; SameSite=lax < Content-Type: text/event-stream < Transfer-Encoding: chunked < : ping : ping : ping data: <notification xmlns="urn:ietf:params:xml:ns:netconf:notification:1.0"><eventTime>2023-02-08T19:22:33.99851211+02:00</eventTime><data-changed-notification xmlns="urn:opendaylight:params:xml:ns:yang:controller:md:sal:remote"><data-change-event><path>/urn-TBD-params-xml-ns-yang-network-topology:network-topology</path><data><network-topology xmlns="urn:TBD:params:xml:ns:yang:network-topology"><topology><topology-id>topology-netconf</topology-id><node><node-id>17830-sim-device</node-id><port xmlns="urn:opendaylight:netconf-node-topology">17830</port><schemaless xmlns="urn:opendaylight:netconf-node-topology">false</schemaless><tcp-only xmlns="urn:opendaylight:netconf-node-topology">false</tcp-only><keepalive-delay xmlns="urn:opendaylight:netconf-node-topology">0</keepalive-delay><username xmlns="urn:opendaylight:netconf-node-topology">admin</username><password xmlns="urn:opendaylight:netconf-node-topology">admin</password><host xmlns="urn:opendaylight:netconf-node-topology">127.0.0.1</host></node></topology></network-topology></data><operation>created</operation></data-change-event></data-changed-notification></notification> |
| Comment by Yaroslav Lastivka [ 23/Feb/23 ] |
|
Reproducing steps using the WebSocket mechanism shows that the issue is not present. $ wscat --header "Authorization: Basic YWRtaW46YWRtaW4=" -c ws://localhost:8181/rests/data-change-event-subscription/network-topology:network-topology/datastore=CONFIGURATION/scope=SUBTREE Connected (press CTRL+C to quit) < <notification xmlns="urn:ietf:params:xml:ns:netconf:notification:1.0"><eventTime>2023-02-23T11:48:41.987760371+02:00</eventTime><data-changed-notification xmlns="urn:opendaylight:params:xml:ns:yang:controller:md:sal:remote"><data-change-event><path>/urn-TBD-params-xml-ns-yang-network-topology:network-topology</path><data><network-topology xmlns="urn:TBD:params:xml:ns:yang:network-topology"><topology><topology-id>topology-netconf</topology-id><node><node-id>17830-sim-device</node-id><port xmlns="urn:opendaylight:netconf-node-topology">17830</port><schemaless xmlns="urn:opendaylight:netconf-node-topology">false</schemaless><tcp-only xmlns="urn:opendaylight:netconf-node-topology">false</tcp-only><keepalive-delay xmlns="urn:opendaylight:netconf-node-topology">0</keepalive-delay><username xmlns="urn:opendaylight:netconf-node-topology">admin</username><password xmlns="urn:opendaylight:netconf-node-topology">admin</password><host xmlns="urn:opendaylight:netconf-node-topology">127.0.0.1</host></node></topology></network-topology></data><operation>created</operation></data-change-event></data-changed-notification></notification> > |
| Comment by Ivan Hrasko [ 23/Feb/23 ] |
|
OK, when we apply |