Commit Graph

428 Commits

Author SHA1 Message Date
Michael Hudson-Doyle 2f184ce9a6 fix display of install progress in footer 2018-06-13 14:02:40 +12:00
Michael Hudson-Doyle 1ab495c0a8 fix refreshing network view on network changes 2018-06-13 13:38:03 +12:00
Michael Hudson-Doyle d315751d60 add our own version of WidgetWrap
urwid doesn't know about the _select_first/last_selectable methods our
containers use to make tab-cycling work so its WidgetWrap doesn't
forward them along. So add a WidgetWrap that does, and use it in the one
place that it matters so far (more coming soon!).
2018-06-11 14:13:44 +12:00
Scott Moser 3e69673501 Fix writing of netplan configs
When user configures network with subiquity, it's rendered
netplan should be wholly definitive.  So, we remove the other files
that may have config.  This fixes a bug where running in an instance
when running on a system where cloud-init had rendered a 'match' with
'macaddress'.

When writing netplan we keep 'macaddress' match in place but drop
others.  The others may just wildcard from the installer environment,
but macaddress are likely by cloud-init or otherwise intentionally
written.

Also add an atomic write in subiquitycore/file_util and move the
netplan code into subiquitycore/netplan.py, and add some unit test
helpers from cloud-init.
2018-06-07 11:46:34 -04:00
Michael Hudson-Doyle 270ba0992a fix selectability in non-scrolling stretchy 2018-06-07 12:50:50 +12:00
Scott Moser 51a7169904 tox: Support running tests and flake8 in tox.
This puts into place a tox.ini for running unit tests without
a large amount of deps installed into the system. For example,
we did not want to need libnl-route-3-dev or build-essential installed
in the system in order to run unit tests.

In order avoid import errors in the modules due to these missing
dependencies, we have added a 'fake_deps/' directory that provides
mock'd objects of the dependencies that were used.

The only installed packages necessary for this to run should be
tox itself and its dependencies (pip and friends).  From a clean new
container we can then do:
  apt-get install tox
  git clone ...
  tox

Also along the way:
 * adjust setup.py to only need the DistUtilsExtra during 'build'.
   This means tox usage doesn't require python3-distutils-extra.
 * drop use of lsb_release in favor of built-in parsing.
   This python module wasn't doing much.  We can parse /etc/lsb-release
   ourselves with less footprint.  Also part of the motivation for this
   is that lsb_release was not on pypi.
 * replace use of StorageInfo in test_partition.py with a FakeStorageInfo
 * .gitignore: ignore only the top level 'probert' directory so that
   we can track fake_deps/probert.
 * fix a couple escape chars, by using raw strings (r'').
 * adjust gettext to return un-modified strings rather than '_(string)',
   but support old style if FAKE_TRANSLATE=mangle.
