ironic.common.kernel_parameters module¶
- class ironic.common.kernel_parameters.KernelCommandLine(parameters, init_args)[source]¶
Bases:
objectRepresents a kernel command line.
NOTE: An instantiated object of this type does not guarantee that it has passed parsing via KernelParameterParser. ParsedKernelCommandLine is reserved for this distinction.
- init_args¶
- parameters¶
- class ironic.common.kernel_parameters.KernelParameter(key: ironic.common.kernel_parameters.ParameterKey, value: ironic.common.kernel_parameters.ParameterValue)[source]¶
Bases:
object- key¶
- value¶
- class ironic.common.kernel_parameters.KernelParameterTransformer(visit_tokens=True)[source]¶
Bases:
Transformer
- class ironic.common.kernel_parameters.ParsedKernelCommandLine(parameters, init_args)[source]¶
Bases:
KernelCommandLineRepresents a parsed kernel command line.
NOTE: This object should only be instantiated via passing a kernel command line string through KernelParameterParser.parse() and then the resultant parse tree through KernelParameterTransformer.transform().
This helps distinguish between kernel command lines that have been validated by parsing and those that have not.
- ironic.common.kernel_parameters.sanitize_kernel_command_line(command_line)[source]¶
Applies filtering to a command line to sanitize it.
NOTE: This does not guarantee a correct or safe kernel command line, for stronger guarantees of correctness and safety use KernelCommandLine.parse().
- Parameters:
command_line – A string containing a kernel command line or individual parameters.
- Returns:
A filtered string which should be safer for use.