requirements authority: Use better exception/return code
This patch set makes some minor modifications to the requirements
authority module:
* return {} instead of None in RequirementsParser.parse since
its return type is dict
* raise RbacParsingException if an invalid rule is passed to
RequirementsAuthority.allowed since KeyError is a builtin type
and is not specific enough
* change the exception message raise for the above case -- "API"
is not the right word; the word should be "rule name" as that
is what is being keyed into the roles_dict
Change-Id: Ia4408c0745d2b5ddb1c73c1eb9a6316ae0c1f646
2 files changed