ironic.drivers.modules.boot_mode_utils.
get_boot_mode_for_deploy
(node)[source]¶Returns the boot mode that would be used for deploy.
This method returns boot mode to be used for deploy. It returns ‘uefi’ if ‘secure_boot’ is set to ‘true’ or returns ‘bios’ if ‘trusted_boot’ is set to ‘true’ in ‘instance_info/capabilities’ of node. Otherwise it returns value of ‘boot_mode’ in ‘properties/capabilities’ of node if set. If that is not set, it returns boot mode in ‘internal_driver_info/deploy_boot_mode’ for the node. If that is not set, it returns boot mode in ‘instance_info/deploy_boot_mode’ for the node. It would return None if boot mode is present neither in ‘capabilities’ of node ‘properties’ nor in node’s ‘internal_driver_info’ nor in node’s ‘instance_info’ (which could also be None).
Parameters: | node – an ironic node object. |
---|---|
Returns: | ‘bios’, ‘uefi’ or None |
Raises: | InvalidParameterValue, if the node boot mode disagrees with the boot mode set to node properties/capabilities |
ironic.drivers.modules.boot_mode_utils.
is_secure_boot_requested
(node)[source]¶Returns True if secure_boot is requested for deploy.
This method checks node property for secure_boot and returns True if it is requested.
Parameters: | node – a single Node. |
---|---|
Raises: | InvalidParameterValue if the capabilities string is not a dictionary or is malformed. |
Returns: | True if secure_boot is requested. |
ironic.drivers.modules.boot_mode_utils.
is_trusted_boot_requested
(node)[source]¶Returns True if trusted_boot is requested for deploy.
This method checks instance property for trusted_boot and returns True if it is requested.
Parameters: | node – a single Node. |
---|---|
Raises: | InvalidParameterValue if the capabilities string is not a dictionary or is malformed. |
Returns: | True if trusted_boot is requested. |
ironic.drivers.modules.boot_mode_utils.
sync_boot_mode
(task)[source]¶Set node’s boot mode from bare metal configuration
Attempt to read currently set boot mode off the bare metal machine. Also read node’s boot mode configuration:
In the end, the new boot mode may be set in ‘driver_internal_info/deploy_boot_mode’.
Parameters: | task – a task object |
---|
Except where otherwise noted, this document is licensed under Creative Commons Attribution 3.0 License. See all OpenStack Legal Documents.