Support for NETCONF Get command to get xapp configuration in O1 client
[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         leaf config {
63             type string;
64             description
65                 "configuration of the xapp";
66         }
67         description
68             "xApp descriptor";
69     }
70
71     typedef health-status {
72          type enumeration {
73             enum unavailable {
74                 description
75                     "The health status not available";
76             }
77             enum healthy {
78                 description
79                     "The xApp is healthy";
80             }
81             enum unhealthy {
82                 description
83                     "The xApp is not healthy";
84             }
85         }
86         description
87             "xApp health status";
88     }
89
90     grouping xapp-status {
91         leaf name {
92             type string;
93             description
94                 "Name of the xApp visible in Kubernetes";
95         }
96         leaf status {
97             type string;
98             description
99                 "The status of the xApp pod: running, restarted, etc";
100         }
101         leaf health {
102             type health-status;
103             description
104                 "The health status of xApp: healthy, not-healthy, unavailable";
105         }
106         description
107             "xApp health status";
108     }
109
110     // Top-level (root) managed object
111     container ric {
112         container xapps {
113             list xapp {
114                 key "name";
115                 uses xapp-descriptor;
116                 description
117                     "xApp descriptor";
118             }
119             description
120                 "List of xApps to be managed";
121         }
122         container health {
123             config false;
124             list status {
125                 key "name";
126                 uses xapp-status;
127                 description
128                     "The status of xApp";
129             }
130             description
131                 "State data of the xApps";
132         }
133         container configuration {
134             config false;
135             container xapps {
136             list xapp {
137                 key "name";
138                 uses xapp-descriptor;
139                 description
140                     "xApp descriptor";
141             }
142             description
143                 "List of xApps for which config to be extracted";
144           }
145           description
146               "config get data of the xApps";
147         }
148         description
149             "Root object for xApp management and status";
150     }
151 }