No validation for project name while quota show

Bug #1522713 reported by Ashish Singh
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
python-novaclient
Invalid
Undecided
Shashwat Srivastava

Bug Description

Hi All,

There is no validation for tenant name with quota show, It just displays the default quota.
root@admin-mon-node1-osd0:~# nova quota-show kjadshfk

It should throw some exception if there is wrong tenant name with nova quota show
Thanks,
Ashish

Changed in python-novaclient:
assignee: nobody → Raga lahari (raga-lahari)
Revision history for this message
Raga lahari (raga-lahari) wrote :

Hi,

To validate tenant name in novaclient for the command "nova quota-show --tenant <name>",Need to get the tenant list from keystoneclient. We are planning to implement following solution to get tenant list

from keystoneclient import session
from keystoneclient.v2_0 import client as kclient

def _tenant_list(cs):
   sess = session.Session(cs.client.auth)
   kc = kclient.Client(session=sess)
   tenant_list = kc.tenants.list()
   tenants = dict((x.id, x.name) for x in tenant_list)

Please let me know your comments.

Revision history for this message
Ashish Singh (ashish-singh7) wrote : Re: [Bug 1522713] Re: No validation for project name while quota show

Hi Raga,

It looks OK, You commit the code, Let it get reviewed on gerrit.

Thanks,
Ashish.

On Thu, Dec 10, 2015 at 5:32 PM, Raga lahari <email address hidden> wrote:

> Hi,
>
> To validate tenant name in novaclient for the command "nova quota-show
> --tenant <name>",Need to get the tenant list from keystoneclient. We are
> planning to implement following solution to get tenant list
>
> from keystoneclient import session
> from keystoneclient.v2_0 import client as kclient
>
> def _tenant_list(cs):
> sess = session.Session(cs.client.auth)
> kc = kclient.Client(session=sess)
> tenant_list = kc.tenants.list()
> tenants = dict((x.id, x.name) for x in tenant_list)
>
> Please let me know your comments.
>
> --
> You received this bug notification because you are subscribed to the bug
> report.
> https://bugs.launchpad.net/bugs/1522713
>
> Title:
> No validation for project name while quota show
>
> Status in python-novaclient:
> New
>
> Bug description:
> Hi All,
>
> There is no validation for tenant name with quota show, It just displays
> the default quota.
> root@admin-mon-node1-osd0:~# nova quota-show kjadshfk
>
> It should throw some exception if there is wrong tenant name with nova
> quota show
> Thanks,
> Ashish
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/python-novaclient/+bug/1522713/+subscriptions
>

Changed in python-novaclient:
assignee: Raga lahari (raga-lahari) → nobody
Changed in python-novaclient:
assignee: nobody → Saiteja Kondepudi (saiteja-kondepudi)
Revision history for this message
Shashwat Srivastava (shashwat-srivastava) wrote :

Hey Saiteja,
As no update on the bug. I am assigning it to myself.

Changed in python-novaclient:
assignee: Saiteja Kondepudi (saiteja-kondepudi) → Shashwat Srivastava (shashwat-srivastava)
Revision history for this message
Shashwat Srivastava (shashwat-srivastava) wrote :

Tried replicating bug on Liberty devstack all-in-one setup.

Couldn't replicate it. Seems bug is fixed with the updated version.

Changed in python-novaclient:
status: New → Invalid
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.