Merge "Infrastructure for having mutiple RIC APIs"
[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 { prefix "inet"; revision-date "2013-07-15"; }\r
27 \r
28     import ietf-yang-types { prefix yang; }\r
29 \r
30     revision "2020-01-22" {\r
31         description\r
32         "A1 adapter";\r
33     }\r
34 \r
35     //Get an array of integer policy type ids\r
36     //Each item in the returned array will be regarded as one policy-type-id.\r
37     rpc getPolicyTypeIdentities {\r
38         input {\r
39             leaf near-rt-ric-url {\r
40                 type string;\r
41             }\r
42         }\r
43 \r
44         output {\r
45             leaf-list policy-type-id-list {\r
46                 type string;\r
47             }\r
48         }\r
49     }\r
50 \r
51     //Get an array of integer policy ids\r
52     //Each item in the returned array will be regarded as one policy-id.\r
53     rpc getPolicyIdentities {\r
54         input {\r
55             leaf near-rt-ric-url {\r
56                 type string;\r
57             }\r
58         }\r
59 \r
60         output {\r
61             leaf-list policy-id-list {\r
62                 type string;\r
63             }\r
64         }\r
65     }\r
66 \r
67     //Get a policy type\r
68     rpc getPolicyType {\r
69         input {\r
70             leaf near-rt-ric-url {\r
71                 type string;\r
72             }\r
73             leaf policy-type-id {\r
74                 type string;\r
75             }\r
76         }\r
77         output {\r
78             leaf policy-type {\r
79                 type string;\r
80             }\r
81         }\r
82     }\r
83 \r
84     //Create a policy\r
85     rpc putPolicy {\r
86         input {\r
87             leaf near-rt-ric-url {\r
88                 type string;\r
89             }\r
90             leaf policy-id {\r
91                 type string;\r
92             }\r
93             leaf policy {\r
94                 type string;\r
95             }\r
96         }\r
97         output {\r
98             leaf returned-policy {\r
99                 type string;\r
100             }\r
101         }\r
102     }\r
103 \r
104     //Delete a policy\r
105     rpc deletePolicy {\r
106         input {\r
107             leaf near-rt-ric-url {\r
108                 type string;\r
109             }\r
110             leaf policy-id {\r
111                 type string;\r
112             }\r
113         }\r
114     }\r
115 }