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 ################################## WIM Accounts ################################
264 ################################################################################
266 "GET /admin/v1/wim_accounts": "wim_accounts:get"
268 "POST /admin/v1/wim_accounts": "wim_accounts:post"
270 "GET /admin/v1/wim_accounts/<id>": "wim_accounts:id:get"
272 "DELETE /admin/v1/wim_accounts/<id>": "wim_accounts:id:delete"
274 "PATCH /admin/v1/wim_accounts/<id>": "wim_accounts:id:patch"
276 ################################################################################
277 ##################################### Roles ####################################
278 ################################################################################
280 "GET /admin/v1/roles": "roles:get"
282 "POST /admin/v1/roles": "roles:post"
284 "GET /admin/v1/roles/<id>": "roles:id:get"
286 "DELETE /admin/v1/roles/<id>": "roles:id:delete"
288 "PATCH /admin/v1/roles/<id>": "roles:id:patch"
290 ################################################################################
291 ##################################### PDUDs ####################################
292 ################################################################################
294 "GET /pdu/v1/pdu_descriptors": "pduds:get"
296 "POST /pdu/v1/pdu_descriptors": "pduds:post"
298 "PUT /pdu/v1/pdu_descriptors": "pduds:put"
300 "DELETE /pdu/v1/pdu_descriptors": "pduds:delete"
302 "PATCH /pdu/v1/pdu_descriptors": "pduds:patch"
304 "GET /pdu/v1/pdu_descriptors/<id>": "pduds:id:get"
306 "POST /pdu/v1/pdu_descriptors/<id>": "pduds:id:post"
308 "PUT /pdu/v1/pdu_descriptors/<id>": "pduds:id:put"
310 "DELETE /pdu/v1/pdu_descriptors/<id>": "pduds:id:delete"
312 "PATCH /pdu/v1/pdu_descriptors/<id>": "pduds:id:patch"
314 ################################################################################
315 ############################ Network Slice Templates ###########################
316 ################################################################################
318 "GET /nst/v1/netslice_templates_content": "slice_templates:get"
319 "GET /nst/v1/netslice_templates": "slice_templates:get"
321 "POST /nst/v1/netslice_templates_content": "slice_templates:content:post"
323 "GET /nst/v1/netslice_templates_content/<nstInfoId>": "slice_templates:id:get"
324 "GET /nst/v1/netslice_templates/<nstInfoId>": "slice_templates:id:get"
326 "PUT /nst/v1/netslice_templates_content/<nstInfoId>": "slice_templates:id:put"
328 "DELETE /nst/v1/netslice_templates_content/<nstInfoId>": "slice_templates:id:delete"
329 "DELETE /nst/v1/netslice_templates/<nstInfoId>": "slice_templates:id:delete"
331 "PATCH /nst/v1/netslice_templates/<nstInfoId>": "slice_templates:id:patch"
333 "GET /nst/v1/netslice_templates/<nstInfoId>/nst_content": "slice_templates:content:get"
335 "PUT /nst/v1/netslice_templates/<nstInfoId>/nst_content": "slice_templates:content:put"
337 "GET /nst/v1/netslice_templates/<nstInfoId>/nst": "slice_templates:id:nst:get"
339 "GET /nst/v1/netslice_templates/<nstInfoId>/artifacts": "slice_templates:id:nst_artifact:get"
340 "GET /nst/v1/netslice_templates/<nstInfoId>/artifacts/<artifactPath>": "slice_templates:id:nst_artifact:get"
342 ################################################################################
343 ############################ Network Slice Instances ###########################
344 ################################################################################
346 "GET /nsilcm/v1/netslice_instances_content": "slice_instances:get"
347 "GET /nsilcm/v1/netslice_instances": "slice_instances:get"
349 "POST /nsilcm/v1/netslice_instances_content": "slice_instances:content:post"
351 "GET /nsilcm/v1/netslice_instances_content/<SliceInstanceId>": "slice_instances:id:get"
352 "GET /nsilcm/v1/netslice_instances/<SliceInstanceId>": "slice_instances:id:get"
354 "DELETE /nsilcm/v1/netslice_instances_content/<SliceInstanceId>": "slice_instances:id:delete"
355 "DELETE /nsilcm/v1/netslice_instances/<SliceInstanceId>": "slice_instances:id:delete"
357 "POST /nsilcm/v1/netslice_instances": "slice_instances:post"
359 "POST /nsilcm/v1/netslice_instances/<SliceInstanceId>/instantiate": "slice_instances:id:instantiate:post"
361 "POST /nsilcm/v1/netslice_instances/<SliceInstanceId>/terminate": "slice_instances:id:terminate:post"
363 "POST /nsilcm/v1/netslice_instances/<SliceInstanceId>/action": "slice_instances:id:action:post"
365 "GET /nsilcm/v1/nsi_lcm_op_occs": "slice_instances:opps:get"
367 "GET /nsilcm/v1/nsi_lcm_op_occs/<nsiLcmOpOccId>": "slice_instances:opps:id:get"
369 ################################################################################
370 ############################ QUERY STRING admin operations #####################
371 ################################################################################
373 "GET ?ADMIN": "admin:get"
374 "POST ?ADMIN": "admin:post"
375 "PATCH ?ADMIN": "admin:patch"
376 "PUT ?ADMIN": "admin:put"
377 "DELETE ?ADMIN": "admin:delete"
379 "GET ?FORCE": "force:get"
380 "POST ?FORCE": "force:post"
381 "PATCH ?FORCE": "force:patch"
382 "PUT ?FORCE": "force:put"
383 "DELETE ?FORCE": "force:delete"
385 "GET ?PUBLIC": "public:get"
386 "POST ?PUBLIC": "public:post"
387 "PATCH ?PUBLIC": "public:patch"
388 "PUT ?PUBLIC": "public:put"
389 "DELETE ?PUBLIC": "public:delete"
391 "GET ?SET_PROJECT": "set_project:get"
392 "POST ?SET_PROJECT": "set_project:post"
393 "PATCH ?SET_PROJECT": "set_project:patch"
394 "PUT ?SET_PROJECT": "set_project:put"
395 "DELETE ?SET_PROJECT": "set_project:delete"