Subnet set removes existing values for repeated options

Bug #1564447 reported by Richard Theis
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
python-openstackclient
Fix Released
Medium
Unassigned

Bug Description

As indicated by http://paste.openstack.org/show/492593/, using the --dns-nameserver, --allocation-pool and --host-route options on the subnet set command will result in all existing values being cleared instead of being appended as expected per OSC devref (https://review.openstack.org/#/c/297718/). Fixing these options will require an option to remove all values which as outlined in the devref.

Note: Unset support for these options is tracked under the following blueprint: https://blueprints.launchpad.net/python-openstackclient/+spec/network-property-unset

Richard Theis (rtheis)
description: updated
Richard Theis (rtheis)
Changed in python-openstackclient:
importance: Undecided → Medium
status: New → Confirmed
Changed in python-openstackclient:
assignee: nobody → Reedip (reedip-banerjee)
Revision history for this message
Reedip (reedip-banerjee-deactivatedaccount) wrote :

Hey Richard,
I have a query

Consider for example, that user has set allocation_pools as 1.1.1.2/24 to 1.1.1.254/24 for his subnet.
Now he wants to change this.

Earlier, he could simply Update( in Neutronclient) or Set ( in OSC) to correct this
Now, in order to fix this, he has to run 2 commands ,
a) Unset
b) Set

I think that this use case should also be handled that allows user to Overwrite the existing information than append!

What do you think?

Changed in python-openstackclient:
status: Confirmed → In Progress
Revision history for this message
Richard Theis (rtheis) wrote :

Hi Reedip,

That is something that Dean brought up too. This could be done if we allowed the --no option to be specified with the related set option (now they are mutually exclusive). Doing so would first clear the value followed by a set of the new values. I think that is a reasonable use case that we could support in the future. If you would like to see this use case supported, I encourage you to open a blueprint for it.

- Richard

Revision history for this message
Reedip (reedip-banerjee-deactivatedaccount) wrote :
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to python-openstackclient (master)

Reviewed: https://review.openstack.org/303212
Committed: https://git.openstack.org/cgit/openstack/python-openstackclient/commit/?id=03d932ea0b3074187bfcdd9c0422a968f5f56c59
Submitter: Jenkins
Branch: master

commit 03d932ea0b3074187bfcdd9c0422a968f5f56c59
Author: reedip <email address hidden>
Date: Fri Apr 8 11:41:33 2016 +0900

    Append existing information during subnet set

    Existing values of --dns-nameserver, --allocation-pool and --houst-routes
    is currently overwritten when a user executes 'port set', but
    actually that data should be appended.
    This patch fixes the issue.

    Closes-Bug: #1564447
    Change-Id: I3dba9afa68d869abb3960b55a6880401a10eebf7

Changed in python-openstackclient:
status: In Progress → Fix Released
Revision history for this message
Doug Hellmann (doug-hellmann) wrote : Fix included in openstack/python-openstackclient 2.4.0

This issue was fixed in the openstack/python-openstackclient 2.4.0 release.

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.