pagination links have incorrect endpoint names

Bug #2058427 reported by Goutham Pacha Ravi
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Shared File Systems Service (Manila)
In Progress
Undecided
christian okeke

Bug Description

This bug is a continuation of https://bugs.launchpad.net/manila/+bug/2023754 and is related to https://bugs.launchpad.net/manila/+bug/2058424 but not the same issue.

Manila's API has a problem generating pagination links ("href" field of "self", "next", "bookmark" items) when the collection name (for example: "share_groups") is different from the route name (for example: "share-groups").

The fix for https://bugs.launchpad.net/manila/+bug/2023754 introduced an alias for this sort of situation. This alias ("self._collection_route_name") can be set by view builders whose route name and collection name differ. We should apply this fix to all other inconsistent resources:

- share groups: https://docs.openstack.org/api-ref/shared-file-system/index.html#share-groups-since-api-v2-31
- share backups: https://docs.openstack.org/api-ref/shared-file-system/index.html#share-backups-since-api-v2-80
- resource locks: https://docs.openstack.org/api-ref/shared-file-system/index.html#resource-locks-since-api-v2-81
- share group snapshots: https://docs.openstack.org/api-ref/shared-file-system/index.html#list-share-group-snapshots
- share group snapshot members: https://docs.openstack.org/api-ref/shared-file-system/index.html#list-share-group-snapshots-members
- share transfers: https://docs.openstack.org/api-ref/shared-file-system/index.html#share-transfer-since-api-v2-77

In all of these, the self._collection_name attribute of their view builders doesn't match the route name.. Most of them have a hyphen in the route name (e.g.: share-backups) and an underscore in the collection name (e.g: share_backups) which causes the links to be incorrect.

Revision history for this message
christian okeke (ccokeke) wrote :

Thanks Goutham for reporting this issue. I will go ahead and fix the broken link for the shared resources as well.

Changed in manila:
assignee: nobody → christian okeke (ccokeke)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to manila (master)

Fix proposed to branch: master
Review: https://review.opendev.org/c/openstack/manila/+/913987

Changed in manila:
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote :

Fix proposed to branch: master
Review: https://review.opendev.org/c/openstack/manila/+/915340

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.