error messages in nova help list

Bug #1497151 reported by Jinquan Ni
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
python-novaclient
Fix Released
Low
Ritesh Paiboina

Bug Description

1. version
kilo 2015.1.0

2. Relevant log files:
no log

3. Reproduce steps:

3.1
nova help list

--all-tenants [<0|1>] Display information from all tenants (Admin only).
--tenant [<tenant>] Display information from single tenant (Adminonly).
               The --all-tenants option must also be provided.

3.2
nova list --tenant f7a1114e87d9439986a73e9d419a71f7 (This is one of my tenant id)

Expected result:

Should be prompt something like :“ you need to add parameters --all-tenants.”

Actual result:

[root@devcontrol ~(keystone_admin)]# nova list --tenant f7a1114e87d9439986a73e9d419a71f7
+--------------------------------------+--------------+----------------------------------+--------+------------+-------------+--------------------+
| ID | Name | Tenant ID | Status | Task State | Power State | Networks |
+--------------------------------------+--------------+----------------------------------+--------+------------+-------------+--------------------+
| 4fc84ebe-fee7-4c4e-86d8-7cf5a191135e | testflavor02 | f7a1114e87d9439986a73e9d419a71f7 | ACTIVE | - | Running | net1=192.168.0.103 |
| bb596070-fca2-4cb8-917b-1374c78d1175 | testflavor03 | f7a1114e87d9439986a73e9d419a71f7 | ERROR | - | NOSTATE | |
| 3e211f9b-e026-464b-aadc-1f00f5d1a69f | v3test | f7a1114e87d9439986a73e9d419a71f7 | ACTIVE | - | Running | net1=192.168.0.93 |
| 280cb34c-0548-4ed3-b0d0-f391e875101d | v5test | f7a1114e87d9439986a73e9d419a71f7 | ACTIVE | - | Running | net1=192.168.0.221 |
+--------------------------------------+--------------+----------------------------------+--------+------------+-------------+--------------------+

4

The Actual result show that messages “--all-tenants option must also be provided.” in “nova help list” is wrong
So,it should be delete

Tags: api
Jinquan Ni (ni-jinquan)
description: updated
description: updated
Revision history for this message
Jinquan Ni (ni-jinquan) wrote :

novaclient/v2/shell.py
@cliutils.arg(
    '--tenant',
    # nova db searches by project_id
    dest='tenant',
    metavar='<tenant>',
    nargs='?',
    help=_('Display information from single tenant (Admin only). '
           'The --all-tenants option must also be provided.'))
。。。
。。。
def do_list(cs, args):
    """List active servers."""
    imageid = None
    flavorid = None
    if args.image:

should change to

novaclient/v2/shell.py
@cliutils.arg(
    '--tenant',
    # nova db searches by project_id
    dest='tenant',
    metavar='<tenant>',
    nargs='?',
    help=_('Display information from single tenant (Admin only). '))
。。。
。。。
def do_list(cs, args):
    """List active servers."""
    imageid = None
    flavorid = None
    if args.image:

Revision history for this message
Mark Doffman (mjdoffma) wrote :

Clearly an issue with novaclient help rather than nova.

affects: nova → python-novaclient
Revision history for this message
Ritesh Paiboina (rsritesh) wrote :

Even if we give --all-tenants [<0|1>] along with --tenant [<tenant>].

 There is no impact of --all-tenants [<0|1>] on --tenant [<tenant>] option.

We can remove that remove that statements from the nova client shell.

Changed in python-novaclient:
importance: Undecided → Low
assignee: nobody → Ritesh (rsritesh)
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/225612

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

Reviewed: https://review.openstack.org/225612
Committed: https://git.openstack.org/cgit/openstack/python-novaclient/commit/?id=41ea5276b0e4cf176b06c35248db17c9e22bd480
Submitter: Jenkins
Branch: master

commit 41ea5276b0e4cf176b06c35248db17c9e22bd480
Author: rsritesh <email address hidden>
Date: Mon Sep 21 12:36:41 2015 +0200

    Modify nova help list message for --tenant

    The --all-tenants option does not have impact
    when --tenant is used. Help message about
    --all-tenants inside the help section of --tenant
    creates uncertainty.

    Change-Id: Iaddf2370f349c6da712e0096a6ecbcbc61d37836
    Closes-Bug: #1497151

Changed in python-novaclient:
status: In Progress → Fix Committed
Changed in python-novaclient:
milestone: none → 2.30.0
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.