forked from tsaad-dev/te
-
Notifications
You must be signed in to change notification settings - Fork 0
/
ietf-mpls-static.yang
182 lines (159 loc) · 5.13 KB
/
ietf-mpls-static.yang
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
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 "RFC8294: Common YANG Data Types for the Routing Area";
}
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";
}
organization "IETF MPLS Working Group";
contact
"WG Web: <http://tools.ietf.org/wg/mpls/>
WG List: <mailto:[email protected]>
Editor: Tarek Saad
<mailto:[email protected]>
Editor: Rakesh Gandhi
<mailto:[email protected]>
Editor: Xufeng Liu
<mailto: [email protected]>
Editor: Vishnu Pavan Beeram
<mailto:[email protected]>
Editor: Igor Bryskin
<mailto: [email protected]>";
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 "2019-09-12" {
description
"Latest revision of MPLS Static LSP YANG module";
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";
}
}
}
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;
}
}
}
}