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: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: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:get"
116 "GET /nslcm/v1/ns_instances": "ns_instances:get"
118 "POST /nslcm/v1/ns_instances_content": "ns_instances:content:post"
120 "GET /nslcm/v1/ns_instances_content/<nsInstanceId>": "ns_instances:id:get"
121 "GET /nslcm/v1/ns_instances/<nsInstanceId>": "ns_instances:id:get"
123 "DELETE /nslcm/v1/ns_instances_content/<nsInstanceId>": "ns_instances:id:delete"
124 "DELETE /nslcm/v1/ns_instances/<nsInstanceId>": "ns_instances:id:delete"
126 "POST /nslcm/v1/ns_instances": "ns_instances:post"
128 "POST /nslcm/v1/ns_instances/<nsInstanceId>/instantiate": "ns_instances:id:instantiate:post"
130 "POST /nslcm/v1/ns_instances/<nsInstanceId>/terminate": "ns_instances:id:terminate:post"
132 "POST /nslcm/v1/ns_instances/<nsInstanceId>/action": "ns_instances:id:action:post"
134 "POST /nslcm/v1/ns_instances/<nsInstanceId>/scale": "ns_instances:id:scale:post"
136 "GET /nslcm/v1/ns_lcm_op_occs": "ns_instances:opps:get"
138 "GET /nslcm/v1/ns_lcm_op_occs/<nsLcmOpOccId>": "ns_instances:opps:id:get"
140 ################################################################################
141 ################################# VNF Instances ################################
142 ################################################################################
144 "GET /nslcm/v1/vnfrs": "vnf_instances:get"
145 "GET /nslcm/v1/vnf_instances": "vnf_instances:get"
147 "GET /nslcm/v1/vnfrs/<vnfInstanceId>": "vnf_instances:id:get"
148 "GET /nslcm/v1/vnf_instances/<vnfInstanceId>": "vnf_instances:id:get"
150 ################################################################################
151 #################################### Tokens ####################################
152 ################################################################################
154 "GET /admin/v1/tokens": "tokens:get"
156 "POST /admin/v1/tokens": "tokens:post"
158 "DELETE /admin/v1/tokens": "tokens:delete"
160 "GET /admin/v1/tokens/<id>": "tokens:id:get"
162 "DELETE /admin/v1/tokens/<id>": "tokens:id:delete"
164 ################################################################################
165 ##################################### Users ####################################
166 ################################################################################
168 "GET /admin/v1/users": "users:get"
170 "POST /admin/v1/users": "users:post"
172 "GET /admin/v1/users/<id>": "users:id:get"
174 "DELETE /admin/v1/users/<id>": "users:id:delete"
176 "PATCH /admin/v1/users/<id>": "users:id:patch"
178 "GET /admin/v1/domains": "domains:get"
180 ################################################################################
181 #################################### Projects ##################################
182 ################################################################################
184 "GET /admin/v1/projects": "projects:get"
186 "POST /admin/v1/projects": "projects:post"
188 "GET /admin/v1/projects/<id>": "projects:id:get"
190 "PATCH /admin/v1/projects/<id>": "projects:id:patch"
192 "DELETE /admin/v1/projects/<id>": "projects:id:delete"
194 ################################################################################
195 ##################################### VIMs #####################################
196 ################################################################################
198 "GET /admin/v1/vims": "vims:get"
200 "POST /admin/v1/vims": "vims:post"
202 "GET /admin/v1/vims/<id>": "vims:id:get"
204 "DELETE /admin/v1/vims/<id>": "vims:id:delete"
206 "PATCH /admin/v1/vims/<id>": "vims:id:patch"
208 ################################################################################
209 ################################## VIM Accounts ################################
210 ################################################################################
212 "GET /admin/v1/vim_accounts": "vim_accounts:get"
214 "POST /admin/v1/vim_accounts": "vim_accounts:post"
216 "GET /admin/v1/vim_accounts/<id>": "vim_accounts:id:get"
218 "DELETE /admin/v1/vim_accounts/<id>": "vim_accounts:id:delete"
220 "PATCH /admin/v1/vim_accounts/<id>": "vim_accounts:id:patch"
222 ################################################################################
223 ################################# K8s Clusters ##############################
224 ################################################################################
226 "GET /admin/v1/k8sclusters": "k8sclusters:get"
228 "POST /admin/v1/k8sclusters": "k8sclusters:post"
230 "GET /admin/v1/k8sclusters/<id>": "k8sclusters:id:get"
232 "DELETE /admin/v1/k8sclusters/<id>": "k8sclusters:id:delete"
234 "PATCH /admin/v1/k8sclusters/<id>": "k8sclusters:id:patch"
236 ################################################################################
237 ################################# K8s Repos ##############################
238 ################################################################################
240 "GET /admin/v1/k8srepos": "k8srepos:get"
242 "POST /admin/v1/k8srepos": "k8srepos:post"
244 "GET /admin/v1/k8srepos/<id>": "k8srepos:id:get"
246 "DELETE /admin/v1/k8srepos/<id>": "k8srepos:id:delete"
248 ################################################################################
249 ################################# SDN Controllers ##############################
250 ################################################################################
252 "GET /admin/v1/sdns": "sdn_controllers:get"
254 "POST /admin/v1/sdns": "sdn_controllers:post"
256 "GET /admin/v1/sdns/<id>": "sdn_controllers:id:get"
258 "DELETE /admin/v1/sdns/<id>": "sdn_controllers:id:delete"
260 "PATCH /admin/v1/sdns/<id>": "sdn_controllers:id:patch"
262 ################################################################################
263 ##################################### WIMs #####################################
264 ################################################################################
266 "GET /admin/v1/wims": "wims:get"
268 "POST /admin/v1/wims": "wims:post"
270 "GET /admin/v1/wims/<id>": "wims:id:get"
272 "DELETE /admin/v1/wims/<id>": "wims:id:delete"
274 "PATCH /admin/v1/wims/<id>": "wims:id:patch"
276 ################################################################################
277 ################################## WIM Accounts ################################
278 ################################################################################
280 "GET /admin/v1/wim_accounts": "wim_accounts:get"
282 "POST /admin/v1/wim_accounts": "wim_accounts:post"
284 "GET /admin/v1/wim_accounts/<id>": "wim_accounts:id:get"
286 "DELETE /admin/v1/wim_accounts/<id>": "wim_accounts:id:delete"
288 "PATCH /admin/v1/wim_accounts/<id>": "wim_accounts:id:patch"
290 ################################################################################
291 ##################################### Roles ####################################
292 ################################################################################
294 "GET /admin/v1/roles": "roles:get"
296 "POST /admin/v1/roles": "roles:post"
298 "GET /admin/v1/roles/<id>": "roles:id:get"
300 "DELETE /admin/v1/roles/<id>": "roles:id:delete"
302 "PATCH /admin/v1/roles/<id>": "roles:id:patch"
304 ################################################################################
305 ##################################### PDUDs ####################################
306 ################################################################################
308 "GET /pdu/v1/pdu_descriptors": "pduds:get"
310 "POST /pdu/v1/pdu_descriptors": "pduds:post"
312 "PUT /pdu/v1/pdu_descriptors": "pduds:put"
314 "DELETE /pdu/v1/pdu_descriptors": "pduds:delete"
316 "PATCH /pdu/v1/pdu_descriptors": "pduds:patch"
318 "GET /pdu/v1/pdu_descriptors/<id>": "pduds:id:get"
320 "POST /pdu/v1/pdu_descriptors/<id>": "pduds:id:post"
322 "PUT /pdu/v1/pdu_descriptors/<id>": "pduds:id:put"
324 "DELETE /pdu/v1/pdu_descriptors/<id>": "pduds:id:delete"
326 "PATCH /pdu/v1/pdu_descriptors/<id>": "pduds:id:patch"
328 ################################################################################
329 ############################ Network Slice Templates ###########################
330 ################################################################################
332 "GET /nst/v1/netslice_templates_content": "slice_templates:get"
333 "GET /nst/v1/netslice_templates": "slice_templates:get"
335 "POST /nst/v1/netslice_templates_content": "slice_templates:content:post"
337 "GET /nst/v1/netslice_templates_content/<nstInfoId>": "slice_templates:id:get"
338 "GET /nst/v1/netslice_templates/<nstInfoId>": "slice_templates:id:get"
340 "PUT /nst/v1/netslice_templates_content/<nstInfoId>": "slice_templates:id:put"
342 "DELETE /nst/v1/netslice_templates_content/<nstInfoId>": "slice_templates:id:delete"
343 "DELETE /nst/v1/netslice_templates/<nstInfoId>": "slice_templates:id:delete"
345 "PATCH /nst/v1/netslice_templates/<nstInfoId>": "slice_templates:id:patch"
347 "GET /nst/v1/netslice_templates/<nstInfoId>/nst_content": "slice_templates:content:get"
349 "PUT /nst/v1/netslice_templates/<nstInfoId>/nst_content": "slice_templates:content:put"
351 "GET /nst/v1/netslice_templates/<nstInfoId>/nst": "slice_templates:id:nst:get"
353 "GET /nst/v1/netslice_templates/<nstInfoId>/artifacts": "slice_templates:id:nst_artifact:get"
354 "GET /nst/v1/netslice_templates/<nstInfoId>/artifacts/<artifactPath>": "slice_templates:id:nst_artifact:get"
356 ################################################################################
357 ############################ Network Slice Instances ###########################
358 ################################################################################
360 "GET /nsilcm/v1/netslice_instances_content": "slice_instances:get"
361 "GET /nsilcm/v1/netslice_instances": "slice_instances:get"
363 "POST /nsilcm/v1/netslice_instances_content": "slice_instances:content:post"
365 "GET /nsilcm/v1/netslice_instances_content/<SliceInstanceId>": "slice_instances:id:get"
366 "GET /nsilcm/v1/netslice_instances/<SliceInstanceId>": "slice_instances:id:get"
368 "DELETE /nsilcm/v1/netslice_instances_content/<SliceInstanceId>": "slice_instances:id:delete"
369 "DELETE /nsilcm/v1/netslice_instances/<SliceInstanceId>": "slice_instances:id:delete"
371 "POST /nsilcm/v1/netslice_instances": "slice_instances:post"
373 "POST /nsilcm/v1/netslice_instances/<SliceInstanceId>/instantiate": "slice_instances:id:instantiate:post"
375 "POST /nsilcm/v1/netslice_instances/<SliceInstanceId>/terminate": "slice_instances:id:terminate:post"
377 "POST /nsilcm/v1/netslice_instances/<SliceInstanceId>/action": "slice_instances:id:action:post"
379 "GET /nsilcm/v1/nsi_lcm_op_occs": "slice_instances:opps:get"
381 "GET /nsilcm/v1/nsi_lcm_op_occs/<nsiLcmOpOccId>": "slice_instances:opps:id:get"
383 ################################################################################
384 ############################ QUERY STRING admin operations #####################
385 ################################################################################
387 "GET ?ADMIN": "admin:get"
388 "POST ?ADMIN": "admin:post"
389 "PATCH ?ADMIN": "admin:patch"
390 "PUT ?ADMIN": "admin:put"
391 "DELETE ?ADMIN": "admin:delete"
393 "GET ?FORCE": "force:get"
394 "POST ?FORCE": "force:post"
395 "PATCH ?FORCE": "force:patch"
396 "PUT ?FORCE": "force:put"
397 "DELETE ?FORCE": "force:delete"
399 "GET ?PUBLIC": "public:get"
400 "POST ?PUBLIC": "public:post"
401 "PATCH ?PUBLIC": "public:patch"
402 "PUT ?PUBLIC": "public:put"
403 "DELETE ?PUBLIC": "public:delete"
405 "GET ?SET_PROJECT": "set_project:get"
406 "POST ?SET_PROJECT": "set_project:post"
407 "PATCH ?SET_PROJECT": "set_project:patch"
408 "PUT ?SET_PROJECT": "set_project:put"
409 "DELETE ?SET_PROJECT": "set_project:delete"