PolicyCaller
PolicyCaller
Module used for calling policies. Its class is used for invoking real policies, based on the policy name.
- class DIRAC.ResourceStatusSystem.PolicySystem.PolicyCaller.PolicyCaller(clients=None)
Bases:
object
PolicyCaller loads policies, sets commands and runs them.
- __init__(clients=None)
Constructor
- static policyEvaluation(policy, command)
Method that given a policy and a command objects, assigns the second one as a member of the first and evaluates the policy.
- policyInvocation(decisionParams, policyDict)
Invokes a policy:
1. If
policy
is None, import the policy module specified withpModule
(e.g. ‘DT_Policy’).1.1. Create a policy object.
2. Set the policy arguments (usually
granularity
,name
) +extraArgs
.3. If commandIn is specified (normally it is), use
DIRAC.ResourceStatusSystem.Command.CommandCaller.CommandCaller.setCommandObject()
to get a command object