- Use get_interface method to obtain and Networkdev object
and interact with this. Validates {add,remove}_subnet methods
on Networkdev objects.
- Add method in model for setting and validating gateway values
Signed-off-by: Ryan Harper <ryan.harper@canonical.com>
The network model wasn't not prepared to allow manual configuration
to affect the state such that after manual configuration the view
would be able to extract the current state of a network device
config. Reuse the Blockdev model as Networkdev as well as encapsulating
the use of the action objects as a means of storting the current
configuration.
Adjust the views to use the updated model.
Signed-off-by: Ryan Harper <ryan.harper@canonical.com>
- Call into model to extract interface info to populate view
- Clearly display two modes, ipv4 and v6
- Change button style, ideally we'd make a new one that doesn't indent by two
chars
- Disabled ipv6 button for now
Signed-off-by: Ryan Harper <ryan.harper@canonical.com>
- Apply limits to realname (1..160)
- Apply limits to username (1..32)
- Restrict chars allowed for realname via RealnameEditor widget
- Ensure all fields have input
Signed-off-by: Ryan Harper <ryan.harper@canonical.com>
- Add a 'Quit Installer' button on the final install progress screen. This
is useful for users who want to mess around with the system post-install.
- Redirect 'Reboot' to 'quit' if we're in dry-run mode.
Signed-off-by: Ryan Harper <ryan.harper@canonical.com>
Implement a stack-based signal class to push and pop menu levels
Switch navigation signals to use 'menu:' for filtering
Ensure all view classes subclass from ViewPolicy for common keypress
Signed-off-by: Ryan Harper <ryan.harper@canonical.com>
Running flake8 via python3 triggers python3 level of lint checking.
This fixes at least the case where python2 flags the '_*' expander.
Signed-off-by: Ryan Harper <ryan.harper@canonical.com>
When we create virtual deviecs (raid, lvm and bcache)
we store constructed info dictionaries; these must be
removed when we reset the model state.
Signed-off-by: Ryan Harper <ryan.harper@canonical.com>
When fixing show-disk-info on virtio devices, a thinko when
indexing the info structure caused issues when looking at
a secondary clause in a compound statement. Fix this by
extracting the value via a .get and checking.
- Also include a probert dump of a virtio-based cloud image
for testing with virtio devices.
Signed-off-by: Ryan Harper <ryan.harper@canonical.com>
Include the ui path in the view logging to help indicate which parts of the MVC
are logging debug data.
Signed-off-by: Ryan Harper <ryan.harper@canonical.com>
- Move mountpoint validation into the model for re-use now that
we have two users of it (AddFormat, AddPartition).
- Use Exceptions to pass back the error message to be updated on
the widget.
- Fix issue with repeated checking of the mountpoint which would
grow the error message continually.
- Fix issue with selected device indexing. This was missed due to
a misspelling of the signal it emitted and accidently behaved as
we expected.
Signed-off-by: Ryan Harper <ryan.harper@canonical.com>
When instantiating the filesystem views we operate on the
input (converting disk string to disk object) but then in
the error paths, submitted the disk-object as the reference
which blew up the device dictionary. Now we explicitly keep
both the input and the object and use accordingly.
Signed-off-by: Ryan Harper <ryan.harper@canonical.com>
Implement a stack-based signal class to push and pop menu levels
Switch navigation signals to use 'menu:' for filtering
Ensure all view classes subclass from ViewPolicy for common keypress
Signed-off-by: Ryan Harper <ryan.harper@canonical.com>
Attempt to shrink the partition size for the rootfs via mkfs options
Ensure we use the same mkfs and rsync options everywhere.
Signed-off-by: Ryan Harper <ryan.harper@canonical.com>
Make sure we continue to use 1M alignment, this helps
parted shift things around properly. Don't reserve
space for root in installer image since it's read-only.
Add some fudge factor to the root image to allow for
sparse expansion.
Signed-off-by: Ryan Harper <ryan.harper@canonical.com>
Wily images and newer now contain a lxcbr0 by default.
Ignore this interface and don't attempt to dhcp autostart it.
Signed-off-by: Ryan Harper <ryan.harper@canonical.com>
The size of the rootfs fluxuates and sometimes does not fit in the
pre-allocated sizes. Instead, calculate the size needed for the
rootfs read-only partition (+ 100M padding) and use the remaining
space for the overlay partition as it's needed when the install
image updates it's apt repository.
Signed-off-by: Ryan Harper <ryan.harper@canonical.com>
validate the empty disks/partitions. Note that blockdev
class makes use of poking host's mounts which triggers some
transient failures.
Signed-off-by: Ryan Harper <ryan.harper@canonical.com>
Ensure that the / mount point is always first
but returning an explict value (0) for / mount action.
Signed-off-by: Ryan Harper <ryan.harper@canonical.com>
Speed up install time by pre-installing required curtin packages
in the installer image. Do this by optionally exploiting a
curtin feature which handles preparing the target for installation
of services that we don't want running during the image build.
Fallback on simple apt-get install but filter out daemon services
as this will break the image build.
Signed-off-by: Ryan Harper <ryan.harper@canonical.com>
Instead of packing up curtin via source, build a
deb from the source and inject that into the installer.
This also means we always are consuming an 'installed'
curtin (aka /usr/bin/curtin).
Signed-off-by: Ryan Harper <ryan.harper@canonical.com>
RAID devices require special handling since they cannot be partitioned.
Adjust the blockdev model to accomodate this.
Fix sorting of our actions to handle proper ordering when using RAID devices
Implement whole-disk formatting view and controller
Update cloud-init configuration to ensure repeated runs of installer work
Signed-off-by: Ryan Harper <ryan.harper@canonical.com>