Add service validation to Patrole framework
Verify that the service being passed in the rbac_rule_validation
decorator is a valid service. The Tempest Identity v3 services_client
is being used to make a call to Keystone to list the services that
are available.
If an invalid service is passed in the decorator, then an exception
is thrown.
Change-Id: I3de3fccf18456bb8382864eeabcbfe64e2cffebb
Implements: blueprint add-service-validation
diff --git a/patrole_tempest_plugin/rbac_exceptions.py b/patrole_tempest_plugin/rbac_exceptions.py
index c6165ff..ee42e19 100644
--- a/patrole_tempest_plugin/rbac_exceptions.py
+++ b/patrole_tempest_plugin/rbac_exceptions.py
@@ -26,3 +26,7 @@
class RbacOverPermission (exceptions.TempestException):
message = "Action performed that should not be permitted"
+
+
+class RbacInvalidService (exceptions.TempestException):
+ message = "Attempted to test an invalid service"