yahoo-eng-team team mailing list archive
-
yahoo-eng-team team
-
Mailing list archive
-
Message #45272
[Bug 1531628] Re: AttributeError: 'CreateView' object has no attribute 'default_vol_type' if cinder.volume_type_default raises an error in get_initial
*** This bug is a duplicate of bug 1518844 ***
https://bugs.launchpad.net/bugs/1518844
** This bug has been marked a duplicate of bug 1518844
No handling of no default cinder volume type
--
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/1531628
Title:
AttributeError: 'CreateView' object has no attribute
'default_vol_type' if cinder.volume_type_default raises an error in
get_initial
Status in OpenStack Dashboard (Horizon):
In Progress
Bug description:
def get_initial(self):
initial = super(CreateView, self).get_initial()
try:
self.default_vol_type = cinder.volume_type_default(self.request)
initial['type'] = self.default_vol_type.name
except dashboard_exception.NOT_FOUND:
pass
return initial
This produces a code path in which self.default_vol_type is never defined which raises an error in _get_volume_types:
if self.default_vol_type is None:
Probably should set self.default_vol_type to None in the exception during get_initial.
To manage notifications about this bug go to:
https://bugs.launchpad.net/horizon/+bug/1531628/+subscriptions
References