Rewrite NTS Framework.
[sim/o1-interface.git] / ntsimulator / deploy / o-ran / yang / 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-07-03" {
54        description
55          "version 1.1.0
56
57          1) enabling NETCONF clients to be configured.
58          2) shifting new container to correct position
59          3) backward compatible changes to introduce groupings";
60
61        reference "ORAN-WG4.M.0-v01.00";
62   }
63
64   revision "2019-02-04" {
65     description
66       "version 1.0.0
67
68       1) imported model from xRAN
69       2) changed namespace and reference from xran to o-ran";
70
71     reference "ORAN-WG4.M.0-v01.00";
72   }
73
74
75   typedef vlan-id {
76     type uint16 {
77       range 1..4094;
78     }
79     description
80       "Type definition representing a single-tagged VLAN";
81   }
82
83   // Groupings
84
85   grouping mplane-group {
86     container searchable-mplane-access-vlans-info {
87       description
88         "These parameters shall be stored by the equipment in reset persistant memory
89         to enable it to be re-used to optimize VALN discovery procerdures.";
90       leaf-list searchable-access-vlans {
91         type vlan-id;
92         description
93           "A list of access VLANs that may be operational on the transport
94           network. Can be used by the equipment to optimize its VLAN searching - for
95           M-plane operations.";
96       }
97       container vlan-range {
98         description "the range of VLAN IDs that may be configured for M-Plane";
99         leaf lowest-vlan-id {
100           type vlan-id;
101           description
102             "Value of this parameter informs equipment about lowest VID to be used
103             in VLAN scan procedure";
104         }
105         leaf highest-vlan-id {
106           type vlan-id;
107           description
108             "Value of this parameter informs about highest VID to be used
109             in VLAN scan procedure";
110         }
111       }
112     }
113
114     container m-plane-interfaces {
115       description "information concerning m-plane interfaces";
116       list m-plane-sub-interfaces {
117         key "interface-name sub-interface";
118         description "list of m-plane information";
119         leaf interface-name {
120           type leafref {
121             path "/if:interfaces/if:interface/if:name";
122           }
123           description "the name of the interface";
124         }
125         leaf sub-interface {
126           type leafref {
127             //checkAL added o-ran-mplane-int: before interface-name, as it would not find anything otherwise
128             path "/if:interfaces/if:interface[if:name = current()/../o-ran-mplane-int:interface-name]/o-ran-int:vlan-id";
129           }
130           description
131             "vlans used to communicate with management plane servers.";
132         }
133         container client-info {
134           config false;
135           description
136             "the NETCONF client information, discovered by DHCP or manually
137              configured during installation.";
138           list mplane-ipv4-info {
139             key mplane-ipv4;
140             description "list of IPv4 NETCONF clients";
141             leaf mplane-ipv4 {
142               type inet:ipv4-address;
143               description "The IPv4 address of M-Plane client discovered by the O-RU
144               or manually configured.";
145             }
146             leaf port {
147               type inet:port-number;
148               description
149                 "The call home port number discovered or manually configured.";
150             }
151           }
152           list mplane-ipv6-info {
153             key mplane-ipv6;
154             description "list of IPv6 NETCONF clients";
155             leaf mplane-ipv6 {
156               type inet:ipv6-address;
157               description "The IPv6 address of M-Plane client discovered by the O-RU
158               or manually configured.";
159             }
160             leaf port {
161               type inet:port-number;
162               description
163                 "The call home port number discovered or manually configured.";
164             }
165           }
166           leaf-list mplane-fqdn {
167             type inet:domain-name;
168             description "The discovered FQDN(s) of M-Plane client(s).";
169           }
170         }
171       }
172
173       container m-plane-ssh-ports {
174         description "leafs for managing SSH ports";
175         leaf call-home-ssh-port {
176           type inet:port-number;
177           default 4334;
178           description "The configured call home server port number";
179         }
180         leaf server-ssh-port {
181           type inet:port-number;
182           default 830;
183           description "The configured SSH server port number";
184         }
185       }
186     }
187     container configured-client-info {
188       description
189         "the NETCONF client information that may be configured by another
190         NETCONF client. These clients are reported independently from clients
191         manually configured or discovered using DHCP.";
192       list mplane-ipv4-info {
193         key mplane-ipv4;
194         description "list of IPv4 NETCONF clients";
195         leaf mplane-ipv4 {
196           type inet:ipv4-address;
197           description "The IPv4 address of configured M-Plane client.";
198         }
199         leaf port {
200           type inet:port-number;
201           description
202             "The configured call home port number.";
203         }
204       }
205       list mplane-ipv6-info {
206         key mplane-ipv6;
207         description "list of IPv6 NETCONF clients";
208         leaf mplane-ipv6 {
209           type inet:ipv6-address;
210           description "The IPv6 address of configured M-Plane client..";
211         }
212         leaf port {
213           type inet:port-number;
214           description
215             "The configured call home port number.";
216         }
217       }
218       leaf-list mplane-fqdn {
219         type inet:domain-name;
220         description "The configured FQDN(s) of M-Plane client(s).";
221       }
222     }
223   }
224
225
226   // Top Level Container
227
228   container mplane-info {
229     description "top level container for management plane information";
230
231     uses mplane-group;
232   }
233 }