Refactor folder structure.
[sim/o1-interface.git] / ntsimulator / yang / o-ran / ru-fh / o-ran-ald-port.yang
1 module o-ran-ald-port {
2   yang-version 1.1;
3   namespace "urn:o-ran:ald-port:1.0";
4   prefix "o-ran-ald-port";
5
6   organization "O-RAN Alliance";
7
8   contact
9     "www.o-ran.org";
10
11   description
12     "This module defines the input state and output configuration for
13     the Antenna Line Device capability.
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-03-07" {
42     description
43       "version 1.0.1
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
61   feature OVERCURRENT-SUPPORTED {
62     description
63       "This feature indicates that the equipment supports the over-current notification
64       capability.";
65   }
66
67 // Groupings
68
69   grouping aldport-group {
70     leaf over-current-supported {
71       type boolean;
72       config false;
73       description
74         "Set to TRUE when the equipment supports over curent notifications";
75     }
76
77     list ald-port {
78       key "name";
79
80       config false;
81
82       description
83         "Leaf nodes describing ALD Port";
84       leaf name {
85         type string {
86           length "1..255";
87         }
88         description
89           "A name that is unique that identifies a ald port instance.
90           This name may be used in fault management to refer to a fault source
91           or affected object";
92       }
93
94       leaf port-id {
95         type uint8;
96             config false;
97             mandatory true;
98
99             description
100           "A number which identifies an ALD Port.
101           The number of the Physical ALD port connector in the module.
102           If the module supports 2 ALD Port connectors, use 0 and 1.";
103       }
104
105       leaf dc-control-support{
106         type boolean;
107         config false;
108             mandatory true;
109
110             description
111           "It is shown that on/off in the DC power supply is possible.
112           In case of False, power supply is always on.";
113       }
114
115       leaf dc-enabled-status {
116         when "../dc-control-support = 'true'";
117         type boolean;
118         default false;
119         description
120           "Status of DC voltage enabled on antenna line.
121           Valid only in case dc-control-support is true.";
122       }
123
124       leaf supported-connector{
125         type enumeration {
126               enum ANTENNA_CONNECTOR {
127                 description
128                     "This ald port is related to antenna connector";
129               }
130               enum RS485_PORT {
131                 description
132                     "This ald port is related to RS485 port";
133               }
134             }
135         config false;
136             mandatory true;
137
138             description
139           "Informs about the connectors of Module which ALDs are connected to.
140           This value is depending on HW design.";
141       }
142     }
143
144     list ald-port-dc-control {
145       key "name";
146
147       description
148         "Container needed to manage DC on ALD ports";
149
150       leaf name {
151         type leafref {
152           path "/ald-ports-io/ald-port/name";
153           require-instance false;
154         }
155         mandatory true;
156
157         description
158           "Name derived from unmodifiable list ald-port";
159       }
160
161       leaf dc-enabled{
162         type boolean;
163
164         description
165           "If dc-control-support is true case, this leaf is effective.
166           If dc-control-support is not true this leaf makes no action
167           In case of true, the power supply shall be turned on.";
168       }
169     }
170   }
171
172   grouping overcurrent-group {
173     container overload-condition {
174       description
175         "Container used in notification";
176
177       leaf-list overloaded-ports {
178         type leafref {
179           path "/ald-ports-io/ald-port/name";
180         }
181         description
182           "List of overloaded ports";
183       }
184     }
185   }
186
187   grouping dc-enabled-group {
188     list ald-port {
189       key name;
190       description
191         "list of ald-ports that has its dc-enabled-status changed";
192       leaf name{
193         type leafref {
194           path "/ald-ports-io/ald-port/name";
195         }
196         description "Name of port which has changed";
197       }
198       leaf dc-enabled-status{
199         type leafref {
200           path "/ald-ports-io/ald-port/dc-enabled-status";
201         }
202         description "New staus of dc-enabled-status";
203       }
204     }
205   }
206
207 // Top Level Container
208
209   container ald-ports-io {
210     description
211       "ALD port information.
212        ALD port of the equipment that can be used to connect External Equipment (Antenna Line Devices).
213        Communication uses AISG over HDLC.
214        Physical connection depends on connector type offered by the port (RS-485 or antenna line)
215        Note: Single instance of ALD Port can point to more than one antenna line devices.";
216
217     uses aldport-group;
218   }
219
220   notification overcurrent-report {
221     if-feature OVERCURRENT-SUPPORTED;
222
223     description
224       "The equipment is able to report overcurrent condition about Port.
225       This function is depending on HW design.
226       The notification depend on power consumption which connected ALD devices and module.";
227
228     uses overcurrent-group;
229   }
230
231   notification dc-enabled-status-change {
232     description
233       "The equipment is able to report the change of 'dc-enabled-status' of the ald-port.
234       This is applicable when the leaf 'dc-control-support' of the ald-pot is 'TRUE'.";
235       
236     uses dc-enabled-group;
237   }
238 }