blob: b0d4eaf66013890c331c6875ab66aac64b4805a3 [file] [log] [blame]
Peter K. Lee2bade4d2016-07-14 16:19:56 -07001module xos-core {
Peter K. Lee55395802016-07-15 18:25:40 -07002 namespace "urn:onlab:xos:core";
Peter K. Lee2bade4d2016-07-14 16:19:56 -07003 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
13 import ietf-yang-types { prefix yang; }
Peter K. Lee55395802016-07-15 18:25:40 -070014 import ietf-inet-types { prefix inet; }
Peter K. Lee2bade4d2016-07-14 16:19:56 -070015
16 revision 2016-07-14 {
17 description "Initial revision.";
18 }
19
20 identity kind;
21 identity generic { base kind; }
22 identity subscriber { base kind; }
23
24 typedef unique-identifier {
25 description "defines valid formats for external reference id";
26 type union {
27 type yang:uuid;
28 type inet:uri;
29 type uint32 { range 1..max; }
30 }
31 }
32
33 grouping tenant-root {
34
35 description
36 "A Tenant Root is one of the things that can sit at the root of a chain
37 of tenancy. This object represents a node.";
38
39 leaf id {
40 type unique-identifier;
Peter K. Lee2bade4d2016-07-14 16:19:56 -070041 mandatory true;
42 }
43 leaf kind {
44 type identityref {
45 base kind;
46 }
47 default generic;
48 }
49 leaf name {
50 type string {
51 length 0..255;
52 }
53 description "Specify name of the TenantRoot";
54 }
55
56 leaf service-specific-attribute { type string; }
57 leaf service-specific-id {
58 type unique-identifier;
59 mandatory true;
60 }
61
62 list subscribed-tenants {
63 config false;
64 // not exactly clear how this is populated
65 }
66
67 }
68
69 grouping subscriber {
70 uses tenant-root {
71 refine kind { default subscriber; }
72 }
73 // seems we should have interesting attributes specific to subscriber?
74
75 }
76
77 // main configuration tree for XOS
78
79 container api {
80 container service {
81 // placeholder endpoint for services
82 }
83 container tenant {
84 container cord {
85 // placeholder endpoint for augment
86 }
87 container onos {
88 // placeholder endpoint for augment
89 }
90 }
91 }
92
93}