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 StorageCheckHandler.__init__(self) NormalSpoke.__init__(self, data, storage, payload, instclass)
def __init__(self, data, storage, payload): """ :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 """ self._error = None self._back_already_clicked = False self._storage_playground = None self.label_actions = None self.button_reset = None self.button_undo = None self._bootloader_observer = STORAGE.get_observer(BOOTLOADER) self._bootloader_observer.connect() StorageCheckHandler.__init__(self) NormalSpoke.__init__(self, data, storage, payload)
def _do_check(self): self.clear_errors() StorageCheckHandler.errors = [] StorageCheckHandler.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) StorageCheckHandler.errors = str(e).split("\n") self.data.bootloader.bootDrive = "" StorageCheckHandler.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 == ""
def __init__(self, data, storage, payload): """ :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 """ self._error = None self._back_already_clicked = False self._label_actions = None self._button_reset = None self._button_undo = None self._client = None self._blivetgui = None self._partitioning = None self._device_tree = None self._storage_module = STORAGE.get_proxy() StorageCheckHandler.__init__(self) NormalSpoke.__init__(self, data, storage, payload)
def __init__(self, *args, **kwargs): StorageCheckHandler.__init__(self) NormalSpoke.__init__(self, *args, **kwargs) self.applyOnSkip = True self._ready = False self._back_clicked = False self._disks_errors = [] self._last_clicked_overview = None self._cur_clicked_overview = None self._storage_module = STORAGE.get_proxy() self._device_tree = STORAGE.get_proxy(DEVICE_TREE) self._bootloader_module = STORAGE.get_proxy(BOOTLOADER) self._disk_init_module = STORAGE.get_proxy(DISK_INITIALIZATION) self._disk_select_module = STORAGE.get_proxy(DISK_SELECTION) # 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._available_disks = [] self._selected_disks = [] self._last_selected_disks = [] # Is the partitioning already configured? self._is_preconfigured = bool(self._storage_module.CreatedPartitioning) # Find a partitioning to use. self._partitioning = find_partitioning() self._last_partitioning_method = self._partitioning.PartitioningMethod # Create a partitioning request for the automatic partitioning. self._partitioning_request = PartitioningRequest() if self._last_partitioning_method == PARTITIONING_METHOD_AUTOMATIC: self._partitioning_request = PartitioningRequest.from_structure( self._partitioning.Request) # Get the UI elements. self._custom_part_radio_button = self.builder.get_object( "customRadioButton") self._blivet_gui_radio_button = self.builder.get_object( "blivetguiRadioButton") self._encrypted_checkbox = self.builder.get_object( "encryptionCheckbox") self._encryption_revealer = self.builder.get_object( "encryption_revealer") self._reclaim_checkbox = self.builder.get_object("reclaimCheckbox") self._reclaim_revealer = self.builder.get_object( "reclaim_checkbox_revealer") self._local_disks_box = self.builder.get_object("local_disks_box") self._specialized_disks_box = self.builder.get_object( "specialized_disks_box") self._local_viewport = self.builder.get_object("localViewport") self._specialized_viewport = self.builder.get_object( "specializedViewport") self._main_viewport = self.builder.get_object("storageViewport") self._main_box = self.builder.get_object("storageMainBox") # Configure the partitioning methods. self._configure_partitioning_methods()