Make set/unset commands end up normally when nothing specified

Bug #1588588 reported by Tang Chen
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
python-openstackclient
Fix Released
Medium
aohuanxuan

Bug Description

In the IRC meeting on 20160602, we have agreed on that set/unset commands should ends up normally instead of raising an exception when nothing is specified to modify. The main reason is: When nothing is specified, the command sets/unsets nothing, which is a normal behavior, and ends up normally. No API call fails. No error happens.

So, just fix all set/unset commands who are raising exception.

Tang Chen (tangchen)
Changed in python-openstackclient:
assignee: nobody → Tang Chen (tangchen)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to python-openstackclient (master)

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

Changed in python-openstackclient:
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote :

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

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

Reviewed: https://review.openstack.org/325583
Committed: https://git.openstack.org/cgit/openstack/python-openstackclient/commit/?id=2672e37ee211bf08a4b6078668bd36a08c9c606a
Submitter: Jenkins
Branch: master

commit 2672e37ee211bf08a4b6078668bd36a08c9c606a
Author: Tang Chen <email address hidden>
Date: Sat Jun 4 21:29:44 2016 +0800

    Make set/unset commands in volume return normally when nothing specified

    set/unset commands should ends up normally instead of
    logging an error when nothing is specified to modify.
    The main reason is: When nothing is specified, the
    command sets/unsets nothing, which is a normal behavior,
    and ends up normally. No API call fails. No error happens.

    Change-Id: Ib03a512650e5da90aa1ef38019772448383d0d33
    Partial-bug: #1588588

Revision history for this message
OpenStack Infra (hudson-openstack) wrote :

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

commit e3270cdfd8fce895b8f32b8e23e48399be6ac85c
Author: Tang Chen <email address hidden>
Date: Fri Jun 3 12:21:45 2016 +0800

    Make set/unset commands in network return normally when nothing specified

    set/unset commands should ends up normally instead of raising
    an exception when nothing is specified to modify. The main
    reason is: When nothing is specified, the command sets/unsets
    nothing, which is a normal behavior, and ends up normally.
    No API call fails. No error happens.

    This patch also adds a releasenote for both network, and volume
    commands that fix patch has been merged.

    Change-Id: I78c348066078decd350417a431f3b8bea8fcf9ef
    Partial-bug: #1588588

Revision history for this message
OpenStack Infra (hudson-openstack) wrote :

Reviewed: https://review.openstack.org/328938
Committed: https://git.openstack.org/cgit/openstack/python-openstackclient/commit/?id=8a12a39ece3882af56b42898ffee0d537c96edc8
Submitter: Jenkins
Branch: master

commit 8a12a39ece3882af56b42898ffee0d537c96edc8
Author: sunyajing <email address hidden>
Date: Tue Jun 14 15:44:41 2016 +0800

    Make set/unset command in identity and image pass normally when nothing specified

    Also update its unit tests.

    Change-Id: I82b90658b0d4247cdc9a650f14aceda640a32059
    Partial-bug: #1588588

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to python-openstackclient (master)

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

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

Reviewed: https://review.openstack.org/331970
Committed: https://git.openstack.org/cgit/openstack/python-openstackclient/commit/?id=9c62af8a42ebfeb60d88f5ad0af7c1c2fd562853
Submitter: Jenkins
Branch: master

commit 9c62af8a42ebfeb60d88f5ad0af7c1c2fd562853
Author: Tang Chen <email address hidden>
Date: Tue Jun 21 15:15:18 2016 +0800

    Make set/unset commands in compute/image/common return normally when nothing specified

    After this patch, all set/unset commands will return normally
    when nothing specified.

    Change-Id: Id94d0329faa1a674006a9aae901f834b41917317
    Close-bug: #1588588

Revision history for this message
OpenStack Infra (hudson-openstack) wrote :

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

commit e5a3c403e5982df8ab6a29d84c45aa2f8f3a10dc
Author: Huanxuan Ao <email address hidden>
Date: Wed Jul 13 19:28:11 2016 +0800

    Make set/unset commands pass normally when nothing specified in identityv3

    Change-Id: I554b41969f96b62a2c6d37024caa56b1441d5ed1
    Partial-bug: #1588588

Revision history for this message
Kyrylo Romanenko (kromanenko) wrote :

Hi! What would you say about adding info messages for user in such case? Not raising exception and writing to stderr, but simply writing a message to stdout to inform user about lack of arguments?

Revision history for this message
Richard Theis (rtheis) wrote :

Hi Tang, is this bug completed?

Revision history for this message
OpenStack Infra (hudson-openstack) wrote :

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

commit bba5c9047f81439a18e4e8be434f51abab83a24a
Author: Huanxuan Ao <email address hidden>
Date: Wed Sep 21 15:08:14 2016 +0800

    Fix "volume unset" command pass normally when nothing specified

    When nothing specified in "volume unset" command, there
    will be an error message says that the "--properties"
    option is required, it is unusual behaviour, this patch
    fix it and also add unit test for it.
    Also, this patch add unit test for "volume show" command
    by the way.

    Change-Id: I5b5d587670acf0af4262b8521292455bf9f60fe5
    Partial-bug: #1588588

Revision history for this message
Tang Chen (tangchen) wrote :

Hi Richard,

Sorry for the late response. I think we still have some problems in volume commands. Huanxuan is working on it. :)

Changed in python-openstackclient:
assignee: Tang Chen (tangchen) → aohuanxuan (huanxuan-ao)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote :

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

commit fd876e4cc699d7e6da7c5439a8452c4a8b395139
Author: Huanxuan Ao <email address hidden>
Date: Fri Sep 23 13:02:13 2016 +0800

    Fix unset commands to pass normally when nothing specified

    After I found this problem appear in "volume unset",
    I checked all the volume command and also found some
    same problems. This patch fix them all.
    The main reason of we ignored this problem before is
    there was not any tests for it. So I add tests for
    "nothing unset" for them all to test and aviod this
    problem.
    Also, I add unit tests for all snapshot commands
    in volume v1 by the way in this patch. We will
    need more tests to avoid some ignored problem.

    Change-Id: I46775f24643d715e168b30785b8b531c0431a55b
    Partial-bug: #1588588

aohuanxuan (huanxuan-ao)
Changed in python-openstackclient:
status: In Progress → Fix Committed
Changed in python-openstackclient:
importance: Undecided → Medium
status: Fix Committed → Fix Released
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.