fix bug 937. NSs are not deleted from database upon NSI deletion
[osm/NBI.git] / osm_nbi / resources_to_operations.yml
index ff659d4..523d1f8 100644 (file)
@@ -16,6 +16,8 @@
 # contact: esousa@whitestack.com or glavado@whitestack.com
 ##
 
+### NOTE: This is INFORMATIVE ONLY!!!!
+### The right values are at module osm_nbi/nbi.py variable 'valid_url_methods' under ROLE_OPERATIONS key
 ---
 resources_to_operations:
 
@@ -126,9 +128,9 @@ resources_to_operations:
 
   "POST /nslcm/v1/ns_instances/<nsInstanceId>/scale": "ns_instances:id:scale:post"
 
-  "GET /nslcm/v1/ns_instances/<nsInstanceId>/ns_lcm_op_occs": "ns_instances:id:opps:get"
+  "GET /nslcm/v1/ns_lcm_op_occs": "ns_instances:opps:get"
 
-  "GET /nslcm/v1/ns_instances/<nsInstanceId>/ns_lcm_op_occs/<nsLcmOpOccId>": "ns_instances:id:opps:id:get"
+  "GET /nslcm/v1/ns_lcm_op_occs/<nsLcmOpOccId>": "ns_instances:opps:id:get"
 
 ################################################################################
 ################################# VNF Instances ################################
@@ -164,10 +166,6 @@ resources_to_operations:
 
   "GET /admin/v1/users/<id>": "users:id:get"
 
-  "POST /admin/v1/users/<id>": "users:id:post"
-
-  "PUT /admin/v1/users/<id>": "users:id:put"
-
   "DELETE /admin/v1/users/<id>": "users:id:delete"
 
   "PATCH /admin/v1/users/<id>": "users:id:patch"
@@ -182,7 +180,7 @@ resources_to_operations:
 
   "GET /admin/v1/projects/<id>": "projects:id:get"
 
-  "PUT /admin/v1/projects/<id>": "projects:id:put"
+  "PATCH /admin/v1/projects/<id>": "projects:id:patch"
 
   "DELETE /admin/v1/projects/<id>": "projects:id:delete"
 
@@ -196,8 +194,6 @@ resources_to_operations:
 
   "GET /admin/v1/vims/<id>": "vims:id:get"
 
-  "PUT /admin/v1/vims/<id>": "vims:id:put"
-
   "DELETE /admin/v1/vims/<id>": "vims:id:delete"
 
   "PATCH /admin/v1/vims/<id>": "vims:id:patch"
@@ -212,8 +208,6 @@ resources_to_operations:
 
   "GET /admin/v1/vim_accounts/<id>": "vim_accounts:id:get"
 
-  "PUT /admin/v1/vim_accounts/<id>": "vim_accounts:id:put"
-
   "DELETE /admin/v1/vim_accounts/<id>": "vim_accounts:id:delete"
 
   "PATCH /admin/v1/vim_accounts/<id>": "vim_accounts:id:patch"
@@ -228,8 +222,6 @@ resources_to_operations:
 
   "GET /admin/v1/sdns/<id>": "sdn_controllers:id:get"
 
-  "PUT /admin/v1/sdns/<id>": "sdn_controllers:id:put"
-
   "DELETE /admin/v1/sdns/<id>": "sdn_controllers:id:delete"
 
   "PATCH /admin/v1/sdns/<id>": "sdn_controllers:id:patch"
@@ -244,8 +236,6 @@ resources_to_operations:
 
   "GET /admin/v1/wims/<id>": "wims:id:get"
 
-  "PUT /admin/v1/wims/<id>": "wims:id:put"
-
   "DELETE /admin/v1/wims/<id>": "wims:id:delete"
 
   "PATCH /admin/v1/wims/<id>": "wims:id:patch"
@@ -260,8 +250,6 @@ resources_to_operations:
 
   "GET /admin/v1/wim_accounts/<id>": "wim_accounts:id:get"
 
-  "PUT /admin/v1/wim_accounts/<id>": "wim_accounts:id:put"
-
   "DELETE /admin/v1/wim_accounts/<id>": "wim_accounts:id:delete"
 
   "PATCH /admin/v1/wim_accounts/<id>": "wim_accounts:id:patch"
@@ -278,7 +266,7 @@ resources_to_operations:
 
   "DELETE /admin/v1/roles/<id>": "roles:id:delete"
 
-  "PUT /admin/v1/roles/<id>": "roles:id:put"
+  "PATCH /admin/v1/roles/<id>": "roles:id:patch"
 
 ################################################################################
 ##################################### PDUDs ####################################
@@ -339,7 +327,7 @@ resources_to_operations:
   "GET /nsilcm/v1/netslice_instances_content": "slice_instances:get"
   "GET /nsilcm/v1/netslice_instances": "slice_instances:get"
 
-  "POST /nsilcm/v1/netslice_instances_content": "slice_instances:content:get"
+  "POST /nsilcm/v1/netslice_instances_content": "slice_instances:content:post"
 
   "GET /nsilcm/v1/netslice_instances_content/<SliceInstanceId>": "slice_instances:id:get"
   "GET /nsilcm/v1/netslice_instances/<SliceInstanceId>": "slice_instances:id:get"
@@ -355,12 +343,34 @@ resources_to_operations:
 
   "POST /nsilcm/v1/netslice_instances/<SliceInstanceId>/action": "slice_instances:id:action:post"
 
-  "GET /nsilcm/v1/netslice_instances/<SliceInstanceId>/nsi_lcm_op_occs": "slice_instances:id:opps:get"
+  "GET /nsilcm/v1/nsi_lcm_op_occs": "slice_instances:opps:get"
 
-  "GET /nsilcm/v1/netslice_instances/<SliceInstanceId>/nsi_lcm_op_occs/<nsiLcmOpOccId>": "slice_instances:id:opps:id:get"
+  "GET /nsilcm/v1/nsi_lcm_op_occs/<nsiLcmOpOccId>": "slice_instances:opps:id:get"
 
 ################################################################################
-############################ Admin          ####################################
+############################ QUERY STRING admin operations #####################
 ################################################################################
 
-  "GET ADMIN": "admin"
+  "GET ?ADMIN":    "admin:get"
+  "POST ?ADMIN":   "admin:post"
+  "PATCH ?ADMIN":  "admin:patch"
+  "PUT ?ADMIN":    "admin:put"
+  "DELETE ?ADMIN": "admin:delete"
+
+  "GET ?FORCE":    "force:get"
+  "POST ?FORCE":   "force:post"
+  "PATCH ?FORCE":  "force:patch"
+  "PUT ?FORCE":    "force:put"
+  "DELETE ?FORCE": "force:delete"
+
+  "GET ?PUBLIC":    "public:get"
+  "POST ?PUBLIC":   "public:post"
+  "PATCH ?PUBLIC":  "public:patch"
+  "PUT ?PUBLIC":    "public:put"
+  "DELETE ?PUBLIC": "public:delete"
+
+  "GET ?SET_PROJECT":    "set_project:get"
+  "POST ?SET_PROJECT":   "set_project:post"
+  "PATCH ?SET_PROJECT":  "set_project:patch"
+  "PUT ?SET_PROJECT":    "set_project:put"
+  "DELETE ?SET_PROJECT": "set_project:delete"