Fix allowed methods for administration topics 14/8014/3
authordelacruzramo <pedro.delacruzramos@altran.com>
Thu, 3 Oct 2019 12:22:00 +0000 (14:22 +0200)
committerdelacruzramo <pedro.delacruzramos@altran.com>
Mon, 11 Nov 2019 17:11:26 +0000 (18:11 +0100)
Change-Id: I2a318bc3d6d6ead1c27a74652c8f2e990adc662a
Signed-off-by: delacruzramo <pedro.delacruzramos@altran.com>
osm_nbi/nbi.py
osm_nbi/resources_to_operations.yml

index 206685d..e2419cf 100644 (file)
@@ -216,42 +216,42 @@ valid_url_methods = {
                        },
             "users": {"METHODS": ("GET", "POST"),
                       "ROLE_PERMISSION": "users:",
-                      "<ID>": {"METHODS": ("GET", "POST", "DELETE", "PATCH", "PUT"),
+                      "<ID>": {"METHODS": ("GET", "DELETE", "PATCH"),
                                "ROLE_PERMISSION": "users:id:"
                                }
                       },
             "projects": {"METHODS": ("GET", "POST"),
                          "ROLE_PERMISSION": "projects:",
-                         "<ID>": {"METHODS": ("GET", "DELETE", "PUT"),
+                         "<ID>": {"METHODS": ("GET", "DELETE", "PATCH"),
                                   "ROLE_PERMISSION": "projects:id:"}
                          },
             "roles": {"METHODS": ("GET", "POST"),
                       "ROLE_PERMISSION": "roles:",
-                      "<ID>": {"METHODS": ("GET", "POST", "DELETE", "PUT"),
+                      "<ID>": {"METHODS": ("GET", "DELETE", "PATCH"),
                                "ROLE_PERMISSION": "roles:id:"
                                }
                       },
             "vims": {"METHODS": ("GET", "POST"),
                      "ROLE_PERMISSION": "vims:",
-                     "<ID>": {"METHODS": ("GET", "DELETE", "PATCH", "PUT"),
+                     "<ID>": {"METHODS": ("GET", "DELETE", "PATCH"),
                               "ROLE_PERMISSION": "vims:id:"
                               }
                      },
             "vim_accounts": {"METHODS": ("GET", "POST"),
                              "ROLE_PERMISSION": "vim_accounts:",
-                             "<ID>": {"METHODS": ("GET", "DELETE", "PATCH", "PUT"),
+                             "<ID>": {"METHODS": ("GET", "DELETE", "PATCH"),
                                       "ROLE_PERMISSION": "vim_accounts:id:"
                                       }
                              },
             "wim_accounts": {"METHODS": ("GET", "POST"),
                              "ROLE_PERMISSION": "wim_accounts:",
-                             "<ID>": {"METHODS": ("GET", "DELETE", "PATCH", "PUT"),
+                             "<ID>": {"METHODS": ("GET", "DELETE", "PATCH"),
                                       "ROLE_PERMISSION": "wim_accounts:id:"
                                       }
                              },
             "sdns": {"METHODS": ("GET", "POST"),
                      "ROLE_PERMISSION": "sdn_controllers:",
-                     "<ID>": {"METHODS": ("GET", "DELETE", "PATCH", "PUT"),
+                     "<ID>": {"METHODS": ("GET", "DELETE", "PATCH"),
                               "ROLE_PERMISSION": "sdn_controllers:id:"
                               }
                      },
index 0c39fe3..523d1f8 100644 (file)
@@ -166,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"
@@ -184,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"
 
@@ -198,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"
@@ -214,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"
@@ -230,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"
@@ -246,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"
@@ -262,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"
@@ -280,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 ####################################