<!-- 
RSS generated by JIRA (8.20.10#820010-sha1:ace47f9899e9ee25d7157d59aa17ab06aee30d3d) at Wed Feb 07 20:09:22 UTC 2024

It is possible to restrict the fields that are returned in this document by specifying the 'field' parameter in your request.
For example, to request only the issue key and summary append 'field=key&field=summary' to the URL of your request.
-->
<rss version="0.92" >
<channel>
    <title>OpenDaylight JIRA</title>
    <link>https://jira.opendaylight.org</link>
    <description>This file is an XML representation of an issue</description>
    <language>en-us</language>    <build-info>
        <version>8.20.10</version>
        <build-number>820010</build-number>
        <build-date>22-06-2022</build-date>
    </build-info>


<item>
            <title>[MDSAL-282] Notification - eventTime is missing in the generated Java POJO classes</title>
                <link>https://jira.opendaylight.org/browse/MDSAL-282</link>
                <project id="10137" key="MDSAL">mdsal</project>
                    <description>&lt;p&gt;In BORON-SR3, I have found that the eventTime is missing in the generated Java POJO classes.&lt;/p&gt;

&lt;p&gt;Some of the issue faces are listed below:&lt;/p&gt;

&lt;p&gt;1) Firstly, the NETCONF notification object doesn&apos;t have the generated event time there is an issue for the NBI systems in replaying the missed events.&lt;br/&gt;
2) Secondly, unable to do effective event correlation.&lt;/p&gt;

&lt;p&gt;note: The received notification (both Alarm and event) has the &amp;lt;eventTime&amp;gt; but the generated notification listener doesn&apos;t seem to have reference to the eventTime leaf attribute.&lt;/p&gt;

&lt;p&gt;Please find the karaf log with trace level set and the generated POJO class file.&lt;/p&gt;</description>
                <environment>&lt;p&gt;Operating System: Linux&lt;br/&gt;
Platform: Other&lt;/p&gt;</environment>
        <key id="27104">MDSAL-282</key>
            <summary>Notification - eventTime is missing in the generated Java POJO classes</summary>
                <type id="10103" iconUrl="https://jira.opendaylight.org/secure/viewavatar?size=xsmall&amp;avatarId=10311&amp;avatarType=issuetype">New Feature</type>
                                                <status id="5" iconUrl="https://jira.opendaylight.org/images/icons/statuses/resolved.png" description="A resolution has been taken, and it is awaiting verification by reporter. From here issues are either reopened, or are closed.">Resolved</status>
                    <statusCategory id="3" key="done" colorName="green"/>
                                    <resolution id="10000">Done</resolution>
                                        <assignee username="rovarga">Robert Varga</assignee>
                                    <reporter username="senthil2community@gmail.com">Senthilkumar Jayakumar</reporter>
                        <labels>
                    </labels>
                <created>Tue, 1 Aug 2017 09:27:44 +0000</created>
                <updated>Tue, 25 Apr 2023 21:06:05 +0000</updated>
                            <resolved>Tue, 30 Apr 2019 03:31:00 +0000</resolved>
                                                    <fixVersion>4.0.1</fixVersion>
                                    <component>Binding API</component>
                    <component>Binding runtime</component>
                        <due></due>
                            <votes>1</votes>
                                    <watches>5</watches>
                                                                                                                <comments>
                            <comment id="54741" author="senthil2community@gmail.com" created="Tue, 1 Aug 2017 09:27:44 +0000"  >&lt;p&gt;Attachment eventTime_logs_and_generated_pojo.zip has been added with description: Karaf logs and generated POJO classes from the yang model&lt;/p&gt;</comment>
                            <comment id="54738" author="rovarga" created="Tue, 1 Aug 2017 11:23:43 +0000"  >&lt;p&gt;I do not believe this is either a yangtools not an mdsal codegen issue.&lt;/p&gt;

&lt;p&gt;To elaborate, &apos;notification&apos; defines a YANG notification, which is the contents of the event, not its metadata (like eventTime, which really is NETCONF-specific metadata).&lt;/p&gt;

&lt;p&gt;Can you describe the specific use case?&lt;/p&gt;</comment>
                            <comment id="54739" author="senthil2community@gmail.com" created="Wed, 2 Aug 2017 11:57:51 +0000"  >&lt;p&gt;RFC 5277 mandates eventTime to be part of every notification content and it is not merely metadata. &lt;/p&gt;

&lt;p&gt;My use case was to be able to subscribe for NETCONF notifications and further process/act upon based on the severity. &lt;/p&gt;

&lt;p&gt;--------------------------------------------------------------------------&lt;br/&gt;
Excerpt from RFC 5277&lt;/p&gt;


