blob: 842a5374329e065724445c595adda644c92d52d7 [file] [log] [blame]
Peter K. Lee2bade4d2016-07-14 16:19:56 -07001module xos-core {
2 namespace "urn:xos:core:service";
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
13 import ietf-yang-types { prefix yang; }
14
15 revision 2016-07-14 {
16 description "Initial revision.";
17 }
18
19 identity kind;
20 identity generic { base kind; }
21 identity subscriber { base kind; }
22
23 typedef unique-identifier {
24 description "defines valid formats for external reference id";
25 type union {
26 type yang:uuid;
27 type inet:uri;
28 type uint32 { range 1..max; }
29 }
30 }
31
32 grouping tenant-root {
33
34 description
35 "A Tenant Root is one of the things that can sit at the root of a chain
36 of tenancy. This object represents a node.";
37
38 leaf id {
39 type unique-identifier;
40 config false;
41 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}