Refactor folder structure.
[sim/o1-interface.git] / ntsimulator / yang / x-ran / xran-fan.yang
1 module xran-fan {
2   yang-version 1.1;
3   namespace "urn:xran:fan:1.0";
4   prefix "xran-fan";
5
6
7   organization "xRAN Forum";
8
9   contact
10     "www.xran.org";
11
12   description
13     "This module defines the state of the RU's fans.
14
15     Copyright 2018 the xRAN Forum.
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 xRAN Forum 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 "2018-07-20" {
42     description
43       "version 1.0.0 - First release of the xRAN YANG M-Plane models.
44
45       This version of the model supports v01.00 of the corrsponding xRAN
46       M-Plane Specification.";
47     reference "XRAN-FH.MP.0-v01.00";
48   }
49
50   typedef percent {
51    type uint16 {
52      range "0 .. 100";
53    }
54    description "Percentage";
55   }
56
57   container fan-tray {
58     config false;
59     description "top level tree covering off operational state of the fans";
60     list fan-state {
61       key name;
62       description "a list of the fans based on their unique names";
63       leaf name {
64         type string {
65           length "1..255";
66         }
67         description
68           "A name that is unique across the RU that identifies a fan instance.
69           This name may be used in fault management to refer to a fault source
70           or affected object";
71       }
72       leaf fan-location {
73         type uint8;
74         description "A number indicating the location of the FAN in the fan tray";
75       }
76       leaf present-and-operating {
77         type boolean;
78         mandatory true;
79         description
80           "Indicates if a fan is present and operating in the location";
81       }
82       leaf vendor-code {
83         when "../present-and-operating = 'true'";
84         type uint8 {
85           range "0..7";
86         }
87         description
88           "Indicates fan vendor code. Fan vendors are detected with ID pins
89           using 3 bits digital inputs.
90
91           Optional node included when the NETCONF Server has determined
92           the fan vendor code.";
93       }
94       leaf fan-speed {
95         when "../present-and-operating = 'true'";
96         type percent;
97         description
98           "Measured fan speed. Expressed as percentage of max fan speed.
99
100           Optional node included when the fan speed can be measured.";
101       }
102       leaf target-speed {
103         when "../present-and-operating = 'true'";
104         type uint16;
105         units rpm;
106         description "the target speed of the fan";
107       }
108     }
109   }
110 }