/
xos-topology.yang
224 lines (215 loc) · 4.41 KB
/
xos-topology.yang
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
module xos-topology {
namespace "urn:ietf:params:xml:ns:yang:xos-topology";
prefix xtop;
yang-version 1.1;
import ietf-yang-types { prefix yang; }
import ietf-inet-types { prefix inet; }
import yang-meta-types { prefix meta; }
import xos-controller { prefix xos; }
import xos-types { prefix xtype; }
organization
"Open Networking Lab (XOS) / Corenova Technologies";
contact
"Larry Peterson <llp@onlab.us>
Peter K. Lee <peter@corenova.com>";
description
"This module contains a collection of Topology models for XOS.
Copyright (c) 2016 ON.LAB and the persons identified as authors of
the code. All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, is permitted pursuant to, and subject to the license
terms of the Apache License, Version 2.0 which accompanies this
distribution, and is available at
(http://www.apache.org/licenses/LICENSE-2.0).";
revision 2016-09-13 {
description "Initial revision.";
}
grouping deployment {
uses xos:provider {
refine "name" { description "Name of the deployment"; }
}
leaf-list sites {
config false;
type leafref {
path "/xos:core/site/id";
}
}
leaf-list templates {
type leafref {
path "/xos:core/template/id";
}
}
}
grouping site {
uses xos:provider {
refine "name" { description "Name of the site"; }
}
leaf site-url {
description "A URL describing the purpose of this site";
type inet:uri;
}
container location {
leaf geoposition {
type string; // what is this data format?
}
leaf longitude {
type decimal64;
}
leaf latitude {
type decimal64;
}
}
leaf is-public {
type boolean;
}
leaf login-base {
type string;
}
leaf deployment {
type leafref {
path "/xos:core/deployment/id";
}
}
leaf-list nodes {
config false;
type leafref {
path "/xos:core/node/id";
}
}
leaf-list users {
config false;
type leafref {
path "/xos:core/user/id";
}
}
leaf hosts-nodes {
config false;
type boolean;
}
leaf hosts-users {
config false;
type boolean;
}
container synchronizer {
if-feature xos:synchronizer;
leaf availability-zone {
type string;
}
}
}
grouping node {
uses xos:tenant;
leaf site {
type leafref {
path "/xos:core/site/id";
}
}
leaf deployment {
config false;
type leafref {
path "/xos:core/deployment/id";
}
}
}
grouping user {
uses xos:tenant {
refine 'name' {
config false;
description "Name of the user";
}
}
leaf firstname {
type meta:person-name;
}
leaf lastname {
type meta:person-name;
}
leaf email {
type meta:email-address;
}
leaf phone {
type meta:phone-number;
}
leaf timezone {
type meta:timezone;
}
leaf site {
type leafref {
path "/xos:core/site/id";
}
}
container credential {
leaf username {
type yang:yang-identifier;
}
leaf password {
type meta:password;
}
leaf role {
type xtype:access-role;
}
leaf public-key {
type string;
}
leaf login-page {
type inet:uri;
}
leaf last-login {
config false;
type yang:date-and-time;
}
}
}
grouping network-template {
uses xos:tenant;
leaf guaranteed-bandwidth {
type uint32;
}
leaf visibility {
type string;
}
leaf translation {
type string;
}
leaf access {
type string;
}
leaf shared-network-name {
type string;
}
leaf shared-network-id {
type string;
}
leaf topology-kind {
type string;
}
leaf controller-kind {
type string;
}
}
/*
* Augmentations to XOS core
*/
augment "/xos:core" {
list template {
key id;
uses xtop:network-template;
}
list deployment {
key id;
uses xtop:deployment;
}
list site {
key id;
uses xtop:site;
}
list node {
key id;
uses xtop:node;
}
list user {
key id;
uses xtop:user;
}
}
}