system-setup: Remove ubuntu-wsl-integration from API and TUI.
This project is no longer supported under WSL. Remove integration in the TUI and API for it. Adapted tests and schema.
This commit is contained in:
parent
6114620956
commit
5695da5699
|
@ -94,24 +94,6 @@
|
|||
"interop_appendwindowspath": {
|
||||
"type": "boolean"
|
||||
},
|
||||
"gui_theme": {
|
||||
"type": "string"
|
||||
},
|
||||
"gui_followwintheme": {
|
||||
"type": "boolean"
|
||||
},
|
||||
"interop_guiintegration": {
|
||||
"type": "boolean"
|
||||
},
|
||||
"interop_audiointegration": {
|
||||
"type": "boolean"
|
||||
},
|
||||
"interop_advancedipdetection": {
|
||||
"type": "boolean"
|
||||
},
|
||||
"motd_wslnewsenabled": {
|
||||
"type": "boolean"
|
||||
},
|
||||
"automount_enabled": {
|
||||
"type": "boolean"
|
||||
},
|
||||
|
|
|
@ -6,12 +6,6 @@ WSLConfigurationBase:
|
|||
WSLConfigurationAdvanced:
|
||||
interop_enabled: false
|
||||
interop_appendwindowspath: false
|
||||
gui_theme: 'light'
|
||||
gui_followwintheme: true
|
||||
interop_guiintegration: true
|
||||
interop_audiointegration: true
|
||||
interop_advancedipdetection: true
|
||||
motd_wslnewsenabled: false
|
||||
automount_enabled: false
|
||||
automount_mountfstab: false
|
||||
Summary:
|
||||
|
|
|
@ -17,12 +17,6 @@ wslconfbase:
|
|||
wslconfadvanced:
|
||||
interop_enabled: false
|
||||
interop_appendwindowspath: false
|
||||
gui_theme: 'light'
|
||||
gui_followwintheme: true
|
||||
interop_guiintegration: true
|
||||
interop_audiointegration: true
|
||||
interop_advancedipdetection: true
|
||||
motd_wslnewsenabled: false
|
||||
automount_enabled: false
|
||||
automount_mountfstab: false
|
||||
shutdown: 'poweroff'
|
|
@ -453,12 +453,6 @@ class WSLConfigurationBase:
|
|||
|
||||
@attr.s(auto_attribs=True)
|
||||
class WSLConfigurationAdvanced:
|
||||
gui_theme: str = attr.ib(default='default')
|
||||
gui_followwintheme: bool = attr.ib(default=False)
|
||||
interop_guiintegration: bool = attr.ib(default=False)
|
||||
interop_audiointegration: bool = attr.ib(default=False)
|
||||
interop_advancedipdetection: bool = attr.ib(default=False)
|
||||
motd_wslnewsenabled: bool = attr.ib(default=True)
|
||||
automount_enabled: bool = attr.ib(default=True)
|
||||
automount_mountfstab: bool = attr.ib(default=True)
|
||||
interop_enabled: bool = attr.ib(default=True)
|
||||
|
|
|
@ -32,10 +32,7 @@ class WSLConfigurationAdvancedController(SubiquityTuiController):
|
|||
def run_answers(self):
|
||||
if all(elem in self.answers for elem in
|
||||
['interop_enabled', 'interop_appendwindowspath',
|
||||
'gui_theme', 'gui_followwintheme', 'interop_guiintegration',
|
||||
'interop_audiointegration', 'interop_advancedipdetection',
|
||||
'motd_wslnewsenabled', 'automount_enabled',
|
||||
'automount_mountfstab']):
|
||||
'automount_enabled', 'automount_mountfstab']):
|
||||
|
||||
reconfiguration = WSLConfigurationAdvanced(**self.answers)
|
||||
self.done(reconfiguration)
|
||||
|
|
|
@ -47,26 +47,11 @@ config_adv_default = {
|
|||
"enabled": "true",
|
||||
"appendwindowspath": "true"
|
||||
}
|
||||
},
|
||||
"ubuntu": {
|
||||
"GUI": {
|
||||
"theme": "default",
|
||||
"followwintheme": "false"
|
||||
},
|
||||
"Interop": {
|
||||
"guiintegration": "false",
|
||||
"audiointegration": "false",
|
||||
"advancedipdetection": "false"
|
||||
},
|
||||
"Motd": {
|
||||
"wslnewsenabled": "true"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
conf_type_to_file = {
|
||||
"wsl": "/etc/wsl.conf",
|
||||
"ubuntu": "/etc/ubuntu-wsl.conf"
|
||||
}
|
||||
|
||||
|
||||
|
@ -105,9 +90,6 @@ def default_loader(is_advanced=False):
|
|||
data = {}
|
||||
conf_ref = config_adv_default if is_advanced else config_base_default
|
||||
data = wsl_config_loader(data, conf_ref, "wsl")
|
||||
if is_advanced:
|
||||
data = \
|
||||
wsl_config_loader(data, conf_ref, "ubuntu")
|
||||
return data
|
||||
|
||||
|
||||
|
|
|
@ -21,16 +21,10 @@ log = logging.getLogger('system_setup.models.wslconfadvanced')
|
|||
|
||||
@attr.s
|
||||
class WSLConfigurationAdvanced(object):
|
||||
gui_theme = attr.ib()
|
||||
gui_followwintheme = attr.ib()
|
||||
interop_guiintegration = attr.ib()
|
||||
interop_audiointegration = attr.ib()
|
||||
interop_advancedipdetection = attr.ib()
|
||||
motd_wslnewsenabled = attr.ib()
|
||||
automount_enabled = attr.ib()
|
||||
automount_mountfstab = attr.ib()
|
||||
interop_enabled = attr.ib()
|
||||
interop_appendwindowspath = attr.ib()
|
||||
automount_enabled = attr.ib()
|
||||
automount_mountfstab = attr.ib()
|
||||
|
||||
|
||||
class WSLConfigurationAdvancedModel(object):
|
||||
|
|
|
@ -38,12 +38,6 @@ class WSLConfigurationAdvancedController(SubiquityController):
|
|||
'properties': {
|
||||
'interop_enabled': {'type': 'boolean'},
|
||||
'interop_appendwindowspath': {'type': 'boolean'},
|
||||
'gui_theme': {'type': 'string'},
|
||||
'gui_followwintheme': {'type': 'boolean'},
|
||||
'interop_guiintegration': {'type': 'boolean'},
|
||||
'interop_audiointegration': {'type': 'boolean'},
|
||||
'interop_advancedipdetection': {'type': 'boolean'},
|
||||
'motd_wslnewsenabled': {'type': 'boolean'},
|
||||
'automount_enabled': {'type': 'boolean'},
|
||||
'automount_mountfstab': {'type': 'boolean'}
|
||||
},
|
||||
|
@ -82,18 +76,6 @@ class WSLConfigurationAdvancedController(SubiquityController):
|
|||
self.model.wslconfadvanced.interop_enabled
|
||||
data.interop_appendwindowspath = \
|
||||
self.model.wslconfadvanced.interop_appendwindowspath
|
||||
data.gui_theme = \
|
||||
self.model.wslconfadvanced.gui_theme
|
||||
data.gui_followwintheme = \
|
||||
self.model.wslconfadvanced.gui_followwintheme
|
||||
data.interop_guiintegration = \
|
||||
self.model.wslconfadvanced.interop_guiintegration
|
||||
data.interop_audiointegration = \
|
||||
self.model.wslconfadvanced.interop_audiointegration
|
||||
data.interop_advancedipdetection = \
|
||||
self.model.wslconfadvanced.interop_advancedipdetection
|
||||
data.motd_wslnewsenabled = \
|
||||
self.model.wslconfadvanced.motd_wslnewsenabled
|
||||
data.automount_enabled = \
|
||||
self.model.wslconfadvanced.automount_enabled
|
||||
data.automount_mountfstab = \
|
||||
|
|
|
@ -1,12 +0,0 @@
|
|||
[GUI]
|
||||
followwintheme = true
|
||||
theme = light
|
||||
|
||||
[Interop]
|
||||
advancedipdetection = true
|
||||
audiointegration = true
|
||||
guiintegration = true
|
||||
|
||||
[Motd]
|
||||
wslnewsenabled = false
|
||||
|
|
@ -1,12 +0,0 @@
|
|||
[GUI]
|
||||
followwintheme = true
|
||||
theme = light
|
||||
|
||||
[Interop]
|
||||
advancedipdetection = true
|
||||
audiointegration = true
|
||||
guiintegration = true
|
||||
|
||||
[Motd]
|
||||
wslnewsenabled = false
|
||||
|
|
@ -13,7 +13,6 @@ from urwid import (
|
|||
from subiquitycore.ui.form import (
|
||||
Form,
|
||||
BooleanField,
|
||||
ChoiceField,
|
||||
simple_field,
|
||||
WantsToKnowFormField
|
||||
)
|
||||
|
@ -60,35 +59,6 @@ class WSLConfigurationAdvancedForm(Form):
|
|||
BooleanField(_("Append Windows Path"),
|
||||
help=_("Whether Windows Path will be append in the"
|
||||
" PATH environment variable in WSL."))
|
||||
gui_theme = \
|
||||
ChoiceField(_("GUI Theme"),
|
||||
help=_("This option changes the Ubuntu theme."),
|
||||
choices=["default", "light", "dark"])
|
||||
gui_followwintheme = \
|
||||
BooleanField(_("Follow Windows Theme"),
|
||||
help=_("This option manages whether the Ubuntu theme"
|
||||
" follows the Windows theme; that is, when "
|
||||
"Windows uses dark theme, Ubuntu also uses dark"
|
||||
" theme. Requires WSL interoperability enabled. "))
|
||||
interop_guiintegration = \
|
||||
BooleanField(_("Legacy GUI Integration"),
|
||||
help=_("This option enables the Legacy GUI Integration "
|
||||
"on Windows 10. Requires a Third-party X Server."))
|
||||
interop_audiointegration = \
|
||||
BooleanField(_("Legacy Audio Integration"),
|
||||
help=_("This option enables the Legacy Audio Integration "
|
||||
"on Windows 10. Requires PulseAudio for Windows "
|
||||
"Installed."))
|
||||
interop_advancedipdetection = \
|
||||
BooleanField(_("Advanced IP Detection"),
|
||||
help=_("This option enables advanced detection of IP by "
|
||||
"Windows IPv4 Address which is more reliable to "
|
||||
"use with WSL2. Requires WSL interoperability "
|
||||
"enabled."))
|
||||
motd_wslnewsenabled = \
|
||||
BooleanField(_("Enable WSL News"),
|
||||
help=_("This option allows you to control your MOTD News."
|
||||
" Toggling it on allows you to see the MOTD."))
|
||||
|
||||
|
||||
class WSLConfigurationAdvancedView(BaseView):
|
||||
|
@ -104,18 +74,6 @@ class WSLConfigurationAdvancedView(BaseView):
|
|||
configuration_data.interop_enabled,
|
||||
'interop_appendwindowspath':
|
||||
configuration_data.interop_appendwindowspath,
|
||||
'gui_theme':
|
||||
configuration_data.gui_theme,
|
||||
'gui_followwintheme':
|
||||
configuration_data.gui_followwintheme,
|
||||
'interop_guiintegration':
|
||||
configuration_data.interop_guiintegration,
|
||||
'interop_audiointegration':
|
||||
configuration_data.interop_audiointegration,
|
||||
'interop_advancedipdetection':
|
||||
configuration_data.interop_advancedipdetection,
|
||||
'motd_wslnewsenabled':
|
||||
configuration_data.motd_wslnewsenabled,
|
||||
'automount_enabled':
|
||||
configuration_data.automount_enabled,
|
||||
'automount_mountfstab':
|
||||
|
@ -139,18 +97,6 @@ class WSLConfigurationAdvancedView(BaseView):
|
|||
.interop_enabled.value,
|
||||
interop_appendwindowspath=self.form
|
||||
.interop_appendwindowspath.value,
|
||||
gui_theme=self.form
|
||||
.gui_theme.value,
|
||||
gui_followwintheme=self.form
|
||||
.gui_followwintheme.value,
|
||||
interop_guiintegration=self.form
|
||||
.interop_guiintegration.value,
|
||||
interop_audiointegration=self.form
|
||||
.interop_audiointegration.value,
|
||||
interop_advancedipdetection=self.form
|
||||
.interop_advancedipdetection.value,
|
||||
motd_wslnewsenabled=self.form
|
||||
.motd_wslnewsenabled.value,
|
||||
automount_enabled=self.form
|
||||
.automount_enabled.value,
|
||||
automount_mountfstab=self.form
|
||||
|
|
Loading…
Reference in New Issue