diff --git a/device-connectors/src/testflinger_device_connectors/devices/oemrecovery/oemrecovery.py b/device-connectors/src/testflinger_device_connectors/devices/oemrecovery/oemrecovery.py index f698597c..5c81c3b7 100644 --- a/device-connectors/src/testflinger_device_connectors/devices/oemrecovery/oemrecovery.py +++ b/device-connectors/src/testflinger_device_connectors/devices/oemrecovery/oemrecovery.py @@ -184,9 +184,19 @@ def copy_ssh_id(self): def check_device_booted(self): """Check to see if the device is booted and reachable with ssh""" logger.info("Checking to see if the device is available.") + try: + boot_timeout = self.job_data.get("provision_data", {}).get( + "boot_timeout", 3600 + ) + except AttributeError: + boot_timeout = 3600 + finally: + if boot_timeout < 600: + boot_timeout = 600 + started = time.time() # Wait for provisioning to complete - can take a very long time - while time.time() - started < 3600: + while time.time() - started < boot_timeout: try: time.sleep(90) if ( diff --git a/docs/reference/device-connector-types.rst b/docs/reference/device-connector-types.rst index 77281c52..c95510de 100644 --- a/docs/reference/device-connector-types.rst +++ b/docs/reference/device-connector-types.rst @@ -202,12 +202,16 @@ ensure that the system is reachable with ssh before proceeding to the next step. oemrecovery ----------- -The ``oemrecovery`` device connector does not support any ``provision_data`` keys. -Instead, this device connector uses a preconfigured command to reset the device back -to its original state. In order to ensure that the provision step is run, and the -system is reset back to the original state, you can specify any key in this dictionary -(example: ``skip: false``). If you do not want the provision step to run, you can -simply leave out the ``provision_data`` section. +The ``oemrecovery`` device connector supports the following ``provision_data`` keys: + +.. list-table:: Supported ``provision_data`` keys for ``oemrecovery`` + :header-rows: 1 + + * - Key + - Description + * - ``boot_timeout`` + - A timeout value that waiting for device recovered from reset. The default timeout is + 3600(s) and the minimum value should be greater than 600(s). .. _dell_oemscript: