tech-invite   World Map     

IETF     RFCs     Groups     SIP     ABNFs    |    3GPP     Specs     Gloss.     Arch.     IMS     UICC    |    Misc.    |    search     info

RFC 7407

 
 
 

A YANG Data Model for SNMP Configuration

Part 2 of 4, p. 16 to 40
Prev RFC Part       Next RFC Part

 


prevText      Top      Up      ToC       Page 16 
4.  Definitions

4.1.  Module 'ietf-x509-cert-to-name'

   This YANG module imports typedefs from [RFC6991].

   <CODE BEGINS> file "ietf-x509-cert-to-name.yang"

   module ietf-x509-cert-to-name {

     namespace "urn:ietf:params:xml:ns:yang:ietf-x509-cert-to-name";
     prefix x509c2n;

     import ietf-yang-types {
       prefix yang;
     }

     organization
       "IETF NETMOD (NETCONF Data Modeling Language) Working Group";

     contact
       "WG Web:   <http://tools.ietf.org/wg/netmod/>
        WG List:  <mailto:netmod@ietf.org>

        WG Chair: Thomas Nadeau
                  <mailto:tnadeau@lucidvision.com>

        WG Chair: Juergen Schoenwaelder
                  <mailto:j.schoenwaelder@jacobs-university.de>

        Editor:   Martin Bjorklund
                  <mailto:mbj@tail-f.com>

        Editor:   Juergen Schoenwaelder
                  <mailto:j.schoenwaelder@jacobs-university.de>";

     description
       "This module contains a collection of YANG definitions for
        extracting a name from an X.509 certificate.

Top      Up      ToC       Page 17 
        The algorithm used to extract a name from an X.509 certificate
        was first defined in RFC 6353.

        Copyright (c) 2014 IETF Trust and the persons identified as
        authors of the code.  All rights reserved.

        Redistribution and use in source and binary forms, with or
        without modification, is permitted pursuant to, and subject
        to the license terms contained in, the Simplified BSD License
        set forth in Section 4.c of the IETF Trust's Legal Provisions
        Relating to IETF Documents
        (http://trustee.ietf.org/license-info).

        This version of this YANG module is part of RFC 7407; see
        the RFC itself for full legal notices.";

     reference
       "RFC 6353: Transport Layer Security (TLS) Transport Model for
          the Simple Network Management Protocol (SNMP)";

     revision 2014-12-10 {
       description
         "Initial revision.";
       reference
         "RFC 7407: A YANG Data Model for SNMP Configuration";

     }

     typedef tls-fingerprint {
       type yang:hex-string {
         pattern '([0-9a-fA-F]){2}(:([0-9a-fA-F]){2}){0,254}';
       }
       description
        "A fingerprint value that can be used to uniquely reference
         other data of potentially arbitrary length.

         A tls-fingerprint value is composed of a 1-octet hashing
         algorithm identifier followed by the fingerprint value.  The
         first octet value identifying the hashing algorithm is taken
         from the IANA 'TLS HashAlgorithm Registry' (RFC 5246).  The
         remaining octets are filled using the results of the hashing
         algorithm.";
       reference
        "RFC 6353: Transport Layer Security (TLS) Transport Model
           for the Simple Network Management Protocol (SNMP).
           SNMP-TLS-TM-MIB.SnmpTLSFingerprint";
     }

Top      Up      ToC       Page 18 
     /* Identities */

     identity cert-to-name {
       description
         "Base identity for algorithms to derive a name from a
          certificate.";
     }

     identity specified {
       base cert-to-name;
       description
         "Directly specifies the name to be used for the certificate.
          The value of the leaf 'name' in the cert-to-name list is
          used.";
       reference
         "RFC 6353: Transport Layer Security (TLS) Transport Model
            for the Simple Network Management Protocol (SNMP).
            SNMP-TLS-TM-MIB.snmpTlstmCertSpecified";
     }

     identity san-rfc822-name {
       base cert-to-name;
       description
         "Maps a subjectAltName's rfc822Name to a name.  The local part
          of the rfc822Name is passed unaltered, but the host-part of
          the name must be passed in lowercase.  For example, the
          rfc822Name field FooBar@Example.COM is mapped to name
          FooBar@example.com.";
       reference
         "RFC 6353: Transport Layer Security (TLS) Transport Model
            for the Simple Network Management Protocol (SNMP).
            SNMP-TLS-TM-MIB.snmpTlstmCertSANRFC822Name";
     }

     identity san-dns-name {
       base cert-to-name;
       description
         "Maps a subjectAltName's dNSName to a name after first
          converting it to all lowercase (RFC 5280 does not specify
          converting to lowercase, so this involves an extra step).
          This mapping results in a 1:1 correspondence between
          subjectAltName dNSName values and the name values.";
       reference
         "RFC 6353: Transport Layer Security (TLS) Transport Model
            for the Simple Network Management Protocol (SNMP).
            SNMP-TLS-TM-MIB.snmpTlstmCertSANDNSName";
     }

Top      Up      ToC       Page 19 
     identity san-ip-address {
       base cert-to-name;
       description
         "Maps a subjectAltName's iPAddress to a name by
          transforming the binary-encoded address as follows:

            1) for IPv4, the value is converted into a
               decimal-dotted quad address (e.g., '192.0.2.1').

            2) for IPv6 addresses, the value is converted into a
               32-character, all-lowercase hexadecimal string
               without any colon separators.

          This mapping results in a 1:1 correspondence between
          subjectAltName iPAddress values and the name values.";
       reference
         "RFC 6353: Transport Layer Security (TLS) Transport Model
            for the Simple Network Management Protocol (SNMP).
            SNMP-TLS-TM-MIB.snmpTlstmCertSANIpAddress";
     }

     identity san-any {
       base cert-to-name;
       description
         "Maps any of the following fields using the corresponding
          mapping algorithms:

            +------------+-----------------+
            | Type       | Algorithm       |
            |------------+-----------------|
            | rfc822Name | san-rfc822-name |
            | dNSName    | san-dns-name    |
            | iPAddress  | san-ip-address  |
            +------------+-----------------+

          The first matching subjectAltName value found in the
          certificate of the above types MUST be used when deriving
          the name.  The mapping algorithm specified in the
          'Algorithm' column MUST be used to derive the name.

          This mapping results in a 1:1 correspondence between
          subjectAltName values and name values.  The three sub-mapping
          algorithms produced by this combined algorithm cannot produce
          conflicting results between themselves.";
       reference
         "RFC 6353: Transport Layer Security (TLS) Transport Model
            for the Simple Network Management Protocol (SNMP).
            SNMP-TLS-TM-MIB.snmpTlstmCertSANAny";

Top      Up      ToC       Page 20 
     }

     identity common-name {
       base cert-to-name;
       description
         "Maps a certificate's CommonName to a name after converting
          it to a UTF-8 encoding.  The usage of CommonNames is
          deprecated, and users are encouraged to use subjectAltName
          mapping methods instead.  This mapping results in a 1:1
          correspondence between certificate CommonName values and name
          values.";
       reference
         "RFC 6353: Transport Layer Security (TLS) Transport Model
            for the Simple Network Management Protocol (SNMP).
            SNMP-TLS-TM-MIB.snmpTlstmCertCommonName";
     }

     /*
      * Groupings
      */

     grouping cert-to-name {
       description
         "Defines nodes for mapping certificates to names.  Modules
          that use this grouping should describe how the resulting
          name is used.";

       list cert-to-name {
         key id;
         description
           "This list defines how certificates are mapped to names.
            The name is derived by considering each cert-to-name
            list entry in order.  The cert-to-name entry's fingerprint
            determines whether the list entry is a match:

            1) If the cert-to-name list entry's fingerprint value
               matches that of the presented certificate, then consider
               the list entry a successful match.

            2) If the cert-to-name list entry's fingerprint value
               matches that of a locally held copy of a trusted CA
               certificate, and that CA certificate was part of the CA
               certificate chain to the presented certificate, then
               consider the list entry a successful match.

           Once a matching cert-to-name list entry has been found, the
           map-type is used to determine how the name associated with
           the certificate should be determined.  See the map-type

