You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Apr 7, 2022. It is now read-only.
Sean Myers edited this page Jan 6, 2014
·
6 revisions
utils.conf: YAML file loader
All YAML files stored in the conf/ directory of the project are automatically parsed and loaded by the utils.conf module on request by the utils.conf module. The parsed files are exposed as importable attributes of the yaml file name in the module.amongst a team of testers, and the other
For example, consider the conf/cfme_data.yaml file:
# Import utils.conf, use cfme_data with a fully qualified nameimportutils.confprovider=utils.conf.cfme_data['management_systems']['provider_name']
# Access cfme_data as an attribute of conffromutilsimportconfprovider=conf.cfme_data['management_systems']['provider_name']
# Or just import cfme_data directlyfromutils.confimportcfme_dataprovider= .cfme_data['management_systems']['provider_name']
Local Configuration Overrides
In addition to loading YAML files, the utils.conf loader supports local override files. This feature is useful for maintaining a shared set of config files for a team, while still allowing for local configuration.
Take the following example YAML files:
# conf/example.yamla: 'foo'b: 'spam'
# conf/example.local.yamla: ' bar'
When loaded by the conf loader, the 'a' key will be automatically overridden by the value in the local YAML file: