Skip to content

Commit

Permalink
Merge pull request #81 from ehaligow/ehaligow-add-missing-storage-end…
Browse files Browse the repository at this point in the history
…points

Added missing endpoints for Storage
  • Loading branch information
Maciej Miś authored Jun 11, 2024
2 parents 8c74e28 + c36cb96 commit ff7db29
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
7 changes: 7 additions & 0 deletions svc-api/router/router.go
Original file line number Diff line number Diff line change
Expand Up @@ -377,17 +377,24 @@ func Router() *iris.Application {
storage.Get("/", system.GetSystemResource)
storage.Get("/{rid}", system.GetSystemResource)
storage.Get("/{id2}/Drives/{rid}", system.GetSystemResource)
storage.Get("/{id2}/Drives/{rid}/Assembly", system.GetSystemResource)
storage.Get("/{id2}/Volumes", system.GetSystemResource)
storage.Post("/{id2}/Volumes", system.CreateVolume)
storage.Delete("/{id2}/Volumes/{rid}", system.DeleteVolume)
storage.Get("/{id2}/Volumes/{rid}", system.GetSystemResource)
storage.Get("/{id2}/Volumes/{rid}/StoragePools", system.GetSystemResource)
storage.Get("/{id2}/Volumes/{rid}/StorageGroups", system.GetSystemResource)
storage.Any("/", handle.SystemsMethodNotAllowed)
storage.Any("/{id2}/Drives/{rid}", handle.SystemsMethodNotAllowed)
storage.Any("/{rid}", handle.SystemsMethodNotAllowed)
storage.Any("/{id2}/Volumes", handle.SystemsMethodNotAllowed)
storage.Any("/{id2}/Volumes/{rid}", handle.SystemsMethodNotAllowed)
storage.Get("/{rid}/StoragePools", system.GetSystemResource)
storage.Get("/{id2}/StoragePools/{rid}", system.GetSystemResource)
storage.Get("/{rid}/StorageGroups", system.GetSystemResource)
storage.Get("/{rid}/StorageControllers", system.GetSystemResource)
storage.Get("/{rid}/FileSystems", system.GetSystemResource)
storage.Get("/{rid}/EndpointGroups", system.GetSystemResource)
storage.Any("/{rid}/StoragePools", handle.SystemsMethodNotAllowed)
storage.Any("/{id2}/StoragePools/{rid}", handle.SystemsMethodNotAllowed)
storage.Get("/{id2}/StoragePools/{rid}/AllocatedVolumes", system.GetSystemResource)
Expand Down
7 changes: 7 additions & 0 deletions svc-device-manager/rest/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -112,13 +112,20 @@ func createRouting(app *iris.Application, config config.Config) {
storage.Get("/{id}", getGenericResourceHandler)
storage.Get("/{id}/Volumes", getGenericResourceHandler)
storage.Get("/{id}/Volumes/{id2}", getGenericResourceHandler)
storage.Get("/{id}/Volumes/{id2}/StoragePools", getGenericResourceHandler)
storage.Get("/{id}/Volumes/{id2}/StorageGroups", getGenericResourceHandler)
storage.Get("/{id}/Drives/{id2}", getGenericResourceHandler)
storage.Get("/{id}/Drives/{id2}/Assembly", getGenericResourceHandler)

storagePools := storage.Party("/{id}/StoragePools")
storagePools.Get("", getGenericResourceHandler)
storagePools.Get("/{id}", getGenericResourceHandler)
storagePools.Get("/{id}/AllocatedVolumes", getGenericResourceHandler)
storagePools.Get("/{id}/AllocatedVolumes/{id2}", getGenericResourceHandler)
storage.Get("/{id}/StorageGroups", getGenericResourceHandler)
storage.Get("/{id}/StorageControllers", getGenericResourceHandler)
storage.Get("/{id}/FileSystems", getGenericResourceHandler)
storage.Get("/{id}/EndpointGroups", getGenericResourceHandler)

capacitySources := storagePools.Party("/{id}/CapacitySources")
capacitySources.Get("/{id}/ProvidingVolumes", getGenericResourceHandler)
Expand Down

0 comments on commit ff7db29

Please sign in to comment.