Top      Up      ToC       Page 21 
           leaf's description for details on determining the name value.
           If it is impossible to determine a name from the cert-to-name
           list entry's data combined with the data presented in the
           certificate, then additional cert-to-name list entries MUST
           be searched to look for another potential match.

           Security administrators are encouraged to make use of
           certificates with subjectAltName fields that can be mapped to
           names so that a single root CA certificate can allow all
           child certificates' subjectAltName fields to map directly to
           a name via a 1:1 transformation.";
         reference
          "RFC 6353: Transport Layer Security (TLS) Transport Model
             for the Simple Network Management Protocol (SNMP).
             SNMP-TLS-TM-MIB.snmpTlstmCertToTSNEntry";

         leaf id {
           type uint32;
           description
             "The id specifies the order in which the entries in the
              cert-to-name list are searched.  Entries with lower
              numbers are searched first.";
           reference
             "RFC 6353: Transport Layer Security (TLS) Transport Model
                for the Simple Network Management Protocol
                (SNMP).
                SNMP-TLS-TM-MIB.snmpTlstmCertToTSNID";
         }

         leaf fingerprint {
           type x509c2n:tls-fingerprint;
           mandatory true;
           description
             "Specifies a value with which the fingerprint of the
              full certificate presented by the peer is compared.  If
              the fingerprint of the full certificate presented by the
              peer does not match the fingerprint configured, then the
              entry is skipped, and the search for a match continues.";
           reference
             "RFC 6353: Transport Layer Security (TLS) Transport Model
                for the Simple Network Management Protocol
                (SNMP).
                SNMP-TLS-TM-MIB.snmpTlstmCertToTSNFingerprint";
         }

         leaf map-type {
           type identityref {
             base cert-to-name;

Top      Up      ToC       Page 22 
           }
           mandatory true;
           description
             "Specifies the algorithm used to map the certificate
              presented by the peer to a name.

              Mappings that need additional configuration objects should
              use the 'when' statement to make them conditional based on
              the map-type.";
           reference
             "RFC 6353: Transport Layer Security (TLS) Transport Model
                for the Simple Network Management Protocol
                (SNMP).
                SNMP-TLS-TM-MIB.snmpTlstmCertToTSNMapType";
         }

         leaf name {
           when "../map-type = 'x509c2n:specified'";
           type string;
           mandatory true;
           description
             "Directly specifies the NETCONF username when the
              map-type is 'specified'.";
           reference
             "RFC 6353: Transport Layer Security (TLS) Transport Model
                for the Simple Network Management Protocol
                (SNMP).
                SNMP-TLS-TM-MIB.snmpTlstmCertToTSNData";
         }
       }
     }
   }

   <CODE ENDS>

