56b057936bcf3ef0d2f083f6353f0c6d75ddc81e
[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:content: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:content: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   "POST /vnfpkgm/v1/vnf_packages/<vnfPkgId>/action": "vnfds:id:action:post"
107
108   "GET /vnfpkgm/v1/vnfpkg_op_occs": "vnfds:vnfpkgops:get"
109   "GET /vnfpkgm/v1/vnfpkg_op_occs/<vnfPkgOpId>": "vnfds:vnfpkgops:id:get"
110
111 ################################################################################
112 ################################## NS Instances ################################
113 ################################################################################
114
115   "GET /nslcm/v1/ns_instances_content": "ns_instances:content:get"
116   "GET /nslcm/v1/ns_instances": "ns_instances:get"
117
118   "POST /nslcm/v1/ns_instances_content": "ns_instances:content:post"
119   "POST /nslcm/v1/ns_instances_terminate": "ns_instances:content:post"
120
121   "GET /nslcm/v1/ns_instances_content/<nsInstanceId>": "ns_instances:id:get"
122   "GET /nslcm/v1/ns_instances/<nsInstanceId>": "ns_instances:id:get"
123
124   "DELETE /nslcm/v1/ns_instances_content/<nsInstanceId>": "ns_instances:id:delete"
125   "DELETE /nslcm/v1/ns_instances/<nsInstanceId>": "ns_instances:id:delete"
126
127   "POST /nslcm/v1/ns_instances": "ns_instances:post"
128
129   "POST /nslcm/v1/ns_instances/<nsInstanceId>/instantiate": "ns_instances:id:instantiate:post"
130
131   "POST /nslcm/v1/ns_instances/<nsInstanceId>/terminate": "ns_instances:id:terminate:post"
132
133   "POST /nslcm/v1/ns_instances/<nsInstanceId>/action": "ns_instances:id:action:post"
134
135   "POST /nslcm/v1/ns_instances/<nsInstanceId>/update": "ns_instances:id:update:post"
136
137   "POST /nslcm/v1/ns_instances/<nsInstanceId>/scale": "ns_instances:id:scale:post"
138
139   "POST /nslcm/v1/ns_instances/<nsInstanceId>/migrate": "ns_instances:id:migrate:post"
140
141   "GET /nslcm/v1/ns_lcm_op_occs": "ns_instances:opps:get"
142
143   "GET /nslcm/v1/ns_lcm_op_occs/<nsLcmOpOccId>": "ns_instances:opps:id:get"
144
145 ################################################################################
146 ################################# VNF Instances ################################
147 ################################################################################
148
149   "GET /nslcm/v1/vnfrs": "vnf_instances:get"
150   "GET /nslcm/v1/vnf_instances": "vnf_instances:get"
151
152   "GET /nslcm/v1/vnfrs/<vnfInstanceId>": "vnf_instances:id:get"
153   "GET /nslcm/v1/vnf_instances/<vnfInstanceId>": "vnf_instances:id:get"
154
155   "GET /vnflcm/v1/vnf_instances/": "vnflcm_instances:get"
156   "POST /vnflcm/v1/vnf_instances/": "vnflcm_instances:post"
157
158   "GET /vnflcm/v1/vnf_instances/<vnfInstanceId>": "vnflcm_instances:id:get"
159   "DELETE /vnflcm/v1/vnf_instances/<vnfInstanceId>": "vnflcm_instances:id:delete"
160
161 ################################################################################
162 #################################### Tokens ####################################
163 ################################################################################
164
165   "GET /admin/v1/tokens": "tokens:get"
166
167   "POST /admin/v1/tokens": "tokens:post"
168
169   "DELETE /admin/v1/tokens": "tokens:delete"
170
171   "GET /admin/v1/tokens/<id>": "tokens:id:get"
172
173   "DELETE /admin/v1/tokens/<id>": "tokens:id:delete"
174
175 ################################################################################
176 ##################################### Users ####################################
177 ################################################################################
178
179   "GET /admin/v1/users": "users:get"
180
181   "POST /admin/v1/users": "users:post"
182
183   "GET /admin/v1/users/<id>": "users:id:get"
184
185   "DELETE /admin/v1/users/<id>": "users:id:delete"
186
187   "PATCH /admin/v1/users/<id>": "users:id:patch"
188
189   "GET /admin/v1/domains": "domains:get"
190
191 ################################################################################
192 #################################### Projects ##################################
193 ################################################################################
194
195   "GET /admin/v1/projects": "projects:get"
196
197   "POST /admin/v1/projects": "projects:post"
198
199   "GET /admin/v1/projects/<id>": "projects:id:get"
200
201   "PATCH /admin/v1/projects/<id>": "projects:id:patch"
202
203   "DELETE /admin/v1/projects/<id>": "projects:id:delete"
204
205 ################################################################################
206 ##################################### VIMs #####################################
207 ################################################################################
208
209   "GET /admin/v1/vims": "vims:get"
210
211   "POST /admin/v1/vims": "vims:post"
212
213   "GET /admin/v1/vims/<id>": "vims:id:get"
214
215   "DELETE /admin/v1/vims/<id>": "vims:id:delete"
216
217   "PATCH /admin/v1/vims/<id>": "vims:id:patch"
218
219 ################################################################################
220 ################################## VIM Accounts ################################
221 ################################################################################
222
223   "GET /admin/v1/vim_accounts": "vim_accounts:get"
224
225   "POST /admin/v1/vim_accounts": "vim_accounts:post"
226
227   "GET /admin/v1/vim_accounts/<id>": "vim_accounts:id:get"
228
229   "DELETE /admin/v1/vim_accounts/<id>": "vim_accounts:id:delete"
230
231   "PATCH /admin/v1/vim_accounts/<id>": "vim_accounts:id:patch"
232
233 ################################################################################
234 ################################# K8s Clusters ##############################
235 ################################################################################
236
237   "GET /admin/v1/k8sclusters": "k8sclusters:get"
238
239   "POST /admin/v1/k8sclusters": "k8sclusters:post"
240
241   "GET /admin/v1/k8sclusters/<id>": "k8sclusters:id:get"
242
243   "DELETE /admin/v1/k8sclusters/<id>": "k8sclusters:id:delete"
244
245   "PATCH /admin/v1/k8sclusters/<id>": "k8sclusters:id:patch"
246
247 ################################################################################
248 ####################################### VCAs ###################################
249 ################################################################################
250
251   "GET /admin/v1/vca": "vca:get"
252
253   "POST /admin/v1/vca": "vca:post"
254
255   "GET /admin/v1/vca/<id>": "vca:id:get"
256
257   "DELETE /admin/v1/vca/<id>": "vca:id:delete"
258
259   "PATCH /admin/v1/vca/<id>": "vca:id:patch"
260
261 ################################################################################
262 ################################# K8s Repos ##############################
263 ################################################################################
264
265   "GET /admin/v1/k8srepos": "k8srepos:get"
266
267   "POST /admin/v1/k8srepos": "k8srepos:post"
268
269   "GET /admin/v1/k8srepos/<id>": "k8srepos:id:get"
270
271   "DELETE /admin/v1/k8srepos/<id>": "k8srepos:id:delete"
272
273 ################################################################################
274 ################################# SDN Controllers ##############################
275 ################################################################################
276
277   "GET /admin/v1/sdns": "sdn_controllers:get"
278
279   "POST /admin/v1/sdns": "sdn_controllers:post"
280
281   "GET /admin/v1/sdns/<id>": "sdn_controllers:id:get"
282
283   "DELETE /admin/v1/sdns/<id>": "sdn_controllers:id:delete"
284
285   "PATCH /admin/v1/sdns/<id>": "sdn_controllers:id:patch"
286
287 ################################################################################
288 ################################## WIM Accounts ################################
289 ################################################################################
290
291   "GET /admin/v1/wim_accounts": "wim_accounts:get"
292
293   "POST /admin/v1/wim_accounts": "wim_accounts:post"
294
295   "GET /admin/v1/wim_accounts/<id>": "wim_accounts:id:get"
296
297   "DELETE /admin/v1/wim_accounts/<id>": "wim_accounts:id:delete"
298
299   "PATCH /admin/v1/wim_accounts/<id>": "wim_accounts:id:patch"
300
301 ################################################################################
302 ##################################### Roles ####################################
303 ################################################################################
304
305   "GET /admin/v1/roles": "roles:get"
306
307   "POST /admin/v1/roles": "roles:post"
308
309   "GET /admin/v1/roles/<id>": "roles:id:get"
310
311   "DELETE /admin/v1/roles/<id>": "roles:id:delete"
312
313   "PATCH /admin/v1/roles/<id>": "roles:id:patch"
314
315 ################################################################################
316 ##################################### PDUDs ####################################
317 ################################################################################
318
319   "GET /pdu/v1/pdu_descriptors": "pduds:get"
320
321   "POST /pdu/v1/pdu_descriptors": "pduds:post"
322
323   "PUT /pdu/v1/pdu_descriptors": "pduds:put"
324
325   "DELETE /pdu/v1/pdu_descriptors": "pduds:delete"
326
327   "PATCH /pdu/v1/pdu_descriptors": "pduds:patch"
328
329   "GET /pdu/v1/pdu_descriptors/<id>": "pduds:id:get"
330
331   "POST /pdu/v1/pdu_descriptors/<id>": "pduds:id:post"
332
333   "PUT /pdu/v1/pdu_descriptors/<id>": "pduds:id:put"
334
335   "DELETE /pdu/v1/pdu_descriptors/<id>": "pduds:id:delete"
336
337   "PATCH /pdu/v1/pdu_descriptors/<id>": "pduds:id:patch"
338
339 ################################################################################
340 ############################ Network Slice Templates ###########################
341 ################################################################################
342
343   "GET /nst/v1/netslice_templates_content": "slice_templates:get"
344   "GET /nst/v1/netslice_templates": "slice_templates:get"
345
346   "POST /nst/v1/netslice_templates_content": "slice_templates:content:post"
347
348   "GET /nst/v1/netslice_templates_content/<nstInfoId>": "slice_templates:id:get"
349   "GET /nst/v1/netslice_templates/<nstInfoId>": "slice_templates:id:get"
350
351   "PUT /nst/v1/netslice_templates_content/<nstInfoId>": "slice_templates:id:put"
352
353   "DELETE /nst/v1/netslice_templates_content/<nstInfoId>": "slice_templates:id:delete"
354   "DELETE /nst/v1/netslice_templates/<nstInfoId>": "slice_templates:id:delete"
355
356   "PATCH /nst/v1/netslice_templates/<nstInfoId>": "slice_templates:id:patch"
357
358   "GET /nst/v1/netslice_templates/<nstInfoId>/nst_content": "slice_templates:content:get"
359
360   "PUT /nst/v1/netslice_templates/<nstInfoId>/nst_content": "slice_templates:content:put"
361
362   "GET /nst/v1/netslice_templates/<nstInfoId>/nst": "slice_templates:id:nst:get"
363
364   "GET /nst/v1/netslice_templates/<nstInfoId>/artifacts": "slice_templates:id:nst_artifact:get"
365   "GET /nst/v1/netslice_templates/<nstInfoId>/artifacts/<artifactPath>": "slice_templates:id:nst_artifact:get"
366
367 ################################################################################
368 ############################ Network Slice Instances ###########################
369 ################################################################################
370
371   "GET /nsilcm/v1/netslice_instances_content": "slice_instances:get"
372   "GET /nsilcm/v1/netslice_instances": "slice_instances:get"
373
374   "POST /nsilcm/v1/netslice_instances_content": "slice_instances:content:post"
375
376   "GET /nsilcm/v1/netslice_instances_content/<SliceInstanceId>": "slice_instances:id:get"
377   "GET /nsilcm/v1/netslice_instances/<SliceInstanceId>": "slice_instances:id:get"
378
379   "DELETE /nsilcm/v1/netslice_instances_content/<SliceInstanceId>": "slice_instances:id:delete"
380   "DELETE /nsilcm/v1/netslice_instances/<SliceInstanceId>": "slice_instances:id:delete"
381
382   "POST /nsilcm/v1/netslice_instances": "slice_instances:post"
383
384   "POST /nsilcm/v1/netslice_instances/<SliceInstanceId>/instantiate": "slice_instances:id:instantiate:post"
385
386   "POST /nsilcm/v1/netslice_instances/<SliceInstanceId>/terminate": "slice_instances:id:terminate:post"
387
388   "POST /nsilcm/v1/netslice_instances/<SliceInstanceId>/action": "slice_instances:id:action:post"
389
390   "GET /nsilcm/v1/nsi_lcm_op_occs": "slice_instances:opps:get"
391
392   "GET /nsilcm/v1/nsi_lcm_op_occs/<nsiLcmOpOccId>": "slice_instances:opps:id:get"
393
394
395 ################################################################################
396 ############################ K8S CLUSTERS ######################################
397 ################################################################################
398
399   "GET /k8scluster/v1/clusters": "k8scluster:get"
400
401   "POST /k8scluster/v1/clusters": "k8scluster:post"
402
403   "GET /k8scluster/v1/clusters/<clustersId>": "k8scluster:id:get"
404
405   "DELETE /k8scluster/v1/clusters/<clustersId>": "k8scluster:id:delete"
406
407   "POST /k8scluster/v1/app_profiles": "k8scluster:app_profiles:post"
408
409   "GET /k8scluster/v1/app_profiles": "k8scluster:app_profiles:get"
410
411   "GET /k8scluster/v1/app_profiles/<app_profilesId>": "k8scluster:app_profiles:id:get"
412
413   "PATCH /k8scluster/v1/app_profiles/<app_profilesId>": "k8scluster:app_profiles:id:patch"
414
415   "DELETE /k8scluster/v1/app_profiles/<app_profilesId>": "k8scluster:app_profiles:id:delete"
416
417   "POST /k8scluster/v1/resource_profiles": "k8scluster:resource_profiles:post"
418
419   "GET /k8scluster/v1/resource_profiles": "k8scluster:resource_profiles:get"
420
421   "GET /k8scluster/v1/resource_profiles/<resource_profilesId>": "k8scluster:resource_profiles:id:get"
422
423   "PATCH /k8scluster/v1/resource_profiles/<resource_profilesId>": "k8scluster:resource_profiles:id:patch"
424
425   "DELETE /k8scluster/v1/resource_profiles/<resource_profilesId>": "k8scluster:resource_profiles:id:delete"
426
427   "GET /k8scluster/v1/infra_controller_profiles": "k8scluster:infra_controller_profiles:get"
428
429   "POST /k8scluster/v1/infra_controller_profiles": "k8scluster:infra_controller_profiles:post"
430
431   "GET /k8scluster/v1/infra_controller_profiles/<infra_controller_profilesId>": "k8scluster:infra_controller_profiles:id:get"
432
433   "PATCH /k8scluster/v1/infra_controller_profiles/<infra_controller_profilesId>": "k8scluster:infra_controller_profiles:id:patch"
434
435   "DELETE /k8scluster/v1/infra_controller_profiles/<infra_controller_profilesId>": "k8scluster:infra_controller_profiles:id:delete"
436
437   "GET /k8scluster/v1/infra_config_profiles": "k8scluster:infra_config_profiles:get"
438
439   "POST /k8scluster/v1/infra_config_profiles": "k8scluster:infra_config_profiles:post"
440
441   "GET /k8scluster/v1/infra_config_profiles/<infra_config_profilesId>": "k8scluster:infra_config_profiles:id:get"
442
443   "PATCH /k8scluster/v1/infra_config_profiles/<infra_config_profilesId>": "k8scluster:infra_config_profiles:id:patch"
444
445   "DELETE /k8scluster/v1/infra_config_profiles/<infra_config_profilesId>": "k8scluster:infra_config_profiles:id:delete"
446
447   "PATCH /k8scluster/v1/clusters/<clustersId>/app_profiles/": "k8scluster:id:app_profiles:patch"
448
449   "GET /k8scluster/v1/clusters/<clustersId>/app_profiles": "k8scluster:id:app_profiles:get"
450
451   "PATCH /k8scluster/v1/clusters/<clustersId>/resource_profiles/": "k8scluster:id:resource_profiles:patch"
452
453   "GET /k8scluster/v1/clusters/<clustersId>/resource_profiles": "k8scluster:id:resource_profiles:get"
454
455   "PATCH /k8scluster/v1/clusters/<clustersId>/infra_controller_profiles": "k8scluster:id:infra_controller_profiles:patch"
456
457   "GET /k8scluster/v1/<clustersId>/infra_controller_profiles": "k8scluster:id:infra_controller_profiles:get"
458
459   "PATCH /k8scluster/v1/clusters/<clustersId>/infra_config_profiles": "k8scluster:id:infra_config_profiles:patch"
460
461   "GET /k8scluster/v1/<clustersId>/infra_config_profiles": "k8scluster:id:infra_config_profiles:get"
462
463   "POST /k8scluster/v1/clusters/register": "k8scluster:register:post"
464
465   "DELETE /k8scluster/v1/clusters/<clustersId>/deregister": "k8scluster:id:deregister:delete"
466
467 ################################################################################
468 ############################ QUERY STRING admin operations #####################
469 ################################################################################
470
471   "GET ?ADMIN":    "admin:get"
472   "POST ?ADMIN":   "admin:post"
473   "PATCH ?ADMIN":  "admin:patch"
474   "PUT ?ADMIN":    "admin:put"
475   "DELETE ?ADMIN": "admin:delete"
476
477   "GET ?FORCE":    "force:get"
478   "POST ?FORCE":   "force:post"
479   "PATCH ?FORCE":  "force:patch"
480   "PUT ?FORCE":    "force:put"
481   "DELETE ?FORCE": "force:delete"
482
483   "GET ?PUBLIC":    "public:get"
484   "POST ?PUBLIC":   "public:post"
485   "PATCH ?PUBLIC":  "public:patch"
486   "PUT ?PUBLIC":    "public:put"
487   "DELETE ?PUBLIC": "public:delete"
488
489   "GET ?SET_PROJECT":    "set_project:get"
490   "POST ?SET_PROJECT":   "set_project:post"
491   "PATCH ?SET_PROJECT":  "set_project:patch"
492   "PUT ?SET_PROJECT":    "set_project:put"
493   "DELETE ?SET_PROJECT": "set_project:delete"