summaryrefslogtreecommitdiff
path: root/nova/db/sqlalchemy/api.py
diff options
context:
space:
mode:
Diffstat (limited to 'nova/db/sqlalchemy/api.py')
-rw-r--r--nova/db/sqlalchemy/api.py43
1 files changed, 22 insertions, 21 deletions
diff --git a/nova/db/sqlalchemy/api.py b/nova/db/sqlalchemy/api.py
index 6bd1db5ca4..f92e498a68 100644
--- a/nova/db/sqlalchemy/api.py
+++ b/nova/db/sqlalchemy/api.py
@@ -1844,32 +1844,33 @@ def instance_get_all_by_filters(context, filters, sort_key, sort_dir,
Depending on the name of a filter, matching for that filter is
performed using either exact matching or as regular expression
- matching. Exact matching is applied for the following filters:
+ matching. Exact matching is applied for the following filters::
- ['project_id', 'user_id', 'image_ref',
- 'vm_state', 'instance_type_id', 'uuid',
- 'metadata', 'host', 'system_metadata']
+ | ['project_id', 'user_id', 'image_ref',
+ | 'vm_state', 'instance_type_id', 'uuid',
+ | 'metadata', 'host', 'system_metadata']
A third type of filter (also using exact matching), filters
based on instance metadata tags when supplied under a special
- key named 'filter'.
-
- filters = {
- 'filter': [
- {'name': 'tag-key', 'value': '<metakey>'},
- {'name': 'tag-value', 'value': '<metaval>'},
- {'name': 'tag:<metakey>', 'value': '<metaval>'}
- ]
- }
-
- Special keys are used to tweek the query further:
-
- 'changes-since' - only return instances updated after
- 'deleted' - only return (or exclude) deleted instances
- 'soft_deleted' - modify behavior of 'deleted' to either
- include or exclude instances whose
- vm_state is SOFT_DELETED.
+ key named 'filter'::
+
+ | filters = {
+ | 'filter': [
+ | {'name': 'tag-key', 'value': '<metakey>'},
+ | {'name': 'tag-value', 'value': '<metaval>'},
+ | {'name': 'tag:<metakey>', 'value': '<metaval>'}
+ | ]
+ | }
+
+ Special keys are used to tweek the query further::
+
+ | 'changes-since' - only return instances updated after
+ | 'deleted' - only return (or exclude) deleted instances
+ | 'soft_deleted' - modify behavior of 'deleted' to either
+ | include or exclude instances whose
+ | vm_state is SOFT_DELETED.
+
"""
# NOTE(mriedem): If the limit is 0 there is no point in even going
# to the database since nothing is going to be returned anyway.