4.2.  Module 'ietf-snmp'

   <CODE BEGINS> file "ietf-snmp.yang"

   module ietf-snmp {

     namespace "urn:ietf:params:xml:ns:yang:ietf-snmp";
     prefix snmp;

     include ietf-snmp-common {
       revision-date 2014-12-10;
     }
     include ietf-snmp-engine {

Top      Up      ToC       Page 23 
       revision-date 2014-12-10;
     }
     include ietf-snmp-target {
       revision-date 2014-12-10;
     }
     include ietf-snmp-notification {
       revision-date 2014-12-10;
     }
     include ietf-snmp-proxy {
       revision-date 2014-12-10;
     }
     include ietf-snmp-community {
       revision-date 2014-12-10;
     }
     include ietf-snmp-usm {
       revision-date 2014-12-10;
     }
     include ietf-snmp-tsm {
       revision-date 2014-12-10;
     }
     include ietf-snmp-vacm {
       revision-date 2014-12-10;
     }
     include ietf-snmp-tls {
       revision-date 2014-12-10;
     }
     include ietf-snmp-ssh {
       revision-date 2014-12-10;
     }

     organization
       "IETF NETMOD (NETCONF Data Modeling Language) Working Group";

     contact
       "WG Web:   <http://tools.ietf.org/wg/netmod/>
        WG List:  <mailto:netmod@ietf.org>

        WG Chair: Thomas Nadeau
                  <mailto:tnadeau@lucidvision.com>

        WG Chair: Juergen Schoenwaelder
                  <mailto:j.schoenwaelder@jacobs-university.de>

        Editor:   Martin Bjorklund
                  <mailto:mbj@tail-f.com>

        Editor:   Juergen Schoenwaelder
                  <mailto:j.schoenwaelder@jacobs-university.de>";

Top      Up      ToC       Page 24 
     description
       "This module contains a collection of YANG definitions for
        configuring SNMP engines.

        Copyright (c) 2014 IETF Trust and the persons identified as
        authors of the code.  All rights reserved.

        Redistribution and use in source and binary forms, with or
        without modification, is permitted pursuant to, and subject
        to the license terms contained in, the Simplified BSD License
        set forth in Section 4.c of the IETF Trust's Legal Provisions
        Relating to IETF Documents
        (http://trustee.ietf.org/license-info).

        This version of this YANG module is part of RFC 7407; see
        the RFC itself for full legal notices.";

     revision 2014-12-10 {
       description
         "Initial revision.";
       reference
         "RFC 7407: A YANG Data Model for SNMP Configuration";
     }

   }

   <CODE ENDS>

4.3.  Submodule 'ietf-snmp-common'

   <CODE BEGINS> file "ietf-snmp-common.yang"

   submodule ietf-snmp-common {

     belongs-to ietf-snmp {
       prefix snmp;
     }

     import ietf-yang-types {
       prefix yang;
     }

     organization
       "IETF NETMOD (NETCONF Data Modeling Language) Working Group";

     contact
       "WG Web:   <http://tools.ietf.org/wg/netmod/>
        WG List:  <mailto:netmod@ietf.org>

Top      Up      ToC       Page 25 
        WG Chair: Thomas Nadeau
                  <mailto:tnadeau@lucidvision.com>

        WG Chair: Juergen Schoenwaelder
                  <mailto:j.schoenwaelder@jacobs-university.de>

        Editor:   Martin Bjorklund
                  <mailto:mbj@tail-f.com>

        Editor:   Juergen Schoenwaelder
                  <mailto:j.schoenwaelder@jacobs-university.de>";

     description
       "This submodule contains a collection of common YANG definitions
        for configuring SNMP engines.

        Copyright (c) 2014 IETF Trust and the persons identified as
        authors of the code.  All rights reserved.

        Redistribution and use in source and binary forms, with or
        without modification, is permitted pursuant to, and subject
        to the license terms contained in, the Simplified BSD License
        set forth in Section 4.c of the IETF Trust's Legal Provisions
        Relating to IETF Documents
        (http://trustee.ietf.org/license-info).

        This version of this YANG module is part of RFC 7407; see
        the RFC itself for full legal notices.";

     revision 2014-12-10 {
       description
         "Initial revision.";
       reference
         "RFC 7407: A YANG Data Model for SNMP Configuration";
     }

     /* Collection of SNMP-specific data types */

     typedef admin-string {
       type string {
         length "0..255";
       }
       description
         "Represents SnmpAdminString as defined in RFC 3411.

         Note that the size of an SnmpAdminString is measured in
         octets, not characters.";

Top      Up      ToC       Page 26 
       reference
         "RFC 3411: An Architecture for Describing Simple Network
            Management Protocol (SNMP) Management Frameworks.
            SNMP-FRAMEWORK-MIB.SnmpAdminString";
     }

     typedef identifier {
       type admin-string {
         length "1..32";
       }
       description
         "Identifiers are used to name items in the SNMP configuration
         datastore.";
     }

     typedef context-name {
       type admin-string {
         length "0..32";
       }
       description
         "The context type represents an SNMP context name.";
       reference
         "RFC 3411: An Architecture for Describing Simple Network
            Management Protocol (SNMP) Management Frameworks";
     }

     typedef security-name {
       type admin-string {
         length "1..32";
       }
       description
         "The security-name type represents an SNMP security name.";
       reference
         "RFC 3411: An Architecture for Describing Simple Network
            Management Protocol (SNMP) Management Frameworks";
     }

     typedef security-model {
       type union {
         type enumeration {
           enum v1  { value 1; }
           enum v2c { value 2; }
           enum usm { value 3; }
           enum tsm { value 4; }
         }
         type int32 {
           range "1..2147483647";
         }

Top      Up      ToC       Page 27 
       }
       reference
         "RFC 3411: An Architecture for Describing Simple Network
            Management Protocol (SNMP) Management Frameworks";
     }

     typedef security-model-or-any {
       type union {
         type enumeration {
           enum any { value 0; }
         }
         type security-model;
       }
       reference
         "RFC 3411: An Architecture for Describing Simple Network
            Management Protocol (SNMP) Management Frameworks";
     }

     typedef security-level {
       type enumeration {
         enum no-auth-no-priv { value 1; }
         enum auth-no-priv    { value 2; }
         enum auth-priv       { value 3; }
       }
       reference
         "RFC 3411: An Architecture for Describing Simple Network
            Management Protocol (SNMP) Management Frameworks";
     }

     typedef engine-id {
       type yang:hex-string {
         pattern '([0-9a-fA-F]){2}(:([0-9a-fA-F]){2}){4,31}';
       }
       description
         "The engine ID specified as a list of colon-specified
         hexadecimal octets, e.g., '80:00:02:b8:04:61:62:63'.";
       reference
         "RFC 3411: An Architecture for Describing Simple Network
            Management Protocol (SNMP) Management Frameworks";
     }

     typedef wildcard-object-identifier {
       type string;
       description
         "The wildcard-object-identifier type represents an SNMP object
         identifier where subidentifiers can be given either as a label,
         in numeric form, or a wildcard, represented by an asterisk
         ('*').";

Top      Up      ToC       Page 28 
     }

     typedef tag-value {
       type string {
         length "0..255";
       }
       description
         "Represents SnmpTagValue as defined in RFC 3413.

         Note that the size of an SnmpTagValue is measured in
         octets, not characters.";
       reference
         "RFC 3413: Simple Network Management Protocol (SNMP)
            Applications.
            SNMP-TARGET-MIB.SnmpTagValue";
     }

     container snmp {
       description
         "Top-level container for SNMP-related configuration and
         status objects.";
     }

   }

   <CODE ENDS>

4.4.  Submodule 'ietf-snmp-engine'

   <CODE BEGINS> file "ietf-snmp-engine.yang"

   submodule ietf-snmp-engine {

     belongs-to ietf-snmp {
       prefix snmp;
     }

     import ietf-inet-types {
       prefix inet;
     }

     include ietf-snmp-common;

     organization
       "IETF NETMOD (NETCONF Data Modeling Language) Working Group";

     contact
       "WG Web:   <http://tools.ietf.org/wg/netmod/>

Top      Up      ToC       Page 29 
        WG List:  <mailto:netmod@ietf.org>

        WG Chair: Thomas Nadeau
                  <mailto:tnadeau@lucidvision.com>

        WG Chair: Juergen Schoenwaelder
                  <mailto:j.schoenwaelder@jacobs-university.de>

        Editor:   Martin Bjorklund
                  <mailto:mbj@tail-f.com>

        Editor:   Juergen Schoenwaelder
                  <mailto:j.schoenwaelder@jacobs-university.de>";

     description
       "This submodule contains a collection of YANG definitions
        for configuring SNMP engines.

        Copyright (c) 2014 IETF Trust and the persons identified as
        authors of the code.  All rights reserved.

        Redistribution and use in source and binary forms, with or
        without modification, is permitted pursuant to, and subject
        to the license terms contained in, the Simplified BSD License
        set forth in Section 4.c of the IETF Trust's Legal Provisions
        Relating to IETF Documents
        (http://trustee.ietf.org/license-info).
        This version of this YANG module is part of RFC 7407; see
        the RFC itself for full legal notices.";

     revision 2014-12-10 {
       description
         "Initial revision.";
       reference
         "RFC 7407: A YANG Data Model for SNMP Configuration";
     }

     augment /snmp:snmp {

       container engine {

         description
           "Configuration of the SNMP engine.";

         leaf enabled {
           type boolean;
           default "false";
           description

Top      Up      ToC       Page 30 
             "Enables the SNMP engine.";
         }

         list listen {
           key "name";
           description
             "Configuration of the transport endpoints on which the
              engine listens.";

           leaf name {
             type snmp:identifier;
             description
               "An arbitrary name for the list entry.";
           }

           choice transport {
             mandatory true;
             description
               "The transport-protocol-specific parameters for this
                endpoint.  Submodules providing configuration for
                additional transports are expected to augment this
                choice.";
             case udp {
               container udp {
                 leaf ip {
                   type inet:ip-address;
                   mandatory true;
                   description
                     "The IPv4 or IPv6 address on which the engine
                      listens.";
                 }
                 leaf port {
                   type inet:port-number;
                   description
                     "The UDP port on which the engine listens.

                      If the port is not configured, an engine that
                      acts as a Command Responder uses port 161, and
                      an engine that acts as a Notification Receiver
                      uses port 162.";
                 }
               }
             }
           }
         }

Top      Up      ToC       Page 31 
         container version {
           description
             "SNMP version used by the engine.";
           leaf v1 {
             type empty;
           }
           leaf v2c {
             type empty;
           }
           leaf v3 {
             type empty;
           }
         }

         leaf engine-id {
           type snmp:engine-id;
           description
             "The local SNMP engine's administratively assigned unique
              identifier.

              If this leaf is not set, the device automatically
              calculates an engine ID, as described in RFC 3411.  A
              server MAY initialize this leaf with the automatically
              created value.";
           reference
             "RFC 3411: An Architecture for Describing Simple Network
                Management Protocol (SNMP) Management
                Frameworks.
                SNMP-FRAMEWORK-MIB.snmpEngineID";
         }

         leaf enable-authen-traps {
           type boolean;
           description
             "Indicates whether the SNMP entity is permitted to
              generate authenticationFailure traps.";
           reference
             "RFC 3418: Management Information Base (MIB) for the
                Simple Network Management Protocol (SNMP)
                SNMPv2-MIB.snmpEnableAuthenTraps";
         }
       }
     }
   }

   <CODE ENDS>

Top      Up      ToC       Page 32 
4.5.  Submodule 'ietf-snmp-target'

   <CODE BEGINS> file "ietf-snmp-target.yang"

   submodule ietf-snmp-target {

     belongs-to ietf-snmp {
       prefix snmp;
     }

     import ietf-inet-types {
       prefix inet;
     }

     include ietf-snmp-common;

     organization
       "IETF NETMOD (NETCONF Data Modeling Language) Working Group";

     contact
       "WG Web:   <http://tools.ietf.org/wg/netmod/>
        WG List:  <mailto:netmod@ietf.org>

        WG Chair: Thomas Nadeau
                  <mailto:tnadeau@lucidvision.com>

        WG Chair: Juergen Schoenwaelder
                  <mailto:j.schoenwaelder@jacobs-university.de>

        Editor:   Martin Bjorklund
                  <mailto:mbj@tail-f.com>

        Editor:   Juergen Schoenwaelder
                  <mailto:j.schoenwaelder@jacobs-university.de>";

     description
       "This submodule contains a collection of YANG definitions
        for configuring SNMP targets.

        Copyright (c) 2014 IETF Trust and the persons identified as
        authors of the code.  All rights reserved.

        Redistribution and use in source and binary forms, with or
        without modification, is permitted pursuant to, and subject
        to the license terms contained in, the Simplified BSD License
        set forth in Section 4.c of the IETF Trust's Legal Provisions
        Relating to IETF Documents
        (http://trustee.ietf.org/license-info).

Top      Up      ToC       Page 33 
        This version of this YANG module is part of RFC 7407; see
        the RFC itself for full legal notices.";

     reference
       "RFC 3413: Simple Network Management Protocol (SNMP)
          Applications";

     revision 2014-12-10 {
       description
         "Initial revision.";
       reference
         "RFC 7407: A YANG Data Model for SNMP Configuration";
     }

     augment /snmp:snmp {

       list target {
         key name;
         description
           "List of targets.";
         reference
           "RFC 3413: Simple Network Management Protocol (SNMP)
              Applications.
              SNMP-TARGET-MIB.snmpTargetAddrTable";

         leaf name {
           type snmp:identifier;
           description
             "Identifies the target.";
           reference
             "RFC 3413: Simple Network Management Protocol (SNMP)
                Applications.
                SNMP-TARGET-MIB.snmpTargetAddrName";
         }
         choice transport {
           mandatory true;
           description
             "Transport address of the target.

              The snmpTargetAddrTDomain and snmpTargetAddrTAddress
              objects are mapped to transport-specific YANG nodes.  Each
              transport is configured as a separate case in this
              choice.  Submodules providing configuration for additional
              transports are expected to augment this choice.";

Top      Up      ToC       Page 34 
           reference
             "RFC 3413: Simple Network Management Protocol (SNMP)
                Applications.
                SNMP-TARGET-MIB.snmpTargetAddrTDomain
                SNMP-TARGET-MIB.snmpTargetAddrTAddress";
           case udp {
             reference
              "RFC 3417: Transport Mappings for the Simple Network
                 Management Protocol (SNMP).
                 SNMPv2-TM.snmpUDPDomain
               RFC 3419: Textual Conventions for Transport Addresses.
                 TRANSPORT-ADDRESS-MIB.transportDomainUdpIpv4
                 TRANSPORT-ADDRESS-MIB.transportDomainUdpIpv4z
                 TRANSPORT-ADDRESS-MIB.transportDomainUdpIpv6
                 TRANSPORT-ADDRESS-MIB.transportDomainUdpIpv6z";
             container udp {
               leaf ip {
                 type inet:ip-address;
                 mandatory true;
                 reference
                   "RFC 3413: Simple Network Management Protocol (SNMP).
                      SNMP-TARGET-MIB.snmpTargetAddrTAddress";
               }
               leaf port {
                 type inet:port-number;
                 default 162;
                 description
                   "UDP port number.";
                 reference
                   "RFC 3413: Simple Network Management Protocol (SNMP).
                      SNMP-TARGET-MIB.snmpTargetAddrTAddress";
               }
               leaf prefix-length {
                 type uint8;
                 description
                   "The value of this leaf must match the value of
                    ../snmp:ip.  If ../snmp:ip contains an IPv4 address,
                    this leaf must be less than or equal to 32.  If it
                    contains an IPv6 address, it must be less than or
                    equal to 128.

                    Note that the prefix-length is currently only used
                    by the Community-based Security Model to filter
                    incoming messages.  Furthermore, the prefix-length
                    filtering does not cover all possible filters
                    supported by the corresponding MIB object.";

Top      Up      ToC       Page 35 
                 reference
                   "RFC 3584: Coexistence between Version 1, Version 2,
                      and Version 3 of the Internet-standard
                      Network Management Framework.
                      SNMP-COMMUNITY-MIB.snmpTargetAddrTMask";
               }
             }
           }
         }
         leaf-list tag {
           type snmp:tag-value;
           description
             "List of tag values used to select target addresses.";
           reference
             "RFC 3413: Simple Network Management Protocol (SNMP).
                Applications.
                SNMP-TARGET-MIB.snmpTargetAddrTagList";
         }
         leaf timeout {
           type uint32;
           units "0.01 seconds";
           default 1500;
           description
             "Needed only if this target can receive
              InformRequest-PDUs.";
           reference
             "RFC 3413: Simple Network Management Protocol (SNMP).
                Applications.
                SNMP-TARGET-MIB.snmpTargetAddrTimeout";
         }
         leaf retries {
           type uint8;
           default 3;
           description
             "Needed only if this target can receive
              InformRequest-PDUs.";
           reference
             "RFC 3413: Simple Network Management Protocol (SNMP).
                Applications.
                SNMP-TARGET-MIB.snmpTargetAddrRetryCount";
         }
         leaf target-params {
           type snmp:identifier;
           mandatory true;
           reference
             "RFC 3413: Simple Network Management Protocol (SNMP).
                Applications.
                SNMP-TARGET-MIB.snmpTargetAddrParams";

Top      Up      ToC       Page 36 
         }
       }

       list target-params {
         key name;
         description
           "List of target parameters.";
         reference
           "RFC 3413: Simple Network Management Protocol (SNMP).
              Applications.
              SNMP-TARGET-MIB.snmpTargetParamsTable";

         leaf name {
           type snmp:identifier;
         }
         choice params {
           description
             "This choice is augmented with case nodes containing
              configuration parameters specific to the security model.";
         }
       }
     }
   }

   <CODE ENDS>

4.6.  Submodule 'ietf-snmp-notification'

   <CODE BEGINS> file "ietf-snmp-notification.yang"

   submodule ietf-snmp-notification {

     belongs-to ietf-snmp {
       prefix snmp;
     }

     include ietf-snmp-common;
     include ietf-snmp-target;

     organization
       "IETF NETMOD (NETCONF Data Modeling Language) Working Group";

     contact
       "WG Web:   <http://tools.ietf.org/wg/netmod/>
        WG List:  <mailto:netmod@ietf.org>

        WG Chair: Thomas Nadeau
                  <mailto:tnadeau@lucidvision.com>

Top      Up      ToC       Page 37 
        WG Chair: Juergen Schoenwaelder
                  <mailto:j.schoenwaelder@jacobs-university.de>

        Editor:   Martin Bjorklund
                  <mailto:mbj@tail-f.com>

        Editor:   Juergen Schoenwaelder
                  <mailto:j.schoenwaelder@jacobs-university.de>";

     description
       "This submodule contains a collection of YANG definitions
        for configuring SNMP notifications.

        Copyright (c) 2014 IETF Trust and the persons identified as
        authors of the code.  All rights reserved.

        Redistribution and use in source and binary forms, with or
        without modification, is permitted pursuant to, and subject
        to the license terms contained in, the Simplified BSD License
        set forth in Section 4.c of the IETF Trust's Legal Provisions
        Relating to IETF Documents
        (http://trustee.ietf.org/license-info).

        This version of this YANG module is part of RFC 7407; see
        the RFC itself for full legal notices.";

     reference
       "RFC 3413: Simple Network Management Protocol (SNMP)
          Applications";

     revision 2014-12-10 {
       description
         "Initial revision.";
       reference
         "RFC 7407: A YANG Data Model for SNMP Configuration";
     }

     feature notification-filter {
       description
         "A server implements this feature if it supports SNMP
         notification filtering.";
       reference
         "RFC 3413: Simple Network Management Protocol (SNMP)
            Applications";
     }

     augment /snmp:snmp {

Top      Up      ToC       Page 38 
       list notify {
         key name;
         description
           "Targets that will receive notifications.

            Entries in this list are mapped 1-1 to entries in
            snmpNotifyTable, except that if an entry in snmpNotifyTable
            has an snmpNotifyTag for which no snmpTargetAddrEntry
            exists, then the snmpNotifyTable entry is not mapped to an
            entry in this list.";
         reference
           "RFC 3413: Simple Network Management Protocol (SNMP).
              Applications.
              SNMP-NOTIFICATION-MIB.snmpNotifyTable";

         leaf name {
           type snmp:identifier;
           description
             "An arbitrary name for the list entry.";
           reference
             "RFC 3413: Simple Network Management Protocol (SNMP).
                Applications.
                SNMP-NOTIFICATION-MIB.snmpNotifyName";
         }
         leaf tag {
           type snmp:tag-value;
           mandatory true;
           description
             "Target tag, selects a set of notification targets.

              Implementations MAY restrict the values of this leaf
              to be one of the available values of /snmp/target/tag in
              a valid configuration.";
           reference
             "RFC 3413: Simple Network Management Protocol (SNMP).
                Applications.
                SNMP-NOTIFICATION-MIB.snmpNotifyTag";
         }
         leaf type {
           type enumeration {
             enum trap { value 1; }
             enum inform { value 2; }
           }
           default trap;
           description
             "Defines the notification type to be generated.";

Top      Up      ToC       Page 39 
           reference
             "RFC 3413: Simple Network Management Protocol (SNMP).
                Applications.
                SNMP-NOTIFICATION-MIB.snmpNotifyType";
         }
       }

       list notify-filter-profile {
         if-feature snmp:notification-filter;
         key name;

         description
           "Notification filter profiles.

            The leaf /snmp/target/notify-filter-profile is used
            to associate a filter profile with a target.

            If an entry in this list is referred to by one or more
            /snmp/target/notify-filter-profile items, each such
            notify-filter-profile is represented by one
            snmpNotifyFilterProfileEntry.

            If an entry in this list is not referred to by any
            /snmp/target/notify-filter-profile, the entry is not mapped
            to snmpNotifyFilterProfileTable.";
         reference
           "RFC 3413: Simple Network Management Protocol (SNMP).
              Applications.
              SNMP-NOTIFICATION-MIB.snmpNotifyFilterProfileTable
              SNMP-NOTIFICATION-MIB.snmpNotifyFilterTable";

         leaf name {
           type snmp:identifier;
           description
             "Name of the filter profile.";
           reference
             "RFC 3413: Simple Network Management Protocol (SNMP).
                Applications.
                SNMP-NOTIFICATION-MIB.snmpNotifyFilterProfileName";
         }

         leaf-list include {
           type snmp:wildcard-object-identifier;
           description
             "A family of subtrees included in this filter.";

Top      Up      ToC       Page 40 
           reference
             "RFC 3413: Simple Network Management Protocol (SNMP).
                Applications.
                SNMP-NOTIFICATION-MIB.snmpNotifyFilterSubtree
                SNMP-NOTIFICATION-MIB.snmpNotifyFilterMask
                SNMP-NOTIFICATION-MIB.snmpNotifyFilterType";
         }

         leaf-list exclude {
           type snmp:wildcard-object-identifier;
           description
             "A family of subtrees excluded from this filter.";
           reference
             "RFC 3413: Simple Network Management Protocol (SNMP).
                Applications.
                SNMP-NOTIFICATION-MIB.snmpNotifyFilterSubtree
                SNMP-NOTIFICATION-MIB.snmpNotifyFilterMask
                SNMP-NOTIFICATION-MIB.snmpNotifyFilterType";
         }
       }

     }

     augment /snmp:snmp/snmp:target-params {
       reference
         "RFC 3413: Simple Network Management Protocol (SNMP).
            Applications.
            SNMP-NOTIFICATION-MIB.snmpNotifyFilterProfileTable";
       leaf notify-filter-profile {
         if-feature snmp:notification-filter;
         type leafref {
           path "/snmp/notify-filter-profile/name";
         }
         description
           "This leafref leaf is used to represent the sparse
            relationship between the /snmp/target-params list and the
            /snmp/notify-filter-profile list.";
         reference
           "RFC 3413: Simple Network Management Protocol (SNMP).
              Applications.
              SNMP-NOTIFICATION-MIB.snmpNotifyFilterProfileName";
       }
     }

   }

   <CODE ENDS>


Next RFC Part