[Neutron][Improvement]Neutron can ask user to see the help file in case the user passes wrong arguments in CLI

Bug #1495742 reported by Reedip
10
This bug affects 1 person
Affects Status Importance Assigned to Milestone
python-neutronclient
Fix Released
Low
Unassigned

Bug Description

Openstack CLIs have the support of displaying help file for all components, specifically neutron.
However, for a new user/developer, understanding the help file is important.

When we pass incorrect attributes to a nova client, we get the following output:
##########################
reedip@reedip-VirtualBox:/opt/stack/sqlalchemy$ nova agent-delete
usage: nova agent-delete <id>
error: too few arguments
Try 'nova help agent-delete' for more information.
##########################

The last line gives a useful information to the new user/developer as to what he/she can do to find out more information.
Something like this can be added to the neutron-client as well

Current output of neutron client:
##########################
reedip@reedip-VirtualBox:/opt/stack/sqlalchemy$ neutron firewall-create
usage: neutron firewall-create [-h] [-f {html,json,shell,table,value,yaml}]
                               [-c COLUMN] [--max-width <integer>]
                               [--prefix PREFIX] [--request-format {json,xml}]
                               [--tenant-id TENANT_ID] [--name NAME]
                               [--description DESCRIPTION] [--shared]
                               [--admin-state-down] [--router ROUTER]
                               POLICY
neutron firewall-create: error: too few arguments
##########################

Expected output:
##########################
reedip@reedip-VirtualBox:/opt/stack/sqlalchemy$ neutron firewall-create
usage: neutron firewall-create [-h] [-f {html,json,shell,table,value,yaml}]
                               [-c COLUMN] [--max-width <integer>]
                               [--prefix PREFIX] [--request-format {json,xml}]
                               [--tenant-id TENANT_ID] [--name NAME]
                               [--description DESCRIPTION] [--shared]
                               [--admin-state-down] [--router ROUTER]
                               POLICY
neutron firewall-create: error: too few arguments
Try 'neutron help firewall-delete' for more information.
##########################

Hong Hui Xiao (xiaohhui)
affects: neutron → python-neutronclient
Changed in python-neutronclient:
assignee: nobody → Reedip (reedip-banerjee)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to python-neutronclient (master)

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

Changed in python-neutronclient:
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to python-neutronclient (master)

Reviewed: https://review.openstack.org/224452
Committed: https://git.openstack.org/cgit/openstack/python-neutronclient/commit/?id=82c9ab771b47b9c1718e0e9ad933d68d8a0e7de5
Submitter: Jenkins
Branch: master

commit 82c9ab771b47b9c1718e0e9ad933d68d8a0e7de5
Author: Reedip Banerjee <email address hidden>
Date: Thu Sep 17 12:11:59 2015 +0530

    Improve neutron-client error message output

    In case a user provides incorrect input, the NOVA CLIs provide
    information regarding usage of the NOVA help CLI. This is useful
    for new users. Similar information has been updated in the neutron
    CLIs as well.

    Change-Id: I1be2ba5a2c937b58900221a9ec7625c461ac17d9
    Closes-Bug: #1495742

Changed in python-neutronclient:
status: In Progress → Fix Committed
Akihiro Motoki (amotoki)
Changed in python-neutronclient:
milestone: none → 4.0.0
importance: Undecided → Low
Akihiro Motoki (amotoki)
Changed in python-neutronclient:
status: Fix Committed → Fix Released
Revision history for this message
Doug Hellmann (doug-hellmann) wrote : Fix included in openstack/python-neutronclient 4.0.0

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