For backward compatibility reasons with the desktop installer
implementation, we now provide a default value (i.e., false) for the new
search_drivers parameter in /source.
Added non-regressions test for it.
Signed-off-by: Olivier Gayot <olivier.gayot@canonical.com>
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>
Example why this matters: if a disk partition is not trying to be
resized, and it's actual size is not an even multiple of what align_up
supports, then it could get a unrequested non-zero size change.
And if there is no supporting gap for that change, then we can get a
size Exception despite not having asked for a resize.
Since we added a search_drivers checkbox that is uncheckd by default,
there is no longer a way for users to install third-party drivers in an
autoinstall context.
We now implement the autoinstall support for source so that users can
specify what value they want for search_drivers.
Futhermore, to be backward compatible with existing autoinstall
configurations, we now make search_drivers default to true in
autoinstall contexts.
Signed-off-by: Olivier Gayot <olivier.gayot@canonical.com>
The search_drivers attribute is set at the source model level, not at
the the drivers model level.
Having said that, by adding its value in the response to GET /drivers,
we can avoid doing multiple HTTP calls in the make_ui function.
Signed-off-by: Olivier Gayot <olivier.gayot@canonical.com>
Before, we would not run answers for the source controller if only one
source was specified. The controller would automatically get marked
configured.
Since we're adding a new "search drivers" option in this screen, we need
to make it interactive in integration tests now.
Signed-off-by: Olivier Gayot <olivier.gayot@canonical.com>
The source screen now includes a checkbox that makes Subiquity search
for third-party drivers in a later stage.
Signed-off-by: Olivier Gayot <olivier.gayot@canonical.com>
In order we place:
* the arguments that are for client & server
* the arguments for the client only
* the arguments for the server only
Signed-off-by: Olivier Gayot <olivier.gayot@canonical.com>