Merge ~andreserl/maas:lp1715230 into maas:master

Proposed by Andres Rodriguez
Status: Rejected
Rejected by: Andres Rodriguez
Proposed branch: ~andreserl/maas:lp1715230
Merge into: maas:master
Diff against target: 18 lines (+2/-2)
1 file modified
src/maasserver/urls_api.py (+2/-2)
Reviewer Review Type Date Requested Status
MAAS Lander Needs Fixing
Lee Trager (community) Needs Information
Blake Rouse Pending
Review via email: mp+355609@code.launchpad.net

Commit message

LP: #1715230 - Fix API endpoint url for volume-groups and partitions

Description of the change

See https://bugs.launchpad.net/maas/+bug/1715230/comments/1 for insight.

While this is a simple change, I think this would break API backward compatibility. Thoughts?

To post a comment you must log in.
Revision history for this message
Blake Rouse (blake-rouse) wrote :

Yes this would break compatibility. It would be an easy fix on the client-side, libmaas would handle it automatically, so might be acceptable.

Revision history for this message
Lee Trager (ltrager) wrote :

Why not update the URL and have the old URLs redirect[1]? This would fix the bug while not breaking anyone.

[1] https://docs.djangoproject.com/en/dev/ref/class-based-views/base/#redirectview

review: Needs Information
Revision history for this message
MAAS Lander (maas-lander) wrote :

UNIT TESTS
-b lp1715230 lp:~andreserl/maas/+git/maas into -b master lp:~maas-committers/maas

STATUS: FAILED
LOG: http://maas-ci-jenkins.internal:8080/job/maas/job/branch-tester/4064/console
COMMIT: bc7ed664e97d60bd14ec942539c9b57ccd16217e

review: Needs Fixing

Unmerged commits

bc7ed66... by Andres Rodriguez

LP: #1715230 - Fix URL for API endpoints

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/src/maasserver/urls_api.py b/src/maasserver/urls_api.py
2index b71e98a..8b21540 100644
3--- a/src/maasserver/urls_api.py
4+++ b/src/maasserver/urls_api.py
5@@ -360,11 +360,11 @@ urlpatterns += [
6 '(?P<device_id>[^/]+)/partitions/$',
7 partitions_handler, name='partitions_handler'),
8 url(r'^nodes/(?P<system_id>[^/]+)/blockdevices/'
9- '(?P<device_id>[^/]+)/partition/(?P<id>[^/]+)$',
10+ '(?P<device_id>[^/]+)/partitions/(?P<id>[^/]+)$',
11 partition_handler, name='partition_handler'),
12 url(r'^nodes/(?P<system_id>[^/]+)/volume-groups/$',
13 volume_groups_handler, name='volume_groups_handler'),
14- url(r'^nodes/(?P<system_id>[^/]+)/volume-group/'
15+ url(r'^nodes/(?P<system_id>[^/]+)/volume-groups/'
16 '(?P<id>[^/]+)/$',
17 volume_group_handler, name='volume_group_handler'),
18 url(r'^nodes/(?P<system_id>[^/]+)/raids/$',

Subscribers

People subscribed via source and target branches