9e535783ea2f05099dfe40fe721fdae8d7ab56bf
[scp/oam/modeling.git] / data-model / yang / working / o-ran-sc / near-rt-ric / 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     import o-ran-sc-root-v1 {
7         prefix root;
8     }
9     import o-ran-sc-types-v1 {
10         prefix ot;
11     }
12
13     organization
14       "O-RAN Software Community";
15     contact
16       "www.o-ran.org";
17     description
18       "This module defines a generic xApp descriptor used for 
19        xApp lifecycle management
20        
21        Copyright 2020 the O-RAN Alliance.
22        
23        Licensed under the Apache License, Version 2.0 (the 'License');
24        you may not use this file except in compliance with the License.
25        You may obtain a copy of the License at
26        
27        http://www.apache.org/licenses/LICENSE-2.0
28        
29        Unless required by applicable law or agreed to in writing, software
30        distributed under the License is distributed on an 'AS IS' BASIS,
31        WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
32        See the License for the specific language governing permissions and
33        limitations under the License.";
34
35     revision 2020-02-25 {
36         description
37           "Dependency to a common and abstract root module added.";
38         reference
39           "O-RAN-OAM-architecture-Specification (O1)";
40     }
41     revision 2020-01-29 {
42         description
43           "initial revision";
44         reference
45           "O-RAN-OAM-Interface-Specification (O1)";
46     }
47
48     // identity
49     identity near-realtime-ran-intelligent-controller {
50         base ot:control-function-type;
51         description
52           "Defines the identitiy near-rt-ric as contoll-function type.";
53     }
54
55     // grouping
56     // LCM: Generic xApp descriptor passed to xApp Manager (or OCO) during xApp deployment/undeployment
57     grouping xapp-descriptor {
58         uses root:control-base-grp;
59         leaf release-name {
60             type string;
61             description
62               "Name of the xapp to be visible in Kubernetes";
63         }
64         leaf version {
65             type string;
66             description
67               "The exact xapp helm chart version to install";
68         }
69         leaf namespace {
70             type string;
71             description
72               "Name of the namespace to which xApp is deployed in Kubernetes";
73         }
74         leaf override-file {
75             type string;
76             description
77               "JSON string of override file for 'helm install' command";
78         }
79         description
80           "xApp descriptor";
81     }
82
83     grouping ric-specific-grp {
84         container xapps {
85             list xapp {
86                 key "name";
87                 uses xapp-descriptor;
88                 description
89                   "xApp descriptor";
90             }
91             description
92               "List of xApps to be managed.";
93         }
94         description
95           "Groups xApps realted artifacts. ";
96     }
97
98     // Inherit from controlled-function
99     augment "/root:controlled-element/root:controlled-function" {
100         when "derived-from-or-self(./root:function-type, 'rxad:near-realtime-ran-intelligent-controller')";
101         uses ric-specific-grp;
102         description
103           "Inheritance from root object class.";
104     }
105 }