filter-rules
The cfy <resource> filters
command is used to manage Cloudify resource’s filters.
A filter is defined as a set of filter-rules that can be used to filter a list of objects, based on their labels and certain attributes.
Labels’ filter-rules can be of the following forms:
x=y
: All objects with the labelx:y
.x=[y,z]
: All objects with the labelx:y or x:z
.x!=y
: All objects with the labelx:<any value other than y>
.x!=[y,z]
: All objects with the labelx:<any value other than y and z>
.x is null
: All objects that don’t have the labelx:<any value>
.x is not null
: All objects that have the labelx:<any value>
.x is-not y
: All objects with the labelx:<any value other than y>
, or that don’t have any label with the keyx
assigned to them.
Attributes’ filter-rules can be of the following forms:
x=y
: All objects that their attributex
isy
.x=[y,z]
: All objects that their attributex
is one ofy
orz
.x!=y
: All objects that their attributex
is noty
.x!=[y,z]
: All objects that their attributex
is not one ofy
orz
.x contains y
: All objects that their attributex
containsy
.x contains [y, z]
: All objects that their attributex
containsy
orz
.x does-not-contain y
: All objects that their attributex
does not containy
.x does-not-contain [y, z]
: All objects that their attributex
does not containy
orz
.x starts-with y
: All objects that their attributex
starts withy
.x starts-with [y,z]
: All objects that their attributex
starts withy
orz
.x ends-with y
: All objects that their attributex ends with y
.x ends-with [y, z]
: All objects that their attributex
ends withy
orz
.x is not empty
: All objects that their attributex
is not empty. “empty” means either of null, an empty string, an empty list, or an empty dictionary.