[Openstack-security] [Bug 1031139] Re: quota-show does not handle alternatives for tenant_id as expected

Melanie Witt 1031139 at bugs.launchpad.net
Wed Mar 26 22:20:04 UTC 2014


@scott-devoid Thanks for updating this with the data you gathered.
Apologies for marking it as Fix Committed.

I'm able to get the same behavior by following your steps, but there are
two things I see so far:

1. The quota commands expect (in their help) tenant id only, not tenant
name -- e.g. 'nova help quota-show'. If tenant id is omitted, the tenant
name from the credentials gets translated to an id and used, which I
think is causing confusion. All of the --tenant options are treated as
ids, and tenant id and tenant name aren't intended to be
interchangeable.

2. When a nonexistent tenant id is passed to quota-show, quota defaults
are returned.

-- 
You received this bug notification because you are a member of OpenStack
Security Group, which is subscribed to OpenStack.
https://bugs.launchpad.net/bugs/1031139

Title:
  quota-show does not handle alternatives for tenant_id as expected

Status in Python client library for Nova:
  New

Bug description:
  quota-show does not handle alternatives for tenant_id as expected

  ENV: Devstack trunk (Folsom) / nova
  d56b5fc3ad6dbfc56e0729174925fb146cef87fa ,  Mon Jul 30 21:59:56 2012
  +0000

  I'd expect the following command to work as $ env | grep TENANT ->
  OS_TENANT_NAME=demo

  $ nova --debug --os_username=admin --os_password=password quota-show 
  usage: nova quota-show <tenant_id>
  error: too few arguments

  
  I'd also expect the following to work:
  $ nova --debug --os_username=admin --os_password=password quota-show --os_tenant_name=demo
  usage: nova quota-show <tenant_id>
  error: too few arguments

  
  What is more awesome, if in the event that I do provide the wrong tenant_id, it proceeds to use OS_TENANT_NAME returning those results:

  $nova --debug --os_username=admin --os_password=password quota-show
  gggggggggggggggggggggggggggggggggg

  REQ: curl -i
  http://10.1.11.219:8774/v2/04adebe40d214581b84118bcce264f0e/os-quota-
  sets/ggggggggggggggggggggggggggggggggggg -X GET -H "X-Auth-Project-Id:
  demo" -H "User-Agent: python-novaclient" -H "Accept: application/json"
  -H "X-Auth-Token: 10bd3f948df24039b2b88b98771b2b99"

  +-----------------------------+-------+
  | Property                    | Value |
  +-----------------------------+-------+
  | cores                       | 20    |
  | floating_ips                | 10    |
  | gigabytes                   | 1000  |
  | injected_file_content_bytes | 10240 |
  | injected_files              | 5     |
  | instances                   | 10    |
  | metadata_items              | 128   |
  | ram                         | 51200 |
  | volumes                     | 10    |
  +-----------------------------+-------+

  
  I also couldn't figure out how to get the quota-show to work as a member (non-admin) of a project.

  Let me know if you want any of these issues broken out in to
  additional bugs.

To manage notifications about this bug go to:
https://bugs.launchpad.net/python-novaclient/+bug/1031139/+subscriptions




More information about the Openstack-security mailing list