nova/nova/tests
Eric Fried 112cd9cd1f Proper error handling by _ensure_resource_provider
Previously, if _ensure_resource_provider encountered any error from the
placement REST API, it would (sometimes log a message and) return None.

Furthermore, a name conflict while creating the provider was treated the
same as a UUID conflict, which would actually result in None being
returned.

With this change set, the error paths that previously returned None now
raise one of the new ResourceProviderRetrievalFailed or
ResourceProviderCreationFailed exceptions; and the name conflict path is
detected and treated as an error condition.

Note: This change set only touches the SchedulerReportClient side of
these error conditions - it makes no attempt to add error handling to
its callers.  Case in point, the API samples tests needed fixing because
they were previously running into the name conflict error condition, but
not noticing.  As currently implemented, the new exceptions will
percolate up to ComputeManager.update_available_resource_for_node like
any others coming from SchedulerReportClient, where they will be logged
and ignored.

Change-Id: I0c4ca6a81f213277fe7219cb905a805712f81e36
Closes-Bug: #1735430
2017-11-30 18:30:49 +00:00
..
functional Proper error handling by _ensure_resource_provider 2017-11-30 18:30:49 +00:00
live_migration/hooks Fix live migration grenade ceph setup 2017-10-26 17:53:15 -04:00
unit Proper error handling by _ensure_resource_provider 2017-11-30 18:30:49 +00:00
__init__.py
fixtures.py Don't overwrite binding-profile 2017-11-22 04:30:51 +00:00
json_ref.py Factor out duplicated notification sample data 2017-11-03 11:36:57 +01:00
uuidsentinel.py Remove redundant str typecasting 2016-09-23 12:53:34 +05:30