ConfigurationClient
Basic functions for interacting with CS objects
- class DIRAC.ConfigurationSystem.private.ConfigurationClient.ConfigurationClient(fileToLoadList=None)
Bases:
object
- addListenerToNewVersionEvent(functor)
Add listener to new version event
- Parameters:
functor (str) – functor
- dumpCFGAsLocalCache(fileName=None, raw=False)
Dump local CFG cache to file
- dumpLocalCFGToFile(fileName)
Dump local configuration to file
- Parameters:
fileName (str) – file name
- Returns:
S_OK()/S_ERROR()
- dumpRemoteCFGToFile(fileName)
Dump remote configuration to file
- Parameters:
fileName (str) – file name
- Returns:
S_OK()/S_ERROR()
- forceRefresh(fromMaster=False)
Force refresh
- Parameters:
fromMaster (bool) – refresh from master
- Returns:
S_OK()/S_ERROR()
- getConfigurationTree(root='', *filters)
Create a dictionary with all sections, subsections and options starting from given root. Result can be filtered.
- Parameters:
- Returns:
S_OK(dict)/S_ERROR() – 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)
Get configuration option
- Parameters:
optionPath (str) – option path
typeValue – type of value
- Returns:
S_OK()/S_ERROR()
- getOptions(sectionPath, listOrdered=True)
Get configuration options
- getOptionsDict(sectionPath)
Get configuration options in dictionary
- Parameters:
sectionPath (str) – section path
- Returns:
S_OK(dict)/S_ERROR()
- getOptionsDictRecursively(sectionPath)
Get configuration options in dictionary recursively
- Parameters:
sectionPath (str) – section path
- Returns:
S_OK(dict)/S_ERROR()
- getSections(sectionPath, listOrdered=True)
Get configuration sections
- getServersList()
Get list of servers
- Returns:
list
- getValue(optionPath, defaultValue=None)
Get configuration value
- Parameters:
optionPath (str) – option path
defaultValue – default value
- Returns:
type(defaultValue)
- loadCFG(cfg)
Load CFG
- Parameters:
cfg (CFG()) – CFG object
- Returns:
S_OK()/S_ERROR()
- setOptionValue(optionPath, value)
Set a value in the local configuration
- useServerCertificate()
Get using server certificate status
- Returns:
bool