Merge "Add Http Response Code in A1 Controller Api"
[nonrtric.git] / sdnc-a1-controller / northbound / nonrt-ric-api / model / src / main / yang / NONRT-RIC-API.yang
1 module A1-ADAPTER-API {\r
2 \r
3     namespace "org:onap:sdnc:northbound:a1-adapter";\r
4 \r
5     prefix a1-adapter-api;\r
6 \r
7     import ietf-inet-types { prefix "inet"; revision-date "2013-07-15"; }\r
8 \r
9     import ietf-yang-types { prefix yang; }\r
10 \r
11     revision "2019-10-02" {\r
12         description\r
13         "A1 adapter";\r
14     }\r
15 \r
16     ///Flattend interface using RPC\r
17 \r
18     //Get an array of near-rt-ric IDs,\r
19     //Each item in the returned array will be regarded as one near-rt-ric-id.\r
20     rpc getNearRT-RICs {\r
21         output {\r
22             leaf-list near-rt-ric-id-list {\r
23                 type string;\r
24             }\r
25             leaf code {\r
26                 type string;\r
27             }\r
28         }\r
29     }\r
30 \r
31     //Get health status for a Near-RT-RIC. true - health ok, false - health is not ok.\r
32     rpc getHealthCheck {\r
33          input {\r
34             leaf near-rt-ric-id {\r
35                 type string;\r
36             }\r
37         }\r
38 \r
39         output {\r
40             leaf health-status {\r
41                 type boolean;\r
42             }\r
43             leaf code {\r
44                 type string;\r
45             }\r
46         }\r
47     }\r
48 \r
49     //Get an array of integer policy type ids\r
50     //Each item in the returned array will be regarded as one policy-type-id.\r
51     rpc getPolicyTypes {\r
52         input {\r
53             leaf near-rt-ric-id {\r
54                 type string;\r
55             }\r
56         }\r
57 \r
58         output {\r
59             leaf-list policy-type-id-list {\r
60                 type uint32;\r
61             }\r
62             leaf code {\r
63                 type string;\r
64             }\r
65         }\r
66     }\r
67 \r
68     //Create a policy type\r
69     rpc createPolicyType {\r
70         input {\r
71             leaf near-rt-ric-id {\r
72                 type string;\r
73             }\r
74             leaf policy-type-id {\r
75                 type uint32;\r
76             }\r
77             leaf description {\r
78                 type string;\r
79             }\r
80             leaf name {\r
81                 type string;\r
82             }\r
83             leaf policy-type {\r
84                 type string;\r
85             }\r
86         }\r
87        output {\r
88             leaf code {\r
89                 type string;\r
90             }\r
91         }\r
92     }\r
93 \r
94     //Get a policy type\r
95     rpc getPolicyType {\r
96         input {\r
97             leaf near-rt-ric-id {\r
98                 type string;\r
99             }\r
100             leaf policy-type-id {\r
101                 type uint32;\r
102             }\r
103         }\r
104         output {\r
105             leaf description {\r
106                 type string;\r
107             }\r
108             leaf name {\r
109                 type string;\r
110             }\r
111             leaf policy-type {\r
112                 type string;\r
113             }\r
114             leaf code {\r
115                 type string;\r
116             }\r
117         }\r
118     }\r
119 \r
120     //Delete a policy type\r
121     rpc deletePolicyType {\r
122         input {\r
123             leaf near-rt-ric-id {\r
124                 type string;\r
125             }\r
126             leaf policy-type-id {\r
127                 type uint32;\r
128             }\r
129         }\r
130         output {\r
131             leaf code {\r
132                 type string;\r
133             }\r
134         }\r
135     }\r
136 \r
137     //Get an array of string policy instance ids\r
138     //Each item in the returned array will be regarded as one policy-instance-id.\r
139     rpc getPolicyInstances {\r
140         input {\r
141             leaf near-rt-ric-id {\r
142                 type string;\r
143             }\r
144             leaf policy-type-id {\r
145                 type uint32;\r
146             }\r
147         }\r
148 \r
149         output {\r
150             leaf-list policy-instance-id-list {\r
151                 type string;\r
152             }\r
153             leaf code {\r
154                 type string;\r
155             }\r
156         }\r
157     }\r
158 \r
159     //Create a policy instance\r
160     rpc createPolicyInstance {\r
161         input {\r
162             leaf near-rt-ric-id {\r
163                 type string;\r
164             }\r
165             leaf policy-type-id {\r
166                 type uint32;\r
167             }\r
168             leaf policy-instance-id {\r
169                 type string;\r
170             }\r
171             leaf policy-instance {\r
172                 type string;\r
173             }\r
174         }\r
175         output {\r
176             leaf code {\r
177                 type string;\r
178             }\r
179         }\r
180     }\r
181 \r
182     ///Get a policy instance\r
183     rpc getPolicyInstance {\r
184         input {\r
185             leaf near-rt-ric-id {\r
186                 type string;\r
187             }\r
188             leaf policy-type-id {\r
189                 type uint32;\r
190             }\r
191             leaf policy-instance-id {\r
192                 type string;\r
193             }\r
194         }\r
195         output {\r
196             leaf policy-instance {\r
197                 type string;\r
198             }\r
199             leaf code {\r
200                 type string;\r
201             }\r
202         }\r
203     }\r
204 \r
205     //Delete a policy instance\r
206     rpc deletePolicyInstance {\r
207         input {\r
208             leaf near-rt-ric-id {\r
209                 type string;\r
210             }\r
211             leaf policy-type-id {\r
212                 type uint32;\r
213             }\r
214             leaf policy-instance-id {\r
215                 type string;\r
216             }\r
217         }\r
218         output {\r
219             leaf code {\r
220                 type string;\r
221             }\r
222         }\r
223     }\r
224 \r
225     //Get the status for a policy instance\r
226     rpc getStatus {\r
227         input {\r
228             leaf near-rt-ric-id {\r
229                 type string;\r
230             }\r
231             leaf policy-type-id {\r
232                 type uint32;\r
233             }\r
234             leaf policy-instance-id {\r
235                 type string;\r
236             }\r
237         }\r
238         output {\r
239             leaf status {\r
240                 type string;\r
241             }\r
242             leaf code {\r
243                 type string;\r
244             }\r
245         }\r
246     }\r
247 }