Merge pull request #1503 from mwhudson/no-snaps-ssh-desktop

skip ssh and snaplist screens for desktop install
This commit is contained in:
Michael Hudson-Doyle 2022-12-02 11:40:57 +13:00 committed by GitHub
commit 404856aaf6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 33 additions and 0 deletions

View File

@ -171,6 +171,21 @@ class SnapListController(SubiquityController):
self.loader = self._make_loader()
self.app.hub.subscribe(InstallerChannels.SNAPD_NETWORK_CHANGE,
self.snapd_network_changed)
self.app.hub.subscribe(
(InstallerChannels.CONFIGURED, 'filesystem'),
self._confirmed)
self._active = True
async def _confirmed(self):
if self.app.base_model.source.current.variant == 'desktop':
await self.configured()
self._active = False
self.loader.stop()
def interactive(self):
if super().interactive():
return self._active
return False
def load_autoinstall_data(self, ai_data):
to_install = []

View File

@ -27,6 +27,7 @@ from subiquity.common.types import (
SSHIdentity,
)
from subiquity.server.controller import SubiquityController
from subiquity.server.types import InstallerChannels
log = logging.getLogger('subiquity.server.controllers.ssh')
@ -55,6 +56,23 @@ class SSHController(SubiquityController):
},
}
def __init__(self, app):
super().__init__(app)
self.app.hub.subscribe(
(InstallerChannels.CONFIGURED, 'filesystem'),
self._confirmed)
self._active = True
async def _confirmed(self):
if self.app.base_model.source.current.variant == 'desktop':
await self.configured()
self._active = False
def interactive(self):
if super().interactive():
return self._active
return False
def load_autoinstall_data(self, data):
if data is None:
return