refactor: Break up RbacMalformedException into discrete exceptions
This patch set breaks up RbacMalformedException into the following
discrete exceptions:
* RbacMissingAttributeResponseBody
* RbacPartialResponseBody
* RbacEmptyResponseBody
Each of the exception classes deals with a different type of
failure related to a soft authorization failure [0] which
means that a failure occurred server side related to RBAC
authorization, but the result of which an incomplete, partial
or empty response body (with a 2xx status code).
* incomplete means that the response body (for show or list)
is missing certain attributes
* partial means that a list response only returned a subset of
the possible results available.
* empty means that the show or list response body is entirely
empty
Because RbacMalformedException is not part of a stable library
it is removed altogether; we do not need to deprecate it.
[0] http://git.openstack.org/cgit/openstack/patrole/tree/doc/source/rbac-overview.rst#n232
Story: 2003843
Task: 26633
Change-Id: I2c76c3c4d226e4877fc9d1e93707edfc230a1be4
diff --git a/patrole_tempest_plugin/rbac_rule_validation.py b/patrole_tempest_plugin/rbac_rule_validation.py
index 575e2c3..9ca437b 100644
--- a/patrole_tempest_plugin/rbac_rule_validation.py
+++ b/patrole_tempest_plugin/rbac_rule_validation.py
@@ -198,7 +198,8 @@
test_status = ('Error, %s' % (msg))
LOG.error(msg)
except (expected_exception,
- rbac_exceptions.RbacMalformedResponse) as actual_exception:
+ rbac_exceptions.BasePatroleResponseBodyException) \
+ as actual_exception:
caught_exception = actual_exception
test_status = 'Denied'