The cinder.openstack.common.scheduler.filters.json_filter Module

class JsonFilter

Bases: cinder.openstack.common.scheduler.filters.BaseHostFilter

Host Filter to allow simple JSON-based grammar for selecting hosts.

commands = {'and': <function _and at 0x2b82d7e3e6e0>, 'or': <function _or at 0x2b82d7e3e668>, '>=': <function _greater_than_equal at 0x2b82d7e3e578>, 'in': <function _in at 0x2b82d7e3e488>, 'not': <function _not at 0x2b82d7e3e5f0>, '<=': <function _less_than_equal at 0x2b82d7e3e500>, '=': <function _equals at 0x2b82d7e3e320>, '<': <function _less_than at 0x2b82d7e3e398>, '>': <function _greater_than at 0x2b82d7e3e410>}
host_passes(host_state, filter_properties)

Return a list of hosts that can fulfill the requirements specified in the query.