Nova API doc for listing servers is missing metadata filter

Bug #1543791 reported by Carolyn Van Slyck on 2016-02-09
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Undecided
Unassigned

Bug Description

I am using Nova v2.1 (Liberty). The documentation for listing servers only covers a portion of the supported filter options. I don't know what they all should be but I've found that 'metadata' is one of them. :-)

List Servers Doc: http://developer.openstack.org/api-ref-compute-v2.1.html#listServers

Here is the filter method for listing servers where you can see the supported filters:
https://github.com/openstack/nova/blob/098d4ad487f8431b82d776629f15d13142d42789/nova/compute/api.py#L2027

The query below searches for servers with the metadata "foo=bar", and is URL encoded:

curl -X "GET" "http://api.openstacknetsdk.org:8774/v2.1/cae3d055dc5e4828adc4fdfe341168f7/servers/detail?metadata=%7B%22foo%22:%22bar%22%7D"

Without the encoding the query looks like this:

servers/detail?metadata={"foo":"bar"}

I haven't tried any other filters found in that method but they may be ip (fixed_ip) and system_metadata.

Atsushi SAKAI (sakaia) wrote :
tags: added: nova
Changed in openstack-api-site:
status: New → Confirmed
Changed in openstack-api-site:
assignee: nobody → Sharat Sharma (sharat-sharma)
status: Confirmed → In Progress
affects: openstack-api-site → nova

Change abandoned by Michael Still (<email address hidden>) on branch: master
Review: https://review.openstack.org/310420
Reason: This code hasn't been updated in a long time, and is in merge conflict. I am going to abandon this review, but feel free to restore it if you're still working on this.

Changed in nova:
status: In Progress → New
assignee: Sharat Sharma (sharat-sharma) → nobody
Andrey Volkov (avolkov) on 2017-03-01
Changed in nova:
status: New → Confirmed
tags: added: api-ref
removed: nova
Andrey Volkov (avolkov) wrote :

Neither metadata nor system_metadata is not supported now.
For example response: {"badRequest": {"message": "Invalid filter field: system_metadata.", "code": 400}} is due system_metadata not in allowed search options.

fixed_ip replaced with ip now, it's supported but for docs ip is preferable.

Changed in nova:
status: Confirmed → Invalid
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers