Fix API ref with regards to OR queries

Neutron supports OR queries and has for a significant amount of time.

Change-Id: I40cb0814f34833f33aad74ee4cc54ca753983e05
This commit is contained in:
Kevin Benton 2017-05-24 12:31:35 -07:00
parent a64fd6f327
commit f1e03f3dbf
1 changed files with 20 additions and 8 deletions

View File

@ -125,18 +125,30 @@ For example, the following request returns all networks named ``foobar``:
GET /v2.0/networks?name=foobar
When you specify multiple filters, the Networking API v2.0 returns only objects
that meet all filtering criteria. The operation applies an AND condition among
the filters.
When you specify multiple filters using different fields, the Networking API
v2.0 returns only objects that meet all filtering criteria. The operation
applies an AND condition among different filter fields.
OpenStack Networking offers an OR mechanism for filters by repeating the field
with the different OR criteria. For example, to find all networks named
``foobar`` OR ``bizbaz``:
.. code::
GET /v2.0/networks?name=foobar&name=bizbaz
ORs and ANDs can be combined. For example, if you want all networks with
admin_state_up=True and shared=True and named 'foobar' or 'bizbaz':
.. code::
GET /v2.0/networks?name=foobar&name=bizbaz&admin_state_up=True&shared=True
Note
----
OpenStack Networking does not offer an OR mechanism for filters.
Alternatively, you can issue a distinct request for each filter and build a
response set from the received responses on the client-side.
By default, OpenStack Networking returns all attributes for any show or list
call. The Networking API v2.0 has a mechanism to limit the set of attributes
returned. For example, return ``id``.