ConfigurationClient

Basic functions for interacting with CS objects

class DIRAC.ConfigurationSystem.private.ConfigurationClient.ConfigurationClient(fileToLoadList=None)

Bases: object

addListenerToNewVersionEvent(functor)
dumpCFGAsLocalCache(fileName=None, raw=False)
dumpLocalCFGToFile(fileName)
dumpRemoteCFGToFile(fileName)
forceRefresh(fromMaster=False)
getConfigurationTree(root='', *filters)

Create a dictionary with all sections, subsections and options starting from given root. Result can be filtered.

Parameters:
  • root (str) – Starting point in the configuration tree.
  • filters (str or list[str]) – Select results that contain given substrings (check full path, i.e. with option name)
Returns:

Return a dictionary where keys are paths taken from the configuration (e.g. /Systems/Configuration/…). Value is “None” when path points to a section or not “None” if path points to an option.

getOption(optionPath, typeValue=None)
getOptions(sectionPath, listOrdered=True)
getOptionsDict(sectionPath)
getSections(sectionPath, listOrdered=True)
getServersList()
getValue(optionPath, defaultValue=None)
loadCFG(cfg)
loadFile(fileName)
setOptionValue(optionPath, value)

Set a value in the local configuration

useServerCertificate()