Partition and VG API endpoints diverge

Bug #1715230 reported by Scott Hussey
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
MAAS
Fix Released
Medium
Lee Trager

Bug Description

The API endpoints dealing with partitions and volume-groups both diverge when addressing collections vs single resources

Collections:
  Partitions = /api/2.0/nodes/{system_id}/blockdevices/{device_id}/partitions/
  Volume Groups = /api/2.0/nodes/{system_id}/volume-groups/

Single Resource:
  Partition = /api/2.0/nodes/{system_id}/blockdevices/{device_id}/partition/{id}
  Volume Group = /api/2.0/nodes/{system_id}/volume-group/{id}/

I would expect in a RESTful API, or even a REST-like API, that the endpoints for a collection and a resource to be identical with extra resource-id appended.

Tags: track

Related branches

Revision history for this message
Blake Rouse (blake-rouse) wrote :

Are you specifically calling out the difference between?

/api/2.0/nodes/{system_id}/volume-group/{id}/

and

/api/2.0/nodes/{system_id}/volume-groups/

?

You are correct in that it should be "volume-groups". That is just a typo that was not caught in the code during implementation and code review.

Changed in maas:
status: New → Triaged
importance: Undecided → Medium
milestone: none → 2.3.0
Revision history for this message
Scott Hussey (sh8121) wrote :

Correct, just a endpoint path inconvenience. The endpoint for partition management suffers the same problem.

Changed in maas:
milestone: 2.3.0 → 2.3.x
Changed in maas:
milestone: 2.3.x → 2.5.0
tags: added: track
Changed in maas:
milestone: 2.5.0 → 2.5.0beta2
Changed in maas:
assignee: nobody → Andres Rodriguez (andreserl)
status: Triaged → In Progress
Changed in maas:
assignee: Andres Rodriguez (andreserl) → Lee Trager (ltrager)
status: In Progress → New
status: New → Confirmed
Changed in maas:
status: Confirmed → In Progress
Lee Trager (ltrager)
Changed in maas:
milestone: 2.5.0beta2 → 2.5.0rc1
Changed in maas:
milestone: 2.5.0rc1 → 2.5.0beta2
Changed in maas:
status: In Progress → Fix Committed
Changed in maas:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.