def __init__(self, *args, **kwargs): StorageChecker.__init__(self) NormalSpoke.__init__(self, *args, **kwargs) self.applyOnSkip = True self._ready = False self.autoPartType = None self.encrypted = False self.passphrase = "" self.selected_disks = self.data.ignoredisk.onlyuse[:] # This list contains all possible disks that can be included in the install. # All types of advanced disks should be set up for us ahead of time, so # there should be no need to modify this list. self.disks = [] if not flags.automatedInstall: # default to using autopart for interactive installs self.data.autopart.autopart = True self.autopart = self.data.autopart.autopart self.autoPartType = None self.clearPartType = CLEARPART_TYPE_NONE if self.data.zerombr.zerombr and arch.isS390(): # run dasdfmt on any unformatted DASDs automatically threadMgr.add(AnacondaThread(name=constants.THREAD_DASDFMT, target=self.run_dasdfmt)) self._previous_autopart = False self._last_clicked_overview = None self._cur_clicked_overview = None self._grabObjects()
def __init__(self, *args, **kwargs): StorageChecker.__init__(self) NormalSpoke.__init__(self, *args, **kwargs) self.applyOnSkip = True self._ready = False self.autoPartType = None self.encrypted = False self.passphrase = "" self.selected_disks = self.data.ignoredisk.onlyuse[:] # This list contains all possible disks that can be included in the install. # All types of advanced disks should be set up for us ahead of time, so # there should be no need to modify this list. self.disks = [] if not flags.automatedInstall: # default to using autopart for interactive installs self.data.autopart.autopart = True self.autopart = self.data.autopart.autopart self.autoPartType = None self.clearPartType = CLEARPART_TYPE_NONE self._previous_autopart = False self._last_clicked_overview = None self._cur_clicked_overview = None self._grabObjects()
def __init__(self, data, storage, payload, instclass): """ :see: pyanaconda.ui.common.Spoke.__init__ :param data: data object passed to every spoke to load/store data from/to it :type data: pykickstart.base.BaseHandler :param storage: object storing storage-related information (disks, partitioning, bootloader, etc.) :type storage: blivet.Blivet :param payload: object storing payload-related information :type payload: pyanaconda.payload.Payload :param instclass: distribution-specific information :type instclass: pyanaconda.installclass.BaseInstallClass """ self._error = None self._back_already_clicked = False self._storage_playground = None self.label_actions = None self.button_reset = None self.button_undo = None StorageChecker.__init__(self, min_ram=isys.MIN_GUI_RAM) NormalSpoke.__init__(self, data, storage, payload, instclass)
def __init__(self, *args, **kwargs): StorageChecker.__init__(self, min_ram=isys.MIN_GUI_RAM) NormalSpoke.__init__(self, *args, **kwargs) self.applyOnSkip = True self._ready = False self.autoPartType = None self.encrypted = False self.passphrase = "" self.selected_disks = self.data.ignoredisk.onlyuse[:] self._last_selected_disks = None self._back_clicked = False self.autopart_missing_passphrase = False self.disks_errors = [] # This list contains all possible disks that can be included in the install. # All types of advanced disks should be set up for us ahead of time, so # there should be no need to modify this list. self.disks = [] if not flags.automatedInstall: # default to using autopart for interactive installs self.data.autopart.autopart = True self.autopart = self.data.autopart.autopart self.autoPartType = None self.clearPartType = CLEARPART_TYPE_NONE if self.data.zerombr.zerombr and arch.isS390(): # run dasdfmt on any unformatted DASDs automatically threadMgr.add( AnacondaThread(name=constants.THREAD_DASDFMT, target=self.run_dasdfmt)) self._previous_autopart = False self._last_clicked_overview = None self._cur_clicked_overview = None self._grabObjects()
def _do_check(self): self.clear_errors() StorageChecker.errors = [] StorageChecker.warnings = [] # We can't overwrite the main Storage instance because all the other # spokes have references to it that would get invalidated, but we can # achieve the same effect by updating/replacing a few key attributes. self.storage.devicetree._devices = self._storage_playground.devicetree._devices self.storage.devicetree._actions = self._storage_playground.devicetree._actions self.storage.devicetree._hidden = self._storage_playground.devicetree._hidden self.storage.devicetree.names = self._storage_playground.devicetree.names self.storage.roots = self._storage_playground.roots # set up bootloader and check the configuration try: self.storage.set_up_bootloader() except BootLoaderError as e: log.error("storage configuration failed: %s", e) StorageChecker.errors = str(e).split("\n") self.data.bootloader.bootDrive = "" StorageChecker.checkStorage(self) if self.errors: self.set_warning( _("Error checking storage configuration. <a href=\"\">Click for details</a> or press Done again to continue." )) elif self.warnings: self.set_warning( _("Warning checking storage configuration. <a href=\"\">Click for details</a> or press Done again to continue." )) # on_info_bar_clicked requires self._error to be set, so set it to the # list of all errors and warnings that storage checking found. self._error = "\n".join(self.errors + self.warnings) return self._error == ""