PropagationCommand

PropagationCommand module This command gets all the elements that exist under a given site and applies the following logic: if even one element is ‘Active’ for the given site then it marks the site as ‘Active’, if all elements are set in a different status (like banned or error) then it marks the site as ‘Banned’

class DIRAC.ResourceStatusSystem.Command.PropagationCommand.PropagationCommand(args=None, clients=None)

Bases: DIRAC.ResourceStatusSystem.Command.Command.Command

__init__(args=None, clients=None)

x.__init__(…) initializes x; see help(type(x)) for signature

doCache()

To be extended/replaced by real commands

doCommand()

Real commands don’t need to extende/replace this method, which is called by clients.

What is done here is the following: if self.masterMode is set to True, then the “doMaster()” method is called. if not, then the doCache() method is called, and if this returns an object this is returned, and otherwise the “doNew” method is called.

doMaster()

To be extended/replaced by real commands

doNew(masterParams=None)

To be extended/replaced by real commands

returnERROR(s_obj)

Overwrites S_ERROR message with command name, much easier to debug

returnSObj(s_obj)

Overwrites S_ERROR message with command name, much easier to debug