Exemple #1
0
 def guided(self, method):
     v = GuidedDiskSelectionView(self.model, self, method)
     self.ui.set_body(v)
     if self.answers['guided']:
         index = self.answers['guided-index']
         disk = self.model.all_disks()[index]
         v.choose_disk(None, disk)
Exemple #2
0
 def guided(self):
     title = _("Filesystem setup")
     footer = (_("Choose the installation target"))
     self.ui.set_header(title)
     self.ui.set_footer(footer)
     v = GuidedDiskSelectionView(self.model, self)
     self.ui.set_body(v)
     if self.answers['guided']:
         index = self.answers['guided-index']
         disk = self.model.all_disks()[index]
         v.choose_disk(None, disk)
Exemple #3
0
 def start_ui(self):
     if self._probe_task.task is None or not self._probe_task.task.done():
         self.ui.set_body(SlowProbing(self))
         schedule_task(self._wait_for_probing())
     elif True in self._crash_reports:
         self.ui.set_body(ProbingFailed(self))
         self.ui.body.show_error()
     else:
         # Once we've shown the filesystem UI, we stop listening for udev
         # events as merging system changes with configuration the user has
         # performed would be tricky.  Possibly worth doing though! Just
         # not today.
         self.convert_autoinstall_config()
         self.stop_listening_udev()
         self.ui.set_body(GuidedDiskSelectionView(self))
         pr = self._crash_reports.get(False)
         if pr is not None:
             self.app.show_error_report(pr)
         if self.answers['guided']:
             disk = self.model.all_disks()[self.answers['guided-index']]
             method = self.answers.get('guided-method')
             self.ui.body.form.guided_choice.value = {
                 'disk': disk,
                 'use_lvm': method == "lvm",
             }
             self.ui.body.done(self.ui.body.form)
         elif self.answers['manual']:
             self.manual()
 def make_guided_ui(self, status):
     if status.status == ProbeStatus.FAILED:
         self.app.show_error_report(status.error_report)
         return ProbingFailed(self, status.error_report)
     if status.error_report:
         self.app.show_error_report(status.error_report)
     return GuidedDiskSelectionView(self, status.disks)
Exemple #5
0
 def guided(self, method):
     v = GuidedDiskSelectionView(self.model, self, method)
     self.ui.set_body(v)
     if self.answers['guided']:
         index = self.answers['guided-index']
         v.form.guided.value = True
         v.form.guided_choice.disk.widget.index = index
         v.form._emit('done')
Exemple #6
0
 async def make_ui_real(self, status):
     if status.status == ProbeStatus.FAILED:
         self.app.show_error_report(status.error_report)
         return ProbingFailed(self, status.error_report)
     self.model = FilesystemModel(status.bootloader)
     self.model.load_server_data(status)
     if self.model.bootloader == Bootloader.PREP:
         self.supports_resilient_boot = False
     else:
         release = lsb_release()['release']
         self.supports_resilient_boot = release >= '20.04'
     if status.error_report:
         self.app.show_error_report(status.error_report)
     return GuidedDiskSelectionView(self)
Exemple #7
0
 def make_ui(self):
     if self._probe_task.task is None or not self._probe_task.task.done():
         schedule_task(self._wait_for_probing())
         return SlowProbing(self)
     elif True in self._crash_reports:
         pr = self._crash_reports[True]
         if pr is not None:
             self.app.show_error_report(pr.ref())
         return ProbingFailed(self)
     else:
         # Once we've shown the filesystem UI, we stop listening for udev
         # events as merging system changes with configuration the user has
         # performed would be tricky.  Possibly worth doing though! Just
         # not today.
         self.convert_autoinstall_config()
         self.stop_listening_udev()
         pr = self._crash_reports.get(False)
         if pr is not None:
             self.app.show_error_report(pr.ref())
         if self.answers:
             self.app.aio_loop.call_soon(self._start_answers)
         return GuidedDiskSelectionView(self)
Exemple #8
0
 def guided(self):
     self.ui.set_body(GuidedDiskSelectionView(self))