Merge "Don't fail getting flavors if extra_specs is off"
This commit is contained in:
commit
2a0c4c7bb8
@ -1373,8 +1373,14 @@ class OpenStackCloud(object):
|
|||||||
flavor.extra_specs = flavor.get(
|
flavor.extra_specs = flavor.get(
|
||||||
'OS-FLV-WITH-EXT-SPECS:extra_specs')
|
'OS-FLV-WITH-EXT-SPECS:extra_specs')
|
||||||
elif get_extra:
|
elif get_extra:
|
||||||
flavor.extra_specs = self.manager.submitTask(
|
try:
|
||||||
_tasks.FlavorGetExtraSpecs(id=flavor.id))
|
flavor.extra_specs = self.manager.submitTask(
|
||||||
|
_tasks.FlavorGetExtraSpecs(id=flavor.id))
|
||||||
|
except keystoneauth1.exceptions.http.HttpError as e:
|
||||||
|
flavor.extra_specs = []
|
||||||
|
self.log.debug(
|
||||||
|
'Fetching extra specs for flavor failed:'
|
||||||
|
' {msg}'.format(msg=str(e)))
|
||||||
|
|
||||||
return _utils.normalize_flavors(flavors)
|
return _utils.normalize_flavors(flavors)
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user