(self, policy=None)
Runs one specific policy in CHECK, or APPLY mode
Runs one specific policy in CHECK, or APPLY mode
Runs one specific policy in CHECK or APPLY mode
def run_policy(self, policy=None):
        """
        Runs one specific policy in CHECK, or APPLY mode
        """
        # assign a new top scope to the policy object.
        policy.init_scope()
        roles = policy.get_roles()
        for role in roles.items:
            Context().set_role(role)
            if not self._push:
                self.process_local_role(policy, role)
            else:
                self.process_remote_role(policy, role)
        Callbacks().on_complete(policy)
def run_policy ( self , policy = None ) : # assign a new top scope to the policy object. policy . init_scope ( ) roles = policy . get_roles ( ) for role in roles . items : Context ( ) . set_role ( role ) if not self . _push : self . process_local_role ( policy , role ) else : self . process_remote_role ( policy , role ) Callbacks ( ) . on_complete ( policy )