ironic.conf.types module¶
- class ironic.conf.types.ExplicitAbsolutePath(type_name='explicit absolute path')[source]¶
Bases:
ConfigType
Explicit Absolute path type.
Absolute path values do not get transformed and are returned as strings. They are validated to ensure they are absolute paths and are equal to os.path.abspath(value) – protecting from path traversal issues.
Python path libraries generally define “absolute path” as anything starting with a /, so tools like path.PurePath(str).is_absolute() is not useful, because it will happily return that /tmp/../etc/resolv.conf is absolute. This type is to be used in cases where we require the path to be explicitly absolute.
- Parameters:
type_name – Type name to be used in the sample config file.