1 # Copyright 2018 Whitestack, LLC
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
7 # http://www.apache.org/licenses/LICENSE-2.0
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
15 # For those usages not covered by the Apache License, Version 2.0 please
16 # contact: esousa@whitestack.com or glavado@whitestack.com
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
22 resources_to_operations:
25 # The resources are defined using the following pattern:
27 # "<METHOD> <PATH>": <OPERATION>
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
35 # NOTE: the <artifactPath> tag is reserved for artifact path (or file locations).
36 # meaning that it retains a special meaning.
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).
41 # NOTE: The end user should not modify this file.
44 ################################################################################
45 ##################################### NSDs #####################################
46 ################################################################################
48 "GET /nsd/v1/ns_descriptors_content": "nsds:content:get"
49 "GET /nsd/v1/ns_descriptors": "nsds:get"
51 "POST /nsd/v1/ns_descriptors_content": "nsds:content:post"
53 "GET /nsd/v1/ns_descriptors_content/<nsdInfoId>": "nsds:id:get"
54 "GET /nsd/v1/ns_descriptors/<nsdInfoId>": "nsds:id:get"
56 "PUT /nsd/v1/ns_descriptors_content/<nsdInfoId>": "nsds:id:put"
58 "DELETE /nsd/v1/ns_descriptors_content/<nsdInfoId>": "nsds:id:delete"
59 "DELETE /nsd/v1/ns_descriptors/<nsdInfoId>": "nsds:id:delete"
61 "POST /nsd/v1/ns_descriptors": "nsds:post"
63 "PATCH /nsd/v1/ns_descriptors/<nsdInfoId>": "nsds:id:patch"
65 "GET /nsd/v1/ns_descriptors/<nsdInfoId>/nsd_content": "nsds:id:content:get"
67 "PUT /nsd/v1/ns_descriptors/<nsdInfoId>/nsd_content": "nsds:id:content:put"
69 "GET /nsd/v1/ns_descriptors/<nsdInfoId>/nsd": "nsds:id:nsd:get"
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"
74 ################################################################################
75 ##################################### VNFDs ####################################
76 ################################################################################
78 "GET /vnfpkgm/v1/vnf_packages_content": "vnfds:content:get"
79 "GET /vnfpkgm/v1/vnf_packages": "vnfds:get"
81 "POST /vnfpkgm/v1/vnf_packages_content": "vnfds:content:post"
83 "GET /vnfpkgm/v1/vnf_packages_content/<vnfPkgId>": "vnfds:id:get"
84 "GET /vnfpkgm/v1/vnf_packages/<vnfPkgId>": "vnfds:id:get"
86 "PUT /vnfpkgm/v1/vnf_packages_content/<vnfPkgId>": "vnfds:id:put"
88 "DELETE /vnfpkgm/v1/vnf_packages_content/<vnfPkgId>": "vnfds:id:delete"
89 "DELETE /vnfpkgm/v1/vnf_packages/<vnfPkgId>": "vnfds:id:delete"
91 "POST /vnfpkgm/v1/vnf_packages": "vnfds:post"
93 "PATCH /vnfpkgm/v1/vnf_packages/<vnfPkgId>": "vnfds:id:patch"
95 "GET /vnfpkgm/v1/vnf_packages/<vnfPkgId>/package_content": "vnfds:id:content:get"
97 "PUT /vnfpkgm/v1/vnf_packages/<vnfPkgId>/package_content": "vnfds:id:content:put"
99 "POST /vnfpkgm/v1/vnf_packages/<vnfPkgId>/package_content/upload_from_uri": "vnfds:id:upload:post"
101 "GET /vnfpkgm/v1/vnf_packages/<vnfPkgId>/vnfd": "vnfds:id:vnfd:get"
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"
106 "POST /vnfpkgm/v1/vnf_packages/<vnfPkgId>/action": "vnfds:id:action:post"
108 "GET /vnfpkgm/v1/vnfpkg_op_occs": "vnfds:vnfpkgops:get"
109 "GET /vnfpkgm/v1/vnfpkg_op_occs/<vnfPkgOpId>": "vnfds:vnfpkgops:id:get"
111 ################################################################################
112 ################################## NS Instances ################################
113 ################################################################################
115 "GET /nslcm/v1/ns_instances_content": "ns_instances:content:get"
116 "GET /nslcm/v1/ns_instances": "ns_instances:get"
118 "POST /nslcm/v1/ns_instances_content": "ns_instances:content:post"
119 "POST /nslcm/v1/ns_instances_terminate": "ns_instances:content:post"
121 "GET /nslcm/v1/ns_instances_content/<nsInstanceId>": "ns_instances:id:get"
122 "GET /nslcm/v1/ns_instances/<nsInstanceId>": "ns_instances:id:get"
124 "DELETE /nslcm/v1/ns_instances_content/<nsInstanceId>": "ns_instances:id:delete"
125 "DELETE /nslcm/v1/ns_instances/<nsInstanceId>": "ns_instances:id:delete"
127 "POST /nslcm/v1/ns_instances": "ns_instances:post"
129 "POST /nslcm/v1/ns_instances/<nsInstanceId>/instantiate": "ns_instances:id:instantiate:post"
131 "POST /nslcm/v1/ns_instances/<nsInstanceId>/terminate": "ns_instances:id:terminate:post"
133 "POST /nslcm/v1/ns_instances/<nsInstanceId>/action": "ns_instances:id:action:post"
135 "POST /nslcm/v1/ns_instances/<nsInstanceId>/update": "ns_instances:id:update:post"
137 "POST /nslcm/v1/ns_instances/<nsInstanceId>/scale": "ns_instances:id:scale:post"
139 "POST /nslcm/v1/ns_instances/<nsInstanceId>/migrate": "ns_instances:id:migrate:post"
141 "GET /nslcm/v1/ns_lcm_op_occs": "ns_instances:opps:get"
143 "GET /nslcm/v1/ns_lcm_op_occs/<nsLcmOpOccId>": "ns_instances:opps:id:get"
145 ################################################################################
146 ################################# VNF Instances ################################
147 ################################################################################
149 "GET /nslcm/v1/vnfrs": "vnf_instances:get"
150 "GET /nslcm/v1/vnf_instances": "vnf_instances:get"
152 "GET /nslcm/v1/vnfrs/<vnfInstanceId>": "vnf_instances:id:get"
153 "GET /nslcm/v1/vnf_instances/<vnfInstanceId>": "vnf_instances:id:get"
155 "GET /vnflcm/v1/vnf_instances/": "vnflcm_instances:get"
156 "POST /vnflcm/v1/vnf_instances/": "vnflcm_instances:post"
158 "GET /vnflcm/v1/vnf_instances/<vnfInstanceId>": "vnflcm_instances:id:get"
159 "DELETE /vnflcm/v1/vnf_instances/<vnfInstanceId>": "vnflcm_instances:id:delete"
161 ################################################################################
162 #################################### Tokens ####################################
163 ################################################################################
165 "GET /admin/v1/tokens": "tokens:get"
167 "POST /admin/v1/tokens": "tokens:post"
169 "DELETE /admin/v1/tokens": "tokens:delete"
171 "GET /admin/v1/tokens/<id>": "tokens:id:get"
173 "DELETE /admin/v1/tokens/<id>": "tokens:id:delete"
175 ################################################################################
176 ##################################### Users ####################################
177 ################################################################################
179 "GET /admin/v1/users": "users:get"
181 "POST /admin/v1/users": "users:post"
183 "GET /admin/v1/users/<id>": "users:id:get"
185 "DELETE /admin/v1/users/<id>": "users:id:delete"
187 "PATCH /admin/v1/users/<id>": "users:id:patch"
189 "GET /admin/v1/domains": "domains:get"
191 ################################################################################
192 #################################### Projects ##################################
193 ################################################################################
195 "GET /admin/v1/projects": "projects:get"
197 "POST /admin/v1/projects": "projects:post"
199 "GET /admin/v1/projects/<id>": "projects:id:get"
201 "PATCH /admin/v1/projects/<id>": "projects:id:patch"
203 "DELETE /admin/v1/projects/<id>": "projects:id:delete"
205 ################################################################################
206 ##################################### VIMs #####################################
207 ################################################################################
209 "GET /admin/v1/vims": "vims:get"
211 "POST /admin/v1/vims": "vims:post"
213 "GET /admin/v1/vims/<id>": "vims:id:get"
215 "DELETE /admin/v1/vims/<id>": "vims:id:delete"
217 "PATCH /admin/v1/vims/<id>": "vims:id:patch"
219 ################################################################################
220 ################################## VIM Accounts ################################
221 ################################################################################
223 "GET /admin/v1/vim_accounts": "vim_accounts:get"
225 "POST /admin/v1/vim_accounts": "vim_accounts:post"
227 "GET /admin/v1/vim_accounts/<id>": "vim_accounts:id:get"
229 "DELETE /admin/v1/vim_accounts/<id>": "vim_accounts:id:delete"
231 "PATCH /admin/v1/vim_accounts/<id>": "vim_accounts:id:patch"
233 ################################################################################
234 ################################# K8s Clusters ##############################
235 ################################################################################
237 "GET /admin/v1/k8sclusters": "k8sclusters:get"
239 "POST /admin/v1/k8sclusters": "k8sclusters:post"
241 "GET /admin/v1/k8sclusters/<id>": "k8sclusters:id:get"
243 "DELETE /admin/v1/k8sclusters/<id>": "k8sclusters:id:delete"
245 "PATCH /admin/v1/k8sclusters/<id>": "k8sclusters:id:patch"
247 ################################################################################
248 ####################################### VCAs ###################################
249 ################################################################################
251 "GET /admin/v1/vca": "vca:get"
253 "POST /admin/v1/vca": "vca:post"
255 "GET /admin/v1/vca/<id>": "vca:id:get"
257 "DELETE /admin/v1/vca/<id>": "vca:id:delete"
259 "PATCH /admin/v1/vca/<id>": "vca:id:patch"
261 ################################################################################
262 ################################# K8s Repos ##############################
263 ################################################################################
265 "GET /admin/v1/k8srepos": "k8srepos:get"
267 "POST /admin/v1/k8srepos": "k8srepos:post"
269 "GET /admin/v1/k8srepos/<id>": "k8srepos:id:get"
271 "DELETE /admin/v1/k8srepos/<id>": "k8srepos:id:delete"
273 ################################################################################
274 ################################# SDN Controllers ##############################
275 ################################################################################
277 "GET /admin/v1/sdns": "sdn_controllers:get"
279 "POST /admin/v1/sdns": "sdn_controllers:post"
281 "GET /admin/v1/sdns/<id>": "sdn_controllers:id:get"
283 "DELETE /admin/v1/sdns/<id>": "sdn_controllers:id:delete"
285 "PATCH /admin/v1/sdns/<id>": "sdn_controllers:id:patch"
287 ################################################################################
288 ################################## WIM Accounts ################################
289 ################################################################################
291 "GET /admin/v1/wim_accounts": "wim_accounts:get"
293 "POST /admin/v1/wim_accounts": "wim_accounts:post"
295 "GET /admin/v1/wim_accounts/<id>": "wim_accounts:id:get"
297 "DELETE /admin/v1/wim_accounts/<id>": "wim_accounts:id:delete"
299 "PATCH /admin/v1/wim_accounts/<id>": "wim_accounts:id:patch"
301 ################################################################################
302 ##################################### Roles ####################################
303 ################################################################################
305 "GET /admin/v1/roles": "roles:get"
307 "POST /admin/v1/roles": "roles:post"
309 "GET /admin/v1/roles/<id>": "roles:id:get"
311 "DELETE /admin/v1/roles/<id>": "roles:id:delete"
313 "PATCH /admin/v1/roles/<id>": "roles:id:patch"
315 ################################################################################
316 ##################################### PDUDs ####################################
317 ################################################################################
319 "GET /pdu/v1/pdu_descriptors": "pduds:get"
321 "POST /pdu/v1/pdu_descriptors": "pduds:post"
323 "PUT /pdu/v1/pdu_descriptors": "pduds:put"
325 "DELETE /pdu/v1/pdu_descriptors": "pduds:delete"
327 "PATCH /pdu/v1/pdu_descriptors": "pduds:patch"
329 "GET /pdu/v1/pdu_descriptors/<id>": "pduds:id:get"
331 "POST /pdu/v1/pdu_descriptors/<id>": "pduds:id:post"
333 "PUT /pdu/v1/pdu_descriptors/<id>": "pduds:id:put"
335 "DELETE /pdu/v1/pdu_descriptors/<id>": "pduds:id:delete"
337 "PATCH /pdu/v1/pdu_descriptors/<id>": "pduds:id:patch"
339 ################################################################################
340 ############################ Network Slice Templates ###########################
341 ################################################################################
343 "GET /nst/v1/netslice_templates_content": "slice_templates:get"
344 "GET /nst/v1/netslice_templates": "slice_templates:get"
346 "POST /nst/v1/netslice_templates_content": "slice_templates:content:post"
348 "GET /nst/v1/netslice_templates_content/<nstInfoId>": "slice_templates:id:get"
349 "GET /nst/v1/netslice_templates/<nstInfoId>": "slice_templates:id:get"
351 "PUT /nst/v1/netslice_templates_content/<nstInfoId>": "slice_templates:id:put"
353 "DELETE /nst/v1/netslice_templates_content/<nstInfoId>": "slice_templates:id:delete"
354 "DELETE /nst/v1/netslice_templates/<nstInfoId>": "slice_templates:id:delete"
356 "PATCH /nst/v1/netslice_templates/<nstInfoId>": "slice_templates:id:patch"
358 "GET /nst/v1/netslice_templates/<nstInfoId>/nst_content": "slice_templates:content:get"
360 "PUT /nst/v1/netslice_templates/<nstInfoId>/nst_content": "slice_templates:content:put"
362 "GET /nst/v1/netslice_templates/<nstInfoId>/nst": "slice_templates:id:nst:get"
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"
367 ################################################################################
368 ############################ Network Slice Instances ###########################
369 ################################################################################
371 "GET /nsilcm/v1/netslice_instances_content": "slice_instances:get"
372 "GET /nsilcm/v1/netslice_instances": "slice_instances:get"
374 "POST /nsilcm/v1/netslice_instances_content": "slice_instances:content:post"
376 "GET /nsilcm/v1/netslice_instances_content/<SliceInstanceId>": "slice_instances:id:get"
377 "GET /nsilcm/v1/netslice_instances/<SliceInstanceId>": "slice_instances:id:get"
379 "DELETE /nsilcm/v1/netslice_instances_content/<SliceInstanceId>": "slice_instances:id:delete"
380 "DELETE /nsilcm/v1/netslice_instances/<SliceInstanceId>": "slice_instances:id:delete"
382 "POST /nsilcm/v1/netslice_instances": "slice_instances:post"
384 "POST /nsilcm/v1/netslice_instances/<SliceInstanceId>/instantiate": "slice_instances:id:instantiate:post"
386 "POST /nsilcm/v1/netslice_instances/<SliceInstanceId>/terminate": "slice_instances:id:terminate:post"
388 "POST /nsilcm/v1/netslice_instances/<SliceInstanceId>/action": "slice_instances:id:action:post"
390 "GET /nsilcm/v1/nsi_lcm_op_occs": "slice_instances:opps:get"
392 "GET /nsilcm/v1/nsi_lcm_op_occs/<nsiLcmOpOccId>": "slice_instances:opps:id:get"
395 ################################################################################
396 ############################ K8S CLUSTERS ######################################
397 ################################################################################
399 "GET /k8scluster/v1/clusters": "k8scluster:get"
401 "POST /k8scluster/v1/clusters": "k8scluster:post"
403 "GET /k8scluster/v1/clusters/<clustersId>": "k8scluster:id:get"
405 "DELETE /k8scluster/v1/clusters/<clustersId>": "k8scluster:id:delete"
407 "POST /k8scluster/v1/app_profiles": "k8scluster:app_profiles:post"
409 "GET /k8scluster/v1/app_profiles": "k8scluster:app_profiles:get"
411 "GET /k8scluster/v1/app_profiles/<app_profilesId>": "k8scluster:app_profiles:id:get"
413 "PATCH /k8scluster/v1/app_profiles/<app_profilesId>": "k8scluster:app_profiles:id:patch"
415 "DELETE /k8scluster/v1/app_profiles/<app_profilesId>": "k8scluster:app_profiles:id:delete"
417 "POST /k8scluster/v1/resource_profiles": "k8scluster:resource_profiles:post"
419 "GET /k8scluster/v1/resource_profiles": "k8scluster:resource_profiles:get"
421 "GET /k8scluster/v1/resource_profiles/<resource_profilesId>": "k8scluster:resource_profiles:id:get"
423 "PATCH /k8scluster/v1/resource_profiles/<resource_profilesId>": "k8scluster:resource_profiles:id:patch"
425 "DELETE /k8scluster/v1/resource_profiles/<resource_profilesId>": "k8scluster:resource_profiles:id:delete"
427 "GET /k8scluster/v1/infra_controller_profiles": "k8scluster:infra_controller_profiles:get"
429 "POST /k8scluster/v1/infra_controller_profiles": "k8scluster:infra_controller_profiles:post"
431 "GET /k8scluster/v1/infra_controller_profiles/<infra_controller_profilesId>": "k8scluster:infra_controller_profiles:id:get"
433 "PATCH /k8scluster/v1/infra_controller_profiles/<infra_controller_profilesId>": "k8scluster:infra_controller_profiles:id:patch"
435 "DELETE /k8scluster/v1/infra_controller_profiles/<infra_controller_profilesId>": "k8scluster:infra_controller_profiles:id:delete"
437 "GET /k8scluster/v1/infra_config_profiles": "k8scluster:infra_config_profiles:get"
439 "POST /k8scluster/v1/infra_config_profiles": "k8scluster:infra_config_profiles:post"
441 "GET /k8scluster/v1/infra_config_profiles/<infra_config_profilesId>": "k8scluster:infra_config_profiles:id:get"
443 "PATCH /k8scluster/v1/infra_config_profiles/<infra_config_profilesId>": "k8scluster:infra_config_profiles:id:patch"
445 "DELETE /k8scluster/v1/infra_config_profiles/<infra_config_profilesId>": "k8scluster:infra_config_profiles:id:delete"
447 "PATCH /k8scluster/v1/clusters/<clustersId>/app_profiles/": "k8scluster:id:app_profiles:patch"
449 "GET /k8scluster/v1/clusters/<clustersId>/app_profiles": "k8scluster:id:app_profiles:get"
451 "PATCH /k8scluster/v1/clusters/<clustersId>/resource_profiles/": "k8scluster:id:resource_profiles:patch"
453 "GET /k8scluster/v1/clusters/<clustersId>/resource_profiles": "k8scluster:id:resource_profiles:get"
455 "PATCH /k8scluster/v1/clusters/<clustersId>/infra_controller_profiles": "k8scluster:id:infra_controller_profiles:patch"
457 "GET /k8scluster/v1/<clustersId>/infra_controller_profiles": "k8scluster:id:infra_controller_profiles:get"
459 "PATCH /k8scluster/v1/clusters/<clustersId>/infra_config_profiles": "k8scluster:id:infra_config_profiles:patch"
461 "GET /k8scluster/v1/<clustersId>/infra_config_profiles": "k8scluster:id:infra_config_profiles:get"
463 "POST /k8scluster/v1/clusters/register": "k8scluster:register:post"
465 "DELETE /k8scluster/v1/clusters/<clustersId>/deregister": "k8scluster:id:deregister:delete"
467 ################################################################################
468 ############################ QUERY STRING admin operations #####################
469 ################################################################################
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"
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"
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"
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"