Merge "Add additional documentation on extra spec operations."
This commit is contained in:
commit
30561d5c38
@ -37,8 +37,45 @@ enabled by default), the scheduler will only create a share on a backend
|
|||||||
that reports capabilities that match the share type's un-scoped extra-spec
|
that reports capabilities that match the share type's un-scoped extra-spec
|
||||||
keys.
|
keys.
|
||||||
|
|
||||||
Refer to the CapabilitiesFilter for matching operators. For example, to
|
The CapabilitiesFilter uses the following for matching operators:
|
||||||
match a boolean capability the extra-spec value would be '<is> True'.
|
|
||||||
|
* No operator
|
||||||
|
This defaults to doing a python ==. Additionally it will match boolean values.
|
||||||
|
|
||||||
|
* **<=, >=, ==, !=**
|
||||||
|
|
||||||
|
This does a float conversion and then uses the python operators as expected.
|
||||||
|
|
||||||
|
* **<in>**
|
||||||
|
|
||||||
|
This either chooses a host that has partially matching string in the capability
|
||||||
|
or chooses a host if it matches any value in a list. For example, if "<in> sse4"
|
||||||
|
is used, it will match a host that reports capability of "sse4_1" or "sse4_2".
|
||||||
|
|
||||||
|
* **<or>**
|
||||||
|
|
||||||
|
This chooses a host that has one of the items specified. If the first word in
|
||||||
|
the string is <or>, another <or> and value pair can be concatenated. Examples
|
||||||
|
are "<or> 3", "<or> 3 <or> 5", and "<or> 1 <or> 3 <or> 7". This is for
|
||||||
|
string values only.
|
||||||
|
|
||||||
|
* **<is>**
|
||||||
|
|
||||||
|
This chooses a host that matches a boolean capability. An example extra-spec value
|
||||||
|
would be "<is> True".
|
||||||
|
|
||||||
|
* **=**
|
||||||
|
|
||||||
|
This does a float conversion and chooses a host that has equal to or greater
|
||||||
|
than the resource specified. This operator behaves this way for historical
|
||||||
|
reasons.
|
||||||
|
|
||||||
|
* **s==, s!=, s>=, s>, s<=, s<**
|
||||||
|
|
||||||
|
The "s" indicates it is a string comparison. These choose a host that satisfies
|
||||||
|
the comparison of strings in capability and specification. For example,
|
||||||
|
if "capabilities:replication_type s== dr", a host that reports replication_type of
|
||||||
|
"dr" will be chosen.
|
||||||
|
|
||||||
For vendor-specific capabilities (which need to be visible to the
|
For vendor-specific capabilities (which need to be visible to the
|
||||||
CapabilityFilter), it is recommended to use the vendor prefix followed
|
CapabilityFilter), it is recommended to use the vendor prefix followed
|
||||||
|
Loading…
Reference in New Issue
Block a user