forked from tsaad-dev/te
-
Notifications
You must be signed in to change notification settings - Fork 0
/
ietf-sr-topology.yang
341 lines (315 loc) · 9.74 KB
/
ietf-sr-topology.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
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
module ietf-sr-topology {
yang-version 1.1;
namespace "urn:ietf:params:xml:ns:yang:ietf-sr-topology";
prefix "srt";
import ietf-network {
prefix "nw";
reference "RFC 8345: A YANG Data Model for Network Topologies";
}
import ietf-network-topology {
prefix "nt";
reference "RFC 8345: A YANG Data Model for Network Topologies";
}
import ietf-l3-unicast-topology {
prefix "l3t";
reference "RFC 8346: A YANG Data Model for Layer 3 Topologies";
}
import ietf-segment-routing-common {
prefix "sr-cmn";
reference
"I-D.ietf-spring-sr-yang: YANG Data Model for Segment Routing";
}
organization
"IETF Traffic Engineering Architecture and Signaling (TEAS)
Working Group";
contact
"WG Web: <http://tools.ietf.org/wg/teas/>
WG List: <mailto:[email protected]>
Editor: Xufeng Liu
<mailto:[email protected]>
Editor: Igor Bryskin
<mailto:[email protected]>
Editor: Vishnu Pavan Beeram
<mailto:[email protected]>
Editor: Tarek Saad
<mailto:[email protected]>
Editor: Himanshu Shah
<mailto:[email protected]>
Editor: Stephane Litkowski
<mailto:[email protected]>";
description
"YANG data model for representing and manipulating Segment
Routing Topologies.
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
(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 2018-10-03 {
description "Initial revision";
reference
"RFC XXXX: YANG Data Model for SR and SR TE Topologies";
}
feature msd {
description
"Support of signaling MSD (Maximum SID Depth) in IGP.";
}
grouping sr-topology-type {
description
"Identifies the SR-MPLS topology type. This type of network
toplogies use Segment Routing (SR) technology over the MPLS
data plane";
container sr-mpls {
presence "Indiates SR-MPLS topology";
description
"Its presence identifies the SR topology type.";
}
}
augment "/nw:networks/nw:network/nw:network-types/"
+ "l3t:l3-unicast-topology" {
description
"Defines the SR topology type.";
uses sr-topology-type;
}
augment "/nw:networks/nw:network/l3t:l3-topology-attributes" {
when "../nw:network-types/l3t:l3-unicast-topology/srt:sr-mpls" {
description "Augment only for SR topology.";
}
description "Augment topology configuration";
uses sr-topology-attributes;
}
augment "/nw:networks/nw:network/nw:node/l3t:l3-node-attributes" {
when "../../nw:network-types/l3t:l3-unicast-topology/"
+ "srt:sr-mpls" {
description "Augment only for SR topology.";
}
description "Augment node configuration.";
uses sr-node-attributes;
}
augment "/nw:networks/nw:network/nw:node/l3t:l3-node-attributes"
+ "/l3t:prefix" {
when "../../../nw:network-types/l3t:l3-unicast-topology/"
+ "srt:sr-mpls" {
description "Augment only for SR topology.";
}
description "Augment node prefix.";
uses sr-node-prefix-attributes;
}
augment "/nw:networks/nw:network/nt:link/l3t:l3-link-attributes" {
when "../../nw:network-types/l3t:l3-unicast-topology/"
+ "srt:sr-mpls" {
description "Augment only for SR topology.";
}
description "Augment link configuration";
uses sr-link-attributes;
}
grouping sr-topology-attributes {
description "SR topology scope attributes.";
container sr {
description
"Containing SR attributes.";
uses sr-cmn:srgb-cfg;
} // sr
} // sr-topology-attributes
grouping information-source-attributes {
description
"The attributes identifying source that has provided the
related information, and the source credibility.";
leaf information-source {
type enumeration {
enum "unknown" {
description "The source is unknown.";
}
enum "locally-configured" {
description "Configured entity.";
}
enum "ospfv2" {
description "OSPFv2.";
}
enum "ospfv3" {
description "OSPFv3.";
}
enum "isis" {
description "ISIS.";
}
enum "system-processed" {
description "System processed entity.";
}
enum "other" {
description "Other source.";
}
}
config false;
description
"Indicates the source of the information.";
}
container information-source-state {
config false;
description
"The container contains state attributes related to
the information source.";
leaf credibility-preference {
type uint16;
description
"The preference value to calculate the traffic
engineering database credibility value used for
tie-break selection between different
information-source values.
Higher value is more preferable.";
}
}
} // information-source-attributes
grouping sr-node-attributes {
description "SR node scope attributes.";
container sr {
description
"Containing SR attributes.";
uses sr-cmn:srgb-cfg;
uses sr-cmn:srlb-cfg;
uses sr-cmn:node-capabilities;
leaf msd {
if-feature "msd";
type uint8;
description
"Node MSD is the lowest MSD supported by the node.";
}
// Operational state data
uses information-source-attributes;
} // sr
} // sr-node-attributes
grouping sr-node-prefix-attributes {
description "Containing SR attributes for a prefix.";
container sr {
presence "Presence indicates SR is enabled.";
description
"Containing SR attributes for a prefix.";
uses sr-cmn:prefix-sid-attributes;
uses sr-cmn:last-hop-behavior;
leaf is-local {
type boolean;
default false;
description
"'true' if the SID is local.";
}
leaf is-node {
type boolean;
default false;
description
"'true' if the Prefix-SID refers to the router identified
by the prefix. Typically, the leaf 'is-node' (N-Flag)
is set on Prefix-SIDs attached to a router loopback
address.";
}
leaf is-readvertisment {
type boolean;
config false;
description
"'true' if the prefix to which this Prefix-SID is attached,
has been propagated by the router from another
topology by redistribution.";
}
} // sr
} // sr-node-prefix-attributes
grouping sr-link-attributes {
description "SR link scope attributes";
container sr {
presence "Presence indicates SR is enabled.";
description
"Containing SR attributes.";
uses sr-cmn:sid-value-type;
leaf sid {
type uint32;
mandatory true;
description
"Adjacency SID, which can be either IGP-Adjacency SID
or BGP PeerAdj SID, depending on the context.";
}
leaf advertise-protection {
type enumeration {
enum "single" {
description
"A single Adj-SID is associated
with the adjacency and reflects
the protection configuration.";
}
enum "dual" {
description
"Two Adj-SIDs will be associated
with the adjacency if interface
is protected. In this case
one will be enforced with
backup flag set, the other
will be enforced to backup flag unset.
In case, protection is not configured,
a single Adj-SID will be advertised
with backup flag unset.";
}
}
default "single";
description
"If set, the Adj-SID refers to an
adjacency being protected.";
}
leaf is-local {
type boolean;
default false;
description
"'true' if the SID is local.";
}
leaf msd {
if-feature "msd";
type uint8;
description
"SID depth of the interface associated with the link.";
}
leaf address-family {
type enumeration {
enum "ipv4" {
description
"The Adj-SID refers to an adjacency with outgoing IPv4
encapsulation.";
}
enum "ipv6" {
description
"The Adj-SID refers to an adjacency with outgoing IPv6
encapsulation.";
}
}
default "ipv4";
description
"This leaf defines the F-Flag (Address-Family flag) of the
SID.";
}
leaf is-backup {
type boolean;
default false;
description
"'true' if the SID is a backup.";
}
leaf is-part-of-set {
type boolean;
default false;
description
"'true' if the SID is part of a set.";
}
leaf is-persistent {
type boolean;
default true;
description
"'true' if the SID is persistently allocated.";
}
leaf is-on-lan {
type boolean;
default false;
description
"'true' if on a lan.";
}
uses information-source-attributes;
} // sr
} // sr-tp-attributes
}