blob: 6d4244c6af92635452ebc201ec5287559beef24d [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;
41 config false;
42 mandatory true;
43 }
44 leaf kind {
45 type identityref {
46 base kind;
47 }
48 default generic;
49 }
50 leaf name {
51 type string {
52 length 0..255;
53 }
54 description "Specify name of the TenantRoot";
55 }
56
57 leaf service-specific-attribute { type string; }
58 leaf service-specific-id {
59 type unique-identifier;
60 mandatory true;
61 }
62
63 list subscribed-tenants {
64 config false;
65 // not exactly clear how this is populated
66 }
67
68 }
69
70 grouping subscriber {
71 uses tenant-root {
72 refine kind { default subscriber; }
73 }
74 // seems we should have interesting attributes specific to subscriber?
75
76 }
77
78 // main configuration tree for XOS
79
80 container api {
81 container service {
82 // placeholder endpoint for services
83 }
84 container tenant {
85 container cord {
86 // placeholder endpoint for augment
87 }
88 container onos {
89 // placeholder endpoint for augment
90 }
91 }
92 }
93
94}