3a881ee73d6a50b183c3160282325098f3880da0
[ric-plt/o1.git] / agent / yang / o-ran-sc-ric-xapp-desc-v1.yang
1 module o-ran-sc-ric-xapp-desc-v1 {
2     yang-version 1.1;
3     namespace "urn:o-ran:ric:xapp-desc: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 a generic xApp descriptor used for xApp lifecycle management
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     // LCM: Generic xApp descriptor passed to xApp Manager (or OCO) during xApp deployment/undeployment
35     grouping xapp-descriptor {
36         leaf name {
37             type string;
38             mandatory true;
39             description
40                 "Name of the xApp in helm chart";
41         }
42         leaf release-name {
43             type string;
44             description
45                 "Name of the xapp to be visible in Kubernetes";
46         }
47         leaf version {
48             type string;
49             description
50                 "The exact xapp helm chart version to install";
51         }
52         leaf namespace {
53             type string;
54             description
55                 "Name of the namespace to which xApp is deployed in Kubernetes";
56         }
57         leaf override-file {
58             type string;
59             description
60                 "JSON string of override file for 'helm install' command";
61         }
62         description
63             "xApp descriptor";
64     }
65
66     typedef health-status {
67          type enumeration {
68             enum unavailable {
69                 description
70                     "The health status not available";
71             }
72             enum healthy {
73                 description
74                     "The xApp is healthy";
75             }
76             enum unhealthy {
77                 description
78                     "The xApp is not healthy";
79             }
80         }
81         description
82             "xApp health status";
83     }
84
85     grouping xapp-status {
86         leaf name {
87             type string;
88             description
89                 "Name of the xApp visible in Kubernetes";
90         }
91         leaf status {
92             type string;
93             description
94                 "The status of the xApp pod: running, restarted, etc";
95         }
96         leaf health {
97             type health-status;
98             description
99                 "The health status of xApp: healthy, not-healthy, unavailable";
100         }
101         description
102             "xApp health status";
103     }
104
105     // Top-level (root) managed object
106     container ric {
107         container xapps {
108             list xapp {
109                 key "name";
110                 uses xapp-descriptor;
111                 description
112                     "xApp descriptor";
113             }
114             description
115                 "List of xApps to be managed";
116         }
117         container health {
118             config false;
119             list status {
120                 key "name";
121                 uses xapp-status;
122                 description
123                     "The status of xApp";
124             }
125             description
126                 "State data of the xApps";
127         }
128         description
129             "Root object for xApp management and status";
130     }
131 }