Can be mocked. In dry-run reads it from resource_path.
In live run, reads it from self.app.base_model.target.
The returning set of usernames may be empty without a problem.
- system_reserved_names populated from a reserved-names file.
- subiquity.server.IdentityController loads it on init.
- validation compares the submitted against it.
- also checks if exists on passwd database.
The console font now embeds a representation of the circled white star.
The glyph is based on 9x15.bdf from console-setup.
Unfortunately, our font expects glyphs of width 8 so I chopped off the
first column of points from the glyph.
Signed-off-by: Olivier Gayot <olivier.gayot@canonical.com>
We used to rely on the narrow non-breakable space to be displayed as a
star in basic mode. This is not great and could impact other screens.
We now make use of two check-marks (each replaced by a star in basic
mode) and mask one of them in rich mode using display attributes.
Signed-off-by: Olivier Gayot <olivier.gayot@canonical.com>
The "**" signs replace the check-mark for a verified publisher when in
basic mode.
These "**" signs where still used green foreground color. This was the
only place where we tried to display colors in basic mode.
Keep the default colors instead. This should be more compatible.
Signed-off-by: Olivier Gayot <olivier.gayot@canonical.com>
In addition to verified publishers being indicated by a check-mark, we
now have starred publishers indicated with a circled star.
If unicode support is not available, for instance with serial
connections, we use a different number of stars to represent:
* verified publishers: 2 stars
* starred publishers: 1 star
* others: no star
Because our mechanism to substitute unicode characters with ascii
equivalents expect a 1:1 mapping, we cannot simply replace the circled
start by two stars. To workaround the issue, we added a narrow
non-breakable space.
When support of unicode is available, this character shows up as a
normal space.
When support of unicode is not available, it gets replaced by a star.
Signed-off-by: Olivier Gayot <olivier.gayot@canonical.com>
In order to fix a screen not refreshing issue, the following patch
changed the return type of make_ui from an object to a callable in the
storage controller:
414a2235 storage: fix screen sometimes not refreshing after slow probing
The storage controller is the only one that reuses its make_ui()
coroutine internally. Unfortunately, the code that calls await make_ui()
was not updated in the storage controller.
Signed-off-by: Olivier Gayot <olivier.gayot@canonical.com>
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>