Hi Folks, I could do with some pointers on config value deprecation.
All of the examples in the code and documentation seem to deal with the case of "old_opt" being replaced by "new_opt" but still returning the same value Here using deprecated_name and / or deprecated_opts in the definition of "new_opt" lets me still get the value (and log a warning) if the config still uses "old_opt" However my use case is different because while I want deprecate old-opt, new_opt doesn't take the same value and I need to different things depending on which is specified, i.e. If old_opt is specified and new_opt isn't I still want to do some processing specific to old_opt and log a deprecation warning. Clearly I can code this up as a special case at the point where I look for the options - but I was wondering if there is some clever magic in oslo.config that lets me declare this as part of the option definition ? As a second point, I thought that using a deprecated option automatically logged a warning, but in the latest Devstack wait_soft_reboot_seconds is defined as: cfg.IntOpt('wait_soft_reboot_seconds', default=120, help='Number of seconds to wait for instance to shut down after' ' soft reboot request is made. We fall back to hard reboot' ' if instance does not shutdown within this window.', deprecated_name='libvirt_wait_soft_reboot_seconds', deprecated_group='DEFAULT'), but if I include the following in nova.conf libvirt_wait_soft_reboot_seconds = 20 I can see the new value of 20 being used, but there is no warning logged that I'm using a deprecated name ? Thanks Phil
_______________________________________________ OpenStack-dev mailing list OpenStack-dev@lists.openstack.org http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev