Command

Command module contains the base “Command” class, base for all RSS commands

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

Bases: object

The Command class is a simple base class for all the commands for interacting with the clients

__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