def __init__(self, *args, **kwargs): self._disks = kwargs.pop("disks") free = kwargs.pop("free") self.selected = kwargs.pop("selected")[:] GUIObject.__init__(self, *args, **kwargs) self._store = self.builder.get_object("disk_store") # populate the store for disk in self._disks: self._store.append([ "%s (%s)" % (disk.description, disk.serial), str(disk.size), str(free[disk.name][0]), disk.name, disk.id ]) treeview = self.builder.get_object("disk_view") model = treeview.get_model() itr = model.get_iter_first() selected_ids = [d.id for d in self.selected] selection = treeview.get_selection() while itr: disk_id = model.get_value(itr, 4) if disk_id in selected_ids: selection.select_iter(itr) itr = model.iter_next(itr)
def __init__(self, data): GUIObject.__init__(self, data) GUIInputCheckHandler.__init__(self) self._confirm_entry = self.builder.get_object("confirm_pw_entry") self._passphrase_entry = self.builder.get_object("passphrase_entry") self._save_button = self.builder.get_object("passphrase_save_button") self._strength_bar = self.builder.get_object("strength_bar") self._strength_label = self.builder.get_object("strength_label") self._passphrase_warning_image = self.builder.get_object("passphrase_warning_image") self._passphrase_warning_label = self.builder.get_object("passphrase_warning_label") # Set the offset values for the strength bar colors self._strength_bar.add_offset_value("low", 2) self._strength_bar.add_offset_value("medium", 3) self._strength_bar.add_offset_value("high", 4) # Configure the password policy, if available. Otherwise use defaults. self.policy = self.data.anaconda.pwpolicy.get_policy("luks") if not self.policy: self.policy = self.data.anaconda.PwPolicyData() # These will be set up later. self._pwq = None self._pwq_error = None self.passphrase = "" self._passphrase_match_check = self.add_check(self._passphrase_entry, self._checkMatch) self._confirm_match_check = self.add_check(self._confirm_entry, self._checkMatch) self._strength_check = self.add_check(self._passphrase_entry, self._checkStrength) self._ascii_check = self.add_check(self._passphrase_entry, self._checkASCII)
def __init__(self, *args, **kwargs): buttons = kwargs.pop("buttons", []) label = kwargs.pop("label", None) GUIObject.__init__(self, *args, **kwargs) if not buttons: widget = self.window.add_button(C_("GUI|Detailed Error Dialog", "_Cancel"), 0) else: buttonbox = self.builder.get_object("detailedButtonBox") i = 0 for button in buttons: widget = self.window.add_button(button, i) # Quit buttons should always appear left-most, unless it's the # only button. Then it should appear on the right. if button == C_("GUI|Detailed Error Dialog", "_Quit") and len(buttons) > 1: buttonbox.set_child_secondary(widget, True) i += 1 widget.set_can_default(True) widget.grab_default() if label: self.builder.get_object("detailedLabel").set_text(label)
def __init__(self, data, storage, payload): GUIObject.__init__(self, data) self.storage = storage self.payload = payload self._initialFreeSpace = Size(0) self._selectedReclaimableSpace = 0 self._actionStore = self.builder.get_object("actionStore") self._diskStore = self.builder.get_object("diskStore") self._selection = self.builder.get_object("diskView-selection") self._view = self.builder.get_object("diskView") self._diskStore = self.builder.get_object("diskStore") self._reclaimable_label = self.builder.get_object( "reclaimableSpaceLabel") self._selected_label = self.builder.get_object("selectedSpaceLabel") self._required_label = self.builder.get_object("requiredSpaceLabel") markup = self._required_label.get_label() self._required_label.set_markup(markup % size_str(self.payload.spaceRequired)) self._reclaimDescLabel = self.builder.get_object("reclaimDescLabel") self._resizeButton = self.builder.get_object("resizeButton") self._preserveButton = self.builder.get_object("preserveButton") self._shrinkButton = self.builder.get_object("shrinkButton") self._deleteButton = self.builder.get_object("deleteButton") self._resizeSlider = self.builder.get_object("resizeSlider")
def __init__(self, data, storage): GUIObject.__init__(self, data) self.storage = storage self.iscsi = self.storage.iscsi() self._discoveryError = None self._loginError = False self._discoveredNodes = [] self._update_devicetree = False self._authTypeCombo = self.builder.get_object("authTypeCombo") self._authNotebook = self.builder.get_object("authNotebook") self._iscsiNotebook = self.builder.get_object("iscsiNotebook") self._loginButton = self.builder.get_object("loginButton") self._loginAuthTypeCombo = self.builder.get_object("loginAuthTypeCombo") self._loginAuthNotebook = self.builder.get_object("loginAuthNotebook") self._loginGrid = self.builder.get_object("loginGrid") self._loginConditionNotebook = self.builder.get_object("loginConditionNotebook") self._configureGrid = self.builder.get_object("configureGrid") self._conditionNotebook = self.builder.get_object("conditionNotebook") self._bindCheckbox = self.builder.get_object("bindCheckbutton") self._startButton = self.builder.get_object("startButton") self._okButton = self.builder.get_object("okButton") self._cancelButton = self.builder.get_object("cancelButton") self._initiatorEntry = self.builder.get_object("initiatorEntry") self._store = self.builder.get_object("nodeStore")
def __init__(self, *args, **kwargs): buttons = kwargs.pop("buttons", []) label = kwargs.pop("label", None) GUIObject.__init__(self, *args, **kwargs) if not buttons: widget = self.window.add_button( C_("GUI|Detailed Error Dialog", "_Cancel"), 0) else: buttonbox = self.builder.get_object("detailedButtonBox") i = 0 for button in buttons: widget = self.window.add_button(button, i) # Quit buttons should always appear left-most, unless it's the # only button. Then it should appear on the right. if button == C_("GUI|Detailed Error Dialog", "_Quit") and len(buttons) > 1: buttonbox.set_child_secondary(widget, True) i += 1 widget.set_can_default(True) widget.grab_default() if label: self.builder.get_object("detailedLabel").set_text(label)
def __init__(self, data, storage, payload): GUIObject.__init__(self, data) self.storage = storage self.payload = payload self._initialFreeSpace = Size(0) self._selectedReclaimableSpace = Size(0) self._actionStore = self.builder.get_object("actionStore") self._diskStore = self.builder.get_object("diskStore") self._selection = self.builder.get_object("diskView-selection") self._view = self.builder.get_object("diskView") self._diskStore = self.builder.get_object("diskStore") self._reclaimable_label = self.builder.get_object("reclaimableSpaceLabel") self._selected_label = self.builder.get_object("selectedSpaceLabel") self._required_label = self.builder.get_object("requiredSpaceLabel") markup = _("Installation requires a total of <b>%s</b> for system data.") required_dev_size = self.payload.requiredDeviceSize(FS.biggest_overhead_FS()) self._required_label.set_markup(markup % escape_markup(str(required_dev_size))) self._reclaimDescLabel = self.builder.get_object("reclaimDescLabel") self._resizeButton = self.builder.get_object("resizeButton") self._preserveButton = self.builder.get_object("preserveButton") self._shrinkButton = self.builder.get_object("shrinkButton") self._deleteButton = self.builder.get_object("deleteButton") self._resizeSlider = self.builder.get_object("resizeSlider")
def __init__(self, data, storage, payload): GUIObject.__init__(self, data) self.storage = storage self.payload = payload self._initialFreeSpace = Size(0) self._selectedReclaimableSpace = Size(0) self._actionStore = self.builder.get_object("actionStore") self._diskStore = self.builder.get_object("diskStore") self._selection = self.builder.get_object("diskView-selection") self._view = self.builder.get_object("diskView") self._diskStore = self.builder.get_object("diskStore") self._reclaimable_label = self.builder.get_object("reclaimableSpaceLabel") self._selected_label = self.builder.get_object("selectedSpaceLabel") self._required_label = self.builder.get_object("requiredSpaceLabel") markup = _("Installation requires a total of <b>%s</b> for system data.") self._required_label.set_markup(markup % escape_markup(str(self.payload.spaceRequired))) self._reclaimDescLabel = self.builder.get_object("reclaimDescLabel") self._resizeButton = self.builder.get_object("resizeButton") self._preserveButton = self.builder.get_object("preserveButton") self._shrinkButton = self.builder.get_object("shrinkButton") self._deleteButton = self.builder.get_object("deleteButton") self._resizeSlider = self.builder.get_object("resizeSlider")
def __init__(self, *args): GUIObject.__init__(self, *args) GUIDialogInputCheckHandler.__init__(self) #epoch is increased when serversStore is repopulated self._epoch = 0 self._epoch_lock = threading.Lock()
def __init__(self, data, storage, payload): GUIObject.__init__(self, data) self.storage = storage self.payload = payload self._initialFreeSpace = Size(0) self._selectedReclaimableSpace = Size(0) self._actionStore = self.builder.get_object("actionStore") self._diskStore = self.builder.get_object("diskStore") self._selection = self.builder.get_object("diskView-selection") self._view = self.builder.get_object("diskView") self._diskStore = self.builder.get_object("diskStore") self._reclaimable_label = self.builder.get_object( "reclaimableSpaceLabel") self._selected_label = self.builder.get_object("selectedSpaceLabel") self._required_label = self.builder.get_object("requiredSpaceLabel") markup = self._required_label.get_label() required_dev_size = self.payload.requiredDeviceSize( FS.biggestOverheadFS()) self._required_label.set_markup(markup % escape_markup(str(required_dev_size))) self._reclaimDescLabel = self.builder.get_object("reclaimDescLabel") self._resizeButton = self.builder.get_object("resizeButton") self._preserveButton = self.builder.get_object("preserveButton") self._shrinkButton = self.builder.get_object("shrinkButton") self._deleteButton = self.builder.get_object("deleteButton") self._resizeSlider = self.builder.get_object("resizeSlider")
def __init__(self, data, desired_entropy): GUIObject.__init__(self, data) self._desired_entropy = desired_entropy self._progress_bar = self.builder.get_object("progressBar") self._terminate = False self.force_cont = False self._num_loops = 0
def __init__(self, *args, **kwargs): self._disks = kwargs.pop("disks") free = kwargs.pop("free") self.selected = kwargs.pop("selected")[:] GUIObject.__init__(self, *args, **kwargs) self._store = self.builder.get_object("disk_store") # populate the store for disk in self._disks: self._store.append(["%s (%s)" % (disk.description, disk.serial), str(disk.size), str(free[disk.name][0]), disk.name, disk.id]) treeview = self.builder.get_object("disk_view") model = treeview.get_model() itr = model.get_iter_first() selected_ids = [d.id for d in self.selected] selection = treeview.get_selection() while itr: disk_id = model.get_value(itr, 4) if disk_id in selected_ids: selection.select_iter(itr) itr = model.iter_next(itr)
def __init__(self, data, storage, payload): GUIObject.__init__(self, data) self.storage = storage self.payload = payload self._initialFreeSpace = Size(0) self._selectedReclaimableSpace = Size(0) self._actionStore = self.builder.get_object("actionStore") self._diskStore = self.builder.get_object("diskStore") self._selection = self.builder.get_object("diskView-selection") self._view = self.builder.get_object("diskView") self._diskStore = self.builder.get_object("diskStore") self._reclaimable_label = self.builder.get_object("reclaimableSpaceLabel") self._selected_label = self.builder.get_object("selectedSpaceLabel") self._required_label = self.builder.get_object("requiredSpaceLabel") markup = self._required_label.get_label() self._required_label.set_markup(markup % escape_markup(str(self.payload.spaceRequired))) self._reclaimDescLabel = self.builder.get_object("reclaimDescLabel") self._resizeButton = self.builder.get_object("resizeButton") self._preserveButton = self.builder.get_object("preserveButton") self._shrinkButton = self.builder.get_object("shrinkButton") self._deleteButton = self.builder.get_object("deleteButton") self._resizeSlider = self.builder.get_object("resizeSlider")
def __init__(self, data, servers, states): GUIObject.__init__(self, data) self._servers = servers self._active_server = None self._states = states # Use GUIDIalogInputCheckHandler to manipulate the sensitivity of the # add button, and check for valid input in on_entry_activated add_button = self.builder.get_object("addButton") GUIDialogInputCheckHandler.__init__(self, add_button) self.window.set_size_request(500, 400) working_column = self.builder.get_object("workingColumn") working_renderer = self.builder.get_object("workingRenderer") override_cell_property(working_column, working_renderer, "icon-name", self._render_working) self._serverEntry = self.builder.get_object("serverEntry") self._serversStore = self.builder.get_object("serversStore") self._addButton = self.builder.get_object("addButton") self._poolCheckButton = self.builder.get_object("poolCheckButton") self._ntsCheckButton = self.builder.get_object("ntsCheckButton") self._serverCheck = self.add_check(self._serverEntry, self._validate_server) self._serverCheck.update_check_status() self._update_timer = Timer()
def __init__(self, data, storage, to_format): GUIObject.__init__(self, data) self.storage = storage self.to_format = to_format self._notebook = self.builder.get_object("formatNotebook") self._cancel_button = self.builder.get_object("udCancelButton") self._ok_button = self.builder.get_object("udOKButton") self._unformatted_label = self.builder.get_object("udLabel") self._formatting_label = self.builder.get_object("formatLabel") self._warn_box = self.builder.get_object("warningBox") self._hub_label = self.builder.get_object("returnToHubLabel1") if len(self.to_format) > 0: self._unformatted_label.set_text("\n".join("/dev/" + d.name for d in to_format)) self._unformatted_label.set_text("\n".join( "/dev/" + d.name + " (" + d.busid + ")" for d in to_format)) else: self._unformatted_label.set_text("") # epoch is only increased when user interrupts action to return to hub self._epoch = 0 self._epoch_lock = threading.Lock()
def __init__(self, data, storage): GUIObject.__init__(self, data) self._addError = None self.storage = storage self.fcoe = self.storage.fcoe() self._update_devicetree = False
def __init__(self, data, l12_module): GUIObject.__init__(self, data) self._xkl_wrapper = XklWrapper.get_instance() self._switchingOptsStore = self.builder.get_object( "switchingOptsStore") self._l12_module = l12_module
def __init__(self, data, desired_entropy): GUIObject.__init__(self, data) self._desired_entropy = desired_entropy self._progress_bar = self.builder.get_object("progressBar") self._terminate = False self._started = 0 self.force_cont = False self._num_loops = 0
def __init__(self, data, storage): GUIObject.__init__(self, data) self.storage = storage self._notebook = self.builder.get_object("refreshNotebook") self._cancel_button = self.builder.get_object("refreshCancelButton") self._ok_button = self.builder.get_object("refreshOKButton")
def __init__(self, *args): GUIObject.__init__(self, *args) #used to ensure uniqueness of the threads' names self._threads_counter = 0 #epoch is increased when serversStore is repopulated self._epoch = 0 self._epoch_lock = threading.Lock()
def __init__(self, *args, **kwargs): self.payload = kwargs.pop("payload", None) self.showReclaim = kwargs.pop("showReclaim", None) GUIObject.__init__(self, *args, **kwargs) self.autoPartType = None self.encrypted = False self._grabObjects()
def __init__(self, data, storage): GUIObject.__init__(self, data) self.storage = storage self.iscsi = self.storage.iscsi() self._discoveryError = None self._loginError = False self._discoveredNodes = []
def __init__(self, data, storage, payload, instclass): GUIObject.__init__(self, data) common.NormalSpoke.__init__(self, storage, payload, instclass) # Add a help handler self.window.connect_after("help-button-clicked", self._on_help_clicked) # warning message self._current_warning_message = ""
def __init__(self, user, groupDict, data): GUIObject.__init__(self, data) GUIDialogInputCheckHandler.__init__(self) self._user = user self._groupDict = groupDict # Track whether the user has requested a home directory other # than the default. self._origHome = None self._homeSet = False
def __init__(self, data, storage): GUIObject.__init__(self, data) self.storage = storage self.iscsi = self.storage.iscsi() self._discoveryError = None self._loginError = False self._discoveredNodes = [] self._update_devicetree = False
def __init__(self, data): GUIObject.__init__(self, data) self._view = self.builder.get_object("disk_tree_view") self._store = self.builder.get_object("disk_store") self._selection = self.builder.get_object("disk_selection") self._summary_label = self.builder.get_object("summary_label") self._set_button = self.builder.get_object("set_as_boot_button") self._remove_button = self.builder.get_object("remove_button")
def __init__(self, *args): GUIObject.__init__(self, *args) # Use GUIDIalogInputCheckHandler to manipulate the sensitivity of the # add button, and check for valid input in on_entry_activated add_button = self.builder.get_object("addButton") GUIDialogInputCheckHandler.__init__(self, add_button) #epoch is increased when serversStore is repopulated self._epoch = 0 self._epoch_lock = threading.Lock()
def __init__(self, data): GUIObject.__init__(self, data) self._proxyCheck = self.builder.get_object("enableProxyCheck") self._proxyInfoBox = self.builder.get_object("proxyInfoBox") self._authCheck = self.builder.get_object("enableAuthCheck") self._proxyAuthBox = self.builder.get_object("proxyAuthBox") self._proxyURLEntry = self.builder.get_object("proxyURLEntry") self._proxyUsernameEntry = self.builder.get_object("proxyUsernameEntry") self._proxyPasswordEntry = self.builder.get_object("proxyPasswordEntry")
def __init__(self, user, data): GUIObject.__init__(self, data) self._saveButton = self.builder.get_object("save_button") GUIDialogInputCheckHandler.__init__(self, self._saveButton) self._user = user # Track whether the user has requested a home directory other # than the default. self._origHome = None self._homeSet = False
def __init__(self, data): GUIObject.__init__(self, data) self._proxyCheck = self.builder.get_object("enableProxyCheck") self._proxyInfoBox = self.builder.get_object("proxyInfoBox") self._authCheck = self.builder.get_object("enableAuthCheck") self._proxyAuthBox = self.builder.get_object("proxyAuthBox") self._proxyURLEntry = self.builder.get_object("proxyURLEntry") self._proxyUsernameEntry = self.builder.get_object( "proxyUsernameEntry") self._proxyPasswordEntry = self.builder.get_object( "proxyPasswordEntry")
def __init__(self, user, data): GUIObject.__init__(self, data) saveButton = self.builder.get_object("save_button") GUIDialogInputCheckHandler.__init__(self, saveButton) self._user = user # Track whether the user has requested a home directory other # than the default. This way, if the home directory is left as # the default, the default will change if the username changes. # Otherwise, once the directory is set it stays that way. self._origHome = None
def __init__(self, data): GUIObject.__init__(self, data) self._passphrase_entry = self.builder.get_object("passphrase_entry") self._confirm_entry = self.builder.get_object("confirm_pw_entry") self._save_button = self.builder.get_object("passphrase_save_button") self._strength_bar = self.builder.get_object("strength_bar") self._strength_label = self.builder.get_object("strength_label") self._passphrase_warning_image = self.builder.get_object("passphrase_warning_image") self._passphrase_warning_label = self.builder.get_object("passphrase_warning_label") # Set the offset values for the strength bar colors self._strength_bar.add_offset_value("low", 2) self._strength_bar.add_offset_value("medium", 3) self._strength_bar.add_offset_value("high", 4) # Setup the password checker for passphrase checking self._checker = input_checking.PasswordChecker(initial_password_content = self._passphrase_entry.get_text(), initial_password_confirmation_content = self._confirm_entry.get_text(), policy = input_checking.get_policy(self.data, "luks")) # configure the checker for passphrase checking self._checker.secret_type = constants.SecretType.PASSPHRASE # connect UI updates to check results self._checker.checks_done.connect(self._set_status) self.passphrase = "" self._passphrase_good_enough = False # check that the content of the passphrase field & the conformation field are the same self._confirm_check = input_checking.PasswordConfirmationCheck() # check passphrase validity, quality and strength self._validity_check = input_checking.PasswordValidityCheck() # connect UI updates to validity check results self._validity_check.result.password_score_changed.connect(self._set_password_strength) self._validity_check.result.status_text_changed.connect(self._set_password_status_text) # check if the passphrase contains non-ascii characters self._ascii_check = input_checking.PasswordASCIICheck() # check if the passphrase is empty self._empty_check = input_checking.PasswordEmptyCheck() # register the individual checks with the checker in proper order # 1) are both entered passphrases the same ? # 2) is the passphrase valid according to the current password checking policy ? # 3) is the passphrase free of non-ASCII characters ? self._checker.add_check(self._confirm_check) self._checker.add_check(self._validity_check) self._checker.add_check(self._ascii_check) self._checker.add_check(self._empty_check)
def __init__(self, data, storage, payload, instclass): """Create a new Hub instance. The arguments this base class accepts defines the API that Hubs have to work with. A Hub does not get free reign over everything in the anaconda class, as that would be a big mess. Instead, a Hub may count on the following: ksdata -- An instance of a pykickstart Handler object. The Hub uses this to populate its UI with defaults and to pass results back after it has run. storage -- An instance of storage.Storage. This is useful for determining what storage devices are present and how they are configured. payload -- An instance of a payload.Payload subclass. This is useful for displaying and selecting packages to install, and in carrying out the actual installation. instclass -- An instance of a BaseInstallClass subclass. This is useful for determining distribution-specific installation information like default package selections and default partitioning. """ GUIObject.__init__(self, data) common.Hub.__init__(self, storage, payload, instclass) # enable the autoContinue feature if we are in kickstart # mode, but if the user interacts with the hub, it will be # disabled again self._autoContinue = flags.automatedInstall self._hubs_collection.append(self) self.timeout = None self._incompleteSpokes = [] self._inSpoke = False self._notReadySpokes = [] self._spokes = {} # Used to store the last result of _updateContinue self._warningMsg = None self._checker = None # Flag to indicate the user can continue even if the checker indicates an error. # The checker itself is left alone so the error message doesn't accidentally get # cleaered. self._checker_ignore = False self._spokesToStepIn = [] self._spokeAutostepIndex = 0 self._gridColumns = 3
def __init__(self, data): GUIObject.__init__(self, data) self._confirm_entry = self.builder.get_object("confirm_entry") self._passphrase_entry = self.builder.get_object("passphrase_entry") self._save_button = self.builder.get_object("passphrase_save_button") self._strength_label = self.builder.get_object("strength_label") # These will be set up later. self._strength_bar = None self._pwq = None self._pwq_error = None self.passphrase = ""
def __init__(self, *args, **kwargs): self.mountpoints = kwargs.pop("mountpoints", []) GUIObject.__init__(self, *args, **kwargs) self.size = Size(0) self.mountpoint = "" self._error = False store = self.builder.get_object("mountPointStore") populate_mountpoint_store(store, self.mountpoints) self.builder.get_object("addMountPointEntry").set_model(store) completion = self.builder.get_object("mountPointCompletion") completion.set_text_column(0) completion.set_popup_completion(True) self._warningLabel = self.builder.get_object("mountPointWarningLabel")
def __init__(self, data, servers, states): GUIObject.__init__(self, data) self._servers = servers self._active_server = None self._states = states # self.window.set_size_request(500, 400) working_column = self.builder.get_object("workingColumn") working_renderer = self.builder.get_object("workingRenderer") override_cell_property(working_column, working_renderer, "icon-name", self._render_working) self._serversView = self.builder.get_object("serversView") self._serversStore = self.builder.get_object("serversStore") self._update_timer = Timer()
def __init__(self, data, device_tree, request: DeviceFactoryRequest, permissions: DeviceFactoryPermissions, disks, names): GUIObject.__init__(self, data) self._device_tree = device_tree self._disks = disks self._request = request self._permissions = permissions self._original_name = request.container_name self._container_names = names self._original_luks_version = request.luks_version self._error = "" self._title_label = self.builder.get_object( "container_dialog_title_label") self._dialog_label = self.builder.get_object("container_dialog_label") self._error_label = self.builder.get_object("containerErrorLabel") self._name_entry = self.builder.get_object("container_name_entry") self._encryptCheckbutton = self.builder.get_object( "containerEncryptedCheckbox") self._luks_combo = self.builder.get_object("luksVersionCombo") self._luks_store = self.builder.get_object("luksVersionStore") self._luks_label = self.builder.get_object("luksVersionLabel") self._raidStoreFilter = self.builder.get_object( "containerRaidStoreFiltered") self._store = self.builder.get_object("disk_store") self._treeview = self.builder.get_object("container_disk_view") self._sizeCombo = self.builder.get_object("containerSizeCombo") self._sizeEntry = self.builder.get_object("containerSizeEntry") self._raidLevelCombo = self.builder.get_object( "containerRaidLevelCombo") self._raidLevelLabel = self.builder.get_object( "containerRaidLevelLabel") self._save_button = self.builder.get_object("container_save_button") GUIDialogInputCheckHandler.__init__(self, self._save_button) self._supported_raid_levels = get_supported_container_raid_levels( self._device_tree, self._request.device_type) self._set_labels() self._populate_disks() self._select_disks() self._populate_raid() self._set_name() self._set_size() self._set_encryption() self._populate_luks()
def __init__(self, data, storage): GUIObject.__init__(self, data) self._addError = None self.storage = storage self.fcoe = self.storage.fcoe() self._addButton = self.builder.get_object("addButton") self._cancelButton = self.builder.get_object("cancelButton") self._addSpinner = self.builder.get_object("addSpinner") self._errorBox = self.builder.get_object("errorBox") self._nicCombo = self.builder.get_object("nicCombo") self._dcbCheckbox = self.builder.get_object("dcbCheckbox") self._autoCheckbox = self.builder.get_object("autoCheckbox")
def __init__(self, data, storage, namespaces): GUIObject.__init__(self, data) self._storage = storage self._namespaces = namespaces self._nvdimm_proxy = STORAGE.get_proxy(NVDIMM) self._startButton = self.builder.get_object("startButton") self._infoLabel = self.builder.get_object("infoLabel") self._devicesLabel = self.builder.get_object("devicesLabel") self._cancelButton = self.builder.get_object("cancelButton") self._okButton = self.builder.get_object("okButton") self._reconfigureSpinner = self.builder.get_object("reconfigureSpinner") self._repopulateSpinner = self.builder.get_object("repopulateSpinner") self._repopulateLabel = self.builder.get_object("repopulateLabel") self._sectorSizeLabel = self.builder.get_object("sectorSizeLabel") self._sectorSizeSpinButton = self.builder.get_object("sectorSizeSpinButton") self._conditionNotebook = self.builder.get_object("conditionNotebook") self._deviceErrorLabel = self.builder.get_object("deviceErrorLabel")
def __init__(self, data, storage, namespaces): GUIObject.__init__(self, data) self.namespaces = namespaces self.storage = storage self._error = None self._update_devicetree = False self._startButton = self.builder.get_object("startButton") self._infoLabel = self.builder.get_object("infoLabel") self._devicesLabel = self.builder.get_object("devicesLabel") self._cancelButton = self.builder.get_object("cancelButton") self._okButton = self.builder.get_object("okButton") self._reconfigureSpinner = self.builder.get_object("reconfigureSpinner") self._repopulateSpinner = self.builder.get_object("repopulateSpinner") self._repopulateLabel = self.builder.get_object("repopulateLabel") self._sectorSizeLabel = self.builder.get_object("sectorSizeLabel") self._sectorSizeSpinButton = self.builder.get_object("sectorSizeSpinButton") self._conditionNotebook = self.builder.get_object("conditionNotebook")
def __init__(self, data): GUIObject.__init__(self, data) GUIInputCheckHandler.__init__(self) self._confirm_entry = self.builder.get_object("confirm_pw_entry") self._passphrase_entry = self.builder.get_object("passphrase_entry") self._save_button = self.builder.get_object("passphrase_save_button") self._strength_bar = self.builder.get_object("strength_bar") self._strength_label = self.builder.get_object("strength_label") self._passphrase_warning_image = self.builder.get_object("passphrase_warning_image") self._passphrase_warning_label = self.builder.get_object("passphrase_warning_label") # Set the offset values for the strength bar colors self._strength_bar.add_offset_value("low", 2) self._strength_bar.add_offset_value("medium", 3) self._strength_bar.add_offset_value("high", 4) self._strength_bar.add_offset_value("full", 4) # Configure the password policy, if available. Otherwise use defaults. self.policy = self.data.anaconda.pwpolicy.get_policy("luks") if not self.policy: self.policy = self.data.anaconda.PwPolicyData() # These will be set up later. self._pwq = None self._pwq_error = None self.passphrase = "" # the passphrase confirmation needs to be checked whenever either of the password # fields change. attach to the confirm field and check changes to the # password field in on_passphrase_changed self._passphrase_match_check = self.add_check(self._confirm_entry, self._checkMatch) self._strength_check = self.add_check(self._passphrase_entry, self._checkStrength) self._ascii_check = self.add_check(self._passphrase_entry, self._checkASCII) # set the visibility of the password entries set_password_visibility(self._passphrase_entry, False) set_password_visibility(self._confirm_entry, False)
def __init__(self, data, storage): GUIObject.__init__(self, data) self.storage = storage self.zfcp = self.storage.zfcp() self._discoveryError = None self._update_devicetree = False # grab all of the ui objects self._configureGrid = self.builder.get_object("configureGrid") self._conditionNotebook = self.builder.get_object("conditionNotebook") self._startButton = self.builder.get_object("startButton") self._okButton = self.builder.get_object("okButton") self._cancelButton = self.builder.get_object("cancelButton") self._retryButton = self.builder.get_object("retryButton") self._deviceEntry = self.builder.get_object("deviceEntry") self._wwpnEntry = self.builder.get_object("wwpnEntry") self._lunEntry = self.builder.get_object("lunEntry")
def __init__(self, data, storage): GUIObject.__init__(self, data) self.storage = storage self.dasd = [d for d in self.storage.devices if d.type == "dasd"] self.dasd.sort(key=lambda d: d.name) self._discoveryError = None self._update_devicetree = False # grab all of the ui objects self._configureGrid = self.builder.get_object("configureGrid") self._conditionNotebook = self.builder.get_object("conditionNotebook") self._startButton = self.builder.get_object("startButton") self._okButton = self.builder.get_object("okButton") self._cancelButton = self.builder.get_object("cancelButton") self._retryButton = self.builder.get_object("retryButton") self._deviceEntry = self.builder.get_object("deviceEntry") self._spinner = self.builder.get_object("waitSpinner")
def __init__(self, data, storage, to_format): GUIObject.__init__(self, data) self.storage = storage self.to_format = to_format self._notebook = self.builder.get_object("formatNotebook") self._cancel_button = self.builder.get_object("udCancelButton") self._ok_button = self.builder.get_object("udOKButton") self._unformatted_label = self.builder.get_object("udLabel") self._formatting_label = self.builder.get_object("formatLabel") self._warn_box = self.builder.get_object("warningBox") self._hub_label = self.builder.get_object("returnToHubLabel1") if len(self.to_format) > 0: self._unformatted_label.set_text("\n".join("/dev/" + d for d in to_format)) else: self._unformatted_label.set_text("") # epoch is only increased when user interrupts action to return to hub self._epoch = 0 self._epoch_lock = threading.Lock()
def __init__(self, data, storage): GUIObject.__init__(self, data) self.storage = storage self.dasd = self.storage.dasd self._discoveryError = None self._update_devicetree = False # grab all of the ui objects self._dasdNotebook = self.builder.get_object("dasdNotebook") self._configureGrid = self.builder.get_object("configureGrid") self._conditionNotebook = self.builder.get_object("conditionNotebook") self._startButton = self.builder.get_object("startButton") self._okButton = self.builder.get_object("okButton") self._cancelButton = self.builder.get_object("cancelButton") self._deviceEntry = self.builder.get_object("deviceEntry") self._spinner = self.builder.get_object("waitSpinner")