From 5669aeb81de472b7b718351c51a98a5af9b61bac Mon Sep 17 00:00:00 2001 From: Paolo Gentili Date: Mon, 8 Jul 2024 15:36:16 +0200 Subject: [PATCH 1/8] Change: autoinstall conf is nullable --- .../devices/zapper_kvm/README.md | 6 +++-- .../devices/zapper_kvm/__init__.py | 10 +++---- .../zapper_kvm/tests/test_zapper_kvm.py | 27 +++++++++++++++++++ docs/reference/device-connector-types.rst | 2 +- 4 files changed, 37 insertions(+), 8 deletions(-) diff --git a/device-connectors/src/testflinger_device_connectors/devices/zapper_kvm/README.md b/device-connectors/src/testflinger_device_connectors/devices/zapper_kvm/README.md index f89ee6f9..bb6506ca 100644 --- a/device-connectors/src/testflinger_device_connectors/devices/zapper_kvm/README.md +++ b/device-connectors/src/testflinger_device_connectors/devices/zapper_kvm/README.md @@ -2,10 +2,12 @@ Zapper-driven provisioning method that makes use of KVM assertions and actions. -## Ubuntu Desktop / Server + +## Autoinstall based Support for vanilla Ubuntu is provided by [autoinstall](https://canonical-subiquity.readthedocs-hosted.com/en/latest/intro-to-autoinstall.html). Supported Ubuntu versions are: +- Core24 - Desktop >= 23.04 - Server >= 20.04 @@ -16,7 +18,7 @@ Unless specified via _autoinstall_ storage filter, the tool will select the larg - __url__: URL to the image to install - __username__: username to configure - __password__: password to configure -- **storage_layout**: can be either `lvm`, `direct`, `zfs` or `hybrid` (Desktop 23.10+) +- **storage_layout**: can be either `lvm`, `direct`, `zfs` or `hybrid` (Core, Desktop 23.10+) - **robot_tasks**: list of Zapper Robot tasks to run after a hard reset in order to follow the `autoinstall` installation - **cmdline_append** (optional): kernel parameters to append at the end of GRUB entry cmdline - **base_user_data** (optional): a custom base user-data file, it should be validated against [this schema](https://canonical-subiquity.readthedocs-hosted.com/en/latest/reference/autoinstall-schema.html) diff --git a/device-connectors/src/testflinger_device_connectors/devices/zapper_kvm/__init__.py b/device-connectors/src/testflinger_device_connectors/devices/zapper_kvm/__init__.py index b60777e6..25e8ecff 100644 --- a/device-connectors/src/testflinger_device_connectors/devices/zapper_kvm/__init__.py +++ b/device-connectors/src/testflinger_device_connectors/devices/zapper_kvm/__init__.py @@ -17,7 +17,7 @@ import logging import os import subprocess -from typing import Any, Dict, Tuple +from typing import Any, Dict, Optional, Tuple from testflinger_device_connectors.devices import ProvisioningError from testflinger_device_connectors.devices.zapper import ZapperConnector @@ -36,14 +36,14 @@ class DeviceConnector(ZapperConnector): PROVISION_METHOD = "ProvisioningKVM" - def _get_autoinstall_conf(self) -> Dict[str, Any]: + def _get_autoinstall_conf(self) -> Optional[Dict[str, Any]]: """Prepare autoinstall-related configuration.""" provision = self.job_data["provision_data"] - autoinstall_conf = { - "storage_layout": provision.get("storage_layout", "lvm"), - } + if "storage_layout" not in provision: + return None + autoinstall_conf = {"storage_layout": provision["storage_layout"]} if "base_user_data" in provision: autoinstall_conf["base_user_data"] = provision["base_user_data"] diff --git a/device-connectors/src/testflinger_device_connectors/devices/zapper_kvm/tests/test_zapper_kvm.py b/device-connectors/src/testflinger_device_connectors/devices/zapper_kvm/tests/test_zapper_kvm.py index fbf67673..629b683c 100644 --- a/device-connectors/src/testflinger_device_connectors/devices/zapper_kvm/tests/test_zapper_kvm.py +++ b/device-connectors/src/testflinger_device_connectors/devices/zapper_kvm/tests/test_zapper_kvm.py @@ -165,6 +165,33 @@ def test_validate_configuration_alloem(self): self.assertEqual(args, ()) self.assertDictEqual(kwargs, expected) + def test_get_autoinstall_none(self): + """ + Test whether the get_autoinstall_conf function returns + None in case the storage_layout is not specified. + """ + + connector = DeviceConnector() + connector.job_data = { + "job_queue": "queue", + "provision_data": { + "url": "http://example.com/image.iso", + "robot_tasks": [ + "job.robot", + "another.robot", + ], + }, + "test_data": { + "test_username": "username", + "test_password": "password", + }, + } + + with patch("builtins.open", mock_open(read_data="mykey")): + conf = connector._get_autoinstall_conf() + + self.assertIsNone(conf) + def test_get_autoinstall_conf(self): """ Test whether the get_autoinstall_conf function returns diff --git a/docs/reference/device-connector-types.rst b/docs/reference/device-connector-types.rst index 77281c52..70725267 100644 --- a/docs/reference/device-connector-types.rst +++ b/docs/reference/device-connector-types.rst @@ -284,7 +284,7 @@ The ``zapper_kvm`` device connector, depending on the target image, supports the path from the ``robot/snippets`` path in the Zapper repository. * - ``storage_layout`` - When provisioning an image supporting *autoinstall*, the storage_layout can - be either ``lvm`` (default), ``direct``, ``zfs`` or ``hybrid`` (Desktop 23.10+) + be either ``lvm`` (default), ``direct``, ``zfs`` or ``hybrid`` (Core, Desktop 23.10+) * - ``cmdline_append`` - When provisioning an image supporting *autoinstall*, the cmdline_append can be used to append Kernel parameters to the standard GRUB entry. From eb5a796ed30fdd3bb385286f31d55f12ba5b7213 Mon Sep 17 00:00:00 2001 From: Paolo Gentili Date: Mon, 8 Jul 2024 15:37:04 +0200 Subject: [PATCH 2/8] Add: support for 'provisioning' a live ISO --- .../devices/zapper_kvm/README.md | 10 ++++++++ .../devices/zapper_kvm/__init__.py | 24 +++++++++++++------ .../zapper_kvm/tests/test_zapper_kvm.py | 8 +++---- docs/reference/device-connector-types.rst | 17 +++++++++++++ 4 files changed, 48 insertions(+), 11 deletions(-) diff --git a/device-connectors/src/testflinger_device_connectors/devices/zapper_kvm/README.md b/device-connectors/src/testflinger_device_connectors/devices/zapper_kvm/README.md index bb6506ca..e0ccdf1c 100644 --- a/device-connectors/src/testflinger_device_connectors/devices/zapper_kvm/README.md +++ b/device-connectors/src/testflinger_device_connectors/devices/zapper_kvm/README.md @@ -48,3 +48,13 @@ The tool will select the storage device with the following priority: ### Noble Ubuntu OEM 24.04 uses `autoinstall`. The procedure and the arguments are the same as _vanilla_ Ubuntu. + +## Live ISO + +Support for live ISOs is simply performed booting from an external storage device and returning. + +### Job parameters + +- __boot_from_ext_media__: should be set to "true" +- __wait_until_ssh__: SSH assertion at the end of provisioning can be skipped, in case the live ISO does not include an SSH server + diff --git a/device-connectors/src/testflinger_device_connectors/devices/zapper_kvm/__init__.py b/device-connectors/src/testflinger_device_connectors/devices/zapper_kvm/__init__.py index 25e8ecff..4cdbad30 100644 --- a/device-connectors/src/testflinger_device_connectors/devices/zapper_kvm/__init__.py +++ b/device-connectors/src/testflinger_device_connectors/devices/zapper_kvm/__init__.py @@ -81,19 +81,29 @@ def _validate_configuration( "url": url, "username": username, "password": password, + "robot_retries": retries, "autoinstall_conf": self._get_autoinstall_conf(), "reboot_script": self.config["reboot_script"], "device_ip": self.config["device_ip"], "robot_tasks": self.job_data["provision_data"]["robot_tasks"], - "robot_retries": retries, - "cmdline_append": self.job_data["provision_data"].get( - "cmdline_append", "" - ), - "skip_download": self.job_data["provision_data"].get( - "skip_download", False - ), } + # Let's handle defaults on the Zapper side adding only the explicitely + # specified keys to the `provision_data` dict. + optionals = [ + "cmdline_append", + "skip_download", + "wait_until_ssh", + "boot_from_ext_media", + ] + provisioning_data.update( + { + opt: self.job_data["provision_data"][opt] + for opt in optionals + if opt in self.job_data["provision_data"] + } + ) + return ((), provisioning_data) def _post_run_actions(self, args): diff --git a/device-connectors/src/testflinger_device_connectors/devices/zapper_kvm/tests/test_zapper_kvm.py b/device-connectors/src/testflinger_device_connectors/devices/zapper_kvm/tests/test_zapper_kvm.py index 629b683c..136ff2e9 100644 --- a/device-connectors/src/testflinger_device_connectors/devices/zapper_kvm/tests/test_zapper_kvm.py +++ b/device-connectors/src/testflinger_device_connectors/devices/zapper_kvm/tests/test_zapper_kvm.py @@ -59,8 +59,6 @@ def test_validate_configuration(self): "device_ip": "1.1.1.1", "robot_tasks": ["job.robot", "another.robot"], "robot_retries": 1, - "cmdline_append": "", - "skip_download": False, } self.assertEqual(args, ()) self.assertDictEqual(kwargs, expected) @@ -90,6 +88,8 @@ def test_validate_configuration_w_opt(self): "robot_retries": 3, "cmdline_append": "more arguments", "skip_download": True, + "wait_until_ssh": True, + "boot_from_ext_media": False, }, "test_data": { "test_username": "username", @@ -111,6 +111,8 @@ def test_validate_configuration_w_opt(self): "robot_retries": 3, "cmdline_append": "more arguments", "skip_download": True, + "wait_until_ssh": True, + "boot_from_ext_media": False, } self.assertEqual(args, ()) self.assertDictEqual(kwargs, expected) @@ -159,8 +161,6 @@ def test_validate_configuration_alloem(self): "device_ip": "1.1.1.1", "robot_tasks": ["job.robot", "another.robot"], "robot_retries": 2, - "cmdline_append": "", - "skip_download": False, } self.assertEqual(args, ()) self.assertDictEqual(kwargs, expected) diff --git a/docs/reference/device-connector-types.rst b/docs/reference/device-connector-types.rst index 70725267..a0c4e1dd 100644 --- a/docs/reference/device-connector-types.rst +++ b/docs/reference/device-connector-types.rst @@ -314,3 +314,20 @@ The ``zapper_kvm`` device connector, depending on the target image, supports the * - ``oem`` - Optional value to select the ``oemscript`` to run when specifying a ``url``, possible values are ``dell``, ``hp`` and ``lenovo``. + +.. list-table:: Supported ``provision_data`` keys for ``zapper_kvm`` with target any generic live ISOs + :header-rows: 1 + + * - Key + - Description + * - ``url`` + - URL to a disk image that is downloaded and flashed to a USB storage device, + which will be used to boot up the DUT. + * - ``robot_tasks`` + - List of Zapper/Robot snippets to run in sequence after the USB storage device + is plugged into the DUT and the system restarted. The snippet ID is the relative + path from the ``robot/snippets`` path in the Zapper repository. + * - ``boot_from_ext_media`` + - keeps the external storage device connected, booting from there. It should be flagged as `true` for live ISOs. + * - ``wait_until_ssh`` + - if `true`, skip the attempt to connect via SSH at the end of provisionig, useful in case the live ISO does not include a SSH server From 15c0bb7c657602be1c7e7f6e459426d8ca65ee0a Mon Sep 17 00:00:00 2001 From: Paolo Gentili Date: Mon, 8 Jul 2024 15:42:28 +0200 Subject: [PATCH 3/8] Fix: spelling --- docs/.wordlist.txt | 1 + docs/reference/device-connector-types.rst | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/docs/.wordlist.txt b/docs/.wordlist.txt index bf6f5044..33906e99 100644 --- a/docs/.wordlist.txt +++ b/docs/.wordlist.txt @@ -26,6 +26,7 @@ Git GitHub Grafana IAM +ISOs init installable Instantiation diff --git a/docs/reference/device-connector-types.rst b/docs/reference/device-connector-types.rst index a0c4e1dd..f5265412 100644 --- a/docs/reference/device-connector-types.rst +++ b/docs/reference/device-connector-types.rst @@ -330,4 +330,4 @@ The ``zapper_kvm`` device connector, depending on the target image, supports the * - ``boot_from_ext_media`` - keeps the external storage device connected, booting from there. It should be flagged as `true` for live ISOs. * - ``wait_until_ssh`` - - if `true`, skip the attempt to connect via SSH at the end of provisionig, useful in case the live ISO does not include a SSH server + - if `true`, skip the attempt to connect via SSH at the end of provisioning, useful in case the live ISO does not include a SSH server From 9d2c985a36da3ea3e46beb37cb58f3d49056d35f Mon Sep 17 00:00:00 2001 From: Paolo Gentili Date: Mon, 22 Jul 2024 09:15:46 +0200 Subject: [PATCH 4/8] experimental label for Core --- .../testflinger_device_connectors/devices/zapper_kvm/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/device-connectors/src/testflinger_device_connectors/devices/zapper_kvm/README.md b/device-connectors/src/testflinger_device_connectors/devices/zapper_kvm/README.md index e0ccdf1c..72125ee3 100644 --- a/device-connectors/src/testflinger_device_connectors/devices/zapper_kvm/README.md +++ b/device-connectors/src/testflinger_device_connectors/devices/zapper_kvm/README.md @@ -7,7 +7,7 @@ Zapper-driven provisioning method that makes use of KVM assertions and actions. Support for vanilla Ubuntu is provided by [autoinstall](https://canonical-subiquity.readthedocs-hosted.com/en/latest/intro-to-autoinstall.html). Supported Ubuntu versions are: -- Core24 +- Core24 (experimental) - Desktop >= 23.04 - Server >= 20.04 From e22e4113f820d5ed7d9650362d23cfae5c621a75 Mon Sep 17 00:00:00 2001 From: Paolo Gentili Date: Fri, 26 Jul 2024 13:22:52 +0200 Subject: [PATCH 5/8] Fix: provision arguments description for clearness --- .../devices/zapper_kvm/README.md | 6 +++--- docs/reference/device-connector-types.rst | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/device-connectors/src/testflinger_device_connectors/devices/zapper_kvm/README.md b/device-connectors/src/testflinger_device_connectors/devices/zapper_kvm/README.md index 72125ee3..d2a4738c 100644 --- a/device-connectors/src/testflinger_device_connectors/devices/zapper_kvm/README.md +++ b/device-connectors/src/testflinger_device_connectors/devices/zapper_kvm/README.md @@ -51,10 +51,10 @@ Ubuntu OEM 24.04 uses `autoinstall`. The procedure and the arguments are the sam ## Live ISO -Support for live ISOs is simply performed booting from an external storage device and returning. +Support for live ISOs is simply performed booting from an external storage device and returning right after KVM interactions. ### Job parameters -- __boot_from_ext_media__: should be set to "true" -- __wait_until_ssh__: SSH assertion at the end of provisioning can be skipped, in case the live ISO does not include an SSH server +- __boot_from_ext_media__: Set to "true" to ensure that the Zapper considers the provision process complete at the end of KVM interactions, without needing to unplug the external media. +- __wait_until_ssh__: If set to "true", the Zapper will skip the SSH connection attempt, which is normally performed at the end of provisioning as a form of boot assertion. This is primarily useful in cases where the live ISO does not include an SSH server. diff --git a/docs/reference/device-connector-types.rst b/docs/reference/device-connector-types.rst index f5265412..bb799e87 100644 --- a/docs/reference/device-connector-types.rst +++ b/docs/reference/device-connector-types.rst @@ -328,6 +328,6 @@ The ``zapper_kvm`` device connector, depending on the target image, supports the is plugged into the DUT and the system restarted. The snippet ID is the relative path from the ``robot/snippets`` path in the Zapper repository. * - ``boot_from_ext_media`` - - keeps the external storage device connected, booting from there. It should be flagged as `true` for live ISOs. + - Set to "true" to ensure that the Zapper considers the provision process complete at the end of KVM interactions, without needing to unplug the external media. * - ``wait_until_ssh`` - - if `true`, skip the attempt to connect via SSH at the end of provisioning, useful in case the live ISO does not include a SSH server + - If set to "true", the Zapper will skip the SSH connection attempt, which is normally performed at the end of provisioning as a form of boot assertion. This is primarily useful in cases where the live ISO does not include an SSH server. From 258ea76b64e804994d6b909b6125d9a0b064dcfb Mon Sep 17 00:00:00 2001 From: Paolo Gentili Date: Tue, 30 Jul 2024 15:26:02 +0200 Subject: [PATCH 6/8] addressing PR comments --- .../devices/zapper_kvm/README.md | 2 +- .../devices/zapper_kvm/__init__.py | 2 +- docs/reference/device-connector-types.rst | 6 +++--- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/device-connectors/src/testflinger_device_connectors/devices/zapper_kvm/README.md b/device-connectors/src/testflinger_device_connectors/devices/zapper_kvm/README.md index d2a4738c..2a2e9cf2 100644 --- a/device-connectors/src/testflinger_device_connectors/devices/zapper_kvm/README.md +++ b/device-connectors/src/testflinger_device_connectors/devices/zapper_kvm/README.md @@ -55,6 +55,6 @@ Support for live ISOs is simply performed booting from an external storage devic ### Job parameters -- __boot_from_ext_media__: Set to "true" to ensure that the Zapper considers the provision process complete at the end of KVM interactions, without needing to unplug the external media. +- __boot_from_ext_media__: Set to "true" to ensure that the Zapper considers the provision process complete at the end of KVM interactions defined by the specified `robot_tasks`, without needing to unplug the external media. - __wait_until_ssh__: If set to "true", the Zapper will skip the SSH connection attempt, which is normally performed at the end of provisioning as a form of boot assertion. This is primarily useful in cases where the live ISO does not include an SSH server. diff --git a/device-connectors/src/testflinger_device_connectors/devices/zapper_kvm/__init__.py b/device-connectors/src/testflinger_device_connectors/devices/zapper_kvm/__init__.py index 4cdbad30..efc22c62 100644 --- a/device-connectors/src/testflinger_device_connectors/devices/zapper_kvm/__init__.py +++ b/device-connectors/src/testflinger_device_connectors/devices/zapper_kvm/__init__.py @@ -88,7 +88,7 @@ def _validate_configuration( "robot_tasks": self.job_data["provision_data"]["robot_tasks"], } - # Let's handle defaults on the Zapper side adding only the explicitely + # Let's handle defaults on the Zapper side adding only the explicitly # specified keys to the `provision_data` dict. optionals = [ "cmdline_append", diff --git a/docs/reference/device-connector-types.rst b/docs/reference/device-connector-types.rst index bb799e87..8b40c56f 100644 --- a/docs/reference/device-connector-types.rst +++ b/docs/reference/device-connector-types.rst @@ -322,12 +322,12 @@ The ``zapper_kvm`` device connector, depending on the target image, supports the - Description * - ``url`` - URL to a disk image that is downloaded and flashed to a USB storage device, - which will be used to boot up the DUT. + which the DUT will then boot from. * - ``robot_tasks`` - - List of Zapper/Robot snippets to run in sequence after the USB storage device + - List of Robot snippets to run in sequence after the USB storage device is plugged into the DUT and the system restarted. The snippet ID is the relative path from the ``robot/snippets`` path in the Zapper repository. * - ``boot_from_ext_media`` - - Set to "true" to ensure that the Zapper considers the provision process complete at the end of KVM interactions, without needing to unplug the external media. + - Set to "true" to ensure that the Zapper considers the provision process complete at the end of KVM interactions defined by the specified `robot_tasks`, without needing to unplug the external media. * - ``wait_until_ssh`` - If set to "true", the Zapper will skip the SSH connection attempt, which is normally performed at the end of provisioning as a form of boot assertion. This is primarily useful in cases where the live ISO does not include an SSH server. From 01f8e77e65f7871fcdd2ced28cbb7cbbc0db56c8 Mon Sep 17 00:00:00 2001 From: Paolo Gentili Date: Tue, 30 Jul 2024 17:58:37 +0200 Subject: [PATCH 7/8] fix false/true mistake in comment --- .../testflinger_device_connectors/devices/zapper_kvm/README.md | 2 +- docs/reference/device-connector-types.rst | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/device-connectors/src/testflinger_device_connectors/devices/zapper_kvm/README.md b/device-connectors/src/testflinger_device_connectors/devices/zapper_kvm/README.md index 2a2e9cf2..8c55b2f4 100644 --- a/device-connectors/src/testflinger_device_connectors/devices/zapper_kvm/README.md +++ b/device-connectors/src/testflinger_device_connectors/devices/zapper_kvm/README.md @@ -56,5 +56,5 @@ Support for live ISOs is simply performed booting from an external storage devic ### Job parameters - __boot_from_ext_media__: Set to "true" to ensure that the Zapper considers the provision process complete at the end of KVM interactions defined by the specified `robot_tasks`, without needing to unplug the external media. -- __wait_until_ssh__: If set to "true", the Zapper will skip the SSH connection attempt, which is normally performed at the end of provisioning as a form of boot assertion. This is primarily useful in cases where the live ISO does not include an SSH server. +- __wait_until_ssh__: If set to "false", the Zapper will skip the SSH connection attempt, which is normally performed at the end of provisioning as a form of boot assertion. This is primarily useful in cases where the live ISO does not include an SSH server. diff --git a/docs/reference/device-connector-types.rst b/docs/reference/device-connector-types.rst index 8b40c56f..83e6bbb3 100644 --- a/docs/reference/device-connector-types.rst +++ b/docs/reference/device-connector-types.rst @@ -330,4 +330,4 @@ The ``zapper_kvm`` device connector, depending on the target image, supports the * - ``boot_from_ext_media`` - Set to "true" to ensure that the Zapper considers the provision process complete at the end of KVM interactions defined by the specified `robot_tasks`, without needing to unplug the external media. * - ``wait_until_ssh`` - - If set to "true", the Zapper will skip the SSH connection attempt, which is normally performed at the end of provisioning as a form of boot assertion. This is primarily useful in cases where the live ISO does not include an SSH server. + - If set to "false", the Zapper will skip the SSH connection attempt, which is normally performed at the end of provisioning as a form of boot assertion. This is primarily useful in cases where the live ISO does not include an SSH server. From 22778307893ad7182f8d2e36502b2eb015f49480 Mon Sep 17 00:00:00 2001 From: Paolo Gentili Date: Wed, 31 Jul 2024 08:40:15 +0200 Subject: [PATCH 8/8] Change: renamed arg to 'live_image' --- .../devices/zapper_kvm/README.md | 2 +- .../devices/zapper_kvm/__init__.py | 2 +- .../devices/zapper_kvm/tests/test_zapper_kvm.py | 4 ++-- docs/reference/device-connector-types.rst | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/device-connectors/src/testflinger_device_connectors/devices/zapper_kvm/README.md b/device-connectors/src/testflinger_device_connectors/devices/zapper_kvm/README.md index 8c55b2f4..0329a19a 100644 --- a/device-connectors/src/testflinger_device_connectors/devices/zapper_kvm/README.md +++ b/device-connectors/src/testflinger_device_connectors/devices/zapper_kvm/README.md @@ -55,6 +55,6 @@ Support for live ISOs is simply performed booting from an external storage devic ### Job parameters -- __boot_from_ext_media__: Set to "true" to ensure that the Zapper considers the provision process complete at the end of KVM interactions defined by the specified `robot_tasks`, without needing to unplug the external media. +- __live_image__: Set to "true" to ensure that the Zapper considers the provision process complete at the end of KVM interactions defined by the specified `robot_tasks`, without needing to unplug the external media. - __wait_until_ssh__: If set to "false", the Zapper will skip the SSH connection attempt, which is normally performed at the end of provisioning as a form of boot assertion. This is primarily useful in cases where the live ISO does not include an SSH server. diff --git a/device-connectors/src/testflinger_device_connectors/devices/zapper_kvm/__init__.py b/device-connectors/src/testflinger_device_connectors/devices/zapper_kvm/__init__.py index efc22c62..9f74b814 100644 --- a/device-connectors/src/testflinger_device_connectors/devices/zapper_kvm/__init__.py +++ b/device-connectors/src/testflinger_device_connectors/devices/zapper_kvm/__init__.py @@ -94,7 +94,7 @@ def _validate_configuration( "cmdline_append", "skip_download", "wait_until_ssh", - "boot_from_ext_media", + "live_image", ] provisioning_data.update( { diff --git a/device-connectors/src/testflinger_device_connectors/devices/zapper_kvm/tests/test_zapper_kvm.py b/device-connectors/src/testflinger_device_connectors/devices/zapper_kvm/tests/test_zapper_kvm.py index 136ff2e9..eae54a22 100644 --- a/device-connectors/src/testflinger_device_connectors/devices/zapper_kvm/tests/test_zapper_kvm.py +++ b/device-connectors/src/testflinger_device_connectors/devices/zapper_kvm/tests/test_zapper_kvm.py @@ -89,7 +89,7 @@ def test_validate_configuration_w_opt(self): "cmdline_append": "more arguments", "skip_download": True, "wait_until_ssh": True, - "boot_from_ext_media": False, + "live_image": False, }, "test_data": { "test_username": "username", @@ -112,7 +112,7 @@ def test_validate_configuration_w_opt(self): "cmdline_append": "more arguments", "skip_download": True, "wait_until_ssh": True, - "boot_from_ext_media": False, + "live_image": False, } self.assertEqual(args, ()) self.assertDictEqual(kwargs, expected) diff --git a/docs/reference/device-connector-types.rst b/docs/reference/device-connector-types.rst index 83e6bbb3..b8828ed0 100644 --- a/docs/reference/device-connector-types.rst +++ b/docs/reference/device-connector-types.rst @@ -327,7 +327,7 @@ The ``zapper_kvm`` device connector, depending on the target image, supports the - List of Robot snippets to run in sequence after the USB storage device is plugged into the DUT and the system restarted. The snippet ID is the relative path from the ``robot/snippets`` path in the Zapper repository. - * - ``boot_from_ext_media`` + * - ``live_image`` - Set to "true" to ensure that the Zapper considers the provision process complete at the end of KVM interactions defined by the specified `robot_tasks`, without needing to unplug the external media. * - ``wait_until_ssh`` - If set to "false", the Zapper will skip the SSH connection attempt, which is normally performed at the end of provisioning as a form of boot assertion. This is primarily useful in cases where the live ISO does not include an SSH server.