netconfcentral logo

ietf-if-ext-ppp@2016-11-24



  module ietf-if-ext-ppp {

    yang-version 1;

    namespace
      "urn:ietf:params:xml:ns:yang:ietf-if-ext-ppp";

    prefix ppp;

    import ietf-interfaces {
      prefix if;
    }
    import iana-crypt-hash {
      prefix ianach;
    }

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

    contact
      "Editor:   Hansance Han
                  <mailto:hansance.han@ericsson.com>
        Editor:   Xianghua Gu
                  <mailto:xianghua.gu@ericsson.com>
        Editor:   Hua Lv
                  <mailto:hua.lv@ericsson.com>
        Editor:   James Zhang
                  <mailto:james.q.zhang@ericsson.com>";

    description
      "This module contains a collection of YANG definitions
for managing ppp network interfaces.";

    revision "2016-11-24" {
      description "Latest revision.";
      reference
        "RFC 7223: A YANG Data Model for Interface Management";

    }


    feature ppp-authentication {
      description
        "Indicates that the interface supports configuration of
           ppp authentication.";
    }

    augment /if:interfaces/if:interface {
      when "if:type = 'ppp'";
      description
        "PPP link protocol is extension under interface.";
      container ppp {
        description
          "A ppp interface must specify the global parameters.";
        leaf enabled {
          type boolean;
          default "true";
          description
            "This leaf contains the configured, desired state of the
              ppp link-protocol.";
        }

        container authentication {
          if-feature ppp-authentication;
          presence "";
          description
            "The authentication configuration subtree.";
          choice authentication-mode {
            mandatory true;
            description
              "The authentication sub-mode pap and chap.";
            leaf pap {
              type empty;
              description
                "Authentication pap for PPP.";
            }
            leaf chap {
              type empty;
              description
                "Authentication pap for PPP.";
            }
          }  // choice authentication-mode

          leaf user {
            type string;
            description
              "the user name string identifying ppp";
          }

          container password {
            presence "";
            description
              "The password configuraiton sub-tree.";
            choice chap-mode {
              mandatory true;
              description
                "The chap mode configuration for cipher and simple.";
              leaf cipher {
                type ianach:crypt-hash;
                description
                  "The password for cipher type.";
              }
              leaf simple {
                type ianach:crypt-hash;
                description
                  "The password for simple type.";
              }
            }  // choice chap-mode
          }  // container password
        }  // container authentication
      }  // container ppp
    }
  }  // module ietf-if-ext-ppp