blob: b46cb7d2d251dba5936ed1143e8619a0dfba6f00 [file] [log] [blame]
Sean Condonfae8e662016-12-15 10:25:13 +00001module ietf-system-microsemi {
2
3 namespace "http://www.microsemi.com/microsemi-edge-assure/msea-system";
4 prefix "sys-ms";
5
6 import ietf-yang-types {
7 prefix yang;
8 revision-date 2013-07-15;
9 }
10
11 import ietf-inet-types {
12 prefix inet;
13 revision-date 2013-07-15;
14 }
15
16 import msea-types {
17 prefix msea;
18 revision-date 2016-02-29;
19 }
20
21 import ietf-system {
22 prefix sys;
23 revision-date 2014-08-06;
24 }
25
Sean Condon1dbcd712017-10-19 12:09:21 +010026// import ietf-netconf-acm {
27// prefix nacm;
28// revision-date 2012-02-22;
29// }
Sean Condonfae8e662016-12-15 10:25:13 +000030
31 /*** META INFORMATION ***/
32
33 organization
34 "Microsemi Inc., FTD Division";
35
36 contact
37 "Web URL: http://www.microsemi.com/
38 E-mail: info@microsemi.com
39 Postal: Microsemi Corporation Corporate Headquarters
40 One Enterprise Aliso Viejo,
41 CA 92656
42 U.S.A.
43 Phone: +1 949 380 6100
44 Fax: +1 949 215-4996";
45
46 description
47 "This YANG module extends the IETF System objects with some extra configuration attributes
48
49 Copyright 2015 Microsemi Inc.
50 All rights reserved.";
51
52 reference "RFC 7317: A YANG Data Model for System Management";
53
54 revision "2016-05-05" {
55 description
56 "Updated for ZTP support - Sean Condon, Microsemi";
57 }
58
59 revision "2015-10-01" {
60 description
61 "Initial version to augment IETF-SYSTEM YANG module - Sean Condon, Microsemi";
62 }
63
64 typedef identifier {
65 type string {
66 length "1..255";
67 pattern "[a-zA-Z0-9\-._]*";
68 }
69 description
70 "A simple string with only alphabetic or numeric and dash, dot and underscore";
71 }
72
73 grouping upgrade-file-attributes {
74 leaf file-name {
75 type string;
76 description "The name of the update TAR file as found on the device";
77 }
78
79 leaf file-date {
80 type yang:date-and-time;
81 description "The date of the update TAR file as found on the device";
82 }
83
84 leaf file-size {
85 type uint32;
86 description "The size of the update TAR file as found on the device";
87 }
88 }
89
90
91 grouping upgrade-attributes {
92 description "Attributes from the /update.tar file";
93
94 leaf version {
95 type uint32;
96 description "The version of this portion of the /update.tar";
97 }
98
99 leaf crc32 {
100 type uint32;
101 description "The CRC32 value of this portion of the /update.tar";
102 }
103
104 leaf length {
105 type uint32;
106 description "The length of this portion of the /update.tar";
107 }
108 }
109
110 grouping ddm-attributes {
111
112 leaf high-alarm-thresh {
113 description "The high alarm threshold value";
114 type decimal64 {
115 fraction-digits 6;
116 }
117 }
118
119 leaf high-warn-thresh {
120 description "The high warn threshold value";
121 type decimal64 {
122 fraction-digits 6;
123 }
124 }
125
126 leaf low-warn-thresh {
127 description "The low warn threshold value";
128 type decimal64 {
129 fraction-digits 6;
130 }
131 }
132
133 leaf low-alarm-thresh {
134 description "The low alarm threshold value";
135 type decimal64 {
136 fraction-digits 6;
137 }
138 }
139 }
140
141 feature serial-number {
142 description "Set of readonly attributes that identify the hardware";
143 }
144
145 feature remote-upgrade {
146 description
147 "Indicates that the device supports upgrade of fabric, linux and fabric header.
148 This expects a file /update.tar on the device -
149 put there through SFTP or some other file transfer method";
150 }
151
152
153 augment "/sys:system" {
154 description
155 "Extends the SYSTEM with some extra configuration attributes required for setup.";
156
157 leaf asset-tag { //Microsemi specific configuration attribute
158 type identifier;
159 description
160 "An asset tag field for the device.";
161 }
162
163 leaf description { //Microsemi specific configuration attribute
164 type string {
165 length "0..256";
166 pattern "[a-zA-Z0-9\\-_. ,]*";
167 }
168 description "A description for the device.";
169 }
170
171 leaf longitude { //Microsemi specific configuration attribute
172 type decimal64 {
173 fraction-digits 7;
174 range "-180..180";
175 }
176 description
177 "Longitude for the device expressed in decimal degrees.
178 Positive values represent East and negative values represent West";
179 }
180
181 leaf latitude { //Microsemi specific configuration attribute
182 type decimal64 {
183 fraction-digits 7;
184 range "-90..90";
185 }
186 description
187 "Latitude for the device expressed in decimal degrees
188 Positive values represent North and negative values represent South";
189 }
190 }
191
192
193 augment "/sys:system-state" {
194 description
195 "Extends the SYSTEM-STATE with some extra configuration attributes required for setup.
196
197 All attributes are automatically config=false because they extend system-state";
198
199 container remote-upgrade {
200 description "Details of the /update.tar file present on the system.
201 These are all read-only because they are under system-state";
202
203 choice file-present-choice {
204 case not-present {
205 leaf file-not-found {
206 type string;
207 description "Gives the name of the expected file. Usually /update.tar";
208 }
209 }
210
211 case file-present {
212 uses upgrade-file-attributes;
213
214 leaf file-validity {
215 type string;
216 description "Gives an indication if the file is valid, or if not, the reason why";
217 }
218
219 container fabric-image {
220 uses upgrade-attributes;
221 }
222
223 container linux-image {
224 uses upgrade-attributes;
225 }
226 }
227 }
228 }
229
230 leaf hostname {
231 type string;
232 description "The hostname of the system. When DHCP or ZTP
233 is active the hostname will not be configured through NETCONF";
234 }
235
236 container ntp {
237 if-feature sys:ntp;
238 description "The list of NTP servers active on the system. When DHCP or ZTP
239 is active the NTP servers will not be configured through NETCONF";
240
241 leaf-list server {
242 type string;
243 description "An NTP server active on the system";
244 }
245 }
246
247 container dns-resolver {
248 description "The list of DNS servers active on the system. When DHCP or ZTP
249 is active the DNS servers will not be configured through NETCONF";
250
251 leaf-list server {
252 type string;
253 description "A DNS server active on the system";
254 }
255
256 leaf-list search {
257 type string;
258 description "A DNS search domain active on the system";
259 }
260
261 }
262
263 container diagnostic-monitoring {
264
265 container temperature {
266 description "The temperature and thresholds of the device";
267
268 leaf measured {
269 description "The measured transceiver temperature at the current time";
270 type decimal64 {
271 fraction-digits 6;
272 }
273 units "°C";
274 reference
275 "SFF-8472 Specification for Diagnostic Monitoring Interface for Optical
276 Transceivers Rev 12.1 September 12, 2014 Section 9.1";
277 }
278
279 uses ddm-attributes;
280 }
281
282 container voltage {
283 description "The core voltage and thresholds of the device";
284
285 leaf measured {
286 description "The measured voltage at the current time";
287 type decimal64 {
288 fraction-digits 6;
289 }
290 units "V";
291 reference
292 "SFF-8472 Specification for Diagnostic Monitoring Interface for Optical
293 Transceivers Rev 12.1 September 12, 2014 Section 9.1";
294 }
295
296 uses ddm-attributes;
297 }
298
299 container tx-bias {
300 description "The transmit (Tx) bias and thresholds of the device";
301
302 leaf measured {
303 description "The measured transmit (Tx) bias at the current time";
304 type decimal64 {
305 fraction-digits 6;
306 }
307 units "mA";
308 reference
309 "SFF-8472 Specification for Diagnostic Monitoring Interface for Optical
310 Transceivers Rev 12.1 September 12, 2014 Section 9.1";
311 }
312
313 uses ddm-attributes;
314 }
315
316 container tx-power {
317 description "The transmit (Tx) power and thresholds of the device";
318
319 leaf measured {
320 description "The measured transmit (Tx) power at the current time";
321 type decimal64 {
322 fraction-digits 6;
323 }
324 units "mV";
325 reference
326 "SFF-8472 Specification for Diagnostic Monitoring Interface for Optical
327 Transceivers Rev 12.1 September 12, 2014 Section 9.1";
328 }
329
330 uses ddm-attributes;
331 }
332
333 container rx-power {
334 description "The receive (Rx) power and thresholds of the device";
335
336 leaf measured {
337 description "The measured receive (Rx) power at the current time";
338 type decimal64 {
339 fraction-digits 6;
340 }
341 units "mV";
342 reference
343 "SFF-8472 Specification for Diagnostic Monitoring Interface for Optical
344 Transceivers Rev 12.1 September 12, 2014 Section 9.1";
345 }
346
347 uses ddm-attributes;
348 }
349 }
350 }
351
352 augment "/sys:system-state/sys:platform" {
353 description
Sean Condon1dbcd712017-10-19 12:09:21 +0100354 "Extends the SYSTEM-STATE platform with some extra configuration attributes required for setup.
Sean Condonfae8e662016-12-15 10:25:13 +0000355
356 All attributes are automatically config=false because they extend system-state";
357
358 container device-identification {
359 if-feature serial-number;
360 config false;
361
362 leaf vendor-name {
363 type string;
364 description
365 "Device Vendor Name";
366 reference
367 "SFF-8472 Specification for Diagnostic Monitoring Interface for Optical
368 Transceivers Rev 12.1 September 12, 2014 Table 4-1 Address A0H Bytes 20-35";
369 }
370
371 leaf vendor-part-number {
372 type string;
373 description
374 "Device Vendor Part Number";
375 reference
376 "SFF-8472 Specification for Diagnostic Monitoring Interface for Optical
377 Transceivers Rev 12.1 September 12, 2014 Table 4-1 Address A0H Bytes 40-55";
378 }
379
380 leaf vendor-revision {
381 type string;
382 description
383 "Device Vendor Revision";
384 reference
385 "SFF-8472 Specification for Diagnostic Monitoring Interface for Optical
386 Transceivers Rev 12.1 September 12, 2014 Table 4-1 Address A0H Bytes 56-59";
387 }
388
389 leaf serial-number {
390 type string;
391 description
392 "Device Serial Number";
393 reference
394 "SFF-8472 Specification for Diagnostic Monitoring Interface for Optical
395 Transceivers Rev 12.1 September 12, 2014 Table 4-1 Address A0H Bytes 68-83";
396 }
397
398 container processor {
399 description "Details of the processor hardware in the device";
400
401 leaf serialnumber {
402 type yang:hex-string;
403 description "The serial number of the processor";
404 }
405
406 leaf x509-device-certificate-pem {
407 type string;
408 description "X509 Device certificate in PEM (Base 64 format)";
409 }
410 }
411 }
412 }
Sean Condonfae8e662016-12-15 10:25:13 +0000413}