-
Notifications
You must be signed in to change notification settings - Fork 0
/
ietf-pcep-srv6.yang
184 lines (165 loc) · 4.18 KB
/
ietf-pcep-srv6.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
module ietf-pcep-srv6 {
yang-version 1.1;
namespace "urn:ietf:params:xml:ns:yang:ietf-pcep-srv6";
prefix pcep-srv6;
import ietf-srv6-types {
prefix srv6-types;
reference
"I-D.raza-spring-srv6-yang: YANG Data Model for SRv6
Base and Static";
}
import ietf-te-types {
prefix te-types;
reference
"RFC 8776: Common YANG Data Types for Traffic Engineering";
}
import ietf-pcep {
prefix pcep;
reference
"I-D.ietf-pce-pcep-yang: A YANG Data Model for Path
Computation Element Communications Protocol (PCEP)";
}
organization
"IETF PCE (Path Computation Element) Working Group";
contact
"WG Web: <http://tools.ietf.org/wg/pce/>
WG List: <mailto:pce@ietf.org>
Editor: Cheng Li
<mailto:c.l@huawei.com>";
description
"The YANG module augments the PCEP YANG operational
model with SRv6.
Copyright (c) 2020 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.";
revision 2020-07-08 {
description
"Initial revision.";
reference
"RFC XXXX: A YANG Data Model for Path Computation
Element Communications Protocol
(PCEP) - Segement Routing in IPv6
(SRv6)";
}
/* Features */
feature srv6 {
description
"Support Segment Routing in IPv6 (SRv6) for PCE.";
reference
"I-D.ietf-pce-segment-routing-ipv6: PCEP Extensions
for Segment Routing leveraging the IPv6 data plane";
}
/* Identity */
identity path-setup-srv6 {
if-feature "srv6";
base te-types:path-signaling-type;
description
"SRv6 path setup type";
}
/* Groupings */
grouping srv6-msd {
description
"SRv6 MSD";
leaf msd-type {
type uint8;
description
"SRv6 Maximum Segment Depth (MSD) Type";
}
leaf msd-value {
type uint8;
description
"SRv6 MSD value for the type";
}
}
grouping srv6 {
description
"SRv6";
container srv6 {
if-feature "srv6";
description
"If SRv6 is supported";
leaf enabled {
type boolean;
description
"Enabled or Disabled";
}
leaf msd-limit {
type boolean;
default "false";
description
"True indicates no limit on MSD, the
list srv6-msd is ignored";
}
list srv6-msd {
key "msd-type";
description
"list of SRv6 MSD";
uses srv6-msd;
}
}
}
grouping segment-list {
description
"Segment list grouping";
container segment-list {
description
"Segments for given segment list";
list segment {
key "index";
description
"Configure Segment/hop at the index";
uses segment-properties;
}
}
}
grouping segment-properties {
description
"Segment properties grouping";
leaf index {
type uint32;
description
"Segment index";
}
leaf sid-value {
type srv6-types:srv6-sid;
description
"SRv6 SID value";
}
}
/*
* Augment modules to add SRv6
*/
augment "/pcep:pcep/pcep:entity/pcep:capability" {
description
"Augmenting SRv6";
uses srv6;
}
augment
"/pcep:pcep/pcep:entity/pcep:peers/pcep:peer/pcep:capability" {
description
"Augmenting SRv6";
uses srv6;
}
augment "/pcep:pcep/pcep:entity/pcep:lsp-db/pcep:lsp" {
description
"Augmenting SRv6";
container srv6 {
when "/pcep:pcep/pcep:entity/pcep:lsp-db/pcep:lsp/pcep:pst
= 'path-setup-srv6'" {
description
"For SRv6 path";
}
if-feature "srv6";
uses segment-list;
description
"SRv6";
}
}
}