Initial version of common O-RAN-SC yang modules
[scp/oam/modeling.git] / data-model / draft / o-ran-sc-ric-gnb-status-v1.yang
1 module o-ran-sc-ric-gnb-status-v1 {
2     yang-version 1.1;
3     namespace "urn:o-ran:ric:gnb-status:1.0";
4     prefix rgnb;
5
6     import o-ran-sc-ric-xapp-desc-v1 {
7         prefix rxad;
8     }
9     import o-ran-sc-root-v1 {
10         prefix root;
11     }
12     import o-ran-sc-types-v1 {
13         prefix ot;
14     }
15     import ietf-inet-types {
16         prefix inet;
17         reference
18           "RFC 6991: Common YANG Data Types";
19     }
20
21     organization
22       "O-RAN Software Community";
23     contact
24       "www.o-ran.org";
25     description
26       "This module defines the gNB status and other information visible to operators
27        
28        Copyright 2020 the O-RAN Alliance.
29        
30        Licensed under the Apache License, Version 2.0 (the 'License');
31        you may not use this file except in compliance with the License.
32        You may obtain a copy of the License at
33        
34        http://www.apache.org/licenses/LICENSE-2.0
35        
36        Unless required by applicable law or agreed to in writing, software
37        distributed under the License is distributed on an 'AS IS' BASIS,
38        WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
39        See the License for the specific language governing permissions and
40        limitations under the License.";
41
42     revision 2020-02-25 {
43         description
44           "Dependency to a common and abstract root module added.";
45         reference
46           "O-RAN-OAM-architecture-Specification (O1)";
47     }
48     revision 2020-01-29 {
49         description
50           "initial revision";
51         reference
52           "O-RAN-OAM-Interface-Specification (O1)";
53     }
54
55     grouping nodeb-info {
56         uses root:control-base-grp;
57
58         leaf ip {
59             type inet:ip-address;
60             description
61               "The IP address of the node";
62         }
63         leaf port {
64             type inet:port-number;
65             description
66               "The port of the node";
67         }
68         leaf e2ap-protocol {
69             type ot:e2ap-protocol-type;
70             description
71               "Specifies the protocol type of the connection";
72         }
73         leaf connection-status {
74             type ot:connection-status-type;
75             description
76               "Specifies the connection type of the node";
77         }
78         leaf plmn-id {
79             type ot:sized-printable-string;
80             description
81               "PLMN id TODO: who is responsable for thiis identifier?";
82         }
83         leaf nb-id {
84             type ot:sized-printable-string;
85             description
86               "eNB id TODO: who is responsibale for this identifier?";
87         }
88         leaf node {
89             type identityref {
90                 base ot:control-element-type;
91             }
92             description
93               "The type of the node: eNB or gNB";
94         }
95         description
96           "Node information";
97     }
98
99     grouping ric-specific-grp {
100         container nodes {
101             config false;
102             list node {
103                 key identifier;
104                 uses nodeb-info;
105                 description
106                   "The list of the gNBs currently discovered by RIC";
107             }
108             description
109               "State data container of the nodes";
110         }
111         description
112           "Root object for gNB status";
113     }
114
115     // Inherit from controlled-function
116     augment "/root:controlled-element/root:controlled-function" {
117         when "derived-from-or-self(./root:function-type, 'rxad:near-realtime-ran-intelligent-controller')";
118         uses ric-specific-grp;
119         description
120           "Inheritance from root object class.";
121     }
122 }