YaST2 Developers Documentation: Restore module

Restore module

include/restore/ui.ycp
User interface functions.

This module has an unstable interface.

All user interface functions.

Imports

  • Label
  • Label
  • Label
  • Mode
  • NetworkPopup
  • Package
  • Popup
  • Progress
  • Restore
  • Sequencer
  • URL
  • Wizard
  • Wizard_hw

Includes

  • restore/helps.ycp
  • restore/summary_dialog.ycp

Local Functions

local DetectRemovable () -> map<string, map>

Try to detect all removable devices present in the system

Return value:
Removable devices info
local ProposeNextVolume (string volume) -> string

Propose next file name of volume from file name

Parameters:
volume Previuos volume name
Return value:
Proposed next volume name
local CreateDeviceList (map<string,map> dev, string sel) -> list

Create list of removable devices for combo box widget.

Parameters:
dev Map with devices
sel Preselected device
Return value:
Combo box content
local ShadowButtons (symbol type) -> void

Enable/disable widget in file selction dialog according to selected input type

Parameters:
type Symbol of widget which will be enabled (possible values are `file, `nfs, `removable)
local ComboToDevice (string selected, map<string,map> dev) -> string

Convert selected device name in combobox to URL-like equivalent

Parameters:
selected Selected string in combo box
dev Devices info
Return value:
Device name in URL-like syntax
local ArchiveSelectionDialog (boolean multivolume, boolean askformore, string input) -> symbol

Backup archive is selected in this dialog.

Parameters:
multivolume True = first archive file is entered, otherwise volume parts are entered
askformore False: ask only for one volume part, true: ask until all volumes are entered
input
Return value:
UI::UserInput() result
local ArchivePropertyDialog () -> symbol

Display archive property - date of backup, user comment...

Return value:
UI::UserInput() result
local CreateArchiveContentTree (map<string, map<string, any> > packagesinfo) -> list<term>

Return content for table widget - list of backup files

Parameters:
packagesinfo Map $[ "packagename" : $[ "files" : ["files in the archive"] ] ]
Return value:
Table content
local ArchiveContentsDialog () -> symbol

Display content of backup archive in the table.

Return value:
UI::UserInput() result
local RestoreOptionsDialog () -> symbol

Dialog with options.

Return value:
UI::UserInput() result
local CreateTableContentsWithMismatched (map<string, map<string, string> > contents, map selected, boolean defaultval) -> list

Create content for table widget - columns: selection mark, package name, backup version, installed version, description

Parameters:
contents Map $[ "packagename" : $[ "ver" : "version", "descr" : "short description" ] ]
selected Selected packages (only for autoinstallation, otherwise should be nil)
defaultval if true "X" is in the first column, else " "
Return value:
Contents for Table widget
local SelectionInstallDialog () -> symbol

Dialog for package selection - packages to install

Return value:
UI::UserInput() result
local CreateTableContents (map<string, map<string, string> > contents, map selected, boolean defaultval) -> list

Create content for table widget - columns: selection mark, package name, version, description

Parameters:
contents Map $[ "packagename" : $[ "ver" : "version", "descr" : "short description" ] ]
selected Selected packages (only for autoinstallation, otherwise should be nil)
defaultval if true "X" is in the first column, else " "
Return value:
Contents for Table widget
local SelectionUninstallDialog () -> symbol

Dialog for package selection - packages to uninstall

Return value:
UI::UserInput() result
local SWsingleDialog () -> symbol

Start Yast2 package manager

Return value:
UI::UserInput() result
local CreateTableContentsRestoreSelection (map<string, map<string, any> > restoreselection) -> list<term>

Return table widget contens - files and packages selected for restoration

Parameters:
restoreselection Restore settings
Return value:
Table content
local InstallQuestion (string package, string version) -> boolean

Ask wheter missing package should be installed and restored

Parameters:
package Package name
version Package version
Return value:
True if package should be installed
local PackageSelectionRestoreDialog () -> symbol

Packages (and files) for restoration can be selected in this archive.

Return value:
UI::UserInput() result
local FileSelectionDialog (string packagename) -> symbol

Display all files in backup archive which belong to package. User can select which files will be resored.

Parameters:
packagename Name of package
Return value:
UI::UserInput() result
local RestoreProgressDialog () -> symbol

Restore packages from backup archive - display progress of restoring process

Return value:
UI::UserInput() result
local SuSEconfigDialog () -> symbol

Start SuSEconfig

Return value:
UI::UserInput() result
local AtExit () -> symbol

This function should be called only once before end of client. This function cleans up the system - unmounts mounted files systems.

Return value:
Returns symbol `next for wizard sequencer
local StatusToString (boolean status) -> string

Convert programm status to string

Parameters:
status Status: true = OK, false = Failed, nil = "Not started"
Return value:
Status
local SummaryDialog () -> symbol

Display summary of restoration

Return value:
UI::UserInput() result
local RestoreSequence () -> symbol

Whole restoration

Return value:
Returned value from Sequencer::Run() call
local RestoreAutoSequence () -> any

Restoration without reading and writing. For use with autoinstallation.

Return value:
Returned value from Sequencer::Run() call
local CreateArchiveContentTable (map<string, map<string, any> > packagesinfo) -> list

Return content for table widget - list of backup files

Parameters:
packagesinfo Map $[ "packagename" : $[ "files" : ["files in the archive"] ] ]
Return value:
Table content
local SelectFromList (string label, list inputlist, string selected) -> string

Select item from list

Parameters:
label Label in dialog
inputlist List of values
selected Default selected value
Return value:
Selected value or empty string ("") if dialog was closed