Skip to content

Instantly share code, notes, and snippets.

@vkmc
Created March 4, 2013 13:44
Show Gist options
  • Save vkmc/5082319 to your computer and use it in GitHub Desktop.
Save vkmc/5082319 to your computer and use it in GitHub Desktop.
Trying to list all the instances in a tenant (BLOCKED)
When trying to retrieve instances list by for tenant deletion
the current tenant instances will be obtained, even though
the --tenants parameter is specified.
Is a nova client bug?
Testing two tenants
demo with instances Cirros1.1 and Cirros1.2
demo2 with instances Cirros2.1 and Cirros 2.2
[vkmc@thermalx2 ~]$ keystone tenant-list
+----------------------------------+--------------------+---------+
| id | name | enabled |
+----------------------------------+--------------------+---------+
| 96776baee20e49c49af03967eb23e9b6 | admin | True |
| fa7880aa16d349fbb925ece6da58e93e | alt_demo | True |
| e449b529f202419994051578e3e639a9 | demo | True |
| 186b554e5b344cc5b0fa2f644d4e73c2 | demo2 | True |
| 9d862590f7ec4d0a993e44f715008fad | invisible_to_admin | True |
| 6e1525e829754ef29c8cabbde9a7566b | service | True |
+----------------------------------+--------------------+---------+
[vkmc@thermalx2 ~]$ nova list --all-tenants 1
+--------------------------------------+-----------+--------+------------------+
| ID | Name | Status | Networks |
+--------------------------------------+-----------+--------+------------------+
| 4f3e08b5-4fb3-405d-a682-41e8840d9227 | Cirros1.1 | ACTIVE | private=10.0.0.3 |
| e74a88c5-de2d-4e9a-893a-d095b6318f61 | Cirros1.2 | ACTIVE | private=10.0.0.4 |
| 5c9c77f8-b272-43b1-80dd-69a26b2890c2 | Cirros2.1 | ACTIVE | net2=192.168.0.3 |
| 2c6ad73b-3dc5-4761-a17f-f544776a86f3 | Cirros2.2 | ACTIVE | net2=192.168.0.4 |
+--------------------------------------+-----------+--------+------------------+
[vkmc@thermalx2 ~]$ nova list --tenant 186b554e5b344cc5b0fa2f644d4e73c2 (demo2)
+--------------------------------------+-----------+--------+------------------+
| ID | Name | Status | Networks |
+--------------------------------------+-----------+--------+------------------+
| 4f3e08b5-4fb3-405d-a682-41e8840d9227 | Cirros1.1 | ACTIVE | private=10.0.0.3 |
| e74a88c5-de2d-4e9a-893a-d095b6318f61 | Cirros1.2 | ACTIVE | private=10.0.0.4 |
+--------------------------------------+-----------+--------+------------------+
[vkmc@thermalx2 ~]$ nova list --tenant e449b529f202419994051578e3e639a9 (demo)
+--------------------------------------+-----------+--------+------------------+
| ID | Name | Status | Networks |
+--------------------------------------+-----------+--------+------------------+
| 4f3e08b5-4fb3-405d-a682-41e8840d9227 | Cirros1.1 | ACTIVE | private=10.0.0.3 |
| e74a88c5-de2d-4e9a-893a-d095b6318f61 | Cirros1.2 | ACTIVE | private=10.0.0.4 |
+--------------------------------------+-----------+--------+------------------+
####
[vkmc@thermalx2 ~]$ nova help list
usage: nova list [--reservation-id <reservation-id>] [--ip <ip-regexp>]
[--ip6 <ip6-regexp>] [--name <name-regexp>]
[--instance-name <name-regexp>] [--status <status>]
[--flavor <flavor>] [--image <image>] [--host <hostname>]
[--all-tenants [<0|1>]] [--tenant [<tenant>]]
List active servers.
Optional arguments:
--reservation-id <reservation-id>
Only return instances that match reservation-id.
--ip <ip-regexp> Search with regular expression match by IP address
(Admin only).
--ip6 <ip6-regexp> Search with regular expression match by IPv6 address
(Admin only).
--name <name-regexp> Search with regular expression match by name
--instance-name <name-regexp>
Search with regular expression match by instance name
(Admin only).
--status <status> Search by server status
--flavor <flavor> Search by flavor name or ID
--image <image> Search by image name or ID
--host <hostname> Search instances by hostname to which they are
assigned (Admin only).
--all-tenants [<0|1>]
Display information from all tenants (Admin only).
--tenant [<tenant>] Display information from single tenant (Admin only).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment