Implemented policy get-status
[nonrtric.git] / sdnc-a1-controller / northbound / nonrt-ric-api / model / src / main / yang / NONRT-RIC-API.yang
1 //-\r
2 // ============LICENSE_START=======================================================\r
3 //  Copyright (C) 2019 Nordix Foundation.\r
4 // ================================================================================\r
5 // Licensed under the Apache License, Version 2.0 (the "License");\r
6 // you may not use this file except in compliance with the License.\r
7 // You may obtain a copy of the License at\r
8 //\r
9 //      http://www.apache.org/licenses/LICENSE-2.0\r
10 //\r
11 // Unless required by applicable law or agreed to in writing, software\r
12 // distributed under the License is distributed on an "AS IS" BASIS,\r
13 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
14 // See the License for the specific language governing permissions and\r
15 // limitations under the License.\r
16 //\r
17 // SPDX-License-Identifier: Apache-2.0\r
18 // ============LICENSE_END=========================================================\r
19 //\r
20 module A1-ADAPTER-API {\r
21 \r
22     namespace "org:onap:sdnc:northbound:a1-adapter";\r
23 \r
24     prefix a1-adapter-api;\r
25 \r
26     import ietf-inet-types {\r
27         prefix "inet";\r
28         revision-date "2013-07-15";\r
29     }\r
30 \r
31     import ietf-yang-types {\r
32         prefix yang;\r
33     }\r
34 \r
35     revision "2020-01-22" {\r
36         description\r
37           "A1 adapter";\r
38     }\r
39 \r
40     // Get an array of integer policy type ids\r
41     // Each item in the returned array will be regarded as one policy-type-id.\r
42     rpc getPolicyTypeIdentities {\r
43         input {\r
44             leaf near-rt-ric-url {\r
45                 type string;\r
46             }\r
47         }\r
48 \r
49         output {\r
50             leaf-list policy-type-id-list {\r
51                 type string;\r
52             }\r
53         }\r
54     }\r
55 \r
56     // Get an array of integer policy ids\r
57     // Each item in the returned array will be regarded as one policy-id.\r
58     rpc getPolicyIdentities {\r
59         input {\r
60             leaf near-rt-ric-url {\r
61                 type string;\r
62             }\r
63         }\r
64 \r
65         output {\r
66             leaf-list policy-id-list {\r
67                 type string;\r
68             }\r
69         }\r
70     }\r
71 \r
72     // Get a policy type\r
73     rpc getPolicyType {\r
74         input {\r
75             leaf near-rt-ric-url {\r
76                 type string;\r
77             }\r
78             leaf policy-type-id {\r
79                 type string;\r
80             }\r
81         }\r
82         output {\r
83             leaf policy-type {\r
84                 type string;\r
85             }\r
86         }\r
87     }\r
88 \r
89     // Create a policy\r
90     rpc putPolicy {\r
91         input {\r
92             leaf near-rt-ric-url {\r
93                 type string;\r
94             }\r
95             leaf policy-id {\r
96                 type string;\r
97             }\r
98             leaf policy-type-id {\r
99                 type string;\r
100             }\r
101             leaf policy {\r
102                 type string;\r
103             }\r
104         }\r
105         output {\r
106             leaf returned-policy {\r
107                 type string;\r
108             }\r
109         }\r
110     }\r
111 \r
112     // Delete a policy\r
113     rpc deletePolicy {\r
114         input {\r
115             leaf near-rt-ric-url {\r
116                 type string;\r
117             }\r
118             leaf policy-id {\r
119                 type string;\r
120             }\r
121         }\r
122     }\r
123 \r
124     // Get a policy status\r
125     rpc getPolicyStatus {\r
126         input {\r
127             leaf near-rt-ric-url {\r
128                 type string;\r
129             }\r
130             leaf policy-id {\r
131                 type string;\r
132             }\r
133         }\r
134         output {\r
135             leaf policy-status {\r
136                 type string;\r
137             }\r
138         }\r
139     }\r
140 }