ietf-mpls-ldp

This YANG module defines the essential components for the management of Multiprotocol Label Switching (MPLS) Label Distribution ...

  • Version: 2022-03-14

    ietf-mpls-ldp@2022-03-14


    
      module ietf-mpls-ldp {
    
        yang-version 1.1;
    
        namespace
          "urn:ietf:params:xml:ns:yang:ietf-mpls-ldp";
    
        prefix ldp;
    
        import ietf-inet-types {
          prefix inet;
          reference
            "RFC 6991: Common YANG Data Types";
    
    
        }
        import ietf-yang-types {
          prefix yang;
          reference
            "RFC 6991: Common YANG Data Types";
    
    
        }
        import ietf-routing {
          prefix rt;
          reference
            "RFC 8349: A YANG Data Model for Routing Management (NMDA
            version)";
    
    
        }
        import ietf-routing-types {
          prefix rt-types;
          reference
            "RFC 8294: Common YANG Data Types for the Routing Area";
    
    
        }
        import ietf-interfaces {
          prefix if;
          reference
            "RFC 8343: A YANG Data Model for Interface Management";
    
    
        }
        import ietf-ip {
          prefix ip;
          reference
            "RFC 8344: A YANG Data Model for IP Management";
    
    
        }
        import ietf-key-chain {
          prefix key-chain;
          reference
            "RFC 8177: YANG Data Model for Key Chains";
    
    
        }
    
        organization "IETF MPLS Working Group";
    
        contact
          "WG Web:   <https://datatracker.ietf.org/wg/mpls/>
    WG List:  <mailto:mpls@ietf.org>
    
    Editor:   Kamran Raza
    	  <mailto:skraza@cisco.com>
    
    Author:   Rajiv Asati
    	  <mailto:rajiva@cisco.com>
    
    Author:   Xufeng Liu
    	  <mailto:xufeng.liu.ietf@gmail.com>
    
    Author:   Santosh Easale
    	  <mailto:santosh_easale@berkeley.edu>
    
    Author:   Xia Chen
    	  <mailto:jescia.chenxia@huawei.com>
    
    Author:   Himanshu Shah
    	  <mailto:hshah@ciena.com>";
    
        description
          "This YANG module defines the essential components for the
    management of Multiprotocol Label Switching (MPLS) Label
    Distribution Protocol (LDP).  It is also the base model to
    be augmented for Multipoint LDP (mLDP).
    
    Copyright (c) 2022 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 Revised BSD License
    set forth in Section 4.c of the IETF Trust's Legal Provisions
    Relating to IETF Documents
    (https://trustee.ietf.org/license-info).
    
    This version of this YANG module is part of RFC 9070; see the
    RFC itself for full legal notices.";
    
        revision "2022-03-14" {
          description "Initial revision.";
          reference
            "RFC 9070: YANG Data Model for MPLS LDP";
    
        }
    
    
        typedef advertised-received {
          type enumeration {
            enum "advertised" {
              value 0;
              description
                "Advertised information.";
            }
            enum "received" {
              value 1;
              description
                "Received information.";
            }
          }
          description "Received or advertised.";
        }
    
        typedef downstream-upstream {
          type enumeration {
            enum "downstream" {
              value 0;
              description
                "Downstream information.";
            }
            enum "upstream" {
              value 1;
              description
                "Upstream information.";
            }
          }
          description "Downstream or upstream.";
        }
    
        typedef label-adv-mode {
          type enumeration {
            enum "downstream-unsolicited" {
              value 0;
              description
                "Downstream Unsolicited.";
            }
            enum "downstream-on-demand" {
              value 1;
              description
                "Downstream on Demand.";
            }
          }
          description
            "Label Advertisement Mode.";
        }
    
        typedef oper-status-event-type {
          type enumeration {
            enum "up" {
              value 1;
              description
                "Operational status changed to up.";
            }
            enum "down" {
              value 2;
              description
                "Operational status changed to down.";
            }
          }
          description
            "Operational status event type for notifications.";
        }
    
        identity mpls-ldp {
          base rt:control-plane-protocol;
          description "LDP protocol.";
          reference
            "RFC 5036: LDP Specification";
    
        }
    
        identity adjacency-flag-base {
          description
            "Base type for adjacency flags.";
        }
    
        identity adjacency-flag-active {
          base adjacency-flag-base;
          description
            "This adjacency is configured and actively created.";
        }
    
        identity adjacency-flag-passive {
          base adjacency-flag-base;
          description
            "This adjacency is not configured and passively accepted.";
        }
    
        rpc mpls-ldp-clear-peer {
          description
            "Clears the session to the peer.";
          input {
            leaf protocol-name {
              type leafref {
                path "/rt:routing/rt:control-plane-protocols/rt:control-plane-protocol/rt:name";
              }
              description
                "The name of the LDP protocol instance.";
            }
    
            leaf lsr-id {
              type leafref {
                path "/rt:routing/rt:control-plane-protocols/rt:control-plane-protocol[rt:name=current()/../protocol-name]/ldp:mpls-ldp/ldp:peers/ldp:peer/ldp:lsr-id";
              }
              description
                "The LSR Id of the peer, as a portion of the peer LDP ID.";
            }
    
            leaf label-space-id {
              type leafref {
                path "/rt:routing/rt:control-plane-protocols/rt:control-plane-protocol[rt:name=current()/../protocol-name]/ldp:mpls-ldp/ldp:peers/ldp:peer[ldp:lsr-id=current()/../lsr-id]/ldp:label-space-id";
              }
              description
                "The label space Id of the peer, as a portion of the peer
    LDP ID.";
            }
          }
        }  // rpc mpls-ldp-clear-peer
    
        rpc mpls-ldp-clear-hello-adjacency {
          description
            "Clears the Hello adjacency.";
          input {
            container hello-adjacency {
              description
                "Link adjacency or targeted adjacency.  If this is not
    provided, then all Hello adjacencies are cleared.";
              leaf protocol-name {
                type leafref {
                  path "/rt:routing/rt:control-plane-protocols/rt:control-plane-protocol/rt:name";
                }
                description
                  "The name of the LDP protocol instance.";
              }
    
              choice hello-adjacency-type {
                description "Adjacency type.";
                container targeted {
                  presence
                    "Present to clear targeted adjacencies.";
                  description
                    "Clear targeted adjacencies.";
                  leaf target-address {
                    type inet:ip-address;
                    description
                      "The target address.  If this is not provided, then
    all targeted adjacencies are cleared.";
                  }
                }  // container targeted
                container link {
                  presence
                    "Present to clear link adjacencies.";
                  description
                    "Clear link adjacencies.";
                  leaf next-hop-interface {
                    type leafref {
                      path "/rt:routing/rt:control-plane-protocols/rt:control-plane-protocol/mpls-ldp/discovery/interfaces/interface/name";
                    }
                    description
                      "Interface connecting to a next hop.  If this is
    not provided, then all link adjacencies are
    cleared.";
                  }
    
                  leaf next-hop-address {
                    type inet:ip-address;
                    must "../next-hop-interface" {
                      description
                        "Applicable when an interface is specified.";
                    }
                    description
                      "IP address of a next hop.  If this is not
    provided, then adjacencies to all next hops on the
    given interface are cleared.";
                  }
                }  // container link
              }  // choice hello-adjacency-type
            }  // container hello-adjacency
          }
        }  // rpc mpls-ldp-clear-hello-adjacency
    
        rpc mpls-ldp-clear-peer-statistics {
          description
            "Clears protocol statistics (e.g., sent and received
    counters).";
          input {
            leaf protocol-name {
              type leafref {
                path "/rt:routing/rt:control-plane-protocols/rt:control-plane-protocol/rt:name";
              }
              description
                "The name of the LDP protocol instance.";
            }
    
            leaf lsr-id {
              type leafref {
                path "/rt:routing/rt:control-plane-protocols/rt:control-plane-protocol[rt:name=current()/../protocol-name]/ldp:mpls-ldp/ldp:peers/ldp:peer/ldp:lsr-id";
              }
              description
                "The LSR Id of the peer, as a portion of the peer LDP ID.";
            }
    
            leaf label-space-id {
              type leafref {
                path "/rt:routing/rt:control-plane-protocols/rt:control-plane-protocol[rt:name=current()/../protocol-name]/ldp:mpls-ldp/ldp:peers/ldp:peer[ldp:lsr-id=current()/../lsr-id]/ldp:label-space-id";
              }
              description
                "The label space Id of the peer, as a portion of the peer
    LDP ID.";
            }
          }
        }  // rpc mpls-ldp-clear-peer-statistics
    
        notification mpls-ldp-peer-event {
          description
            "Notification event for a change of LDP peer operational
    status.";
          leaf event-type {
            type oper-status-event-type;
            description "Event type.";
          }
    
          container peer {
            description
              "Reference to an LDP peer, by the LDP ID, which consists of
    the LSR Id and the label space Id.";
            leaf protocol-name {
              type leafref {
                path "/rt:routing/rt:control-plane-protocols/rt:control-plane-protocol/rt:name";
              }
              description
                "The name of the LDP protocol instance.";
            }
    
            leaf lsr-id {
              type leafref {
                path "/rt:routing/rt:control-plane-protocols/rt:control-plane-protocol[rt:name=current()/../protocol-name]/ldp:mpls-ldp/ldp:peers/ldp:peer/ldp:lsr-id";
              }
              description
                "The LSR Id of the peer, as a portion of the peer LDP ID.";
            }
    
            leaf label-space-id {
              type leafref {
                path "/rt:routing/rt:control-plane-protocols/rt:control-plane-protocol[rt:name=current()/../protocol-name]/ldp:mpls-ldp/ldp:peers/ldp:peer[ldp:lsr-id=current()/../lsr-id]/ldp:label-space-id";
              }
              description
                "The label space Id of the peer, as a portion of the peer
    LDP ID.";
            }
          }  // container peer
        }  // notification mpls-ldp-peer-event
    
        notification mpls-ldp-hello-adjacency-event {
          description
            "Notification event for a change of LDP adjacency operational
    status.";
          leaf event-type {
            type oper-status-event-type;
            description "Event type.";
          }
    
          leaf protocol-name {
            type leafref {
              path "/rt:routing/rt:control-plane-protocols/rt:control-plane-protocol/rt:name";
            }
            description
              "The name of the LDP protocol instance.";
          }
    
          choice hello-adjacency-type {
            description
              "Interface or targeted adjacency.";
            container targeted {
              description
                "Targeted adjacency through LDP extended discovery.";
              leaf target-address {
                type inet:ip-address;
                description
                  "The target adjacent-address learned.";
              }
            }  // container targeted
            container link {
              description
                "Link adjacency through LDP basic discovery.";
              leaf next-hop-interface {
                type if:interface-ref;
                description
                  "The interface connecting to the adjacent next hop.";
              }
    
              leaf next-hop-address {
                type inet:ip-address;
                must "../next-hop-interface" {
                  description
                    "Applicable when an interface is specified.";
                }
                description
                  "IP address of the next hop. This can be IPv4 or IPv6
    address.";
              }
            }  // container link
          }  // choice hello-adjacency-type
        }  // notification mpls-ldp-hello-adjacency-event
    
        notification mpls-ldp-fec-event {
          description
            "Notification event for a change of FEC status.";
          leaf event-type {
            type oper-status-event-type;
            description "Event type.";
          }
    
          leaf protocol-name {
            type leafref {
              path "/rt:routing/rt:control-plane-protocols/rt:control-plane-protocol/rt:name";
            }
            description
              "The name of the LDP protocol instance.";
          }
    
          leaf fec {
            type inet:ip-prefix;
            description
              "The address prefix element of the FEC whose status
    has changed.";
          }
        }  // notification mpls-ldp-fec-event
      }  // module ietf-mpls-ldp
    

© 2023 YumaWorks, Inc. All rights reserved.