Ask Your Question
0

Explain the difference between quantum quota-list and quota-show commands

asked 2013-07-02 10:45:48 -0600

rajalakshmi-ganesan gravatar image

Hi,

I am trying out the quantum commands for quota.

I observed that output for "quantum quota-show" and "quantum quota-list" is same. I checked for the number of tenants present using "keystone tenant-list", and there are 5 tenants.

Following is the snapshot :

ubuntu@devstack1:~/sneha/tempest/tempest/api/network$ quantum quota-show +---------------------+-------+ | Field | Value | +---------------------+-------+ | floatingip | 50 | | network | 10 | | port | 70 | | router | 10 | | security_group | 10 | | security_group_rule | 100 | | subnet | 10 | +---------------------+-------+ ubuntu@devstack1:~/sneha/tempest/tempest/api/network$ quantum quota-list +------------+---------+------+--------+----------------+---------------------+--------+----------------------------------+ | floatingip | network | port | router | security_group | security_group_rule | subnet | tenant_id | +------------+---------+------+--------+----------------+---------------------+--------+----------------------------------+ | 50 | 10 | 70 | 10 | 10 | 100 | 10 | 70e75c24bd8b4f7884f073dd4510a9fa | +------------+---------+------+--------+----------------+---------------------+--------+----------------------------------+

ubuntu@devstack1:~/sneha/tempest/tempest/api/network$ keystone tenant-list +----------------------------------+--------------------+---------+ | id | name | enabled | +----------------------------------+--------------------+---------+ | 70e75c24bd8b4f7884f073dd4510a9fa | admin | True | | 538c09d56f0d4e22827b5da671f5dc99 | alt_demo | True | | 6b7d64126a3c4b019cf35b8f8418b818 | demo | True | | 33de0602d49440c7a5e8739b02b5558c | invisible_to_admin | True | | 05b202439e334aaab73250ae393dff88 | service | True | +----------------------------------+--------------------+---------+

I am unable to understand why is list command not displaying details for all the tenants? Please, can anyone assist me?

edit retag flag offensive close merge delete

7 answers

Sort by ยป oldest newest most voted
0

answered 2013-07-02 10:55:41 -0600

rajalakshmi-ganesan gravatar image

Help page for quantum quota-list says:

ubuntu@devstack1:~/sneha/tempest/tempest/api/network$ quantum help quota-list usage: quantum quota-list [-h] [-f {csv,table}] [-c COLUMN] [--quote {all,minimal,none,nonnumeric}] [--request-format {json,xml}]

List defined quotas of all tenants.

optional arguments: -h, --help show this help message and exit --request-format {json,xml} the xml or json request format

output formatters: output formatter options

-f {csv,table}, --format {csv,table} the output format, defaults to table -c COLUMN, --column COLUMN specify the column(S)to include, can be repeated

CSV Formatter: --quote {all,minimal,none,nonnumeric} when to include quotes, defaults to nonnumeric ubuntu@devstack1:~/sneha/tempest/tempest/api/network$

The description of quota-list command says that "List defined quotas of all tenants" but the output is of only the admin tenant whose credentials are used for listing

edit flag offensive delete link more
0

answered 2013-07-02 10:55:52 -0600

rajalakshmi-ganesan gravatar image

Help page for quantum quota-list says:

ubuntu@devstack1:~/sneha/tempest/tempest/api/network$ quantum help quota-list usage: quantum quota-list [-h] [-f {csv,table}] [-c COLUMN] [--quote {all,minimal,none,nonnumeric}] [--request-format {json,xml}]

List defined quotas of all tenants.

optional arguments: -h, --help show this help message and exit --request-format {json,xml} the xml or json request format

output formatters: output formatter options

-f {csv,table}, --format {csv,table} the output format, defaults to table -c COLUMN, --column COLUMN specify the column(S)to include, can be repeated

CSV Formatter: --quote {all,minimal,none,nonnumeric} when to include quotes, defaults to nonnumeric ubuntu@devstack1:~/sneha/tempest/tempest/api/network$

