module ietf-mpls-static {
yang-version 1.1;
namespace "urn:ietf:params:xml:ns:yang:ietf-mpls-static";
prefix "mpls-static";
import ietf-mpls {
prefix "mpls";
reference "draft-ietf-mpls-base-yang: MPLS Base YANG Data Model";
}
import ietf-routing {
prefix "rt";
reference "RFC8349: A YANG Data Model for Routing Management";
}
import ietf-routing-types {
prefix "rt-types";
reference "RFC6991: Common YANG Data Types";
}
import ietf-inet-types {
prefix inet;
reference "RFC6991: Common YANG Data Types";
}
import ietf-interfaces {
prefix "if";
reference "RFC7223: A YANG Data Model for Interface Management";
}
/* Import TE Tunnel */
import ietf-te {
prefix te;
reference "draft-ietf-teas-yang-te: A YANG Data Model for Traffic
Engineering Tunnels and Interfaces";
}
organization "IETF MPLS Working Group";
contact
"WG Web:
WG List:
WG Chair: Loa Andersson
WG Chair: Nic Leymann
Editor: Tarek Saad
Editor: Kamran Raza
Editor: Rakesh Gandhi
Editor: Xufeng Liu
Editor: Vishnu Pavan Beeram
Editor: Himanshu Shah
Editor: Igor Bryskin
";
description
"This YANG module augments the 'ietf-routing' module with basic
configuration and operational state data for MPLS static
The model fully conforms to the Network Management Datastore
Architecture (NMDA).
Copyright (c) 2018 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
(https://trustee.ietf.org/license-info).
This version of this YANG module is part of RFC XXXX; see
the RFC itself for full legal notices.";
// RFC Ed.: replace XXXX with actual RFC number and remove this
// note.
// RFC Ed.: update the date below with the date of RFC publication
// and remove this note.
revision "2018-11-04" {
description
"Latest revision:
- Addressed MPLS-RT review comments";
reference "RFC XXXX: A YANG Data Model for MPLS Static LSPs";
}
typedef static-lsp-ref {
type leafref {
path "/rt:routing/mpls:mpls/mpls-static:static-lsps/" +
"mpls-static:static-lsp/mpls-static:name";
}
description
"This type is used by data models that need to reference
configured static LSP.";
}
grouping in-segment {
description "In-segment grouping";
container in-segment {
description "MPLS incoming segment";
container fec {
description "Forwarding Equivalence Class grouping";
choice type {
description "FEC type choices";
case ip-prefix {
leaf ip-prefix {
type inet:ip-prefix;
description "An IP prefix";
}
}
case mpls-label {
leaf incoming-label {
type rt-types:mpls-label;
description "label value on the incoming packet";
}
}
case tunnel {
leaf tunnel {
type te:tunnel-ref;
description "TE tunnel FEC mapping";
}
}
}
leaf incoming-interface {
type if:interface-ref;
description
"Optional incoming interface if FEC is restricted
to traffic incoming on a specific interface";
}
}
}
}
grouping out-segment {
description "Out-segment grouping";
container out-segment {
description "MPLS outgoing segment";
choice out-segment {
description "The MPLS out-segment type choice";
case nhlfe-single {
container nhlfe-single {
description "Container for single NHLFE entry";
uses mpls:nhlfe-single-contents;
leaf outgoing-interface {
type if:interface-ref;
description
"The outgoing interface";
}
}
}
case nhlfe-multiple {
container nhlfe-multiple {
description "Container for multiple NHLFE entries";
list nhlfe {
key index;
description "MPLS NHLFE entry";
uses mpls:nhlfe-multiple-contents;
leaf outgoing-interface {
type if:interface-ref;
description
"The outgoing interface";
}
}
}
}
}
}
}
augment "/rt:routing/mpls:mpls" {
description "Augmentations for MPLS Static LSPs";
container static-lsps {
description
"Statically configured LSPs, without dynamic signaling";
list static-lsp {
key name;
description "list of defined static LSPs";
leaf name {
type string;
description "name to identify the LSP";
}
leaf operation {
type mpls:mpls-operations-type;
description
"The MPLS operation to be executed on the incoming packet";
}
uses in-segment;
uses out-segment;
}
}
}
}