ComponentMonitoringHandler

This Service provides functionality to access and modify the InstalledComponentsDB database

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

Bases: ComponentMonitoringHandlerMixin, 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_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 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

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

Retrieves the logging information currently stored for all hosts

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()
static export_refreshConfiguration(fromMaster)

Force refreshing the configuration data

Parameters:

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

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

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(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_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_addComponent = [<class 'dict'>]
types_addHost = [<class 'dict'>]
types_addInstallation = [<class 'dict'>, <class 'dict'>, <class 'dict'>, <class 'bool'>]
types_componentExists = [<class 'dict'>]
types_echo = [<class 'str'>]
types_getComponents = [<class 'dict'>, <class 'bool'>, <class 'bool'>]
types_getHosts = [<class 'dict'>, <class 'bool'>, <class 'bool'>]
types_getInstallations = [<class 'dict'>, <class 'dict'>, <class 'dict'>, <class 'bool'>]
types_getLog = [<class 'str'>]
types_getLogs = []
types_hostExists = [<class 'dict'>]
types_installationExists = [<class 'dict'>, <class 'dict'>, <class 'dict'>]
types_ping = []
types_refreshConfiguration = [<class 'bool'>]
types_removeComponents = [<class 'dict'>]
types_removeHosts = [<class 'dict'>]
types_removeInstallations = [<class 'dict'>, <class 'dict'>, <class 'dict'>]
types_removeLogs = [<class 'dict'>]
types_updateComponents = [<class 'dict'>, <class 'dict'>]
types_updateHosts = [<class 'dict'>, <class 'dict'>]
types_updateInstallations = [<class 'dict'>, <class 'dict'>, <class 'dict'>, <class 'dict'>]
types_updateLog = [<class 'str'>, <class 'dict'>]
types_whoami = []
class DIRAC.FrameworkSystem.Service.ComponentMonitoringHandler.ComponentMonitoringHandlerMixin

Bases: object

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.

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

Retrieves the logging information currently stored for all hosts

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

Handler class initialization

types_addComponent = [<class 'dict'>]
types_addHost = [<class 'dict'>]
types_addInstallation = [<class 'dict'>, <class 'dict'>, <class 'dict'>, <class 'bool'>]
types_componentExists = [<class 'dict'>]
types_getComponents = [<class 'dict'>, <class 'bool'>, <class 'bool'>]
types_getHosts = [<class 'dict'>, <class 'bool'>, <class 'bool'>]
types_getInstallations = [<class 'dict'>, <class 'dict'>, <class 'dict'>, <class 'bool'>]
types_getLog = [<class 'str'>]
types_getLogs = []
types_hostExists = [<class 'dict'>]
types_installationExists = [<class 'dict'>, <class 'dict'>, <class 'dict'>]
types_removeComponents = [<class 'dict'>]
types_removeHosts = [<class 'dict'>]
types_removeInstallations = [<class 'dict'>, <class 'dict'>, <class 'dict'>]
types_removeLogs = [<class 'dict'>]
types_updateComponents = [<class 'dict'>, <class 'dict'>]
types_updateHosts = [<class 'dict'>, <class 'dict'>]
types_updateInstallations = [<class 'dict'>, <class 'dict'>, <class 'dict'>, <class 'dict'>]
types_updateLog = [<class 'str'>, <class 'dict'>]