Comment 3 for bug 1035478

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to openstack-common (master)

Reviewed: https://review.openstack.org/11185
Committed: http://github.com/openstack/openstack-common/commit/513bd3a917207099125cc044705aee438fee7143
Submitter: Jenkins
Branch: master

commit 513bd3a917207099125cc044705aee438fee7143
Author: Vishvananda Ishaya <email address hidden>
Date: Fri Aug 10 14:28:59 2012 -0700

    Allow set_default and set_override to use None

    The current implementation interprets set_default('foo', None) and
    set_override('foo', None) as 'clear the existing default or override',
    which makes it impossible to override a value with None.

    This patch adds support for overriding with a None value by adding
    a special internal class. set_override('foo', None) will now override
    the existing value with None. This is a slight change to the existing
    behavior, so this patch adds two calls for the old functionality of
    clearing defaults and overrides. Example syntax for the new calls
    are shown below:

    conf.clear_default('foo')
    conf.clear_override('foo')

    The patch also updates the tests to reflect the change in functionality
    and adds new tests to verify the new functionality.

    Fixes bug 1035478

    Change-Id: Iee5e20e44da9bef6b86e0483ab0b48b625fe503c