nova-manage stack traces when wrong number of arguments are passed

Bug #1083315 reported by Joe Gordon
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Fix Released
Low
Joe Gordon

Bug Description

Nova manage shouldn't stack trace when the wrong number of arguments are passed in.

From devstack:

$ nova-manage flavor
/usr/local/bin/nova-manage category action [<args>]
Available actions for flavor category:
        create
        delete
        list
        set_key
        unset_key
vagrant@precise64:~$ nova-manage flavor create
Possible wrong number of arguments supplied
Creates instance types / flavors
Usage: nova-manage flavor create <args> [options]

Options:
  -h, --help show this help message and exit
  --name=<name> Name of instance type/flavor
  --memory=<memory size>
                        Memory size
  --cpu=<num cores> Number cpus
  --root_gb=<root_gb> Root disk size
  --ephemeral_gb=<ephemeral_gb>
                        Ephemeral disk size
  --flavor=<flavor id>
                        Flavor ID
  --swap=<swap> Swap
  --rxtx_factor=<rxtx_factor>
                        rxtx_factor
  --is_public=<is_public>
                        Make flavor accessible to the public
2012-11-26 19:14:13 CRITICAL nova [-] create() takes at least 5 arguments (1 given)
2012-11-26 19:14:13 TRACE nova Traceback (most recent call last):
2012-11-26 19:14:13 TRACE nova File "/usr/local/bin/nova-manage", line 7, in <module>
2012-11-26 19:14:13 TRACE nova execfile(__file__)
2012-11-26 19:14:13 TRACE nova File "/opt/stack/nova/bin/nova-manage", line 1177, in <module>
2012-11-26 19:14:13 TRACE nova main()
2012-11-26 19:14:13 TRACE nova File "/opt/stack/nova/bin/nova-manage", line 1164, in main
2012-11-26 19:14:13 TRACE nova fn(*fn_args, **fn_kwargs)
2012-11-26 19:14:13 TRACE nova TypeError: create() takes at least 5 arguments (1 given)
2012-11-26 19:14:13 TRACE nova

Changed in nova:
assignee: nobody → Joe Gordon (joe-gordon0)
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to nova (master)

Reviewed: https://review.openstack.org/16342
Committed: http://github.com/openstack/nova/commit/59f6d3b63b3a32875a1835cb3ff9bbddf2b192ee
Submitter: Jenkins
Branch: master

commit 59f6d3b63b3a32875a1835cb3ff9bbddf2b192ee
Author: Joe Gordon <email address hidden>
Date: Fri Nov 16 14:48:45 2012 -0800

    Improve nova-manage usability

    Prevent nova-manage from stack tracing when the wrong number of
    arguments are passed in.

    Fixes bug 1083315

    Change-Id: I7b9a237a82b4255d88c01c6a56ad0ccd4a6ee984

Changed in nova:
status: In Progress → Fix Committed
Thierry Carrez (ttx)
Changed in nova:
milestone: none → grizzly-2
status: Fix Committed → Fix Released
Mark McLoughlin (markmc)
Changed in nova:
importance: Undecided → Low
Thierry Carrez (ttx)
Changed in nova:
milestone: grizzly-2 → 2013.1
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.