Commit Graph

35 Commits

Author SHA1 Message Date
Michael Hudson-Doyle e95daf25ba Re-introduce 'subiquity' package for installer specific things.
Only move the Application object for now.
2016-07-25 12:51:39 +12:00
Mathieu Trudel-Lapierre e1970b6477 Rename subiquity to subiquitycore -- will serve as base classes for everything
Signed-off-by: Mathieu Trudel-Lapierre <mathieu.trudel-lapierre@canonical.com>
2016-06-30 14:17:01 -04:00
Ryan Harper 346d4fa37d Change subuiquity to run as firstboot for snappy.
Signed-off-by: Ryan Harper <ryan.harper@canonical.com>
2016-06-22 14:19:54 -05:00
Ryan Harper 4e0ae6a44e Refactor signals to improve navigation
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>
2015-11-03 09:03:16 -06:00
Ryan Harper 8a441b8301 Introduce safer loading of machine configs
- Switch to yaml.safe_load() which throws errors when fed /dev/zero.
- Add a new ProberExecption and bubble that up to the main program
- Update unit tests to mock out repeated calls to safe_load which slowed
  down the unittest run.

Signed-off-by: Ryan Harper <ryan.harper@canonical.com>
2015-10-23 10:03:04 -05:00
Ryan Harper e192fd1088 Safe exit only on control-x
The single key 'Q' or 'q' was a bridge too far since we take
input at anytime and can surprise users.  Instead use a key
combination, control-x.  Clean up keypress handlers to match
urwid requirements (return None when handled, otherwise False,
or pass to super.

Signed-off-by: Ryan Harper <ryan.harper@canonical.com>
2015-10-21 13:03:15 -05:00
Ryan Harper 2cf528d6d3 Fix serial mode
We can't use curses_display with an external event loop (tornado).  The good
news is that we don't have to.  Instead we switch to using agetty to bypass
login, specify the installer and options to execture.  This also handles
respawning the installer and works both on serial and without.

Signed-off-by: Ryan Harper <ryan.harper@canonical.com>
2015-09-14 16:40:28 -05:00
Adam Stokes d149a0c014 Additional UI notifications and consolidate common attrs
We now pass a common dictionary with attributes needed
throughout our controllers. The common dictionary now
contains:

- eventloop
- ui widgets
- signal handler
- prober options
- cli arguments

In addition we've extended the progress indicator to
include a progressbar.

Signed-off-by: Adam Stokes <adam.stokes@ubuntu.com>
2015-08-31 11:55:46 -04:00
Ryan Harper 8a0e9ebdfd Add new cli option to read machine probe data from file
Allow user to specify a probert machine configuration file to be
used during the installer.  If presented with the config file
no probing of the host will occur.

In the case that disks don't have a size in the data collected then
they'll be marked as USED.

Add a few example machines and update the README on how to specify.

Signed-off-by: Ryan Harper <ryan.harper@canonical.com>
2015-08-28 13:22:29 -05:00
Adam Stokes 709ae2a51a Update install progress controller
Provide streaming updates to the UI during non blocking
commands. For the progress controller specifically this
is the output from curtin_wrap and subsequent curtin
execs.

Signed-off-by: Adam Stokes <adam.stokes@ubuntu.com>
2015-08-23 23:55:45 -04:00
Adam Stokes 0b7f217339 Switch to Tornado's event loop
This provides us with several additional features the builtin
select() loop does not, such as:

- Chainable async actions via coroutines
- asyncio bridge

This will keep the code simpler and read more like a synchronous
application.

Signed-off-by: Adam Stokes <adam.stokes@ubuntu.com>
2015-08-23 18:48:52 -04:00
Adam Stokes f57d157722 Add identity view and controller
Signed-off-by: Adam Stokes <adam.stokes@ubuntu.com>
2015-08-18 14:34:59 -04:00
Adam Stokes 079098f749 Break out controllers into separate modules
Signed-off-by: Adam Stokes <adam.stokes@ubuntu.com>
2015-08-18 12:29:56 -04:00
Adam Stokes dbf83a4edb Fix dryrun banner conditional output
Signed-off-by: Adam Stokes <adam.stokes@ubuntu.com>
2015-08-18 09:24:03 -04:00
Adam Stokes ecc9db2ea5 Condense signal loader with model classes
Signed-off-by: Adam Stokes <adam.stokes@ubuntu.com>
2015-08-10 09:52:50 -04:00
Adam Stokes 10a1c76d8f Revert organization
The previous organization was in place to reduce the number of open
files when working on getting the demo into shape. Since we've completed
the demo revert back to our MVC model incorporating the latest changes
that were made during that time leading up to the demo.

Signed-off-by: Adam Stokes <adam.stokes@ubuntu.com>
2015-08-10 09:42:19 -04:00
Adam Stokes 19c54709b2 a little better formatting of curtin output
Signed-off-by: Adam Stokes <adam.stokes@ubuntu.com>
2015-07-24 15:28:52 -04:00
Adam Stokes 12f7bea668 add install progress view
Signed-off-by: Adam Stokes <adam.stokes@ubuntu.com>
2015-07-24 11:30:03 -04:00
Ryan Harper 51cde2339f Switch to GPT partitions
Switch to GPT partition.  This requires using a small gpt partition
to hold grub payloads and flagged as bios_grub.  Add logic to
create a bios_grub_partition if one is not already created when
first partitioning devices.

Signed-off-by: Ryan Harper <ryan.harper@canonical.com>
2015-07-23 15:26:11 -05:00
Ryan Harper 65b9cb396a Add postinstall cleanup
Inject a postinstall config to curtin installer to cleanup cloud image
on target.

Signed-off-by: Ryan Harper <ryan.harper@canonical.com>
2015-07-23 14:57:42 -05:00
Ryan Harper 9fb9d6cb94 Implement Filesystem Model Reset
- Reset button will clear out any changes made to the filesystem model.
- Fixed Reset button label and callback.
- Reverted change to DiskPartitionView which called filesystem:finish instead
  of returning back to FilesystemView.
- Fixed a few lint errors.

Signed-off-by: Ryan Harper <ryan.harper@canonical.com>
2015-07-23 10:06:28 -05:00
Adam Stokes 5fa744cc93 Support swap definition
Signed-off-by: Adam Stokes <adam.stokes@ubuntu.com>
2015-07-23 08:32:55 -04:00
Adam Stokes 3e0270e100 Inherit from ViewPolicy on all toplevel panels
Signed-off-by: Adam Stokes <adam.stokes@ubuntu.com>
2015-07-22 22:31:21 -04:00
Adam Stokes f8db0c4833 Process get_actions() from filesystem finish emitter
This writes out the filesystem format to /tmp/subiquity-config.yaml
and exists the installer cleanly.

Signed-off-by: Adam Stokes <adam.stokes@ubuntu.com>
2015-07-22 21:57:49 -04:00
Adam Stokes 90fb62f6f7 refresh disk partition view after adding partition
Signed-off-by: Adam Stokes <adam.stokes@ubuntu.com>
2015-07-22 16:18:18 -04:00
Adam Stokes 660205a184 support grabbing values from inputs
Signed-off-by: Adam Stokes <adam.stokes@ubuntu.com>
2015-07-22 14:57:53 -04:00
raharper c707ac5eee Merge pull request #15 from CanonicalLtd/merge_grub2
Merge grub2 and blockdev/action fixes to work with updated curtin.
2015-07-22 10:04:36 -05:00
Ryan Harper cf7568aba0 Fix spelling of Partition
Signed-off-by: Ryan Harper <ryan.harper@canonical.com>
2015-07-22 09:19:13 -05:00
Adam Stokes 60504989d1 Update footer in partition editor
Signed-off-by: Adam Stokes <adam.stokes@ubuntu.com>
2015-07-22 09:38:55 -04:00
Adam Stokes 60ec642290 Add initial add disk partition view
Signed-off-by: Adam Stokes <adam.stokes@ubuntu.com>
2015-07-21 22:51:06 -04:00
Adam Stokes c5c1b84d7d more signal fixes
Signed-off-by: Adam Stokes <adam.stokes@ubuntu.com>
2015-07-21 21:49:37 -04:00
Adam Stokes f8e09faa4f add dummy ui, model policy
Signed-off-by: Adam Stokes <adam.stokes@ubuntu.com>
2015-07-21 21:34:46 -04:00
Adam Stokes fc3fccea02 connect filesystem menu actions to respective signals
Signed-off-by: Adam Stokes <adam.stokes@ubuntu.com>
2015-07-21 17:04:28 -04:00
Adam Stokes 0be2b491f0 extending signal support
Signed-off-by: Adam Stokes <adam.stokes@ubuntu.com>
2015-07-21 16:34:46 -04:00
Adam Stokes f429372d3c refactor controller code and signal handling
Signed-off-by: Adam Stokes <adam.stokes@ubuntu.com>
2015-07-21 11:55:02 -04:00