oslo.config generator does not handle default string values for List type correctly

Bug #1586366 reported by Ihar Hrachyshka
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
oslo.config
Fix Released
Undecided
Ihar Hrachyshka

Bug Description

When using the generator, if List option is passed a string as default value, it is parsed correctly by the library itself (doing .split(',')) but the generator does not follow the path and does ','.join(opt.default) which results in eg.:

#
# From neutron.qos
#

# Drivers list to use to send the update notification (list value)
#notification_drivers = m,e,s,s,a,g,e,_,q,u,e,u,e

for the following option:

QOS_PLUGIN_OPTS = [
    cfg.ListOpt('notification_drivers',
                default='message_queue',
                help=_('Drivers list to use to send the update notification')),
]

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to oslo.config (stable/mitaka)

Fix proposed to branch: stable/mitaka
Review: https://review.openstack.org/322129

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on oslo.config (stable/mitaka)

Change abandoned by Ihar Hrachyshka (<email address hidden>) on branch: stable/mitaka
Review: https://review.openstack.org/322129
Reason: Meh. Wrong branch.

Changed in oslo.config:
assignee: nobody → Ihar Hrachyshka (ihar-hrachyshka)
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to oslo.config (master)

Fix proposed to branch: master
Review: https://review.openstack.org/322149

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

Reviewed: https://review.openstack.org/322149
Committed: https://git.openstack.org/cgit/openstack/oslo.config/commit/?id=75e1c306630378673861d52a34de51e869183062
Submitter: Jenkins
Branch: master

commit 75e1c306630378673861d52a34de51e869183062
Author: Ihar Hrachyshka <email address hidden>
Date: Fri May 27 14:12:37 2016 +0200

    generator: format string default value for List type properly

    List type allows to pass string values as default values, which are then
    handled by splitting on commas. For formatting matters, if the default
    value is of string type, there is no special conversion needed, and we
    can reuse the value as-is.

    Change-Id: Ie9ecdfc064e886f6138b1fa9e839d8f95a7df339
    Closes-Bug: #1586366

Changed in oslo.config:
status: In Progress → Fix Released
Revision history for this message
Davanum Srinivas (DIMS) (dims-v) wrote : Fix included in openstack/oslo.config 3.11.0

This issue was fixed in the openstack/oslo.config 3.11.0 release.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to oslo.config (stable/mitaka)

Reviewed: https://review.openstack.org/322129
Committed: https://git.openstack.org/cgit/openstack/oslo.config/commit/?id=9dd6ac634842b037c99d25b34431eaa2f4ed427c
Submitter: Jenkins
Branch: stable/mitaka

commit 9dd6ac634842b037c99d25b34431eaa2f4ed427c
Author: Ihar Hrachyshka <email address hidden>
Date: Fri May 27 14:12:37 2016 +0200

    generator: format string default value for List type properly

    List type allows to pass string values as default values, which are then
    handled by splitting on commas. For formatting matters, if the default
    value is of string type, there is no special conversion needed, and we
    can reuse the value as-is.

    Change-Id: Ie9ecdfc064e886f6138b1fa9e839d8f95a7df339
    Closes-Bug: #1586366
    (cherry picked from commit 75e1c306630378673861d52a34de51e869183062)

tags: added: in-stable-mitaka
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.