Commit Graph

4556 Commits

Author SHA1 Message Date
Didier Roche e367e7b4b1
Merge pull request #1066 from canonical/wsl_oobe_conf_calls
DEENG-38/DEENG-39 - Moving to WSL Configuration and remove old command call
2021-10-07 09:35:02 +02:00
Dan Bungert 18f04d1172 storage/v2: more explicit machine config init
Use a context manager and an explicit machine config arg per test to
help clarify the background machine assumptions.

Restructure tests for the above, and to make them more targeted on a
single idea per test.
2021-10-06 18:47:58 -06:00
Dan Bungert 5203b1dcd0 storage/v2: annotations -> attr Factory 2021-10-06 18:47:38 -06:00
Dan Bungert 57148ee8d4 storage/v2: edit reuse existing format/mount value 2021-10-06 18:45:14 -06:00
Dan Bungert 7d80e8cc83 storage/v2: allow add without mount point 2021-10-06 18:45:14 -06:00
Dan Bungert af2de09c68 storage/v2: show todos in response
Subiquity TUI has access to the full model class and can easily answer
questions that the Server normally has info for, such as if "/" has been
mounted on one of the target filesystems or if we have boot setup.
Expose that information in the v2 response.
2021-10-06 18:45:14 -06:00
Dan Bungert eb365c1292 apitest: use raise_for_status 2021-10-06 18:44:22 -06:00
Dan Bungert 91487713fa storage/v2: test cleanup 2021-10-06 18:44:22 -06:00
Dan Bungert 8917d2b693 storage/v2: enforce some partition rules
* add some exceptions on likely desired behaviors that are not yet
  implemented, skip the weird ones