&lt;p&gt;2.2.  Sending Event Notifications&lt;/p&gt;

&lt;p&gt;   Once the subscription has been set up, the NETCONF server sends the&lt;br/&gt;
   event notifications asynchronously over the connection.&lt;/p&gt;

&lt;p&gt;2.2.1.  &amp;lt;notification&amp;gt;&lt;/p&gt;

&lt;p&gt;   Description:&lt;/p&gt;

&lt;p&gt;      An event notification is sent to the client who initiated a&lt;br/&gt;
      &amp;lt;create-subscription&amp;gt; command asynchronously when an event of&lt;br/&gt;
      interest (i.e., meeting the specified filtering criteria) has&lt;br/&gt;
      occurred.  An event notification is a complete and well-formed XML&lt;br/&gt;
      document.  Note that &amp;lt;notification&amp;gt; is not a Remote Procedure Call&lt;br/&gt;
      (RPC) method but rather the top-level element identifying the one-&lt;br/&gt;
      way message as a notification.&lt;/p&gt;

&lt;p&gt;   Parameters:&lt;/p&gt;

&lt;p&gt;      eventTime&lt;/p&gt;

&lt;p&gt;         The time the event was generated by the event source.  This&lt;br/&gt;
         parameter is of type dateTime and compliant to &lt;span class=&quot;error&quot;&gt;&amp;#91;RFC3339&amp;#93;&lt;/span&gt;.&lt;br/&gt;
         Implementations must support time zones.&lt;/p&gt;

&lt;p&gt;      Also contains notification-specific tagged content, if any.  With&lt;br/&gt;
      the exception of &amp;lt;eventTime&amp;gt;, the content of the notification is&lt;br/&gt;
      beyond the scope of this document.&lt;/p&gt;

&lt;p&gt;--------------------------------------------------------------------------&lt;/p&gt;</comment>
                            <comment id="54740" author="rovarga" created="Thu, 17 Aug 2017 15:47:43 +0000"  >&lt;p&gt;Right, but RFC5277 is NETCONF notifications, not YANG notifications. Codegen works on top of RFC6020/7950, without access-protocol-specific metadata.&lt;/p&gt;</comment>
                            <comment id="59802" author="karthikholla" created="Thu, 26 Oct 2017 14:25:03 +0000"  >&lt;p&gt;Hi Robert,&lt;/p&gt;

&lt;p&gt;I was looking into the code,  &lt;br/&gt;
When ODL receives  netconf  notification it will be of type NetconfMessage. &lt;br/&gt;
NetconfMessage has &amp;lt;eventTime&amp;gt;2017-10-26T21:41:54Z&amp;lt;/eventTime&amp;gt;.  From NetconfMessage there will be an instance of  DOMNotification will be created.&lt;/p&gt;

&lt;p&gt;Class NetconfMessageTransformer {&lt;br/&gt;
    static class NetconfDeviceNotification implements DOMNotification, DOMEvent &lt;/p&gt;
{
        private final ContainerNode content;
        private final SchemaPath schemaPath;
        private final Date eventTime;
    }
&lt;p&gt;}&lt;br/&gt;
In DOMNotification, eventTime is separated from content. The content will be delegated to corresponding NotificationListener with the help of schemaPath. EvenTime will never be delivered to listener since its not part of content. So is there any way in which eventTime is also delivered to the NotificationListener along with content?  &lt;/p&gt;</comment>
                            <comment id="59996" author="rovarga" created="Wed, 8 Nov 2017 13:43:00 +0000"  >&lt;p&gt;Right, because that is a detail is part of metadata, not the actual notification data. I am not sure how to map this &amp;#8211; perhaps RFC7952 is part of the solution, somehow. Sorry, I do not have this problem domain loaded, so cannot really wrap my mind about end to end implications &lt;img class=&quot;emoticon&quot; src=&quot;https://jira.opendaylight.org/images/icons/emoticons/sad.png&quot; height=&quot;16&quot; width=&quot;16&quot; align=&quot;absmiddle&quot; alt=&quot;&quot; border=&quot;0&quot;/&gt;&lt;/p&gt;</comment>
                            <comment id="60028" author="rovarga" created="Mon, 13 Nov 2017 17:42:33 +0000"  >&lt;p&gt;After thinking about this a bit more, there are essentially two approaches we can take:&lt;br/&gt;
1) transport notification metadata at the NotificationBroker level, add another argument to all NotificationListener interfaces&lt;br/&gt;
2) transport notification metadata in-band, e.g. add DataContainer.metadata(), which exposes access to metadata&lt;/p&gt;

