- Model inputs after Ubiquity layout
- Add Servername (hostname)
- Add SSH ID import (import from launchpad or github)
- Include information under important fields
- Drop old/unused hostname MVC files
Signed-off-by: Ryan Harper <ryan.harper@canonical.com>
- Skip add_partition entry for bcache, raid, and lvm devices
- Don't display Format entire partition if it's already been formated
Signed-off-by: Ryan Harper <ryan.harper@canonical.com>
Return to spawning curtin in two stages, and include additional
signals and flags to control when we spawn the postinstall
config operation.
Signed-off-by: Ryan Harper <ryan.harper@canonical.com>
Ensure they all use backing_dev, cache_dev parameter ordering
Added properties to BcacheAction for involved devices
Signed-off-by: Ryan Harper <ryan.harper@canonical.com>
We initialized params and subnets to empty lists.
Params is expected to be a dictionary while subnets
is a list.
Signed-off-by: Ryan Harper <ryan.harper@canonical.com>
Rework of the menu signals broke add-raid-dev by mapping a
menu signal to a completion signal. Revert add-raid-dev back
to non-menu signal to fix.
Signed-off-by: Ryan Harper <ryan.harper@canonical.com>
We now have a bonding UX panel, modeled after the raid menu
where we have a list of interfaces and a radiobox for
selecting the bond mode. This calls into the network
model to add the bond interface.
- Update the network view to only display the Bond option if we have
more than one interface that is available (ie, not already part of
a bond).
- Also update the bond info to include the bond interface composition
in the hardware info such that it displays according to spec
- Add iface_is_bonded_slave to model
- Update network model info dict to include bond_{slave,master}. This
helps us display the (Bonded) attribute for slaves, but not the primary
bond iface.
Signed-off-by: Ryan Harper <ryan.harper@canonical.com>
- Spec calls for a list of gateway ips followed by a list of interfaces
which are associated to be displayed
- Use updated model.set_default_gateway() method
- Add Default gateway status message to Network View
- Ensure that manually assigned gateways are displayed in the set default
route view by extracting the 'gateway' value from the subnets in
the Networkdev object.
Signed-off-by: Ryan Harper <ryan.harper@canonical.com>
- 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>
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>
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>
- 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>
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>
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>
When we encounter an error before we invoke curtin, emit
a new signal, filesystem:error and present an error
UI for the user and return them to main, from there they
can quit.
Signed-off-by: Ryan Harper <ryan.harper@canonical.com>
The spec calls for invoking hdparm -i on the device, but not all of our
devices will display hdparm data (virtual, ceph, or other such devices).
Additionally the bulk if the data in hdparm itself is not really useful
in helping users identify a specific device. Instead, display a short
set of helpful info about the device:
- /dev/XXXX
- Vendor
- Model
- Serial
- Size (in human-readable and bytes)
- devpath (/devices/XXXX)
- rotational (true or false)
The current UX requires us to select another disk after returning to
the list, with this patch though we enable switching between the
available disks via 'n' and 'p', or 'j' and 'k', which will be switched
to 'tab' and 'shift tab'.
Signed-off-by: Ryan Harper <ryan.harper@canonical.com>
Some disk devices (virtio) don't have serial numbers by default.
This breaks curtin which requires a serial or a path to uniquely
find the target disks. Add a fallback to device path if the
current device includes the eye catcher 'Unknown Serial' which
is set by probert for devices that do not have a serial number.
Signed-off-by: Ryan Harper <ryan.harper@canonical.com>
- add blockdev tests on available_partitions
- fix type issue in Disk.partition OrderedDict keys, always use integers
- Add __repr__ for Disk related Actions
- Fix issue with available partition logic, ensure we and them together
- Filter out 'leave unformatted' fstype, set to None as needed.
- Whitespace cleanup in unittests
- add fsm test on get_partitions
Signed-off-by: Ryan Harper <ryan.harper@canonical.com>
- Use nosetests3 to call unit tests
- Ensure all Actions use the 'type' property
- Implement remaining Blockdev unit tests
Signed-off-by: Ryan Harper <ryan.harper@canonical.com>
Forgot to add __init__.py in tests subdir to make module.
Add a few blockdev partition tests and fixes for their issues.
Signed-off-by: Ryan Harper <ryan.harper@canonical.com>
mdadm supports using whole disks and empty partitions.
Update model to define empty disks and empty partitions.
This allows one to construct a raid, and then use that raid
to construct further raid (raid0 multiple raid1s).
Signed-off-by: Ryan Harper <ryan.harper@canonical.com>
- Update filesystem model to check if we have an existing device
that's marked bootable.
- Update look at all disk mount points, not just the current one
Signed-off-by: Ryan Harper <ryan.harper@canonical.com>
Introduce a new Raiddev class to hold raid virtual device.
Add RaidAction to emit correct storage config
Tested with raid level 0 only.
Not sure if we can allow partitioning of raid devices. Documentation
says it can be done but curtin will need to 'make it correctly'.
Signed-off-by: Ryan Harper <ryan.harper@canonical.com>