pyanaconda.ui.gui.spokes.lib package

Submodules

pyanaconda.ui.gui.spokes.lib.accordion module

pyanaconda.ui.gui.spokes.lib.accordion.newSelectorFromDevice(device, mountpoint='')
pyanaconda.ui.gui.spokes.lib.accordion.updateSelectorFromDevice(selector, device, mountpoint='')

Create a MountpointSelector from a Device object template. This method should be used whenever constructing a new selector, or when setting a bunch of attributes on an existing selector. For just changing the name or size, it’s probably fine to do it by hand.

This method returns the selector created.

If given a selector parameter, attributes will be set on that object instead of creating a new one. The optional mountpoint parameter allows for specifying the mountpoint if it cannot be determined from the device (like for a Root specifying an existing installation).

class pyanaconda.ui.gui.spokes.lib.accordion.Accordion

Bases: gi.overrides.Gtk.Box

addPage(contents, cb)
allMembers
allPages
allSelectors
expandPage(pageTitle)
removeAllPages()
removePage(pageTitle)
class pyanaconda.ui.gui.spokes.lib.accordion.Page(title)

Bases: gi.overrides.Gtk.Box

addSelector(device, cb, mountpoint='')
removeSelector(selector)
class pyanaconda.ui.gui.spokes.lib.accordion.UnknownPage(title)

Bases: pyanaconda.ui.gui.spokes.lib.accordion.Page

addSelector(device, cb, mountpoint='')
removeSelector(selector)
class pyanaconda.ui.gui.spokes.lib.accordion.CreateNewPage(title, createClickedCB, autopartTypeChangedCB, partitionsToReuse=True)

Bases: pyanaconda.ui.gui.spokes.lib.accordion.Page

pyanaconda.ui.gui.spokes.lib.cart module

class pyanaconda.ui.gui.spokes.lib.cart.SelectedDisksDialog(data)

Bases: pyanaconda.ui.gui.GUIObject

builderObjects = ['selected_disks_dialog', 'disk_store', 'disk_tree_view']
initialize(disks, free, showRemove=True, setBoot=True)
mainWidgetName = 'selected_disks_dialog'
on_close_clicked(button)
on_remove_clicked(button)
on_selection_changed(*args)
on_set_as_boot_clicked(button)
refresh(disks, free, showRemove=True, setBoot=True)
run()
uiFile = 'spokes/lib/cart.glade'

pyanaconda.ui.gui.spokes.lib.custom_storage_helpers module

Helper functions and classes for custom partitioning.

pyanaconda.ui.gui.spokes.lib.custom_storage_helpers.size_from_entry(entry, lower_bound=None, units=None)

Get a Size object from an entry field.

Parameters:
  • lower_bound (blivet.size.Size or NoneType) – lower bound for size returned,
  • units (str or NoneType) – units to use if none obtained from entry
Returns:

a Size object corresponding to the text in the entry field

Return type:

blivet.size.Size or NoneType

Units default to bytes if no units specified in entry or units.

Rounds up to lower_bound, if value in entry field corresponds to a smaller value. The default for lower_bound is None, yielding no rounding.

pyanaconda.ui.gui.spokes.lib.custom_storage_helpers.populate_mountpoint_store(store, used_mountpoints)
pyanaconda.ui.gui.spokes.lib.custom_storage_helpers.validate_label(label, fmt)

Returns a code indicating either that the given label can be set for this filesystem or the reason why it cannot.

In the case where the format cannot assign a label, the empty string stands for accept the default, but in the case where the format can assign a label the empty string represents itself.

Parameters:
  • label (str) – The label
  • fmt (DeviceFormat) – The device format to label
pyanaconda.ui.gui.spokes.lib.custom_storage_helpers.validate_mountpoint(mountpoint, used_mountpoints, strict=True)
pyanaconda.ui.gui.spokes.lib.custom_storage_helpers.get_raid_level(device)
pyanaconda.ui.gui.spokes.lib.custom_storage_helpers.selectedRaidLevel(raidLevelCombo)

Interpret the selection of a RAID level combo box.

Returns:the selected raid level, None if none selected
Return type:instance of blivet.devicelibs.raid.RaidLevel or NoneType
pyanaconda.ui.gui.spokes.lib.custom_storage_helpers.raidLevelSelection(raid_level)

Returns a string corresponding to the RAID level.

Parameters:raid_level (instance of blivet.devicelibs.raid.RAID or None) – a raid level
Returns:a string corresponding to this raid level
Return type:str
pyanaconda.ui.gui.spokes.lib.custom_storage_helpers.defaultRaidLevel(device_type)

