DIRACAccountingCommand

DIRACAccountingCommand

The DIRACAccountingCommand class is a command class to interrogate the DIRAC Accounting.

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

Bases: Command

__init__(args=None, clients=None)
doCache()

To be extended/replaced by real commands

doCommand()

Returns transfer quality plot as it is cached in the accounting cache.

args:
  • args[0]: string - should be a ValidElement

  • args[1]: string - should be the name of the ValidElement

  • args[2]: string - should be the plot type

  • args[3]: string - should be the plot name

Returns:

a plot

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

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

Bases: Command

__init__(args=None, clients=None)
doCache()

To be extended/replaced by real commands

doCommand()

Returns jobs accounting info for sites in the last 24h

Parameters:
  • args[0] (-) – string - should be a ValidElement

  • args[1] (-) – string - should be the name of the ValidElement

  • args[2] (-) – string - should be ‘Job’ or ‘Pilot’ or ‘DataOperation’ or ‘WMSHistory’ (??)

  • args[3] (-) – string - should be the plot to generate (e.g. CPUEfficiency)

  • args[4] (-) – dictionary - e.g. {‘Format’: ‘LastHours’, ‘hours’: 24}

  • args[5] (-) – string - should be the grouping

  • args[6] (-) – dictionary - optional conditions

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

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

Bases: Command

__init__(args=None, clients=None)
doCache()

To be extended/replaced by real commands

doCommand()

Return getQuality from DIRAC’s accounting ReportsClient

args: a tuple
  • args[0]: string: should be a ValidElement

  • args[1]: string should be the name of the ValidElement

  • args[2]: optional dateTime object: a “from” date

  • args[3]: optional dateTime object: a “to” date

Returns:

{‘Result’: None | a float between 0.0 and 100.0}

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

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

Bases: Command

__init__(args=None, clients=None)
doCache()

To be extended/replaced by real commands

doCommand()

Returns transfer quality from the plot cached in the accounting cache.

args:
  • args[0]: string: should be a ValidElement

  • args[1]: string should be the name of the ValidElement

Returns:

{‘Result’: None | a float between 0.0 and 100.0}

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