Commit Graph

13 Commits

Author SHA1 Message Date
Olivier Gayot e9b2e24b1a Rename UbuntuAdvantage -> UbuntuPro but keep autoinstall compat
Signed-off-by: Olivier Gayot <olivier.gayot@canonical.com>
2022-03-15 11:50:57 +01:00
Olivier Gayot 43f71a02be Improve autoinstall schema for third-party drivers
The autoinstall data for the drivers was only constituted of a boolean,
e.g.:

  drivers: true

or

  drivers: false

It was not immediately clear that the boolean value meant (install/don't
install the drivers).

We now store the boolean in the "install" sub-element instead, e.g.:

  drivers:
    - install: true

  drivers:
    - install: false

Signed-off-by: Olivier Gayot <olivier.gayot@canonical.com>
2022-02-27 20:16:14 +01:00
Michael Hudson-Doyle b2cd25b299 skeleton of a ubuntu-drivers controller and api
[Olivier Gayot]
 * update copyright year 2018 -> 2022
 * drop explicit inheritance from object

Signed-off-by: Olivier Gayot <olivier.gayot@canonical.com>
2022-02-27 19:26:14 +01:00
Olivier Gayot 9e7bc5053b Add support for APT preferences through autoinstall in Subiquity
The autoinstall schema for "apt" now supports the "preferences"
configuration. Each preference element should contain the properties
described below, that 1:1 map with the keywords from apt_preferences(5):

  * package      <-> Package:
  * pin          <-> Pin:
  * pin-priority <-> Pin-Priority:

These preferences are forwarded to curtin through
subiquity-curtin-apt.conf. Support for these rules must be added to
curtin as well.

Signed-off-by: Olivier Gayot <olivier.gayot@canonical.com>
2022-01-11 18:42:40 +01:00
Olivier Gayot 81c67780ff Add basics checks for token validity in the autoinstall JSON schema
Signed-off-by: Olivier Gayot <olivier.gayot@canonical.com>
2022-01-06 10:54:08 +01:00
Olivier Gayot 76278f4d74 Add support for ubuntu-advantage in autoinstall
Signed-off-by: Olivier Gayot <olivier.gayot@canonical.com>
2022-01-04 17:53:36 +01:00
Dan Bungert e32b7f28ac mirror: add disable_components API 2021-11-23 10:56:43 -07:00
Dan Bungert 8da3df2cd2 schema: remove timezones, and tz schema check 2021-10-19 10:06:01 -06:00
Michael Hudson-Doyle a9d7e46b5f add autoinstall config to choose shutdown mode 2021-08-22 09:36:41 +12:00
Dan Bungert 40945f1823
TimeZone: autoinstall and API (FR-1184) (#986)
* TimeZone: autoinstall and API

Add support for Get/Set timezone methods.  Get means that we inquire
with GeoIP as to which timezone is suggested.  Non-availability of
GeoIP, or a previous explicit Set, means that we return the system
timezone.  Set of timezone by Post results in set of the live system
timzeone, and queuing a set of the target system by way of cloud-init.

* Add clarifying comment about _request.
2021-07-13 06:25:03 -06:00
Michael Hudson-Doyle 9564f9ae52 move kernel package selection to its own controller/model 2021-06-02 13:58:53 +12:00
Dan Bungert a0e2e244bd
add setting policy for post-install updates via autoinstall (#920)
* Add element updates (non-UI)

This can be controlled with autoinstall
updates: security or all

Also an API for controlling this:
curl --silent --unix-socket .subiquity/socket a/updates ->
"security"
curl -d '"all"' --unix-socket .subiquity/socket a/updates

* Automated tests - log grep for default/none/all states

* Enforce possible values on Updates controller

Route all the various get/set thru 2 common functions.
Validate incoming data.
2021-03-31 13:57:53 -06:00
Dan Bungert 2c6474f3cb Lock in current schema
Accidental schema updates are unintended, so enforce that.  Schema
updates that don't break API are fine, we can handle that by manually
regenerating the schema at such time.
2021-03-03 11:31:04 -07:00