utils: general-purpose utilities.
-
dict_to_conf(options)
Converts a python dictionary to a list of oslo_config.cfg.Opt
Parameters: | options (dict) – The python dictionary to convert |
Returns: | a list of options compatible with oslo_config |
Return type: | [oslo_config.cfg.Opt] |
-
fields(d, names, pred=<function <lambda> at 0x7f456bc1d488>, key_transform=<function <lambda> at 0x7f456bc1dde8>, value_transform=<function <lambda> at 0x7f456bc1de60>)
Returns the entries in this dictionary with keys appearing in names.
Parameters: |
- pred ((a -> bool)) – a filter that is applied to the values of the dictionary.
- key_transform (a -> a) – a transform to apply to the key before returning it
- value_transform (a -> a) – a transform to apply to the value before
returning it
|
Return type: | dict
|