ietf-5277-netconf

Model for RPCs and Notifications in RFC 5277: NETCONF Event Notifications

  • Version: 2016-06-15

    ietf-5277-netconf@2016-06-15


    
      module ietf-5277-netconf {
    
        yang-version 1;
    
        namespace
          "urn:ietf:params:xml:ns:yang:ietf-5277-netconf";
    
        prefix notif;
    
        import ietf-yang-types {
          prefix yang;
        }
    
        organization "IETF";
    
        contact
          "WG Web:   <http://tools.ietf.org/wg/netconf/>
         WG List:  <mailto:netconf@ietf.org>
    
         WG Chair: Mahesh Jethanandani
                   <mailto:mjethanandani@gmail.com>
    
         WG Chair: Mehmet Ersue
                   <mailto:mehmet.ersue@nokia.com>
    
         Editor:   Alberto Gonzalez Prieto
                   <mailto:albertgo@cisco.com>
    
         Editor:   Alexander Clemm
                   <mailto:alex@cisco.com>
    
         Editor:   Eric Voit
                   <mailto:evoit@cisco.com>
    
         Editor:   Einar Nilsen-Nygaard
                   <mailto:einarnn@cisco.com>
    
         Editor:   Ambika Prasad Tripathy
                   <mailto:ambtripa@cisco.com>";
    
        description
          "Model for RPCs and Notifications in RFC 5277: NETCONF Event
         Notifications";
    
        revision "2016-06-15" {
          description
            "Model for RPC in RFC 5277: NETCONF Event Notifications";
          reference
            "RFC 5277: NETCONF Event Notifications";
    
        }
    
    
        identity stream {
          description
            "Base identity to represent a generic stream of event
           notifications.";
        }
    
        identity NETCONF {
          base stream;
          description
            "Default NETCONF event stream, containing events based on
           notifications defined as YANG modules that are supported
           by the system.";
        }
    
        typedef stream {
          type identityref {
            base stream;
          }
          description
            "Specifies a system-provided datastream.";
        }
    
        rpc create-subscription {
          description
            "This operation initiates an event notification subscription
           that will send asynchronous event notifications to the
           initiator of the command until the subscription terminates.";
          input {
            leaf stream {
              type stream;
              default "NETCONF";
              description
                "Indicates which stream of events is of interest.
    If not present, events in the default NETCONF stream
    will be sent.";
            }
    
            choice filter-type {
              description
                "A filter needs to be a single filter of a given type.
    Mixing and matching of multiple filters does not occur
    at the level of this grouping.";
              anyxml filter {
                description
                  "Filter per RFC 5277. Notification filter.
    If a filter element is specified to look for data of a
    particular value, and the data item is not present
    within a particular event notification for its value to
    be checked against, the notification will be filtered
    out. For example, if one were to check for
    'severity=critical' in a configuration event
    notification where this field was not supported, then
    the notification would be filtered out. For subtree
    filtering, a non-empty node set means that the filter
    matches.  For XPath filtering, the mechanisms defined
    in [XPATH] should be used to convert the returned
    value to boolean.";
              }
            }  // choice filter-type
    
            leaf startTime {
              type yang:date-and-time;
              description
                "Used to trigger the replay feature
    and indicate that the replay should start at the time
    specified.  If <startTime> is not present, this is not a
    replay subscription.  It is not valid to specify start
    times that are later than the current time.  If the
    <startTime> specified is earlier than the log can support,
    the replay will begin with the earliest available
    notification.  This parameter is of type dateTime and
    compliant to [RFC3339].  Implementations must
    support time zones.";
            }
    
            leaf stopTime {
              type yang:date-and-time;
              must "current()  > ../startTime" {
                description
                  "stopTime must be used with and be later than <startTime>";
              }
              description
                "Used with the optional replay feature to indicate the
    newest notifications of interest.  If <stopTime> is
    not present, the notifications will continue until the
    subscription is terminated.  Must be used with and be
    later than <startTime>.  Values of <stopTime> in the
    future are valid.  This parameter is of type dateTime and
    compliant to [RFC3339].  Implementations must support time
    zones.";
            }
          }
        }  // rpc create-subscription
      }  // module ietf-5277-netconf
    

© 2023 YumaWorks, Inc. All rights reserved.