Returns the default RAID level for this device type.

Parameters:device_type (int) – an int representing the device_type
Returns:the default RAID level for this device type or None
Return type:blivet.devicelibs.raid.RAIDLevel or NoneType
pyanaconda.ui.gui.spokes.lib.custom_storage_helpers.requiresRaidSelection(device_type)

Whether GUI requires a RAID level be selected for this device type.

pyanaconda.ui.gui.spokes.lib.custom_storage_helpers.defaultContainerRaidLevel(device_type)

Returns the default RAID level for this device type’s container type.

Parameters:device_type (int) – an int representing the device_type
Returns:the default RAID level for this device type’s container or None
Return type:blivet.devicelibs.raid.RAIDLevel or NoneType
pyanaconda.ui.gui.spokes.lib.custom_storage_helpers.containerRaidLevelsSupported(arg, cache={})

The raid levels anaconda supports for a container for this device_type.

For LVM, anaconda supports LVM on RAID, but also allows no RAID.

Parameters:device_type (int) – one of an enumeration of device types
Returns:a set of supported raid levels
Return type:a set of instances of blivet.devicelibs.raid.RAIDLevel
pyanaconda.ui.gui.spokes.lib.custom_storage_helpers.raidLevelsSupported(arg, cache={})

The raid levels anaconda supports for this device type.

It supports any RAID levels that it expects to support and that blivet supports for the given device type.

Since anaconda only ever allows the user to choose RAID levels for device type DEVICE_TYPE_MD, hiding the RAID menu for all other device types, the function only returns a non-empty set for this device type. If this changes, then so should this function, but at this time it is not clear what RAID levels should be offered for other device types.

Parameters:device_type (int) – one of an enumeration of device types
Returns:a set of supported raid levels
Return type:a set of instances of blivet.devicelibs.raid.RAIDLevel
pyanaconda.ui.gui.spokes.lib.custom_storage_helpers.get_container_type(device_type)
class pyanaconda.ui.gui.spokes.lib.custom_storage_helpers.AddDialog(*args, **kwargs)

Bases: pyanaconda.ui.gui.GUIObject

MIN_SIZE_ENTRY = Size('1 MiB')
builderObjects = ['addDialog', 'mountPointStore', 'mountPointCompletion', 'mountPointEntryBuffer']
mainWidgetName = 'addDialog'
on_add_confirm_clicked(button, *args)
refresh()
run()
uiFile = 'spokes/lib/custom_storage_helpers.glade'
class pyanaconda.ui.gui.spokes.lib.custom_storage_helpers.ConfirmDeleteDialog(*args, **kwargs)

Bases: pyanaconda.ui.gui.GUIObject

builderObjects = ['confirmDeleteDialog']
deleteAll
mainWidgetName = 'confirmDeleteDialog'
on_delete_confirm_clicked(button, *args)
refresh(mountpoint, device, rootName, snapshots=False)
run()
uiFile = 'spokes/lib/custom_storage_helpers.glade'
class pyanaconda.ui.gui.spokes.lib.custom_storage_helpers.DisksDialog(*args, **kwargs)

Bases: pyanaconda.ui.gui.GUIObject

builderObjects = ['disks_dialog', 'disk_store', 'disk_view']
mainWidgetName = 'disks_dialog'
on_cancel_clicked(button)
on_select_clicked(button)
run()
uiFile = 'spokes/lib/custom_storage_helpers.glade'
class pyanaconda.ui.gui.spokes.lib.custom_storage_helpers.ContainerDialog(*args, **kwargs)

Bases: pyanaconda.ui.gui.GUIObject, pyanaconda.ui.gui.helpers.GUIDialogInputCheckHandler

MIN_SIZE_ENTRY = Size('1 MiB')
builderObjects = ['container_dialog', 'disk_store', 'container_disk_view', 'containerRaidStoreFiltered', 'containerRaidLevelLabel', 'containerRaidLevelCombo', 'raidLevelStore', 'containerSizeCombo', 'containerSizeEntry', 'containerSizeLabel', 'containerEncryptedCheckbox']
mainWidgetName = 'container_dialog'
on_save_clicked(button)
on_size_changed(combo)
run()
set_status(inputcheck)
uiFile = 'spokes/lib/custom_storage_helpers.glade'

pyanaconda.ui.gui.spokes.lib.dasdfmt module

class pyanaconda.ui.gui.spokes.lib.dasdfmt.DasdFormatDialog(data, storage, to_format)

Bases: pyanaconda.ui.gui.GUIObject

builderObjects = ['unformattedDasdDialog']
mainWidgetName = 'unformattedDasdDialog'
on_format_clicked(*args)

