yahoo-eng-team team mailing list archive
-
yahoo-eng-team team
-
Mailing list archive
-
Message #03506
[Bug 1186379] Re: url_for() function needs refactoring of admin flag
** Changed in: horizon
Status: Fix Committed => Fix Released
--
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to OpenStack Dashboard (Horizon).
https://bugs.launchpad.net/bugs/1186379
Title:
url_for() function needs refactoring of admin flag
Status in OpenStack Dashboard (Horizon):
Fix Released
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_type='adminURL')
2) if endpoint_type is not specified, then use:
getattr(settings,'OPENSTACK_ENDPOINT_TYPE', 'publicURL')
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_ENDPOINT_TYPE setting, and still function the same.
To manage notifications about this bug go to:
https://bugs.launchpad.net/horizon/+bug/1186379/+subscriptions