Michael Hudson-Doyle
3bad9e408a
move "usage labels" from filesystem view to model objects
...
So the logic can be reused.
2019-05-30 15:10:34 +12:00
Michael Hudson-Doyle
f45880944e
create partitions for testing directly
...
FilesystemModel.add_partition does a bit too much stuff
2019-05-30 15:09:40 +12:00
Michael Hudson-Doyle
c659c08d2e
fix TestFilesystemModel.assertActionPossible
2019-05-30 14:52:06 +12:00
Michael Hudson-Doyle
aad19ecf22
Merge pull request #499 from mwhudson/ok_for_xxx-tests
...
add tests for ok_for_raid/ok_for_lvm_vg
2019-05-30 11:23:50 +12:00
Michael Hudson-Doyle
ef12e1343e
add tests for ok_for_raid/ok_for_lvm_vg
...
also make the various implementations more consistent.
2019-05-30 11:18:00 +12:00
Michael Hudson-Doyle
a4d44ba7a8
Merge pull request #498 from mwhudson/validate-raid-lvm-answers
...
when assembling vg from answers, check devices are ok_for_lvm_vg
2019-05-30 10:23:58 +12:00
Michael Hudson-Doyle
4a22f22189
when assembling vg from answers, check devices are ok_for_lvm_vg
...
And similar for RAID. Fix a couple of the answers files that got this
wrong and only worked by chance.
2019-05-30 10:07:26 +12:00
Michael Hudson-Doyle
9bd9ecb1a2
Merge pull request #497 from mwhudson/make_boot_disk-tests
...
add some tests for FilesystemController.make_boot_disk
2019-05-29 16:11:04 +12:00
Michael Hudson-Doyle
a32b625404
add some tests for FilesystemController.make_boot_disk
2019-05-29 15:39:15 +12:00
Michael Hudson-Doyle
041ed1fadf
Merge pull request #496 from mwhudson/device-action-tests
...
add a tonne of tests for when various device actions are permitted
2019-05-29 11:41:52 +12:00
Michael Hudson-Doyle
3701438aa9
add a tonne of tests for when various device actions are permitted
...
Fix a bug on ppc64el this found.
2019-05-29 11:36:14 +12:00
Michael Hudson-Doyle
849b5f12f1
Merge pull request #494 from mwhudson/fs-actions-once
...
only run filesystem actions from answers once
2019-05-28 11:38:14 +12:00
Michael Hudson-Doyle
c1c9f0e174
only run filesystem actions from answers once
...
This means you can use an answers file that leaves you on the filesystem
screen, click "back" to choose a different option and not have
everything fall over in a heap.
2019-05-28 10:57:50 +12:00
Michael Hudson-Doyle
96a235f919
Merge pull request #493 from mwhudson/lv-available
...
a mounted lv should not be considered to be available
2019-05-28 10:34:32 +12:00
Michael Hudson-Doyle
85a7668926
a mounted lv should not be considered to be available
2019-05-28 10:26:25 +12:00
Michael Hudson-Doyle
fd7a56a8b5
Merge pull request #492 from mwhudson/fsmodel-tweaks
...
filesystem model tweaks
2019-05-24 09:21:53 +12:00
Michael Hudson-Doyle
2d145beaa8
add explicit marking of action reverse dependencies
...
I.e. reverse_depends(disk) yields the partitions.
2019-05-23 15:06:07 +12:00
Michael Hudson-Doyle
3484401a2a
make failure to progress errors clearer in FilesystemModel._render_actions
2019-05-23 15:04:42 +12:00
Michael Hudson-Doyle
f215ad536e
do not include _m in the repr() of action objects
2019-05-23 15:04:34 +12:00
Dimitri John Ledkov
c16ec51a9f
Update POTFILES.in
2019-05-22 16:13:00 +01:00
Michael Hudson-Doyle
ddaf916ea6
Merge pull request #491 from mwhudson/_can_MAKE_BOOT-UEFI
...
Fix Disk._can_MAKE_BOOT on a UEFI system
2019-05-22 15:52:29 +12:00
Michael Hudson-Doyle
4b77712f59
Fix Disk._can_MAKE_BOOT on a UEFI system
...
A recent refactoring left MAKE_BOOT action always enabled for the UEFI
bootloader mode. Fix + test.
2019-05-22 15:32:56 +12:00
Michael Hudson-Doyle
34b91eb1c4
Merge pull request #487 from mwhudson/slash-boot-anywhere
...
allow /boot to be on any kind of device
2019-05-22 14:27:13 +12:00
Dimitri John Ledkov
7d5a580f03
Merge pull request #481 from mwhudson/generic-delete
...
Add generic clear and delete methods to FilesystemController
2019-05-21 23:47:35 +01:00
Michael Hudson-Doyle
2585b4eff0
Add generic clear and delete methods to FilesystemController
...
The guided "use a whole disk" flow in reusing existing partitions is
going to need to be able to generically destroy the existing users of
a disk, something that subiquity does not currently let you do (you
can't delete a RAID if is part of another RAID, for example). So add
generic ways of clearing and deleting objects.
2019-05-21 14:02:01 +12:00
Michael Hudson-Doyle
d1c6bf47bc
Merge pull request #484 from mwhudson/fs-attr-reorg
...
canonicalize ptable, size, raidlevel values for filesystem actions
2019-05-21 13:59:04 +12:00
Michael Hudson-Doyle
51504086aa
Merge pull request #489 from mwhudson/fix-raid-vg-deletion
...
fix deletion of raid/volgroup with >1 partition/lv
2019-05-21 11:49:31 +12:00
Michael Hudson-Doyle
a57196a5e5
fix deletion of raid/volgroup with >1 partition/lv
...
"for x in obj.partitions(): self.delete_partition(x)" is unsafe when
delete_partition mutates the list .partitions() returns...
2019-05-21 11:01:54 +12:00
Michael Hudson-Doyle
63ba3873e6
Merge pull request #488 from mwhudson/no-etc-grub.d
...
configure curtin to avoid writing files to /target/etc/grub.d
2019-05-20 13:42:28 +12:00
Michael Hudson-Doyle
136afe173b
configure curtin to avoid writing files to /target/etc/grub.d
...
This will not actually do with the version of curtin we currently build
but it will not hurt either.
2019-05-20 12:08:02 +12:00
Michael Hudson-Doyle
8ea0433322
allow /boot to be on any kind of device
2019-05-15 14:52:34 +12:00
Michael Hudson-Doyle
bea41113a3
Merge pull request #486 from xnox/drop-maas
...
Drop maas
2019-05-15 14:46:17 +12:00
Michael Hudson-Doyle
255abacea5
Canonicalize raidlevel on creation too.
...
This subsumes the recent change I made to use the raid$N form
internally.
2019-05-15 11:46:56 +12:00
Michael Hudson-Doyle
2e29cb178a
Canonicalize size and ptable values on action creation.
...
curtin allows parition/lv sizes to be specified as strings or integers.
To avoid depending on whichever extract_storage_config gives us back,
canonicalize them to integers when creating an action. Similarly, curtin
accepts as synonyms "dos" and "msdos" for ptable; here we canonicalize
them both to "msdos".
2019-05-15 11:46:56 +12:00
Michael Hudson-Doyle
4c187a0afb
Remove defaults from some fields that should not have them
...
This required marking some "behind the scenes" attributes as init=False
(which makes some logical sense) and reordering some other attributes
(including "id" and "type", which are now added generically) to move
optional ones after mandatory ones. Neither of these would be necessary
with a newer version of attrs (where we could use kw_only=True on the
class) but well, not too bad.
Leave Disk mostly alone for now because how they get created is going to
change completely with reusing partitions.
2019-05-15 11:46:54 +12:00
Michael Hudson-Doyle
2d18f8e4ac
add a namespace for our wrappers around attr.ib()
2019-05-15 11:45:54 +12:00
Michael Hudson-Doyle
241e14c296
Merge pull request #483 from mwhudson/reformat-swap
...
fix some bugs in editing and displaying swap partitions/devices
2019-05-15 11:44:55 +12:00
Michael Hudson-Doyle
5abaa7fc8d
Merge pull request #478 from mwhudson/install_devices-not-grub_device
...
reorganize handling of bootloader partitions
2019-05-15 11:43:58 +12:00
Dimitri John Ledkov
604788c24d
lint
2019-05-14 16:40:02 +02:00
Dimitri John Ledkov
e6ef8987be
ooops still have a source....
2019-05-14 16:14:50 +02:00
Dimitri John Ledkov
96be2a8f5d
Unbreak snap screen, and simplify it
2019-05-14 16:03:55 +02:00
Dimitri John Ledkov
25071d9cf0
Drop installpath
2019-05-14 16:03:33 +02:00
Dimitri John Ledkov
d67cc5c721
update potfiles
2019-05-14 15:17:42 +02:00
Dimitri John Ledkov
e46de5def8
Drop Installpath
2019-05-14 15:09:55 +02:00
Dimitri John Ledkov
6df3f5c2af
Drop maas
2019-05-14 11:04:28 +02:00
Michael Hudson-Doyle
96aafc668d
fix some bugs in editing and displaying swap partitions/devices
...
https://bugs.launchpad.net/subiquity/+bug/1828661
2019-05-13 11:15:43 +12:00
Michael Hudson-Doyle
05f9b10974
Replace --uefi with --bootloader to select any bootloader style for dry-run
...
Relatedly, make 'MAKE_BOOT in disk.supported_actions' depend on
bootloader style not architecture.
2019-05-13 09:27:12 +12:00
Michael Hudson-Doyle
9862fa9049
rewrite needs_bootloader_partition
2019-05-13 09:24:14 +12:00
Michael Hudson-Doyle
1b2e819ce1
add and render FilesystemModel.grub_install_device
2019-05-13 09:24:14 +12:00
Michael Hudson-Doyle
c341047b18
give filesystem actions a reference to the model
2019-05-13 09:24:14 +12:00