flavor-delete output behavior is odd

Bug #1764420 reported by Matt Riedemann
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
python-novaclient
Fix Released
Low
Matt Riedemann

Bug Description

The nova flavor-delete CLI will output the deleted flavor information rather than confirm that the flavor was successfully deleted, or simply not show anything on successful deletion, which is odd from a user experience perspective. CLIs to delete resources usually just don't print anything on success.

Compare nova flavor-delete behavior vs openstack CLI flavor delete:

stack@rocky:~$ nova flavor-show flavor-with-specs
+----------------------------+---------------------+
| Property | Value |
+----------------------------+---------------------+
| OS-FLV-DISABLED:disabled | False |
| OS-FLV-EXT-DATA:ephemeral | 0 |
| description | - |
| disk | 64 |
| extra_specs | {"hw:key": "value"} |
| id | flavor-with-specs |
| name | flavor-with-specs |
| os-flavor-access:is_public | True |
| ram | 2048 |
| rxtx_factor | 1.0 |
| swap | |
| vcpus | 4 |
+----------------------------+---------------------+
stack@rocky:~$ nova flavor-delete flavor-with-specs
+-------------------+-------------------+-----------+------+-----------+------+-------+-------------+-----------+-------------+
| ID | Name | Memory_MB | Disk | Ephemeral | Swap | VCPUs | RXTX_Factor | Is_Public | Description |
+-------------------+-------------------+-----------+------+-----------+------+-------+-------------+-----------+-------------+
| flavor-with-specs | flavor-with-specs | 2048 | 64 | 0 | | 4 | 1.0 | True | - |
+-------------------+-------------------+-----------+------+-----------+------+-------+-------------+-----------+-------------+

stack@rocky:~$ nova flavor-create flavor-with-specs flavor-with-specs 2048 64 4
+-------------------+-------------------+-----------+------+-----------+------+-------+-------------+-----------+-------------+
| ID | Name | Memory_MB | Disk | Ephemeral | Swap | VCPUs | RXTX_Factor | Is_Public | Description |
+-------------------+-------------------+-----------+------+-----------+------+-------+-------------+-----------+-------------+
| flavor-with-specs | flavor-with-specs | 2048 | 64 | 0 | | 4 | 1.0 | True | - |
+-------------------+-------------------+-----------+------+-----------+------+-------+-------------+-----------+-------------+
stack@rocky:~$ openstack flavor delete flavor-with-specs
stack@rocky:~$

Matt Riedemann (mriedem)
Changed in python-novaclient:
status: New → Confirmed
importance: Undecided → Low
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to python-novaclient (master)

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

Changed in python-novaclient:
assignee: nobody → Matt Riedemann (mriedem)
status: Confirmed → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to python-novaclient (master)

Reviewed: https://review.openstack.org/561634
Committed: https://git.openstack.org/cgit/openstack/python-novaclient/commit/?id=bcc7d8f1138ea22207ac0d31c5be132d6f274b34
Submitter: Zuul
Branch: master

commit bcc7d8f1138ea22207ac0d31c5be132d6f274b34
Author: Matt Riedemann <email address hidden>
Date: Mon Apr 16 10:30:32 2018 -0400

    Stop printing flavor details on successful flavor-delete

    It's weird that the flavor-delete CLI would print out the
    details of the flavor the user just deleted, rather than give
    some confirmation message, or simply not print anything out
    at all, which is arguably more expected behavior when deleting
    a resource. This change simply removes the output on successful
    deletion which brings "nova flavor-delete" more inline with other
    delete CLIs, including "openstack flavor delete" behavior.

    While in here, the variable and docstring code is updated to
    reflect reality and a release note is added in case anyone was
    ever relying on this odd behavior.

    Change-Id: Ie3e07b45cc70213cde4e6077c604c9f2835c75ad
    Closes-Bug: #1764420

Changed in python-novaclient:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/python-novaclient 10.2.0

This issue was fixed in the openstack/python-novaclient 10.2.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.