How to Solve NameError: name 'cfg' is not defined -- oslo_config

Solution: Import the 'cfg' module

# Add the following line to the top of your code
from oslo_config import cfg

 

For more information:
oslo_config cfg