diff --git a/doc/source/devref/capabilities_and_extra_specs.rst b/doc/source/devref/capabilities_and_extra_specs.rst index bb5555b963..779265b6d1 100644 --- a/doc/source/devref/capabilities_and_extra_specs.rst +++ b/doc/source/devref/capabilities_and_extra_specs.rst @@ -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 keys. -Refer to the CapabilitiesFilter for matching operators. For example, to -match a boolean capability the extra-spec value would be ' True'. +The CapabilitiesFilter uses the following for matching operators: + +* 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. + +* **** + + 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 " sse4" + is used, it will match a host that reports capability of "sse4_1" or "sse4_2". + +* **** + + This chooses a host that has one of the items specified. If the first word in + the string is , another and value pair can be concatenated. Examples + are " 3", " 3 5", and " 1 3 7". This is for + string values only. + +* **** + + This chooses a host that matches a boolean capability. An example extra-spec value + would be " 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 CapabilityFilter), it is recommended to use the vendor prefix followed