List of TODOs
This is the list of identified TODOs for the OOBE.
This commit is contained in:
parent
b0299f255f
commit
57a2212c7b
|
@ -355,6 +355,7 @@ class WSLConfiguration2Data:
|
|||
wsl_motd_news: bool = attr.ib(default=True)
|
||||
automount: bool = attr.ib(default=True)
|
||||
mountfstab: bool = attr.ib(default=True)
|
||||
# TODO WSL: remove all duplications from WSLConfiguration1Data
|
||||
custom_path: str = attr.ib(default='/mnt/')
|
||||
custom_mount_opt: str = ''
|
||||
gen_host: bool = attr.ib(default=True)
|
||||
|
|
|
@ -37,6 +37,10 @@ class SystemSetupClient(SubiquityClient):
|
|||
]
|
||||
|
||||
def __init__(self, opts):
|
||||
# TODO WSL:
|
||||
# 1. remove reconfigure flag
|
||||
# 2. decide on which UI to show up based on existing user UID >=1000 (or default user set in wsl.conf?)
|
||||
# 3. provide an API for this for the flutter UI to know about it
|
||||
if opts.reconfigure:
|
||||
self.controllers = [
|
||||
"Welcome",
|
||||
|
|
|
@ -43,6 +43,8 @@ class WSLIdentityController(IdentityController):
|
|||
identity_data)
|
||||
if not self.opts.dry_run:
|
||||
username = identity_data.username
|
||||
# TODO WSL: remove this as a way to pass the values to the backend and keep that in memory
|
||||
# Then, remove the dry_run condition.
|
||||
with open('/var/run/ubuntu_wsl_oobe_assigned_account', 'w') as f:
|
||||
f.write(username)
|
||||
self.app.next_screen(self.endpoint.POST(identity_data))
|
||||
|
|
|
@ -6,6 +6,7 @@ from system_setup.ui.views.integration import IntegrationView
|
|||
|
||||
log = logging.getLogger('system_setup.client.controllers.integration')
|
||||
|
||||
# TODO WSL: rename Integration to something else and change endpoint name
|
||||
|
||||
class IntegrationController(SubiquityTuiController):
|
||||
endpoint_name = 'wslconf1'
|
||||
|
|
|
@ -36,6 +36,7 @@ class ClickAction(argparse.Action):
|
|||
|
||||
|
||||
def make_client_args_parser():
|
||||
# TODO WSL: update this. We have already done it on the past…
|
||||
parser = argparse.ArgumentParser(
|
||||
description='SUbiquity - Ubiquity for Servers',
|
||||
prog='subiquity')
|
||||
|
@ -47,6 +48,7 @@ def make_client_args_parser():
|
|||
parser.add_argument('--dry-run', action='store_true',
|
||||
dest='dry_run',
|
||||
help='menu-only, do not call installer function')
|
||||
# TODO WSL: remove any uneeded arguments
|
||||
parser.add_argument('--socket')
|
||||
parser.add_argument('--serial', action='store_true',
|
||||
dest='run_on_serial',
|
||||
|
@ -70,6 +72,7 @@ def make_client_args_parser():
|
|||
help='Synthesize a click on a button matching PAT')
|
||||
parser.add_argument('--answers')
|
||||
parser.add_argument('--server-pid')
|
||||
# TODO WSL: remove reconfigure flag and use dynamic decision (see below)
|
||||
parser.add_argument('--reconfigure', action='store_true')
|
||||
return parser
|
||||
|
||||
|
|
|
@ -30,6 +30,7 @@ class WSLConfiguration1(object):
|
|||
gen_resolvconf = attr.ib()
|
||||
|
||||
|
||||
# TODO WSL: remove from WSLConfiguration1Model to something more meaningful
|
||||
class WSLConfiguration1Model(object):
|
||||
""" Model representing integration
|
||||
"""
|
||||
|
@ -44,6 +45,7 @@ class WSLConfiguration1Model(object):
|
|||
d['gen_host'] = result.gen_host
|
||||
d['gen_resolvconf'] = result.gen_resolvconf
|
||||
self._wslconf1 = WSLConfiguration1(**d)
|
||||
# TODO WSL: Drop all calls of ubuntuwsl here and ensure the data are passed to the app model
|
||||
if not is_dry_run:
|
||||
# reset to keep everything as refreshed as new
|
||||
run_command(["/usr/bin/ubuntuwsl", "reset", "-y"],
|
||||
|
|
|
@ -21,6 +21,8 @@ from subiquitycore.utils import run_command
|
|||
|
||||
log = logging.getLogger('subiquity.models.wsl_integration_2')
|
||||
|
||||
# TODO WSL: Remove all attributes in wslconf1
|
||||
# TODO WSL: remove from WSLConfiguration1Model to something more meaningful
|
||||
|
||||
@attr.s
|
||||
class WSLConfiguration2(object):
|
||||
|
@ -66,6 +68,7 @@ class WSLConfiguration2Model(object):
|
|||
d['automount'] = result.automount
|
||||
d['mountfstab'] = result.mountfstab
|
||||
self._wslconf2 = WSLConfiguration2(**d)
|
||||
# TODO WSL: Drop all calls of ubuntuwsl here and ensure the data are passed to the app model
|
||||
if not is_dry_run:
|
||||
# reset to keep everything as refreshed as new
|
||||
run_command(["/usr/bin/ubuntuwsl", "reset", "-y"],
|
||||
|
|
|
@ -26,7 +26,7 @@ from subiquity.server.controller import SubiquityController
|
|||
|
||||
log = logging.getLogger('subiquity.server.controllers.wsl_integration_2')
|
||||
|
||||
|
||||
# TODO WSL: remove all duplicates from WSL config 1 controller
|
||||
class WSLConfiguration2Controller(SubiquityController):
|
||||
|
||||
endpoint = API.wslconf2
|
||||
|
|
|
@ -35,6 +35,8 @@ class SystemSetupServer(SubiquityServer):
|
|||
]
|
||||
|
||||
def __init__(self, opts, block_log_dir):
|
||||
# TODO WSL: remove reconfigure argument parser option and check dynamically what needs to be presented.
|
||||
# TODO WSL: we should have WSLConfiguration1 (renamed) here to show multiple pages.
|
||||
self.is_reconfig = opts.reconfigure
|
||||
if self.is_reconfig and not opts.dry_run:
|
||||
self.controllers = [
|
||||
|
|
|
@ -21,6 +21,10 @@ from subiquitycore.view import BaseView
|
|||
from subiquity.common.types import WSLConfiguration1Data
|
||||
|
||||
|
||||
# TODO WSL: rename from "integration" to something more meaningful
|
||||
|
||||
# TODO WSL: add another view for configure in another file
|
||||
|
||||
class MountEditor(StringEditor, WantsToKnowFormField):
|
||||
def keypress(self, size, key):
|
||||
''' restrict what chars we allow for mountpoints '''
|
||||
|
|
|
@ -14,6 +14,7 @@ from subiquitycore.view import BaseView
|
|||
|
||||
log = logging.getLogger("ubuntu_wsl_oobe.ui.views.overview")
|
||||
|
||||
# TODO WSL: remove this
|
||||
WSL_USERNAME_PATH = "/var/run/ubuntu_wsl_oobe_assigned_account"
|
||||
|
||||
|
||||
|
@ -22,6 +23,7 @@ class OverviewView(BaseView):
|
|||
|
||||
def __init__(self, controller):
|
||||
self.controller = controller
|
||||
# TODO WSL: remove this and always use in memory value
|
||||
user_name = "dryrun_user"
|
||||
if os.path.isfile(WSL_USERNAME_PATH):
|
||||
with open(WSL_USERNAME_PATH, 'r') as f:
|
||||
|
|
Loading…
Reference in New Issue