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