-
Notifications
You must be signed in to change notification settings - Fork 2
315 lines (303 loc) · 10.7 KB
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
module ietf-kea-dhcpv6 {
namespace "urn:ietf:params:xml:ns:yang:ietf-kea-dhcpv6";
prefix "dhcpv6";
import ietf-inet-types {
prefix inet;
revision-date "2013-07-15";
}
import ietf-yang-types {
prefix yang;
revision-date "2013-07-15";
}
organization "ISC, DT, Sysrepo, Tsinghua";
contact "[email protected]";
description "This model defines a YANG data model that can be
used to configure and manage Kea DHCPv6 server.";
revision 2016-07-16 {
description "version00: the minimum mapping between Kea
configuration and dhcpv6 YANG model.";
reference "sysrepo.org";
}
/*
* Typedef
*/
typedef duidtype {
type union {
type uint16;
type string {
pattern '(([0-9a-fA-F]{2}){2,128})';
}
}
description "the type defined for duid";
}
/*
* Data Nodes
*/
container server {
description "Kea dhcpv6 server configuration";
container serv-attributes {
description "gloabl attributes";
leaf name {
type string;
description "server's name";
}
leaf duid {
type duidtype;
description "DHCP Unique Identifer";
}
leaf enable {
type boolean;
description "whether to enable the server";
}
container lease-database {
leaf type {
type string;
description "defines database type. Supported
values are: memfile, mysql, pgsql,
cassandra";
}
description "Defines database connection";
}
container control-socket {
leaf socket-type {
type string;
/* @todo: change this to enum */
description "Type of control socket used
to send commands to Kea";
}
leaf socket-name {
type string;
description "Specifies location of the
unix socket Kea uses to receive commands";
}
description "Defines control API socket";
}
container interfaces-config {
description "A leaf list to denote which one or
more interfaces the server should listen on. The
default value is to listen on all the interfaces.
This node is also used to set a unicast address
for the server to listen with a specific interface.
For example, if people want the server to listen
on a unicast address with a specific interface, he
can use the format like 'eth1/2001:db8::1'.";
leaf-list interfaces {
type string;
description "the specific interfaces";
}
}
leaf description {
type string;
description "description of the server";
}
leaf stateless-service {
type boolean;
description "A boolean value specifies whether
the server support client-server exchanges
involving two messages defined in ([RFC3315]).";
}
leaf renew-timer {
type yang:timeticks;
description "renew time in seconds";
}
leaf rebind-timer {
type yang:timeticks;
description "rebind time in seconds";
}
leaf preferred-lifetime {
type yang:timeticks;
description "preferred lifetime IA in seconds";
}
leaf valid-lifetime {
type yang:timeticks;
description "valid liftime for IA";
}
}
container custom-options {
description "container for defining custom
DHCPv6 options";
list custon-option{
key option-code;
description "container for defining custom
DHCPv6 options";
leaf option-code {
type uint16;
description "option code for custom option";
}
leaf option-name {
type string;
description "option name for custom option";
}
leaf option-type {
type string;
description "option type for custom option";
}
}
}
container option-sets {
description "option sets configruation";
list option-set {
key option-set-id;
description "a specific option set";
leaf option-set-id {
type uint8;
description "identifier for specific option
set";
}
leaf description{
type string;
description "description for the option set";
}
list standard-option {
key option-code;
description "standard format for DHCPv6
option";
leaf option-code {
type uint16;
description "option code for standard option";
}
leaf option-name {
type string;
description "option name for standard option";
}
leaf option-value {
type string;
description "option data for standard option";
}
leaf csv-format {
type boolean;
description "whether csv-format is employed";
}
}
}
}
container network-ranges {
description "gloabl level for DHCPv6 server";
leaf option-set-id {
type uint8;
description "selected option set for global level";
}
leaf rapid-commit {
type boolean;
description "whether rapid commit is enabled
gloablly";
}
list subnet6 {
key subnet;
description "A subnet of DHCPv6 server";
leaf network-range-id {
type uint8;
description "subnet id";
}
leaf network-description {
type string;
description "description for the subnet";
}
leaf subnet {
type inet:ipv6-prefix;
description "the subnet prefix";
}
leaf option-set-id {
type uint8;
description "selected option set for this
subnet";
}
leaf rapid-commit {
type boolean;
description "whether rapid commit is enabled
for this subnet";
}
leaf interface {
type string;
description "IPv6 subnet selction";
}
leaf interface-id {
type string;
description "content of the interface-id
option used by relays";
}
leaf relay-address {
type inet:ipv6-address;
description "specify which relay will be
used";
}
container pools {
description "address pools for this subnet";
list address-pool {
key pool-id;
description "a specific address pool";
leaf pool-id {
type uint8;
description "address pool
indentifier";
}
leaf pool-prefix {
type inet:ipv6-prefix;
description "the pool prefix";
}
leaf start-address {
type inet:ipv6-address;
description "start address";
}
leaf end-address {
type inet:ipv6-address;
description "end address";
}
}
}
container prefix-pools {
description "prefix pools for this subnet";
list prefix-pool {
key pool-id;
description "a specific prefix pool";
leaf pool-id {
type uint8;
description "prefix pool
indentifier";
}
leaf pool-prefix {
type inet:ipv6-prefix;
description "available prefix";
}
}
}
list reserved-host {
key cli-id;
description "host reservation";
leaf cli-id {
type uint32;
description "a cli-id is corresponding
to a specific host (DUID)";
}
leaf duid {
type duidtype;
description "host's DUID";
}
leaf hardware-addr {
type yang:mac-address;
description "host's mac address";
}
leaf-list reserv-addr {
type inet:ipv6-address;
description "reserved IPv6 addresses";
}
}
}
}
container rsoo-enabled-options {
description "rsoo enabled options";
list rsoo-enabled-option{
key option-code;
description "rsoo enabled option";
leaf option-code {
type uint16;
description "option code";
}
leaf description {
type string;
description "description of the option";
}
}
}
}
}