Refactor policy parser init so that validate service is in helper
Refactor the rbac_policy_parser __init__ function so that service
validation is done in its own helper to make the code more
readable.
This commit specifically:
- refactors the code to make it more readable by creating the
validate_service helper in ``RbacPolicyParser``
- makes validate_service a classmethod so that the list of
services can be cached in memory to avoid list_services
call for every single test
- this is a light memory footprint because there will only
ever be a finite (sub-100) number of services running
Change-Id: I6f6a57d5014e0e2aa373c1b099a6bcc371bec165
2 files changed