Unable to list nova instances using "IP" regex filter
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
neutron |
New
|
Undecided
|
Unassigned | ||
python-novaclient |
Invalid
|
Undecided
|
Unassigned |
Bug Description
CLI guide of nova list tells that instances can be listed out with IP regex filter -
[raies@localhost devstack]$ nova help list
usage: nova list [--reservation-id <reservation-id>] [--ip <ip-regexp>]
List active servers.
Optional arguments:
--reservation-id <reservation-id>
--ip <ip-regexp> Search with regular expression match by IP
--ip6 <ip6-regexp> Search with regular expression match by IPv6
--name <name-regexp> Search with regular expression match by name
--instance-name <name-regexp>
--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 servers by hostname to which they are
--all-tenants [<0|1>] Display information from all tenants (Admin
--tenant [<tenant>] Display information from single tenant (Admin
--deleted Only display deleted servers (Admin only).
--fields <fields> Comma-separated list of fields to display. Use
--minimal Get only uuid and name.
I am able to filter instances using their name regex but I am unable to filter with IP regex.
When I use complete IP only then IP instance of that IP can be listed but regex of IP does not work.
Steps performed by me are as -
1.
[raies@localhost devstack]$ nova list
+------
| ID | Name | Status | Task State | Power State | Networks |
+------
| 02cbf054-
+------
2.
[raies@localhost devstack]$ nova list --name test
+------
| ID | Name | Status | Task State | Power State | Networks |
+------
| 02cbf054-
+------
3.
[raies@localhost devstack]$ nova list --name "test"
+------
| ID | Name | Status | Task State | Power State | Networks |
+------
| 02cbf054-
+------
4.
[raies@localhost devstack]$ nova list --name "test*"
+------
| ID | Name | Status | Task State | Power State | Networks |
+------
| 02cbf054-
+------
5.
[raies@localhost devstack]$ nova list --name test*
+----+-
| ID | Name | Status | Task State | Power State | Networks |
+----+-
+----+-
6.
[raies@localhost devstack]$ nova list --ip '\b\d{1,
+----+-
| ID | Name | Status | Task State | Power State | Networks |
+----+-
+----+-
7.
[raies@localhost devstack]$ nova list --ip 172.24.4.18
+------
| ID | Name | Status | Task State | Power State | Networks |
+------
| 02cbf054-
+------
8.
[raies@localhost devstack]$ nova list --ip "172.24.4*"
+----+-
| ID | Name | Status | Task State | Power State | Networks |
+----+-
+----+-
9.
[raies@localhost devstack]$ nova list --ip 172.24.4.
+----+-
| ID | Name | Status | Task State | Power State | Networks |
+----+-
+----+-
10.
[raies@localhost devstack]$ nova list --ip 172.24.4
+----+-
| ID | Name | Status | Task State | Power State | Networks |
+----+-
+----+-
11.
[raies@localhost devstack]$ nova list --ip "172.24.4"
+----+-
| ID | Name | Status | Task State | Power State | Networks |
+----+-
+----+-
12.
[raies@localhost devstack]$ nova list --ip "172.24.4.*"
+----+-
| ID | Name | Status | Task State | Power State | Networks |
+----+-
+----+-
13.
[raies@localhost devstack]$ nova list --ip "172.24.4.18"
+------
| ID | Name | Status | Task State | Power State | Networks |
+------
| 02cbf054-
+------
This we can see, Instances list with server regex could not found.
Actually neutron does not have regex-based queries feature for ip as Nova-network does. Its related to neutron. They have in their plan for the same.