&lt;p&gt;In either case we need to generate container classes for each md:annotation use in models, such that metadata type is properly captured (yangtools.rfc7952.model.api.Annotation gives us everything we need).&lt;/p&gt;

&lt;p&gt;I think I like approach 2) better, as it allows for proper forwarding without losing metadata.&lt;/p&gt;

&lt;p&gt;Also, we need someone to define event-time annotation &amp;#8211; I am not sure if there is an IETF RFC/draft that does that.&lt;/p&gt;</comment>
                            <comment id="62772" author="opendaylight.release" created="Thu, 3 May 2018 10:11:20 +0000"  >&lt;p&gt;Karthik, for now I&apos;m assigning this to you.&lt;/p&gt;

&lt;p&gt;Please decide update who should handle this issue.&#160;&lt;/p&gt;</comment>
                            <comment id="66591" author="rovarga" created="Mon, 18 Mar 2019 15:16:36 +0000"  >&lt;p&gt;Actually&#160; eventTime is not metadata, nor should it be attached to the notification directly, as it is data from the &quot;Messages&quot; layer of NETCONF, &lt;a href=&quot;https://tools.ietf.org/html/rfc6241#section-1.2&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://tools.ietf.org/html/rfc6241#section-1.2&lt;/a&gt; , hence it is part of notification envelope.&lt;/p&gt;

&lt;p&gt;From that perspective option 1) is correct, as there are two distinct cases here:&lt;/p&gt;
&lt;ol&gt;
	&lt;li&gt;the notification is being generated, and therefore eventTime needs to be generated by the NotificationBroker&lt;/li&gt;
	&lt;li&gt;the notification is being forwarded, and therefore eventTime needs to be propagated from the original envelope&lt;/li&gt;
&lt;/ol&gt;


&lt;p&gt;The envelope approach is interesting in that an envelope can actually contain more than eventTime and 2) may want to modify other things (like record forwarding).&lt;/p&gt;</comment>
                            <comment id="66618" author="rovarga" created="Tue, 26 Mar 2019 21:03:35 +0000"  >&lt;p&gt;I think we should take a lesson from DOM world here, where DOMNotification and DOMEvent are completely separate interfaces composed by implementation. The same approach can be taken in Binding world, where we lack the equivalent of DOMEvent &#8211; which should be defined in Binding API, not binding spec, let&apos;s say EventInstantAware. The design of that interface needs to take into account the binding spec and its method must not overlap with user-generated methods (hence no &apos;get&apos; method prefix!).&lt;/p&gt;

&lt;p&gt;binding-dom-adapter would be tagging incoming Notification instances with current time, forwarding them to DOMNotificationRouter as proper DOMEvents, by subclassing&#160; LazySerializedDOMNotification. On the receiving end, binding-dom-codec needs to grow a subclass of LazyDataObject, which will, in addition to the normal interface, implement EventInstantAware.&lt;/p&gt;

&lt;p&gt;Users can then query their incoming notifications for EventInstantAware, and if it is available it will be presented to them.&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10000">
                    <name>Blocks</name>
                                            <outwardlinks description="blocks">
                                        <issuelink>
            <issuekey id="28719">NETCONF-483</issuekey>
        </issuelink>
                            </outwardlinks>
                                                        </issuelinktype>
                            <issuelinktype id="10003">
                    <name>Relates</name>
                                            <outwardlinks description="relates to">
                                        <issuelink>
            <issuekey id="36844">NETCONF-1001</issuekey>
        </issuelink>
                            </outwardlinks>
                                                        </issuelinktype>
                    </issuelinks>
                <attachments>
                            <attachment id="13836" name="eventTime_logs_and_generated_pojo.zip" size="3526" author="senthil2community@gmail.com" created="Tue, 1 Aug 2017 09:27:44 +0000"/>
                    </attachments>
                <subtasks>
                    </subtasks>
                <customfields>
                                                                            <customfield id="customfield_11400" key="com.atlassian.jira.plugins.jira-development-integration-plugin:devsummary">
                        <customfieldname>Development</customfieldname>
                        <customfieldvalues>
                            
                        </customfieldvalues>
                    </customfield>
                                                                                                                        <customfield id="customfield_10208" key="com.atlassian.jira.plugin.system.customfieldtypes:textfield">
                        <customfieldname>External issue ID</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>8919</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10201" key="com.atlassian.jira.plugin.system.customfieldtypes:url">
                        <customfieldname>External issue URL</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue><![CDATA[https://bugs.opendaylight.org/show_bug.cgi?id=8919]]></customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                <customfield id="customfield_10000" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>0|i02xfr:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                </customfields>
    </item>
</channel>
</rss>