Register operations for VIM, WIM, SDNC
[osm/NBI.git] / osm_nbi / resources_to_operations.yml
1 # Copyright 2018 Whitestack, LLC
2 #
3 # Licensed under the Apache License, Version 2.0 (the "License"); you may
4 # not use this file except in compliance with the License. You may obtain
5 # a copy of the License at
6 #
7 #         http://www.apache.org/licenses/LICENSE-2.0
8 #
9 # Unless required by applicable law or agreed to in writing, software
10 # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
11 # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
12 # License for the specific language governing permissions and limitations
13 # under the License.
14 #
15 # For those usages not covered by the Apache License, Version 2.0 please
16 # contact: esousa@whitestack.com or glavado@whitestack.com
17 ##
18
19 ### NOTE: This is INFORMATIVE ONLY!!!!
20 ### The right values are at module osm_nbi/nbi.py variable 'valid_url_methods' under ROLE_OPERATIONS key
21 ---
22 resources_to_operations:
23
24 ##
25 # The resources are defined using the following pattern:
26 #
27 #     "<METHOD> <PATH>": <OPERATION>
28 #
29 # Where <METHOD> refers to the HTTP Method being used, i.e. GET, POST, DELETE.
30 # The <PATH> refers to the path after http(s)://<ip-or-domain>:<port>/osm
31 # In the <PATH> variable parts should be replaced, using the <variable_name>
32 # notation. Inside the RBAC module these variables can be extracted for further
33 # analysis.
34 #
35 # NOTE: the <artifactPath> tag is reserved for artifact path (or file locations).
36 #       meaning that it retains a special meaning.
37 #
38 # Operations are organized in a hierarchical tree, where <OPERATION> defines
39 # the full path until the leaf (all the nodes in between need to be specified).
40 #
41 # NOTE: The end user should not modify this file.
42 ##
43
44 ################################################################################
45 ##################################### NSDs #####################################
46 ################################################################################
47
48   "GET /nsd/v1/ns_descriptors_content": "nsds:get"
49   "GET /nsd/v1/ns_descriptors": "nsds:get"
50
51   "POST /nsd/v1/ns_descriptors_content": "nsds:content:post"
52
53   "GET /nsd/v1/ns_descriptors_content/<nsdInfoId>": "nsds:id:get"
54   "GET /nsd/v1/ns_descriptors/<nsdInfoId>": "nsds:id:get"
55
56   "PUT /nsd/v1/ns_descriptors_content/<nsdInfoId>": "nsds:id:put"
57
58   "DELETE /nsd/v1/ns_descriptors_content/<nsdInfoId>": "nsds:id:delete"
59   "DELETE /nsd/v1/ns_descriptors/<nsdInfoId>": "nsds:id:delete"
60
61   "POST /nsd/v1/ns_descriptors": "nsds:post"
62
63   "PATCH /nsd/v1/ns_descriptors/<nsdInfoId>": "nsds:id:patch"
64
65   "GET /nsd/v1/ns_descriptors/<nsdInfoId>/nsd_content": "nsds:id:content:get"
66
67   "PUT /nsd/v1/ns_descriptors/<nsdInfoId>/nsd_content": "nsds:id:content:put"
68
69   "GET /nsd/v1/ns_descriptors/<nsdInfoId>/nsd": "nsds:id:nsd:get"
70
71   "GET /nsd/v1/ns_descriptors/<nsdInfoId>/artifacts": "nsds:id:nsd_artifact:get"
72   "GET /nsd/v1/ns_descriptors/<nsdInfoId>/artifacts/<artifactPath>": "nsds:id:nsd_artifact:get"
73
74 ################################################################################
75 ##################################### VNFDs ####################################
76 ################################################################################
77
78   "GET /vnfpkgm/v1/vnf_packages_content": "vnfds:get"
79   "GET /vnfpkgm/v1/vnf_packages": "vnfds:get"
80
81   "POST /vnfpkgm/v1/vnf_packages_content": "vnfds:content:post"
82
83   "GET /vnfpkgm/v1/vnf_packages_content/<vnfPkgId>": "vnfds:id:get"
84   "GET /vnfpkgm/v1/vnf_packages/<vnfPkgId>": "vnfds:id:get"
85
86   "PUT /vnfpkgm/v1/vnf_packages_content/<vnfPkgId>": "vnfds:id:put"
87
88   "DELETE /vnfpkgm/v1/vnf_packages_content/<vnfPkgId>": "vnfds:id:delete"
89   "DELETE /vnfpkgm/v1/vnf_packages/<vnfPkgId>": "vnfds:id:delete"
90
91   "POST /vnfpkgm/v1/vnf_packages": "vnfds:post"
92
93   "PATCH /vnfpkgm/v1/vnf_packages/<vnfPkgId>": "vnfds:id:patch"
94
95   "GET /vnfpkgm/v1/vnf_packages/<vnfPkgId>/package_content": "vnfds:id:content:get"
96
97   "PUT /vnfpkgm/v1/vnf_packages/<vnfPkgId>/package_content": "vnfds:id:content:put"
98
99   "POST /vnfpkgm/v1/vnf_packages/<vnfPkgId>/package_content/upload_from_uri": "vnfds:id:upload:post"
100
101   "GET /vnfpkgm/v1/vnf_packages/<vnfPkgId>/vnfd": "vnfds:id:vnfd:get"
102
103   "GET /vnfpkgm/v1/vnf_packages/<vnfPkgId>/artifacts": "vnfds:id:vnfd_artifact:get"
104   "GET /vnfpkgm/v1/vnf_packages/<vnfPkgId>/artifacts/<artifactPath>": "vnfds:id:vnfd_artifact:get"
105
106 ################################################################################
107 ################################## NS Instances ################################
108 ################################################################################
109
110   "GET /nslcm/v1/ns_instances_content": "ns_instances:get"
111   "GET /nslcm/v1/ns_instances": "ns_instances:get"
112
113   "POST /nslcm/v1/ns_instances_content": "ns_instances:content:post"
114
115   "GET /nslcm/v1/ns_instances_content/<nsInstanceId>": "ns_instances:id:get"
116   "GET /nslcm/v1/ns_instances/<nsInstanceId>": "ns_instances:id:get"
117
118   "DELETE /nslcm/v1/ns_instances_content/<nsInstanceId>": "ns_instances:id:delete"
119   "DELETE /nslcm/v1/ns_instances/<nsInstanceId>": "ns_instances:id:delete"
120
121   "POST /nslcm/v1/ns_instances": "ns_instances:post"
122
123   "POST /nslcm/v1/ns_instances/<nsInstanceId>/instantiate": "ns_instances:id:instantiate:post"
124
125   "POST /nslcm/v1/ns_instances/<nsInstanceId>/terminate": "ns_instances:id:terminate:post"
126
127   "POST /nslcm/v1/ns_instances/<nsInstanceId>/action": "ns_instances:id:action:post"
128
129   "POST /nslcm/v1/ns_instances/<nsInstanceId>/scale": "ns_instances:id:scale:post"
130
131   "GET /nslcm/v1/ns_lcm_op_occs": "ns_instances:opps:get"
132
133   "GET /nslcm/v1/ns_lcm_op_occs/<nsLcmOpOccId>": "ns_instances:opps:id:get"
134
135 ################################################################################
136 ################################# VNF Instances ################################
137 ################################################################################
138
139   "GET /nslcm/v1/vnfrs": "vnf_instances:get"
140   "GET /nslcm/v1/vnf_instances": "vnf_instances:get"
141
142   "GET /nslcm/v1/vnfrs/<vnfInstanceId>": "vnf_instances:id:get"
143   "GET /nslcm/v1/vnf_instances/<vnfInstanceId>": "vnf_instances:id:get"
144
145 ################################################################################
146 #################################### Tokens ####################################
147 ################################################################################
148
149   "GET /admin/v1/tokens": "tokens:get"
150
151   "POST /admin/v1/tokens": "tokens:post"
152
153   "DELETE /admin/v1/tokens": "tokens:delete"
154
155   "GET /admin/v1/tokens/<id>": "tokens:id:get"
156
157   "DELETE /admin/v1/tokens/<id>": "tokens:id:delete"
158
159 ################################################################################
160 ##################################### Users ####################################
161 ################################################################################
162
163   "GET /admin/v1/users": "users:get"
164
165   "POST /admin/v1/users": "users:post"
166
167   "GET /admin/v1/users/<id>": "users:id:get"
168
169   "POST /admin/v1/users/<id>": "users:id:post"
170
171   "PUT /admin/v1/users/<id>": "users:id:put"
172
173   "DELETE /admin/v1/users/<id>": "users:id:delete"
174
175   "PATCH /admin/v1/users/<id>": "users:id:patch"
176
177 ################################################################################
178 #################################### Projects ##################################
179 ################################################################################
180
181   "GET /admin/v1/projects": "projects:get"
182
183   "POST /admin/v1/projects": "projects:post"
184
185   "GET /admin/v1/projects/<id>": "projects:id:get"
186
187   "PUT /admin/v1/projects/<id>": "projects:id:put"
188
189   "DELETE /admin/v1/projects/<id>": "projects:id:delete"
190
191 ################################################################################
192 ##################################### VIMs #####################################
193 ################################################################################
194
195   "GET /admin/v1/vims": "vims:get"
196
197   "POST /admin/v1/vims": "vims:post"
198
199   "GET /admin/v1/vims/<id>": "vims:id:get"
200
201   "PUT /admin/v1/vims/<id>": "vims:id:put"
202
203   "DELETE /admin/v1/vims/<id>": "vims:id:delete"
204
205   "PATCH /admin/v1/vims/<id>": "vims:id:patch"
206
207 ################################################################################
208 ################################## VIM Accounts ################################
209 ################################################################################
210
211   "GET /admin/v1/vim_accounts": "vim_accounts:get"
212
213   "POST /admin/v1/vim_accounts": "vim_accounts:post"
214
215   "GET /admin/v1/vim_accounts/<id>": "vim_accounts:id:get"
216
217   "PUT /admin/v1/vim_accounts/<id>": "vim_accounts:id:put"
218
219   "DELETE /admin/v1/vim_accounts/<id>": "vim_accounts:id:delete"
220
221   "PATCH /admin/v1/vim_accounts/<id>": "vim_accounts:id:patch"
222
223 ################################################################################
224 ################################# SDN Controllers ##############################
225 ################################################################################
226
227   "GET /admin/v1/sdns": "sdn_controllers:get"
228
229   "POST /admin/v1/sdns": "sdn_controllers:post"
230
231   "GET /admin/v1/sdns/<id>": "sdn_controllers:id:get"
232
233   "PUT /admin/v1/sdns/<id>": "sdn_controllers:id:put"
234
235   "DELETE /admin/v1/sdns/<id>": "sdn_controllers:id:delete"
236
237   "PATCH /admin/v1/sdns/<id>": "sdn_controllers:id:patch"
238
239 ################################################################################
240 ##################################### WIMs #####################################
241 ################################################################################
242
243   "GET /admin/v1/wims": "wims:get"
244
245   "POST /admin/v1/wims": "wims:post"
246
247   "GET /admin/v1/wims/<id>": "wims:id:get"
248
249   "PUT /admin/v1/wims/<id>": "wims:id:put"
250
251   "DELETE /admin/v1/wims/<id>": "wims:id:delete"
252
253   "PATCH /admin/v1/wims/<id>": "wims:id:patch"
254
255 ################################################################################
256 ################################## WIM Accounts ################################
257 ################################################################################
258
259   "GET /admin/v1/wim_accounts": "wim_accounts:get"
260
261   "POST /admin/v1/wim_accounts": "wim_accounts:post"
262
263   "GET /admin/v1/wim_accounts/<id>": "wim_accounts:id:get"
264
265   "PUT /admin/v1/wim_accounts/<id>": "wim_accounts:id:put"
266
267   "DELETE /admin/v1/wim_accounts/<id>": "wim_accounts:id:delete"
268
269   "PATCH /admin/v1/wim_accounts/<id>": "wim_accounts:id:patch"
270
271 ################################################################################
272 ##################################### Roles ####################################
273 ################################################################################
274
275   "GET /admin/v1/roles": "roles:get"
276
277   "POST /admin/v1/roles": "roles:post"
278
279   "GET /admin/v1/roles/<id>": "roles:id:get"
280
281   "DELETE /admin/v1/roles/<id>": "roles:id:delete"
282
283   "PUT /admin/v1/roles/<id>": "roles:id:put"
284
285 ################################################################################
286 ##################################### PDUDs ####################################
287 ################################################################################
288
289   "GET /pdu/v1/pdu_descriptors": "pduds:get"
290
291   "POST /pdu/v1/pdu_descriptors": "pduds:post"
292
293   "PUT /pdu/v1/pdu_descriptors": "pduds:put"
294
295   "DELETE /pdu/v1/pdu_descriptors": "pduds:delete"
296
297   "PATCH /pdu/v1/pdu_descriptors": "pduds:patch"
298
299   "GET /pdu/v1/pdu_descriptors/<id>": "pduds:id:get"
300
301   "POST /pdu/v1/pdu_descriptors/<id>": "pduds:id:post"
302
303   "PUT /pdu/v1/pdu_descriptors/<id>": "pduds:id:put"
304
305   "DELETE /pdu/v1/pdu_descriptors/<id>": "pduds:id:delete"
306
307   "PATCH /pdu/v1/pdu_descriptors/<id>": "pduds:id:patch"
308
309 ################################################################################
310 ############################ Network Slice Templates ###########################
311 ################################################################################
312
313   "GET /nst/v1/netslice_templates_content": "slice_templates:get"
314   "GET /nst/v1/netslice_templates": "slice_templates:get"
315
316   "POST /nst/v1/netslice_templates_content": "slice_templates:content:post"
317
318   "GET /nst/v1/netslice_templates_content/<nstInfoId>": "slice_templates:id:get"
319   "GET /nst/v1/netslice_templates/<nstInfoId>": "slice_templates:id:get"
320
321   "PUT /nst/v1/netslice_templates_content/<nstInfoId>": "slice_templates:id:put"
322
323   "DELETE /nst/v1/netslice_templates_content/<nstInfoId>": "slice_templates:id:delete"
324   "DELETE /nst/v1/netslice_templates/<nstInfoId>": "slice_templates:id:delete"
325
326   "PATCH /nst/v1/netslice_templates/<nstInfoId>": "slice_templates:id:patch"
327
328   "GET /nst/v1/netslice_templates/<nstInfoId>/nst_content": "slice_templates:content:get"
329
330   "PUT /nst/v1/netslice_templates/<nstInfoId>/nst_content": "slice_templates:content:put"
331
332   "GET /nst/v1/netslice_templates/<nstInfoId>/nst": "slice_templates:id:nst:get"
333
334   "GET /nst/v1/netslice_templates/<nstInfoId>/artifacts": "slice_templates:id:nst_artifact:get"
335   "GET /nst/v1/netslice_templates/<nstInfoId>/artifacts/<artifactPath>": "slice_templates:id:nst_artifact:get"
336
337 ################################################################################
338 ############################ Network Slice Instances ###########################
339 ################################################################################
340
341   "GET /nsilcm/v1/netslice_instances_content": "slice_instances:get"
342   "GET /nsilcm/v1/netslice_instances": "slice_instances:get"
343
344   "POST /nsilcm/v1/netslice_instances_content": "slice_instances:content:get"
345
346   "GET /nsilcm/v1/netslice_instances_content/<SliceInstanceId>": "slice_instances:id:get"
347   "GET /nsilcm/v1/netslice_instances/<SliceInstanceId>": "slice_instances:id:get"
348
349   "DELETE /nsilcm/v1/netslice_instances_content/<SliceInstanceId>": "slice_instances:id:delete"
350   "DELETE /nsilcm/v1/netslice_instances/<SliceInstanceId>": "slice_instances:id:delete"
351
352   "POST /nsilcm/v1/netslice_instances": "slice_instances:post"
353
354   "POST /nsilcm/v1/netslice_instances/<SliceInstanceId>/instantiate": "slice_instances:id:instantiate:post"
355
356   "POST /nsilcm/v1/netslice_instances/<SliceInstanceId>/terminate": "slice_instances:id:terminate:post"
357
358   "POST /nsilcm/v1/netslice_instances/<SliceInstanceId>/action": "slice_instances:id:action:post"
359
360   "GET /nsilcm/v1/nsi_lcm_op_occs": "slice_instances:opps:get"
361
362   "GET /nsilcm/v1/nsi_lcm_op_occs/<nsiLcmOpOccId>": "slice_instances:opps:id:get"
363
364 ################################################################################
365 ############################ QUERY STRING admin operations #####################
366 ################################################################################
367
368   "GET ?ADMIN":    "admin:get"
369   "POST ?ADMIN":   "admin:post"
370   "PATCH ?ADMIN":  "admin:patch"
371   "PUT ?ADMIN":    "admin:put"
372   "DELETE ?ADMIN": "admin:delete"
373
374   "GET ?FORCE":    "force:get"
375   "POST ?FORCE":   "force:post"
376   "PATCH ?FORCE":  "force:patch"
377   "PUT ?FORCE":    "force:put"
378   "DELETE ?FORCE": "force:delete"
379
380   "GET ?PUBLIC":    "public:get"
381   "POST ?PUBLIC":   "public:post"
382   "PATCH ?PUBLIC":  "public:patch"
383   "PUT ?PUBLIC":    "public:put"
384   "DELETE ?PUBLIC": "public:delete"
385
386   "GET ?SET_PROJECT":    "set_project:get"
387   "POST ?SET_PROJECT":   "set_project:post"
388   "PATCH ?SET_PROJECT":  "set_project:patch"
389   "PUT ?SET_PROJECT":    "set_project:put"
390   "DELETE ?SET_PROJECT": "set_project:delete"