Operations
This helper looks in the /Operations section of the CS, considering its specific nature: the /Operations section is designed in a way that each configuration can be specific to a Setup, while maintaining a default.
So, for example, given the following /Operations section:
Operations/
Defaults/
someOption = someValue
aSecondOption = aSecondValue
specificVo/
someSection/
someOption = someValueInVO
The following calls would give different results based on the setup:
Operations().getValue('someSection/someOption')
- someValueInVO if we are in 'specificVo' vo
- someValue if we are in any other VO
It becomes then important for the Operations() objects to know the VO name for which we want the information, and this can be done in the following ways.
by specifying the VO name directly:
Operations(vo=anotherVOName).getValue('someSectionName/someOptionX')
by give a group name:
Operations(group=thisIsAGroupOfVO_X).getValue('someSectionName/someOptionX')
3. if no VO nor group is provided, the VO will be guessed from the proxy, but this works iff the object is instantiated by a proxy (and not, e.g., using a server certificate)
- class DIRAC.ConfigurationSystem.Client.Helpers.Operations.Operations(vo=False, group=False, setup=False)
Bases:
object
Operations class
The /Operations CFG section is maintained in a cache by an Operations object
- __init__(vo=False, group=False, setup=False)
c’tor
Setting some defaults
- getMonitoringBackends(monitoringType=None)
Chooses the type of backend to use (Monitoring and/or Accounting) depending on the MonitoringType. If a flag for the monitoringType specified is set, it will enable monitoring according to it, otherwise it will use the Default value (Accounting set as default).
- Parameters:
MonitoringType (string) – monitoring type to specify
- getOptions(sectionPath, listOrdered=False)
- getOptionsDict(sectionPath)
- getSections(sectionPath, listOrdered=False)
- getValue(optionPath, defaultValue=None)