ComponentMonitoringClient
Class for making requests to a ComponentMonitoring Service.
- class DIRAC.FrameworkSystem.Client.ComponentMonitoringClient.ComponentMonitoringClient(**kwargs)
Bases:
Client
- __init__(**kwargs)
Constructor function
- addComponent(self, component, **kwargs)
Creates a new Component object on the database component argument should be a dictionary with the Component fields and its values
Automatically created for the service function
export_addComponent()
- Parameters:
component – component
- addHost(self, host, **kwargs)
Creates a new Host object on the database host argument should be a dictionary with the Host fields and its values
Automatically created for the service function
export_addHost()
- Parameters:
host – host
- addInstallation(self, installation, componentDict, hostDict, forceCreate, **kwargs)
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
Automatically created for the service function
export_addInstallation()
- Parameters:
installation – installation
componentDict – componentDict
hostDict – hostDict
forceCreate – forceCreate
- property call
To be removed once we’re sure self.call has been removed
- Type:
Deprecated
- componentExists(self, matchFields, **kwargs)
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.
Automatically created for the service function
export_componentExists()
- Parameters:
matchFields – matchFields
- 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
- getComponents(self, matchFields, includeInstallations, includeHosts, **kwargs)
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
Automatically created for the service function
export_getComponents()
- Parameters:
matchFields – matchFields
includeInstallations – includeInstallations
includeHosts – includeHosts
- getHosts(self, matchFields, includeInstallations, includeComponents, **kwargs)
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
Automatically created for the service function
export_getHosts()
- Parameters:
matchFields – matchFields
includeInstallations – includeInstallations
includeComponents – includeComponents
- getInstallations(self, installationFields, componentFields, hostFields, installationsInfo, **kwargs)
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
Automatically created for the service function
export_getInstallations()
- Parameters:
installationFields – installationFields
componentFields – componentFields
hostFields – hostFields
installationsInfo – installationsInfo
- getLog(self, host, **kwargs)
Retrieves the logging information currently stored for the given host
Automatically created for the service function
export_getLog()
- Parameters:
host – host
- getLogs(self, **kwargs)
Retrieves the logging information currently stored for all hosts
Automatically created for the service function
export_getLogs()
- getServer()
Getter for the server url. Useful ?
- hostExists(self, matchFields, **kwargs)
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
Automatically created for the service function
export_hostExists()
- Parameters:
matchFields – matchFields
- httpsClient
alias of
TornadoClient
- installationExists(self, installationFields, componentFields, hostFields, **kwargs)
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
Automatically created for the service function
export_installationExists()
- Parameters:
installationFields – installationFields
componentFields – componentFields
hostFields – hostFields
- removeComponents(self, matchFields, **kwargs)
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
Automatically created for the service function
export_removeComponents()
- Parameters:
matchFields – matchFields
- removeHosts(self, matchFields, **kwargs)
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
Automatically created for the service function
export_removeHosts()
- Parameters:
matchFields – matchFields
- removeInstallations(self, installationFields, componentFields, hostFields, **kwargs)
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
Automatically created for the service function
export_removeInstallations()
- Parameters:
installationFields – installationFields
componentFields – componentFields
hostFields – hostFields
- removeLogs(self, fields, **kwargs)
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
Automatically created for the service function
export_removeLogs()
- Parameters:
fields – fields
- setServer(url)
Set the server URL used by default
- Parameters:
url – url of the service
- updateComponents(self, matchFields, updates, **kwargs)
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
Automatically created for the service function
export_updateComponents()
- Parameters:
matchFields – matchFields
updates – updates
- updateHosts(self, matchFields, updates, **kwargs)
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
Automatically created for the service function
export_updateHosts()
- Parameters:
matchFields – matchFields
updates – updates
- updateInstallations(self, installationFields, componentFields, hostFields, updates, **kwargs)
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
Automatically created for the service function
export_updateInstallations()
- Parameters:
installationFields – installationFields
componentFields – componentFields
hostFields – hostFields
updates – updates
- updateLog(self, host, fields, **kwargs)
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
Automatically created for the service function
export_updateLog()
- Parameters:
host – host
fields – fields