Unable to use the flavor name in "nova flavor-access-add".

Bug #1205298 reported by fujioka yuuichi
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
python-novaclient
Fix Released
Undecided
fujioka yuuichi

Bug Description

"nova flavor-access-add" and "nova flavor-access-remove" should be able to using the flavor name.

Conditions:
1. The flavor is non-public.
2. The tenant cannot access to the flavor.

Expect:

$ OS_TENANT_NAME=demo nova flavor-access-add foo d703a8a37a2f4c179eb030de0a406f88
+--------------------------------------+----------------------------------+
| Flavor_ID | Tenant_ID |
+--------------------------------------+----------------------------------+
| 633de033-023c-4a68-a98c-c8f30221918e | d703a8a37a2f4c179eb030de0a406f88 |
+--------------------------------------+----------------------------------+
$

Actual:

$ OS_TENANT_NAME=demo nova flavor-access-add foo d703a8a37a2f4c179eb030de0a406f88
ERROR: No flavor with a name or ID of 'foo' exists.
$

Changed in nova:
assignee: nobody → fujioka yuuichi (fujioka-yuuichi-d)
tags: added: python-novaclient
description: updated
Revision history for this message
Tiantian Gao (gtt116) wrote :

I think it should belong to novaclient rather than nova. no?

no longer affects: nova
Changed in python-novaclient:
assignee: nobody → fujioka yuuichi (fujioka-yuuichi-d)
Revision history for this message
fujioka yuuichi (fujioka-yuuichi-d) wrote :

Thank you for your comment.
I have removed nova from this bug.

description: updated
description: updated
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/39183

Changed in python-novaclient:
status: New → In Progress
Revision history for this message
Jun Xie (junxiebj) wrote :

non-admin can not use 'nova flavor-access-add' to add private_flavor-id(or flavor_name), is this 'work as designed' or bug?

Revision history for this message
fujioka yuuichi (fujioka-yuuichi-d) wrote :

I think that is 'work as designed'.
Only admin can manage flavor. Non-admin can do only reference.

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

Reviewed: https://review.openstack.org/39183
Committed: http://github.com/openstack/python-novaclient/commit/476e50f4d7f7c7f3231bca8beb194776c28b2267
Submitter: Jenkins
Branch: master

commit 476e50f4d7f7c7f3231bca8beb194776c28b2267
Author: Yuuichi Fujioka <email address hidden>
Date: Mon Jul 29 05:32:01 2013 +0900

    Allow name argument to flavor-access-add

    Administrator cannot use the flavor name in arguments of
    "nova flavor-access-add" and "nova flavor-access-remove"
    in following conditions.

    1. The flavor is non-public.
    2. The falvor doesn't belong administrator's tenant.

    This patch fixes this problem.

    Change-Id: Ic5e3222d0ff62667e003a61e6a94e85833da5d11
    Fixes: bug #1205298

Changed in python-novaclient:
status: In Progress → Fix Committed
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/44636

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

Reviewed: https://review.openstack.org/44636
Committed: http://github.com/openstack/python-novaclient/commit/97da33fcf599efeb29d7e496d34a450c78c557f5
Submitter: Jenkins
Branch: master

commit 97da33fcf599efeb29d7e496d34a450c78c557f5
Author: fujioka yuuichi <email address hidden>
Date: Mon Sep 2 11:03:50 2013 +0900

    Allow name argument to flavor-access-add

    Administrator cannot use the flavor name in arguments of
    "nova flavor-access-add" and "nova flavor-access-remove".

    This patch fixes this problem.

    Change-Id: I68b267dc071382f1978efc2088cd8e837455e8b4
    Related-Bug: #1205298

Revision history for this message
melanie witt (melwitt) wrote :

novaclient 2.16.0 released on 2/26/2014

Changed in python-novaclient:
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.