Support of WG4 OpenFronthaul Management-Plane VES
[scp/oam/modeling.git] / data-model / yang / published / o-ran / ru-fh / o-ran-externalio@2019-07-03.yang
1 module o-ran-externalio {
2   yang-version 1.1;
3   namespace "urn:o-ran:external-io:1.0";
4   prefix "o-ran-io";
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     external IO.
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   grouping external-io-group {
61     description "an external io grouping";
62     list input {
63       key "name";
64       config false;
65       description
66         "Leaf nodes describing external line inputs";
67       leaf name {
68         type string {
69           length "1..255";
70         }
71         description
72         "A unique name that identifies an input port instance.
73         This name may be used in fault management to refer to a fault source
74         or affected object";
75       }
76       leaf port-in {
77         type uint8;
78         description
79           "A number which identifies an external input port.";
80       }
81
82       leaf line-in {
83         type boolean;
84         default true;
85         description
86           "Value TRUE indicates that circuit is open.
87            Value FALSE indicates that circuit is closed.
88
89            Usually when nothing is connected to the line the value is TRUE.
90            The details of external line-in implementation are HW specific.";
91       }
92     }
93
94     list output {
95       key "name";
96       config false;
97       description
98         "Leaf nodes describing external line outputs";
99       leaf name {
100         type string {
101           length "1..255";
102         }
103         description
104           "A name that is unique that identifies an output port instance.
105           This name may be used in fault management to refer to a fault source
106           or affected object";
107       }
108       leaf port-out {
109         type uint8;
110         mandatory true;
111         description
112           "A number which identifies an external output port.";
113       }
114     }
115
116     list output-setting {
117       key "name";
118
119       description
120         "List allowing to set output line state";
121
122       leaf name {
123         type leafref {
124           path "/external-io/output/name";
125           require-instance false;
126         }
127         mandatory true;
128
129         description
130           "Name derived from unmodifiable list external-io";
131       }
132
133       leaf line-out {
134         type boolean;
135         default true;
136         description
137           "Value TRUE indicates that circuit is in its natural state.
138            Value FALSE indicates that circuit is not in its natural state.";
139       }
140     }
141   }
142
143   grouping notification-group {
144     description "a notification grouping";
145     container current-input-notification {
146       description "a container for the state of the input ports";
147       list external-input {
148         key "name";
149         description "a list of the input ports and their state";
150         leaf name{
151           type leafref{
152             path "/external-io/input/name";
153           }
154           description "the name of the ald-port";
155         }
156         leaf io-port {
157           type leafref{
158             path  "/external-io/input/port-in";
159           }
160           description "the external input port";
161         }
162         leaf line-in {
163           type leafref{
164             path  "/external-io/input/line-in";
165           }
166           description "the state of the external input port";
167         }
168       }
169     }
170   }
171
172 // Top Level Container
173
174   container external-io {
175     description
176       "External IO information.";
177     uses external-io-group;
178   }
179
180   notification external-input-change {
181     description
182       "Notification used to indicate that external line input has changed state";
183     uses notification-group;
184   }
185 }