Commit Graph

188 Commits

Author SHA1 Message Date
Michael Hudson-Doyle f6f214125f move TaskSequence somewhere more generic
I want to reuse it in my containerizing branch.

Improve API and docs a bit while I am looking at it.
2018-05-21 11:52:06 +12:00
Michael Hudson-Doyle 11708703c9 move titles, footers, excerpts from controller to view
read title and footer from the view instance, make views respsonsible for rendering
the excerpt

adapts infrastructure, welcome, keyboard, network views
2018-05-18 15:55:49 +12:00
Michael Hudson-Doyle 488802fc8b update users of run_command (i thought there was more than this) 2018-05-18 13:11:15 +12:00
Michael Hudson-Doyle ad9f10a9ac try to ensure that functions run in the background have "_bg_" in their name 2018-05-18 12:29:42 +12:00
Michael Hudson-Doyle 1efa265fc5 remove calls to set_alarm_in that were only there so that exceptions raised would be propagated 2018-05-18 12:25:47 +12:00
Michael Hudson-Doyle 0a0af0842b fix stupid crash 2018-05-04 10:31:36 +12:00
Michael Hudson-Doyle fa8f8d32f5 down all network links that have changed config before applying it
this means that if you enter a broken config, it breaks as it should
2018-05-03 12:14:06 +12:00
Michael Hudson-Doyle 688a270c17 a round of marking strings as translatable and ensuring translations are actually displayed in the UI 2018-04-19 10:29:08 +12:00
Michael Hudson-Doyle b215ceaf7d do not log wifi password when an interface appears
This can happen in particular when netplan re-plugs an interface.
2018-02-26 22:29:41 +13:00
Michael Hudson-Doyle 94b4f550e3 update config to match probert changes 2017-11-27 09:54:11 +13:00
Michael Hudson-Doyle 484239c060 do not move on from network screen inside callback
things get super confusing when there is an exception
2017-11-21 11:27:26 +13:00
Michael Hudson-Doyle 6919e5ce68 minimal implementation of canned answers
this allows automation of the enter-enter-enter flow, not much more than that
2017-11-17 13:25:16 +13:00
Michael Hudson-Doyle e7afa9b0b3 correct _data_ready call when udev is not settled 2017-11-17 13:24:30 +13:00
Michael Hudson-Doyle 8086d5df81 move to a unified model instance
and stop having the controllers construct each model instance for itself
2017-11-16 12:48:20 +13:00
Michael Hudson-Doyle 947a65a3bb changes following changes in probert
the only really visible effect of all this is to make --dry-run
--machine-config foo show the network config from foo, not the machine
running subiquity. (The existing configs won't work, though)
2017-11-15 14:27:24 +13:00
Michael Hudson-Doyle 94e58a0aaa reduce padding around overlays 2017-10-25 21:27:31 +13:00
Michael Hudson-Doyle aa564b9f6a ACTUALLY let udev queue settle rather than just pretending to 2017-09-29 08:37:31 -04:00
Michael Hudson-Doyle 3221599cb1 default routes can appear via CHANGE as well as NEW 2017-09-29 08:37:24 -04:00
Michael Hudson-Doyle 393055622c always super-call route_change 2017-09-29 08:37:19 -04:00
Michael Hudson-Doyle 86ac32905b change the progress bar to show x / y rather than a %age
Also make its progress more automatic.
2017-09-26 09:01:22 -04:00
Dimitri John Ledkov 693f3e7c7d
Barebones i18n setup. 2017-09-18 14:14:39 +01:00
Michael Hudson-Doyle e0f75ba013 tweaks to network views
1) move the done / cancel buttons (and error display) out of scrolling region
2) focus done by default
3) update footer texts to make sense
4) use a bit more of the horizontal space to show interface information
2017-09-08 09:48:41 +12:00
Michael Hudson-Doyle 395b30451e stop being clever in handling of escape in network screens 2017-04-05 14:36:46 +12:00
Michael Hudson-Doyle 32578fb35e make sure waiting for the default route times out properly
see https://bugs.launchpad.net/ubuntu/+source/subiquity/+bug/1672803
2017-03-21 13:38:35 +13:00
Michael Hudson-Doyle f1b97508fa dry-run fix 2017-03-20 15:03:32 +13:00
Michael Hudson-Doyle 3f425c9e05 make the netplan file name and path depend (very slightly) on subiquity vs console-conf 2017-03-16 22:52:05 +13:00
Michael Hudson-Doyle ff75b7a7fe fix crash on disappearing network interface
By being more careful about accessing self.focus in FocusTrackingMixin.