Once the format button is clicked, the option to cancel expires. We also need to display the spinner showing activity.

The user clicked on the link that takes them back to the hub. We need to kill the _check_format watcher and then emit a special response ID indicating the user did not press OK.

NOTE: There is no button with response_id=2.

run()
run_dasdfmt(epoch_started, *args)

Loop through our disks and run dasdfmt against them.

uiFile = 'spokes/lib/dasdfmt.glade'
update_dialog(*args, **kwargs)

The new body for the decorated method. If needed, it uses closure bound queue variable which is valid until the reference to this method is destroyed.

pyanaconda.ui.gui.spokes.lib.detailederror module

class pyanaconda.ui.gui.spokes.lib.detailederror.DetailedErrorDialog(*args, **kwargs)

Bases: pyanaconda.ui.gui.GUIObject

This class provides a lightboxable dialog to display a very detailed set of error messages, like might be required to display the results of package dependency solving or storage sanity checking.

If no buttons are provided, this dialog will have only a single button: cancel, with a response ID of 0. Otherwise, the kwarg named “buttons” should be a list of translated labels. Each will have an incrementing response ID starting with 0, and any Quit button will be placed on the far left hand side of the dialog. It’s up to the caller of the “run” method to do something with the returned response ID.

builderObjects = ['detailedErrorDialog', 'detailedTextBuffer']
mainWidgetName = 'detailedErrorDialog'
refresh(msg)
run()
uiFile = 'spokes/lib/detailederror.glade'

pyanaconda.ui.gui.spokes.lib.entropy_dialog module

pyanaconda.ui.gui.spokes.lib.entropy_dialog.run_entropy_dialog(*args, **kwargs)

The new body for the decorated method. If needed, it uses closure bound queue variable which is valid until the reference to this method is destroyed.

pyanaconda.ui.gui.spokes.lib.lang_locale_handler module

Module providing the LangLocaleHandler class that could be used as a mixin for screens handling languages or locales configuration.

class pyanaconda.ui.gui.spokes.lib.lang_locale_handler.LangLocaleHandler

Bases: object

Class that could be used as a mixin for screens handling languages or locales configuration.

initialize()
on_clear_icon_clicked(entry, icon_pos, event)
on_entry_changed(*args, **kwargs)
on_lang_selection_changed(selection)

pyanaconda.ui.gui.spokes.lib.passphrase module

class pyanaconda.ui.gui.spokes.lib.passphrase.PassphraseDialog(data)

Bases: pyanaconda.ui.gui.GUIObject, pyanaconda.ui.gui.helpers.GUIInputCheckHandler

builderObjects = ['passphrase_dialog']
mainWidgetName = 'passphrase_dialog'
on_entry_activated(entry)
on_passphrase_changed(entry)
on_save_clicked(button)
refresh()
run()
set_status(inputcheck)
uiFile = 'spokes/lib/passphrase.glade'

pyanaconda.ui.gui.spokes.lib.refresh module

class pyanaconda.ui.gui.spokes.lib.refresh.RefreshDialog(data, storage)

Bases: pyanaconda.ui.gui.GUIObject

builderObjects = ['refreshDialog']
mainWidgetName = 'refreshDialog'
on_rescan_clicked(button)
run()
uiFile = 'spokes/lib/refresh.glade'

pyanaconda.ui.gui.spokes.lib.resize module

class pyanaconda.ui.gui.spokes.lib.resize.ResizeDialog(data, storage, payload)

Bases: pyanaconda.ui.gui.GUIObject

builderObjects = ['actionStore', 'diskStore', 'resizeDialog', 'resizeAdjustment']
mainWidgetName = 'resizeDialog'
on_delete_all_clicked(button, *args)
on_delete_clicked(button)
on_key_pressed(window, event, *args)
on_preserve_clicked(button)
on_resize_clicked(*args)
on_resize_value_changed(*args, **kwargs)
on_row_clicked(view, path, column)
on_selection_changed(selection)
on_shrink_clicked(button)
populate(disks)
refresh(disks)
resize_slider_format(scale, value)
run()
uiFile = 'spokes/lib/resize.glade'

pyanaconda.ui.gui.spokes.lib.summary module

class pyanaconda.ui.gui.spokes.lib.summary.ActionSummaryDialog(data)

Bases: pyanaconda.ui.gui.GUIObject

builderObjects = ['actionStore', 'summaryDialog']
initialize(actions)
mainWidgetName = 'summaryDialog'
refresh(actions)
run()
uiFile = 'spokes/lib/summary.glade'

Module contents