WMSAdministratorHandler

This is a DIRAC WMS administrator interface.

class DIRAC.WorkloadManagementSystem.Service.WMSAdministratorHandler.WMSAdministratorHandler(handlerInitDict, trid)

Bases: WMSAdministratorHandlerMixin, RequestHandler

__init__(handlerInitDict, trid)

Constructor

Parameters:
  • handlerInitDict (dictionary) – Information vars for the service

  • trid (object) – Transport to use

auth_ping = ['all']
auth_refreshConfiguration = ['CSAdministrator']
auth_whoami = ['all']
export_allowSite(site, comment='No comment')

Allow the given site in the site mask

Parameters:
  • site (str) – site

  • comment (str) – comment

Returns:

S_OK()/S_ERROR()

export_banSite(site, comment='No comment')

Ban the given site in the site mask

Parameters:
  • site (str) – site

  • comment (str) – comment

Returns:

S_OK()/S_ERROR()

classmethod export_clearMask()

Clear up the entire site mask

Returns:

S_OK()/S_ERROR()

static export_echo(data)

This method is used for testing performance of the service

Parameters:

data (str) – data to be sent back to the caller

Returns:

S_OK, Value is the input data

classmethod export_getAllSiteMaskStatus()

Get all the site parameters in the site mask

Returns:

dict

export_getJobPilotOutput(jobID)

Get the pilot job standard output and standard error files for the DIRAC job reference

Parameters:

jobID (str) – job ID

Returns:

S_OK(dict)/S_ERROR()

classmethod export_getSiteMask(siteState='Active')

Get the site mask

Parameters:

siteState (str) – site status

Returns:

S_OK(list)/S_ERROR()

classmethod export_getSiteMaskLogging(sites)

Get the site mask logging history

Parameters:

sites (list) – sites

Returns:

S_OK(dict)/S_ERROR()

classmethod export_getSiteMaskStatus(sites=None)

Get the site mask of given site(s) with columns ‘site’ and ‘status’ only

Parameters:

sites (list or str) – list of sites or site

Returns:

S_OK()/S_ERROR() – S_OK contain dict or str

classmethod export_getSiteMaskSummary()

Get the mask status for all the configured sites

Returns:

S_OK(dict)/S_ERROR()

classmethod export_getSiteSummarySelectors()

Get all the distinct selector values for the site summary web portal page

Returns:

S_OK(dict)/S_ERROR()

classmethod export_getSiteSummaryWeb(selectDict, sortList, startItem, maxItems)

Get the summary of the jobs running on sites in a generic format

Parameters:
  • selectDict (dict) – selectors

  • sortList (list) – sorting list

  • startItem (int) – start item number

  • maxItems (int) – maximum of items

Returns:

S_OK(dict)/S_ERROR()

export_ping()
static export_refreshConfiguration(fromMaster)

Force refreshing the configuration data

Parameters:

fromMaster (bool) – flag to refresh from the master configuration service

export_setSiteMask(siteList)

Set the site mask for matching. The mask is given in a form of Classad string.

Parameters:

siteList (list) – site, status

Returns:

S_OK()/S_ERROR()

export_whoami()

A simple whoami, returns all credential dictionary, except certificate chain object.

classmethod getCSOption(optionName, defaultValue=False)

Get an option from the CS section of the services

Returns:

Value for serviceSection/optionName in the CS being defaultValue the default

getRemoteAddress()

Get the address of the remote peer.

Returns:

Address of remote peer.

getRemoteCredentials()

Get the credentials of the remote peer.

Returns:

Credentials dictionary of remote peer.

initialize()

Initialize this instance of the handler (to be overwritten)

classmethod initializeHandler(svcInfoDict)

WMS AdministratorService initialization

srv_disconnect(trid=None)
classmethod srv_disconnectClient(trid)
srv_getActionTuple()
classmethod srv_getCSOption(optionName, defaultValue=False)

Get an option from the CS section of the services

Returns:

Value for serviceSection/optionName in the CS being defaultValue the default

srv_getClientSetup()
srv_getClientVO()
srv_getClientVersion()
srv_getFormattedRemoteCredentials()
classmethod srv_getMonitor()
srv_getRemoteAddress()

Get the address of the remote peer.

Returns:

Address of remote peer.

srv_getRemoteCredentials()

Get the credentials of the remote peer.

Returns:

Credentials dictionary of remote peer.

