netconfcentral logo

ietf-bfd-lag@2017-10-30



  module ietf-bfd-lag {

    yang-version 1;

    namespace
      "urn:ietf:params:xml:ns:yang:ietf-bfd-lag";

    prefix bfd-lag;

    import ietf-bfd-types {
      prefix bfd-types;
    }
    import ietf-bfd {
      prefix bfd;
    }
    import ietf-interfaces {
      prefix if;
    }
    import ietf-inet-types {
      prefix inet;
    }
    import ietf-routing {
      prefix rt;
    }

    organization "IETF BFD Working Group";

    contact
      "WG Web:   <http://tools.ietf.org/wg/bfd>
     WG List:  <rtg-bfd@ietf.org>

     Editors:  Reshad Rahman (rrahman@cisco.com),
               Lianshu Zheng vero.zheng@huawei.com),
               Mahesh Jethanandani (mjethanandani@gmail.com)";

    description
      "This module contains the YANG definition for BFD over LAG
     interfaces as per RFC7130.

     Copyright (c) 2017 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 XXXX; see
     the RFC itself for full legal notices.";

    revision "2017-10-30" {
      description "Initial revision.";
      reference
        "RFC XXXX: A YANG data model for BFD over LAG";

    }


    augment /rt:routing/rt:control-plane-protocols/rt:control-plane-protocol/bfd:bfd {
      description "BFD augmentation for LAG";
      container lag {
        description
          "BFD over LAG top level container";
        container micro-bfd-ipv4-session-statistics {
          description
            "Micro-BFD IPv4 session counters";
          uses bfd-types:session-statistics;
        }  // container micro-bfd-ipv4-session-statistics

        container micro-bfd-ipv6-session-statistics {
          description
            "Micro-BFD IPv6 session counters";
          uses bfd-types:session-statistics;
        }  // container micro-bfd-ipv6-session-statistics

        list sessions {
          key "lag-name";
          description
            "A LAG interface on which BFD is running";
          leaf lag-name {
            type if:interface-ref;
            description "Name of the LAG";
          }

          leaf ipv4-dest-addr {
            type inet:ipv4-address;
            description
              "IPv4 address of the peer, for IPv4 micro-BFD.";
          }

          leaf ipv6-dest-addr {
            type inet:ipv6-address;
            description
              "IPv6 address of the peer, for IPv6 micro-BFD.";
          }

          uses bfd-types:common-cfg-parms;

          leaf use-ipv4 {
            type boolean;
            description
              "Using IPv4 micro-BFD.";
          }

          leaf use-ipv6 {
            type boolean;
            description
              "Using IPv6 micro-BFD.";
          }

          list member-links {
            key "member-link";
            config false;
            description
              "Micro-BFD over LAG. This represents one member link";
            leaf member-link {
              type if:interface-ref;
              description
                "Member link on which micro-BFD is running";
            }

            container micro-bfd-ipv4 {
              when "../../use-ipv4 = 'true'" {
                description
                  "Needed only if IPv4 is used.";
              }
              description
                "Micro-BFD IPv4 session state on member link";
              uses bfd-types:all-session;
            }  // container micro-bfd-ipv4

            container micro-bfd-ipv6 {
              when "../../use-ipv6 = 'true'" {
                description
                  "Needed only if IPv6 is used.";
              }
              description
                "Micro-BFD IPv6 session state on member link";
              uses bfd-types:all-session;
            }  // container micro-bfd-ipv6
          }  // list member-links
        }  // list sessions
      }  // container lag
    }

    notification lag-notification {
      description
        "Notification for BFD over LAG session state change. "
          + "An implementation may rate-limit notifications, e.g. when a"
          + "session is continuously changing state.";
      uses bfd-types:notification-parms;

      leaf lag-name {
        type if:interface-ref;
        description "LAG interface name";
      }

      leaf member-link {
        type if:interface-ref;
        description
          "Member link on which BFD is running";
      }
    }  // notification lag-notification
  }  // module ietf-bfd-lag