* misc cleanup also
2021-10-06 18:44:22 -06:00
Dan Bungert e21b03fd05 storage/v2: list limitations on add/edit/delete 2021-10-06 18:44:22 -06:00
Dan Bungert 1362f0aab0 storage/v2: return config on POST 2021-10-06 18:44:22 -06:00
Dan Bungert 4b93b47ccc storage/v2: add_boot_partition 2021-10-06 18:44:22 -06:00
Dan Bungert 18de910019 storage/v2: report ptable 2021-10-06 18:44:22 -06:00
Dan Bungert 576c2e3025 storage/v2: disk preserve also 2021-10-06 18:44:22 -06:00
Dan Bungert b820861c59 storage/v2: allow preserve=null for caller 2021-10-06 18:44:22 -06:00
Dan Bungert e630995aa1 storage/v2: report grub_device 2021-10-06 18:44:22 -06:00
Dan Bungert 9bee715156 storage/v2: show disk path 2021-10-06 18:44:22 -06:00
Dan Bungert b6ed0595ef storage/v2: tests for edit in place 2021-10-06 18:44:22 -06:00
Dan Bungert ce89e99a64 storage/v2: provide wipe info 2021-10-06 18:44:22 -06:00
Dan Bungert ddbdbb869f storage/v2: reuse existing partitions
Add test for flow of reusing existing partitions.  Certain operations
are allowed, such as formatting and using an existing partition, or
mounting a partition without formatting it.  Creating new in free space
is off limits, as is deleting a partition (even if it is just about to
be added again).
2021-10-06 18:44:22 -06:00
Dan Bungert cf31bf9606 storage/v2: less invasive edit partition 2021-10-06 18:44:22 -06:00
Dan Bungert 1d2aa890ad delete_partition: allow when disk preserve False
If disk.preserve is false, a delete partition may proceed.
If we're actively removing partitions from a disk before clearing it,
that's fine as well even though the preserve bit may yet be True.
2021-10-06 18:44:22 -06:00
Dan Bungert 6d5e9d047f storage/v2: add preserve 2021-10-06 18:44:22 -06:00
Dan Bungert 022724b694 storage/v2: add free_for_partitions at DISK level
This is the size, adjusted downward for GPT overhead and space consumed
by partitions.
2021-10-06 18:44:22 -06:00
Dan Bungert 3eaecb69c0 storage/v2: testing, grub 2021-10-06 18:44:22 -06:00
Dan Bungert 7313ca3e9d storage/v2: test cleanup 2021-10-06 18:44:22 -06:00
Dan Bungert 81870995ab storage/v2: remove most V2 types
With the ability to send items with default values, we can simplify the
calling API and don't need to split out distinct types.
2021-10-06 18:44:22 -06:00
Dan Bungert aa10897802 storage/v2: api test cases for deserialize fixes 2021-10-06 18:44:22 -06:00
Dan Bungert 3b6b89c5d9 storage/v2: create api test 2021-10-06 18:44:22 -06:00
Dan Bungert 92500bf8c9 storage/v2: start using -1 for 'rest of disk' 2021-10-06 18:44:22 -06:00
Dan Bungert 69873d8ab2 storage/v2: test cleanup 2021-10-06 18:44:22 -06:00
Dan Bungert 7f22e91cb3 storage/v2: add api test 2021-10-06 18:44:22 -06:00
Dan Bungert e5286ad21a storage/v2: start adding v2 types 2021-10-06 18:44:22 -06:00
Dan Bungert f4e07e8aba storage/v2: reset 2021-10-06 18:44:22 -06:00
Dan Bungert f6c3eb8a43 storage/v2: delete_partition 2021-10-06 18:44:22 -06:00
Dan Bungert 010fdecd2c storage/v2: add guided equivalent 2021-10-06 18:44:22 -06:00
Dan Bungert 84b0df3f8f storage/v2: add/edit move args to request body 2021-10-06 18:21:01 -06:00
Dan Bungert 73b02e379b storage/v2: post to mark configured 2021-10-06 18:21:01 -06:00
Dan Bungert d6fc50b131 storage/v2: edit 2021-10-06 18:21:01 -06:00
Dan Bungert 4edff574d9 storage/v2: add_partition 2021-10-06 18:21:01 -06:00
Dan Bungert dcb8380a82 storage/v2: get, reset 2021-10-06 18:21:01 -06:00
Dan Bungert e7276d3fa8
Merge pull request #1069 from mwhudson/lp-1939176
only do x-override-status: confirm games for first request for a screen
2021-10-06 17:34:50 -06:00
Michael Hudson-Doyle eb35a2c69e use a ContextVar to know when a request is part of making a view
we can do this now that we are based on core20
2021-10-06 17:30:47 -06:00
Michael Hudson-Doyle 755436ea45 only do x-override-status: confirm games for first request for a screen
this uses a rather unsatisfactory way of identifying the first request for a screen.

for https://bugs.launchpad.net/subiquity/+bug/1939176
2021-10-06 17:30:47 -06:00
Patrick Wu c934268813 system_setup: changes and fixes
1. rebase with main and update autoinstall-system-setup.yml
2. provide a more unified indent style
3. update get_userandgroups() to the dropped one
4. fix the problematic os action
5. simply asignments
6. assign default_loader a default value
7. provide a type-to-file dict in wsl_conf
8. provide stderr info when providing error in creating user
9. update schema and example files
2021-10-06 22:13:15 +08:00
Patrick Wu 1a7274dbba system_setup: unify api names and simply WSLconfig class into function 2021-10-06 22:13:15 +08:00
Patrick Wu 5c0e64e78a system_setup: address the run_command fail issue 2021-10-06 22:13:15 +08:00
Patrick Wu 9fbff87fe1 system_setup: changes to the get-usersandgroups 2021-10-06 22:13:15 +08:00
Patrick Wu 32a62748c9 system_setup: initial redesign of generic config handler
Also have to change the logic for default loader
2021-10-06 22:13:15 +08:00
Patrick Wu f31e252436 system_setup: reduce code duplication in getting default value 2021-10-06 22:13:15 +08:00