ComponentMonitoringHandler

This Service provides functionality to access and modify the InstalledComponentsDB database

class DIRAC.FrameworkSystem.Service.ComponentMonitoringHandler.ComponentMonitoringHandler(handlerInitDict, trid)

Bases: DIRAC.Core.DISET.RequestHandler.RequestHandler

exception ConnectionError(msg)

Bases: exceptions.Exception

__init__(msg)

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

args
message
__init__(handlerInitDict, trid)

Constructor

Parameters:
  • handlerInitDict (dictionary) – Information vars for the service
  • trid (object) – Transport to use
auth_ping = ['all']
export_addComponent(component)

Creates a new Component object on the database component argument should be a dictionary with the Component fields and its values

export_addHost(host)

Creates a new Host object on the database host argument should be a dictionary with the Host fields and its values

export_addInstallation(installation, componentDict, hostDict, forceCreate)

Creates a new InstalledComponent object on the database installation argument should be a dictionary with the InstalledComponent fields and its values componentDict argument should be a dictionary with the Component fields and its values hostDict argument should be a dictionary with the Host fields and its values forceCreate indicates whether a new Component and/or Host should be created if the given ones do not exist

export_componentExists(matchFields)

Returns whether components matching the given criteria exist matchFields argument should be a dictionary with the fields to match matchFields accepts fields of the form <Field.bigger> and <Field.smaller> to filter using > and < relationships.

static export_echo(data)

This method used for testing the performance of a service

export_getComponents(matchFields, includeInstallations, includeHosts)

Returns a list of all the Components in the database matchFields argument should be a dictionary with the fields to match or empty to get all the instances matchFields also accepts fields of the form <Field.bigger> and <Field.smaller> to filter using > and < relationships includeInstallations indicates whether data about the installations in which the components takes part is to be retrieved includeHosts (only if includeInstallations is set to True) indicates whether data about the host in which there are instances of this component is to be retrieved

export_getHosts(matchFields, includeInstallations, includeComponents)

Returns a list of all the Hosts in the database matchFields argument should be a dictionary with the fields to match or empty to get all the instances matchFields also accepts fields of the form <Field.bigger> and <Field.smaller> to filter using > and < relationships includeInstallations indicates whether data about the installations in which the host takes part is to be retrieved includeComponents (only if includeInstallations is set to True) indicates whether data about the components installed into this host is to be retrieved

export_getInstallations(installationFields, componentFields, hostFields, installationsInfo)

Returns a list of installations matching the given criteria installationFields argument should be a dictionary with the fields to match for the installation componentFields argument should be a dictionary with the fields to match for the component installed hostFields argument should be a dictionary with the fields to match for the host where the installation is made installationsInfo indicates whether information about the components and host taking part in the installation is to be provided

export_getLog(host)

Retrieves the logging information currently stored for the given host

export_hostExists(matchFields)

Returns whether hosts matching the given criteria exist matchFields argument should be a dictionary with the fields to match matchFields also accepts fields of the form <Field.bigger> and <Field.smaller> to filter using > and < relationships

export_installationExists(installationFields, componentFields, hostFields)

Returns whether installations matching the given criteria exist installationFields argument should be a dictionary with the fields to match for the installation componentFields argument should be a dictionary with the fields to match for the component installed hostFields argument should be a dictionary with the fields to match for the host where the installation is made

export_ping()
export_removeComponents(matchFields)

Removes from the database components that match the given fields matchFields argument should be a dictionary with the fields to match or empty to remove all the instances matchFields also accepts fields of the form <Field.bigger> and <Field.smaller> to filter using > and < relationships

export_removeHosts(matchFields)

Removes from the database hosts that match the given fields matchFields argument should be a dictionary with the fields to match or empty to remove all the instances matchFields also accepts fields of the form <Field.bigger> and <Field.smaller> to filter using > and < relationships

export_removeInstallations(installationFields, componentFields, hostFields)

Removes installations matching the given criteria installationFields argument should be a dictionary with the fields to match for the installation componentFields argument should be a dictionary with the fields to match for the component installed hostFields argument should be a dictionary with the fields to match for the host where the installation is made

export_removeLogs(fields)

Deletes all the matching logging information fields is a dictionary containing the values for the fields such that any matching entries in the database should be deleted

export_updateComponents(matchFields, updates)

Updates Components objects on the database matchFields argument should be a dictionary with the fields to match (instances matching the fields will be updated) or empty to update all the instances matchFields also accepts fields of the form <Field.bigger> and <Field.smaller> to filter using > and < relationships updates argument updates should be a dictionary with the Component fields and their new updated values

export_updateHosts(matchFields, updates)

Updates Hosts objects on the database matchFields argument should be a dictionary with the fields to match (instances matching the fields will be updated) or empty to update all the instances matchFields also accepts fields of the form <Field.bigger> and <Field.smaller> to filter using > and < relationships updates argument should be a dictionary with the Host fields and their new updated values updates argument should be a dictionary with the Host fields and their new updated values

export_updateInstallations(installationFields, componentFields, hostFields, updates)

Updates installations matching the given criteria installationFields argument should be a dictionary with the fields to match for the installation componentFields argument should be a dictionary with the fields to match for the component installed or empty to update regardless of component hostFields argument should be a dictionary with the fields to match for the host where the installation is made or empty to update regardless of host updates argument should be a dictionary with the Installation fields and their new updated values

export_updateLog(host, fields)

Updates the log entry for a given host in the database with the given fields host is the name of the machine to which the logging information belongs fields is a dictionary where the fields contain the logging information to be stored in the database

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(serviceInfo)

Handler class 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_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_addComponent = [<type 'dict'>]
types_addHost = [<type 'dict'>]
types_addInstallation = [<type 'dict'>, <type 'dict'>, <type 'dict'>, <type 'bool'>]
types_componentExists = [<type 'dict'>]
types_echo = [<type 'basestring'>]
types_getComponents = [<type 'dict'>, <type 'bool'>, <type 'bool'>]
types_getHosts = [<type 'dict'>, <type 'bool'>, <type 'bool'>]
types_getInstallations = [<type 'dict'>, <type 'dict'>, <type 'dict'>, <type 'bool'>]
types_getLog = [<type 'basestring'>]
types_hostExists = [<type 'dict'>]
types_installationExists = [<type 'dict'>, <type 'dict'>, <type 'dict'>]
types_ping = []
types_removeComponents = [<type 'dict'>]
types_removeHosts = [<type 'dict'>]
types_removeInstallations = [<type 'dict'>, <type 'dict'>, <type 'dict'>]
types_removeLogs = [<type 'dict'>]
types_updateComponents = [<type 'dict'>, <type 'dict'>]
types_updateHosts = [<type 'dict'>, <type 'dict'>]
types_updateInstallations = [<type 'dict'>, <type 'dict'>, <type 'dict'>, <type 'dict'>]
types_updateLog = [<type 'basestring'>, <type 'dict'>]