blob: 3de5ba34ac0c2c73bdfda44b0abc614403a87c5c [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
Peter K. Leef4d38d32016-07-23 02:47:38 -070013 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. Lee2bade4d2016-07-14 16:19:56 -070029 import ietf-yang-types { prefix yang; }
Peter K. Lee55395802016-07-15 18:25:40 -070030 import ietf-inet-types { prefix inet; }
Peter K. Lee2bade4d2016-07-14 16:19:56 -070031
Peter K. Leef4d38d32016-07-23 02:47:38 -070032 feature synchronizer {
33 description
34 "Enables configuration synchronization to the distributed store.";
Peter K. Lee2bade4d2016-07-14 16:19:56 -070035 }
36
37 identity kind;
38 identity generic { base kind; }
39 identity subscriber { base kind; }
40
41 typedef unique-identifier {
42 description "defines valid formats for external reference id";
43 type union {
Peter K. Lee4302f472016-07-28 03:51:39 -070044 type uint32 { range 1..max; }
Peter K. Lee2bade4d2016-07-14 16:19:56 -070045 type yang:uuid;
46 type inet:uri;
Peter K. Lee2bade4d2016-07-14 16:19:56 -070047 }
48 }
49
50 grouping tenant-root {
Peter K. Lee2bade4d2016-07-14 16:19:56 -070051 description
52 "A Tenant Root is one of the things that can sit at the root of a chain
53 of tenancy. This object represents a node.";
54
55 leaf id {
56 type unique-identifier;
Peter K. Lee2bade4d2016-07-14 16:19:56 -070057 mandatory true;
58 }
59 leaf kind {
60 type identityref {
61 base kind;
62 }
63 default generic;
64 }
65 leaf name {
66 type string {
67 length 0..255;
68 }
69 description "Specify name of the TenantRoot";
70 }
71
72 leaf service-specific-attribute { type string; }
73 leaf service-specific-id {
74 type unique-identifier;
75 mandatory true;
76 }
77
78 list subscribed-tenants {
79 config false;
80 // not exactly clear how this is populated
81 }
Peter K. Lee2bade4d2016-07-14 16:19:56 -070082 }
83
84 grouping subscriber {
85 uses tenant-root {
86 refine kind { default subscriber; }
87 }
88 // seems we should have interesting attributes specific to subscriber?
Peter K. Lee2bade4d2016-07-14 16:19:56 -070089 }
90
Peter K. Leef4d38d32016-07-23 02:47:38 -070091 /*** main configuration tree for XOS ***/
Peter K. Lee2bade4d2016-07-14 16:19:56 -070092
93 container api {
Peter K. Leef4d38d32016-07-23 02:47:38 -070094 description
95 "The primary configuration interaction endpoint";
96
Peter K. Lee2bade4d2016-07-14 16:19:56 -070097 container service {
Peter K. Leef4d38d32016-07-23 02:47:38 -070098 description
99 "placeholder endpoint for services to augment";
Peter K. Lee2bade4d2016-07-14 16:19:56 -0700100 }
101 container tenant {
Peter K. Leef4d38d32016-07-23 02:47:38 -0700102 description
103 "placeholder endpoint for tenants to augment";
Peter K. Lee2bade4d2016-07-14 16:19:56 -0700104 }
105 }
106
107}