submodule ietf-snmp-proxy {

  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>

     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 proxies.

     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 proxy {
    description
      "A server implements this feature if it can act as an
      SNMP proxy.";
    reference
      "RFC 3413: Simple Network Management Protocol (SNMP)
         Applications";
  }

  augment /snmp:snmp {
    if-feature snmp:proxy;

    list proxy {
      key name;

      description
        "List of proxy parameters.";
      reference
        "RFC 3413: Simple Network Management Protocol (SNMP).
           Applications.
           SNMP-PROXY-MIB.snmpProxyTable";

      leaf name {
        type snmp:identifier;
        description
          "Identifies the proxy parameter entry.";
        reference
          "RFC 3413: Simple Network Management Protocol (SNMP).
             Applications.
             SNMP-PROXY-MIB.snmpProxyName";
      }
      leaf type {
        type enumeration {
          enum read { value 1; }
          enum write { value 2; }
          enum trap { value 3; }
          enum inform { value 4; }
        }
        mandatory true;
        reference
          "RFC 3413: Simple Network Management Protocol (SNMP).
             Applications.
             SNMP-PROXY-MIB.snmpProxyType";
      }
      leaf context-engine-id {
        type snmp:engine-id;
        mandatory true;
        reference
          "RFC 3413: Simple Network Management Protocol (SNMP).
             Applications.
             SNMP-PROXY-MIB.snmpProxyContextEngineID";
      }
      leaf context-name {
        type snmp:context-name;
        reference
          "RFC 3413: Simple Network Management Protocol (SNMP).
             Applications.
             SNMP-PROXY-MIB.snmpProxyContextName";
      }
      leaf target-params-in {
        type snmp:identifier;
        description
          "The name of a target parameters list entry.

           Implementations MAY restrict the values of this
           leaf to be one of the available values of
           /snmp/target-params/name in a valid configuration.";
        reference
          "RFC 3413: Simple Network Management Protocol (SNMP).
             Applications.
             SNMP-PROXY-MIB.snmpProxyTargetParamsIn";
      }
      leaf single-target-out {
        when "../type = 'read' or ../type = 'write'";
        type snmp:identifier;
        description
          "Implementations MAY restrict the values of this leaf
           to be one of the available values of /snmp/target/name in
           a valid configuration.";
        reference
          "RFC 3413: Simple Network Management Protocol (SNMP).
             Applications.
             SNMP-PROXY-MIB.snmpProxySingleTargetOut";
      }

      leaf multiple-target-out {
        when "../type = 'trap' or ../type = 'inform'";
        type snmp:tag-value;
        description
          "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-PROXY-MIB.snmpProxyMultipleTargetOut";
      }
    }
  }
}
