diff options
author | Zuul <zuul@review.opendev.org> | 2019-12-16 14:39:59 +0000 |
---|---|---|
committer | Gerrit Code Review <review@openstack.org> | 2019-12-16 14:39:59 +0000 |
commit | 75f10d81ac632b5d7007faa9721403cf8c666cce (patch) | |
tree | 017cd9c729b62bc86d8d2419a8049bdf4544ab84 /ironic/drivers/modules/redfish/boot.py | |
parent | 2edb84db23e508f80ca6b5919db08ad96ee4735c (diff) | |
parent | 7a7e9689a3c6c85912f3756bab5fc0536ae59f53 (diff) | |
download | ironic-75f10d81ac632b5d7007faa9721403cf8c666cce.tar.gz |
Merge "Implement managed in-band inspection boot for redfish-virtual-media"
Diffstat (limited to 'ironic/drivers/modules/redfish/boot.py')
-rw-r--r-- | ironic/drivers/modules/redfish/boot.py | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/ironic/drivers/modules/redfish/boot.py b/ironic/drivers/modules/redfish/boot.py index 29324c515..2ae75b6aa 100644 --- a/ironic/drivers/modules/redfish/boot.py +++ b/ironic/drivers/modules/redfish/boot.py @@ -639,6 +639,21 @@ class RedfishVirtualMediaBoot(base.BootInterface): if task.driver.storage.should_write_image(task): self._validate_instance_info(task) + def validate_inspection(self, task): + """Validate that the node has required properties for inspection. + + :param task: A TaskManager instance with the node being checked + :raises: MissingParameterValue if node is missing one or more required + parameters + :raises: UnsupportedDriverExtension + """ + try: + self._validate_driver_info(task) + except exception.MissingParameterValue: + # Fall back to non-managed in-band inspection + raise exception.UnsupportedDriverExtension( + driver=task.node.driver, extension='inspection') + def prepare_ramdisk(self, task, ramdisk_params): """Prepares the boot of deploy or rescue ramdisk over virtual media. @@ -663,7 +678,8 @@ class RedfishVirtualMediaBoot(base.BootInterface): # modify the state of the node due to virtual media operations. if node.provision_state not in (states.DEPLOYING, states.CLEANING, - states.RESCUING): + states.RESCUING, + states.INSPECTING): return manager_utils.node_power_action(task, states.POWER_OFF) |