Blame tests/schema/yang/ietf/ietf-snmp-community.yang

Packit 8fb591
submodule ietf-snmp-community {
Packit 8fb591
Packit 8fb591
  belongs-to ietf-snmp {
Packit 8fb591
    prefix snmp;
Packit 8fb591
  }
Packit 8fb591
Packit 8fb591
  import ietf-netconf-acm {
Packit 8fb591
    prefix nacm;
Packit 8fb591
  }
Packit 8fb591
Packit 8fb591
  include ietf-snmp-common;
Packit 8fb591
  include ietf-snmp-target;
Packit 8fb591
  include ietf-snmp-proxy;
Packit 8fb591
Packit 8fb591
  organization
Packit 8fb591
    "IETF NETMOD (NETCONF Data Modeling Language) Working Group";
Packit 8fb591
Packit 8fb591
  contact
Packit 8fb591
    "WG Web:   <http://tools.ietf.org/wg/netmod/>
Packit 8fb591
     WG List:  <mailto:netmod@ietf.org>
Packit 8fb591
Packit 8fb591
     WG Chair: Thomas Nadeau
Packit 8fb591
               <mailto:tnadeau@lucidvision.com>
Packit 8fb591
Packit 8fb591
     WG Chair: Juergen Schoenwaelder
Packit 8fb591
               <mailto:j.schoenwaelder@jacobs-university.de>
Packit 8fb591
     Editor:   Martin Bjorklund
Packit 8fb591
               <mailto:mbj@tail-f.com>
Packit 8fb591
Packit 8fb591
     Editor:   Juergen Schoenwaelder
Packit 8fb591
               <mailto:j.schoenwaelder@jacobs-university.de>";
Packit 8fb591
Packit 8fb591
  description
Packit 8fb591
    "This submodule contains a collection of YANG definitions
Packit 8fb591
     for configuring community-based SNMP.
Packit 8fb591
Packit 8fb591
     Copyright (c) 2014 IETF Trust and the persons identified as
Packit 8fb591
     authors of the code.  All rights reserved.
Packit 8fb591
Packit 8fb591
     Redistribution and use in source and binary forms, with or
Packit 8fb591
     without modification, is permitted pursuant to, and subject
Packit 8fb591
     to the license terms contained in, the Simplified BSD License
Packit 8fb591
     set forth in Section 4.c of the IETF Trust's Legal Provisions
Packit 8fb591
     Relating to IETF Documents
Packit 8fb591
     (http://trustee.ietf.org/license-info).
Packit 8fb591
Packit 8fb591
     This version of this YANG module is part of RFC 7407; see
Packit 8fb591
     the RFC itself for full legal notices.";
Packit 8fb591
Packit 8fb591
  reference
Packit 8fb591
    "RFC 3584: Coexistence between Version 1, Version 2, and
Packit 8fb591
       Version 3 of the Internet-standard Network
Packit 8fb591
       Management Framework";
Packit 8fb591
Packit 8fb591
  revision 2015-01-23 {
Packit 8fb591
    description
Packit 8fb591
      "When expression of augment '/snmp:snmp/snmp:target' with
Packit 8fb591
       non-existing leaves removed.";
Packit 8fb591
    reference
Packit 8fb591
      "RFC 7407 Errata";
Packit 8fb591
  }
Packit 8fb591
Packit 8fb591
  revision 2014-12-10 {
Packit 8fb591
    description
Packit 8fb591
      "Initial revision.";
Packit 8fb591
    reference
Packit 8fb591
      "RFC 7407: A YANG Data Model for SNMP Configuration";
Packit 8fb591
  }
Packit 8fb591
Packit 8fb591
  augment /snmp:snmp {
Packit 8fb591
Packit 8fb591
    list community {
Packit 8fb591
      key index;
Packit 8fb591
Packit 8fb591
      description
Packit 8fb591
        "List of communities.";
Packit 8fb591
      reference
Packit 8fb591
        "RFC 3584: Coexistence between Version 1, Version 2,
Packit 8fb591
           and Version 3 of the Internet-standard
Packit 8fb591
           Network Management Framework.
Packit 8fb591
           SNMP-COMMUNITY-MIB.snmpCommunityTable";
Packit 8fb591
Packit 8fb591
      leaf index {
Packit 8fb591
        type snmp:identifier;
Packit 8fb591
        description
Packit 8fb591
          "Index into the community list.";
Packit 8fb591
        reference
Packit 8fb591
          "RFC 3584: Coexistence between Version 1, Version 2,
Packit 8fb591
             and Version 3 of the Internet-standard
Packit 8fb591
             Network Management Framework.
Packit 8fb591
             SNMP-COMMUNITY-MIB.snmpCommunityIndex";
Packit 8fb591
      }
Packit 8fb591
      choice name {
Packit 8fb591
        nacm:default-deny-all;
Packit 8fb591
        description
Packit 8fb591
          "The community name, specified as either a string or
Packit 8fb591
           a binary value.  The binary name is used when the
Packit 8fb591
           community name contains characters that are not legal
Packit 8fb591
           in a string.
Packit 8fb591
Packit 8fb591
           If not set, the value of 'security-name' is operationally
Packit 8fb591
           used as the snmpCommunityName.";
Packit 8fb591
        reference
Packit 8fb591
          "RFC 3584: Coexistence between Version 1, Version 2,
Packit 8fb591
             and Version 3 of the Internet-standard
Packit 8fb591
             Network Management Framework.
Packit 8fb591
             SNMP-COMMUNITY-MIB.snmpCommunityName";
Packit 8fb591
        leaf text-name {
Packit 8fb591
          type string;
Packit 8fb591
          description
Packit 8fb591
            "A community name that can be represented as a
Packit 8fb591
             YANG string.";
Packit 8fb591
        }
Packit 8fb591
        leaf binary-name {
Packit 8fb591
          type binary;
Packit 8fb591
          description
Packit 8fb591
            "A community name represented as a binary value.";
Packit 8fb591
        }
Packit 8fb591
      }
Packit 8fb591
      leaf security-name {
Packit 8fb591
        type snmp:security-name;
Packit 8fb591
        mandatory true;
Packit 8fb591
        nacm:default-deny-all;
Packit 8fb591
        description
Packit 8fb591
          "The snmpCommunitySecurityName of this entry.";
Packit 8fb591
        reference
Packit 8fb591
          "RFC 3584: Coexistence between Version 1, Version 2,
Packit 8fb591
             and Version 3 of the Internet-standard
Packit 8fb591
             Network Management Framework.
Packit 8fb591
             SNMP-COMMUNITY-MIB.snmpCommunitySecurityName";
Packit 8fb591
      }
Packit 8fb591
      leaf engine-id {
Packit 8fb591
        if-feature snmp:proxy;
Packit 8fb591
        type snmp:engine-id;
Packit 8fb591
        description
Packit 8fb591
          "If not set, the value of the local SNMP engine is
Packit 8fb591
           operationally used by the device.";
Packit 8fb591
        reference
Packit 8fb591
          "RFC 3584: Coexistence between Version 1, Version 2,
Packit 8fb591
             and Version 3 of the Internet-standard
Packit 8fb591
             Network Management Framework.
Packit 8fb591
             SNMP-COMMUNITY-MIB.snmpCommunityContextEngineID";
Packit 8fb591
      }
Packit 8fb591
      leaf context {
Packit 8fb591
        type snmp:context-name;
Packit 8fb591
        default "";
Packit 8fb591
        description
Packit 8fb591
          "The context in which management information is accessed
Packit 8fb591
           when using the community string specified by this entry.";
Packit 8fb591
        reference
Packit 8fb591
          "RFC 3584: Coexistence between Version 1, Version 2,
Packit 8fb591
             and Version 3 of the Internet-standard
Packit 8fb591
             Network Management Framework.
Packit 8fb591
             SNMP-COMMUNITY-MIB.snmpCommunityContextName";
Packit 8fb591
      }
Packit 8fb591
      leaf target-tag {
Packit 8fb591
        type snmp:tag-value;
Packit 8fb591
        description
Packit 8fb591
          "Used to limit access for this community to the specified
Packit 8fb591
           targets.
Packit 8fb591
Packit 8fb591
           Implementations MAY restrict the values of this leaf
Packit 8fb591
           to be one of the available values of /snmp/target/tag in
Packit 8fb591
           a valid configuration.";
Packit 8fb591
        reference
Packit 8fb591
          "RFC 3584: Coexistence between Version 1, Version 2,
Packit 8fb591
             and Version 3 of the Internet-standard
Packit 8fb591
             Network Management Framework.
Packit 8fb591
             SNMP-COMMUNITY-MIB.snmpCommunityTransportTag";
Packit 8fb591
      }
Packit 8fb591
    }
Packit 8fb591
  }
Packit 8fb591
Packit 8fb591
  grouping v1-target-params {
Packit 8fb591
    container v1 {
Packit 8fb591
      description
Packit 8fb591
        "SNMPv1 parameters type.
Packit 8fb591
         Represents snmpTargetParamsMPModel '0',
Packit 8fb591
         snmpTargetParamsSecurityModel '1', and
Packit 8fb591
         snmpTargetParamsSecurityLevel 'noAuthNoPriv'.";
Packit 8fb591
      leaf security-name {
Packit 8fb591
        type snmp:security-name;
Packit 8fb591
        mandatory true;
Packit 8fb591
        description
Packit 8fb591
          "Implementations MAY restrict the values of this leaf
Packit 8fb591
           to be one of the available values of
Packit 8fb591
           /snmp/community/security-name in a valid configuration.";
Packit 8fb591
        reference
Packit 8fb591
          "RFC 3413: Simple Network Management Protocol (SNMP).
Packit 8fb591
             Applications.
Packit 8fb591
             SNMP-TARGET-MIB.snmpTargetParamsSecurityName";
Packit 8fb591
      }
Packit 8fb591
    }
Packit 8fb591
  }
Packit 8fb591
Packit 8fb591
  grouping v2c-target-params {
Packit 8fb591
    container v2c {
Packit 8fb591
      description
Packit 8fb591
        "SNMPv2 community parameters type.
Packit 8fb591
         Represents snmpTargetParamsMPModel '1',
Packit 8fb591
         snmpTargetParamsSecurityModel '2', and
Packit 8fb591
         snmpTargetParamsSecurityLevel 'noAuthNoPriv'.";
Packit 8fb591
      leaf security-name {
Packit 8fb591
        type snmp:security-name;
Packit 8fb591
        mandatory true;
Packit 8fb591
        description
Packit 8fb591
          "Implementations MAY restrict the values of this leaf
Packit 8fb591
           to be one of the available values of
Packit 8fb591
           /snmp/community/security-name in a valid configuration.";
Packit 8fb591
        reference
Packit 8fb591
          "RFC 3413: Simple Network Management Protocol (SNMP).
Packit 8fb591
             Applications.
Packit 8fb591
             SNMP-TARGET-MIB.snmpTargetParamsSecurityName";
Packit 8fb591
      }
Packit 8fb591
    }
Packit 8fb591
  }
Packit 8fb591
Packit 8fb591
  augment /snmp:snmp/snmp:target-params/snmp:params {
Packit 8fb591
    case v1 {
Packit 8fb591
      uses v1-target-params;
Packit 8fb591
    }
Packit 8fb591
    case v2c {
Packit 8fb591
      uses v2c-target-params;
Packit 8fb591
    }
Packit 8fb591
  }
Packit 8fb591
Packit 8fb591
  augment /snmp:snmp/snmp:target {
Packit 8fb591
    leaf mms {
Packit 8fb591
      type union {
Packit 8fb591
        type enumeration {
Packit 8fb591
          enum "unknown" { value 0; }
Packit 8fb591
        }
Packit 8fb591
        type int32 {
Packit 8fb591
          range "484..max";
Packit 8fb591
        }
Packit 8fb591
      }
Packit 8fb591
      default "484";
Packit 8fb591
      description
Packit 8fb591
        "The maximum message size.";
Packit 8fb591
      reference
Packit 8fb591
        "RFC 3584: Coexistence between Version 1, Version 2,
Packit 8fb591
           and Version 3 of the Internet-standard
Packit 8fb591
           Network Management Framework.
Packit 8fb591
           SNMP-COMMUNITY-MIB.snmpTargetAddrMMS";
Packit 8fb591
    }
Packit 8fb591
  }
Packit 8fb591
Packit 8fb591
}