RIC-125: Expose discovered gNBs and their status via O1
[ric-plt/o1.git] / agent / yang / o-ran-sc-ric-gnb-status-v1.yang
1 module o-ran-sc-ric-gnb-status-v1 {
2     yang-version 1;
3     namespace "urn:o-ran:ric:gnb-status:1.0";
4     prefix rxad;
5
6     organization
7         "O-RAN Software Community";
8     contact
9         "www.o-ran.org";
10     description
11         "This module defines the gNB status and other information visible to operators
12
13         Copyright 2020 the O-RAN Alliance.
14
15         Licensed under the Apache License, Version 2.0 (the 'License');
16         you may not use this file except in compliance with the License.
17         You may obtain a copy of the License at
18
19         http://www.apache.org/licenses/LICENSE-2.0
20
21         Unless required by applicable law or agreed to in writing, software
22         distributed under the License is distributed on an 'AS IS' BASIS,
23         WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
24         See the License for the specific language governing permissions and
25         limitations under the License.";
26
27     revision 2020-01-29 {
28         description
29             "initial revision";
30         reference
31             "O-RAN-OAM-Interface-Specification (O1)";
32     }
33     
34     typedef e2ap-protocol-type {
35         type enumeration {
36             enum not-specified {
37                 description
38                     "None";
39             }
40             enum x2-setup-request {
41                 description
42                     "X2 setup request";
43             }
44             enum endc-x2-setup-request {
45                 description
46                     "ENDC X2 setup request";
47             }
48         }
49         description
50             "The E2AP protocol setup types";
51     }
52
53     typedef connection-status-type {
54         type enumeration {
55             enum not-specified {
56                 description
57                     "None";
58             }
59             enum connected {
60                 description
61                     "Connected";
62             }
63             enum connecting {
64                 description
65                     "Connecting";
66             }
67             enum disconnected {
68                 description
69                     "Disconnected";
70             }
71             enum setup-failed {
72                 description
73                     "Setup failed";
74             }
75             enum shutting-down {
76                 description
77                     "Shutting down";
78             }
79             enum shutdown {
80                 description
81                     "Shutdown";
82             }
83         }
84         description
85             "The connection status of gNB";
86     }
87
88     typedef node-type {
89         type enumeration {
90             enum not-specified {
91                 description
92                     "None";
93             }
94             enum enb {
95                 description
96                     "eNB";
97             }
98             enum gnb {
99                 description
100                     "gNB";
101             }
102         }
103         description
104             "The connection status of gNB";
105     }
106
107     grouping nodeb-info {
108         leaf ran-name {
109             type string;
110             description
111                 "The unique RAN name";
112         }
113         leaf ip {
114             type string;
115             description
116                 "The IP address of the node";
117         }
118         leaf port {
119             type uint32;
120             description
121                 "The port of the node";
122         }
123         leaf e2ap-protocol {
124             type e2ap-protocol-type;
125             description
126                 "Specifies the protocol type of the connection";
127         }
128         leaf connection-status {
129             type connection-status-type;
130             description
131                 "Specifies the connection type of the node";
132         }
133         leaf plmn-id {
134             type string;
135             description
136                 "PLMN id";
137         }
138         leaf nb-id {
139             type string;
140             description
141                 "eNB id";
142         }
143         leaf node {
144             type node-type;
145             description
146                 "The type of the node: eNB or gNB";
147         }
148     }
149     
150     container ric {
151         container nodes {
152             config false;
153             list node {
154                 key "ran-name";
155                 uses nodeb-info;
156                 description
157                     "The list of the gNBs currently discovered by RIC";
158             }
159             description
160                 "State data container of the nodes";
161         }
162     }
163 }