When the list of model names is empty it was implicitly casted to a dict
but a set() was required for concatenation.
Co-authored-by: Didier Roche <didrocks@ubuntu.com>
Current variant and supported one were hardcoded and not extensible.
This makes it configurable per application.
Co-authored-by: Didier Roche <didrocks@ubuntu.com>
Load all the server controller independently whether it is in first
configuration or reconfiguration mode.
Co-authored-by: Didier Roche <didrocks@ubuntu.com>
The previous composition version had some flaws due to multiple
instances of a given Field with different addresses when reinstalled in
the parent class. This caused the field validation validate_ to not work
as it was not taken the expected referenced values.
Instead of duplicating the code, we use an inherited version, taking and
overriding only our desired fields.
We still need to derive WSLIdentityView from the base class instead of
IdentityView, as this is what is instantiating the form.
(WSLIdentityForm instead of IdentityForm).
Co-authored-by: Jean-Baptiste Lallement <jean-baptiste@ubuntu.com>
The previous composition version had some flaws due to multiple
instances of a given Field with different addresses when reinstalled in
the parent class. This caused the field validation validate_ to not work
as it was not taken the expected referenced values.
Instead of duplicating the code, we use an inherited version, taking and
overriding only our desired fields.
We still need to derive WSLIdentityView from the base class instead of
IdentityView, as this is what is instantiating the form.
(WSLIdentityForm instead of IdentityForm).
Co-authored-by: Jean-Baptiste Lallement <jean-baptiste@ubuntu.com>
This class declares the controllers we want to use and consequently,
which views in which orders we present to the user.
Reuse the Welcome controller from subiquity by reimporting it in
system_setup.client.controllers.
Redefine the restart functionality to not depends on snap.
This controller and view inherits from the subiquity identity, but
remove the "hostname" field. We are using composition over inheritance
for identityController as the UI builder is basing on the order of
declared elements as class variable and we can’t override that in the
metaclass when inheriting.