subiquity/scripts
Olivier Gayot e58d1d00c2 kvm-test: introduce ability to pass -nic options to QEMU
The only way we had to pass -nic options to QEMU was to specify the
number of networks using the --nets option. Depending on its value, the
option would instruct QEMU to:
 * instantiate *n* user host networks if --nets >= 1
 * instantiate no network if --nets is 0
 * instantiate a "dead" network if --nets < 0

To simulate more advanced networks (such as networks where HTTP proxy is
needed), we want to add the possibility to use TAP network interfaces.

This patch adds the ability to pass custom -nic options to QEMU.

Three new options are available:

 * The --nic option passes the argument as-is to QEMU -nic option
 * The --nic-user option passes a user host network -nic option to QEMU
   - with SSH forwarding enabled. This is just like we do when using the
     --nets >= 1 option)
 * The --net-tap takes the name of an existing tap interface and
   generates the following -nic argument:

    tap,id={ifname},ifname={ifname},script=no,downscript=no,model=e1000

In the example below:
 * the first network uses the tap0 interface.
 * the second network uses the tap1 interface (it is syntactically
   equivalent to the first one)
 * the third network uses a user host network (with SSH forwarding)

  $ kvm-test.py \
    --nic tap,id=tap0,ifname=tap0,script=no,downscript=no,model=e1000 \
    --nic-tap tap1 \
    --nic-user

Signed-off-by: Olivier Gayot <olivier.gayot@canonical.com>
2022-04-28 14:48:51 +02:00
..
check-yaml-fields.py add test of mount options being propagated 2021-04-06 09:16:55 +12:00
inject-subiquity-snap.sh use livefs-editor to make customized isos 2021-07-19 14:44:27 +12:00
installdeps.sh aptdeps: move to external file 2022-03-04 10:49:23 -07:00
kvm-test.py kvm-test: introduce ability to pass -nic options to QEMU 2022-04-28 14:48:51 +02:00
make-edge-iso.sh use livefs-editor to make customized isos 2021-07-19 14:44:27 +12:00
make-kbd-info.py pre-process keyboard auto detection steps into API friendly format 2021-03-16 16:02:23 +13:00
make-language-lists put a full locale (language/location/codeset) in languagelist 2021-02-12 15:03:10 +13:00
pc105.py pre-process keyboard auto detection steps into API friendly format 2021-03-16 16:02:23 +13:00
quick-test-this-branch.sh update quick-test-this-branch.sh too 2021-07-21 10:42:25 +12:00
raid-size-tests.py changes suggested in review 2019-11-08 09:47:34 +13:00
replay-curtin-log.py have replayed curtin runs create a log file too 2019-11-21 14:55:23 +13:00
runtests.sh source: run answers when only one source is configured 2022-04-26 13:43:47 +02:00
slimy-update-snap.sh slimy: python 3.8 2021-10-05 12:27:47 -06:00
test-in-lxd.sh Less likely to conflict with existing containers. 2021-11-09 18:20:41 -03:00
test-this-branch.sh Make sure test-this-branch.sh exits if distro-info is not installed 2022-01-04 17:38:43 +01:00
update-part.py unset GIT_DIR in update-part.py 2021-08-19 17:12:16 +12:00
update-translations.sh i18n: add scripts to help with translation updates. 2020-05-06 13:22:13 +01:00
validate-autoinstall-user-data.py Add script to validate autoinstall data against JSON schema 2022-01-21 13:48:43 +01:00
validate-yaml.py fixing swap path + support partition size units 2022-02-28 13:00:13 -07:00
zdev-generate.py Update zdev-generate.py 2021-09-25 20:09:54 +02:00