ProductionClient

Class that contains client access to the production DB handler.

class DIRAC.ProductionSystem.Client.ProductionClient.ProductionClient(**kwargs)

Bases: Client

Exposes the functionality available in the ProductionSystem/ProductionManagerHandler

__init__(**kwargs)

Simple constructor

addProduction(self, prodName, prodDescription, **kwargs)

Automatically created for the service function export_addProduction()

Parameters:
  • prodName – prodName

  • prodDescription – prodDescription

addProductionStep(prodStep)

Add a production step and update the production description

Parameters:

prodStep (object) – the production step, i.e. a ProductionStep object describing the transformation

addTransformationsToProduction(cls, prodName, transIDs, parentTransIDs, **kwargs)

Automatically created for the service function export_addTransformationsToProduction()

Parameters:
  • prodName – prodName

  • transIDs – transIDs

  • parentTransIDs – parentTransIDs

property call

To be removed once we’re sure self.call has been removed

Type:

Deprecated

deleteProduction(self, prodName, **kwargs)

Automatically created for the service function export_deleteProduction()

Parameters:

prodName – prodName

executeRPC(*parms, **kws)

This method extracts some parameters from kwargs that are used as parameter of the constructor or RPCClient. Unfortunately, only a few of all the available parameters of BaseClient are exposed.

Parameters:
  • rpc – if an RPC client is passed, use that one

  • timeout – we can change the timeout on a per call bases. Default is self.timeout

  • url – We can specify which url to use

getClientKWArgs()

Returns a copy of the connection arguments

getProduction(cls, prodName, **kwargs)

Automatically created for the service function export_getProduction()

Parameters:

prodName – prodName

getProductionParameters(cls, prodName, parameters, **kwargs)

Automatically created for the service function export_getProductionParameters()

Parameters:
  • prodName – prodName

  • parameters – parameters

getProductionStep(cls, stepID, **kwargs)

Automatically created for the service function export_getProductionStep()

Parameters:

stepID – stepID

getProductionTransformations(prodName, condDict=None, older=None, newer=None, timeStamp=None, orderAttribute=None, limit=10000)
Gets all the production transformations for a production, incrementally.

“limit” here is just used to determine the offset.

Parameters:

prodName (str) – the production name

Returns:

the list of the transformations associated to the production

getProductions(condDict=None, older=None, newer=None, timeStamp=None, orderAttribute=None, limit=100)

Gets all the productions in the system, incrementally. “limit” here is just used to determine the offset.

getServer()

Getter for the server url. Useful ?

httpsClient

alias of TornadoClient

setProductionStatus(prodID, status)

Sets the status of a production

Parameters:
  • prodID (int) – the ProductionID

  • status (str) – the production status to be set to the prodID

setServer(url)

Set the server URL used by default

Parameters:

url – url of the service

startProduction(cls, prodName, **kwargs)

Automatically created for the service function export_startProduction()

Parameters:

prodName – prodName