classmethod srv_getServiceName()
srv_getTransportID()
classmethod srv_getURL()
classmethod srv_msgCreate(msgName)
srv_msgReply(msgObj)
classmethod srv_msgSend(trid, msgObj)
transfer_bulkFromClient(bulkId, token, bulkSize, fileHelper)
transfer_bulkToClient(bulkId, token, fileHelper)
transfer_fromClient(fileId, token, fileSize, fileHelper)
transfer_listBulk(bulkId, token, fileHelper)
transfer_toClient(fileId, token, fileHelper)
types_allowSite = [<class 'str'>]
types_banSite = [<class 'str'>]
types_clearMask = []
types_echo = [<class 'str'>]
types_getAllSiteMaskStatus = []
types_getJobPilotOutput = [[<class 'str'>, <class 'int'>]]
types_getSiteMask = []
types_getSiteMaskLogging = [[<class 'str'>, <class 'list'>]]
types_getSiteMaskStatus = []
types_getSiteMaskSummary = []
types_getSiteSummarySelectors = []
types_getSiteSummaryWeb = [<class 'dict'>, <class 'list'>, <class 'int'>, <class 'int'>]
types_ping = []
types_refreshConfiguration = [<class 'bool'>]
types_setSiteMask = [<class 'list'>]
types_whoami = []
class DIRAC.WorkloadManagementSystem.Service.WMSAdministratorHandler.WMSAdministratorHandlerMixin

Bases: object

export_allowSite(site, comment='No comment')

Allow the given site in the site mask

Parameters:
  • site (str) – site

  • comment (str) – comment

Returns:

S_OK()/S_ERROR()

export_banSite(site, comment='No comment')

Ban the given site in the site mask

Parameters:
  • site (str) – site

  • comment (str) – comment

Returns:

S_OK()/S_ERROR()

classmethod export_clearMask()

Clear up the entire site mask

Returns:

S_OK()/S_ERROR()

classmethod export_getAllSiteMaskStatus()

Get all the site parameters in the site mask

Returns:

dict

export_getJobPilotOutput(jobID)

Get the pilot job standard output and standard error files for the DIRAC job reference

Parameters:

jobID (str) – job ID

Returns:

S_OK(dict)/S_ERROR()

classmethod export_getSiteMask(siteState='Active')

Get the site mask

Parameters:

siteState (str) – site status

Returns:

S_OK(list)/S_ERROR()

classmethod export_getSiteMaskLogging(sites)

Get the site mask logging history

Parameters:

sites (list) – sites

Returns:

S_OK(dict)/S_ERROR()

classmethod export_getSiteMaskStatus(sites=None)

Get the site mask of given site(s) with columns ‘site’ and ‘status’ only

Parameters:

sites (list or str) – list of sites or site

Returns:

S_OK()/S_ERROR() – S_OK contain dict or str

classmethod export_getSiteMaskSummary()

Get the mask status for all the configured sites

Returns:

S_OK(dict)/S_ERROR()

classmethod export_getSiteSummarySelectors()

Get all the distinct selector values for the site summary web portal page

Returns:

S_OK(dict)/S_ERROR()

classmethod export_getSiteSummaryWeb(selectDict, sortList, startItem, maxItems)

Get the summary of the jobs running on sites in a generic format

Parameters:
  • selectDict (dict) – selectors

  • sortList (list) – sorting list

  • startItem (int) – start item number

  • maxItems (int) – maximum of items

Returns:

S_OK(dict)/S_ERROR()

export_setSiteMask(siteList)

Set the site mask for matching. The mask is given in a form of Classad string.

Parameters:

siteList (list) – site, status

Returns:

S_OK()/S_ERROR()

classmethod initializeHandler(svcInfoDict)

WMS AdministratorService initialization

types_allowSite = [<class 'str'>]
types_banSite = [<class 'str'>]
types_clearMask = []
types_getAllSiteMaskStatus = []
types_getJobPilotOutput = [[<class 'str'>, <class 'int'>]]
types_getSiteMask = []
types_getSiteMaskLogging = [[<class 'str'>, <class 'list'>]]
types_getSiteMaskStatus = []
types_getSiteMaskSummary = []
types_getSiteSummarySelectors = []
types_getSiteSummaryWeb = [<class 'dict'>, <class 'list'>, <class 'int'>, <class 'int'>]
types_setSiteMask = [<class 'list'>]