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/
    Default/
        someSection/
            someOption = someValue
            aSecondOption = aSecondValue
    Production/
        someSection/
            someOption = someValueInProduction
            aSecondOption = aSecondValueInProduction
    Certification/
        someSection/
            someOption = someValueInCertification

The following calls would give different results based on the setup:

Operations().getValue('someSection/someOption')
  - someValueInProduction if we are in 'Production' setup
  - someValueInCertification if we are in 'Certification' setup

Operations().getValue('someSection/aSecondOption')
  - aSecondValueInProduction if we are in 'Production' setup
  - aSecondValue if we are in 'Certification' setup     <- looking in Default since there's no Certification/someSection/aSecondOption
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

getOptions(sectionPath, listOrdered=False)
getOptionsDict(sectionPath)
getPath(option, vo=False, setup=False)

Generate the CS path for an option:

  • if vo is not defined, the helper’s vo will be used for multi VO installations
  • if setup evaluates False (except None) -> The helpers setup will be used
  • if setup is defined -> whatever is defined will be used as setup
  • if setup is None -> Defaults will be used
Parameters:option (string) – path with respect to the Operations standard path
getSections(sectionPath, listOrdered=False)
getValue(optionPath, defaultValue=None)
setGroup(group)

False to auto detect VO

setSetup(setup)

False to auto detect

setVO(vo)

False to auto detect VO