2018-06-05 17:59:46 -04:00
Michael Hudson-Doyle eab0f668ff use general machinery a little more 2018-05-31 10:28:29 +12:00
Michael Hudson-Doyle ed5e1d86b5 fix lint 2018-05-25 10:43:55 +12:00
Ryan Harper 053a1c249d pyflakes3 fixes for subiquitycore/__init__.py 2018-05-24 16:59:31 -05:00
Ryan Harper d7c8b1111b pep8 fixes for subiquitycore/core.py 2018-05-24 16:59:31 -05:00
Ryan Harper d293c52152 pep8 fixes for subiquitycore/tasksequence.py 2018-05-24 16:59:31 -05:00
Ryan Harper 4c1b6e6fc9 pep8 fixes for subiquitycore/ui/buttons.py 2018-05-24 16:59:31 -05:00
Ryan Harper 080ac4c245 pep8 fixes for subiquitycore/ui/form.py 2018-05-24 16:59:31 -05:00
Ryan Harper 5b666294e5 pep8 fixes for subiquitycore/ui/utils.py 2018-05-24 16:59:31 -05:00
Ryan Harper 7dba257b3c Drop mis-merged code from rebase 2018-05-24 16:59:31 -05:00
Ryan Harper 09d7398ec6 pep8 fixes for subiquitycore/__init__.py 2018-05-24 16:54:02 -05:00
Ryan Harper 5f233be9b1 pep8 fixes for subiquitycore/ui/views/network.py 2018-05-24 16:54:02 -05:00
Ryan Harper c908115ee0 pep8 fixes for subiquitycore/ui/views/network_configure_manual_interface.py 2018-05-24 16:54:02 -05:00
Ryan Harper c4c614860a pep8 fix drop commented code in subiquitycore/controllers/network.py 2018-05-24 16:54:02 -05:00
Ryan Harper 5660d72cf1 pep8 fixes for subiquitycore/controller.py 2018-05-24 16:51:51 -05:00
Ryan Harper 9159cd0003 pep8 fixes for subiquitycore/core.py 2018-05-24 16:51:51 -05:00
Ryan Harper dcc0cbc240 pep8 fixes for subiquitycore/i18n.py 2018-05-24 16:51:51 -05:00
Ryan Harper 02cbd2948c pep8 fixes for subiquitycore/prober.py 2018-05-24 16:51:51 -05:00
Ryan Harper bad0e9761f pep8 fixes for subiquitycore/tasksequence.py 2018-05-24 16:51:51 -05:00
Ryan Harper b328c3deed pep8 fixes for subiquitycore/utils.py 2018-05-24 16:51:51 -05:00
Ryan Harper cfc2c9d227 pep8 fixes for subiquitycore/view.py 2018-05-24 16:51:51 -05:00
Ryan Harper 69331754d9 pep8 fixes for subiquitycore/ui/anchors.py 2018-05-24 16:51:51 -05:00
Ryan Harper df5ff9d48e pep8 fixes for subiquitycore/ui/buttons.py 2018-05-24 16:51:51 -05:00
Ryan Harper 860edbc7b5 pep8 fixes for subiquitycore/ui/container.py 2018-05-24 16:51:51 -05:00
Ryan Harper 2d6cca8281 pep8 fixes for subiquitycore/ui/frame.py 2018-05-24 16:51:51 -05:00
Ryan Harper 7cbf8c2b69 pep8 fixes for subiquitycore/ui/form.py 2018-05-24 16:51:51 -05:00
Ryan Harper 4890d306fc pep8 fixes subiquitycore/ui/selector.py 2018-05-24 16:51:51 -05:00
Ryan Harper 762f5f3008 pep8 fixes for subiquitycore/ui/stretchy.py 2018-05-24 16:51:51 -05:00
Ryan Harper 18406b70ef pep8 fixes for subiquitycore/ui/utils.py 2018-05-24 16:51:51 -05:00
Ryan Harper c99941f3c5 pep8 fixes for subiquitycore/ui/views/login.py 2018-05-24 16:51:51 -05:00
Ryan Harper 62ea440b3d pep8 fixes for subiquitycore/ui/views/network.py 2018-05-24 16:51:51 -05:00
Ryan Harper 0fa5dcab28 pep8 fixes 2018-05-24 16:51:51 -05:00
Ryan Harper c8d4c51ddd pep8 fixes 2018-05-24 16:51:51 -05:00
Ryan Harper ae9412159d Don't use __name__ in getLogger 2018-05-24 16:51:51 -05:00
Ryan Harper 13ca352291 pep8 fixes for subiquitycore/ui/views/network_configure_wlan_interface.py 2018-05-24 16:51:51 -05:00
Ryan Harper 591be4ecbc pep8 fixes for subiquitycore.ui.views.network_default_route 2018-05-24 16:51:51 -05:00
Ryan Harper 45fabd78f2 pep8 fixes for subiquitycore.ui.views.tests.test_network_configure_manual_interface 2018-05-24 16:51:51 -05:00
Ryan Harper f2715a4735 pep8 fixes for subiquitycore.controllers.network 2018-05-24 16:51:51 -05:00
Ryan Harper b7e60f7b91 pep8 fixes for subiquitycore.testing.view_hewlpers 2018-05-24 16:51:51 -05:00
Ryan Harper 40caacaca3 pep8 fixes for subiquitycore.models.network 2018-05-24 16:51:51 -05:00
Ryan Harper a0bf68f3c4 pyflakes3 fixes
Add and enable pyflakes3 on console_conf, subiquity, subiquitycore and tests.
Replace NOQA markers with __all__ declarations for module imports.
Replace some obvious deadcode that voilates flake8, separate pass for removing
dead code rather than commenting will be handled later.
2018-05-24 16:51:51 -05:00
Michael Hudson-Doyle bd48ed9b1d remove SimpleList
and the Body widget, both utterly trivial
2018-05-25 09:35:25 +12:00
Ryan Harper 3c9b2e28c7 Drop commented out / dead code 2018-05-23 18:53:12 -05:00
Michael Hudson-Doyle 0fe1f5145c sprinkle in some more ".base_widget"s 2018-05-23 13:40:14 +12:00
Michael Hudson-Doyle 7441cb6df6 convert ScrollBarListBox to decoration rather than subclass
for all the usual reasons why composition is better than inheritance,
but in particular because I want to have a listbox that has a scrollbar
but not our custom tab behaviour in another branch. decoration in urwid
is not as transparent as it sometimes seems it should be but luckily
there's only one view that does much with its listbox and it was due
for some cleanup anyway.
2018-05-23 13:14:00 +12:00