forked from bclaise/confd-module-catalog
-
Notifications
You must be signed in to change notification settings - Fork 0
/
openconfig-module-catalog.yang
333 lines (330 loc) · 10.2 KB
/
openconfig-module-catalog.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
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
module openconfig-module-catalog {
yang-version "1.1";
// namespace
namespace "http://openconfig.net/yang/module-catalog";
prefix "oc-cat";
// import some basic types
import ietf-inet-types { prefix inet; }
import openconfig-catalog-types { prefix oc-cat-types; }
import openconfig-extensions { prefix oc-ext; }
import openconfig-release-bundle { prefix oc-relbundle; }
// meta
organization "OpenConfig working group";
contact
"OpenConfig working group
www.openconfig.net";
description
"This module provides a schema for cataloging and descrbing
YANG models published across various organizations.";
oc-ext:openconfig-version "0.1.0";
revision "2016-02-15" {
description
"Initial OpenConfig public release";
reference "0.1.0";
}
revision "2015-10-18" {
description
"Initial revision";
reference "TBD";
}
// extension statements
// feature statements
// identity statements
// typedef statements
// grouping statements
grouping module-implementation-information {
description
"Data describing any available implementations";
container implementations {
description
"Container for module implementation information";
list implementation {
key "implementation-id";
description
"List of available implementations, keyed by an identifier
provided by either the implementor or the module
maintainer. Such a key avoids needing a complex composite
key to uniquely identify an implementation.";
leaf implementation-id {
type string;
description
"An identifier for the implementation, provided by the
implementor or the module maintainer. This id should
uniquely identify a specific implementation of the
module, e.g., based on the vendor, platform, and platform
version.";
}
leaf description {
type string;
description
"A text summary of important information about the
implementation";
}
leaf reference {
type union {
type string;
type inet:uri;
}
description
"A URI or text reference to more detailed information
about the implementation.";
}
leaf implementor-name {
type string;
description
"Name of the vendor or entity providing the module
implementation";
}
leaf platform {
type string;
description
"Name of the server platform on which the implementation
is available -- this could be the model name of a network
device, a server OS, etc.";
}
leaf platform-version {
type string;
description
"Implementor-defined version name or number for the
module implementation, corresponding to the platform.
This could be the firmware version of a network device
such as a router, OS version, or other server platform
version.";
}
leaf implementation-status {
type identityref {
base oc-cat-types:IMPLEMENTATION_STATUS_TYPE;
}
description
"Indicates the status of the implementation, e.g.,
complete, partial, in-progress, etc. Implementors
may define additional values for the base identity";
}
}
}
}
grouping module-dependency-information {
description
"Information about module dependencies";
container dependencies {
description
"Container for information about module dependencies";
list required-module {
key "module-name module-revision";
leaf module-name {
type leafref {
path "../../../name";
require-instance false; // To avoid load ordering
}
}
leaf module-revision {
type leafref {
path "../../../revision";
require-instance false; // To avoid load ordering
}
}
description
//TODO: should this list be complete, or only the first-
//level dependencies?
"A simple list of modules that are prerequisites for the
current module. It is expected that each of the required
modules would in turn list their dependencies. The list
values should be references to other modules in the
catalog.";
}
}
}
grouping module-classification-information {
description
"Data describing the module's classification(s)";
container classification {
description
"Container for data describing the module's classification";
leaf deployment-status {
type identityref {
base oc-cat-types:MODULE_STATUS_TYPE;
}
description
"Deployment status of the module -- experimental,
standards-track, production, etc.";
}
leaf category {
type identityref {
base oc-cat-types:MODULE_CATEGORY_BASE;
}
description
"Categorization of the module based on identities defined
or used by the publishing organizations.";
}
leaf subcategory {
type identityref {
base oc-cat-types:MODULE_SUBCATEGORY_BASE;
}
description
"Sub-categorization of the module based on identities
defined or used by the publishing organizations.";
}
}
}
grouping module-usage-information {
description
"Data pertaining to retrieval and usage of the module";
container module-usage {
description
"Container for data pertaining to retrieval and usage of the
module";
leaf authentication {
//TODO: requires more detailed model for different types
//of authentication / validation schemes
type string;
description
"Authentication information to allow
users to verify that the model originates from
stated organization, e.g., X.509 certificate";
}
leaf md5-hash {
type string;
description
"MD5 hash of the module file, used by users to validate
data integrity";
}
leaf module-access-uri {
type inet:uri;
description
"URI where module can be downloaded. Modules may be
made available from the catalog maintainer, or directly
from the publisher";
}
leaf supporting-document-uri {
type inet:uri;
description
"URI where the document that defines the YANG module can
be found. This is for situations when the YANG module
is published as part of the content of a non-YANG (e.g.
plain text or PDF) document.";
}
}
}
grouping module-base-information {
description
"Basic information describing the module, e.g., the
YANG metadata in the module preface.";
leaf name {
type string;
description
"The module name, as defined in the YANG module file.";
}
leaf namespace {
//type inet:uri;
type string;
description
"Published namespace of module";
}
leaf prefix {
type string;
description "Published prefix of module";
}
leaf revision {
type string;
description
"Date in the revision statement of the module";
}
leaf summary {
type string;
description
"Brief summary of the module description";
}
leaf module-version {
type string;
description
"Optional version number for the module, in addition to the
YANG revision statement";
}
container module-hierarchy {
description
"YANG module hierarchy specification";
leaf module-hierarchy-level {
type uint8 {
range 1..5;
}
default 1;
description
"Module hierarchy level. If this is a sub-module,
it is set to > 1, depending
on the hierarchy level of the sub-module";
}
leaf module-parent {
when "../module-hierarchy-level > '0'" {
description "Only applicable to sub-modules";
}
type leafref {
path "../../name";
require-instance false; // To avoid load ordering
}
description
"Parent module, if this is a sub-module";
}
}
} //module-base-information
grouping organization-information {
description
"Data describing the publisher of the module";
leaf name {
type identityref {
base "oc-cat-types:organization";
}
description
"Name of Organization defining YANG Module:
Standards Body examples:
ietf, ieee, opendaylight, etc.
Commercial entity examples:
AT&T, Facebook
Name of industry forum examples:
openconfig, other";
}
leaf type {
type identityref {
base oc-cat-types:ORGANIZATION_TYPE;
}
description
"YANG modules publication authority";
}
leaf contact {
type string;
description
"Contact information for the publishing organization";
}
}
grouping module-catalog-top {
description
"Top level structure of the module catalog";
container organizations {
description
"List of organizations owning modules";
list organization {
key "name";
description
"List of organizations defining the YANG Modules";
uses organization-information;
uses oc-relbundle:release-bundle-top;
container modules {
description
"Modules published by this organization";
list module {
key "name revision";
description
"List of published modules from the organization";
uses module-base-information;
uses module-classification-information;
uses module-dependency-information;
uses module-usage-information;
uses module-implementation-information;
}
}
}
}
}
// data definition statements
uses module-catalog-top;
// augment statements
}