Type conversion and validation classes for configuration options.
Use these classes as values for the type argument to oslo_config.cfg.Opt and its subclasses.
Boolean type.
Values are case insensitive and can be set using 1/0, yes/no, true/false or on/off.
Dictionary type.
Dictionary type values are key:value pairs separated by commas. The resulting value is a dictionary of these key/value pairs. Type of dictionary key is always string, but dictionary value type can be customized.
| Parameters: |
|
|---|
Float type.
IP address type
Represents either ipv4 or ipv6. Without specifying version parameter both versions are checked
| Parameters: | version – defines which version should be explicitly checked (4 or 6) |
|---|
Integer type.
Converts value to an integer optionally doing range checking. If value is whitespace or empty string will return None.
| Parameters: |
|
|---|
List type.
Represent values of other (item) type, separated by commas. The resulting value is a list containing those values.
List doesn’t know if item type can also contain commas. To workaround this it tries the following: if the next part fails item validation, it appends comma and next item until validation succeeds or there is no parts left. In the later case it will signal validation error.
| Parameters: |
|
|---|
String type.
String values do not get transformed and are returned as str objects.
| Parameters: |
|
|---|