Handle all the exception types defined by senlin
Currently some exceptions defined by senlin are not or not correctly mapped to standard http exception, which will cause a internal error. These exceptions should be properly handled.
* Fix the exception types which are wrongly mapped to standard http exception(not internal error).
* Check the exception types created by senlin which are not mapping to standard http exception(not internal error), and correctly map them.
* Check the use of HTTPInternalSer
* Handling the exception from openstackSDK
** First, implement a parse_exception method to parse the exception type from openstackSDK. (Refer to http://
** Then catch the SDK exceptions wherever they happen, and use parse_exception to parse them.
The code is like:
try:
self.
except Exception as ex:
raise exutil.
** In the upper layer, catch the InternalError and translate it to the proper senlin exception type by checking the error code and error message.
try:
nova_
except InternalError as ex:
LOG.
raise SenlinBadRequest()
Blueprint information
- Status:
- Complete
- Approver:
- Qiming Teng
- Priority:
- Medium
- Drafter:
- Haiwei Xu
- Direction:
- Approved
- Assignee:
- Haiwei Xu
- Definition:
- Approved
- Series goal:
- None
- Implementation:
- Implemented
- Milestone target:
- None
- Started by
- Haiwei Xu
- Completed by
- Haiwei Xu
Related branches
Related bugs
Sprints
Whiteboard
Gerrit topic: https:/
Addressed by: https:/
Fix exception mapping miss
Addressed by: https:/
Rename NotSupported exception to FeatureNotSupported
Addressed by: https:/
Rename PolicyExists to PolicyTypeConflict
Addressed by: https:/
Change PolicyInUse exception to ResourceBusyError
Addressed by: https:/
Change PolicyNotAttached to an internal exception and handle it
Addressed by: https:/
Change ProfileInUse exception to ResourceBusyError
Addressed by: https:/
Handle NodeStatusError exception
Addressed by: https:/
Handle exception which happens in node deleting and updating
Addressed by: https:/
Revise senlin senlin exception handling from SDK side
Addressed by: https:/
Handle exceptions which happen in heat driver
Addressed by: https:/
Handle exceptions in keystone_v3 driver
Addressed by: https:/
Fix some exception mapping miss
Addressed by: https:/
Handle exception in neutron_v2 module
Addressed by: https:/
Handle SDK exception of sdk module