[openstack-dev] [oslo][glance] Oslo.cfg resets not really resetting the CONF
Amala Basha Alungal
amalaba at thoughtworks.com
Tue Dec 17 05:47:29 UTC 2013
Hi Mark, Ben
The reset() method in turn calls the *clear()* method which does an
*unregister_opt()*. However the unregister_opt only unregisters the
*config_opts*. The entire set of options inside *_opts* remain as is. We've
filed a bug <https://bugs.launchpad.net/oslo/+bug/1261376> on the oslo end.
On Tue, Dec 17, 2013 at 5:27 AM, Mark McLoughlin <markmc at redhat.com> wrote:
> Hi
>
> 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
> set_override()
>
> 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?
>
> Thanks,
> Mark.
>
>
> _______________________________________________
> OpenStack-dev mailing list
> OpenStack-dev at lists.openstack.org
> http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev
>
--
Thanks And Regards
Amala Basha
+91-7760972008
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstack.org/pipermail/openstack-dev/attachments/20131217/14386e24/attachment.html>
More information about the OpenStack-dev
mailing list