Bug fix.
[sim/o1-interface.git] / ntsimulator / yang / o-ran / ru-fh / o-ran-fan.yang
1 module o-ran-fan {
2   yang-version 1.1;
3   namespace "urn:o-ran:fan:1.0";
4   prefix "o-ran-fan";
5
6
7   organization "O-RAN Alliance";
8
9   contact
10     "www.o-ran.org";
11
12   description
13     "This module defines the state of the O-RAN equipment's fans.
14
15     Copyright 2019 the O-RAN Alliance.
16
17     THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 'AS IS'
18     AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
19     IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
20     ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
21     LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
22     CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
23     SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
24     INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
25     CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
26     ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
27     POSSIBILITY OF SUCH DAMAGE.
28
29     Redistribution and use in source and binary forms, with or without
30     modification, are permitted provided that the following conditions are met:
31
32     * Redistributions of source code must retain the above copyright notice,
33     this list of conditions and the above disclaimer.
34     * Redistributions in binary form must reproduce the above copyright notice,
35     this list of conditions and the above disclaimer in the documentation
36     and/or other materials provided with the distribution.
37     * Neither the Members of the O-RAN Alliance nor the names of its
38     contributors may be used to endorse or promote products derived from
39     this software without specific prior written permission.";
40
41   revision "2019-07-03" {
42     description
43       "version 1.1.0
44
45       1) backward compatible changes to introduce groupings.";
46
47     reference "ORAN-WG4.M.0-v01.00";
48   }
49
50   revision "2019-02-04" {
51     description
52       "version 1.0.0
53
54       1) imported model from xRAN
55       2) changed namespace and reference from xran to o-ran";
56
57     reference "ORAN-WG4.M.0-v01.00";
58   }
59
60   typedef percent {
61    type uint16 {
62      range "0 .. 100";
63    }
64    description "Percentage";
65   }
66
67   grouping fan-grouping {
68     list fan-state {
69       key name;
70       description "a list of the fans based on their unique names";
71       leaf name {
72         type string {
73           length "1..255";
74         }
75         description
76           "A name that is unique that identifies a fan instance.
77           This name may be used in fault management to refer to a fault source
78           or affected object";
79       }
80       leaf fan-location {
81         type uint8;
82         description "A number indicating the location of the FAN in the fan tray";
83       }
84       leaf present-and-operating {
85         type boolean;
86         mandatory true;
87         description
88           "Indicates if a fan is present and operating in the location";
89       }
90       leaf vendor-code {
91         when "../present-and-operating = 'true'";
92         type uint8 {
93           range "0..7";
94         }
95         description
96           "Indicates fan vendor code. Fan vendors are detected with ID pins
97           using 3 bits digital inputs.
98
99           Optional node included when the NETCONF Server has determined
100           the fan vendor code.";
101       }
102       leaf fan-speed {
103         when "../present-and-operating = 'true'";
104         type percent;
105         description
106           "Measured fan speed. Expressed as percentage of max fan speed.
107
108           Optional node included when the fan speed can be measured.";
109       }
110       leaf target-speed {
111         when "../present-and-operating = 'true'";
112         type uint16;
113         units rpm;
114         description "the target speed of the fan";
115       }
116     }
117   }
118
119   container fan-tray {
120     config false;
121     description "top level tree covering off operational state of the fans";
122
123     uses fan-grouping;
124   }
125 }