[openstack-dev] [oslo][glance] Oslo.cfg resets not really resetting the CONF

Mark McLoughlin markmc at redhat.com
Mon Dec 16 23:57:19 UTC 2013


On Fri, 2013-12-13 at 14:14 +0530, Amala Basha Alungal wrote:
> Hi,
> I stumbled into a situation today where in I had to write few tests that
> modifies the oslo.config.cfg and in turn resets the values back in a tear
> down. Acc to the docs, oslo.cfg reset() "*Clears the object state and
> unsets overrides and defaults." *but, it doesn't seem to be happening, as
> the subsequent tests that are run retains these modified values and tests
> behave abnormally. The patch has been submitted for review
> here<https://review.openstack.org/#/c/60188/1>.
> Am I missing something obvious?

>From https://bugs.launchpad.net/oslo/+bug/1261376 :

  reset() will clear any values read from the command line or config
  files and it will also remove any values set with set_default() or 

  However, it will not undo register_opt() - there is unregister_opt()
  for that purpose

Maybe if you pushed a version of https://review.openstack.org/60188
which uses reset() and explain how it's not working as you expected?


More information about the OpenStack-dev mailing list