Added information how to use JsonFilter
Creating a query hint to use JsonFilter that will choose required backed to create a volume was complicated. Added description how to use that will be helpful for others. Change-Id: If04f037cf55b5b9d116927aa4b23a9c42d7b53e6 Co-authored-by: Bartosz Rabiega <bartosz.rabiega@corp.ovh.com>
This commit is contained in:
parent
ff96402263
commit
e032855287
|
@ -22,7 +22,14 @@ from cinder.scheduler import filters
|
||||||
|
|
||||||
|
|
||||||
class JsonFilter(filters.BaseBackendFilter):
|
class JsonFilter(filters.BaseBackendFilter):
|
||||||
"""Backend filter for simple JSON-based grammar for selecting backends."""
|
"""Backend filter for simple JSON-based grammar for selecting backends.
|
||||||
|
|
||||||
|
If you want to choose one of your backend,
|
||||||
|
make a query hint, for example:
|
||||||
|
|
||||||
|
cinder create --hint query='["=", "$backend_id", "rbd:vol@ceph#cloud"]'
|
||||||
|
"""
|
||||||
|
|
||||||
def _op_compare(self, args, op):
|
def _op_compare(self, args, op):
|
||||||
"""Compare first item of args with the rest using specified operator.
|
"""Compare first item of args with the rest using specified operator.
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue