Uploaded image for project: 'netconf'
  1. netconf
  2. NETCONF-726

Streams should be identified uniquely

XMLWordPrintable

      If we look at the ietf-restconf-monitoring YANG, we can see that the stream name is the key of the list - from this reason, it should be unique:

             container streams {
               description
                 "Container representing the notification event streams
                  supported by the server.";
                reference
                  "RFC 5277, Section 3.4, <streams> element.";         list stream {
                 key name;
                 description
                   "Each entry describes an event stream supported by
                    the server.";
      

      However, information about data-change-event stream is written to datastore only using local name of the data element.

      Now what can happen: We have a YANG module, in which there are 2 elements with the same identifier - afterwards, it is not possible to differ between the data-change-vent streams created from these 2 elements.

      Possible solutions:

      • using the serialized path to data element as the stream name
      • using different unique / generated information as the stream name

      The same problem can occur also with streams created for YANG notifications because YANG 1.1 allows to place notification definitions also under some data node container, not just under root of the module. But practically, such scenario doesn't happen at all.

            jaro0149odl Jaroslav Tóth
            jaro0149odl Jaroslav Tóth
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: