[Explain-Dev] how to import ironic.conf

asked 2019-07-16 04:31:34 -0500

Hi all,

In ironic source-code, I don't understand the line:

from ironic.conf import CONF abc = CONF.deplopy.http_root

CONF.deploy.http_root

I understand that it will get value from file ironic.conf and get the value of attribute http_root in section deploy which is configured by admin. But how it is work? I couldn't find any ConfigParser module to do this.

Thanks

edit retag flag offensive close merge delete

Comments

All the files in https://opendev.org/openstack/ironic/... import a module named cfg:

from oslo_config import cfg

This is where I would look. There is even some documentation.

Bernd Bausch gravatar imageBernd Bausch ( 2019-07-16 08:37:21 -0500 )edit