Fixes https://bugs.launchpad.net/ubuntu/+source/subiquity/+bug/1667829
2017-03-02 21:34:12 +13:00
Michael Hudson-Doyle 404ca627da use evilnick's wording on the network page 2017-03-02 13:52:20 +13:00
Michael Hudson-Doyle 65f9d1ef62 move show_overlay to BaseView 2017-02-14 16:16:19 +13:00
Michael Hudson-Doyle a4d6682478 simpler api for doing stuff in a background thread 2017-01-18 12:03:56 +13:00
Michael Hudson-Doyle fa95fb55ad make callfromthread functionality more available, use it in installprogress 2017-01-18 12:02:34 +13:00
Michael Hudson-Doyle e50ccb9c76 stop sharing WelcomeController 2017-01-17 11:34:32 +13:00
Michael Hudson-Doyle 4e726495c3 move BaseIdentityController to become subiquity's IdentityController 2017-01-17 11:34:32 +13:00
Michael Hudson-Doyle 17b943209e remove subiquitycore/async.py
it was just a glorified global variable.
2017-01-13 15:08:31 +13:00
Mathieu Trudel-Lapierre b9a990171c identity: don't quit after subiquity/subiquitycore identity controller, it should be able to continue to the next screen. 2016-12-22 22:16:15 -05:00
Michael Hudson-Doyle df800bf8b3 fix header of WIFI config screen
See https://bugs.launchpad.net/bugs/1651119
2016-12-22 12:16:39 +13:00
Mathieu Trudel-Lapierre 01c42205f0 Fix identity controller for subiquity; correctly process done signal and displaying local user info. 2016-12-20 15:40:28 -05:00
Michael Hudson-Doyle 2a716df0ad add and use NetworkConfigureIPv6InterfaceView 2016-12-12 15:45:45 +13:00
Michael Hudson-Doyle bd9046ae9c squash some more trivial uses of signals
And move the @view decorator and associated methods used by the network
stuff somewhere more general.
2016-11-22 16:09:51 +13:00
Michael Hudson-Doyle 9ba1c8feff get subiquity to the point where it at least starts 2016-11-21 13:32:58 +13:00
Michael Hudson-Doyle 19081d53bc reparse netplan configs after writing config
'netplan apply' can re-plug network interfaces, so it looked like we
forgot how an interface had been configured
2016-11-09 12:21:06 +13:00
Michael Hudson-Doyle a7bfef3646 show error message from netplan generate when it fails 2016-11-08 10:39:54 +13:00
Michael Hudson-Doyle 31b21799b7 remove dependency on netifaces 2016-11-07 16:56:36 +13:00
Michael Hudson-Doyle c4fdf5cb72 allow choosing from visible networks when configuring wifi 2016-11-07 16:56:36 +13:00
Michael Hudson-Doyle cacd456a6a Adapt to netlink event driven version of probert. 2016-11-07 16:56:32 +13:00
Michael Hudson-Doyle 82b11dbd69 reorganize the network model and make the UI a bit more consistent
The main change here is to separate the state a network device is in and the
state we want it to be in. So it now parses the netplan config on a system as
well as probing the state of via probert.

The UI is changed to make this distintion too, and be IMO a bit more
consistent. Somewhere in this I've removed the display of whether the
probed address was found via DHCP or not, possibly that should be put
back if it doesn't make things too cluttered.

