| validate_boot_args | Validate boot arguments. |
| UbootEnv | Represents a U-Boot Environment. |
| UbootEnv.get_boot_order | Gets the boot order specified in the uboot environment. |
| UbootEnv.get_contents | Returns a raw string representation of the uboot environment. |
| UbootEnv.set_boot_order | Sets the boot order specified in the uboot environment. |
Validate boot arguments. Raises a ValueError if the args are invalid.
Represents a U-Boot Environment.
>>> from cxmanage_api.ubootenv import UbootEnv
>>> uboot = UbootEnv()
| Parameters: | contents (string) – UBootEnvironment contnents. |
|---|
Gets the boot order specified in the uboot environment.
>>> uboot.get_boot_order()
['disk', 'pxe']
| Returns: | Boot order for this U-Boot Environment. |
|---|---|
| Return type: | string |
| Raises UnknownBootCmdError: | |
| If a boot command is unrecognized. | |
Returns a raw string representation of the uboot environment.
>>> uboot.get_contents()
'j4·bootcmd_default=run bootcmd_sata; run bootcmd_pxe ... '
>>> #
>>> # Output trimmed for brevity ...
>>> #
| Returns: | Raw string representation of the UBoot Environment. |
|---|---|
| Return type: | string |
Sets the boot order specified in the uboot environment.
>>> uboot.set_boot_order(boot_args=['disk', 'pxe'])
Note
pxe - boot from pxe server
disk - boot from default sata device
diskX - boot from sata device X
diskX:Y - boot from sata device X, partition Y
retry - retry last boot device indefinitely
reset - reset A9
| Parameters: | boot_args (list) – Boot args (boot order). A list of strings. |
|---|---|
| Raises: |
|