Peter K. Lee | 2bade4d | 2016-07-14 16:19:56 -0700 | [diff] [blame] | 1 | module xos-core { |
Peter K. Lee | 5539580 | 2016-07-15 18:25:40 -0700 | [diff] [blame] | 2 | namespace "urn:onlab:xos:core"; |
Peter K. Lee | 2bade4d | 2016-07-14 16:19:56 -0700 | [diff] [blame] | 3 | prefix xos; |
4 | yang-version 1.1; | ||||
5 | |||||
6 | organization | ||||
7 | "Open Networking Lab (XOS) / Corenova Technologies"; | ||||
8 | |||||
9 | contact | ||||
10 | "Larry Peterson <llp@onlab.us> | ||||
11 | Peter K. Lee <peter@corenova.com>"; | ||||
12 | |||||
Peter K. Lee | f4d38d3 | 2016-07-23 02:47:38 -0700 | [diff] [blame] | 13 | description |
14 | "This module contains a collection of core models for XOS. | ||||
15 | |||||
16 | Copyright (c) 2016 ON.LAB and the persons identified as authors of | ||||
17 | the code. All rights reserved. | ||||
18 | |||||
19 | Redistribution and use in source and binary forms, with or without | ||||
20 | modification, is permitted pursuant to, and subject to the license | ||||
21 | terms of the Apache License, Version 2.0 which accompanies this | ||||
22 | distribution, and is available at | ||||
23 | (http://www.apache.org/licenses/LICENSE-2.0)."; | ||||
24 | |||||
25 | revision 2016-07-14 { | ||||
26 | description "Initial revision."; | ||||
27 | } | ||||
28 | |||||
Peter K. Lee | 2bade4d | 2016-07-14 16:19:56 -0700 | [diff] [blame] | 29 | import ietf-yang-types { prefix yang; } |
Peter K. Lee | 5539580 | 2016-07-15 18:25:40 -0700 | [diff] [blame] | 30 | import ietf-inet-types { prefix inet; } |
Sapan Bhatia | d570dcb | 2016-09-13 19:07:06 +0200 | [diff] [blame] | 31 | import xos-types { prefix xos; } |
Peter K. Lee | 2bade4d | 2016-07-14 16:19:56 -0700 | [diff] [blame] | 32 | |
Peter K. Lee | f4d38d3 | 2016-07-23 02:47:38 -0700 | [diff] [blame] | 33 | feature synchronizer { |
34 | description | ||||
35 | "Enables configuration synchronization to the distributed store."; | ||||
Peter K. Lee | 2bade4d | 2016-07-14 16:19:56 -0700 | [diff] [blame] | 36 | } |
37 | |||||
38 | identity kind; | ||||
Peter K. Lee | 0db45ac | 2016-09-13 00:30:37 -0700 | [diff] [blame] | 39 | identity generic { base kind; } |
40 | identity service { base kind; } | ||||
Peter K. Lee | 2bade4d | 2016-07-14 16:19:56 -0700 | [diff] [blame] | 41 | |
42 | typedef unique-identifier { | ||||
43 | description "defines valid formats for external reference id"; | ||||
44 | type union { | ||||
Peter K. Lee | 4302f47 | 2016-07-28 03:51:39 -0700 | [diff] [blame] | 45 | type uint32 { range 1..max; } |
Peter K. Lee | 2bade4d | 2016-07-14 16:19:56 -0700 | [diff] [blame] | 46 | type yang:uuid; |
47 | type inet:uri; | ||||
Peter K. Lee | 2bade4d | 2016-07-14 16:19:56 -0700 | [diff] [blame] | 48 | } |
49 | } | ||||
Peter K. Lee | 0db45ac | 2016-09-13 00:30:37 -0700 | [diff] [blame] | 50 | typedef bandwidth { |
51 | type uint32 { | ||||
52 | range 1000000..max; // should be at least 1 Mbps? | ||||
53 | } | ||||
54 | units 'bps'; | ||||
55 | } | ||||
56 | typedef vlan { | ||||
57 | type uint16 { range 0..4095; } | ||||
58 | } | ||||
Peter K. Lee | 2bade4d | 2016-07-14 16:19:56 -0700 | [diff] [blame] | 59 | |
Peter K. Lee | 0db45ac | 2016-09-13 00:30:37 -0700 | [diff] [blame] | 60 | grouping attribute-pair { |
Peter K. Lee | cb2eb92 | 2016-09-01 18:02:31 -0700 | [diff] [blame] | 61 | leaf name { type string { length 0..128; } } |
62 | leaf value { type string; } | ||||
63 | // don't need pointer back to service | ||||
64 | } | ||||
Peter K. Lee | 2da7863 | 2016-09-06 21:02:47 -0700 | [diff] [blame] | 65 | |
Peter K. Lee | 0db45ac | 2016-09-13 00:30:37 -0700 | [diff] [blame] | 66 | grouping sync-record { |
Peter K. Lee | 2da7863 | 2016-09-06 21:02:47 -0700 | [diff] [blame] | 67 | description "Synchronizer-specific properties for model records"; |
68 | |||||
69 | leaf created { type yang:date-and-time; } | ||||
70 | leaf updated { type yang:date-and-time; } | ||||
71 | leaf enacted { type yang:date-and-time; } | ||||
72 | leaf policed { type yang:date-and-time; } | ||||
73 | |||||
74 | leaf writable { type boolean; default true; } | ||||
75 | leaf locked { type boolean; default false; } | ||||
76 | leaf deleted { type boolean; default false; } | ||||
77 | |||||
78 | leaf dirty { | ||||
79 | config false; | ||||
80 | type boolean; | ||||
81 | default false; | ||||
82 | } | ||||
83 | |||||
84 | container sync { | ||||
85 | anydata register { | ||||
86 | description "scratchpad used by the Observer"; | ||||
87 | } | ||||
88 | leaf progress { | ||||
89 | type enumeration { | ||||
90 | enum provisioning { | ||||
91 | value 0; | ||||
92 | description "Provisioning in progress"; | ||||
93 | } | ||||
94 | } | ||||
95 | } | ||||
96 | leaf disabled { type boolean; default false; } | ||||
97 | leaf enforced { type boolean; default true; } | ||||
98 | |||||
99 | list policy { | ||||
100 | // TODO: how are policy defined/enforced? | ||||
101 | } | ||||
102 | } | ||||
103 | |||||
104 | action diff { | ||||
105 | when "../dirty == true"; | ||||
106 | description "retrieve diff of model state if dirty"; | ||||
107 | } | ||||
108 | action save { | ||||
109 | description "trigger save into data store via synchronizer"; | ||||
110 | } | ||||
111 | } | ||||
Peter K. Lee | cb2eb92 | 2016-09-01 18:02:31 -0700 | [diff] [blame] | 112 | |
Peter K. Lee | 0db45ac | 2016-09-13 00:30:37 -0700 | [diff] [blame] | 113 | grouping base-common { |
Peter K. Lee | 2bade4d | 2016-07-14 16:19:56 -0700 | [diff] [blame] | 114 | leaf id { |
115 | type unique-identifier; | ||||
Peter K. Lee | 2bade4d | 2016-07-14 16:19:56 -0700 | [diff] [blame] | 116 | mandatory true; |
117 | } | ||||
Peter K. Lee | 2bade4d | 2016-07-14 16:19:56 -0700 | [diff] [blame] | 118 | leaf name { |
119 | type string { | ||||
120 | length 0..255; | ||||
121 | } | ||||
Peter K. Lee | 2bade4d | 2016-07-14 16:19:56 -0700 | [diff] [blame] | 122 | } |
Peter K. Lee | 2da7863 | 2016-09-06 21:02:47 -0700 | [diff] [blame] | 123 | list attribute { |
Peter K. Lee | 0db45ac | 2016-09-13 00:30:37 -0700 | [diff] [blame] | 124 | uses attribute-pair; |
Peter K. Lee | 2da7863 | 2016-09-06 21:02:47 -0700 | [diff] [blame] | 125 | key name; |
126 | status deprecated; | ||||
127 | reference "XOS: service-specific-attribute"; | ||||
128 | description "backwards-compatible attribute association"; | ||||
129 | } | ||||
Peter K. Lee | 2bade4d | 2016-07-14 16:19:56 -0700 | [diff] [blame] | 130 | leaf service-specific-id { |
131 | type unique-identifier; | ||||
132 | mandatory true; | ||||
Peter K. Lee | 2da7863 | 2016-09-06 21:02:47 -0700 | [diff] [blame] | 133 | status deprecated; |
134 | } | ||||
Peter K. Lee | 2da7863 | 2016-09-06 21:02:47 -0700 | [diff] [blame] | 135 | container record { |
136 | if-feature synchronizer; | ||||
Peter K. Lee | 0db45ac | 2016-09-13 00:30:37 -0700 | [diff] [blame] | 137 | uses sync-record; |
Peter K. Lee | 2bade4d | 2016-07-14 16:19:56 -0700 | [diff] [blame] | 138 | } |
Peter K. Lee | cb2eb92 | 2016-09-01 18:02:31 -0700 | [diff] [blame] | 139 | } |
140 | |||||
141 | grouping tenant-root { | ||||
Peter K. Lee | 0db45ac | 2016-09-13 00:30:37 -0700 | [diff] [blame] | 142 | uses base-common { |
Peter K. Lee | cb2eb92 | 2016-09-01 18:02:31 -0700 | [diff] [blame] | 143 | refine 'name' { |
144 | description "Specify name of the TenantRoot"; | ||||
145 | } | ||||
146 | } | ||||
147 | description | ||||
148 | "A Tenant Root is one of the things that can sit at the root of a chain | ||||
149 | of tenancy. This object represents a node."; | ||||
Peter K. Lee | 2bade4d | 2016-07-14 16:19:56 -0700 | [diff] [blame] | 150 | |
Peter K. Lee | af777da | 2016-08-17 04:33:00 -0700 | [diff] [blame] | 151 | list subscribed-tenant { |
Peter K. Lee | 2bade4d | 2016-07-14 16:19:56 -0700 | [diff] [blame] | 152 | config false; |
153 | // not exactly clear how this is populated | ||||
154 | } | ||||
Peter K. Lee | 2bade4d | 2016-07-14 16:19:56 -0700 | [diff] [blame] | 155 | } |
156 | |||||
157 | grouping subscriber { | ||||
158 | uses tenant-root { | ||||
159 | refine kind { default subscriber; } | ||||
160 | } | ||||
161 | // seems we should have interesting attributes specific to subscriber? | ||||
Peter K. Lee | 2bade4d | 2016-07-14 16:19:56 -0700 | [diff] [blame] | 162 | } |
Peter K. Lee | cb2eb92 | 2016-09-01 18:02:31 -0700 | [diff] [blame] | 163 | |
164 | grouping provider { | ||||
165 | uses tenant-root { | ||||
166 | refine kind { default provider; } | ||||
167 | } | ||||
168 | // seems we should have interesting attributes specific to provider? | ||||
169 | } | ||||
Peter K. Lee | 2bade4d | 2016-07-14 16:19:56 -0700 | [diff] [blame] | 170 | |
Peter K. Lee | cb2eb92 | 2016-09-01 18:02:31 -0700 | [diff] [blame] | 171 | grouping service { |
Peter K. Lee | 0db45ac | 2016-09-13 00:30:37 -0700 | [diff] [blame] | 172 | uses base-common { |
Peter K. Lee | cb2eb92 | 2016-09-01 18:02:31 -0700 | [diff] [blame] | 173 | refine 'name' { |
174 | description "Name of the Service"; | ||||
175 | } | ||||
176 | } | ||||
Peter K. Lee | 0db45ac | 2016-09-13 00:30:37 -0700 | [diff] [blame] | 177 | leaf kind { |
178 | type identityref { | ||||
179 | base kind; | ||||
180 | } | ||||
181 | default generic; | ||||
182 | } | ||||
Peter K. Lee | cb2eb92 | 2016-09-01 18:02:31 -0700 | [diff] [blame] | 183 | leaf description { |
184 | type string { | ||||
185 | length 0..254; | ||||
186 | } | ||||
187 | description "Description of the Service"; | ||||
188 | } | ||||
189 | leaf version { | ||||
190 | type string { length 0..30; } | ||||
191 | description "Version of Service Definition"; | ||||
192 | } | ||||
193 | |||||
194 | leaf enabled { type boolean; default true; } | ||||
195 | leaf published { type boolean; default true; } | ||||
196 | |||||
Peter K. Lee | 2da7863 | 2016-09-06 21:02:47 -0700 | [diff] [blame] | 197 | container links { |
Peter K. Lee | cb2eb92 | 2016-09-01 18:02:31 -0700 | [diff] [blame] | 198 | leaf view { type inet:uri; } |
199 | leaf icon { type inet:uri; } | ||||
200 | } | ||||
201 | |||||
202 | list keypair { | ||||
203 | description "collection of public/private key pair(s)"; | ||||
Peter K. Lee | 2da7863 | 2016-09-06 21:02:47 -0700 | [diff] [blame] | 204 | // should be a specific typedef for storing this content |
Peter K. Lee | cb2eb92 | 2016-09-01 18:02:31 -0700 | [diff] [blame] | 205 | leaf public { type string { length 0..1024; } } |
206 | leaf private { type string { length 0..1024; } } | ||||
207 | } | ||||
Peter K. Lee | 0db45ac | 2016-09-13 00:30:37 -0700 | [diff] [blame] | 208 | list provider { |
209 | description | ||||
210 | "Each entry represents a provider of the service. Each unique service | ||||
211 | should augment this block with service specific attributes."; | ||||
212 | key id; | ||||
213 | uses xos:provider; | ||||
214 | } | ||||
215 | list subscriber { | ||||
216 | description | ||||
217 | "Each entry represents a subscriber of the service. Each unique service | ||||
218 | should augment this block with service specific attributes."; | ||||
219 | key id; | ||||
220 | uses xos:subscriber; | ||||
221 | notification subscriber-added; | ||||
222 | notification subscriber-deleted; | ||||
223 | } | ||||
Peter K. Lee | cb2eb92 | 2016-09-01 18:02:31 -0700 | [diff] [blame] | 224 | |
225 | // TOOD: need to better understand relationship between Service and Slice | ||||
226 | action scale { | ||||
227 | description "Adjust scale for slice(s)"; | ||||
228 | } | ||||
229 | |||||
230 | // TODO: need to better understand relationship between Service and VTN | ||||
231 | } | ||||
232 | |||||
233 | grouping tenancy { | ||||
Peter K. Lee | 0db45ac | 2016-09-13 00:30:37 -0700 | [diff] [blame] | 234 | uses base-common; |
Peter K. Lee | cb2eb92 | 2016-09-01 18:02:31 -0700 | [diff] [blame] | 235 | |
236 | choice provider { | ||||
237 | description "only one type of provider node is valid."; | ||||
238 | case service { leaf provider-service { type instance-identifier; } } | ||||
239 | } | ||||
240 | |||||
241 | choice subscriber { | ||||
242 | description "only one type of subscriber node is valid."; | ||||
243 | case service { leaf subscriber-service { type instance-identifier; } } | ||||
244 | case tenant { leaf subscriber-tenant { type instance-identifier; } } | ||||
245 | case user { leaf subscriber-user { type instance-identifier; } } | ||||
246 | case root { leaf subscriber-root { type instance-identifier; } } | ||||
247 | case network { leaf subscriber-network { type instance-identifier; } } | ||||
248 | } | ||||
249 | |||||
250 | leaf connect-method { | ||||
251 | //when "../kind == 'static-tenant'"; | ||||
252 | |||||
253 | type enumeration { | ||||
254 | enum public { description "Public"; } | ||||
255 | enum private { description "Private"; } | ||||
256 | enum private-unidirectional { description "Private Uni-directional"; } | ||||
257 | enum na { description "Not Applicable"; } | ||||
258 | } | ||||
259 | default na; | ||||
260 | } | ||||
261 | |||||
262 | // TODO: should be able to deal with TenantWithContainer here | ||||
263 | |||||
264 | } | ||||
Sapan Bhatia | d570dcb | 2016-09-13 19:07:06 +0200 | [diff] [blame] | 265 | |
266 | grouping slice { | ||||
267 | description | ||||
268 | "A slice is a logically centralized container for network and compute resources" | ||||
269 | |||||
270 | uses base-common; | ||||
271 | |||||
272 | leaf enabled { | ||||
273 | type boolean; | ||||
274 | default true; | ||||
275 | } | ||||
276 | |||||
277 | leaf omf-friendly { | ||||
278 | type boolean; | ||||
279 | default false; | ||||
280 | status deprecated; | ||||
281 | } | ||||
282 | |||||
283 | leaf slice-url { | ||||
284 | description "A URL describing the purpose of this slice"; | ||||
285 | type xos.refs.url-field; | ||||
286 | // blank true; | ||||
287 | } | ||||
288 | |||||
289 | leaf max-instances { | ||||
290 | description "The maximum number of VMs that this slice is allowed to allocate"; | ||||
291 | type uint32; | ||||
292 | } | ||||
293 | |||||
294 | leaf service { | ||||
295 | description "The service that runs in this slice"; | ||||
296 | type xos.refs.service; | ||||
297 | } | ||||
298 | |||||
299 | leaf network { | ||||
300 | description "The network that the slice uses to connect to other slices and to the Internet."; | ||||
301 | type string; | ||||
302 | } | ||||
303 | |||||
304 | leaf exposed-ports { | ||||
305 | description "The ports to be exposed for other slices to connect to"; | ||||
306 | type string; | ||||
307 | } | ||||
308 | |||||
309 | leaf service-class { | ||||
310 | type xos.refs.service-class; | ||||
311 | status deprecated; | ||||
312 | } | ||||
313 | |||||
314 | leaf creator { | ||||
315 | type xos.refs.user; | ||||
316 | } | ||||
317 | |||||
318 | leaf default-flavor { | ||||
319 | type xos.refs.flavor; | ||||
320 | } | ||||
321 | |||||
322 | leaf default-image { | ||||
323 | type xos.refs.image; | ||||
324 | } | ||||
325 | |||||
326 | leaf default-node { | ||||
327 | type xos.refs.node; | ||||
328 | } | ||||
329 | |||||
330 | leaf mount-data-sets { | ||||
331 | type string; | ||||
332 | default "GenBank"; | ||||
333 | length 0..256; | ||||
334 | } | ||||
335 | |||||
336 | leaf default_isolation { | ||||
337 | type string; | ||||
338 | default "vm"; | ||||
339 | length 0..30; | ||||
340 | } | ||||
341 | |||||
342 | leaf-list tags { | ||||
343 | type leafref { | ||||
344 | path "/tag[id = current()/../id]/id"; | ||||
345 | } | ||||
346 | } | ||||
347 | } | ||||
Sapan Bhatia | ffd73a9 | 2016-09-13 21:47:27 +0200 | [diff] [blame^] | 348 | |
349 | |||||
350 | grouping controller-images { | ||||
351 | uses xos-base; | ||||
352 | |||||
353 | leaf image { | ||||
354 | type xos:image; | ||||
355 | } | ||||
356 | |||||
357 | leaf controller { | ||||
358 | type xos:controller; | ||||
359 | } | ||||
360 | |||||
361 | container synchronizer { | ||||
362 | if-feature synchronizer { | ||||
363 | leaf glance-image-id { | ||||
364 | type string; | ||||
365 | } | ||||
366 | } | ||||
367 | } | ||||
368 | } | ||||
369 | |||||
370 | grouping controller-site-privilege { | ||||
371 | uses xos-base; | ||||
372 | |||||
373 | leaf controller { | ||||
374 | type xos:controller; | ||||
375 | } | ||||
376 | |||||
377 | leaf site-privilege { | ||||
378 | type xos:site-privilege; | ||||
379 | } | ||||
380 | |||||
381 | container synchronizer { | ||||
382 | if-feature synchronizer { | ||||
383 | |||||
384 | leaf role-id { | ||||
385 | type string; | ||||
386 | } | ||||
387 | } | ||||
388 | } | ||||
389 | |||||
390 | grouping image { | ||||
391 | uses xos-base; | ||||
392 | |||||
393 | |||||
394 | leaf kind { | ||||
395 | type string; | ||||
396 | } | ||||
397 | leaf disk-format { | ||||
398 | type string; | ||||
399 | } | ||||
400 | leaf container-format { | ||||
401 | type string; | ||||
402 | } | ||||
403 | leaf path { | ||||
404 | type string; | ||||
405 | } | ||||
406 | leaf tag { | ||||
407 | type string; | ||||
408 | } | ||||
409 | } | ||||
410 | |||||
411 | grouping controller-network { | ||||
412 | uses xos-base; | ||||
413 | leaf network { | ||||
414 | type xos:network; | ||||
415 | } | ||||
416 | leaf controller { | ||||
417 | type xos:controller; | ||||
418 | } | ||||
419 | |||||
420 | container synchronizer { | ||||
421 | if-feature synchronizer { | ||||
422 | leaf net-id { | ||||
423 | type string; | ||||
424 | } | ||||
425 | leaf router-id { | ||||
426 | type string; | ||||
427 | } | ||||
428 | leaf subnet-id { | ||||
429 | type string; | ||||
430 | } | ||||
431 | } | ||||
432 | |||||
433 | leaf subnet { | ||||
434 | type string; | ||||
435 | } | ||||
436 | |||||
437 | } | ||||
438 | |||||
439 | grouping site { | ||||
440 | uses xos-base; | ||||
441 | |||||
442 | leaf site-url { | ||||
443 | type xos:url-field; | ||||
444 | } | ||||
445 | leaf enabled { | ||||
446 | type boolean; | ||||
447 | } | ||||
448 | leaf hosts-nodes { | ||||
449 | type boolean; | ||||
450 | } | ||||
451 | leaf hosts-users { | ||||
452 | type boolean; | ||||
453 | } | ||||
454 | leaf location { | ||||
455 | type xos:geoposition-field; | ||||
456 | } | ||||
457 | leaf longitude { | ||||
458 | type decimal64; | ||||
459 | } | ||||
460 | leaf latitude { | ||||
461 | type decimal64; | ||||
462 | } | ||||
463 | leaf login-base { | ||||
464 | type string; | ||||
465 | } | ||||
466 | leaf is-public { | ||||
467 | type boolean; | ||||
468 | } | ||||
469 | leaf abbreviated-name { | ||||
470 | type string; | ||||
471 | } | ||||
472 | } | ||||
473 | |||||
474 | grouping slice-role { | ||||
475 | uses xos-base; | ||||
476 | leaf role { | ||||
477 | type string; | ||||
478 | } | ||||
479 | } | ||||
480 | |||||
481 | grouping site-deployment { | ||||
482 | leaf site { | ||||
483 | type xos:site; | ||||
484 | } | ||||
485 | leaf deployment { | ||||
486 | type xos:deployment; | ||||
487 | } | ||||
488 | leaf controller { | ||||
489 | type xos:controller; | ||||
490 | } | ||||
491 | container synchronizer { | ||||
492 | if-feature synchronizer { | ||||
493 | |||||
494 | leaf availability-zone { | ||||
495 | type string; | ||||
496 | } | ||||
497 | } | ||||
498 | } | ||||
499 | } | ||||
500 | |||||
501 | |||||
502 | grouping user-credential { | ||||
503 | leaf user { | ||||
504 | type xos:user; | ||||
505 | } | ||||
506 | |||||
507 | leaf key-id { | ||||
508 | type string; | ||||
509 | } | ||||
510 | |||||
511 | leaf enc-value { | ||||
512 | type xos:encrypted-string; | ||||
513 | } | ||||
514 | } | ||||
515 | |||||
516 | grouping invoice { | ||||
517 | leaf date { | ||||
518 | type xos:datetime; | ||||
519 | } | ||||
520 | leaf account { | ||||
521 | type xos:account; | ||||
522 | } | ||||
523 | } | ||||
524 | |||||
525 | grouping slice-privilege { | ||||
526 | leaf user { | ||||
527 | type xos:user; | ||||
528 | } | ||||
529 | leaf slice { | ||||
530 | type xos:slice; | ||||
531 | } | ||||
532 | leaf role { | ||||
533 | type xos:role; | ||||
534 | } | ||||
535 | } | ||||
536 | |||||
537 | grouping flavor { | ||||
538 | |||||
539 | leaf description { | ||||
540 | type string; | ||||
541 | } | ||||
542 | leaf flavor { | ||||
543 | type string; | ||||
544 | } | ||||
545 | leaf order { | ||||
546 | type uint32; | ||||
547 | } | ||||
548 | leaf default { | ||||
549 | type boolean; | ||||
550 | } | ||||
551 | } | ||||
552 | |||||
553 | grouping port { | ||||
554 | leaf network { | ||||
555 | type xos:network; | ||||
556 | } | ||||
557 | leaf instance { | ||||
558 | type xos:instance; | ||||
559 | } | ||||
560 | container synchronizer { | ||||
561 | if-feature synchronizer { | ||||
562 | leaf ip { | ||||
563 | type inet:ip-address; | ||||
564 | } | ||||
565 | leaf port-id { | ||||
566 | type string; | ||||
567 | } | ||||
568 | leaf mac { | ||||
569 | type string; | ||||
570 | } | ||||
571 | } | ||||
572 | } | ||||
573 | leaf xos-created { | ||||
574 | type boolean; | ||||
575 | } | ||||
576 | } | ||||
577 | |||||
578 | grouping service-role { | ||||
579 | leaf role { | ||||
580 | type string; | ||||
581 | } | ||||
582 | } | ||||
583 | |||||
584 | grouping controller-site { | ||||
585 | leaf site { | ||||
586 | type xos:site; | ||||
587 | } | ||||
588 | |||||
589 | leaf controller { | ||||
590 | type xos:controller; | ||||
591 | } | ||||
592 | |||||
593 | container synchronizer { | ||||
594 | if-feature synchronizer { | ||||
595 | |||||
596 | leaf tenant-id { | ||||
597 | type string; | ||||
598 | } | ||||
599 | } | ||||
600 | } | ||||
601 | } | ||||
602 | |||||
603 | grouping controller-slice { | ||||
604 | leaf controller { | ||||
605 | type xos:controller; | ||||
606 | } | ||||
607 | leaf slice { | ||||
608 | type xos:slice; | ||||
609 | } | ||||
610 | |||||
611 | container synchronizer { | ||||
612 | if-feature synchronizer { | ||||
613 | leaf tenant-id { | ||||
614 | type string; | ||||
615 | } | ||||
616 | } | ||||
617 | } | ||||
618 | } | ||||
619 | |||||
620 | grouping tenant-role { | ||||
621 | leaf role { | ||||
622 | type string; | ||||
623 | } | ||||
624 | } | ||||
625 | |||||
626 | grouping network { | ||||
627 | leaf template { | ||||
628 | type xos:template; | ||||
629 | } | ||||
630 | |||||
631 | leaf subnet { | ||||
632 | type string; | ||||
633 | } | ||||
634 | |||||
635 | leaf ports { | ||||
636 | type string; | ||||
637 | } | ||||
638 | |||||
639 | leaf labels { | ||||
640 | type string; | ||||
641 | } | ||||
642 | |||||
643 | leaf owner { | ||||
644 | type xos:owner; | ||||
645 | } | ||||
646 | |||||
647 | leaf guaranteed-bandwidth { | ||||
648 | type uint32; | ||||
649 | } | ||||
650 | |||||
651 | leaf permit-all-slices { | ||||
652 | type boolean; | ||||
653 | } | ||||
654 | |||||
655 | leaf topology-parameters { | ||||
656 | type string; | ||||
657 | } | ||||
658 | |||||
659 | leaf controller-url { | ||||
660 | type string; | ||||
661 | } | ||||
662 | |||||
663 | leaf controller-parameters { | ||||
664 | type string; | ||||
665 | } | ||||
666 | |||||
667 | container synchronizer { | ||||
668 | if-feature synchronizer { | ||||
669 | leaf network-id { | ||||
670 | type string; | ||||
671 | } | ||||
672 | leaf router-id { | ||||
673 | type string; | ||||
674 | } | ||||
675 | leaf subnet-id { | ||||
676 | type string; | ||||
677 | } | ||||
678 | } | ||||
679 | } | ||||
680 | leaf autoconnect { | ||||
681 | type boolean; | ||||
682 | } | ||||
683 | } | ||||
684 | |||||
685 | grouping controller-role { | ||||
686 | leaf role { | ||||
687 | type string; | ||||
688 | } | ||||
689 | } | ||||
690 | |||||
691 | grouping diag { | ||||
692 | |||||
693 | } | ||||
694 | |||||
695 | grouping service-class { | ||||
696 | |||||
697 | leaf description { | ||||
698 | type string; | ||||
699 | } | ||||
700 | leaf commitment { | ||||
701 | type uint32; | ||||
702 | } | ||||
703 | leaf membership-fee { | ||||
704 | type uint32; | ||||
705 | } | ||||
706 | leaf membership-fee-months { | ||||
707 | type uint32; | ||||
708 | } | ||||
709 | leaf upgrade-requires-approval { | ||||
710 | type boolean; | ||||
711 | } | ||||
712 | } | ||||
713 | |||||
714 | grouping site-role { | ||||
715 | leaf role { | ||||
716 | type string; | ||||
717 | } | ||||
718 | } | ||||
719 | |||||
720 | grouping instance { | ||||
721 | container synchronizer { | ||||
722 | if-feature synchronizer { | ||||
723 | leaf instance-id { | ||||
724 | type string; | ||||
725 | } | ||||
726 | |||||
727 | leaf instance-uuid { | ||||
728 | type string; | ||||
729 | } | ||||
730 | |||||
731 | leaf instance-name { | ||||
732 | type string; | ||||
733 | } | ||||
734 | |||||
735 | leaf ip { | ||||
736 | type inet:ip-address; | ||||
737 | } | ||||
738 | } | ||||
739 | leaf image { | ||||
740 | type xos:image; | ||||
741 | } | ||||
742 | leaf creator { | ||||
743 | type xos:creator; | ||||
744 | } | ||||
745 | leaf slice { | ||||
746 | type xos:slice; | ||||
747 | } | ||||
748 | leaf deployment { | ||||
749 | type xos:deployment; | ||||
750 | } | ||||
751 | leaf node { | ||||
752 | type xos:node; | ||||
753 | } | ||||
754 | leaf number-cores { | ||||
755 | type uint32; | ||||
756 | } | ||||
757 | leaf flavor { | ||||
758 | type xos:flavor; | ||||
759 | } | ||||
760 | leaf user-data { | ||||
761 | type string; | ||||
762 | } | ||||
763 | leaf isolation { | ||||
764 | type string; | ||||
765 | } | ||||
766 | leaf volumes { | ||||
767 | type string; | ||||
768 | } | ||||
769 | leaf parent { | ||||
770 | type xos:parent; | ||||
771 | } | ||||
772 | } | ||||
773 | |||||
774 | grouping charge { | ||||
775 | leaf account { | ||||
776 | type xos:account; | ||||
777 | } | ||||
778 | leaf slice { | ||||
779 | type xos:slice; | ||||
780 | } | ||||
781 | leaf kind { | ||||
782 | type string; | ||||
783 | } | ||||
784 | leaf state { | ||||
785 | type string; | ||||
786 | } | ||||
787 | leaf date { | ||||
788 | type xos:datetime; | ||||
789 | } | ||||
790 | leaf object { | ||||
791 | type xos:object; | ||||
792 | } | ||||
793 | leaf amount { | ||||
794 | type decimal64; | ||||
795 | } | ||||
796 | leaf core-hours { | ||||
797 | type decimal64; | ||||
798 | } | ||||
799 | leaf invoice { | ||||
800 | type xos:invoice; | ||||
801 | } | ||||
802 | } | ||||
803 | |||||
804 | grouping program { | ||||
805 | leaf description { | ||||
806 | type string; | ||||
807 | } | ||||
808 | |||||
809 | leaf kind { | ||||
810 | type string; | ||||
811 | } | ||||
812 | |||||
813 | leaf command { | ||||
814 | type string; | ||||
815 | } | ||||
816 | |||||
817 | leaf owner { | ||||
818 | type xos:owner; | ||||
819 | } | ||||
820 | |||||
821 | leaf contents { | ||||
822 | type string; | ||||
823 | } | ||||
824 | |||||
825 | leaf output { | ||||
826 | type string; | ||||
827 | } | ||||
828 | |||||
829 | leaf messages { | ||||
830 | type string; | ||||
831 | } | ||||
832 | |||||
833 | leaf status { | ||||
834 | type string; | ||||
835 | } | ||||
836 | } | ||||
837 | |||||
838 | grouping role { | ||||
839 | leaf role-type { | ||||
840 | type string; | ||||
841 | } | ||||
842 | leaf role { | ||||
843 | type string; | ||||
844 | } | ||||
845 | leaf description { | ||||
846 | type string; | ||||
847 | } | ||||
848 | leaf content-type { | ||||
849 | type xos:content-type; | ||||
850 | } | ||||
851 | } | ||||
852 | |||||
853 | grouping usable-object { | ||||
854 | |||||
855 | } | ||||
856 | |||||
857 | grouping node-label { | ||||
858 | |||||
859 | } | ||||
860 | |||||
861 | grouping slice-credential { | ||||
862 | leaf slice { | ||||
863 | type xos:slice; | ||||
864 | } | ||||
865 | |||||
866 | leaf key-id { | ||||
867 | type string; | ||||
868 | } | ||||
869 | leaf enc-value { | ||||
870 | type xos:encrypted-string; | ||||
871 | } | ||||
872 | } | ||||
873 | |||||
874 | grouping node { | ||||
875 | |||||
876 | leaf site-deployment { | ||||
877 | type xos:site-deployment; | ||||
878 | } | ||||
879 | leaf site { | ||||
880 | type xos:site; | ||||
881 | } | ||||
882 | } | ||||
883 | |||||
884 | grouping address-pool { | ||||
885 | |||||
886 | leaf addresses { | ||||
887 | type string; | ||||
888 | } | ||||
889 | leaf gateway-ip { | ||||
890 | type string; | ||||
891 | } | ||||
892 | leaf gateway-mac { | ||||
893 | type string; | ||||
894 | } | ||||
895 | leaf cidr { | ||||
896 | type string; | ||||
897 | } | ||||
898 | leaf inuse { | ||||
899 | type string; | ||||
900 | } | ||||
901 | leaf service { | ||||
902 | type xos:service; | ||||
903 | } | ||||
904 | } | ||||
905 | |||||
906 | grouping dashboard-view { | ||||
907 | |||||
908 | leaf url { | ||||
909 | type string; | ||||
910 | } | ||||
911 | leaf enabled { | ||||
912 | type boolean; | ||||
913 | } | ||||
914 | } | ||||
915 | grouping network-parameter { | ||||
916 | leaf parameter { | ||||
917 | type xos:parameter; | ||||
918 | } | ||||
919 | leaf value { | ||||
920 | type string; | ||||
921 | } | ||||
922 | leaf content-type { | ||||
923 | type xos:content-type; | ||||
924 | } | ||||
925 | leaf object-id { | ||||
926 | type uint32; | ||||
927 | } | ||||
928 | } | ||||
929 | grouping image-deployments { | ||||
930 | leaf image { | ||||
931 | type xos:image; | ||||
932 | } | ||||
933 | leaf deployment { | ||||
934 | type xos:deployment; | ||||
935 | } | ||||
936 | } | ||||
937 | |||||
938 | grouping controller-user { | ||||
939 | leaf user { | ||||
940 | type xos:user; | ||||
941 | } | ||||
942 | |||||
943 | leaf controller { | ||||
944 | type xos:controller; | ||||
945 | } | ||||
946 | |||||
947 | container synchronizer { | ||||
948 | if-feature synchronizer { | ||||
949 | leaf kuser-id { | ||||
950 | type string; | ||||
951 | } | ||||
952 | } | ||||
953 | } | ||||
954 | } | ||||
955 | grouping reserved-resource { | ||||
956 | leaf instance { | ||||
957 | type xos:instance; | ||||
958 | } | ||||
959 | leaf resource { | ||||
960 | type xos:resource; | ||||
961 | } | ||||
962 | leaf quantity { | ||||
963 | type uint32; | ||||
964 | } | ||||
965 | leaf reservationSet { | ||||
966 | type xos:reservationSet; | ||||
967 | } | ||||
968 | } | ||||
969 | grouping network-template { | ||||
970 | |||||
971 | leaf description { | ||||
972 | type string; | ||||
973 | } | ||||
974 | leaf guaranteed-bandwidth { | ||||
975 | type uint32; | ||||
976 | } | ||||
977 | leaf visibility { | ||||
978 | type string; | ||||
979 | } | ||||
980 | leaf translation { | ||||
981 | type string; | ||||
982 | } | ||||
983 | leaf access { | ||||
984 | type string; | ||||
985 | } | ||||
986 | leaf shared-network-name { | ||||
987 | type string; | ||||
988 | } | ||||
989 | leaf shared-network-id { | ||||
990 | type string; | ||||
991 | } | ||||
992 | leaf topology-kind { | ||||
993 | type string; | ||||
994 | } | ||||
995 | leaf controller-kind { | ||||
996 | type string; | ||||
997 | } | ||||
998 | } | ||||
999 | grouping controller-dashboard-view { | ||||
1000 | leaf controller { | ||||
1001 | type xos:controller; | ||||
1002 | } | ||||
1003 | leaf dashboardView { | ||||
1004 | type xos:dashboardView; | ||||
1005 | } | ||||
1006 | leaf enabled { | ||||
1007 | type boolean; | ||||
1008 | } | ||||
1009 | leaf url { | ||||
1010 | type string; | ||||
1011 | } | ||||
1012 | } | ||||
1013 | grouping user-dashboard-view { | ||||
1014 | leaf user { | ||||
1015 | type xos:user; | ||||
1016 | } | ||||
1017 | leaf dashboardView { | ||||
1018 | type xos:dashboardView; | ||||
1019 | } | ||||
1020 | leaf order { | ||||
1021 | type uint32; | ||||
1022 | } | ||||
1023 | } | ||||
1024 | grouping controller { | ||||
1025 | |||||
1026 | leaf backend-type { | ||||
1027 | type string; | ||||
1028 | } | ||||
1029 | leaf version { | ||||
1030 | type string; | ||||
1031 | } | ||||
1032 | leaf auth-url { | ||||
1033 | type string; | ||||
1034 | } | ||||
1035 | leaf admin-user { | ||||
1036 | type string; | ||||
1037 | } | ||||
1038 | leaf admin-password { | ||||
1039 | type string; | ||||
1040 | } | ||||
1041 | leaf admin-tenant { | ||||
1042 | type string; | ||||
1043 | } | ||||
1044 | leaf domain { | ||||
1045 | type string; | ||||
1046 | } | ||||
1047 | leaf rabbit-host { | ||||
1048 | type string; | ||||
1049 | } | ||||
1050 | leaf rabbit-user { | ||||
1051 | type string; | ||||
1052 | } | ||||
1053 | leaf rabbit-password { | ||||
1054 | type string; | ||||
1055 | } | ||||
1056 | leaf deployment { | ||||
1057 | type xos:deployment; | ||||
1058 | } | ||||
1059 | } | ||||
1060 | grouping user { | ||||
1061 | leaf password { | ||||
1062 | type string; | ||||
1063 | } | ||||
1064 | leaf last-login { | ||||
1065 | type xos:datetime; | ||||
1066 | } | ||||
1067 | leaf email { | ||||
1068 | type EmailField; | ||||
1069 | } | ||||
1070 | leaf username { | ||||
1071 | type string; | ||||
1072 | } | ||||
1073 | leaf firstname { | ||||
1074 | type string; | ||||
1075 | } | ||||
1076 | leaf lastname { | ||||
1077 | type string; | ||||
1078 | } | ||||
1079 | leaf phone { | ||||
1080 | type string; | ||||
1081 | } | ||||
1082 | leaf user-url { | ||||
1083 | type xos:url-field; | ||||
1084 | } | ||||
1085 | leaf site { | ||||
1086 | type xos:site; | ||||
1087 | } | ||||
1088 | leaf public-key { | ||||
1089 | type string; | ||||
1090 | } | ||||
1091 | leaf is-active { | ||||
1092 | type boolean; | ||||
1093 | } | ||||
1094 | leaf is-admin { | ||||
1095 | type boolean; | ||||
1096 | } | ||||
1097 | leaf is-staff { | ||||
1098 | type boolean; | ||||
1099 | } | ||||
1100 | leaf is-readonly { | ||||
1101 | type boolean; | ||||
1102 | } | ||||
1103 | leaf is-registering { | ||||
1104 | type boolean; | ||||
1105 | } | ||||
1106 | leaf is-appuser { | ||||
1107 | type boolean; | ||||
1108 | } | ||||
1109 | leaf login-page { | ||||
1110 | type string; | ||||
1111 | } | ||||
1112 | leaf timezone { | ||||
1113 | type xos:time-zone-field; | ||||
1114 | } | ||||
1115 | } | ||||
1116 | grouping deployment { | ||||
1117 | |||||
1118 | leaf access-control { | ||||
1119 | type string; | ||||
1120 | } | ||||
1121 | } | ||||
1122 | grouping reservation { | ||||
1123 | leaf startTime { | ||||
1124 | type xos:datetime; | ||||
1125 | } | ||||
1126 | leaf slice { | ||||
1127 | type xos:slice; | ||||
1128 | } | ||||
1129 | leaf duration { | ||||
1130 | type uint32; | ||||
1131 | } | ||||
1132 | } | ||||
1133 | grouping site-privilege { | ||||
1134 | leaf user { | ||||
1135 | type xos:user; | ||||
1136 | } | ||||
1137 | leaf site { | ||||
1138 | type xos:site; | ||||
1139 | } | ||||
1140 | leaf role { | ||||
1141 | type xos:role; | ||||
1142 | } | ||||
1143 | } | ||||
1144 | grouping payment { | ||||
1145 | leaf account { | ||||
1146 | type xos:account; | ||||
1147 | } | ||||
1148 | leaf amount { | ||||
1149 | type decimal64; | ||||
1150 | } | ||||
1151 | leaf date { | ||||
1152 | type xos:datetime; | ||||
1153 | } | ||||
1154 | } | ||||
1155 | |||||
1156 | grouping network-slice { | ||||
1157 | leaf network { | ||||
1158 | type xos:network; | ||||
1159 | } | ||||
1160 | |||||
1161 | leaf slice { | ||||
1162 | type xos:slice; | ||||
1163 | } | ||||
1164 | } | ||||
1165 | |||||
1166 | grouping account { | ||||
1167 | leaf site { | ||||
1168 | type xos:site; | ||||
1169 | } | ||||
1170 | } | ||||
1171 | |||||
1172 | grouping controller-slice-privilege { | ||||
1173 | leaf controller { | ||||
1174 | type xos:controller; | ||||
1175 | } | ||||
1176 | |||||
1177 | leaf slice-privilege { | ||||
1178 | type xos:slice-privilege; | ||||
1179 | } | ||||
1180 | |||||
1181 | container synchronizer { | ||||
1182 | if-feature synchronizer { | ||||
1183 | leaf role-id { | ||||
1184 | type string; | ||||
1185 | } | ||||
1186 | } | ||||
1187 | } | ||||
1188 | } | ||||
1189 | |||||
1190 | grouping site-credential { | ||||
1191 | leaf site { | ||||
1192 | type xos:site; | ||||
1193 | } | ||||
1194 | |||||
1195 | leaf key-id { | ||||
1196 | type string; | ||||
1197 | } | ||||
1198 | |||||
1199 | leaf enc-value { | ||||
1200 | type xos:encrypted-string; | ||||
1201 | } | ||||
1202 | } | ||||
1203 | |||||
1204 | grouping deployment-privilege { | ||||
1205 | leaf user { | ||||
1206 | type xos:user; | ||||
1207 | } | ||||
1208 | |||||
1209 | leaf deployment { | ||||
1210 | type xos:deployment; | ||||
1211 | } | ||||
1212 | |||||
1213 | leaf role { | ||||
1214 | type xos:role; | ||||
1215 | } | ||||
1216 | } | ||||
1217 | |||||
1218 | grouping network-parameter-type { | ||||
1219 | leaf description { | ||||
1220 | type string; | ||||
1221 | } | ||||
1222 | } | ||||
1223 | |||||
1224 | grouping deployment-role { | ||||
1225 | leaf role { | ||||
1226 | type string; | ||||
1227 | } | ||||
1228 | } | ||||
1229 | |||||
1230 | grouping project { | ||||
1231 | |||||
1232 | } | ||||
1233 | |||||
1234 | grouping slice-tag { | ||||
1235 | leaf slice { | ||||
1236 | type xos:slice; | ||||
1237 | } | ||||
1238 | |||||
1239 | leaf value { | ||||
1240 | type string; | ||||
1241 | } | ||||
1242 | } | ||||
1243 | |||||
1244 | grouping router { | ||||
1245 | leaf owner { | ||||
1246 | type xos:owner; | ||||
1247 | } | ||||
1248 | } | ||||
1249 | |||||
1250 | grouping service-resource { | ||||
1251 | leaf service-class { | ||||
1252 | type xos:service-class; | ||||
1253 | } | ||||
1254 | |||||
1255 | leaf max-units-deployment { | ||||
1256 | type uint32; | ||||
1257 | } | ||||
1258 | |||||
1259 | leaf max-units-node { | ||||
1260 | type uint32; | ||||
1261 | } | ||||
1262 | |||||
1263 | leaf max-duration { | ||||
1264 | type uint32; | ||||
1265 | } | ||||
1266 | |||||
1267 | leaf bucket-in-rate { | ||||
1268 | type uint32; | ||||
1269 | } | ||||
1270 | |||||
1271 | leaf bucket-max-size { | ||||
1272 | type uint32; | ||||
1273 | } | ||||
1274 | |||||
1275 | leaf cost { | ||||
1276 | type uint32; | ||||
1277 | } | ||||
1278 | |||||
1279 | leaf calendar-reservable { | ||||
1280 | type boolean; | ||||
1281 | } | ||||
1282 | } | ||||
1283 | |||||
1284 | grouping service-privilege { | ||||
1285 | leaf user { | ||||
1286 | type xos:user; | ||||
1287 | } | ||||
1288 | leaf service { | ||||
1289 | type xos:service; | ||||
1290 | } | ||||
1291 | leaf role { | ||||
1292 | type xos:role; | ||||
1293 | } | ||||
1294 | } | ||||
Peter K. Lee | cb2eb92 | 2016-09-01 18:02:31 -0700 | [diff] [blame] | 1295 | |
Peter K. Lee | f4d38d3 | 2016-07-23 02:47:38 -0700 | [diff] [blame] | 1296 | /*** main configuration tree for XOS ***/ |
Peter K. Lee | 2bade4d | 2016-07-14 16:19:56 -0700 | [diff] [blame] | 1297 | |
1298 | container api { | ||||
Peter K. Lee | f4d38d3 | 2016-07-23 02:47:38 -0700 | [diff] [blame] | 1299 | description |
1300 | "The primary configuration interaction endpoint"; | ||||
1301 | |||||
Peter K. Lee | 2bade4d | 2016-07-14 16:19:56 -0700 | [diff] [blame] | 1302 | container service { |
Peter K. Lee | f4d38d3 | 2016-07-23 02:47:38 -0700 | [diff] [blame] | 1303 | description |
1304 | "placeholder endpoint for services to augment"; | ||||
Peter K. Lee | 2bade4d | 2016-07-14 16:19:56 -0700 | [diff] [blame] | 1305 | } |
1306 | container tenant { | ||||
Peter K. Lee | f4d38d3 | 2016-07-23 02:47:38 -0700 | [diff] [blame] | 1307 | description |
1308 | "placeholder endpoint for tenants to augment"; | ||||
Peter K. Lee | 2bade4d | 2016-07-14 16:19:56 -0700 | [diff] [blame] | 1309 | } |
1310 | } | ||||
1311 | |||||
1312 | } |