Refactor folder structure.
[sim/o1-interface.git] / ntsimulator / yang / o-ran / ru-fh / o-ran-mplane-int.yang
1 module o-ran-mplane-int {
2   yang-version 1.1;
3   namespace "urn:o-ran:mplane-interfaces:1.0";
4   prefix "o-ran-mplane-int";
5
6   import ietf-inet-types {
7     prefix "inet";
8   }
9
10   import ietf-interfaces {
11     prefix "if";
12   }
13
14   import o-ran-interfaces {
15     prefix "o-ran-int";
16   }
17
18   organization "O-RAN Alliance";
19
20   contact
21     "www.o-ran.org";
22
23   description
24     "This module defines the YANG definitions for managng the O-RAN Radio Unit
25      management plane interface.
26
27      Copyright 2019 the O-RAN Alliance.
28
29      THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 'AS IS'
30      AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
31      IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
32      ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
33      LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
34      CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
35      SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
36      INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
37      CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
38      ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
39      POSSIBILITY OF SUCH DAMAGE.
40
41      Redistribution and use in source and binary forms, with or without
42      modification, are permitted provided that the following conditions are met:
43
44      * Redistributions of source code must retain the above copyright notice,
45      this list of conditions and the above disclaimer.
46      * Redistributions in binary form must reproduce the above copyright notice,
47      this list of conditions and the above disclaimer in the documentation
48      and/or other materials provided with the distribution.
49      * Neither the Members of the O-RAN Alliance nor the names of its
50      contributors may be used to endorse or promote products derived from
51      this software without specific prior written permission.";
52
53   revision "2019-04-11" {
54        description
55          "version 1.0.2
56
57          1) Changes for ERI-001 - enabling NETCONF clients to be configured.
58          2) shifting new container to correct position.";
59
60        reference "ORAN-WG4.M.0-v01.00";
61   }
62
63   revision "2019-03-07" {
64     description
65       "version 1.0.1
66
67       1) backward compatible changes to introduce groupings.";
68
69     reference "ORAN-WG4.M.0-v01.00";
70   }
71
72   revision "2019-02-04" {
73     description
74       "version 1.0.0
75
76       1) imported model from xRAN
77       2) changed namespace and reference from xran to o-ran";
78
79     reference "ORAN-WG4.M.0-v01.00";
80   }
81
82
83   typedef vlan-id {
84     type uint16 {
85       range 1..4094;
86     }
87     description
88       "Type definition representing a single-tagged VLAN";
89   }
90
91   // Groupings
92
93   grouping mplane-group {
94     container searchable-mplane-access-vlans-info {
95       description
96         "These parameters shall be stored by the equipment in reset persistant memory
97         to enable it to be re-used to optimize VALN discovery procerdures.";
98       leaf-list searchable-access-vlans {
99         type vlan-id;
100         description
101           "A list of access VLANs that may be operational on the transport
102           network. Can be used by the equipment to optimize its VLAN searching - for
103           M-plane operations.";
104       }
105       container vlan-range {
106         description "the range of VLAN IDs that may be configured for M-Plane";
107         leaf lowest-vlan-id {
108           type vlan-id;
109           description
110             "Value of this parameter informs equipment about lowest VID to be used
111             in VLAN scan procedure";
112         }
113         leaf highest-vlan-id {
114           type vlan-id;
115           description
116             "Value of this parameter informs about highest VID to be used
117             in VLAN scan procedure";
118         }
119       }
120     }
121
122     container m-plane-interfaces {
123       description "information concerning m-plane interfaces";
124       list m-plane-sub-interfaces {
125         key "interface-name sub-interface";
126         description "list of m-plane information";
127         leaf interface-name {
128           type leafref {
129             path "/if:interfaces/if:interface/if:name";
130           }
131           description "the name of the interface";
132         }
133         leaf sub-interface {
134           type leafref {
135             path "/if:interfaces/if:interface[if:name = current()/../interface-name]/o-ran-int:vlan-id";
136           }
137           description
138             "vlans used to communicate with management plane servers.";
139         }
140         container client-info {
141           config false;
142           description
143             "the NETCONF client information, discovered by DHCP or manually
144              configured during installation.";
145           list mplane-ipv4-info {
146             key mplane-ipv4;
147             description "list of IPv4 NETCONF clients";
148             leaf mplane-ipv4 {
149               type inet:ipv4-address;
150               description "The IPv4 address of M-Plane client discovered by the O-RU
151               or manually configured.";
152             }
153             leaf port {
154               type inet:port-number;
155               description
156                 "The call home port number discovered or manually configured.";
157             }
158           }
159           list mplane-ipv6-info {
160             key mplane-ipv6;
161             description "list of IPv6 NETCONF clients";
162             leaf mplane-ipv6 {
163               type inet:ipv6-address;
164               description "The IPv6 address of M-Plane client discovered by the O-RU
165               or manually configured.";
166             }
167             leaf port {
168               type inet:port-number;
169               description
170                 "The call home port number discovered or manually configured.";
171             }
172           }
173           leaf-list mplane-fqdn {
174             type inet:domain-name;
175             description "The discovered FQDN(s) of M-Plane client(s).";
176           }
177         }
178       }
179
180       container m-plane-ssh-ports {
181         description "leafs for managing SSH ports";
182         leaf call-home-ssh-port {
183           type inet:port-number;
184           default 4334;
185           description "The configured call home server port number";
186         }
187         leaf server-ssh-port {
188           type inet:port-number;
189           default 830;
190           description "The configured SSH server port number";
191         }
192       }
193     }
194     container configured-client-info {
195       description
196         "the NETCONF client information that may be configured by another
197         NETCONF client. These clients are reported independently from clients
198         manually configured or discovered using DHCP.";
199       list mplane-ipv4-info {
200         key mplane-ipv4;
201         description "list of IPv4 NETCONF clients";
202         leaf mplane-ipv4 {
203           type inet:ipv4-address;
204           description "The IPv4 address of configured M-Plane client.";
205         }
206         leaf port {
207           type inet:port-number;
208           description
209             "The configured call home port number.";
210         }
211       }
212       list mplane-ipv6-info {
213         key mplane-ipv6;
214         description "list of IPv6 NETCONF clients";
215         leaf mplane-ipv6 {
216           type inet:ipv6-address;
217           description "The IPv6 address of configured M-Plane client..";
218         }
219         leaf port {
220           type inet:port-number;
221           description
222             "The configured call home port number.";
223         }
224       }
225       leaf-list mplane-fqdn {
226         type inet:domain-name;
227         description "The configured FQDN(s) of M-Plane client(s).";
228       }
229     }
230   }
231
232
233   // Top Level Container
234
235   container mplane-info {
236     description "top level container for management plane information";
237
238     uses mplane-group;
239   }
240 }