Support of WG4 OpenFronthaul Management-Plane VES
[scp/oam/modeling.git] / data-model / yang / published / o-ran / ru-fh / o-ran-fan@2021-12-01.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 "2021-12-01" {
42     description
43       "version 1.2.0
44
45       1) typographical corrections.";
46
47     reference "ORAN-WG4.M.0-v01.00";
48   }
49
50   revision "2019-07-03" {
51     description
52       "version 1.1.0
53
54       1) backward compatible changes to introduce groupings.";
55
56     reference "ORAN-WG4.M.0-v01.00";
57   }
58
59   revision "2019-02-04" {
60     description
61       "version 1.0.0
62
63       1) imported model from xRAN
64       2) changed namespace and reference from xran to o-ran";
65
66     reference "ORAN-WG4.M.0-v01.00";
67   }
68
69   typedef percent {
70    type uint16 {
71      range "0 .. 100";
72    }
73    description "Percentage";
74   }
75
76   grouping fan-grouping {
77     description "a fan grouping";
78     list fan-state {
79       key name;
80       description "a list of the fans based on their unique names";
81       leaf name {
82         type string {
83           length "1..255";
84         }
85         description
86           "A name that is unique that identifies a fan instance.
87           This name may be used in fault management to refer to a fault source
88           or affected object";
89       }
90       leaf fan-location {
91         type uint8;
92         description "A number indicating the location of the FAN in the fan tray";
93       }
94       leaf present-and-operating {
95         type boolean;
96         mandatory true;
97         description
98           "Indicates if a fan is present and operating in the location";
99       }
100       leaf vendor-code {
101         when "../present-and-operating = 'true'";
102         type uint8 {
103           range "0..7";
104         }
105         description
106           "Indicates fan vendor code. Fan vendors are detected with ID pins
107           using 3 bits digital inputs.
108
109           Optional node included when the NETCONF Server has determined
110           the fan vendor code.";
111       }
112       leaf fan-speed {
113         when "../present-and-operating = 'true'";
114         type percent;
115         description
116           "Measured fan speed. Expressed as percentage of max fan speed.
117
118           Optional node included when the fan speed can be measured.";
119       }
120       leaf target-speed {
121         when "../present-and-operating = 'true'";
122         type uint16;
123         units rpm;
124         description "the target speed of the fan";
125       }
126     }
127   }
128
129   container fan-tray {
130     config false;
131     description "top-level tree covering off operational state of the fans";
132
133     uses fan-grouping;
134   }
135 }