The description of quota-list command says that "List defined quotas of all tenants" but the output is of only the admin tenant whose credentials are used for listing

edit flag offensive delete link more
0

answered 2013-07-02 11:01:56 -0600

rajalakshmi-ganesan gravatar image

Accidentally marked the status as "solved". Apologies for the spam.

edit flag offensive delete link more
0

answered 2013-07-03 10:08:00 -0600

gongysh gravatar image

$ quantum quota-show -h usage: quantum quota-show [-h] [-f {shell,table}] [-c COLUMN] [--variable VARIABLE] [--prefix PREFIX] [--request-format {json,xml}] [--tenant-id tenant-id]

Show quotas of a given tenant

quota-show is used to show the 'quotas' of a given tenant, the quota-list is used to show the 'defined quotas' of tenants.

so quota-list will be empty if there are no tenants have defined quotas. i.e. quota-list does not list the quotas of tenants who does not have defined quotas.

quota-update is used to define quotas of a tenant if u want the tenant not to use default quotas.

edit flag offensive delete link more
0

answered 2013-07-03 10:22:35 -0600

rajalakshmi-ganesan gravatar image

Using Keystone, I am able to get list of all the tenants present.

ubuntu@devstack1:~/raj/wed/tempest/tempest/api$ keystone tenant-list +----------------------------------+--------------------+---------+ | id | name | enabled | +----------------------------------+--------------------+---------+ | 70e75c24bd8b4f7884f073dd4510a9fa | admin | True | | 538c09d56f0d4e22827b5da671f5dc99 | alt_demo | True | | 6b7d64126a3c4b019cf35b8f8418b818 | demo | True | | 33de0602d49440c7a5e8739b02b5558c | invisible_to_admin | True | | 05b202439e334aaab73250ae393dff88 | service | True | +----------------------------------+--------------------+---------+

Now when I request for quota-show of tenant "demo"(6b7d64126a3c4b019cf35b8f8418b818), I am able to view the defined quotas.

ubuntu@devstack1:~/raj/wed/tempest/tempest/api$ quantum quota-show --tenant-id 6b7d64126a3c4b019cf35b8f8418b818 +---------------------+-------+ | Field | Value | +---------------------+-------+ | floatingip | 50 | | network | 10 | | port | 50 | | router | 10 | | security_group | 10 | | security_group_rule | 100 | | subnet | 10 | +---------------------+-------+

But the quota values for the same tenant "demo" i.e 6b7d64126a3c4b019cf35b8f8418b818 thought they are defined, they are not appearing in the response of quota-list:

ubuntu@devstack1:~/raj/wed/tempest/tempest/api$ quantum quota-list +------------+---------+------+--------+----------------+---------------------+--------+----------------------------------+ | floatingip | network | port | router | security_group | security_group_rule | subnet | tenant_id | +------------+---------+------+--------+----------------+---------------------+--------+----------------------------------+ | 50 | 10 | 70 | 10 | 10 | 100 | 10 | 70e75c24bd8b4f7884f073dd4510a9fa | +------------+---------+------+--------+----------------+---------------------+--------+----------------------------------+ ubuntu@devstack1:~/raj/wed/tempest/tempest/api$

Only the values of admin tenant user appear.

edit flag offensive delete link more
0

answered 2013-07-03 14:51:08 -0600

gongysh gravatar image

it seems the quotas of demo are still default values. These two commands can help: quantum quota-update --tenant-id 6b7d64126a3c4b019cf35b8f8418b818 --port 70 quantum quota-list

edit flag offensive delete link more
0

answered 2013-07-03 15:16:00 -0600

rajalakshmi-ganesan gravatar image

Thanks yong sheng gong, that solved my question.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Get to know Ask OpenStack

Resources for moderators

Question Tools

1 follower

Stats

Asked: 2013-07-02 10:45:48 -0600

Seen: 125 times

Last updated: Jul 03 '13