In dry-run mode, we now still write the config and feed it to netplan, but
in a way that doesn't affect the system we are running it on.
2016-11-07 15:15:46 +13:00
Michael Hudson-Doyle d48a70973e restore escape key behaviour 2016-11-02 12:44:04 +13:00
Michael Hudson-Doyle 91e42e37bd Merge branch 'master' into mwhudson/kill-some-signals 2016-11-02 12:00:47 +13:00
Michael Hudson-Doyle 019b5c4b3e make properly sure that the wifi password does not get logged
Two of these were properly stupid :(

LP: #1636421 (again)
2016-10-28 13:14:05 +13:00
Michael Hudson-Doyle 47af1de57e remove setting of umask, redact wifi password from log file
The setting of umask was breaking configuring wifi :(
2016-10-26 11:02:23 +13:00
Michael Hudson-Doyle d594b77f28 do not write the netplan config so the world can see it 2016-10-20 12:37:19 +13:00
Michael Hudson-Doyle f603207d94 remove most trivial use of signals from console-conf's flow 2016-10-11 12:48:28 +13:00
Michael Hudson-Doyle e348207597 Remove most use of signals from welcome and network views. 2016-10-10 16:47:42 +13:00
Michael Hudson-Doyle 2f8c1aa5cf move logic from identity/login views into identity controller
This was what I wanted to do before I got distracted by the other things.
2016-09-27 21:56:48 +13:00
Michael Hudson-Doyle d9095336e5 do not have controllers (or view code!!) know the order of the screens 2016-09-27 21:35:47 +13:00
Michael Hudson-Doyle 2373837269 make fake network actions in dry-run mode a lot quicker 2016-09-27 20:53:17 +13:00
Michael Hudson-Doyle dad0e10912 completely separate menu -> signal and signal -> method mappings
and put the signal -> method mapping into the controller

this breaks the subiquity part even more than before, but it's pretty broken
already.
2016-09-27 20:53:17 +13:00
Michael Hudson-Doyle e765538c95 address some UI comments from Mark 2016-09-20 14:13:31 +12:00
Michael Hudson-Doyle fdd99e21f0 be more careful in BackgroundProcess.cancel
Someone sent me a traceback where cancel() was called before .proc was set.  I
don't really understand how this happens, but there's no harm in being careful.
2016-09-15 21:35:48 +12:00
Michael Hudson-Doyle 60b4262b07 remove gratuitous delta a bit 2016-09-05 16:39:58 +12:00
Michael Hudson-Doyle f58d2aa7c0 refactor a bit 2016-09-05 16:38:26 +12:00
Michael Hudson-Doyle f9668b8802 more low quality UI work 2016-09-05 15:36:59 +12:00
Michael Hudson-Doyle bf3384596e a start a configure-wifi ui 2016-09-05 12:03:06 +12:00
Michael Hudson-Doyle c6b17fdf43 Overwrite the netplan config that snap firstboot creates. 2016-08-31 11:22:23 +12:00
Michael Hudson-Doyle fedcb10560 add WaitForDefaultRouteTask, use it instead of networkd-wait-online
It polls though, sorry Mathieu!
2016-08-30 15:08:05 +12:00
Michael Hudson-Doyle fe8f99fbec an example of how to implement a task as python 2016-08-30 14:15:46 +12:00
Michael Hudson-Doyle 549c00279d refactor network application code so that it does not assume all steps are subprocesses 2016-08-30 14:14:08 +12:00
Michael Hudson-Doyle 0a2546b3bd do not probe network on returning from network sub-screen
otherwise we overwrite our settings with the probed data!
2016-08-23 12:47:55 +12:00
Michael Hudson-Doyle 9ce7116f36 a touch more logging 2016-08-22 17:02:42 +12:00
Michael Hudson-Doyle a734e84980 refactor a bit 2016-08-22 17:02:42 +12:00
Michael Hudson-Doyle efa8ef43d2 allow configuration to be canceled 2016-08-22 17:02:42 +12:00
Michael Hudson-Doyle c658da012d factor some stuff out into an object
separation of concerns still pretty strange for now
2016-08-22 17:02:42 +12:00
Michael Hudson-Doyle ef01c7d291 break run_command in two
and use the two halves when applying network config (to allow cancellation)
2016-08-22 17:02:42 +12:00
Michael Hudson-Doyle 24347f1843 use run_command_async 2016-08-22 17:02:42 +12:00
Michael Hudson-Doyle e0a7aded85 update UI while apply network steps are running
as a special hack, the first time you apply changes in dry run mode it will
fail
2016-08-22 17:02:42 +12:00
Mathieu Trudel-Lapierre e02a4c8d55 Use netplan apply instead of restarting networkd ourselves.
Signed-off-by: Mathieu Trudel-Lapierre <mathieu.trudel-lapierre@canonical.com>
2016-08-18 16:17:22 -04:00
Mathieu Trudel-Lapierre 958ab1a339 Show decent error messages on failure.
Signed-off-by: Mathieu Trudel-Lapierre <mathieu.trudel-lapierre@canonical.com>
2016-08-18 16:15:28 -04:00
Michael Hudson-Doyle 9751b1a6b3 be more careful about checking exit statuses 2016-08-17 20:44:59 +12:00
Mathieu Trudel-Lapierre 0e93ab3e61 Check we're online, display network error otherwise. 2016-08-16 15:25:58 -04:00
Mathieu Trudel-Lapierre 11782ced12 Improve handling of the default routes. 2016-08-16 12:59:19 -04:00
Mathieu Trudel-Lapierre 18c7e93cc2 WIP: Remove actions, port to an approximation of network yaml v2. 2016-08-13 00:13:22 -04:00
Mathieu Trudel-Lapierre 1980c4e483 fake-merge mwhudson/network 2016-08-12 22:31:31 -04:00
Michael Hudson-Doyle ac06f25abd Refactor identity stuff to avoid dep on curtin in console-conf case.
A bit verbose perhaps, but works. Now console-conf only depends on curtin for
the network stuff.
2016-07-27 16:05:47 +12:00
Michael Hudson-Doyle d9f596c994 Move disk and install things from subiquitycore to subiquity. 2016-07-26 16:00:36 +12:00
Michael Hudson-Doyle f027382877 rename ControllerPolicy to BaseController 2016-07-26 14:17:30 +12:00
Michael Hudson-Doyle 264f698299 Fix flake8 warnings in subiquitycore.
Except for line length warnings, because life is too short of that.

A few of these are real bugs.
2016-07-25 14:44:51 +12:00
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