url_for() function needs refactoring of admin flag
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
OpenStack Dashboard (Horizon) |
Fix Released
|
Medium
|
David Lyle |
Bug Description
the url_for() method accepts both an endpoint_type argument and an admin argument. Having one parameter (admin) replace the other paramter (endpoint_type) is confusing and requires extra code that should not be needed. I would propose the following:
1) if endpoint_type is specified, then that type must be returned. If the type cannot be found - raise exception.
( replace all the locations where admin=True to pass endpoint_
2) if endpoint_type is not specified, then use:
getattr(
3) if the endpoint from item #2 is not found, leave a hardcoded use of 'publicURL'
I believe this will simplify code, add some extra power for using the OPENSTACK_
Changed in horizon: | |
importance: | Undecided → Medium |
milestone: | none → havana-2 |
Changed in horizon: | |
status: | Fix Committed → Fix Released |
Changed in horizon: | |
milestone: | havana-2 → 2013.2 |
The current use of the admin parameter vs endpoint_type needs improvement. I also think this needs refactoring due to keystone interface name changes in v3.