add get and patch operations
This commit is contained in:
parent
7c7f315e52
commit
a4850683c9
3 changed files with 72 additions and 2 deletions
|
@ -9,9 +9,13 @@ class ServiceBrokerRouter(DefaultRouter):
|
|||
def get_method_map(self, viewset, method_map):
|
||||
result = super().get_method_map(viewset, method_map)
|
||||
|
||||
# Add PUT method for provision_instance
|
||||
# Add methods for service instance operations
|
||||
if hasattr(viewset, "provision_instance"):
|
||||
result.update({"put": "provision_instance"})
|
||||
if hasattr(viewset, "get_instance"):
|
||||
result.update({"get": "get_instance"})
|
||||
if hasattr(viewset, "update_instance"):
|
||||
result.update({"patch": "update_instance"})
|
||||
|
||||
return result
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue