cinder.scheduler.filters.json_filter module

class JsonFilter

Bases: BaseBackendFilter

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”]’

backend_passes(backend_state, filter_properties)

Return a list of backends that can fulfill query requirements.

commands = {'<': <function JsonFilter._less_than>, '<=': <function JsonFilter._less_than_equal>, '=': <function JsonFilter._equals>, '>': <function JsonFilter._greater_than>, '>=': <function JsonFilter._greater_than_equal>, 'and': <function JsonFilter._and>, 'in': <function JsonFilter._in>, 'not': <function JsonFilter._not>, 'or': <function JsonFilter._or>}