Merge "fix oauth code"
[ccsdk/features.git] / sdnr / wt / data-provider / model / src / main / yang / data-provider@2020-11-10.yang
1 module data-provider {
2
3   yang-version 1.1;
4   namespace "urn:opendaylight:params:xml:ns:yang:data-provider";
5   prefix odluxprovider;
6
7   import ietf-yang-types {
8     prefix yang;
9     reference
10       "RFC 6991: Common YANG Data Types.";
11   }
12
13   import org-openroadm-pm-types {
14     prefix org-openroadm-pm-types;
15     revision-date 2019-11-29;
16     reference
17       "OpenROADM: YANG definitions of performance management types";
18   }
19   
20   organization
21     "highstreet technologies GmbH";
22   contact
23     "Web:   <https://highstreet-technologies.com>
24      ONAP:  <https://wiki.onap.org/display/DW/ODLUX+DB+API>";
25
26   description
27     "This module defines the API for the data-provider component.
28
29      Copyright 2019 highstreet technologies GmbH Intellectual Property.
30      All rights reserved.
31
32      Licensed under the Apache License, Version 2.0 (the 'License');
33      you may not use this file except in compliance with the License.
34      You may obtain a copy of the License at
35
36        http://www.apache.org/licenses/LICENSE-2.0
37
38      Unless required by applicable law or agreed to in writing, software
39      distributed under the License is distributed on an 'AS IS' BASIS,
40      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
41      See the License for the specific language governing permissions and
42      limitations under the License.";
43
44   revision 2020-11-10 {
45       description
46         "Support for GUI Cut through and V2 PM model";
47       reference
48         "https://jira.onap.org/browse/SDNC-1396";
49   }
50   
51   revision 2019-08-01 {
52     description
53       "Initial revision";
54     reference
55       "https://jira.onap.org/browse/SDNC-879";
56   }
57
58   // --- typedef
59
60   typedef Entity {
61     type enumeration {
62       enum connectionlog {
63         description
64           "logs mountpoint connection state changes";
65       }
66       enum faultcurrent {
67         description
68           "current faults";
69       }
70       enum eventlog {
71         description
72           "logs for all notifications e.g. NetConf, ves and internal events";
73       }
74       enum faultlog {
75         description
76           "faultlog information";
77       }
78       enum historicalperformance15min {
79         description
80           "performance data";
81       }
82       enum historicalperformance24h {
83         description
84           "performance data";
85       }
86       enum mediator-server {
87         description
88           "list of mediator servers";
89       }
90       enum networkelement-connection {
91         description
92           "list of mountpoints for NetConf devices (joint required-network-element+mdsal
93               state";
94       }
95       enum inventoryequipment {
96         description
97           "list of equipment inventory";
98       }
99       enum maintenancemode {
100         description
101           "list of maintenance setting";
102       }
103       enum guicutthrough {
104         description
105            "list of GUI Cut through entries";
106       }
107     }
108     description
109       "Data type and alias for elasticsearch or table name for SQL database.";
110   }
111
112   typedef SortOrder {
113     type enumeration {
114       enum ascending {
115         description
116           "Self explaining.";
117       }
118       enum descending {
119         description
120           "Self explaining.";
121       }
122     }
123     description
124       "Entities for odlux clients";
125   }
126
127   typedef FilterProperty {
128     type string;
129     description
130       "A string type describing a property (attribute, column, parameter)
131        filter";
132   }
133
134   typedef NotificationType {
135     type enumeration {
136       enum ProblemNotificationXml {
137         description
138           "A fault (alarm, problem) notification type in XML format.";
139       }
140       enum AttributeValueChangedNotificationXml {
141         description
142           "An attribute value change notification type in XML format.";
143       }
144     }
145     description
146       "An enumeration describing the found notification type.";
147   }
148
149   typedef ConnectionLogStatus {
150     type enumeration {
151       enum Mounted {
152         description
153           "Mountpoint created";
154       }
155       enum Unmounted {
156         description
157           "Mountpoint removed";
158       }
159       enum Connecting {
160         description
161           "Mountpoint establishing connection";
162       }
163       enum Connected {
164         description
165           "Mountpoint connection established";
166       }
167       enum UnableToConnect {
168         description
169           "Mountpoint connection not possible";
170       }
171       enum Disconnected {
172         description
173           "Required and mountpoint removed";
174       }
175       enum Undefined {
176         description
177           "Status not available";
178       }
179     }
180     description
181       "An enumeration describing connection states.";
182   }
183
184   typedef NetworkElementDeviceType {
185     type enumeration {
186       enum Wireless {
187         description
188           "implements microwave-model.yang or air-interface.yang";
189       }
190       enum RAN {
191         description
192           "implements sth. like o-ran*.yang";
193       }
194       enum ORAN {
195         description
196           "implements RAN according to o-ran*.yang";
197       }
198       enum RAN3GPP {
199         description
200           "implements RAN according to _3gpp-ran*.yang";
201       }
202       enum Optical {
203         description
204           "implements tapi-*.yang or org-openroadm*.yang";
205       }
206       enum Router {
207         description
208           "implements vlan-interface.yang";
209       }
210       enum NtsManager {
211         description
212           "Manage adapter to simulate devices";
213       }
214       enum Nonsupported {
215         description
216           "Device type known, but not support";
217       }
218       enum Unknown {
219         description
220           "Device type at this point of time unknown";
221       }
222       enum O-RAN-FH {
223         description
224           "implements RAN according to o-ran*.yang fro for fronthaule";
225       }
226       enum O-ROADM {
227           description
228             "implements Open ROADM";
229         }
230       enum O1-TR069 {
231           description
232             "implements O1 RAN interface according to TR069";
233       }
234     }
235     description
236       "An enumeration as identification of the device.";
237   }
238
239   typedef severity-type {
240     type enumeration {
241       enum NonAlarmed {
242         description
243           "problem cleared indication";
244       }
245       enum Warning {
246         description
247           "problem level";
248       }
249       enum Minor {
250         description
251           "problem level";
252       }
253       enum Major {
254         description
255           "problem level";
256       }
257       enum Critical {
258         description
259           "problem level";
260       }
261     }
262     description
263       "According to ITU-T M.3160";
264   }
265
266   typedef source-type {
267     type enumeration {
268       enum Ves {
269         description
270           "VES Interface";
271       }
272       enum Netconf {
273         description
274           "NetConf Interface";
275       }
276       enum Controller {
277         description
278           "SDN Controller";
279       }
280       enum Unknown {
281         description
282           "Unknown source";
283       }
284     }
285     description
286       "An enumeration for the information source of an event/notification.";
287   }
288
289   typedef granularity-period-type {
290     type enumeration {
291       enum unknown {
292         description
293           "none";
294       }
295       enum period-15-min {
296         description
297           "none";
298       }
299       enum period-24-hours {
300         description
301           "none";
302       }
303     }
304     description
305       "The enumeration with the options for granularity period of the
306        performance data similar to g.874.1-model";
307   }
308   
309   typedef entity-type {
310       type enumeration {
311         enum device {
312           description
313             "none";
314         }
315         enum ltp {
316           description
317             "none";
318         }
319       }
320       description
321         "The enumeration with the type of requested information";
322     }
323
324
325   // --- grouping and builder-container
326
327   grouping connectionlog-entity {
328     leaf id {
329       type string;
330       description
331         "database id";
332     }
333     leaf node-id {
334       type string;
335       description
336         "the node/mountpoint which connection state has changed";
337     }
338     leaf timestamp {
339       type yang:date-and-time;
340       description
341         "timestamp when event happened, preferred in UTC time format.";
342     }
343     leaf status {
344       type ConnectionLogStatus;
345       description
346         "new state of the connection of the device";
347     }
348     description
349       "An object class describing an entry in the connection status log.";
350   }
351
352   container connectionlog {
353     description
354       "builder";
355     uses connectionlog-entity;
356   }
357
358   grouping object-change-reference {
359     description
360       "Reference of of object (e.g. Interface pack) owned by a node";
361     leaf node-id {
362       type string;
363       description
364         "A network wide unique identifier of the NetConf server.";
365     }
366     leaf counter {
367       type int32;
368       description
369         "An arbitrary counter value.";
370     }
371     leaf timestamp {
372       type yang:date-and-time;
373       description
374         "The time of the reported change, preferred in UTC time format. ";
375     }
376     leaf object-id {
377       type string;
378       description
379         "The identifier of the reporting object (resource).";
380     }
381   }
382
383   grouping source-reference {
384     description
385       "Identify a source";
386     leaf source-type {
387       type source-type;
388       description
389         "The source type.";
390     }
391   }
392
393   grouping fault {
394     description
395       "Fault event of an object";
396     leaf problem {
397       type string;
398       description
399         "The alarm type identifier.";
400     }
401     leaf severity {
402       type severity-type;
403       description
404         "The reported severity of the fault (alarm).";
405     }
406   }
407
408   grouping attribute-change {
409     description
410       "update change of an attribute";
411     leaf attribute-name {
412       type string;
413       description
414         "The attribute name which was changed.";
415     }
416     leaf new-value {
417       type string;
418       description
419         "The new value of the attribute converted to a string format.";
420     }
421   }
422
423   grouping entity-id {
424     description
425       "Unique database id of entity";
426     leaf id {
427       type string;
428       description
429         "The unique identifier of the entity.";
430     }
431   }
432
433   grouping faultcurrent-entity {
434     description
435       "Current fault status";
436     uses object-change-reference;
437     uses fault;
438     uses entity-id;
439   }
440
441   container faultcurrent {
442     description
443       "builder";
444     uses faultcurrent-entity;
445   }
446
447   grouping faultlog-entity {
448     description
449       "Changed fault indication";
450     uses source-reference;
451     uses object-change-reference;
452     uses fault;
453     uses entity-id;
454   }
455
456   container faultlog {
457     description
458       "builder";
459     uses faultlog-entity;
460   }
461
462   grouping eventlog-entity {
463     description
464       "One change event of devices";
465     uses source-reference;
466     uses object-change-reference;
467     uses attribute-change;
468     uses entity-id;
469   }
470
471   container eventlog {
472     description
473       "builder";
474     uses eventlog-entity;
475   }
476
477   grouping filter {
478     leaf description {
479       type string;
480       description
481         "Filter specific description";
482     }
483     leaf start {
484       type yang:date-and-time;
485       description
486         "begin of maintenance-mode";
487     }
488     leaf end {
489       type yang:date-and-time;
490       description
491         "end of maintenance-mode";
492     }
493     leaf object-id-ref {
494       type string;
495       description
496         "object id to filter on, or empty for all";
497     }
498     leaf problem {
499       type string;
500       description
501         "name of the problem to filter or empty for all";
502     }
503     description
504       "An object class describing a generic filter of an interval for
505        faults (alarms).";
506   }
507
508   grouping maintenance-entity {
509     description
510       "Maintenance mode for a device. ";
511     leaf id {
512       type string;
513       mandatory true;
514       description
515         "Key to get/set configuration entry in database. Normally Mountpoint
516          name is used as key id of node.";
517     }
518     leaf node-id {
519       type string;
520       mandatory true;
521       description
522         "A network wide unique identifier of the NetConf server.";
523     }
524     leaf active {
525       type boolean;
526       description
527         "Configuration to activate or deactivate this entry";
528     }
529     uses filter;
530   }
531
532   container maintenance {
533     presence "false";
534     description
535       "builder";
536     uses maintenance-entity;
537   }
538
539   grouping mediator-server-entity {
540     leaf id {
541       type string;
542       mandatory true;
543       description
544         "A network unique identifier of the mediator server.";
545     }
546     leaf url {
547       type string;
548       description
549         "The ULR to reach the REST interface of the mediator server.";
550     }
551     leaf name {
552       type string;
553       description
554         "A human readable name of the mediator server.";
555     }
556     description
557       "An object class describing a mediator server entity.";
558   }
559
560   grouping pmdata-base {
561     description
562       "Performance data base information";
563     leaf node-name {
564       type string;
565       description
566         "A network unique identifier of reporting NetConf server.";
567     }
568     leaf uuid-interface {
569       type string;
570       description
571         "A universal unique identifier of the performance monitoring point.";
572     }
573     leaf layer-protocol-name {
574       type string;
575       description
576         "The name of the measured transport layer.";
577     }
578     leaf radio-signal-id {
579       type string;
580       description
581         "The value exists only of wireless transport devices.";
582     }
583     leaf time-stamp {
584       type yang:date-and-time;
585       description
586         "The time-stamp of the measurement, preferred in UTC format.";
587     }
588     leaf suspect-interval-flag {
589       type boolean;
590       description
591         "If false, the measurement is not completed and should not be used
592          for performance analysis. ";
593     }
594     leaf granularity-period {
595       type granularity-period-type;
596       description
597         "The expected measurement interval.";
598     }
599     leaf scanner-id {
600       type string;
601       description
602         "See ITU-T X.739 chapter 8.1.1.2.";
603     }
604   }
605
606   grouping pmdata-microwave {
607     description
608       "Consolidated performance information of all microwave model interface
609        PACs";
610     leaf es {
611       type int32;
612       units "s";
613       default "-1";
614       config false;
615       description
616         "Number of errored seconds.";
617     }
618     leaf ses {
619       type int32;
620       units "s";
621       default "-1";
622       config false;
623       description
624         "Number of severely errored seconds.";
625     }
626     leaf cses {
627       type int32;
628       units "s";
629       default "-1";
630       config false;
631       description
632         "Number of consecutive severely errored seconds.";
633     }
634     leaf unavailability {
635       type int32;
636       units "s";
637       default "-1";
638       config false;
639       description
640         "Total time of unavailability in seconds.";
641     }
642     leaf tx-level-min {
643       type int8;
644       units "dBm";
645       default "99";
646       config false;
647       description
648         "Minimum transmit power. Signed integers are required.";
649     }
650     leaf tx-level-max {
651       type int8;
652       units "dBm";
653       default "99";
654       config false;
655       description
656         "Maximum transmit power. Signed integers are required.";
657     }
658     leaf tx-level-avg {
659       type int8;
660       units "dBm";
661       default "99";
662       config false;
663       description
664         "Averaged transmit power. Signed integers are required.";
665     }
666     leaf rx-level-min {
667       type int8;
668       units "dBm";
669       default "99";
670       config false;
671       description
672         "Minimum receive level. Signed integers are required.";
673     }
674     leaf rx-level-max {
675       type int8;
676       units "dBm";
677       default "99";
678       config false;
679       description
680         "Maximum receive level. Signed integers are required.";
681     }
682     leaf rx-level-avg {
683       type int8;
684       units "dBm";
685       default "99";
686       config false;
687       description
688         "Averaged receive level. Signed integers are required.";
689     }
690     leaf time2-states {
691       type int32;
692       units "s";
693       default "-1";
694       config false;
695       description
696         "Sum of all seconds the transmitter operated in e.g. BPSK.";
697     }
698     leaf time4-states-s {
699       type int32;
700       units "s";
701       default "-1";
702       config false;
703       description
704         "none";
705     }
706     leaf time4-states {
707       type int32;
708       units "s";
709       default "-1";
710       config false;
711       description
712         "none";
713     }
714     leaf time8-states {
715       type int32;
716       units "s";
717       default "-1";
718       config false;
719       description
720         "none";
721     }
722     leaf time16-states-s {
723       type int32;
724       units "s";
725       default "-1";
726       config false;
727       description
728         "none";
729     }
730     leaf time16-states {
731       type int32;
732       units "s";
733       default "-1";
734       config false;
735       description
736         "none";
737     }
738     leaf time32-states {
739       type int32;
740       units "s";
741       default "-1";
742       config false;
743       description
744         "none";
745     }
746     leaf time64-states {
747       type int32;
748       units "s";
749       default "-1";
750       config false;
751       description
752         "none";
753     }
754     leaf time128-states {
755       type int32;
756       units "s";
757       default "-1";
758       config false;
759       description
760         "none";
761     }
762     leaf time256-states {
763       type int32;
764       units "s";
765       default "-1";
766       config false;
767       description
768         "none";
769     }
770     leaf time512-states {
771       type int32;
772       units "s";
773       default "-1";
774       config false;
775       description
776         "none";
777     }
778     leaf time512-states-l {
779       type int32;
780       units "s";
781       default "-1";
782       config false;
783       description
784         "none";
785     }
786     leaf time1024-states {
787       type int32;
788       units "s";
789       default "-1";
790       config false;
791       description
792         "none";
793     }
794     leaf time1024-states-l {
795       type int32;
796       units "s";
797       default "-1";
798       config false;
799       description
800         "none";
801     }
802     leaf time2048-states {
803       type int32;
804       units "s";
805       default "-1";
806       config false;
807       description
808         "none";
809     }
810     leaf time2048-states-l {
811       type int32;
812       units "s";
813       default "-1";
814       config false;
815       description
816         "none";
817     }
818     leaf time4096-states {
819       type int32;
820       units "s";
821       default "-1";
822       config false;
823       description
824         "none";
825     }
826     leaf time4096-states-l {
827       type int32;
828       units "s";
829       default "-1";
830       config false;
831       description
832         "none";
833     }
834     leaf time8192-states {
835       type int32;
836       units "s";
837       default "-1";
838       config false;
839       description
840         "none";
841     }
842     leaf time8192-states-l {
843       type int32;
844       units "s";
845       default "-1";
846       config false;
847       description
848         "none";
849     }
850     leaf snir-min {
851       type int8;
852       units "dB";
853       default "-99";
854       config false;
855       description
856         "Minimum signal to (noise+interference) ratio.";
857     }
858     leaf snir-max {
859       type int8;
860       units "dB";
861       default "-99";
862       config false;
863       description
864         "Maximum signal to (noise+interference) ratio.";
865     }
866     leaf snir-avg {
867       type int8;
868       units "dB";
869       default "-99";
870       config false;
871       description
872         "Averaged signal to (noise+interference) ratio.";
873     }
874     leaf xpd-min {
875       type int8;
876       units "dB";
877       default "-99";
878       config false;
879       description
880         "Minimum cross polarization discrimination.";
881     }
882     leaf xpd-max {
883       type int8;
884       units "dB";
885       default "-99";
886       config false;
887       description
888         "Maximum cross polarization discrimination.";
889     }
890     leaf xpd-avg {
891       type int8;
892       units "dB";
893       default "-99";
894       config false;
895       description
896         "Averaged cross polarization discrimination.";
897     }
898     leaf rf-temp-min {
899       type int8;
900       units "C";
901       default "-99";
902       config false;
903       description
904         "Lowest temperature (in degree Celsius) of the radio module inside the
905          outdoor unit.";
906     }
907     leaf rf-temp-max {
908       type int8;
909       units "C";
910       default "-99";
911       config false;
912       description
913         "Highest temperature (in degree Celsius) of the radio module inside the
914          outdoor unit.";
915     }
916     leaf rf-temp-avg {
917       type int8;
918       units "C";
919       default "-99";
920       config false;
921       description
922         "Averaged temperature (in degree Celsius) of the radio module inside
923          the outdoor unit.";
924     }
925     leaf defect-blocks-sum {
926       type int16;
927       units "blocks";
928       default "-1";
929       config false;
930       description
931         "Total number of blocks that were defect after receiving and could not
932          be corrected by the FEC.";
933     }
934     leaf time-period {
935       type int32;
936       units "s";
937       default "-1";
938       config false;
939       description
940         "Total length of the measurement period.";
941     }
942   }
943
944   grouping pmdata-ethernet {
945     description
946       "Consolidated performance information for Ethernet.";
947     leaf tx-ethernet-bytes-max-s {
948       type int32;
949       units "Bytes/s";
950       default "-1";
951       config false;
952       description
953         "Counts the number of Bytes of Ethernet traffic (before header
954          compression) transmitted within a second and keeps the highest value
955          within the measurement period. Field to be left blank for all types of
956          TDM containers.";
957     }
958     leaf tx-ethernet-bytes-max-m {
959       type int64;
960       units "Bytes/min";
961       default "-1";
962       config false;
963       description
964         "Counts the number of Bytes of Ethernet traffic (before header
965          compression) transmitted within a minute and keeps the highest value
966          with in the measurement period. Field to be left blank for all types
967          of TDM containers.";
968     }
969     leaf tx-ethernet-bytes-sum {
970       type int64;
971       units "Bytes";
972       default "-1";
973       config false;
974       description
975         "Total number of Bytes of Ethernet traffic (before header compression)
976          transmitted (in direction out of the device) during the measurement
977         period. Field to be left blank for all types of TDM containers.";
978     }
979   }
980
981   identity performance-measurement-type-id {
982     description
983       "Base identity for perforamnce measurement types. A unique identification 
984        of the performance measurment value, not including the resource. 
985        Different resources can share performance measuement types. If the 
986        resource reports the same performance measurment type, it is to be 
987        considered to be the same performance measurment. 
988
989        This identity is abstract and MUST NOT be used for performence 
990        mesurement.";
991   }
992
993   identity performance-measurement-unit-id {
994     description
995       "Base identity for perforamnce measurement units. 
996
997        This identity is abstract and MUST NOT be used for performence 
998        mesurement.";
999   }
1000
1001   typedef performance-measurement-type-id {
1002     type identityref {
1003       base performance-measurement-type-id;
1004     }
1005     description
1006       "Identifies an performance-measurement type. The description of the 
1007        performance measurement type id MUST indicate if the performance 
1008        measurement type is abstract or not. An abstract performance measurement 
1009        type is used as a base for other performance measurement type ids
1010        and will not be used as a value for an performance measurement or be 
1011        present in the performance measurement inventory.";
1012   }
1013
1014   typedef performance-measurement-unit-id {
1015     type identityref {
1016       base performance-measurement-unit-id;
1017     }
1018     description
1019       "Identifies an performance-measurement unit. The description of the 
1020        performance measurement unit id MUST indicate if the performance 
1021        measurement unit is abstract or not. An abstract performance measurement 
1022        unit is used as a base for other performance measurement unit ids
1023        and will not be used as a value for an performance measurement or be 
1024        present in the performance measurement inventory.";
1025   }
1026
1027   grouping pm-measurement-grp {
1028     leaf pm-key {
1029       type performance-measurement-type-id;
1030       description
1031         "The local identifier of a pm-measurement object.";
1032     }
1033     leaf pm-value {
1034       type org-openroadm-pm-types:pm-data-type;
1035       mandatory true;
1036       description
1037         "The performance measurement value, measured in a certain interval.";
1038     }
1039     leaf pm-unit {
1040       type performance-measurement-unit-id;
1041       description
1042         "A represention of the unit og the pm-value.";
1043     }
1044     description 
1045       "An abstract object class representing a key-value pair for 
1046        pm-measurement.";
1047   }
1048
1049   grouping pmdata-grp {
1050     list measurement {
1051       key pm-key;
1052       uses pm-measurement-grp;
1053       description 
1054         "An abstract list of perfromance mesurement values.";
1055     }
1056     description 
1057       "An abstract object class containing a list of perfromance mesurement 
1058        values.";
1059   }
1060
1061   container pmdata-entity {
1062     description
1063       "builder";
1064     uses pmdata-base;
1065     container performance-data {
1066       uses pmdata-microwave;
1067       uses pmdata-ethernet;
1068       uses pmdata-grp;
1069       description
1070         "An object combining different performance monitoring data.";
1071     }
1072   }
1073
1074   grouping pmdata15m-entity {
1075     uses pmdata-base;
1076     container performance-data {
1077       uses pmdata-microwave;
1078       uses pmdata-ethernet;
1079       uses pmdata-grp;
1080       description
1081         "An object combining different performance monitoring data.";
1082     }
1083     description
1084       "An object class describing a 15 minute performance monitoring entity.";
1085   }
1086
1087   grouping pmdata24h-entity {
1088     uses pmdata-base;
1089     container performance-data {
1090       uses pmdata-microwave;
1091       uses pmdata-ethernet;
1092       uses pmdata-grp;
1093       description
1094         "An object combining different performance monitoring data.";
1095     }
1096     description
1097       "An object class describing a 24 hour performance monitoring entity.";
1098   }
1099
1100   grouping inventory-entity {
1101     description
1102       "One equipment entity in a list of a network element that could be rack,
1103        card, backplane, module";
1104     leaf id {
1105       type string;
1106       mandatory true;
1107       description
1108         "Unique database id, node-id/uuid";
1109     }
1110     leaf tree-level {
1111       type uint32;
1112       description
1113         "Containment level, starting with 0..";
1114     }
1115     leaf parent-uuid {
1116       type string;
1117       description
1118         "Unique inventory id of holder";
1119     }
1120     leaf node-id {
1121       type string;
1122       description
1123         "Unique node id of network element";
1124     }
1125     leaf uuid {
1126       type string;
1127       description
1128         "Unique inventory id of this node for this equipment, provided by
1129          network element";
1130     }
1131     leaf-list contained-holder {
1132       type string;
1133       description
1134         "List of uuid of contained equipment";
1135     }
1136     leaf manufacturer-name {
1137       type string;
1138       description
1139         "manufactured-thing/manufacturer-properties/manufacturer-name";
1140     }
1141     leaf manufacturer-identifier {
1142       type string;
1143       description
1144         "manufactured-thing/manufacturer-properties/manufacturer-identifier";
1145     }
1146     leaf serial {
1147       type string;
1148       description
1149         "manufactured-thing/equipment-instance/serial";
1150     }
1151     leaf date {
1152       type string;
1153       description
1154         "manufactured-thing/equipment-instance/manufacture-date: Date
1155          information provided by manufacturer. No specific format. ()";
1156     }
1157     leaf version {
1158       type string;
1159       description
1160         "manufactured-thing/equipment-type/version";
1161     }
1162     leaf description {
1163       type string;
1164       description
1165         "manufactured-thing/equipment-type/description";
1166     }
1167     leaf part-type-id {
1168       type string;
1169       description
1170         "manufactured-thing/equipment-type/part-type-identifier";
1171     }
1172     leaf model-identifier {
1173       type string;
1174       description
1175         "manufactured-thing/equipment-type/model-identifier";
1176     }
1177     leaf type-name {
1178       type string;
1179       description
1180         "manufactured-thing/equipment-type/type-name";
1181     }
1182   }
1183
1184   container inventory {
1185     presence "false";
1186     description
1187       "builder";
1188     uses inventory-entity;
1189   }
1190
1191   grouping node-details-g {
1192     leaf-list available-capabilities {
1193       type string;
1194       description
1195         "The list of available yang capabilities.";
1196     }
1197     leaf-list unavailable-capabilities {
1198       type string;
1199       description
1200         "The list of unavailable yang capabilities.";
1201     }
1202     description
1203       "An object class description the available and unavailable yang
1204        capabilities.";
1205   }
1206
1207   grouping network-element-connection-entity {
1208     leaf id {
1209       type string;
1210       description
1211         "database id/key. here is equal to node-id";
1212     }
1213     leaf node-id {
1214       type string;
1215       description
1216         "mountpoint name of device in controller";
1217     }
1218     leaf host {
1219       type string;
1220       description
1221         "NetConf server host name or IP address of device";
1222     }
1223     leaf port {
1224       type uint32;
1225       description
1226         "NetConf port of device";
1227     }
1228     leaf username {
1229       type string;
1230       description
1231         "NetConf user name";
1232     }
1233     leaf password {
1234       type string;
1235       description
1236         "NetConf password. should be removed asap";
1237     }
1238     leaf core-model-capability {
1239       type string;
1240       description
1241         "revision of core-model capability";
1242     }
1243     leaf device-type {
1244       type NetworkElementDeviceType;
1245       description
1246         "categorized type of device based on implemented yang specs";
1247     }
1248     leaf is-required {
1249       type boolean;
1250       description
1251         "entry exists in db index required-networkelement";
1252     }
1253     container node-details {
1254       uses node-details-g;
1255       description
1256         "holder of available and unavailable capabilities";
1257     }
1258     leaf status {
1259       type ConnectionLogStatus;
1260       description
1261         "current connection status. default Disconnected";
1262     }
1263     description
1264       "An object class defining the NetConf connection towards a
1265        NetConf server. ";
1266   }
1267
1268   container network-element-connection {
1269     description
1270       "builder";
1271     uses network-element-connection-entity;
1272   }
1273
1274   grouping status-entity {
1275     container faults {
1276       leaf criticals {
1277         type uint32;
1278         description
1279           "The number of current faults (active alarms) with severity
1280            'critical'.";
1281       }
1282       leaf majors {
1283         type uint32;
1284         description
1285           "The number of current faults (active alarms) with severity
1286            'major'.";
1287       }
1288       leaf minors {
1289         type uint32;
1290         description
1291           "The number of current faults (active alarms) with severity
1292            'minor'.";
1293       }
1294       leaf warnings {
1295         type uint32;
1296         description
1297           "The number of current faults (active alarms) with severity
1298            'warning'.";
1299       }
1300       description
1301         "An object containing the number of current faults per its severity.";
1302     }
1303     description
1304       "An object class defining an status entity for current faults
1305        (also called active alarms).";
1306   }
1307
1308   container status {
1309     description
1310       "builder";
1311     uses status-entity;
1312   }
1313
1314   grouping entity-input {
1315     list filter {
1316       key "property";
1317       leaf property {
1318         type string;
1319         description
1320           "The property (parameter, column, field) identifier.";
1321       }
1322       leaf filtervalue {
1323         type string;
1324         description
1325           "The filter information for the corresponding property.";
1326       }
1327       description
1328         "List with filter criteria. Not listed means all.";
1329     }
1330     list sortorder {
1331       key "property";
1332       leaf property {
1333         type string;
1334         description
1335           "The property (parameter, column, field) identifier.";
1336       }
1337       leaf sortorder {
1338         type SortOrder;
1339         description
1340           "The definition of the sort order for the corresponding property.";
1341       }
1342       description
1343         "List with sort order. Not listed means default";
1344     }
1345     container pagination {
1346       leaf size {
1347         type uint32 {
1348           range "1..max";
1349         }
1350         default "20";
1351         description
1352           "Number of entries to be delivered";
1353       }
1354       leaf page {
1355         type uint64 {
1356           range "1..max";
1357         }
1358         default "1";
1359         description
1360           "Number to be used to calculate starting entry to deliver";
1361       }
1362       description
1363         "An object defining the pagination details.";
1364     }
1365     description
1366       "An object class defining a request input entity.";
1367   }
1368
1369   grouping pagination-output-g {
1370     leaf size {
1371       type uint32 {
1372         range "1..max";
1373       }
1374       default "20";
1375       description
1376         "Number of entries to be delivered";
1377     }
1378     leaf page {
1379       type uint64 {
1380         range "1..max";
1381       }
1382       default "1";
1383       description
1384         "Number to be used to calculate starting entry to deliver";
1385     }
1386     leaf total {
1387       type uint64 {
1388         range "0..max";
1389       }
1390       default "0";
1391       description
1392         "Number to be used to calculate starting entry to deliver";
1393     }
1394     description
1395       "An object class defining the filter information for pagination.";
1396   }
1397
1398   container pagination-output {
1399     description
1400       "builder";
1401     uses pagination-output-g;
1402   }
1403
1404   grouping guicutthrough-entity {
1405       leaf id {
1406           type string;
1407           mandatory true;
1408           description
1409             "Unique database id, node-id/uuid";
1410       }
1411       leaf name {
1412         type string;
1413         description
1414           "Mountpoint Name";
1415       }
1416       leaf weburi {
1417         type string;
1418         description
1419           "The URI of the system Web UI.";
1420       }
1421       description
1422         "An object class defining the information for invoking GUI cut through to the device.";
1423   }  
1424
1425     container guicutthrough {
1426       description
1427         "builder";
1428       uses guicutthrough-entity;
1429     }
1430     
1431   // --- rpc
1432
1433   rpc read-faultcurrent-list {
1434     description
1435       "Get list of current fault (active alarm) entries according to filter";
1436     input {
1437       uses entity-input;
1438     }
1439     output {
1440       container pagination {
1441         uses pagination-output-g;
1442         description
1443           "The pagination details used by the provider to filter the data.";
1444       }
1445       list data {
1446         uses faultcurrent-entity;
1447         description
1448           "The output data as list of current fault (or active alarm)
1449            entities.";
1450       }
1451     }
1452   }
1453
1454   rpc read-faultlog-list {
1455     description
1456       "Get list of faultlog entries according to filter";
1457     input {
1458       uses entity-input;
1459     }
1460     output {
1461       container pagination {
1462         uses pagination-output-g;
1463         description
1464           "The pagination details used by the provider to filter the data.";
1465       }
1466       list data {
1467         uses faultlog-entity;
1468         description
1469           "The output data as list of fault entities.";
1470       }
1471     }
1472   }
1473
1474   rpc read-eventlog-list {
1475     description
1476       "Get list of event log entities according to filter";
1477     input {
1478       uses entity-input;
1479     }
1480     output {
1481       container pagination {
1482         uses pagination-output-g;
1483         description
1484           "The pagination details used by the provider to filter the data.";
1485       }
1486       list data {
1487         uses eventlog-entity;
1488         description
1489           "The output data as list of event log entities.";
1490       }
1491     }
1492   }
1493
1494   rpc read-connectionlog-list {
1495     description
1496       "Get list of event log entities according to filter";
1497     input {
1498       uses entity-input;
1499     }
1500     output {
1501       container pagination {
1502         uses pagination-output-g;
1503         description
1504           "The pagination details used by the provider to filter the data.";
1505       }
1506       list data {
1507         uses connectionlog-entity;
1508         description
1509           "The output data as list of connection log entities.";
1510       }
1511     }
1512   }
1513
1514   rpc read-maintenance-list {
1515     description
1516       "Get list of maintenance entries according to filter";
1517     input {
1518       uses entity-input;
1519     }
1520     output {
1521       container pagination {
1522         uses pagination-output-g;
1523         description
1524           "The pagination details used by the provider to filter the data.";
1525       }
1526       list data {
1527         uses maintenance-entity;
1528         description
1529           "The output data as list of maintenance entities.";
1530       }
1531     }
1532   }
1533
1534   rpc create-maintenance {
1535     description
1536       "insert new entry of maintenance";
1537     input {
1538       uses maintenance-entity;
1539     }
1540     output {
1541       uses maintenance-entity;
1542     }
1543   }
1544
1545   rpc update-maintenance {
1546     description
1547       "update existing entity of maintenance";
1548     input {
1549       uses maintenance-entity;
1550     }
1551     output {
1552       uses maintenance-entity;
1553     }
1554   }
1555
1556   rpc delete-maintenance {
1557     description
1558       "delete entity of maintenance";
1559     input {
1560       uses maintenance-entity;
1561     }
1562   }
1563
1564   rpc read-mediator-server-list {
1565     description
1566       "Get list of mediator-servers according to filter";
1567     input {
1568       uses entity-input;
1569     }
1570     output {
1571       container pagination {
1572         uses pagination-output-g;
1573         description
1574           "The pagination details used by the provider to filter the data.";
1575       }
1576       list data {
1577         uses mediator-server-entity;
1578         description
1579           "The list of found mediator server entities.";
1580       }
1581     }
1582   }
1583
1584   rpc create-mediator-server {
1585     description
1586       "create new entry of entity mediator-server";
1587     input {
1588       uses mediator-server-entity;
1589     }
1590     output {
1591       uses mediator-server-entity;
1592     }
1593   }
1594
1595   rpc update-mediator-server {
1596     description
1597       "update entry of entity mediator-server";
1598     input {
1599       uses mediator-server-entity;
1600     }
1601     output {
1602       uses mediator-server-entity;
1603     }
1604   }
1605
1606   rpc delete-mediator-server {
1607     description
1608       "delete entry of entity mediator-server";
1609     input {
1610       uses mediator-server-entity;
1611     }
1612   }
1613
1614   rpc read-network-element-connection-list {
1615     description
1616       "Get list of networkelement-connections according to filter";
1617     input {
1618       uses entity-input;
1619     }
1620     output {
1621       container pagination {
1622         uses pagination-output-g;
1623         description
1624           "The pagination details used by the provider to filter the data.";
1625       }
1626       list data {
1627         uses network-element-connection-entity;
1628         description
1629           "The output data as list of found network-element (or mountpoint,
1630            or network functions) connection entities.";
1631       }
1632     }
1633   }
1634
1635   rpc create-network-element-connection {
1636     description
1637       "create entry in networkelement-connection";
1638     input {
1639       uses network-element-connection-entity;
1640     }
1641     output {
1642       uses network-element-connection-entity;
1643     }
1644   }
1645
1646   rpc update-network-element-connection {
1647     description
1648       "Put an element to ne-entity";
1649     input {
1650       uses network-element-connection-entity;
1651     }
1652     output {
1653       uses network-element-connection-entity;
1654     }
1655   }
1656
1657   rpc delete-network-element-connection {
1658     description
1659       "!ONLY FOR TESTING! Put an element to ne-entity";
1660     input {
1661       uses network-element-connection-entity;
1662     }
1663   }
1664
1665   rpc read-pmdata-15m-ltp-list {
1666     description
1667       "Get list of ltps for one mountpoint with historical pmdata";
1668     input {
1669       uses entity-input;
1670     }
1671     output {
1672       container pagination {
1673         uses pagination-output-g;
1674         description
1675           "The pagination details used by the provider to filter the data.";
1676       }
1677       leaf-list data {
1678         type string;
1679         description
1680           "The list of found mountpoint names.";
1681       }
1682     }
1683   }
1684
1685   rpc read-pmdata-24h-ltp-list {
1686     description
1687       "Get list of ltps for one mountpoint with historical pmdata";
1688     input {
1689       uses entity-input;
1690     }
1691     output {
1692       container pagination {
1693         uses pagination-output-g;
1694         description
1695           "The pagination details used by the provider to filter the data.";
1696       }
1697       leaf-list data {
1698         type string;
1699         description
1700           "The list of found logical-termination-point identifiers.";
1701       }
1702     }
1703   }
1704
1705   rpc read-pmdata-15m-device-list {
1706     description
1707       "Get list of mountpoints with historical pmdata";
1708     input {
1709       uses entity-input;
1710     }
1711     output {
1712       container pagination {
1713         uses pagination-output-g;
1714         description
1715           "The pagination details used by the provider to filter the data.";
1716       }
1717       leaf-list data {
1718         type string;
1719         description
1720           "The list of found mountpoint names.";
1721       }
1722     }
1723   }
1724
1725   rpc read-pmdata-24h-device-list {
1726     description
1727       "Get list of mountpoints with historical pmdata";
1728     input {
1729       uses entity-input;
1730     }
1731     output {
1732       container pagination {
1733         uses pagination-output-g;
1734         description
1735           "The pagination details used by the provider to filter the data.";
1736       }
1737       leaf-list data {
1738         type string;
1739         description
1740           "The list of found mountpoint names.";
1741       }
1742     }
1743   }
1744
1745   rpc read-pmdata-15m-list {
1746     description
1747       "Get list of entities according to filter";
1748     input {
1749       uses entity-input;
1750     }
1751     output {
1752       container pagination {
1753         uses pagination-output-g;
1754         description
1755           "The pagination details used by the provider to filter the data.";
1756       }
1757       list data {
1758         uses pmdata15m-entity;
1759         description
1760           "The output data as list of 15 minutes performance monitoring
1761            entities.";
1762       }
1763     }
1764   }
1765
1766   rpc read-pmdata-24h-list {
1767     description
1768       "Get list of historical pmdata according to filter";
1769     input {
1770       uses entity-input;
1771     }
1772     output {
1773       container pagination {
1774         uses pagination-output-g;
1775         description
1776           "The pagination details used by the provider to filter the data.";
1777       }
1778       list data {
1779         uses pmdata24h-entity;
1780         description
1781           "The output data as list of 24 hours performance monitoring
1782            entities.";
1783       }
1784     }
1785   }
1786
1787   rpc read-inventory-list {
1788     description
1789       "Get list of inventory according to filter";
1790     input {
1791       uses entity-input;
1792     }
1793     output {
1794       container pagination {
1795         uses pagination-output-g;
1796         description
1797           "The pagination details used by the provider to filter the data.";
1798       }
1799       list data {
1800         uses inventory-entity;
1801         description
1802           "The output data as list of inventory entities.";
1803       }
1804     }
1805   }
1806
1807   rpc read-status {
1808     description
1809       "Read status information of controller";
1810     output {
1811       list data {
1812         uses status-entity;
1813         description
1814           "The output data as list of status entities.";
1815       }
1816     }
1817   }
1818   
1819   rpc read-gui-cut-through-entry {
1820       description
1821         "Get GUI cut through entry according to filter";
1822       input {
1823         uses entity-input;
1824       }
1825       output {
1826         container pagination {
1827           uses pagination-output-g;
1828           description
1829             "The pagination details used by the provider to filter the data.";
1830         }
1831         list data {
1832           uses guicutthrough-entity;
1833           description
1834             "The output data as list of found GUI Cut through entities";
1835         }
1836       }
1837     }
1838 }