Netconf notification 'eventtime' element

asked 2017-05-16 05:37:54 -0800

anonymous user

Anonymous

updated 2017-05-16 07:11:49 -0800

Hi, Seems to me, that 'eventTime' received in Netconf notification from device is not available from MDSAL via MountPointService (either when using BI Broker or BA Broker).

  eventTime

     The time the event was generated by the event source.  This
     parameter is of type dateTime and compliant to [RFC3339].
     Implementations must support time zones.

It is possible to retrieve the body of notification as it was sent by the device but the event time is lost during transformation. In Karaf logs it is possible to see incoming notification in full(with all atrributes).

I tried to get this info through BI broker but codec that serializes notification to BA form

    return codec.fromNormalizedNodeNotification(notification.getType(), notification.getBody());

doesn't take eventtime into account.

I tried to skip BA and switch to using BI, hoping to get this info transparently from device. As I checked in mine case the DOMNotification concrete class is NetconfMessageTransformer.NetconfDeviceNotification that has

   @Override
    public Date getEventTime() {
        return eventTime;
    }

But this internal class has package access so I can not cast to it to use this method. What's more, in restconf, in one of classes, the "event-time" is not taken from device(as it was received), but instead ODL time is put(new Date()).

new JSONObject(writeBodyToString()).put("event-time", ListenerAdapter.toRFC3339(new Date())));

I work on BORON SR2. Do I understand correctly, that this data is lost and not possible to be transparently sent to NB? What's the purpose behind it if so? Thanks for clarification!

kind regards

edit retag flag offensive close merge delete