Table of Contents
Abstract
Attention! API of all YaST modules is still marked unstable and could change without any preceding warning.
Admin's Log, producing a summary of what YaST did to the system
List of Global Functions
CommitPopup - Prompt the user for a message to describe the changes that she did using YaST, logs it using @ref Note
Item - Log a change to the system from the system point of view. msg should include the file being changed, and what changes are made (TODO: with all detail? or summary?) Example "/etc/ntp.conf: added 'server ntp.example.org'"
Note - Log a change to the system from the human point of view. (It will appear slightly differently in the log) Example "get proper time from the corporate time server as requested in ticket bofh#327"
List of Global Variables
Prompt the user for a message to describe the changes that she did using YaST, logs it using @ref Note
Return value
void
Log a change to the system from the system point of view. msg should include the file being changed, and what changes are made (TODO: with all detail? or summary?) Example "/etc/ntp.conf: added 'server ntp.example.org'"
Function parameters
string msg
Return value
void
List of Global Functions
BuildAddOn - Write all add-on-creator settings
CommitCurrentProduct - save the data with current configuration into global list + reset the current product map
CopyRPMs - Copy the packages from the source directory to target
CreateAddOnStructure - Create the directory structure of the Add-On
CreateDirectoryYaSTFiles - Create directory.yast files (the last step)
CreateISOImage - Create an ISO image of the product
CreateMD5SUMS - Create MD5SUMS files
Export - Export the settings about current Add-On product
GenerateArchiveFiles - Generate ARCHIVES.gz, INDEX.gz and ls-lR.gz
GenerateDirectories - generate the paths of media, data and description dirs
GenerateGPGKey - Generate the key pair
GeneratePackageDescriptions - Generate the package descriptions using create_package_descr
GenerateReleasePackage - Use BuildService tools to create -release package with product info
GetKeyUID - read the user's ID for given GPG key
GetProductInfo - Get the map describing product.xml and produce better readable YCP map
ImportExistingProduct - import the data from existing add-on
Modified - Data was modified?
PrepareBuild - prepare the data of current product for a build (neccessary because input packages could get changed)
Read - Initialize the settings for add-on-creator
ReadPatternsFile - read all the patterns defined in given file
ReadProductXML - import the data from given xml file
ResetCurrentProduct - Reset all settings related to current product
SignAddOn - Sign current Add-On product
UpdateContentMap - Take list of content-file data and update global content_map. If argument is empty, global 'content' list is used as an input.
Write - Write all AddOn products configurations
WriteContentFile - Write the content file
WriteLicensesFiles - Write the text of available licenses to correct places
WriteMediaFiles - Write the media.n/media files
WritePackageDescriptions - Write the package descriptions edited by user
WritePatchesFiles - Create the patches files
WritePatterns - Write all files with patterns definitions
WriteProductsFiles - Create the products file TODO editor - see ExpertSettingsDialog3
WriteStringFiles - Write the readme/COPYING/COPYRIGHT... files in base_path
List of Global Variables
add_on_products - list of all configured AddOn products
bootable - if final Add-On should be bootable (feature not implemented)
clone - if we have 'source add-on' to base the new one on
content - variables from content file + their description
content_key - argument for any_xml agent: key indicating content of element without attributes
current_product - map of the Add-On product currently in use
generate_descriptions - if the descriptions of packages should be generated (false have only sense when cloning where they could be read from description files of cloned product)
import_path - path to directory with existing product (which is being cloned)
modified - Data was modified?
save the data with current configuration into global list + reset the current product map
Return value
void
Copy the packages from the source directory to target
Function parameters
string in_path
string base_path
Return value
boolean - success
Create the directory structure of the Add-On
Function parameters
string base_path
Return value
boolean - success
Create directory.yast files (the last step)
Function parameters
string base_path
Return value
boolean - success
Create an ISO image of the product
Function parameters
string dir_path
string iso_p
string name
Return value
boolean
Create MD5SUMS files
Function parameters
string base_path
Return value
boolean - success
Generate ARCHIVES.gz, INDEX.gz and ls-lR.gz
Function parameters
string base_path
Return value
boolean
generate the paths of media, data and description dirs
Function parameters
string base_path
Return value
void
Generate the key pair
Function parameters
map<string,string> data
Return value
string
Generate the package descriptions using create_package_descr
Return value
boolean
Use BuildService tools to create -release package with product info
Function parameters
string base_path
Return value
boolean
read the user's ID for given GPG key
Function parameters
string key
Return value
string
Get the map describing product.xml and produce better readable YCP map
Function parameters
map xml
boolean merge_with_current
Return value
map<string,map>
import the data from existing add-on
Function parameters
string dir_path
Return value
boolean
prepare the data of current product for a build (neccessary because input packages could get changed)
Return value
boolean
read all the patterns defined in given file
Function parameters
string file_path
Return value
list<map> - of pattern maps
import the data from given xml file
Function parameters
string prod_file_path
Return value
map<string,any>
Sign current Add-On product
Function parameters
string base_path
string key
Return value
boolean
Take list of content-file data and update global content_map. If argument is empty, global 'content' list is used as an input.
Function parameters
list<map> content_list
Return value
map<string,string>
Write the content file
Function parameters
string base_path
list<map> content_data
Return value
boolean - success
Write the text of available licenses to correct places
Function parameters
string descr_path
string base_path
map<string,string> files
Return value
boolean
Write the media.n/media files
Function parameters
string base_path
list<string> m_files
string next
Return value
boolean - success
Write the package descriptions edited by user
Function parameters
string descr_path
map descr
Return value
boolean
Create the patches files
Function parameters
string base_path
list<string> p_files
Return value
boolean - success
Write all files with patterns definitions
Function parameters
string descr_path
string base_path
Return value
boolean
Create the products file TODO editor - see ExpertSettingsDialog3
Function parameters
string base_path
list<string> p_files
Return value
boolean - success
if the descriptions of packages should be generated (false have only sense when cloning where they could be read from description files of cloned product)
This module provides integration of the add-on products
List of Global Functions
AcceptedLicenseAndInfoFile - Show /media.1/info.txt file in a pop-up message if such file exists. Show license if such exists and return whether users accepts it. Returns 'nil' when did not succed.
AddOnMode - Returns whether add-on product got as parameter (source id) replaces some already installed add-on or whether it is a new installation. Repositories and target have to be initialized.
AddPreselectedAddOnProducts - Auto-integrate add-on products in specified file (usually add_on_products file)
Disintegrate - Opposite to Integrate()
DoInstall - Do installation of the add-on product within an installed system srcid is got via AddOnProduct::src_id
Export - Returns map describing all used add-ons.
GetAbsoluteURL - Returns an absolute URL from base + relative url. Relative URL needs to start with 'reulrl://' othewise it is not considered being relative and it's returned as it is (just the relative_url parameter).
Integrate - Integrate the add-on product to the installation workflow, including preparations for 2nd stage and inst-sys update
PrepareForRegistration - Checks whether the content file of the add-on has a flag REGISTERPRODUCT set to "true" or "yes". If it has, product is added into list of pruducts that need registration. Cached content file is used if possible.
ProcessRegistration - Returns whether registration is requested by at least one of used Add-On products.
ReIntegrateFromScratch - Some product(s) were removed, reintegrating their control files from scratch.
ReadTmpExportFilename - Reads the Add-Ons configuration stored on disk during the first stage installation.
RegisterAddOnProduct - Calls registration client if needed.
RemoveRegistrationFlag - Add-On product might have been added into products requesting registration. This pruduct has been removed (during configuring list of add-on products).
RereadAllSCRAgents - New add-on product might add also new agents. Functions Rereads all available agents.
SetPreselectedAddOnProductsType - Sets an add_on_products file type ("plain" or "xml")
TmpExportFilename - Returns the path where Add-Ons configuration is stored during the fist stage installation. This path reffers to the installed system.
UpdateInstSys - Adapts the inst-sys from the tarball
List of Global Variables
add_on_products - List of all selected repositories
last_ret - return value of last step in the product adding workflow
src_id - ID of currently added repository for the add-on product
Show /media.1/info.txt file in a pop-up message if such file exists. Show license if such exists and return whether users accepts it. Returns 'nil' when did not succed.
Function parameters
integer src_id
Return value
boolean - whether the license has been accepted
Returns whether add-on product got as parameter (source id) replaces some already installed add-on or whether it is a new installation. Repositories and target have to be initialized.
Function parameters
integer source_id
Return value
string
Auto-integrate add-on products in specified file (usually add_on_products file)
Function parameters
string filelist
Return value
boolean - true on exit
Format of /add_on_products.xml file on media root: <?xml version="1.0"?> <add_on_products xmlns="http://www.suse.com/1.0/yast2ns" xmlns:config="http://www.suse.com/1.0/configns"> <product_items config:type="list"> <product_item> <!-- Product name visible in UI when offered to user (optional item) --> <name>Add-on Name to Display</name> <!-- Product URL (mandatory item) --> <url>http://product.repository/url/</url> <!-- Product path, default is "/" (optional item) --> <path>/relative/product/path</path> <!-- List of products to install from media, by default all products from media are installed (optional item) --> <install_products config:type="list"> <!-- Product to install - matching the metadata product 'name' (mandatory to fully define 'install_products') --> <product>Product-ID-From-Repository</product> <product>...</product> </install_products> <!-- If set to 'true', user is asked whether to install this product, default is 'false' (optional) --> <ask_user config:type="boolean">true</ask_user> <!-- Connected to 'ask_user', sets the default status of product, default is 'false' (optional) --> <selected config:type="boolean">true</selected> </product_item> <product_item> ... </product_item> </product_items> </add_on_products>
See also:
FATE #303675: Support several add-ons on standard medium
Do installation of the add-on product within an installed system srcid is got via AddOnProduct::src_id
Return value
symbol - the result symbol from wizard sequencer
Returns map describing all used add-ons.
Return value
map -
This is an XML file created from exported map:
<add-on>
<add_on_products config:type="list">
<listentry>
<media_url>ftp://server.name/.../</media_url>
<product>NEEDS_TO_MATCH_"PRODUCT"_TAG_FROM_content_FILE!</product>
<product_dir>/</product_dir>
</listentry>
...
</add_on_products>
</add-on>Returns an absolute URL from base + relative url. Relative URL needs to start with 'reulrl://' othewise it is not considered being relative and it's returned as it is (just the relative_url parameter).
Function parameters
string base_url
string url
Return value
string - absolute_url
Example 1.
AddOnProduct::GetAbsoluteURL (
"http://www.example.org/some%20dir/another%20dir",
"relurl://../AnotherProduct/"
) -> "http://www.example.org/some%20dir/AnotherProduct/"
AddOnProduct::GetAbsoluteURL (
"username:password@ftp://www.example.org/dir/",
"relurl://./Product_CD1/"
) -> "username:password@ftp://www.example.org/dir/Product_CD1/"Integrate the add-on product to the installation workflow, including preparations for 2nd stage and inst-sys update
Function parameters
integer srcid
Return value
boolean - true on success
Checks whether the content file of the add-on has a flag REGISTERPRODUCT set to "true" or "yes". If it has, product is added into list of pruducts that need registration. Cached content file is used if possible.
Function parameters
integer src_id
Return value
void
Returns whether registration is requested by at least one of used Add-On products.
Return value
boolean - if requested
Some product(s) were removed, reintegrating their control files from scratch.
Return value
boolean
Reads the Add-Ons configuration stored on disk during the first stage installation.
Return value
boolean
See also:
bugzilla #187558
Calls registration client if needed.
Function parameters
integer src_id
Return value
void
Add-On product might have been added into products requesting registration. This pruduct has been removed (during configuring list of add-on products).
Function parameters
integer src_id
Return value
void
New add-on product might add also new agents. Functions Rereads all available agents.
Return value
void
See also:
bugzilla #239055, #245508
Sets an add_on_products file type ("plain" or "xml")
Function parameters
string type
Return value
void
See also:
FATE #303675
Returns the path where Add-Ons configuration is stored during the fist stage installation. This path reffers to the installed system.
Return value
string
See also:
bugzilla #187558
List of all selected repositories
add_on_products = [
$[
"media" : 4, // ID of the source
"product_dir" : "/",
"product" : "openSUSE version XX.Y",
"autoyast_product" : "'PRODUCT' tag for AutoYaST Export",
],
...
]Address manipulation routines
List of Global Functions
Check - Check syntax of a network address (IP address or hostname)
Check4 - Check syntax of a network address (ip4 or name)
Check6 - Check syntax of a network address (ip6 or name)
CheckMAC - Check syntax of MAC address
Valid4 - Return a description of a valid address (ip4 or name)
ValidMAC - Describe a valid MAC address
List of Global Variables
Check syntax of a network address (IP address or hostname)
Function parameters
string address
Return value
boolean - true if correct
Check syntax of a network address (ip4 or name)
Function parameters
string address
Return value
boolean - true if correct
Check syntax of a network address (ip6 or name)
Function parameters
string address
Return value
boolean - true if correct
Check syntax of MAC address
Function parameters
string address
Return value
boolean - true if correct
Configuration of a phone answering machine
Architecture, board and bios data
List of Global Functions
alpha - true for all alpha architectures
arch_short - Returns general architecture type (one of sparc, mips, ppc, s390, i386, alpha, ia64, x86_64)
architecture - Returns full architecture type (one of i386, sparc, sparc64, mips, mips64, ppc, ppc64, alpha, s390_32, s390_64, ia64, x86_64)
board_chrp - true for all "CHRP" ppc boards
board_iseries - true for all "iSeries" ppc boards
board_mac - true for all PPC "MacRISC" boards
board_mac_new - true for all "NewWorld" PowerMacs
board_mac_old - true for all "OldWorld" powermacs
board_pegasos - true for all "Pegasos" and "Efika" ppc boards
board_prep - true for all "PReP" ppc boards
board_wintel - true for all "Windows/Intel" compliant boards (x86 based)
has_pcmcia - true if the system supports PCMCIA But modern notebook computers do not have it. See also Bugzilla #151813#c10
has_smp - true if running on multiprocessor board. This only reflects the board, not the actual number of CPUs or the running kernel!
i386 - true for all x86 compatible architectures
ia64 - true for all IA64 (itanium) architectures
is_laptop - true if the system runs on laptop
is_uml - true if UML
is_xen - true if Xen kernel is running (dom0 or domU)
is_xen0 - true if dom0 Xen kernel is running
is_xenU - true if domU Xen kernel is running
mips - true for all mips architectures (32 or 64 bit)
mips32 - true for all 32bit mips architectures
mips64 - true for all 64bit mips architectures
ppc - true for all ppc architectures (32 or 64 bit)
ppc32 - true for all 32bit ppc architectures
ppc64 - true for all 64bit ppc architectures
s390 - true for all S/390 architectures (32 or 64 bit)
s390_32 - true for all 32bit S/390 architectures
s390_64 - true for all 64bit S/390 architectures
setSMP - Set "Arch::has_smp ()". Since Alpha doesn't reliably probe smp, 'has_smp' must be set later with this function.
sparc - true for all sparc architectures (32 or 64 bit)
sparc32 - true for all 32bit sparc architectures
sparc64 - true for all 64bit sparc architectures
x11_setup_needed - run X11 configuration after inital boot this is false in case of: installation on iSeries, installation on S390
x86_64 - true for all x86-64 (AMD Hammer) architectures
List of Global Variables
Returns general architecture type (one of sparc, mips, ppc, s390, i386, alpha, ia64, x86_64)
Return value
string - arch_short
Returns full architecture type (one of i386, sparc, sparc64, mips, mips64, ppc, ppc64, alpha, s390_32, s390_64, ia64, x86_64)
Return value
string - architecture
true if the system supports PCMCIA But modern notebook computers do not have it. See also Bugzilla #151813#c10
Return value
boolean - true if the system supports PCMCIA
See also:
is_laptop
true if running on multiprocessor board. This only reflects the board, not the actual number of CPUs or the running kernel!
Return value
boolean - true if running on multiprocessor board
true if Xen kernel is running (dom0 or domU)
Return value
boolean - true if the Xen kernel is running
true if dom0 Xen kernel is running
Return value
boolean - true if the Xen kernel is running in dom0
See also:
is_xenU
is_xen
true if domU Xen kernel is running
Return value
boolean - true if the Xen kernel is running in another domain than dom0
See also:
is_xen0
is_xen
true for all mips architectures (32 or 64 bit)
Return value
boolean
See also:
mips32
mips64
true for all S/390 architectures (32 or 64 bit)
Return value
boolean
See also:
s390_32
s390_64
Set "Arch::has_smp ()". Since Alpha doesn't reliably probe smp, 'has_smp' must be set later with this function.
Function parameters
boolean is_smp
Return value
void
true for all sparc architectures (32 or 64 bit)
Return value
boolean
See also:
sparc32
sparc64
run X11 configuration after inital boot this is false in case of: installation on iSeries, installation on S390
Return value
boolean - true when the X11 configuration is needed after inital boot
See also:
Installation::x11_setup_needed
List of Global Functions
AppendLine - Appends a new line at the bottom
ChangeLineField - Changes the record in the file defined by row and column
FindLineField - Returns the list of rows where matches searched string in the defined column
GetLine - Returns map of wanted line
GetLines - Returns map of wanted lines
NumLines - Returns count of lines in file
ReadFile - Reads the file from the disk
RemoveLines - Removes lines
ReplaceLine - Changes a complete line
RewriteFile - Writes a content into the file
SetComment - Sets the string how the comment starts
SetDelimiter - Sets the delimiter between the records on one line
SetListWidth - Sets the widths of records on one line
List of Global Variables
Appends a new line at the bottom
Function parameters
map& file
list entry
Return value
void
Changes the record in the file defined by row and column
Function parameters
map& file
integer line
integer field
string entry
Return value
void
Returns the list of rows where matches searched string in the defined column
Function parameters
map file
integer field
string content
Return value
list<integer> - matching rows
Returns map of wanted line
Function parameters
map& file
integer line
Return value
map - of wanted line
Returns map of wanted lines
Function parameters
map& file
list<integer> lines
Return value
map<integer, map> - with wanted lines
Returns count of lines in file
Function parameters
map file
Return value
integer - count of lines
Reads the file from the disk
Function parameters
map& file
string pathname
Return value
void
Changes a complete line
Function parameters
map& file
integer line
list<string> entry
Return value
void
Writes a content into the file
Function parameters
map& file
string fpath
Return value
void
Sets the string how the comment starts
Function parameters
map& file
string comment
Return value
void
Sets the delimiter between the records on one line
Function parameters
map& file
string delim
Return value
void
List of Global Functions
Abort - Returns a confirmation popup dialog whether user wants to really abort.
AutoPackages - Return packages needed to be installed and removed during Autoinstallation to insure module has all needed software installed.
Export - Dump the auditd settings and the rules to a single map (For use by autoinstallation.)
GetAuditdOption - Get value of given option from SEETINGS
GetRules - Get the current rules
GetRulesFile - Return rules file path
Import - Get all audit settings from the first parameter (For use by autoinstallation.)
Modified - Prototypes
Modified - Data was modified?
Overview - Create an overview table with all configured cards
PollAbort - Checks whether an Abort button has been pressed. If so, calls function to confirm the abort call.
Read - Read all auditd settings
SetAuditdOption - Set option to given value in SETTINGS
SetModified - Mark as modified, for Autoyast.
SetWriteOnly - Set write_only flag (for autoinstalation).
Summary - Create a textual summary and a list of unconfigured cards
Write - Write all auditd settings
List of Global Variables
Returns a confirmation popup dialog whether user wants to really abort.
Return value
boolean
Return packages needed to be installed and removed during Autoinstallation to insure module has all needed software installed.
Return value
map - with 2 lists.
Dump the auditd settings and the rules to a single map (For use by autoinstallation.)
Return value
map - Dumped settings (later acceptable by Import ())
Get value of given option from SEETINGS
Function parameters
string key
Return value
string
Get all audit settings from the first parameter (For use by autoinstallation.)
Function parameters
map settings
Return value
boolean - True on success
Checks whether an Abort button has been pressed. If so, calls function to confirm the abort call.
Return value
boolean - true if abort confirmed
Set option to given value in SETTINGS
Function parameters
string key
string value
Return value
boolean
Set write_only flag (for autoinstalation).
Function parameters
boolean value
Return value
void
Create a textual summary and a list of unconfigured cards
Return value
string - summary of the current configuration
Auto-installation related functions module
List of Global Functions
AutoInstall - Constructer
Continue - Read saved data in continue mode
Finish - Finish Auto-Installation by saving misc files
PXELocalBoot - Put PXE file on the boot server using tftp
Save - Save configuration
TurnOff - Turn off the second stage of autoyast
List of Global Variables
Finish Auto-Installation by saving misc files
Function parameters
string destdir
Return value
void
Put PXE file on the boot server using tftp
Return value
boolean - true on success
Process Auto-Installation Rules
List of Global Functions
AutoInstallRules - Constructor
CreateDefault - Create default rule in case no rules file is available This adds a list of file starting from full hex ip representation to only the first letter. Then default and finally mac address.
CreateFile - Create default rule in case no rules file is available (Only one file which is given by the user)
Files - Return list of file to merge (Order matters)
GetRules - Return list of file to merge (Order matters)
Init - Initialize
Merge - Merge Rule results
ProbeRules - Probe all system data to build a set of rules
Process - Process Rules
Read - Read rules file
StdErrLog - StdErrLog() Dialog for error messages
XML_cleanup - Cleanup XML file from namespaces put by xslt
getHostid - Return host id (hex ip )
getMAC - getMAC() Return MAC address of active device
List of Global Variables
Create default rule in case no rules file is available This adds a list of file starting from full hex ip representation to only the first letter. Then default and finally mac address.
Return value
void
Create default rule in case no rules file is available (Only one file which is given by the user)
Function parameters
string filename
Return value
void
Merge Rule results
Function parameters
string result_profile
Return value
boolean - true on success
StdErrLog() Dialog for error messages
Function parameters
string stderr
Return value
void
Cleanup XML file from namespaces put by xslt
Function parameters
string in
string out
Return value
boolean
UI-related routines to be run from perl modules (Autofs.pm etc.)
This module handles the configuration for auto-installation
List of Global Variables
Merge Classes
Function parameters
map configuration
string base_profile
string resultFileName
Return value
map
Create a control file from an exisiting machine
List of Global Functions
AutoinstClone - Constructor
Export - Export profile, Used only from within autoyast2
General - General options
Process - Build the profile
Write - Write the profile to a defined path
createClonableList - Create a list of clonable resources
List of Global Variables
Write the profile to a defined path
Function parameters
string outputFile
Return value
boolean - true on success
Common partitioning functions module
List of Global Functions
isValidField - Predicates
List of Global Variables
This module handles the configuration for auto-installation
List of Global Functions
AutoinstConfig - Constructor
ParseCmdLine - Return location of profile from command line.
Save - Save Configuration global settings
SetProtocolMessage - SetProtocolMessage ()
ShellEscape - escape a string so it can be passed to a shell
List of Global Variables
Return location of profile from command line.
Function parameters
string autoinstall
Return value
boolean - with protocol, server, path
Data storage for Autoinstallation
Drive related functions module
List of Global Functions
getNodeName - Construct node name for display in tree.
getNodeReference - Construct reference to drive for use in tree. The references are of the form: "{drive,volgroup}_<id>", e.g. "drive_1", or "volgroup_3"
isDrive - Convenience wrappers for more general object predicates
List of Global Variables
Construct node name for display in tree.
Return value
string - the newly created node name
Construct reference to drive for use in tree. The references are of the form: "{drive,volgroup}_<id>", e.g. "drive_1", or "volgroup_3"
Return value
string - reference
Handle complete configuration file dumps
List of Global Functions
Export - Export Settings
GetModified - Functions which returns if the settings were modified
Import - Import Settings
SetModified - Function sets internal variable, which indicates, that any settings were modified, to "true"
Summary - Settings Summary
Write - Write Settings
List of Global Variables
Functions which returns if the settings were modified
Return value
boolean - settings were modified
Function sets internal variable, which indicates, that any settings were modified, to "true"
Return value
void
Configuration of general settings for autoyast
List of Global Functions
AutoinstGeneral - Constructor
Export - Export Configuration
GetModified - Functions which returns if the settings were modified
Import - Import Configuration
SetModified - Function sets internal variable, which indicates, that any settings were modified, to "true"
SetSignatureHandling - set the sigature handling
Summary - Summary of configuration
Write - Write General Configuration
List of Global Variables
Functions which returns if the settings were modified
Return value
boolean - settings were modified
Function sets internal variable, which indicates, that any settings were modified, to "true"
Return value
void
Process Auto-Installation Images
LVM
List of Global Functions
AutoinstLVM - Constructer
Init - Initialize
Write - Write LVM Configuration
get_existing_pvs - Return only those PVs on disks touched by the control file, dont add PVs of unconfigured disks.
List of Global Variables
Module representing a partitioning plan
List of Global Functions
Export - Dump the settings to a map, for autoinstallation use.
GetModified - Functions which returns if the settings were modified
Import - Get all the configuration from a map. When called by inst_auto<module name> (preparing autoinstallation data) the list may be empty.
SetModified - Function sets internal variable, which indicates, that any settings were modified, to "true"
Summary - Return summary of configuration
updateTree - Create tree structure from AutoPartPlan
List of Global Variables
Functions which returns if the settings were modified
Return value
boolean - settings were modified
Get all the configuration from a map. When called by inst_auto<module name> (preparing autoinstallation data) the list may be empty.
Function parameters
list<map> settings
Return value
boolean - success
Function sets internal variable, which indicates, that any settings were modified, to "true"
Return value
void
Partition related functions module
List of Global Functions
isPartition - Convenience wrappers for more general object predicates
List of Global Variables
RAID
List of Global Functions
AutoinstRAID - Constructor
ExistingMDs - Return existing MDs
Init - Initialize
Write - Create RAID Configuration
List of Global Variables
Return existing MDs
Function parameters
string md
Return value
list - list of existing MDs
Custom scripts
List of Global Functions
AddEditScript - Add or edit a script
Export - Dump the settings to a map, for autoinstallation use.
GetModified - Functions which returns if the settings were modified
Import - Get all the configuration from a map. When called by autoinst_<module name> (preparing autoinstallation data) the map may be empty.
SetModified - Function sets internal variable, which indicates, that any settings were modified, to "true"
Summary - Return Summary
Write - Execute pre scripts
deleteScript - delete a script from a list
typeString - return type of script as formatted string
List of Global Variables
Add or edit a script
Function parameters
string scriptName
string source
string interpreter
string type
boolean chrooted
boolean debug
boolean feedback
boolean network
Return value
void
Functions which returns if the settings were modified
Return value
boolean - settings were modified
Get all the configuration from a map. When called by autoinst_<module name> (preparing autoinstallation data) the map may be empty.
Function parameters
map s
Return value
boolean - success
Function sets internal variable, which indicates, that any settings were modified, to "true"
Return value
void
Execute pre scripts
Function parameters
string type
boolean special
Return value
boolean - true on success
delete a script from a list
Function parameters
string scriptName
Return value
void
Software
List of Global Functions
AddModulePackages - Add packages needed by modules, i.e. NIS, NFS etc.
AutoinstSoftware - Constructer
Export - Export data
GetModified - Functions which returns if the settings were modified
Import - Import data
ReadHelper - Return list of software packages of calling client
RemoveModulePackages - Remove packages not needed by modules, i.e. NIS, NFS etc.
SetModified - Function sets internal variable, which indicates, that any settings were modified, to "true"
Summary - Summary
Write - Configure software settings
addPostPackages - Add post packages
autoinstPackages - Compute list of packages selected by user and other packages needed for important configuration modules.
pmInit - Initialize temporary target
List of Global Variables
Add packages needed by modules, i.e. NIS, NFS etc.
Function parameters
list<string> module_packages
Return value
void
Functions which returns if the settings were modified
Return value
boolean - settings were modified
Return list of software packages of calling client
Return value
map<string, any > - map of installed software package "patterns" -> list<string> addon selections "packages" -> list<string> user selected packages "remove-packages" -> list<string> packages to remove
Remove packages not needed by modules, i.e. NIS, NFS etc.
Function parameters
list<string> module_packages
Return value
void
Function sets internal variable, which indicates, that any settings were modified, to "true"
Return value
void
Compute list of packages selected by user and other packages needed for important configuration modules.
Return value
list<string> - of strings list of packages needed for autoinstallation
Storage
List of Global Functions
GetModified - Functions which returns if the settings were modified
Import - Get all the configuration from a map. When called by inst_auto<module name> (preparing autoinstallation data) the list may be empty.
ImportAdvanced - Import Fstab data
Overview - Partitioning Overview
SetModified - Function sets internal variable, which indicates, that any settings were modified, to "true"
Summary - return Summary of configuration
Write - Create partition plan
mountBy - if mountby is used, we will search for the matching partition here.
List of Global Variables
Functions which returns if the settings were modified
Return value
boolean - settings were modified
Get all the configuration from a map. When called by inst_auto<module name> (preparing autoinstallation data) the list may be empty.
Function parameters
list<map> settings
Return value
boolean - success
Import Fstab data
Function parameters
map settings
Return value
boolean - true on success
Function sets internal variable, which indicates, that any settings were modified, to "true"
Return value
void
X11
Autologin read/write routines
List of Global Functions
AskForDisabling - Ask if autologin should be disabled (and disable it in such case)
Disable - Disable autologin
DisableAndWrite - Disable autologin and write it (used probably for automatic disabling without asking)
Read - Read autologin settings
Use - Wrapper for setting the 'used' variable
Write - Write autologin settings
List of Global Variables
available - Is autologin feature available?
modified - Autologin settings modified?
pw_less - Login without passwords?
used - Is autogion used? Usualy true when user is not empty, but for the first time (during installation), this can be true by default although user is "" (depends on the control file)
user - User to log in automaticaly
Ask if autologin should be disabled (and disable it in such case)
Function parameters
string new
Return value
boolean - Is autologin used?
Disable autologin and write it (used probably for automatic disabling without asking)
Function parameters
boolean write_only
Return value
boolean - written anything?
Is autogion used? Usualy true when user is not empty, but for the first time (during installation), this can be true by default although user is "" (depends on the control file)
Module containing specific data for differnt architecturese (as some architectures support multiple bootloaders, some bootloaders support multiple architectures)
List of Global Functions
DefaultKernelParams - Get parameters for the default kernel
FailsafeKernelParams - Get parameters for the failsafe kernel
InitrdImage - Get the file holding the initd imahe
ResumeAvailable - Is Suspend to Disk available?
VgaAvailable - Is VGA parameter setting available
List of Global Variables
Get parameters for the default kernel
Function parameters
string resume
Return value
string - parameters for default kernel
Get parameters for the failsafe kernel
Return value
string - parameters for failsafe kernel
Data to be shared between common and bootloader-specific parts of bootloader configurator/installator, generic versions of bootloader specific functions
List of Global Functions
CreateLinuxSection - Create section for linux kernel
Dom0MemorySize - Get the size of memory for XEN's domain 0
Export - Export bootloader settings to a map
Import - Import settings from a map
Propose - Propose bootloader settings
Read - Read settings from disk
Reset - Reset bootloader settings
Save - Save all bootloader configuration files to the cache of the PlugLib PlugLib must be initialized properly !!!
Section2Index - Search for section passed
Summary - Display bootloader summary
Update - Update read settings to new version of configuration files
Write - Write bootloader settings to disk
XenPresent - Check whether XEN is selected for installation resp. selected
getBootloaders - List bootloaders available for configured architecture
getLoaderType - Get currently used bootloader, detect if not set yet
isTrustedGrub - Function check if trusted grub is selected or installed return true if is selected/installed and add trusted_grub to globals
setCurrentLoaderAttribs - Set attributes of specified bootloader to variable containing attributes of currently used bootloader, call its initializer
setLoaderType - set type of bootloader
List of Global Variables
BootPartitionDevice - string sepresenting device name of /boot partition same as RootPartitionDevice if no separate /boot partition
ExtendedPartitionDevice - string representing device name of extended partition
RootPartitionDevice - string representing device name of / partition
activate - Activate bootloader partition during installation?
activate_changed - Was the activate flag changed by user?
backup_mbr - Backup original MBR before installing bootloader
bois_id_missing - Flag indicates that bios_id_missing in disk true if missing false if at least one disk has bios_id
bootloader_attribs - Parameters of all bootloaders
bootloaders - List of all supported bootloaders
cached_settings_base_data_change_time - Saved change time from target map - proposal
changed - were settings changed (== true)
current_bootloader_attribs - Parameters of currently used bootloader
current_section - Curtrently edited section -- tmp store
current_section_index - Index of current section, -1 for new created section
current_section_name - Name of currently edited section
default_changed - true if default section is edited it is important for remember default name...
del_parts - List of partitions deleted in primary proposal
device_mapping - device mapping between Linux and firmware
exports - map of other exported information for new perl-Bootloader interface
files_edited - Were configuration files manually edited and chamged?
files_edited_warned - Has been files edited warning already shown?
floppy_devices - list of installed floppy devices
global_options - map of global options and types for new perl-Bootloader interface
globals - map of global options and values
kernelCmdLine - Kernel parameters at previous detection
loader_device - device to save loader stage 1 to NOTE: this variable is being phased out. The boot_* keys in the globals map are now used to remember the selected boot location. Thus, we now have a list of selected loader devices. It can be generated from the information in the boot_* keys and the global variables (Boot|Root|Extended)PartitionDevice and mbrDisk by calling GetBootloaderDevices().
location_changed - Was bootloader location changed? (== true)
mbrDisk - device holding MBR for bootloader
multipath_mapping - device mapping between real devices and multipath
one_section_changed - was currently edited section changed (== true)
opt_types - Option types for different bootloaders
other_bl - Settings of other bootloaders used when switching bootloader
partitioning_last_change - time of last change of partitioning
prefer_lilo - Last detection proposed to prefer lilo instead of grub
read_default_section_name - The name of the default section as it was read
removed_sections - true if memtest was removed by user (manually) during the installation proposal
repl_mbr - Replace MBR with generic code after bootloader installation?
save_all - Save everything, not only changed settings
save_on_finish - Shall be settings saved when finishing bootloader configuration?
section_options - map of section options and types for new perl-Bootloader interface
sections - list of section
sections_changed - were sections settings changes (== true)
selected_location - The kind of bootloader location that the user selected last time he went to the dialog. Used as a hint next time a proposal is requested, so the proposal can try to satisfy the user's previous preference. NOTE: this variable is being phased out. The boot_* keys in the globals map will be used to remember the last selected location. Currently, valid values are: mbr, boot, root, floppy, mbr_md, none
verbose - Show verbose summary output
was_proposed - was the propose function called (== true)
was_read - Were module settings read (== true)
write_settings - map of save mode settings
Create section for linux kernel
Function parameters
string title
Return value
map<string,any> - a map describing the section
Get the size of memory for XEN's domain 0
Return value
integer - the memory size in kB
Import settings from a map
Function parameters
map settings
Return value
boolean - true on success
Read settings from disk
Function parameters
boolean reread
boolean avoid_reading_device_map
Return value
boolean - true on success
Save all bootloader configuration files to the cache of the PlugLib PlugLib must be initialized properly !!!
Function parameters
boolean clean
boolean init
boolean flush
Return value
boolean - true if success
Search for section passed
Function parameters
string section_name
Return value
integer - index number
Check whether XEN is selected for installation resp. selected
Return value
boolean - true of XEN installed/selected
List bootloaders available for configured architecture
Return value
list<string> - a list of bootloaders
Get currently used bootloader, detect if not set yet
Function parameters
boolean recheck
Return value
string - botloader type
Function check if trusted grub is selected or installed return true if is selected/installed and add trusted_grub to globals
Return value
boolean - true if trusted grub is selected/installed
Set attributes of specified bootloader to variable containing attributes of currently used bootloader, call its initializer
Function parameters
string loader_type
Return value
void
string sepresenting device name of /boot partition same as RootPartitionDevice if no separate /boot partition
Flag indicates that bios_id_missing in disk true if missing false if at least one disk has bios_id
true if default section is edited it is important for remember default name...
device to save loader stage 1 to NOTE: this variable is being phased out. The boot_* keys in the globals map are now used to remember the selected boot location. Thus, we now have a list of selected loader devices. It can be generated from the information in the boot_* keys and the global variables (Boot|Root|Extended)PartitionDevice and mbrDisk by calling GetBootloaderDevices().
true if memtest was removed by user (manually) during the installation proposal
The kind of bootloader location that the user selected last time he went to the dialog. Used as a hint next time a proposal is requested, so the proposal can try to satisfy the user's previous preference. NOTE: this variable is being phased out. The boot_* keys in the globals map will be used to remember the last selected location. Currently, valid values are: mbr, boot, root, floppy, mbr_md, none
Module containing specific functions for ELILO configuration and installation
Joachim Plack <jplack@suse.de>
Jiri Srain <jsrain@suse.cz>
Andreas Schwab <schwab@suse.de>
Olaf Dabrunz <od@suse.de>
Philipp Thomas <pth@suse.de>
List of Global Functions
BootELILO - Constructor
CreateGlobals - Propose global options of bootloader modifies internal structures
CreateSections - Propose sections to bootloader menu modifies internal structures
Export - Export bootloader settings to a map
FlagBootDefaultOnce - Set section to boot on next reboot.
GetFunctions - Return map of provided functions
Import - Import settings from a map
Initializer - Initializer of ELILO bootloader
Propose - Propose bootloader settings
Read - Read settings from disk
Reset - Reset bootloader settings
Save - Save all bootloader configuration files
Summary - Display bootloader summary
Update - Update read settings to new version of configuration files
Write - Write bootloader settings to disk
getEfiMountPoint - Return mountpoint of partition holding EFI data
getEliloConfFilename - Return path to elilo.conf file
getEliloConfSubdir - Get directory containing elilo.conf relative to EFI partition's root
getEliloConfSubpath - Get path of elilo.conf relative to EFI partition's root
List of Global Variables
create_efi_entry - True if EFI entry should be recreated
elilo_conf_filename - elilo.conf path
old_efi_entry - Name of EFI entry when read settings
Propose global options of bootloader modifies internal structures
Return value
void
Propose sections to bootloader menu modifies internal structures
Return value
void
Set section to boot on next reboot.
Function parameters
string section
Return value
boolean - true on success
Return map of provided functions
Return value
map<string, any> - a map of functions (eg. $["write"::Write])
Read settings from disk
Function parameters
boolean reread
boolean avoid_reading_device_map
Return value
boolean - true on success
Save all bootloader configuration files
Function parameters
boolean clean
boolean init
boolean flush
Return value
boolean - true if success
Return mountpoint of partition holding EFI data
Return value
string - mountpoint if partition holding EFI data
Get directory containing elilo.conf relative to EFI partition's root
Return value
string - directory containing elilo.conf relative to EFI root
Module containing specific functions for GRUB configuration and installation
Jiri Srain <jsrain@suse.cz>
Joachim Plack <jplack@suse.de>
Olaf Dabrunz <od@suse.de>
Philipp Thomas <pth@suse.de>
List of Global Functions
BootGRUB - Constructor
CheckAdditionalKernels - Check for additional kernels which could go to the proposed settings
CreateSections - Propose sections to bootloader menu modifies internal structures
FlagOnetimeBoot - Boot passed section once on next reboot.
GetFunctions - Return map of provided functions
Initializer - Initializer of GRUB bootloader
Propose - Propose bootloader settings
Read - Read settings from disk
Reset - Reset bootloader settings
Save - Save all bootloader configuration files to the cache of the PlugLib PlugLib must be initialized properly !!!
StandardGlobals - Propose global options of bootloader
Summary - Display bootloader summary
Update - Update read settings to new version of configuration files
Write - Write bootloader settings to disk
List of Global Variables
disks_order - Disks order for ordering widget purproses
insert_saved_mbr - Insert saved MBR to bootloader menu?
merge_level - Shall proposal merge menus?
Check for additional kernels which could go to the proposed settings
Return value
list<map<string,string> > - a list of kernels to propose
Propose sections to bootloader menu modifies internal structures
Return value
void
Boot passed section once on next reboot.
Function parameters
string section
Return value
boolean - true on success
Return map of provided functions
Return value
map<string, any> - a map of functions (eg. $["write"::Write])
Read settings from disk
Function parameters
boolean reread
boolean avoid_reading_device_map
Return value
boolean - true on success
Save all bootloader configuration files to the cache of the PlugLib PlugLib must be initialized properly !!!
Function parameters
boolean clean
boolean init
boolean flush
Return value
boolean - true if success
Module containing specific functions for LILO configuration and installation
List of Global Functions
BootLILO - Constructor
CreateGlobals - Propose global options of bootloader modifies internal structures
CreateSections - Propose sections to bootloader menu modifies internal sreuctures
FlagOnetimeBoot - Set section to boot on next reboot
GetFunctions - Return map of provided functions
Initializer - Initializer of LILO bootloader
Propose - Propose bootloader settings
Read - Read settings from disk
Save - Save all bootloader configuration files to the cache of the PlugLib PlugLib must be initialized properly !!!
Update - Update read settings to new version of configuration files
Write - Write bootloader settings to disk
List of Global Variables
Propose global options of bootloader modifies internal structures
Return value
void
Propose sections to bootloader menu modifies internal sreuctures
Return value
void
Set section to boot on next reboot
Function parameters
string section
Return value
boolean - true on success
Return map of provided functions
Return value
map<string, any> - a map of functions (eg. $["write":BootLILO::Write])
Read settings from disk
Function parameters
boolean reread
boolean avoid_reading_device_map
Return value
boolean - true on success
Save all bootloader configuration files to the cache of the PlugLib PlugLib must be initialized properly !!!
Function parameters
boolean clean
boolean init
boolean flush
Return value
boolean - true if success
Module containing specific functions for POWERLILO configuration and installation
Jiri Srain <jsrain@suse.cz>
Joachim Plack <jplack@suse.de>
Olaf Dabrunz <od@suse.de>
Philipp Thomas <pth@suse.de>
List of Global Functions
BootPOWERLILO - Constructor
CreateGlobals - Propose global options of bootloader modifies internal structures
CreateSections - Propose sections to bootloader menu modifies internal sreuctures
Export - Export bootloader settings to a map
FlagOnetimeBoot - Set section to boot on next reboot
GetFunctions - Return map of provided functions
Import - Import settings from a map
Initializer - Initializer of PowerLILO bootloader
LocationProposal - Propose the location of the root device on disk and the boot device (if any), according to the subarchitecture. Results are stored in global variables.
Propose - Propose bootloader settings
Read - Read settings from disk
Reset - Reset bootloader settings
Save - Save all bootloader configuration files to the cache of the PlugLib PlugLib must be initialized properly !!!
SaveInstSourceId - Save the ID of the base installation source modifies internal variable
Summary - Display bootloader summary
Update - Update read settings to new version of configuration files
Write - Write bootloader settings to disk
currentBoardInit - Initialize the attribute of currently used board type
iSeriesInit - Initialize attributes of the board type
iSeriesWrite - Install the board-type-specific part of bootloader
List of Global Variables
Propose global options of bootloader modifies internal structures
Return value
void
Propose sections to bootloader menu modifies internal sreuctures
Return value
void
Set section to boot on next reboot
Function parameters
string section
Return value
boolean - true on success
Return map of provided functions
Return value
map<string, any> - map of functions (eg. $["write":BootPOWERLILO::Write])
Import settings from a map
Function parameters
map settings
Return value
boolean - true on success
Propose the location of the root device on disk and the boot device (if any), according to the subarchitecture. Results are stored in global variables.
Return value
void
Read settings from disk
Function parameters
boolean reread
boolean avoid_reading_device_map
Return value
boolean - true on success
Save all bootloader configuration files to the cache of the PlugLib PlugLib must be initialized properly !!!
Function parameters
boolean clean
boolean init
boolean flush
Return value
boolean - true if success
Save the ID of the base installation source modifies internal variable
Return value
void
Check whether the current system setup is a supported configuration
List of Global Functions
DetectedProblems - List detected problems Always run SystemSupported before calling this function
GRUB - GRUB-related check
StringProblems - Formated string of detected problems Always run SystemSupported before calling this function
SystemSupported - Check if the system configuraiton is supported Also sets the founds problems into internal variable Always run this function before calling DetectedProblems()
check_BootDevice - Check if boot partition exist check if not on raid0
List of Global Variables
List detected problems Always run SystemSupported before calling this function
Return value
list<string> - a list of problems, empty if no was found
Formated string of detected problems Always run SystemSupported before calling this function
Return value
string - a list of problems, empty if no was found
Check if the system configuraiton is supported Also sets the founds problems into internal variable Always run this function before calling DetectedProblems()
Return value
boolean - true if supported
Module containing specific functions for ZIPL configuration and installation
Joachim Plack <jplack@suse.de>
Jiri Srain <jsrain@suse.cz>
Philipp Thomas <pth@suse.de>
List of Global Functions
BootZIPL - Constructor
FlagOnetimeBoot - Set section to boot on next reboot.
GetFunctions - Return map of provided functions
Initializer - Initializer of S390 bootloader
Propose - Propose bootloader settings
Read - Read settings from disk
Save - Save all bootloader configuration files to the cache of the PlugLib PlugLib must be initialized properly !!!
Summary - Display bootloader summary
Update - Update read settings to new version of configuration files
Write - Write bootloader settings to disk
updateHardwareConfig - Update /etc/sysconfig/hardware configuration Use data from install.inf file
List of Global Variables
Set section to boot on next reboot.
Function parameters
string section
Return value
boolean - true on success
Return map of provided functions
Return value
map<string, any> - a map of functions (eg. $["write"::Write])
Read settings from disk
Function parameters
boolean reread
boolean avoid_reading_device_map
Return value
boolean - true on success
Save all bootloader configuration files to the cache of the PlugLib PlugLib must be initialized properly !!!
Function parameters
boolean clean
boolean init
boolean flush
Return value
boolean - true if success
Bootloader installation and configuration base module
List of Global Functions
Bootloader - Constructor
DelDuplicatedSections - Delete duplicated boot sections from BootCommon::sections
Export - Export bootloader settings to a map
FlagOnetimeBoot - Set section to boot on next reboot
Import - Import settings from a map
PreUpdate - Process update actions needed before packages update starts
Propose - Propose bootloader settings
Read - Read settings from disk
ReadOrProposeIfNeeded - Check whether settings were read or proposed, if not, decide what to do and read or propose settings
Reset - Reset bootloader settings
ResetEx - Reset bootloader settings
ResolveSymlink - Resolve a single symlink in key image_key in section map s
RunDelayedUpdates - Set section to boot on next reboot
SetWriteMode - Set settings how to write bootloader
Summary - Display bootloader summary
Update - Update the whole configuration
UpdateConfiguration - Update read settings to new version of configuration files
UpdateGfxMenu - Update the language of GFX menu according to currently selected language
Write - Write bootloader settings to disk
WriteInstallation - Write bootloader settings during installation
getBootDevice - Get device containing /boot directory
getDefaultSection - return default section label
getKernelParam - get kernel parameters from bootloader configuration file
getLoaderType - Get currently used bootloader, detect if not set yet
getProposedDefaultSection - Get default section as proposed during installation
getRootDevice - Get root fs device
getSectionsList - Get list of bootloader sections
listKernelParams - List kernel parameters
setBootDevice - Set device containing /boot directory
setLoaderType - Set type of bootloader Just a wrapper to BootCommon::setLoaderType
setRootDevice - Set root fs device
List of Global Variables
cached_proposal - Cache for the installation proposal
proposed_cfg_changed - Configuration was changed during inst. proposal if true
repeating_write - Write is repeating again Because of progress bar during inst_finish
Delete duplicated boot sections from BootCommon::sections
Return value
void
Set section to boot on next reboot
Function parameters
string section
Return value
boolean - true on success
Import settings from a map
Function parameters
map settings
Return value
boolean - true on success
Check whether settings were read or proposed, if not, decide what to do and read or propose settings
Return value
void
Resolve a single symlink in key image_key in section map s
Function parameters
map<string,any> section
string key
Return value
map<string,any> - section map of the changed section
Set settings how to write bootloader
Function parameters
map<string,any> settings
Return value
void
Update the whole configuration
Function parameters
map<string,any> iv
map<string,any> uv
Return value
boolean - true on success
Update read settings to new version of configuration files
Return value
void
Update the language of GFX menu according to currently selected language
Return value
boolean - true on success
Write bootloader settings during installation
Return value
boolean - true on success
get kernel parameters from bootloader configuration file
Function parameters
string section
string key
Return value
string - value, "false" if not present, "true" if present key without value
Get currently used bootloader, detect if not set yet
Return value
string - botloader type
Get default section as proposed during installation
Return value
string - section that was proposed as default during installation, if not known, return current default section if it is of type "image", if not found return first linux section, if no present, return empty string
Get list of bootloader sections
Function parameters
symbol type
Return value
list - of strings representing sections names
List kernel parameters
Function parameters
string section
Return value
list<string> - a list of kernel parameters (in the form 'hdd=ide-scsi')
Set device containing /boot directory
Function parameters
string device
Return value
void
Set type of bootloader Just a wrapper to BootCommon::setLoaderType
Function parameters
string bootloader
Return value
void
Routines for common widget manipulation
List of Global Functions
AdjustButtons - Adjust the labels of the bottom buttons of the wizard sequencer
CreateWidgets - Read widgets with listed names
DisableButtons - Disable given bottom buttons of the wizard sequencer
GetProcessedWidget - Return description map of currently processed widget
InitNull - Do-nothing replacement for a widget initialization function. Used for push buttons if all the other widgets have a fallback.
MergeHelps - Merge helps from the widgets
OkCancelBox - Create a term with OK and Cancel buttons placed horizontally
PrepareDialog - Prepare the dialog, replace strings in the term with appropriate widgets
ReplaceWidgetHelp - Replace help for a particular widget
Run - Generic function to create dialog and handle it's events
SetValidationFailedHandler - Set handler to be called after validation of a dialog failed
ShowAndRun - Display the dialog and run its event loop
ShowAndRunOrig - Display the dialog and run its event loop
StoreNull - Do-nothing replacement for a widget storing function. Used for push buttons if all the other widgets have a fallback.
StringsOfTerm - Process term with the dialog, return all strings. To be used as an argument for widget_names until they are obsoleted.
ValidateBasicType - Validate the value against the basic type
ValidateMaps - Validate widget description map, check for maps structure Also checks option description maps if present
ValidateValueType - Validate type of entry of the widget/option description map Also checks option description maps if present
cleanupWidgets - Cleanup after dialog was finished (independently on what event) global only because of testsuites
handleWidgets - Handle change of widget after event generated global only because of testsuites
initWidgets - Set widgets according to internally stored settings global only because of testsuites
mergeFunctions - Add fallback functions to a widget global only because of testsuites
prepareWidget - Prepare a widget for usage
saveWidgets - Save changes of widget after event generated global only because of testsuites CWMTab uses it too
validateWidget - Validate single widget
validateWidgets - Validate dialog contents for allow it to be saved
List of Global Variables
Adjust the labels of the bottom buttons of the wizard sequencer
Function parameters
string next
string back
string abort
string help
Return value
void
Read widgets with listed names
Function parameters
list<string> names
map<string,map<string,any> > source
Return value
list<map<string, any> > - of maps representing widgets
Disable given bottom buttons of the wizard sequencer
Function parameters
list<string> buttons
Return value
void
Return description map of currently processed widget
Return value
map<string, any> - description map of currently processed widget
Do-nothing replacement for a widget initialization function. Used for push buttons if all the other widgets have a fallback.
Function parameters
string key
Return value
void
Merge helps from the widgets
Function parameters
list<map<string,any> > widgets
Return value
string - merged helps of the widgets
Create a term with OK and Cancel buttons placed horizontally
Return value
term - the term (HBox)
Prepare the dialog, replace strings in the term with appropriate widgets
Function parameters
term dialog
list<map<string,any> > widgets
Return value
term - updated term ready to be used as a dialog
Replace help for a particular widget
Function parameters
string widget
string help
Return value
void
Generic function to create dialog and handle it's events
Function parameters
list<map<string, any> > widgets
map<any, any> functions
Return value
symbol - wizard sequencer symbol
Set handler to be called after validation of a dialog failed
Return value
void
Display the dialog and run its event loop
Function parameters
map<string,any> settings
Return value
symbol
Display the dialog and run its event loop
Function parameters
list<string> widget_names
map<string,map<string,any> > widget_descr
term contents
string caption
string back_button
string next_button
map<any, any> fallback
Return value
symbol - wizard sequencer symbol
Do-nothing replacement for a widget storing function. Used for push buttons if all the other widgets have a fallback.
Function parameters
string key
map event
Return value
void
Process term with the dialog, return all strings. To be used as an argument for widget_names until they are obsoleted.
Function parameters
term t
Return value
list<string> - strings found in the term
Validate the value against the basic type
Function parameters
any value
string type
Return value
boolean - true on success or if do not know how to validate
Validate widget description map, check for maps structure Also checks option description maps if present
Function parameters
map<string,map<string,any> > widgets
Return value
boolean - true on success
Validate type of entry of the widget/option description map Also checks option description maps if present
Function parameters
string key
any value
string widget
Return value
boolean - true if validation succeeded
Cleanup after dialog was finished (independently on what event) global only because of testsuites
Function parameters
list<map<string,any> > widgets
Return value
void
Handle change of widget after event generated global only because of testsuites
Function parameters
list<map <string, any> > widgets
map event_descr
Return value
symbol - modified action (sometimes may be needed) or nil
Set widgets according to internally stored settings global only because of testsuites
Function parameters
list<map<string, any> > widgets
Return value
void
Add fallback functions to a widget global only because of testsuites
Function parameters
list<map <string, any> > widgets
map<any, any> functions
Return value
list<map <string, any> > - a list of modified widget description maps
Prepare a widget for usage
Function parameters
map<string, any> widget_descr
Return value
map<string, any> - modified widget description map
Save changes of widget after event generated global only because of testsuites CWMTab uses it too
Function parameters
list<map<string,any> > widgets
map event
Return value
void
Validate single widget
Function parameters
map<string, any> widget
map event
string key
Return value
boolean - true if validation succeeded
Routines for selecting interfaces opened in firewall
List of Global Functions
CreateInterfacesWidget - Get the widget description map
CreateOpenFirewallWidget - Get the widget description map of the firewall enablement widget
DisableOpenFirewallWidget - Disable the whole firewal widget
DisplayDetailsPopup - Display the firewall interfaces selection as a popup
EnableOpenFirewallWidget - Enable the whole firewal widget
InitAllowedInterfaces - Initialize the list of allowed interfaces Changes the internal variables
InterfacesHandle - Handle function of the widget
InterfacesHandleWrapper - Handle function of the widget
InterfacesInit - Init function of the widget
InterfacesInitWrapper - Init function of the widget
InterfacesStore - Store function of the widget
InterfacesStoreWrapper - Store function of the widget
InterfacesValidate - Validate function of the widget
InterfacesValidateWrapper - Validate function of the widget
Modified - Check if settings were modified by the user
OpenFirewallHandle - Handle the immediate start and stop of the service
OpenFirewallHandleWrapper - Handle the immediate start and stop of the service
OpenFirewallHelp - Get the help text to the firewall opening widget
OpenFirewallHelpTemplate - Get the template for the help text to the firewall opening widget
OpenFirewallInit - Initialize the open firewall widget
OpenFirewallInitWrapper - Init function of the widget
OpenFirewallModified - Check if the widget was modified
OpenFirewallStore - Store function of the widget
OpenFirewallStoreWrapper - Store function of the widget
OpenFirewallWidgetExists - Check whether the whole firewall widget ( open port checkbox and fw details button) exists
StoreAllowedInterfaces - Store the list of allowed interfaces Users the internal variables
List of Global Variables
Get the widget description map
Function parameters
map<string,any> settings
Return value
map<string,any> - the widget description map
Get the widget description map of the firewall enablement widget
Function parameters
map<string,any> settings
Return value
map<string,any> - the widget description map
Display the firewall interfaces selection as a popup
Function parameters
map<string,any> settings
Return value
symbol - return value of the dialog
Initialize the list of allowed interfaces Changes the internal variables
Function parameters
list<string> services
Return value
void
Handle function of the widget
Function parameters
map<string,any> widget
string key
map event
Return value
symbol - for wizard sequencer or nil
Handle function of the widget
Function parameters
string key
map event
Return value
symbol - for wizard sequencer or nil
Init function of the widget
Function parameters
map<string,any> widget
string key
Return value
void
Init function of the widget
Function parameters
string key
Return value
void
Store function of the widget
Function parameters
map<string,any> widget
string key
map event
Return value
void
Store function of the widget
Function parameters
string key
map event
Return value
void
Validate function of the widget
Function parameters
map<string,any> widget
string key
map event
Return value
boolean - true if validation succeeded, false otherwise
Validate function of the widget
Function parameters
string key
map event
Return value
boolean - true if validation succeeded, false otherwise
Check if settings were modified by the user
Return value
boolean - true if settings were modified
Handle the immediate start and stop of the service
Function parameters
map<string,any> widget
string key
map event
Return value
symbol - always nil
Handle the immediate start and stop of the service
Function parameters
string key
map event
Return value
symbol - always nil
Get the help text to the firewall opening widget
Function parameters
boolean restart_displayed
Return value
string - help text
Get the template for the help text to the firewall opening widget
Function parameters
boolean restart_displayed
Return value
string - help text template with %1 and %2 placeholders
Initialize the open firewall widget
Function parameters
map<string,any> widget
string key
Return value
void
Init function of the widget
Function parameters
string key
Return value
void
Check if the widget was modified
Function parameters
string key
Return value
boolean - true if widget was modified
Store function of the widget
Function parameters
map<string,any> widget
string key
map event
Return value
void
Store function of the widget
Function parameters
string key
map event
Return value
void
Check whether the whole firewall widget ( open port checkbox and fw details button) exists
Return value
boolean - true if both widgets exist
Routines for service start widget handling
List of Global Functions
AutoStartHelp - Get the help text to the auto start widget
AutoStartHelpTemplate - Get the template for the help text to the auto start widget
AutoStartHelpXinetdTemplate - Get the template for the help text to the auto start widget
AutoStartInit - Init function of the widget
AutoStartInitWrapper - Init function of the widget
AutoStartStore - Store function of the widget
AutoStartStoreWrapper - Store function of the widget
AutoStartXinetdHelp - Get the help text to the auto start widget
CreateAutoStartWidget - Get the widget description map of the widget for service auto starting settings
CreateLdapWidget - Get the widget description map of the LDAP enablement widget TODO: Find a file to move to
CreateStartStopWidget - Get the widget description map for immediate service start/stop and appropriate actions
EnableLdapHelp - Get the help text to the LDAP enablement widget
EnableLdapHelpTemplate - Get the template for the help text to the LDAP enablement widget
LdapHandle - Handle function of the widget
LdapHandleWrapper - Handle function of the widget
LdapInit - Init function of the widget
LdapInitWrapper - Init function of the widget
StartStopHandle - Handle the immediate start and stop of the service
StartStopHandleWrapper - Handle the immediate start and stop of the service
StartStopHelp - Get the help text to the start/stop widget
StartStopHelpTemplate - Get the template for the help text to the start/stop widget
StartStopInit - Init function of the widget
StartStopInitWrapper - Init function of the widget
List of Global Variables
Get the template for the help text to the auto start widget
Return value
string - help text template with %1 and %2 placeholders
Get the template for the help text to the auto start widget
Return value
string - help text template with %1 and %2 placeholders
Init function of the widget
Function parameters
map<string,any> widget
string key
Return value
void
Init function of the widget
Function parameters
string key
Return value
void
Store function of the widget
Function parameters
map<string,any> widget
string key
map event
Return value
void
Store function of the widget
Function parameters
string key
map event
Return value
void
Get the help text to the auto start widget
Return value
string - help text
Get the widget description map of the widget for service auto starting settings
Function parameters
map<string,any> settings
Return value
map<string,any> - the widget description map
Get the widget description map of the LDAP enablement widget TODO: Find a file to move to
Function parameters
map<string,any> settings
Return value
map<string,any> - the widget description map
Get the widget description map for immediate service start/stop and appropriate actions
Function parameters
map<string,any> settings
Return value
map<string,any> - the widget description map
Get the help text to the LDAP enablement widget
Return value
string - help text
Get the template for the help text to the LDAP enablement widget
Return value
string - help text template with %1 and %2 placeholders
Handle function of the widget
Function parameters
map<string,any> widget
string key
map event
Return value
symbol - for wizard sequencer or nil
Handle function of the widget
Function parameters
string key
map event
Return value
symbol - for wizard sequencer or nil
Init function of the widget
Function parameters
map<string,any> widget
string key
Return value
void
Handle the immediate start and stop of the service
Function parameters
map<string,any> widget
string key
map event
Return value
symbol - always nil
Handle the immediate start and stop of the service
Function parameters
string key
map event
Return value
symbol - always nil
Get the help text to the start/stop widget
Function parameters
boolean restart_displayed
Return value
string - help text
Get the template for the help text to the start/stop widget
Function parameters
boolean restart_displayed
Return value
string - help text template with %1 and %2 placeholders
Init function of the widget
Function parameters
map<string,any> widget
string key
Return value
void
Routines for tab widget handling
List of Global Functions
CleanUp - Clean up function of the widget
CreateWidget - Get the widget description map
CurrentTab - Get the ID of the currently displayed tab
Handle - Handle function of the widget
HandleWrapper - Handle function of the widget
Init - Init function of the widget
InitWrapper - Init function of the widget
LastTab - Get the ID of the last displayed tab (after CWM::Run is done). It is needed because of bnc#134386.
Store - Store function of the widget
Validate - Validate function of the widget
List of Global Variables
Get the widget description map
Function parameters
map settings
Return value
map<string,any> - the widget description map
Get the ID of the currently displayed tab
Return value
string - the ID of the currently displayed tab
Handle function of the widget
Function parameters
map<string,any> widget
string key
map event
Return value
symbol - for wizard sequencer or nil
Handle function of the widget
Function parameters
string key
map event
Return value
symbol - for wizard sequencer or nil
Init function of the widget
Function parameters
map<string,any> widget
string key
Return value
void
Get the ID of the last displayed tab (after CWM::Run is done). It is needed because of bnc#134386.
Return value
string - the ID of the last displayed tab
Routines for management of TSIG keys
List of Global Functions
AnalyzeTSIGKeyFile - Analyze file that may contain TSIG keys
CreateWidget - Get the widget description map
DeleteTSIGKeyFromDisk - Remove all 3 files holding the TSIG key data
Files2KeyMaps - Transformate the list of files to the list of TSIG key description maps
Files2Keys - Get all TSIG keys that present in the files
Handle - Handle function of the widget
HandleWrapper - Handle function of the widget
Init - Init function of the widget
InitWrapper - Store function of the widget
NormalizeFilename - Remove leading and trailibg blanks and quotes from file name
Store - Store function of the widget
StoreWrapper - Store function of the widget
List of Global Variables
Analyze file that may contain TSIG keys
Function parameters
string filename
Return value
list<string> - a list of all TSIG key IDs in the file
Get the widget description map
Function parameters
map<string,any> settings
Return value
map<string,any> - a map the widget description map
Remove all 3 files holding the TSIG key data
Function parameters
string main
Return value
void
Transformate the list of files to the list of TSIG key description maps
Function parameters
list<string> filenames
Return value
list<map<string,string> > - a list of TSIG key describing maps
Get all TSIG keys that present in the files
Function parameters
list<string> filenames
Return value
list<string> - a list of all TSIG key IDs
Handle function of the widget
Function parameters
map<string,any> widget
string key
map event
Return value
symbol - for wizard sequencer or nil
Handle function of the widget
Function parameters
string key
map event
Return value
symbol - for wizard sequencer or nil
Init function of the widget
Function parameters
map<string,any> widget
string key
Return value
void
Remove leading and trailibg blanks and quotes from file name
Function parameters
string filename
Return value
string - file name without leading/trailing quotes and blanks
Store function of the widget
Function parameters
map<string,any> widget
string key
map event
Return value
void
Managing CAs, Requests and Certificate
List of Global Functions
List of Global Variables
autoYaSTSettings - AutoYaST Settings Map
certificateSequence - sequence for creating CA and certificates
currentCA - selected CA
currentCertificate - selected certificate
currentDefault - selected default type
currentRequest - selected Request
emailList - variables for new CA/Certificate/Request
passwdMap - Password map for CA
prop_settingsWritten - settings for proposal
Workaround for CallFunction problems
List of Global Functions
Function - Workaround function for WFM::CallFunction scope problems (#22486). Same use as WFM::CallFunction.
List of Global Variables
List of Global Functions
Abort - Abort function
AutoPackages - Return packages needed to be installed and removed during Autoinstallation to insure module has all needed software installed.
Export - Dump the casa-ats settings to a single map (For use by autoinstallation.)
Import - Get all casa-ats settings from the first parameter (For use by autoinstallation.)
Modified - Prototypes
Modified - Data was modified?
Overview - Create an overview table with all configured cards
Read - Read all casa-ats settings
Summary - Create a textual summary and a list of unconfigured cards
Write - Write all casa-ats settings
List of Global Variables
Settings - Settings Map
modified - Data was modified?
write_only - Write only, used during autoinstallation. Don't run services and SuSEconfig, it's all done at one place.
Return packages needed to be installed and removed during Autoinstallation to insure module has all needed software installed.
Return value
map - with 2 lists.
Dump the casa-ats settings to a single map (For use by autoinstallation.)
Return value
map - Dumped settings (later acceptable by Import ())
Get all casa-ats settings from the first parameter (For use by autoinstallation.)
Function parameters
map settings
Return value
boolean - True on success
Create a textual summary and a list of unconfigured cards
Return value
list - summary of the current configuration
Module for checking media intergrity
List of Global Variables
List of Global Functions
Abort - Abort function
AutoPackages - Return packages needed to be installed and removed during Autoinstallation to insure module has all needed software installed.
Export - Dump the cluster settings to a single map (For use by autoinstallation.)
Import - Get all cluster settings from the first parameter (For use by autoinstallation.)
Modified - Prototypes
Modified - Data was modified?
Overview - Create an overview table with all configured cards
Read - Read all cluster settings
SetModified - Mark as modified, for Autoyast.
SetWriteOnly - Set write_only flag (for autoinstalation).
Summary - Create a textual summary and a list of unconfigured cards
Write - Write all cluster settings
List of Global Variables
Return packages needed to be installed and removed during Autoinstallation to insure module has all needed software installed.
Return value
map - with 2 lists.
Dump the cluster settings to a single map (For use by autoinstallation.)
Return value
map - Dumped settings (later acceptable by Import ())
Get all cluster settings from the first parameter (For use by autoinstallation.)
Function parameters
map settings
Return value
boolean - True on success
Set write_only flag (for autoinstalation).
Function parameters
boolean value
Return value
void
Create a textual summary and a list of unconfigured cards
Return value
list - summary of the current configuration
Command line interface for YaST2 modules
List of Global Functions
Abort - Abort the command line handling
Aborted - User asked for abort (forgetting the changes)
Command - Get next user-given command
Done - Are there some commands to be processed?
Error - Print an Error Message
Init - Initialize Module
Interactive - Is module started in interactive command-line mode?
Parse - Parse a list of arguments.
PasswordInput - Read input from command line
Print - Print a String
PrintNoCR - Print a String, don't add a trailing newline character
PrintVerbose - Same as Print(), but the string is printed only when verbose command line mode was activated
PrintVerboseNoCR - Same as PrintNoCR(), but the string is printed only when verbose command line mode was activated
Run - Parse the Command Line
Scan - Scan a command line from stdin, return it split into a list
StartGUI - Should module start UI?
UniqueOption - Check uniqueness of an option
UserInput - Read input from command line
Verbose - Return verbose flag boolean verbose flag
YesNo - Ask user, commandline equivalent of Popup::YesNo()
List of Global Variables
User asked for abort (forgetting the changes)
Return value
boolean - true, if the user asked abort
Get next user-given command
Return value
map - of the new command. If there are no more commands, it returns exit or abort depending on the result user asked for.
See also:
Parse
Are there some commands to be processed?
Return value
boolean - true, if there is no more commands to be processed, either because the user used command line, or the interactive mode was finished
Initialize Module
Function parameters
map cmdlineinfo
list<any> args
Return value
boolean - true, if there are some commands to be processed
See also:
Command
Is module started in interactive command-line mode?
Return value
boolean - true, if the user asked for interactive command-line mode
Parse a list of arguments.
Function parameters
list<any> arguments
Return value
map<string, any> - containing the command and it's option. In case of error it is an empty map.
Read input from command line
Function parameters
string prompt
Return value
string - Entered string
Print a String, don't add a trailing newline character
Function parameters
string s
Return value
void
Same as Print(), but the string is printed only when verbose command line mode was activated
Function parameters
string s
Return value
void
Same as PrintNoCR(), but the string is printed only when verbose command line mode was activated
Function parameters
string s
Return value
void
Parse the Command Line
Function parameters
map commandline
Return value
any - false if there was an error or no changes to be written (for example "help"). true if the changes should be written, or a value returned by the handler
Scan a command line from stdin, return it split into a list
Return value
list<string> - the list of command line parts, nil for end of file
Should module start UI?
Return value
boolean - true, if the user asked for standard UI (no parameter was passed by command line)
Check uniqueness of an option
Function parameters
map<string, string> options
list unique_options
Return value
string - nil if there is a problem, otherwise the unique option found
Read input from command line
Function parameters
string prompt
Return value
string - Entered string
List of Global Functions
CommitChanges - Commit changes done by YaST into the SVN repo
Init - Initialize before module is started Do not call CommitChanges unless Init returns true!
InitFiles - Initialize specified files for version control; useful when not having whole directory under version control, but only relevant files
List of Global Variables
Commit changes done by YaST into the SVN repo
Function parameters
string module_name
Return value
boolean - true on success, false on failure
Initialize before module is started Do not call CommitChanges unless Init returns true!
Return value
boolean - true on success, false on failure
Confirmation routines
List of Global Functions
Delete - Opens a popup yes/no confirmation.
DeleteSelected - Opens a popup yes/no confirmation.
Detection - Confirm hardware detection (only in manual installation)
MustBeRoot - If we are running as root, return true. Otherwise ask the user whether we should continue even though things might not work
List of Global Variables
Opens a popup yes/no confirmation.
Function parameters
string delete
Return value
boolean - delete selected entry
Opens a popup yes/no confirmation.
Return value
boolean - delete selected entry
Confirm hardware detection (only in manual installation)
Function parameters
string class
string icon_name
Return value
boolean - true on continue
provide console specific stuff (esp. font and encoding) <BR> sysconfig /etc/sysconfig/console:<BR> <UL> <LI> CONSOLE_FONT string console font</LI> <LI> CONSOLE_SCREENMAP string console screenmap</LI> <LI> CONSOLE_UNICODEMAP string console unicode map</LI> <LI> CONSOLE_MAGIC string console magic control sequence</LI> <LI> CONSOLE_ENCODING string console encoding</LI> </UL>
List of Global Functions
Check - Check current configuration This function should be called to check consistency with other modules (mentioned as Depends in the header)
Console - constructor does nothing in initial mode restores console configuration from /etc/sysconfig in normal mode
Init - initialize console settings
Restore - restore data to system (rc.config agent) returns encoding
Save - save data to system (rc.config agent)
SelectFont - activate a language specific console font
List of Global Variables
Check current configuration This function should be called to check consistency with other modules (mentioned as Depends in the header)
Return value
boolean - 0 if no change 1 change due to dependency with other module 2 inconsistency detected
constructor does nothing in initial mode restores console configuration from /etc/sysconfig in normal mode
Return value
void
Handling crashes and recovery of other modules
List of Global Functions
AskRun - Check whether operation was last run in moment of last fail. Return whether operation shall be run If not, return true (no reason to think that operation is unsafe), Otherwise ask user
Failed - Check whether operation failed
FailedLast - Check whether operation was last started when failed
Finish - Finish operation
LastFinished - Get last finished operation
Read - Read settings from data file to variables
Run - Start operation
Write - Write data stored in variables to data files
List of Global Variables
filename - Filename of file storing crash settings
Check whether operation was last run in moment of last fail. Return whether operation shall be run If not, return true (no reason to think that operation is unsafe), Otherwise ask user
Function parameters
string op
string question
Return value
boolean - true if operation shall be started
Check whether operation failed
Function parameters
string op
Return value
boolean - true if yes
Check whether operation was last started when failed
Function parameters
string op
Return value
boolean - true if yes
Read and Write Crontabs
List of Global Variables
Add a simple cron job with comment and env. variables
Function parameters
string comment
map envs
string command
map event
string file
Return value
boolean - true on success
Read crontab contents
Function parameters
string filename
map options
Return value
list - crontab contents
Installation mode
Controller settings, input and output functions
List of Global Functions
Abort - Abort function
ActivateDisk - Activate selected Disks
AutoPackages - Return packages needed to be installed and removed during Autoinstallation to insure module has all needed software installed.
Available - Is this kind of disk controller available?
DeactivateDisk - Activate selected Disks
Export - Dump the controller settings to a single map (For use by autoinstallation.)
FormatDisks - Activate selected Disks
FourDigitHex - Translate integer number to its hexadecimal representation with leading 0x and exactliy 4 hexadecimal numbers
GetPartitionInfo - Get partitioninfo
Import - Get all controller settings from the first parameter (For use by autoinstallation.)
IsAvailable - Check if DASD subsystem is available
Modified - Prototypes
Modified - Data was modified?
ProbeDisks - Probe for DASD disks
Read - Read all controller settings
Summary - Create a textual summary and a list of unconfigured cards
Write - Write all controller settings
List of Global Variables
modified - Data was modified?
write_only - Write only, used during autoinstallation. Don't run services and SuSEconfig, it's all done at one place.
Activate selected Disks
Function parameters
string channel
boolean diag
Return value
void
Return packages needed to be installed and removed during Autoinstallation to insure module has all needed software installed.
Return value
map - with 2 lists.
Activate selected Disks
Function parameters
string channel
boolean diag
Return value
void
Dump the controller settings to a single map (For use by autoinstallation.)
Return value
map - Dumped settings (later acceptable by Import ())
Activate selected Disks
Function parameters
list<string> disks_list
integer par
boolean write_vl
boolean interactive
Return value
void
Translate integer number to its hexadecimal representation with leading 0x and exactliy 4 hexadecimal numbers
Function parameters
integer i
Return value
string - hexadecimal number
Get partitioninfo
Function parameters
string disk
Return value
string - GetPartitionInfo string The info
Get all controller settings from the first parameter (For use by autoinstallation.)
Function parameters
map settings
Return value
boolean - True on success
Check if DASD subsystem is available
Return value
boolean - True if more than one disk
Create a textual summary and a list of unconfigured cards
Return value
list - summary of the current configuration
Hostname and DNS data
List of Global Functions
Export - Dump the DNS settings to a map, for autoinstallation use.
Import - Get all the DNS configuration from a map. When called by dns_auto (preparing autoinstallation data) the map may be empty.
IsHostLocal - Check if hostname or IP address is local computer Used to determine if LDAP server is local (and it should be checked if required schemes are included Calls Read () function before querying any data
Read - Reads current DNS and hostname settings Includes Host,NetworkConfig::Read
ReadHostDomain - Use this host and domain name, if they are defined
ReadNameserver - Use the parameter, coming usually from install.inf, if it is defined. Used when there is nothing better.
Summary - Create DNS text summary
Write - Write new DNS and hostname settings Includes Host,NetworkConfig::Write
List of Global Variables
domain - Domain Name (not including the host part)
hostname - Short Hostname
modified - Data was modified?
proposal_valid - Should the hostname be proposed? #152218
Dump the DNS settings to a map, for autoinstallation use.
Return value
map - autoinstallation settings
Get all the DNS configuration from a map. When called by dns_auto (preparing autoinstallation data) the map may be empty.
Function parameters
map settings
Return value
boolean - true if success
Check if hostname or IP address is local computer Used to determine if LDAP server is local (and it should be checked if required schemes are included Calls Read () function before querying any data
Function parameters
string check_host
Return value
boolean - true if hostname is local host
Reads current DNS and hostname settings Includes Host,NetworkConfig::Read
Return value
boolean - true if success
Use this host and domain name, if they are defined
Function parameters
string hn
string dn
Return value
boolean - true if the hostname has been assigned
Use the parameter, coming usually from install.inf, if it is defined. Used when there is nothing better.
Function parameters
string ns
Return value
boolean - true if success
DSL data
List of Global Functions
Add - Add a new device
Adding - Used to see whether we are in the process of adding a new interface or editing an existing one.
Commit - Commit the pending operation
Delete - Delete the given device
Edit - Edit the given device
Export - Export data
Import - Import data
Modified - Data was modified?
Overview - Create an overview table with all configured devices
Propose - Propose a configuration
Read - Read all network settings from the SCR
Select - Select the given device
SelectHW - Select the hardware component
Summary - Create a textual summary and a list of unconfigured devices
UsesDevice - Return true if the device is used by any DSL connection
Write - Update the SCR according to network settings
List of Global Variables
AbortFunction - Abort function return boolean return true if abort
capiadsl - Special Capi-ADSL mode -- different presets for the first device. Used for ISDN-DSL combined hardware.
interface - Ethernet network interface
modemip - DSL modem IP (used for PPTP)
pppmode - PPP mode: pppoe or pppoatm
vpivci - VPI/VCI
Used to see whether we are in the process of adding a new interface or editing an existing one.
Return value
boolean - adding?
Delete the given device
Function parameters
string name
Return value
boolean - true if success
Edit the given device
Function parameters
string name
Return value
boolean - true if success
Select the given device
Function parameters
string dev
Return value
boolean - true if success
Create a textual summary and a list of unconfigured devices
Function parameters
boolean split
Return value
list - summary of the current configuration
Return true if the device is used by any DSL connection
Function parameters
string device
Return value
boolean - true if yes
Special Capi-ADSL mode -- different presets for the first device. Used for ISDN-DSL combined hardware.
List of Global Functions
Description - Get the description of the currently selected desktop for the summary
Desktop - Get the currently set default desktop, nil if none set
ForceReinit - Forces new initialization...
GetAllDesktopsMap - Returns map of pre-defined default system tasks
Init - Initialize default desktop from control file if specified there
PatternsToDeselect - Get patterns which should be NOT selected for currently selected desktop
PatternsToSelect - Get patterns which should be selected for currently selected desktop
PrefferedWindowManager - Get preffered window/desktop manager for the selected desktop
SelectedDesktops - Return list installed desktops or desktop selected for installation.
SetDesktop - Set the default desktop
List of Global Variables
Get the description of the currently selected desktop for the summary
Return value
string - the description of the desktop
Get the currently set default desktop, nil if none set
Return value
string - desktop or nil
Returns map of pre-defined default system tasks
Return value
map <string, map> - all_system_tasks
$[
"desktop ID" : $[
"desktop" : "desktop to start", // DEFAULT_WM
"order" : integer,
"label" : _("Desktop Name Visible in Dialog (localized - initial localization)"),
"label_id" : _("Desktop Name Visible in Dialog (original)"),
"description" : _("Description text of the desktop (localized - initial localization)"),
"description_id" : _("Description text of the desktop (originale)"),
"patterns" : ["list", "of", "related", "patterns"],
"icon" : "some-icon", // filename from the 64x64 directory of the current theme (without .png suffix)
],
]Get patterns which should be NOT selected for currently selected desktop
Return value
list<string> - a list of patterns
Get patterns which should be selected for currently selected desktop
Return value
list<string> - a list of patterns
Get preffered window/desktop manager for the selected desktop
Return value
string - preffered window/desktop manager, empty if no one
Return list installed desktops or desktop selected for installation.
Return value
list <string>
See also:
GetAllDesktopsMap
Handling of .desktop entries
List of Global Functions
Read - Read module and group data from desktop files
RunViaDesktop - Runs a program by writing a special desktop file. Works with KDE and GNOME. Useful for kinternet, see bug 37864#c17
Read module and group data from desktop files
Function parameters
list<string> Values
Return value
void
Runs a program by writing a special desktop file. Works with KDE and GNOME. Useful for kinternet, see bug 37864#c17
Function parameters
string exec
list<string> args
Return value
void
Expert Partitioner
List of Global Functions
Create - The maps for the devices must contain the entries "device" and "size_k".
GetSelectedDevices - Returns list with the maps of the selected devices.
GetUnselectedDevices - Returns list with the maps of the unselected devices.
List of Global Variables
The maps for the devices must contain the entries "device" and "size_k".
Function parameters
list<map> unselected_devices
list<map> selected_devices
list<symbol> fields
Return value
term
Data for configuration of dhcp-server, input and output functions.
List of Global Functions
DhcpServerUI - Constructor
List of Global Variables
Routines for handling the dialog with tree on the left side
List of Global Functions
AdjustButtons - Adjust buttons at the bottom of the dialog
AdjustButtonsAny - Adjust buttons at the bottom of the dialog
Run - Generic function to create dialog and handle it's events. Run the event loop over the dialog with the left tree.
RunAndHide - Run the event loop over the dialog with the left tree. After finished, run UI::CloseDialog
ShowAndRun - Display the dialog and run its event loop
ShowFlat - Draw the dialog with the flat tree (only single level of the tree entries)
ShowTree - Draw the dialog with multi-level tree
List of Global Variables
Adjust buttons at the bottom of the dialog
Function parameters
map<string,string> buttons
Return value
void
Adjust buttons at the bottom of the dialog
Function parameters
map<string,any> buttons
Return value
void
Generic function to create dialog and handle it's events. Run the event loop over the dialog with the left tree.
Function parameters
map<string,any> settings
Return value
symbol - wizard sequencer symbol
Run the event loop over the dialog with the left tree. After finished, run UI::CloseDialog
Function parameters
map<string,any> settings
Return value
symbol - wizard sequencer symbol
Display the dialog and run its event loop
Function parameters
map<string,any> settings
Return value
symbol - wizard sequencer symbol
Draw the dialog with the flat tree (only single level of the tree entries)
Function parameters
list<string> ids_order
map<string,map<string,any> > screens
Return value
void
Instalation into a Directory settings, input and output functions
Definitions of basic directories
List of Global Functions
Directory - Constructor
ResetTmpDir - Set temporary directory
List of Global Variables
agentdir - Directory with agents
bindir - Directory for binaries and scripts
clientdir - Directory for clients
custom_workflow_dir - Directory needed for custom installation workflows It can be set to the path containing additional file on a CDROM
datadir - Directory for data
desktopdir - Directory for desktop files
etcdir - Directory for configuration data
icondir - Base directory for icons
imagedir - Directory for images
includedir - Directory for includes
localedir - Directory for locales
logdir - Directory for log files
moduledir - Directory for modules
schemadir - Directory for schema (RNC,DTD,RNG)
scrconfdir - Directory for SCR definition files
themedir - Directory for themes
tmpdir - Directory for temporary files Must be updated with ResetTmpDir() call after the SCR change!
vardir - Directory for variable data
Directory needed for custom installation workflows It can be set to the path containing additional file on a CDROM
Directory for temporary files Must be updated with ResetTmpDir() call after the SCR change!
Distinguish between distributions that can run YaST
List of Global Variables
Module containing helper functions.
List of Global Functions
IsReverseZone - Returns whether zone is a reverse-zone type
List of Global Variables
Data for configuration of dns-server, input and output functions.
List of Global Functions
List of Global Variables
popups - Map of popups for CWM
Handling "Don Not Show This Dialog Again"
List of Global Functions
GetCurrentConfigurationMap - Returns the current configuration map
GetDefaultReturn - Return the default return value for question that should not be shown again
GetShowQuestionAgain - Returns whether the question should be shown again
RemoveShowQuestionAgain - Removes one entry defined with map params
SetDefaultReturn - Sets the default return value for the question that should not be shown
SetShowQuestionAgain - Sets and stores whether the question should be shown again. If it should be, the result is not stored since the 'show again' is the default value.
List of Global Variables
Returns the current configuration map
Return value
map <string, map <string, map <string, any> > > - with the current configuration
See also:
current_configuration
Return the default return value for question that should not be shown again
Function parameters
map <string, string> params
Return value
any - default return value
See also:
current_configuration
Returns whether the question should be shown again
Function parameters
map <string, string> params
Return value
boolean - it should be shown
See also:
current_configuration
Removes one entry defined with map params
Function parameters
map <string, string> params
Return value
boolean - if success
See also:
current_configuration
Sets the default return value for the question that should not be shown
Function parameters
map <string, string> params
any default_return
Return value
boolean - if success
See also:
current_configuration
Sets and stores whether the question should be shown again. If it should be, the result is not stored since the 'show again' is the default value.
Function parameters
map <string, string> params
boolean new_value
Return value
boolean - if success
See also:
current_configuration
Expert Partitioner
Creating dump devices for S/390
List of Global Functions
Abort - Abort function
AutoPackages - Return packages needed to be installed and removed during Autoinstallation to insure module has all needed software installed.
Available - Is this kind of disk controller available?
AvailableDisks - Create a List of available Disks
Export - Dump the controller settings to a single map (For use by autoinstallation.)
FormatDisk - Format a disk as DUMP device
Import - Get all controller settings from the first parameter (For use by autoinstallation.)
Modified - Prototypes
Modified - Data was modified?
Read - Read all controller settings
Summary - Create a textual summary and a list of unconfigured cards
Write - Write all controller settings
List of Global Variables
modified - Data was modified?
write_only - Write only, used during autoinstallation. Don't run services and SuSEconfig, it's all done at one place.
Return packages needed to be installed and removed during Autoinstallation to insure module has all needed software installed.
Return value
map - with 2 lists.
Dump the controller settings to a single map (For use by autoinstallation.)
Return value
map - Dumped settings (later acceptable by Import ())
Format a disk as DUMP device
Function parameters
string dev
boolean force
Return value
boolean - true on success
Get all controller settings from the first parameter (For use by autoinstallation.)
Function parameters
map settings
Return value
boolean - True on success
Create a textual summary and a list of unconfigured cards
Return value
list - summary of the current configuration
Edir utility routines
List of Global Functions
DoesEdirectoryTreeExist - Check if tree exists
GetLeafNameLDAP - GetLeafNameLDAP(string ldapName)
GetLeafNameNDS - GetLeafNameNDS(string ndsName)
GetTreeName - GetTreeName
List of Global Variables
Check if tree exists
Function parameters
string treeName
Return value
boolean
GetLeafNameLDAP(string ldapName)
Function parameters
string ldapName
Return value
string
GetLeafNameNDS(string ndsName)
Function parameters
string ndsName
Return value
string
Provide the encoding stuff
List of Global Functions
Encoding - Constructor does nothing in initial mode restores console encoding from /etc/sysconfig in normal mode
GetCodePage - Get Code Page
GetEncLang - Get Encoding Language
GetUtf8Lang - Get UTF8 Language
Restore - Restore data to system
SetEncLang - Set Encoding Language
SetUtf8Lang - Set UTF8 Language
List of Global Variables
console - Current (ISO) encoding
Constructor does nothing in initial mode restores console encoding from /etc/sysconfig in normal mode
Return value
void
Handle FTP Requests
List of Global Variables
Configuration of a ISDN Fax machine
Detect if a configuratil file was changed
Jiri Srain <jsrain@suse.cz>
Support routines for detecting changes of configuration files being done
externally (not by YaST) to prevent the changes from being lost because
of YaST not handling the configuration files correctly (eg. removing
comments in some cases, changing order of options,...)
Warns user if such change is detected.
Usage:
Before reading the configuration file:
call boolean CheckFiles (list<string>) with all files. If any of them
is detected to be changed, YaST asks a popup for you.
alternatively use boolean FileChanged (string) for each file (does not
ask any question, immediatelly returns status of the file
After writing the configuraiton file:
call void StoreFileCheckSum (string) for each file to store recent
checksum. YaST will use this checksum next time checking.
List of Global Functions
CheckFiles - Check files if any of them were changed Issue a question whether to continue if some were chaned
FileChanged - Check if a file was modified externally (without YaST)
StoreFileCheckSum - Store checksum of a file to the store
List of Global Variables
Check files if any of them were changed Issue a question whether to continue if some were chaned
Function parameters
list<string> files
Return value
boolean - true if either none was changed or user agreed to continue
Check if a file was modified externally (without YaST)
Function parameters
string file
Return value
boolean - true if was changed externally
Johannes Buchhold (jbuch@suse.de)
Purpose:
These module contains the supported filesystems and their settings.
List of Global Functions
GetAllFileSystems - Filesystem Definitions
GetMountString - Return the mount option for each used_fs (-t)
List of Global Variables
Filesystem Definitions
Function parameters
boolean add_swap
boolean add_pseudo
Return value
map<symbol, map<symbol, any> > - map with all supported filesystems
Module for getting information about files and directories. Their types and sizes and functions for checking, creating and removing them.
List of Global Functions
CheckAndCreatePath - Checks whether the path (directory) exists and return a boolean value whether everything is OK or user accepted the behavior as despite some errors. If the directory doesn't exist, it offers to create it (and eventually creates it).
Exists - Function which determines if the requested file/directory exists.
GetFileRealType - Function returns the real type of requested file/directory. If the file is a link to any object, "link" is returned.
GetFileType - Function returns the type of requested file/directory. If the file is a link to any object, the object's type is returned.
GetOwnerGroupID - Function which determines the owner's group ID of requested file/directory.
GetOwnerUserID - Function which determines the owner's user ID of requested file/directory.
GetSize - Function which returns the size of requested file/directory.
IsBlock - Function which determines if the requested file/directory is a block file (device) or link to a block device.
IsCharacterDevice - Function which determines if the requested file/directory is a character device or link to a character device.
IsDirectory - Function which determines if the requested file/directory is a directory or it is a link to a directory.
IsFifo - Function which determines if the requested file/directory is a fifo or link to a fifo.
IsFile - Function which determines if the requested file/directory is a regular file or it is a link to a regular file.
IsLink - Function which determines if the requested file/directory is a link.
IsSocket - Function which determines if the requested file/directory is a socket or link to a socket.
MD5sum - Function return the MD5 sum of the file.
List of Global Variables
Checks whether the path (directory) exists and return a boolean value whether everything is OK or user accepted the behavior as despite some errors. If the directory doesn't exist, it offers to create it (and eventually creates it).
Function parameters
string pathvalue
Return value
boolean - whether everything was OK or whether user decided to ignore eventual errors
Function which determines if the requested file/directory exists.
Function parameters
string target
Return value
boolean - true if exists
Function returns the real type of requested file/directory. If the file is a link to any object, "link" is returned.
Function parameters
string target
Return value
string - file type (directory|regular|block|fifo|link|socket|chr_device), nil if doesn't exist
Example 5.
FileUtils::GetFileRealType ("/var") -> "directory"
FileUtils::GetFileRealType ("/etc/passwd") -> "file"
FileUtils::GetFileRealType ("/does-not-exist") -> nilFunction returns the type of requested file/directory. If the file is a link to any object, the object's type is returned.
Function parameters
string target
Return value
string - fle type (directory|regular|block|fifo|link|socket|chr_device), nil if doesn't exist
Function which determines the owner's group ID of requested file/directory.
Function parameters
string target
Return value
integer - GID, nil if doesn't exist
Example 6.
FileUtils::GetOwnerGroupID ("/etc/passwd") -> 0
FileUtils::GetOwnerGroupID ("/does-not-exist") -> nilFunction which determines the owner's user ID of requested file/directory.
Function parameters
string target
Return value
integer - UID, nil if doesn't exist
Example 7.
FileUtils::GetOwnerUserID ("/etc/passwd") -> 0
FileUtils::GetOwnerUserID ("/does-not-exist") -> nilFunction which returns the size of requested file/directory.
Function parameters
string target
Return value
integer - file size, -1 if doesn't exist
Example 8.
FileUtils::GetSize ("/var/log/YaST2") -> 12348
FileUtils::GetSize ("/does-not-exist") -> -1Function which determines if the requested file/directory is a block file (device) or link to a block device.
Function parameters
string target
Return value
boolean - true if it is a block file, nil if doesn't exist
Example 9.
FileUtils::IsBlock ("/var") -> false
FileUtils::IsBlock ("/dev/sda2") -> true
FileUtils::IsBlock ("/dev/does-not-exist") -> nilFunction which determines if the requested file/directory is a character device or link to a character device.
Function parameters
string target
Return value
boolean - true if it is a charcater device, nil if doesn't exist
Function which determines if the requested file/directory is a directory or it is a link to a directory.
Function parameters
string target
Return value
boolean - true if it is a directory, nil if doesn't exist
Example 10.
FileUtils::IsDirectory ("/var") -> true
FileUtils::IsDirectory ("/var/log/messages") -> false
FileUtils::IsDirectory ("/does-not-exist") -> nilFunction which determines if the requested file/directory is a fifo or link to a fifo.
Function parameters
string target
Return value
boolean - true if it is a fifo, nil if doesn't exist
Function which determines if the requested file/directory is a regular file or it is a link to a regular file.
Function parameters
string target
Return value
boolean - true if it is a regular file, nil if doesn't exist
Example 11.
FileUtils::IsFile ("/var") -> false
FileUtils::IsFile ("/var/log/messages") -> true
FileUtils::IsFile ("/does-not-exist") -> nilFunction which determines if the requested file/directory is a link.
Function parameters
string target
Return value
boolean - true if it is a link, nil if doesn't exist
Function which determines if the requested file/directory is a socket or link to a socket.
Function parameters
string target
Return value
boolean - true if it is a socket, nil if doesn't exist
List of Global Functions
AutoPackages - Return packages needed to be installed and removed during Autoinstallation to insure module has all needed software installed.
CryptedHomesEnabled - If pam_mount is enabled, pam_fp cannot be used (bnc#390810)
Export - Dump the fingerprint-reader settings to a single map (For use by autoinstallation.)
Import - Get all fingerprint-reader settings from the first parameter (For use by autoinstallation.)
Read - Read all fingerprint-reader settings
ReadFingerprintReaderDevices - Get the list of fingerprint readers
ShortSummary - Create a short textual summary
Summary - Create a textual summary and a list of unconfigured cards
UpdatedArchPackages - Return list of architecture specific packages (derived from package list given as parameter) merged with the packages in parameter
Write - Write all fingerprint-reader settings
List of Global Variables
import_dir - Directory with fingerprint files that should be imported
modified - Data was modified?
required_packages - Required packages for this module to operate
use_pam - if Fingerprint Reader authentication is enabled
write_only - Write only, used during autoinstallation. Don't run services and SuSEconfig, it's all done at one place.
Return packages needed to be installed and removed during Autoinstallation to insure module has all needed software installed.
Return value
map - with 2 lists.
If pam_mount is enabled, pam_fp cannot be used (bnc#390810)
Return value
boolean
Dump the fingerprint-reader settings to a single map (For use by autoinstallation.)
Return value
map - Dumped settings (later acceptable by Import ())
Get all fingerprint-reader settings from the first parameter (For use by autoinstallation.)
Function parameters
map settings
Return value
boolean - True on success
Create a short textual summary
Return value
string - summary of the current configuration
Create a textual summary and a list of unconfigured cards
Return value
list - summary of the current configuration
Return list of architecture specific packages (derived from package list given as parameter) merged with the packages in parameter
Function parameters
list<string> packages
Return value
list<string>
Firstboot settings, input and output functions
List of Global Variables
Import firstboot settigs defined by autoyast
Function parameters
map settings
Return value
boolean
FtpServer settings, input and output functions
List of Global Functions
Abort - Returns a confirmation popup dialog whether user wants to really abort.
Export - Dump the FtpServer settings to a single map (For use by autoinstallation.)
GetModified - Returns whether the configuration has been modified.
Import - Get all FtpServer settings from the first parameter (For use by autoinstallation.)
InitDaemon - Set which daemon will be configured (For use by autoinstallation.)
Modified - Prototypes
Modified - Data was modified?
OptionsSummary - Create unsorted list of options
Overview - Create an overview table with all configured cards
PollAbort - Checks whether an Abort button has been pressed. If so, calls function to confirm the abort call.
Read - Read all FtpServer settings
Summary - Create a textual summary and a list of unconfigured cards
ValueUIEdit - read value from PURE_EDIT_SETTINGS
Write - Write all FtpServer settings
WriteSettings - Write current configuration
WriteToEditMap - Write value from UI to temporary structure
WriteUpload - Ask for creation upload directory It is necessary if user want to allow uploading for anonymous
WriteXinetd - Write current configuration
List of Global Variables
DEFAULT_CONFIG - map of deafult values for options in UI
EDIT_SETTINGS - map <string, string > of vsftpd settings
PURE_SETTINGS - map <string, string > of pure-ftpd settings
UI_keys - list of keys from map DEFAULT_CONFIG
VS_SETTINGS - map <string, string > of vsftpd settings
anon_homedir - variable signifies home dir for anonymous user
anon_uid - variable signifies uid for anonymous user
change_permissions - variable signifies if user choose change permissions for home dir for anonymous connections with allowed upload
create_upload_dir - variable signifies if it is create upload dir only for vsftpd and anonymous connections with allowed upload
ftps -
modified - Data was modified?
proposal_valid - general variable for proposal
pure_ftp_allowed_permissios_upload - variable signifies if upload dir for anonymous has good permissions it is only for pure-ftpd
pure_ftp_xinetd_running - variable signifies if daemon is running via xinetd
pure_ftpd_xinet_conf - list includes xinetd server_args for pure-ftpd
pureftpd_installed - variable signifies if pure-ftpd is installed and
pureftpd_xined_id - variable signifies if pure-ftpd is installed and in structur Inetd::netd_conf -1 init value before calling Inetd::Read()
start_xinetd - variable signifies if daemon will be started via xinetd
stop_daemon_xinetd - variable signifies if daemon will be stoped in xinetd
upload_good_permission - variable signifies if upload dir has good permissions only for vsftpd and anonymous connections with allowed upload
vsftp_xinetd_running - variable signifies if daemon is running via xinetd
vsftpd_edit - variable signifies if vsftpd is selected and edited via ftp-server (YaST module) global boolean variable
vsftpd_installed - variable signifies if vsftpd is installed and
vsftpd_xined_id - variable signifies position vsftpd record in structur Inetd::netd_conf -1 init value before calling Inetd::Read()
write_only - Write only, used during autoinstallation. Don't run services and SuSEconfig, it's all done at one place.
Returns a confirmation popup dialog whether user wants to really abort.
Return value
boolean - result of Popup::ReallyAbort(GetModified()
Dump the FtpServer settings to a single map (For use by autoinstallation.)
Return value
map - Dumped settings (later acceptable by Import ())
Returns whether the configuration has been modified.
Return value
boolean - modified
Get all FtpServer settings from the first parameter (For use by autoinstallation.)
Function parameters
map settings
Return value
boolean - True on success
Set which daemon will be configured (For use by autoinstallation.)
Return value
boolean - True on success
Create unsorted list of options
Return value
string - Returnes string with RichText-formated list
Checks whether an Abort button has been pressed. If so, calls function to confirm the abort call.
Return value
boolean - true if abort confirmed
Create a textual summary and a list of unconfigured cards
Return value
string - summary of the current configuration
read value from PURE_EDIT_SETTINGS
Function parameters
string key
Return value
string - value of key from edit map
Write value from UI to temporary structure
Function parameters
string key
string value
Return value
boolean - successfull
Ask for creation upload directory It is necessary if user want to allow uploading for anonymous
Return value
boolean - result of function (true/false)
variable signifies if user choose change permissions for home dir for anonymous connections with allowed upload
variable signifies if it is create upload dir only for vsftpd and anonymous connections with allowed upload
variable signifies if upload dir for anonymous has good permissions it is only for pure-ftpd
variable signifies if pure-ftpd is installed and in structur Inetd::netd_conf -1 init value before calling Inetd::Read()
variable signifies if upload dir has good permissions only for vsftpd and anonymous connections with allowed upload
variable signifies if vsftpd is selected and edited via ftp-server (YaST module) global boolean variable
variable signifies position vsftpd record in structur Inetd::netd_conf -1 init value before calling Inetd::Read()
A wrapper for gpg binary
List of Global Functions
CreateKey - Create a new gpg key. Executes 'gpg --gen-key' in an xterm window (in the QT UI) or in the terminal window (in the ncurses UI).
ExportAsciiPublicKey - Export a public gpg key in ACSII armored file.
ExportPublicKey - Export a public gpg key in binary format.
Init - (Re)initialize the module, the cache is invalidated if the home directory is changed.
PrivateKeys - Return list of the private keys in the keyring.
PublicKeys - Return list of the public keys in the keyring.
SignAsciiDetached - Sign a file. The ASCII armored signature is stored in file with .asc suffix
SignDetached - Sign a file. The binary signature is stored in file with .sig suffix
VerifyFile - Verify a file using a signature file. The key which has been used for signing must be imported in the keyring.
List of Global Variables
Create a new gpg key. Executes 'gpg --gen-key' in an xterm window (in the QT UI) or in the terminal window (in the ncurses UI).
Return value
void
Export a public gpg key in ACSII armored file.
Function parameters
string keyid
string file
Return value
boolean - true if the file has been successfuly signed
Export a public gpg key in binary format.
Function parameters
string keyid
string file
Return value
boolean - true if the file has been successfuly signed
(Re)initialize the module, the cache is invalidated if the home directory is changed.
Function parameters
string home_dir
boolean force
Return value
void
Return list of the private keys in the keyring.
Return value
list<map> - public keys: [ $["fingerprint": string key_fingerprint, "id": string key_ID, "uid": list<string> user_ids], ...]
Return list of the public keys in the keyring.
Return value
list<map> - public keys: [ $["fingerprint": string key_fingerprint, "id": string key_ID, "uid": list<string> user_ids], ...]
Sign a file. The ASCII armored signature is stored in file with .asc suffix
Function parameters
string keyid
string file
string passphrase
Return value
boolean - true if the file has been successfuly signed
Sign a file. The binary signature is stored in file with .sig suffix
Function parameters
string keyid
string file
string passphrase
Return value
boolean - true if the file has been successfuly signed
UI widgets and functions related to GPG
List of Global Functions
AskPassphrasePopup - Ask user to enter the passphrase for the selected gpg key. A a popup window is displayed.
AskPassphraseWidget - Return definition of the passphrase CWM widget.
Passphrase - Get the enterd passphrase.
SelectedPrivateKey - Return the selected private key in the private table widget
SetSelectedPrivateKey - Set selected private key in the private key table widget.
SetSelectedPublicKey - Set selected public key in the public key table widget.
Widgets - Return a map with CWM widgets definition. The map contains definitions of all static CWM widgets.
List of Global Variables
Ask user to enter the passphrase for the selected gpg key. A a popup window is displayed.
Function parameters
string key
Return value
string - the entered passphrase or nil if the popup has been closed by [Cancel] button
Return definition of the passphrase CWM widget.
Function parameters
string key
Return value
map<string, map<string,any> > - widget definition
Return the selected private key in the private table widget
Return value
string - key ID
Set selected private key in the private key table widget.
Function parameters
string keyid
Return value
void
Set selected public key in the public key table widget.
Function parameters
string keyid
Return value
void
Get client arguments
List of Global Functions
Buttons - Returns map of client parameters only with keys: "enable_back" and "enable_next"
ButtonsProposal - Returns map of client parameters only with keys: "enable_back", "enable_next", and "proposal"
argmap - Returns map of client parameters
automatic_configuration - Is the automatic configuraton just in progress?
enable_back - Should be the [Back] button enabled?
enable_next - Should be the [Next] button enabled?
going_back - Are we going back from the previous dialog?
proposal - Returns name of the proposal
List of Global Variables
Returns map of client parameters only with keys: "enable_back" and "enable_next"
Function parameters
boolean back
boolean next
Return value
map - of parameters
Returns map of client parameters only with keys: "enable_back", "enable_next", and "proposal"
Function parameters
boolean back
boolean next
string proposal_name
Return value
map - of parameters
Example 14.
GetInstArgs::ButtonsProposal() -> $[ "enable_back" : true, "enable_next" : true, "proposal" : "initial" ]
Returns map of client parameters
Return value
map - of parameters
Example 15.
GetInstArgs::argmap() -> $[ "enable_back" : true, "enable_next" : true, "going_back" : true, "anything" : "yes, of course", ]
Is the automatic configuraton just in progress?
Return value
boolean - if running the automatic configuration
Should be the [Back] button enabled?
Return value
boolean - whether enabled or not
Should be the [Next] button enabled?
Return value
boolean - whether enabled or not
Are we going back from the previous dialog?
Return value
boolean - whether going_back or not
Routines to maintain translations in the graphical bootloader menu
List of Global Functions
ReplaceRegexMatch - Replace every match of given regular expression in a string with a replacement string
Update - Updates GFX menu without requiring any information, reads loader type from sysconfig, calls /sbin/lilo if LILO is being used directly
UpdateGfxMenuContents - Update graphical bootloader to contain translations for section labels in the currently selected installation language (set in /etc/sysconfig/language, RC_LANG) And make the selected installation language default
getTranslationsToDiacritics - Get translated section names, including diacritics
translateSectionTitle - Create translated name of a section
List of Global Variables
Replace every match of given regular expression in a string with a replacement string
Function parameters
string input
string regex
string repl
Return value
string - that has matches replaced
Updates GFX menu without requiring any information, reads loader type from sysconfig, calls /sbin/lilo if LILO is being used directly
Return value
boolean - true on success
Update graphical bootloader to contain translations for section labels in the currently selected installation language (set in /etc/sysconfig/language, RC_LANG) And make the selected installation language default
Function parameters
string loader
Return value
boolean - true on success
Get translated section names, including diacritics
Function parameters
string loader
Return value
map<string,string> - a map section names translations
Expert Partitioner
Generic HTML formatting
List of Global Functions
Bold - Make a piece of HTML code bold
ColoredList - Make a HTML (unsorted) colored list from a list of strings
Colorize - Colorize a piece of HTML code
Heading - Make a HTML heading from a text
Link - Make a HTML link
List - Make a HTML (unsorted) list from a list of strings
ListEnd - End a HTML (unsorted) list
ListItem - Make a HTML list item
ListStart - Start a HTML (unsorted) list
Newline - Make a forced HTML line break
Newlines - Make a number of forced HTML line breaks
Para - Make a HTML paragraph from a text
List of Global Variables
Make a piece of HTML code bold
Function parameters
string text
Return value
string - HTML code
Make a HTML (unsorted) colored list from a list of strings
Function parameters
list<string> items
string color
Return value
string - HTML code
Colorize a piece of HTML code
Function parameters
string text
string color
Return value
string - HTML code
Make a HTML heading from a text
Function parameters
string text
Return value
string - HTML code
Make a HTML link
Function parameters
string text
string link_id
Return value
string - HTML code
Make a HTML (unsorted) list from a list of strings
Function parameters
list<string> items
Return value
string - HTML code
Make a number of forced HTML line breaks
Function parameters
integer count
Return value
string - HTML code
Handle HTTP Requests
List of Global Functions
Get - Send a get request
Post - Send a post request
setUserPassword - Set user and password for HTTP authentication
List of Global Variables
Send a get request
Function parameters
string url
string output
Return value
map - Reponse map with HTTP code and transfer size and time
Send a post request
Function parameters
string url
string output
string postData
Return value
map - Reponse map with HTTP code and transfer size and time
Module for accessing hardware configuration files (/etc/sysconfig/hwcfg-*)
List of Global Functions
ConfigFiles - Return list of all available hardware configuration files
Flush - Flush - write the changes to files
GetComment - Get comment of the variable from the config file
GetValue - Set comment of the variable in the config file
RemoveConfig - Remove configuration file from system
SetComment - Set comment of the variable in the config file
SetValue - Set value of the variable in the config file
Values - Read all values from the file
Variables - Return list of all available variable in the configuration file
List of Global Variables
Return list of all available hardware configuration files
Return value
list<string> - found files
Get comment of the variable from the config file
Function parameters
string file
string variable
Return value
string - comment of the variable
Set comment of the variable in the config file
Function parameters
string file
string variable
Return value
string - comment the new comment
Remove configuration file from system
Function parameters
string file
Return value
boolean - true on success
Set comment of the variable in the config file
Function parameters
string file
string variable
string comment
Return value
boolean - true on success
Set value of the variable in the config file
Function parameters
string file
string variable
string value
Return value
boolean - true on success
Read all values from the file
Function parameters
string file
Return value
map<string,string> - map $[ "VARIABLE" : "value" ]
Heartbeat settings, input and output functions
List of Global Functions
Abort - Abort function
AutoPackages - Return packages needed to be installed and removed during Autoinstallation to insure module has all needed software installed.
Export - Dump the heartbeat settings to a single map (For use by autoinstallation.)
Import - Get all heartbeat settings from the first parameter (For use by autoinstallation.)
Modified - Prototypes
Modified - Data was modified?
Overview - Create an overview table with all configured cards
Read - Read all heartbeat settings
Summary - Create a textual summary and a list of unconfigured cards
Write - Write all heartbeat settings
List of Global Variables
write_only - Write only, used during autoinstallation. Don't run services and SuSEconfig, it's all done at one place.
Return packages needed to be installed and removed during Autoinstallation to insure module has all needed software installed.
Return value
map - with 2 lists.
Dump the heartbeat settings to a single map (For use by autoinstallation.)
Return value
map - Dumped settings (later acceptable by Import ())
Get all heartbeat settings from the first parameter (For use by autoinstallation.)
Function parameters
map settings
Return value
boolean - True on success
Create a textual summary and a list of unconfigured cards
Return value
list - summary of the current configuration
Provide debug hooks during installation
List of Global Functions
Checkpoint - called whenever an inst_*.ycp file is called during installation. checks if /tmp/<filename> exists and pops up a "Entry: <filename>" or "Exit: <filename>" box
Run - Run Script
List of Global Variables
called whenever an inst_*.ycp file is called during installation. checks if /tmp/<filename> exists and pops up a "Entry: <filename>" or "Exit: <filename>" box
Function parameters
string filename
boolean at_entry
Return value
void
Hosts data (/etc/hosts)
List of Global Functions
Export - Dump the Hosts settings to a map, for autoinstallation use.
GetModified - Function which returns if the settings were modified
GetSystemHosts - Return "system" predefined hosts (should be present all the time)
Import - Get all the Hosts configuration from a map. When called by hosts_auto (preparing autoinstallation data) the map may be empty.
Read - Read hosts settings
SetModified - Function sets internal variable, which indicates, that any settings were modified, to "true"
Summary - Create summary
Update - Update hosts according to the current hostname (only one hostname, assigned to all IPs)
Write - Write hosts settings and apply changes
List of Global Variables
hosts - All hosts See hosts(5) keys: IPs, (But #35671 suggests that repeating IPs is valid) values: names, the first one is the canonical one
modified - Data was modified?
write_only - Only write configuration
Dump the Hosts settings to a map, for autoinstallation use.
Return value
map - autoinstallation settings
Function which returns if the settings were modified
Return value
boolean - settings were modified
Return "system" predefined hosts (should be present all the time)
Return value
list - of system hosts
Get all the Hosts configuration from a map. When called by hosts_auto (preparing autoinstallation data) the map may be empty.
Function parameters
map settings
Return value
boolean - true if success
Function sets internal variable, which indicates, that any settings were modified, to "true"
Return value
void
Update hosts according to the current hostname (only one hostname, assigned to all IPs)
Function parameters
string oldhn
string newhn
list<string> iplist
Return value
boolean - true if success
All hosts See hosts(5) keys: IPs, (But #35671 suggests that repeating IPs is valid) values: names, the first one is the canonical one
Hostname manipulation routines
List of Global Functions
Check - Check syntax of hostname entry (that is a domain name component, unqualified, without dots)
CheckDomain - Check syntax of domain entry
CheckFQ - Check syntax of fully qualified hostname
CurrentDomain - Retrieve currently set domain name
CurrentFQ - Retrieve currently set fully qualified hostname (uses hostname --fqdn)
CurrentHostname - Retrieve currently set (short) hostname
MergeFQ - Merge short hostname and domain to full-qualified host name
SplitFQ - Split FQ hostname to hostname and domain name
ValidDomain - describe a valid domain name
ValidFQ - describe a valid FQ host name
ValidHost - describe a valid host name
List of Global Variables
ValidChars - i18n characters in domain names are still not allowed
Check syntax of hostname entry (that is a domain name component, unqualified, without dots)
Function parameters
string host
Return value
boolean - true if correct
See also:
rfc1123, rfc2396 and obsoleted rfc1034
Check syntax of domain entry
Function parameters
string domain
Return value
boolean - true if correct
Check syntax of fully qualified hostname
Function parameters
string host
Return value
boolean - true if correct
Retrieve currently set fully qualified hostname (uses hostname --fqdn)
Return value
string - FQ hostname
Merge short hostname and domain to full-qualified host name
Function parameters
string hostname
string domain
Return value
string - FQ hostname
provide hotplug (USB, FireWire, PCMCIA) functions
List of Global Functions
List of Global Variables
haveFireWire - if a firewire controller was found and initialized
haveUSB - if a usb controller was found and initialized
Return value
void - probe for firewire type, load appropriate modules, and mount usbfs to /proc/bus/usb
Data for configuration of http-server, input and output functions.
List of Global Functions
AutoPackages - Return required packages for auto-installation
Export - Dump the http-server settings to a single map (For use by autoinstallation.)
Import - Get all http-server settings from the first parameter (For use by autoinstallation.)
Modified - Data was modified?
Read - Read all http-server settings
Summary - Create a textual summary for the current configuration
Write - Write all http-server settings
List of Global Variables
ip2device - Mapping of IPs to network devices
modified - Data was modified?
required_packages - Required packages
write_only - Write only, used during autoinstallation. Don't run services and SuSEconfig, it's all done at one place.
Return required packages for auto-installation
Return value
map - of packages to be installed and to be removed
Dump the http-server settings to a single map (For use by autoinstallation.)
Return value
map - Dumped settings (later acceptable by Import ())
Get all http-server settings from the first parameter (For use by autoinstallation.)
Function parameters
map s
Return value
boolean - True on success
Create a textual summary for the current configuration
Return value
list - summary of the current configuration
All hardware status relevant functions are here
List of Global Variables
Get() get status for device
Function parameters
string id
Return value
symbol - status of device, (`yes or `no) returns `unknown if status wasn't set before
Set set status for a hardware device
Function parameters
string id
symbol stat
Return value
void
IP manipulation routines
List of Global Functions
BitsToIPv4 - Converts 32 bit binary number to its IPv4 repserentation.
Check - Check syntax of IP address
Check4 - Check syntax of IPv4 address
Check6 - Check syntax of IPv6 address
ComputeBroadcast - Compute IPv4 broadcast address from ip4 address and network mask.
ComputeNetwork - Compute IPv4 network address from ip4 address and network mask.
IPv4ToBits - Converts IPv4 into its 32 bit binary representation.
ToHex - Converts IPv4 address from string to hex format
ToInteger - Convert IPv4 address from string to integer
ToString - Convert IPv4 address from integer to string
Valid4 - Describe a valid IPv4 address
List of Global Variables
Converts 32 bit binary number to its IPv4 repserentation.
Function parameters
string bits
Return value
string - ipv4
Example 18.
BitsToIPv4("10111100000110001110001100000101") -> "188.24.227.5"
BitsToIPv4("00110101000110001110001001100101") -> "53.24.226.101"See also:
IPv4ToBits()
Check syntax of IP address
Function parameters
string ip
Return value
boolean - true if correct
Check syntax of IPv4 address
Function parameters
string ip
Return value
boolean - true if correct
Check syntax of IPv6 address
Function parameters
string ip
Return value
boolean - true if correct
Compute IPv4 broadcast address from ip4 address and network mask.
Function parameters
string ip
string mask
Return value
string - computed broadcast
Compute IPv4 network address from ip4 address and network mask.
Function parameters
string ip
string mask
Return value
string - computed subnet
Converts IPv4 into its 32 bit binary representation.
Function parameters
string ipv4
Return value
string - binary
Example 19.
IPv4ToBits("80.25.135.2") -> "01010000000110011000011100000010"
IPv4ToBits("172.24.233.211") -> "10101100000110001110100111010011"See also:
BitsToIPv4()
Converts IPv4 address from string to hex format
Function parameters
string ip
Return value
string - representing IP in Hex
Convert IPv4 address from string to integer
Function parameters
string ip
Return value
integer - ip address as integer
Convert IPv4 address from integer to string
Function parameters
integer ip
Return value
string - ip address as string
ISDN data
List of Global Functions
CountIF - Count of valid interface entries
Export -
Import -
Locate - Locate interfaces of the given key and value
Modified - Data was modified?
NetDeviceList - List of configured interface entries
PrepareInterface - If not allready done set a valid interface
Read - Read all ISDN settings from the SCR
SelectInterface - Displays a popup to select one interface to be the current interface
Summary - Build a textual summary and a list of unconfigured cards
TestDev - Test the given card settings
Write - Update the SCR according to network settings
WriteOnly - Only write configuration without starting any init scripts and SuSEconfig
List of Global Variables
AbortFunction - Abort function return boolean return true if abort
ISDNCDB - ISDN database based on CDB
have_dsl - Flag for Fritz!card DSL configuration
hw_device - hold current device settings
interface - hold current interface settings
operation - Which operation is pending?
skip - If the interface or provider configuration is skipped
Locate interfaces of the given key and value
Function parameters
string key
string val
Return value
list<string> - of devices with key=val
If not allready done set a valid interface
Return value
boolean - true if the selection was successful false if here aren't any interfaces
Displays a popup to select one interface to be the current interface
Function parameters
boolean auto
Return value
boolean - true if the selection war successful false if here aren't any interfaces
Build a textual summary and a list of unconfigured cards
Function parameters
boolean split
Return value
list - summary of the current configuration
Test the given card settings
Function parameters
string dev
Return value
boolean - true on success
Update the SCR according to network settings
Function parameters
boolean start
Return value
boolean - true on success if start is true, load drivers and interfaces
ISDN database based on CDB
map with two keys, of maps: Cards: map, keyed by integers, of maps: CardID: integer (the key) VendorRef: integer bus: string (ISA) class: string (ISDN Single/Multiple Basic Rate) device: integer driver: list of driver maps features: integer lines: integer longname: string name: string revision: integer subdevice: integer subvendor: integer vendor: integer Vendors: map, keyed by integers, of maps: VendorID: integer (the key) name: string refcnt: integer shortname: string
hold current device settings
handled items are line specific PROTOCOL D-channel protocol AREACODE international area code DIALPREFIX dialprefixfor PBX setups hw specific PARA_IO IO address for legacy ISA PARA_MEMBASE memory base address for legacy ISA PARA_IRQ IRQ number for legacy ISA PARA_TYPE card type PARA_SUBTYPE card sub type NAME full card name DRIVER driver module name STARTMODE "auto"|"manual"|"hotplug" DEBUG debuglevel UDI unique hw id
hold current interface settings
handled items are IPADDR local IP address REMOTE_ADDR remote IP address DEFAULTROUTE default route yes/no DYNAMICIP dynamic IP assignment yes/no PROTOCOL encapsulation "rawip" | "syncppp" MSN own phone number CHARGEHUP try to hangup on idle just before next charge CALLBACK callback mode CBDELAY callback delay STARTMODE auto | manual | hotplug USERCONTROL controllable bt user yes/no MULTILINK channel bundling yes/no PROVIDER default provider filename IPPPD_OPTIONS additional ipppd options
Basic ISSLE setup
Transparent access to Icons
List of Global Functions
Error - Returns UI term `Image() widget with an error-icon.
IconPath - Returns path to an image
Image - Returns `Image() term defined by parameters. Returns `Empty() if the current UI doesn't support images.
Info - Returns UI term `Image() widget with an info-icon.
Simple - Function calls Icon::Image with default options
Warning - Returns UI term `Image() widget with a warning-icon.
List of Global Variables
Returns path to an image
Function parameters
string icon_type
Return value
string
Example 21.
Icon::IconPath ("warning") -> "/usr/share/YaST2/theme/current/icons/32x32/apps/msg_warning.png"See also:
Icon::Image() for details
Returns `Image() term defined by parameters. Returns `Empty() if the current UI doesn't support images.
Function parameters
string icon_type
map <string, any> options
Return value
term
options = $[ "id" : any_icon_id, "label" : (string) icon_label, // (used if icon is missing) "margin_left" : 0, // HSpacing on the left "margin_right" : 5, // HSpacing on the right ]
Example 22.
Icon::Image ("warning", $["id":`my_warning, "label":_("My Warning")])
-> `Image (`id (`my_warning), "/usr/share/YaST2/theme/current/icons/32x32/apps/msg_warning.png", "My Warning")
Icon::Image ("info", $["margin_left":1, "margin_right":2])
-> `HBox (
`HSpacing (1),
`Image (`id ("icon_id_info"), "/usr/share/YaST2/theme/current/icons/32x32/apps/msg_info.png", "info"),
`HSpacing (2)
)Function calls Icon::Image with default options
Function parameters
string icon_type
Return value
term
See also:
Icon for more information
Data for configuration of IDE DMA mode, input and output functions.
List of Global Functions
Export - Dump the IDE DMA settings to a single map (For use by autoinstallation.)
Import - Get all IDE DMA settings from the first parameter (For use by autoinstallation.)
Read - Read all DMA settings from the SCR
Set - Set module data
Summary - Create rich text description of the current configuration
Write - Update the SCR according to DMA settings
get_device_dma_status - Return actual DMA status of IDE device
get_ide_devices - Return information about all IDE devices
selected_mode - Get selected DMA mode, which will be saved and set in Write
set_dma - Set DMA of device
set_test_data - Set system configuration without reading values from system - for testing and screenshot mode
supported_dma_modes - Get list of supported DMA modes for selected device
List of Global Variables
dma_default_string - String with no change of DMA status text (For translators: translation can be long - text is used in the table in column "Required DMA mode" and "Current DMA mode")
dma_off_string - String with DMA off status text (For translators: translation can be long - text is used in the table in column "Required DMA mode" and "Current DMA mode")
dma_on_string - String with DMA on status text (For translators: translation can be long - text is used in the table in column "Required DMA mode" and "Current DMA mode")
Dump the IDE DMA settings to a single map (For use by autoinstallation.)
Return value
list - Dumped settings (later acceptable by Import ())
Get all IDE DMA settings from the first parameter (For use by autoinstallation.)
Function parameters
list<map<string,any> > settings
Return value
boolean - True
Create rich text description of the current configuration
Function parameters
boolean all
boolean richtext
Return value
string - summary text
Return actual DMA status of IDE device
Function parameters
string device
Return value
string - true if DMA is on, false if DMA is off or nil on error
Return information about all IDE devices
Return value
list<map> - List of maps with information about all IDE devices
Get selected DMA mode, which will be saved and set in Write
Function parameters
string device
Return value
string - selected DMA mode ("on", "off", "nochange", or mode supported by hdparm - "udma5",...)
Set DMA of device
Function parameters
string device
string dma_setting
Return value
boolean - true on success
Set system configuration without reading values from system - for testing and screenshot mode
Return value
void
String with no change of DMA status text (For translators: translation can be long - text is used in the table in column "Required DMA mode" and "Current DMA mode")
String with DMA off status text (For translators: translation can be long - text is used in the table in column "Required DMA mode" and "Current DMA mode")
Support functions for installation via images
List of Global Functions
CleanTemporaryImage - UnDeploy an image temporarily (if possible, only for the FS images)
DeployImage - Deploy an image
DeployImageTemporarily - Deploy an image temporarily (just mount if possible)
DeployImages - Deploy all images
FileSystemCopy - Copy a subtree, limit to a single filesystem
FillUpImagesDetails - Loads non-mandatory details for every single selected image.
FindImageSet - Find a set of images which suites selected patterns
ImageOrder - Order of images to be deployed
ImagesToUse - Returns map with description which images will be used
SetRepo - Set the repository to get images from
StoreAllChanges - Function stores all new/requested states of all handled/supported types.
SwMgmtImage - Name of image containing software management metadata (if exists)
List of Global Variables
UnDeploy an image temporarily (if possible, only for the FS images)
Function parameters
string id
string target
Return value
boolean - true on success
Deploy an image
Function parameters
string id
string target
Return value
boolean - true on success
Deploy an image temporarily (just mount if possible)
Function parameters
string id
string target
Return value
boolean - true on success
Deploy all images
Function parameters
list<string> images
string target
Return value
boolean
Copy a subtree, limit to a single filesystem
Function parameters
string from
string to
integer progress_start
integer progress_finish
Return value
boolean - true on success
Loads non-mandatory details for every single selected image.
Return value
boolean
Find a set of images which suites selected patterns
Function parameters
list<string> patterns
Return value
boolean - true on success or when media does not contain any images
Order of images to be deployed
Return value
list<string> - a list of images definint the order
Returns map with description which images will be used
Return value
map - with description
$[ "deploying_enabled" : boolean, "images" : returned by GetCurrentImages() ]
See also:
GetCurrentImages()
Set the repository to get images from
Function parameters
integer repo
Return value
void
Function stores all new/requested states of all handled/supported types.
Return value
void
See also:
all_supported_types
objects_state
Data for configuration of inetd, input and output functions.
List of Global Functions
Abort - Abort function
AutoPackages - Return required packages for auto-installation FIXME: Need to make this return the needed packages during installation
Export - Dump the inetd settings to a single map (For use by autoinstallation.)
Import - Get all inetd settings from the first parameter (For use by autoinstallation.)
MergeAyProfile - Merges AY profile items into a target list (defaults or system).
MergeEditedWithSystem - This function solves differences between new (after installing requested packages) xinetd configuration and the configuration edited by the user. <pre> <b>In normal mode</b>: take the system services if it matches a service in the ui (ServicesMatch) use the ui data (not-installed ones are not a part of netd_conf, they only enter the table in mergexinetdconfs) Deleted services: OK. Added services: a separate pass needed </pre> TODO reduce the quadratic complexity.
Modified - Data was modified? This function returnes modified variable.
Read - Read all inetd settings
SafeRemove - Removes keys from a map. Unlike the remove builtin, does not mind if the keys are already removed.
Summary - Create a textual summary and a list of unconfigured cards
Write - Write all inetd settings
WriteOnly - Only Write settings
addLine - add a line in DB
changeLine - Change a line in DB
deleteLine - delete line in netd_conf
getChanged - Get only changed entries
mergeAfterInstall - Merges autoinstall profile into the system configuration.
mergeWithDefaults - merges imported changes with services defaults
mkeServiceSummary - Create unsorted list of enabled services
List of Global Variables
AbortFunction - Abort function return boolean return true if abort
auto_mode - If autoinstallation mode (true), we do not want to install RPMs during configuration. Otherwise (false) we allow all.
autoyast_initialized - Autoyast now does not initially call Import $[] anymore. But our design is so broken that we need it and will work hard to achieve it.
last_created - This variable is used for new iid "generator"
modified - Configuration was changed
netd_conf - <pre> These variable holds inetd configuration. This is list of maps. Each map has the following structure: $[ "comment": String, "comment_inside": String, // this is agent internal "enabled": boolean, "group": String, "user": String, "iid": String, "protocol": String, "rpc_version": String, "server": String, "server_args": String, "service": String, "socket_type": String, "unparsed": String, // agent internal "wait": boolean ] </pre>
netd_status - Is xinetd running? These variables contains return values from Service::Status() calls.
proposal_valid - used in unused module inetd_proposal.ycp. This will be removed
write_only - For autoinstallation Write() process. Write_only means that the service will not be actually started, because it is done by init later. But also that the service data are only a patch to be applied to the system.
Return required packages for auto-installation FIXME: Need to make this return the needed packages during installation
Return value
map - of packages to be installed and to be removed
Dump the inetd settings to a single map (For use by autoinstallation.)
Return value
map - Dumped settings (later acceptable by Import ())
Get all inetd settings from the first parameter (For use by autoinstallation.)
Function parameters
map settings
Return value
boolean - True on success
Merges AY profile items into a target list (defaults or system).
Function parameters
services_t target
services_t changes
Return value
services_t - merged list of services
See also:
<a href="../autoyast_proto.xhtml">autoyast docs</a>.
This function solves differences between new (after installing requested packages) xinetd configuration and the configuration edited by the user. <pre> <b>In normal mode</b>: take the system services if it matches a service in the ui (ServicesMatch) use the ui data (not-installed ones are not a part of netd_conf, they only enter the table in mergexinetdconfs) Deleted services: OK. Added services: a separate pass needed </pre> TODO reduce the quadratic complexity.
Function parameters
services_t system_conf
services_t edited_conf
Return value
services_t - Returnes new solved xinetd configuration (ready for Write()).
Data was modified? This function returnes modified variable.
Return value
boolean - true if modified
Removes keys from a map. Unlike the remove builtin, does not mind if the keys are already removed.
Function parameters
map m
list keys
Return value
map - the map without the specified keys
Create a textual summary and a list of unconfigured cards
Return value
string - summary of the current configuration
Change a line in DB
Function parameters
service_t new_line
any line_number
Return value
void
Get only changed entries
Function parameters
services_t config
Return value
services_t - Returnse list of changes only
Merges autoinstall profile into the system configuration.
Function parameters
services_t system_c
services_t user_c
Return value
services_t - Returnes new solved xinetd configuration (ready for Write()).
See also:
MergeAyProfile
merges imported changes with services defaults
Function parameters
services_t changes
Return value
services_t - complete configuration with user changes
See also:
MergeAyProfile
If autoinstallation mode (true), we do not want to install RPMs during configuration. Otherwise (false) we allow all.
Autoyast now does not initially call Import $[] anymore. But our design is so broken that we need it and will work hard to achieve it.
<pre> These variable holds inetd configuration. This is list of maps. Each map has the following structure: $[ "comment": String, "comment_inside": String, // this is agent internal "enabled": boolean, "group": String, "user": String, "iid": String, "protocol": String, "rpc_version": String, "server": String, "server_args": String, "service": String, "socket_type": String, "unparsed": String, // agent internal "wait": boolean ] </pre>
Is xinetd running? These variables contains return values from Service::Status() calls.
List of Global Functions
DetectedHardware - Detect all hardware present in the system
Initialize - Start hardware detection (only CPU and main memory)
MakeProposal - Return short system description
List of Global Variables
Detect all hardware present in the system
Function parameters
boolean force
block<boolean> abort
Return value
list<map> - list of maps - detected hardware items ()
Start hardware detection (only CPU and main memory)
Function parameters
boolean force
Return value
boolean - True on success
functions for initial ramdisk setup and creation
List of Global Functions
AddModule - add module to ramdisk
AdditionalParameters - Get additional parameters for mkinitrd
Export - Export settigs to variable
Import - import settings of initrd
ListModules - List modules included in initrd
Read - read seettings from sysconfig
RemoveModule - remove module from list of initrd modules
Reset - reset settings to empty list of modules
SetAdditionalParameters - Set additional parameters for mkinitrd
Update - Update read settings to new version of configuration files
Write - write settings to sysconfig, rebuild initrd images
errorWithLogPopup - Display error popup with log FIXME this is copy-paste from ../routines/popups.ycp
getModulesToSkip - Get the list of modules which don't belong to initrd Initialize the list if was not initialized before according to the architecture
setSplash - Set the -s parameter of mkinitrd
List of Global Variables
changed - true if settings were changed and initrd needs to be rebuilt, false otherwise
add module to ramdisk
Function parameters
string modname
string modargs
Return value
void
Get additional parameters for mkinitrd
Return value
string - additional mkinitrd parameters
List modules included in initrd
Return value
list<string> - of strings with modulenames
remove module from list of initrd modules
Function parameters
string modname
Return value
void
Set additional parameters for mkinitrd
Function parameters
string params
Return value
void
write settings to sysconfig, rebuild initrd images
Return value
boolean - true on success
Display error popup with log FIXME this is copy-paste from ../routines/popups.ycp
Function parameters
string header
string log
Return value
void
Get the list of modules which don't belong to initrd Initialize the list if was not initialized before according to the architecture
Return value
list<string> - a list of modules
Installation Data (variables, maps, probed info)
Functionality for downloading and merging extending images for the inst-sys
List of Global Functions
LoadExtension - Load a rpm package from the media into the inst-sys
UnLoadExtension - Remove given package from the inst-sys
List of Global Variables
Load a rpm package from the media into the inst-sys
Function parameters
string package
string message
Return value
boolean
List of Global Functions
HidePassword - Hide Password
installInf2Url - Convert install.inf to a URL useable by the package manager
List of Global Variables
Hide Password
Function parameters
string url
Return value
string - new URL with hidden password
provide installation related information
List of Global Functions
boot - how we were booted (the type of the installation medium) /etc/install.inf: InstMode
no_x11 - somehow, no X11 was started no x11 or not enough memory for qt
text_fallback - no resources/packages for X11
x11_setup_needed - run X11 configuration after inital boot this is false in case of: installation via serial console installation via ssh installation via vnc
List of Global Variables
image_installation - Installation is performed form image(s)
image_only - Installation is performed only from image(s), no additional RPM (de)installation
installedVersion - Version of the targetsystem (currently installed one).
license_accepted - The license has already been accepted, the respectiev radio button can be preselected
updateVersion - Version of system to update to (will be installed, or is just being installed).
how we were booted (the type of the installation medium) /etc/install.inf: InstMode
Return value
string
Installation is performed only from image(s), no additional RPM (de)installation
Version of the targetsystem (currently installed one).
$[ "name" : (string) "openSUSE", "version" : (string) "10.1", "nameandversion" : (string) "openSUSE 10.1", "major" : (integer) 10, "minor" : (integer) 1, ]
The license has already been accepted, the respectiev radio button can be preselected
Installation Server settings, input and output functions
List of Global Functions
Abort - Abort function
Export - Dump the instserver settings to a single map (For use by autoinstallation.)
Import - Get all instserver settings from the first parameter (For use by autoinstallation.)
Instserver - Constructor
Modified - Prototypes
Modified - Data was modified?
Overview - Create an overview table with all configured data
Read - Read all instserver settings
SetupFTP - Setup FTP server
SetupHTTP - Setup HTTP server
SetupNFS - Setup NFS Server
Summary - Create a textual summary and a list of unconfigured cards
Write - Write all instserver settings
WriteSLPReg - Write SLP configuration
configSetup - Create XML Configuration
createLinks - Create links
createOrderFiles - Create yast directory with ordr/instorder files
List of Global Variables
AbortFunction - Abort function return boolean return true if abort
modified - Data was modified?
Dump the instserver settings to a single map (For use by autoinstallation.)
Return value
map - Dumped settings (later acceptable by Import ())
Get all instserver settings from the first parameter (For use by autoinstallation.)
Function parameters
map settings
Return value
boolean - True on success
Setup FTP server
Function parameters
string dir
string ftproot
string ftpalias
Return value
boolean
Create a textual summary and a list of unconfigured cards
Return value
list - summary of the current configuration
Write SLP configuration
Function parameters
map<string,any> cm
Return value
boolean
Create links
Function parameters
string dir
string product
list<string> files
Return value
list<string>
Integer routines
List of Global Functions
Clamp - Clamps the integer i.
IsPowerOfTwo - Checks whether i is a power of two. That is 1, 2, 4, 8, ... .
Max - Returns the highest integer in values.
Min - Returns the smallest integer in values.
Range - Generate a list<integer> with the integers from 0 to stop - 1.
RangeFrom - Generate a list<integer> with the integers from start to stop - 1.
Sum - Calculates the sum of values.
List of Global Variables
Clamps the integer i.
Function parameters
integer i
integer min
integer max
Return value
integer
Checks whether i is a power of two. That is 1, 2, 4, 8, ... .
Function parameters
integer i
Return value
boolean
Returns the highest integer in values.
Function parameters
list<integer> values
Return value
integer
Returns the smallest integer in values.
Function parameters
list<integer> values
Return value
integer
Generate a list<integer> with the integers from 0 to stop - 1.
Function parameters
integer stop
Return value
list<integer>
Generate a list<integer> with the integers from start to stop - 1.
Function parameters
integer start
integer stop
Return value
list<integer>
Internet connection and YOU during the installation
List of Global Functions
Connected - Test if the interface is connected
GetDevices - Used if NetworkInterfaces cannot find anything (usually because NM runs) Calls ip
Reset - Reset values.
SetDemand - Set dial-on-demand
ShutdownAllLocalDHCPClients - DANGEROUS function. Searches for all standard PID files of dhcpcd, then kills all dhcpcds running (first SIGHUP, then SIGKILL). Works via WFM (only for local dhcpcd).
Start - Start the fastest interface
Status - Status of the fastest interface
Stop - Stop the fastest interface
List of Global Variables
device - Values for selected connection.
do_test - Flag to remember if user wants to run internet test
do_you - Flag to remember if you should be started
suse_register - Flag to remember if user wants to run suse register
Used if NetworkInterfaces cannot find anything (usually because NM runs) Calls ip
Return value
list<string> - eg. ["eth0", "eth1"]
DANGEROUS function. Searches for all standard PID files of dhcpcd, then kills all dhcpcds running (first SIGHUP, then SIGKILL). Works via WFM (only for local dhcpcd).
Return value
boolean
Start the fastest interface
Function parameters
string log
Return value
boolean - true if successful started
Status of the fastest interface
Return value
boolean - true if interface is up (which is not equal to connected)
Internet connection and YOU during the installation
List of Global Functions
FindFastest - Find the fastest connection to the Internet
SetDevice - Set device from argument as default network device
List of Global Variables
Find the fastest connection to the Internet
Return value
boolean - true if a "good" connection was found
Irda settings, input and output functions
List of Global Functions
Read - Read all irda settings
ReadSysconfig - Read irda settings from /etc/sysconfig/irda
Write - Write all irda settings
List of Global Variables
max_baud_rate - Maximum baud rate for the IrDA serial port
modified - Data was modified?
port - serial port used for irda
start - Should irda be started?
Read irda settings from /etc/sysconfig/irda
Return value
boolean - true when file exists
IscsiClient settings, input and output functions
List of Global Functions
Abort - Abort function
AutoPackages - Return packages needed to be installed and removed during Autoinstallation to insure module has all needed software installed.
Export - Dump the iscsi-client settings to a single map (For use by autoinstallation.)
Import - Get all iscsi-client settings from the first parameter (For use by autoinstallation.)
Modified - Prototypes
Modified - Data was modified?
Overview - Create an overview table with all configured cards
Read - Read all iscsi-client settings
Summary - Create a textual summary and a list of unconfigured cards
Write - Write all iscsi-client settings
List of Global Variables
modified - Data was modified?
write_only - Write only, used during autoinstallation. Don't run services and SuSEconfig, it's all done at one place.
Return packages needed to be installed and removed during Autoinstallation to insure module has all needed software installed.
Return value
map - with 2 lists.
Dump the iscsi-client settings to a single map (For use by autoinstallation.)
Return value
map - Dumped settings (later acceptable by Import ())
Get all iscsi-client settings from the first parameter (For use by autoinstallation.)
Function parameters
map settings
Return value
boolean - True on success
Create a textual summary and a list of unconfigured cards
Return value
list - summary of the current configuration
List of Global Functions
getiBFT - get iBFT (available only on some special hardware)
writeInitiatorName - write InitiatorName, create backup from previous if needed
List of Global Variables
IscsiServer settings, input and output functions
List of Global Functions
Abort - Abort function
AutoPackages - Return packages needed to be installed and removed during Autoinstallation to insure module has all needed software installed.
Export - Dump the iscsi-server settings to a single map (For use by autoinstallation.)
Import - Get all iscsi-server settings from the first parameter (For use by autoinstallation.)
Modified - Prototypes
Modified - Data was modified?
Overview - Create an overview table with all configured cards
Read - Read all iscsi-server settings
Summary - Create a textual summary and a list of unconfigured cards
Write - Write all iscsi-server settings
List of Global Variables
modified - Data was modified?
write_only - Write only, used during autoinstallation. Don't run services and SuSEconfig, it's all done at one place.
Return packages needed to be installed and removed during Autoinstallation to insure module has all needed software installed.
Return value
map - with 2 lists.
Dump the iscsi-server settings to a single map (For use by autoinstallation.)
Return value
map - Dumped settings (later acceptable by Import ())
Get all iscsi-server settings from the first parameter (For use by autoinstallation.)
Function parameters
map settings
Return value
boolean - True on success
Create a textual summary and a list of unconfigured cards
Return value
list - summary of the current configuration
IsnsServer settings, input and output functions
List of Global Functions
List of Global Variables
modified - Data was modified?
write_only - Write only, used during autoinstallation. Don't run services and SuSEconfig, it's all done at one place.
Return packages needed to be installed and removed during Autoinstallation to insure module has all needed software installed.
Return value
map - with 2 lists.
Joystick data
List of Global Functions
Changed - Return configuration status
Export - Dump the joystick settings to a single map (For use by autoinstallation.)
Import - Get all joystick settings from the first parameter (For use by autoinstallation.)
Read - Read all joystick settings from the SCR
RequiredKernelModules - Get list of all required joystick kernel modules
SaveOneJoystick - Update the SCR of the one joystick
StartAndEnable - Start joystick service and insserv it
Stop - Stop joystick service
Summary - Build a textual summary that can be used e.g. in inst_hw_config () or something similar.
Write - Update the SCR according to joystick settings
WriteConfig - Write sysconfig values (flush)
List of Global Variables
joystick - joystick config datastructure (list of maps)
Dump the joystick settings to a single map (For use by autoinstallation.)
Return value
list - Dumped settings (later acceptable by Import ())
Get all joystick settings from the first parameter (For use by autoinstallation.)
Function parameters
list settings
Return value
boolean - True on success
Read all joystick settings from the SCR
Function parameters
block<boolean> abort
Return value
boolean - True on success
Get list of all required joystick kernel modules
Return value
list<string> - list of modules
Update the SCR of the one joystick
Function parameters
integer pos
Return value
boolean
Build a textual summary that can be used e.g. in inst_hw_config () or something similar.
Return value
string - Summary of the configuration.
Update the SCR according to joystick settings
Function parameters
block<boolean> abort
Return value
boolean - True on success
List of Global Functions
Abort - Abort function
CheckPackages - Check if user enabled kdump if no deselect packages for installing if yes add necessary packages for installation
Export - Export kdump settings to a map
GetModified - Prototypes
GetModified - Data was modified?
Import - Import settings from a map
Propose - Propose all kdump settings
Read - Read all kdump settings
SetModified - Set data was modified
Summary - Create a textual summary and a list of unconfigured cards
Write - Write all kdump settings
List of Global Variables
DEFAULT_CONFIG - map of deafult values for options in UI
KDUMP_SETTINGS - map <string, string > of kdump settings
actual_boot_section - String option identify which boot section was used during boot process
add_crashkernel_param - Boolean option indicates add kernel param "crashkernel"
alocated_memory - String option for alocate of memory for boot param "crashkernel"
available_partitions - List of available partiotions with known partition
crashkernel_param_value - String option indicates value of kernel parameter "crashkernel"
import_called - Boolean option indicates that Import() was called and data was proposed
kdump_packages - list of packages for installation
modified - Data was modified?
propose_called - true if propose was called
total_memory - Total available memory [MB]
uknown_fs_partitions - List of available partiotions without filesystem or with uknown
write_only - Write only, used during autoinstallation. Don't run services and SuSEconfig, it's all done at one place.
Check if user enabled kdump if no deselect packages for installing if yes add necessary packages for installation
Return value
void
Import settings from a map
Function parameters
map settings
Return value
boolean - true on success
Create a textual summary and a list of unconfigured cards
Return value
list<string> - summary of the current configuration
Data for configuration of kerberos-client, i/o functions.
List of Global Functions
AutoPackages - Return required packages for auto-installation
Export - Dump the Kerberos settings to a map, for autoinstallation use.
Import - Get all the Kerberos configuration from a map.
Modified - Data was modified?
Read - Reads Kerberos settings from the SCR
ReadFile - Deprecated variant to ReadKrb5ConfValue
ReadKrb5ConfValue - Reads the item value from the /etc/krb5.conf via ini agent If the item doesn't exist, returns the default value
ReadKrb5ConfValues - Reads the item values from the /etc/krb5.conf via ini agent If the item doesn't exist, returns the default value
ShortSummary - Create a short textual summary
Summary - Create a textual summary
UpdatedArchPackages - Return list of architecture specific packages (derived from package list given as parameter) merged with the packages in parameter
ValidateTimeEntries - Validation function for time-related values
Write - Saves Kerberos configuration. (No parameters because it is too short to abort)
WriteFile - Deprecated variant to WriteKrb5ConfValue
WriteKrb5ConfValue - Write the item value to /etc/krb5.conf Do not write anything for empty and nil values
WriteKrb5ConfValues - Write list of values for given key to /etc/krb5.conf Do not write anything for empty and nil values
WriteKrb5ConfValuesAsString - Write (possible) multiple values of given key to /etc/krb5.conf
List of Global Variables
ExpertSettings - map with the settings configurable in the expert tabs
required_packages - Required packages for this module to operate
Return required packages for auto-installation
Return value
map - of packages to be installed and to be removed
Dump the Kerberos settings to a map, for autoinstallation use.
Return value
map - with settings
Get all the Kerberos configuration from a map.
Function parameters
map settings
Return value
boolean - success
Deprecated variant to ReadKrb5ConfValue
Function parameters
path path_to_value
string def_value
Return value
string
Reads the item value from the /etc/krb5.conf via ini agent If the item doesn't exist, returns the default value
Function parameters
path path_to_value
string def_value
Return value
string - the value
Reads the item values from the /etc/krb5.conf via ini agent If the item doesn't exist, returns the default value
Function parameters
path path_to_value
string def_value
Return value
list<string> - string the values for given key
Create a short textual summary
Return value
string - summary of the current configuration
Return list of architecture specific packages (derived from package list given as parameter) merged with the packages in parameter
Function parameters
list<string> packages
Return value
list<string>
Validation function for time-related values
Function parameters
string key
string val
Return value
boolean
Saves Kerberos configuration. (No parameters because it is too short to abort)
Return value
boolean - true on success
Deprecated variant to WriteKrb5ConfValue
Function parameters
path path_to_value
string value
Return value
boolean
Write the item value to /etc/krb5.conf Do not write anything for empty and nil values
Function parameters
path path_to_value
string value
Return value
boolean - false when nothing was written, success of write otherwise
Write list of values for given key to /etc/krb5.conf Do not write anything for empty and nil values
Function parameters
path path_to_value
list<string> values
Return value
boolean - false when nothing was written, success of write otherwise
Kernel related functions and data
List of Global Functions
AddCmdLine - AddCmdLine ()
AddModuleToLoad - Add a kernel module to the list of modules to load after boot
ComputePackage - Compute kernel package
ComputePackages - Compute kernel packages
ComputePackagesForBase - Compute kernel package for the specified base kernel package
GetBinary - Het the name of kernel binary under /boot
GetCmdLine - Get the kernel command line
GetInformAboutKernelChange - Get inform_about_kernel_change.
GetPackages - Get the list of kernel packages
GetSuSEUpdate - Check if suse_update kernel command line argument was passed
GetVgaType - Get the vga= kernel parameter
ProbeKernel - select kernel depending on architecture and system type.
RemoveModuleToLoad - Remove a kernel module from the list of modules to load after boot
SaveModulesToLoad - SaveModuleToLoad () save the sysconfig variable to the file
SetCmdLine - Set the kernel command line FIXME is heer because of bootloader module, should be removed
SetInformAboutKernelChange - Set inform_about_kernel_change.
SetVgaType - Set the vga= kernel argument FIXME is heer because of bootloader module, should be removed
List of Global Variables
AddCmdLine ()
Function parameters
string name
string arg
Return value
void
See also:
cmdLine
Add a kernel module to the list of modules to load after boot
Function parameters
string name
Return value
void
Compute kernel packages
Return value
list <string> - of selected kernel packages
Compute kernel package for the specified base kernel package
Function parameters
string base
boolean check_avail
Return value
list<string> - a list of all kernel packages (including the base package) that are to be installed together with the base package
Het the name of kernel binary under /boot
Return value
string - the name of the kernel binary
Get the list of kernel packages
Return value
list<string> - a list of kernel packages
Check if suse_update kernel command line argument was passed
Return value
boolean - true if it was
Remove a kernel module from the list of modules to load after boot
Function parameters
string name
Return value
void
SaveModuleToLoad () save the sysconfig variable to the file
Return value
boolean - true on success
Set the kernel command line FIXME is heer because of bootloader module, should be removed
Function parameters
string new_cmd_line
Return value
void
Set inform_about_kernel_change.
Function parameters
boolean b
Return value
void
Manages GPG keys in the package manager
List of Global Functions
DeleteKey - Delete the key from the package manager
GetKeys - Return the current keys.
ImportFromFile - Import key from a file
Modified - Has been something changed?
Read - Read the current configuration from the package manager. The previous changes are lost (@see Reset). The target system of the package manager must be initialized before reading GPG keys!
Reset - Reset the internal state of the module. The current configuration and all changes are deleted.
SearchGPGKey - Search a GPG key in the known keys
Write - Apply the changes, update the current status
List of Global Variables
Delete the key from the package manager
Function parameters
string key_id
Return value
boolean - true on success
Return the current keys.
Return value
list<map<string,any> > - list of known GPG keys ($[ "id" : string, "name" : string, "trusted" : boolean ])
Import key from a file
Function parameters
string file
boolean trusted
Return value
map<string,any> - map with the key, nil when import fails (invalid key, not existing file, already imported key...)
Has been something changed?
Return value
boolean - true if something has been changed
Read the current configuration from the package manager. The previous changes are lost (@see Reset). The target system of the package manager must be initialized before reading GPG keys!
Return value
boolean - true on success
Reset the internal state of the module. The current configuration and all changes are deleted.
Return value
void
Search a GPG key in the known keys
Function parameters
string key_id
Return value
map<string,any> - Data about the key or nil if the key was not found
Provide information regarding the keyboard.
List of Global Functions
CalledRestore - CalledRestore()
CheckKeyboardDuringUpdate - Special function for update mode only. Checks for the keyboard layout on the system which should be updated and if it differs from current one, opens a popup with the offer to change the layout. See discussion in bug #71069
Export - AutoYaST interface function: Return the Keyboard configuration as a map.
GetExpertValues - GetExpertValues()
GetKeyboardForLanguage - GetKeyboardForLanguage()
GetKeyboardItems - Return item list of keyboard items, sorted according to current language
GetX11KeyData - GetX11KeyData()
Import - AutoYaST interface function: Get the Keyboard configuration from a map.
Keyboard - Keyboard()
MakeProposal - MakeProposal()
Modified - was anything modified?
Name - Name() Just return the keyboard name, without setting anything.
Probe - Probe()
Read - Just store inital values - read was done in constructor
Restore - Restore the the data from sysconfig.
Save - Save the current data into a file to be read after a reboot.
Selection - Selection()
Set - Set()
SetConsole - Set the console keyboard to the given keyboard language.
SetExpertValues - SetExpertValues()
SetKeyboard - SetKeyboard()
SetX11 - Set the X11 keyboard to the given keyboard language.
Summary - AutoYaST interface function: Return the summary of Keyboard configuration as a map.
get_lang2keyboard - Get the system_language --> keyboard_language conversion map.
keymap2yast - Return a map for conversion from keymap to YaST2 keyboard code() Get the map of translated keyboard names.
xf86_update - Updates the X11 keyboard settings (using SaX library)
List of Global Variables
expert_on_entry - expert values on start
keyboard_on_entry - keyboard set on start
Special function for update mode only. Checks for the keyboard layout on the system which should be updated and if it differs from current one, opens a popup with the offer to change the layout. See discussion in bug #71069
Function parameters
string destdir
Return value
void
AutoYaST interface function: Return the Keyboard configuration as a map.
Return value
map - with the settings
GetKeyboardForLanguage()
Function parameters
string sys_language
string default_keyboard
Return value
string - The keyboard language for this language, e.g. "english-us" or the default value if nothing found.
Return item list of keyboard items, sorted according to current language
Return value
list<term>
GetX11KeyData()
Function parameters
string keymap
Return value
map - containing the x11 config data
AutoYaST interface function: Get the Keyboard configuration from a map.
Function parameters
map settings
Return value
boolean - success
MakeProposal()
Function parameters
boolean force_reset
boolean language_changed
Return value
string - user readable description. If force_reset is true reset the module to the keyboard stored in default_kbd.
Name() Just return the keyboard name, without setting anything.
Return value
string - user readable description.
Restore the the data from sysconfig.
Return value
boolean - true - Data could be restored false - Restore not successful
See also:
Save()
Save the current data into a file to be read after a reboot.
Function parameters
boolean update_x11
Return value
void
Selection()
Return value
map<string, string> - of $[ keyboard_code : keyboard_name, ...] for all known keyboards. 'keyboard_code' is used internally in Set and Get functions. 'keyboard_name' is a user-readable string.
Set()
Function parameters
string keyboard
Return value
void -
See also:
SetX11(), SetConsole()
Set the console keyboard to the given keyboard language.
Function parameters
string keyboard
Return value
string - The loadkeys command that has been executed to do it. (also stored in Keyboard::ckb_cmd)
SetKeyboard()
Function parameters
string keyboard
Return value
boolean - true - Success. Language set in public data. false - Error. Language not set.
Set the X11 keyboard to the given keyboard language.
Function parameters
string keyboard
Return value
string - The xkbset command that has been executed to do it. (also stored in Keyboard::xkb_cmd)
AutoYaST interface function: Return the summary of Keyboard configuration as a map.
Return value
string - summary string (html)
Get the system_language --> keyboard_language conversion map.
Return value
map - conversion map
See also:
get_xkblayout2keyboard()
Return a map for conversion from keymap to YaST2 keyboard code() Get the map of translated keyboard names.
Return value
map<string, string> - of $[ keyboard_code : keyboard_name, ...] for all known keyboards. 'keyboard_code' is used internally in Set and Get functions. 'keyboard_name' is a user-readable string. Uses Language::language for translation.
Imports older and foreign formats
List of Global Variables
Data for kiwi configuration, input and output functions.
List of Global Functions
ImportImageRepositories - Import repositories from given kiwi image configuration
InitCurrentRepositories - Initialize the list of current repositories
PrepareAndCreate - run kiwi to finally create the selected image
Read - REad the confgiuration stuff for image creator
ReadConfigXML - import the data from given config.xml
ReadImageTemplates - Read the templates on which the images can be based
SaveConfiguration - save the image configuration to the kiwi images directory
WriteConfigXML - Write currect configuration to new config.xml
List of Global Variables
content_key - argument for any_xml agent: key indicating content of element without attributes
Import repositories from given kiwi image configuration
Function parameters
map Config
string dir
Return value
map <string,map>
Initialize the list of current repositories
Return value
map <string,map>
run kiwi to finally create the selected image
Function parameters
string out_dir
string selected_profiles
Return value
boolean
import the data from given config.xml
Function parameters
string base_path
Return value
map<string,any>
save the image configuration to the kiwi images directory
Function parameters
map KiwiConfig
string task
Return value
string
Often used messages and button labels
Gabriele Strattner <gs@suse.de>
Stefan Hundhammer <sh@suse.de>
Arvin Schnell <arvin@suse.de>
List of Global Functions
AbortButton - Abort Button
AbortInstallationButton - Abort Installation Button
AcceptButton - Accept Button
AddButton - Add Button
BackButton - Back Button
BrowseButton - Browse Button
CancelButton - Cancel Button
CloseButton - Close Button
ConfirmPassword - Confirm Password TextEntry
ContinueButton - Continue Button
CreateButton - Create Button
DefaultFunctionKeyMap - Default function key map
DeleteButton - Delete Button
DoNotAcceptButton - Do Not Accept Button
DontInstallButton - Don't Install Button
DownButton - Down Button
DownloadButton - Download Button
EditButton - Edit Button
ErrorMsg - Error Message
FileName - File Name TextEntry
FinishButton - Finish Button
HelpButton - Help Button
HostName - Host Name TextEntry
IgnoreButton - Ignore Button
InstallButton - Install Button
NewButton - New Button
NextButton - Next Button
NoButton - No Button
OKButton - OK Button
Options - Options TextEntry
Password - Password TextEntry
PleaseWaitMsg - Please wait Message
Port - Port TextEntry
QuitButton - Quit Button
RefreshButton - Refresh Button
RemoveButton - Remove Button
ReplaceButton - Replace Button
RetryButton - Retry Button
SaveButton - Save Button
SelectButton - Select Button
SkipButton - Skip Button
StopButton - Stop Button
UpButton - Up Button
WarningMsg - Warning Message
YesButton - Yes Button
List of Global Variables
Network card data
List of Global Functions
Add - Add a new device
AnyDHCPDevice - Check if any device is configured with DHCP.
Autoinstall - Create a configuration for autoyast
Delete - Delete the given device
Edit - Edit the given device
Export - Export data
HaveXenBridge - Xen bridging confuses us (#178848)
Import - Import data
Packages -
Propose - Propose a configuration
ProposeInterfaces - Propose interface configuration
ProposeRoutesAndResolver - Propose configuration for routing and resolver
Read - Read all network settings from the SCR
ReadWithCache - (a specialization used when a parameterless function is needed)
Summary - Create a textual summary and a list of unconfigured devices
SummaryGeneral - Create a textual summary for the general network settings proposal (NetworkManager + ipv6)
Write - Update the SCR according to network settings
WriteOnly - Only write configuration without starting any init scripts and SuSEconfig
List of Global Variables
Check if any device is configured with DHCP.
Return value
boolean - true if any DHCP device is configured
Create a configuration for autoyast
Return value
boolean - true if something was proposed
Edit the given device
Function parameters
string name
Return value
boolean - true if success
Xen bridging confuses us (#178848)
Return value
boolean - whether xenbr* exists
Propose interface configuration
Return value
boolean - true if something was proposed
Propose configuration for routing and resolver
Return value
boolean - true if something was proposed
Read all network settings from the SCR
Function parameters
symbol cache
Return value
boolean - true on success
(a specialization used when a parameterless function is needed)
Return value
boolean - Read(`cache)
Create a textual summary and a list of unconfigured devices
Function parameters
string mode
Return value
list - summary of the current configuration
Create a textual summary for the general network settings proposal (NetworkManager + ipv6)
Return value
list - [rich text, links]
List of Global Functions
Commit - Commit pending operation
FindMatchingDevice - Find matching device Find a device, optionally with some predefined values
FreeAliases - Return 10 free aliases
FreeDevices - Return 10 free devices
GetDefaultsForHW - must be in sync with @ref SetDefaultsForHW
GetModified - Function which returns if the settings were modified
GetModuleForInterface - Get the module configuration for the modules configured in the interface section
InterfaceHasAliases - Check if the given device has any virtual alias.
Modified - Data was modified?
Overview - Create an overview table with all configured devices
Select - Select the given device
SelectHW - Select the hardware component
SelectHWMap - Select the hardware component
SetDefaultsForHW - must be in sync with @ref GetDefaultsForHW
SetDeviceVars - Set various device variables
SetModified - Function sets internal variable, which indicates, that any settings were modified, to "true"
UnsetModified - Function sets internal variable, which indicates, that any settings were modified, to "false"
List of Global Variables
Items - Hardware information
SysconfigDefaults - the defaults here are what sysconfig defaults to (as opposed to what a new interface gets, in @ref Select)
modified - Data was modified?
operation - Which operation is pending?
wl_wpa_eap - wl_wpa_eap aggregates the settings in a map for easier CWM access.
Find matching device Find a device, optionally with some predefined values
Function parameters
map interface
Return value
map - The map of the matching device.
Return 10 free aliases
Function parameters
string type
integer num
Return value
list - of 10 free devices
Return 10 free devices
Function parameters
string type
Return value
list - of 10 free devices
Function which returns if the settings were modified
Return value
boolean - settings were modified
Get the module configuration for the modules configured in the interface section
Function parameters
string ay_device
list<map> ay_modules
Return value
map - the module map with module name and options
Check if the given device has any virtual alias.
Return value
boolean - true if there are some aliases
Create an overview table with all configured devices
Return value
list - table items
Select the given device
Function parameters
string dev
Return value
boolean - true if success
Set various device variables
Function parameters
map devmap
map defaults
Return value
void
Function sets internal variable, which indicates, that any settings were modified, to "true"
Return value
void
the defaults here are what sysconfig defaults to (as opposed to what a new interface gets, in @ref Select)
wl_wpa_eap aggregates the settings in a map for easier CWM access.
wpa_eap
WPA_EAP_MODE: string ("TTLS" "PEAP" or "TLS")
WPA_EAP_IDENTITY: string
WPA_EAP_PASSWORD: string (for TTLS and PEAP)
WPA_EAP_ANONID: string (for TTLS and PEAP)
WPA_EAP_CLIENT_CERT: string (for TLS, file name)
WPA_EAP_CLIENT_KEY: string (for TLS, file name)
WPA_EAP_CLIENT_KEY_PASSWORD: string (for TLS)
WPA_EAP_CA_CERT: string (file name)
WPA_EAP_AUTH: string ("", "MD5", "GTC", "CHAP"*, "PAP"*, "MSCHAP"*, "MSCHAPV2") (*: TTLS only)
WPA_EAP_PEAP_VERSION: string ("", "0", "1")Udev rules for autoinstallation
This module does all language related stuff:
Klaus Kaempf <kkaempf@suse.de>
Thomas Roelz <tom@suse.de>
Maintainer: Jiri Suchomel <jsuchome@suse.cz>
List of Global Functions
CJKLanguage - Check if the language is "CJK" (and thus could not be shown in text mode - see bug #102958)
CheckIncompleteTranslation - Checks if translation is complete and displays Continue/Cancel popup messsage if it is not return true if translation is OK or user agrees with the warning
CheckLanguagesSupport - check if selected language has support on media (F301238) show a warning when not
Export - AutoYaST interface function: Return the Language configuration as a map.
GetExpertValues - GetExpertValues()
GetLang2KeyboardMap - return the content of lang2keyboard map (mapping of languages to their default (proposed) keyboard layouts)
GetLang2TimezoneMap - return the content of lang2timezone map (mapping of languages to their default (proposed) time zones)
GetLanguageCountry - de_DE@UTF-8 -> "DE"
GetLanguagesMap - Return the whole map with language descriptions
GetLocaleString - generate the whole locale string for given language according to DB (e.g. de_DE -> de_DE.UTF-8)
GetLocales - return the map of all supported countries and language codes
GetName - return user readable description of language
GetTextMode - return the value of text_mode (true for ncurses)
Import - AutoYaST interface function: Get the Language configuration from a map.
IncompleteTranslation - Returns true if translation for given language is not complete
Language - Constructor
MakeProposal - Return proposal string.
MakeSimpleProposal - Return 'simple' proposal string.
Modified - was anything modified?
PackagesInit - Initializes source and target, computes the packages necessary to install and uninstall, checks for disk space (#50745)
PackagesModified - Does the modification of language(s) require installation of new packages? This test compares the list of original languages (primary+secondary) with the list after user's modifications
QuickSet - Set the language that was read from sysconfig, read only one needed language file
Read - Store the inital values; in normal mode, read from system was done in constructor
ReadSysconfigLanguage - Read the RC_LANG value from sysconfig and exctract language from it
ReadSysconfigValues - Read the rest of language values from sysconfig
Save - Save state to target.
Selection - Return a map of ids and names to build up a selection list for the user. The key is used later in the Set function to select this language. The name is a translated string.
Set - Set module to selected language.
SetDefault - Store current language as default language.
SetExpertValues - SetExpertValues()
Summary - AutoYaST interface function: Return the summary of Language configuration as a map.
WfmSetGivenLanguage - WfmSetLanguag()
WfmSetLanguage - WfmSetLanguag()
List of Global Variables
language - currently selected language
language_on_entry - original language
languages - Default settings for INSTALLED_LANGUAGES in /etc/sysconfig/language
languages_on_entry - Original value of INSTALLED_LANGUAGES
preselected - language preselected in /etc/install.inf
selection_skipped - Was the initial language selection skipped? (see bug 223258) (It can be, if the language was selected in linuxrc)
Check if the language is "CJK" (and thus could not be shown in text mode - see bug #102958)
Function parameters
string lang
Return value
boolean
Checks if translation is complete and displays Continue/Cancel popup messsage if it is not return true if translation is OK or user agrees with the warning
Function parameters
string lang
Return value
boolean
check if selected language has support on media (F301238) show a warning when not
Function parameters
string selected_language
Return value
void
AutoYaST interface function: Return the Language configuration as a map.
Return value
map - with the settings
return the content of lang2keyboard map (mapping of languages to their default (proposed) keyboard layouts)
Function parameters
boolean force
Return value
map<string,string>
return the content of lang2timezone map (mapping of languages to their default (proposed) time zones)
Function parameters
boolean force
Return value
map<string,string>
Return the whole map with language descriptions
Function parameters
boolean force
Return value
map<string, list>
generate the whole locale string for given language according to DB (e.g. de_DE -> de_DE.UTF-8)
Function parameters
string lang
Return value
string
return the map of all supported countries and language codes
Return value
map<string,integer>
AutoYaST interface function: Get the Language configuration from a map.
Function parameters
map settings
Return value
boolean - success
Returns true if translation for given language is not complete
Function parameters
string lang
Return value
boolean
Return proposal string.
Function parameters
boolean force_reset
boolean language_changed
Return value
list<string> - user readable description. If force_reset is true reset the module to the language stored in default_language.
Return 'simple' proposal string.
Return value
string - preformated description.
Initializes source and target, computes the packages necessary to install and uninstall, checks for disk space (#50745)
Function parameters
list<string> selected_languages
Return value
boolean - false when there is not enough disk space for new packages
Does the modification of language(s) require installation of new packages? This test compares the list of original languages (primary+secondary) with the list after user's modifications
Return value
boolean
Set the language that was read from sysconfig, read only one needed language file
Function parameters
string lang
Return value
void
Store the inital values; in normal mode, read from system was done in constructor
Function parameters
boolean really
Return value
boolean
Read the RC_LANG value from sysconfig and exctract language from it
Return value
string - language
Return a map of ids and names to build up a selection list for the user. The key is used later in the Set function to select this language. The name is a translated string.
Return value
map<string, list> - of $[ language : [ utf8-name, ascii-name] ...] for all known languages 'language' is the (2 or 5 char) ISO language code. 'utf8-name' is a user-readable (UTF-8 encoded !) string. 'ascii-name' is an english (ascii encoded !) string.
See also:
Set
AutoYaST interface function: Return the summary of Language configuration as a map.
Return value
string - summary string
LDAP client configuration data, I/O functions.
List of Global Functions
AddMissingAttributes - For a given object, add all atributes this object is allowed to have according to its "objectClass" value. Added attributes have empty values.
AttributeDescription - Gets the description of attribute (from schema)
AutoPackages - Return needed packages and packages to be removed during autoinstallation.
BaseDNChanged - If the base DN has changed from a nonempty one, it may only be changed at boot time. Use this to warn the user.
CheckBaseConfig - Check if base config DN belongs to some existing object and offer creating it if necessary
CheckNDS - Check the server if it is NDS (novell directory service)
CheckOES - Check if current machine runs OES
CheckOrderOfCreation - Check if references to other objects are correct; create these objects if possible
CheckTemplateDN - Check if given DN exist and if it points to some template
CommitConfigModules - Save the edited map of configuration modules to global map
CommitTemplates - Save the edited map of templates to global map
ConnectWithoutTLS - popup shown after failed connection: ask for retry withou TLS (see bug 246397)
ConvertDefaultValues - In template object, convert the list of values (which is in the form [ "a1=v1", "a2=v2"]) to map (in the form $[ "a1":"v1", "a2":"v2"]
CreateModule - Creates default new map for new configuration object
CreateTemplate - Creates default new map for a new object template
Export - Dump the LDAP settings to a map, for autoinstallation use.
GetAllAttributes - Returns allowed and required attributes of given object class Read it from LDAP if it was not done yet.
GetBaseDN - Get the Base DN
GetBindDN - return administrator's DN if it was not read yet, read it now
GetConfigModules - Return the map of configuration modules (new copy) (in the form $[ DN: $[ map_of_one_module] ])
GetDefaultObjectClasses - Return list of default object classes for user or group There is fixed list here, it is not saved anywhere (only in default users plugin for LDAP objects)
GetGroupsDN - Returns DN's of groups (objectClass=posixGroup) in given base
GetLDAPEntry - Search for one entry (=base scope) in LDAP directory
GetLDAPPassword - Asks user for bind password to LDAP server
GetMainConfigDN - Return main configuration object DN
GetObjectAttributes - Returns the list of all allowed and required attributes for each object class, given in the list of object classes
GetRequiredAttributes - Returns required attributes of given object class Read it from LDAP if it was not done yet.
GetTemplates - Return the map of templates (new copy)
Import - Get all the LDAP configuration from a map. When called by ldap_auto (preparing autoinstallation data) the map may be empty.
InitSchema - Prepare agent for later schema queries (agent reads schema to its internal structures)
LDAPAskAndBind - Asks for LDAP password and tries to bind with it
LDAPBind - Binds to LDAP server
LDAPError - Reads and returns error message from agent
LDAPErrorMap - Reads and returns error map (=message + code) from agent
LDAPErrorMessage - Error popup for errors detected during LDAP operation
LDAPInit - Initializes LDAP agent
LDAPInitWithTLSCheck - Initializes LDAP agent, offers to turn off TLS if it failed
ObjectClassExists - Returns true if given object class exists in schema
ObjectClassStructural - Returns true if given object class is of 'structural' type
ParentExists - Check for existence of parent object of given DN in LDAP tree return the answer
Read - Reads LDAP settings from the SCR
ReadConfigModules - Read configuration moduels from LDAP server
ReadDN - Searches for DN's of all objects defined by filter in given base ("sub")
ReadTemplates - Read object templates from LDAP server
RestartSSHD - Set the value of restart_sshd (= restart sshd during write)
Set - Only set variables, without checking anything
SetAnonymous - Set the value of 'anonymous' variable (= bind without password)
SetBaseDN - Set new LDAP base DN
SetBindPassword - Set the value of bind_pass variable
SetDefaults - Set the defualt values, which should replace the ones from Read () Used during instalation, when we want to do a reasonable proposal
SetGUI - Set the value of 'use_gui' variable (= show error popups)
SetReadSettings - set the value of read_settings variable which means, do not read some settings from system
ShortSummary - returns html formated configuration summary (shorter than Summary)
SingleValued - Check if attribute allowes only single or multiple value
Summary - Summary() returns html formated configuration summary
UpdatedArchPackages - Return list of architecture specific packages (derived from package list given as parameter) merged with the packages in parameter
Write - Saves LDAP configuration.
WriteLDAP - Writes map of objects to LDAP. Ask for password, when needed and shows the error message when necessary.
WriteNow - wrapper for Write, without abort block
WriteOpenLdapConf - Modify also /etc/openldap/ldap.conf for the use of ldap client utilities (like ldapsearch)
WritePlusLine - If a file does not + entry, add it.
WriteToLDAP - Writes map of objects to LDAP
List of Global Variables
_autofs_allowed - If no, automounter will not be affected.
_start_autofs - Start automounter and import the settings from LDAP
attr_types - Map of atribute types (from schema). Indexed by names.
available_config_modules - Available configuration modules (objectClass names) TODO update
base_config_dn - DN of base configuration object
bind_dn - DN for binding to LDAP server
file_server - If home directories of LDAP users are stored on this machine
hash_schemas - encryption schemes supported by slappasswd
initial_defaults - The defualt values, which should replace the ones from Read () Used during instalation, when we want to do a reasonable proposal
initial_defaults_used - If the default values, used from ldap-server module were used to configure ldap-client
login_enabled - If login of LDAP uses to local machine is enabled
member_attribute - which attribute have LDAP groups for list of members
mkhomedir - if pam_mkhomedir is set in /etc/pam.d/commond-session
new_objects - defaults for adding new config objects and templates
nis_available - Is NIS service available? If yes, and LDAP client will be enabled, warn user (see bug #36981)
object_classes - Map of object classes (from schema). Indexed by names.
read_settings - If false, do not read settings already set from outside used e.g. for Users YaPI. see bug #60898
required_packages - Required packages for this module to operate -- they are now required only when LDAP is set for authentication
restart_sshd - if sshd should be restarted during write phase
server - IP addresses of LDAP server.
start - Are LDAP services available via nsswitch.conf?
use_gui - show popups with error messages?
write_only - Write only, used during autoinstallation. Don't run services and SuSEconfig, it's all done at one place.
For a given object, add all atributes this object is allowed to have according to its "objectClass" value. Added attributes have empty values.
Function parameters
map object
Return value
map - updated map
Gets the description of attribute (from schema)
Function parameters
string attr
Return value
string - description
Return needed packages and packages to be removed during autoinstallation.
Return value
map - of lists.
If the base DN has changed from a nonempty one, it may only be changed at boot time. Use this to warn the user.
Return value
boolean - whether changed by SetBaseDN
Check if base config DN belongs to some existing object and offer creating it if necessary
Function parameters
string dn
Return value
boolean
Check if references to other objects are correct; create these objects if possible
Return value
boolean
Check if given DN exist and if it points to some template
Function parameters
string dn
Return value
map - empty map if DN don't exist, template map if DN points to template object, nil if object with given DN is not template
Save the edited map of configuration modules to global map
Function parameters
map modules
Return value
boolean
Save the edited map of templates to global map
Function parameters
map templs
Return value
boolean
popup shown after failed connection: ask for retry withou TLS (see bug 246397)
Function parameters
map errmap
Return value
boolean - true if user wants to retry without TLS
In template object, convert the list of values (which is in the form [ "a1=v1", "a2=v2"]) to map (in the form $[ "a1":"v1", "a2":"v2"]
Function parameters
map templ
Return value
map - updated template map
Creates default new map for new configuration object
Function parameters
string cn
string class
Return value
map<string,any> - new module map
Creates default new map for a new object template
Function parameters
string cn
list<string> classes
Return value
map - template map
Dump the LDAP settings to a map, for autoinstallation use.
Return value
map - $["start":, "servers":[...], "domain":]
Returns allowed and required attributes of given object class Read it from LDAP if it was not done yet.
Function parameters
string class
Return value
list - attribute names (list of strings)
Return the map of configuration modules (new copy) (in the form $[ DN: $[ map_of_one_module] ])
Return value
map
Return list of default object classes for user or group There is fixed list here, it is not saved anywhere (only in default users plugin for LDAP objects)
Function parameters
map template
Return value
list
Returns DN's of groups (objectClass=posixGroup) in given base
Function parameters
string base
Return value
list - groups (list of strings)
Search for one entry (=base scope) in LDAP directory
Function parameters
string dn
Return value
map - with entry values, empty map if nothing found, nil on error
Asks user for bind password to LDAP server
Function parameters
boolean enable_anonymous
Return value
string - password
Returns the list of all allowed and required attributes for each object class, given in the list of object classes
Function parameters
list classes
Return value
list - attribute names (list of strings)
Returns required attributes of given object class Read it from LDAP if it was not done yet.
Function parameters
string class
Return value
list<string> - attribute names (list of strings)
Get all the LDAP configuration from a map. When called by ldap_auto (preparing autoinstallation data) the map may be empty.
Function parameters
map settings
Return value
boolean - success
Prepare agent for later schema queries (agent reads schema to its internal structures)
Return value
string - error message
Asks for LDAP password and tries to bind with it
Function parameters
boolean enable_anonymous
Return value
string - password entered, nil on cancel
Error popup for errors detected during LDAP operation
Function parameters
string type
string error
Return value
void
Initializes LDAP agent, offers to turn off TLS if it failed
Function parameters
map args
Return value
string
Returns true if given object class exists in schema
Function parameters
string class
Return value
boolean
Returns true if given object class is of 'structural' type
Function parameters
string class
Return value
boolean
Check for existence of parent object of given DN in LDAP tree return the answer
Function parameters
string dn
Return value
boolean
Read configuration moduels from LDAP server
Return value
string - error message
Searches for DN's of all objects defined by filter in given base ("sub")
Function parameters
string base
string search_filter
Return value
list<string> - of DN's (list of strings)
Set the value of restart_sshd (= restart sshd during write)
Function parameters
boolean restart
Return value
void
Only set variables, without checking anything
Function parameters
map settings
Return value
void
Set the value of 'anonymous' variable (= bind without password)
Function parameters
boolean anon
Return value
void
Set the value of bind_pass variable
Function parameters
string pass
Return value
void
Set the defualt values, which should replace the ones from Read () Used during instalation, when we want to do a reasonable proposal
Function parameters
map settings
Return value
boolean
Set the value of 'use_gui' variable (= show error popups)
Function parameters
boolean gui
Return value
void
set the value of read_settings variable which means, do not read some settings from system
Function parameters
boolean read
Return value
boolean
returns html formated configuration summary (shorter than Summary)
Return value
string - summary
Check if attribute allowes only single or multiple value
Function parameters
string attr
Return value
boolean - answer
Return list of architecture specific packages (derived from package list given as parameter) merged with the packages in parameter
Function parameters
list<string> packages
Return value
list<string>
Writes map of objects to LDAP. Ask for password, when needed and shows the error message when necessary.
Function parameters
map objects
Return value
boolean - success
Modify also /etc/openldap/ldap.conf for the use of ldap client utilities (like ldapsearch)
Return value
boolean - modified?
If a file does not + entry, add it.
Function parameters
boolean login
Return value
boolean - success?
The defualt values, which should replace the ones from Read () Used during instalation, when we want to do a reasonable proposal
If the default values, used from ldap-server module were used to configure ldap-client
Is NIS service available? If yes, and LDAP client will be enabled, warn user (see bug #36981)
If false, do not read settings already set from outside used e.g. for Users YaPI. see bug #60898
Required packages for this module to operate -- they are now required only when LDAP is set for authentication
Additional user interface functions: special edit popups
List of Global Functions
AddDefaultValue - Popup for adding new default value (default value is template's attribute)
BrowseTree - Popup for browsing LDAP tree and selecting the DN WARNING we expect that LDAP connection is already correctly initialized !
EditAttribute - Generic popup for editing attribute's value
InitAndBrowseTree - Open the LDAP Browse popup and initialize initialize LDAP connection before.
NewModule - Popup for adding new configuration module
PasswordPolicyDialog - dialog for Password Policy configuration object
List of Global Variables
Popup for adding new default value (default value is template's attribute)
Function parameters
list available
list conflicts
Return value
map - of new "default value" (contains attribute name and value)
Popup for browsing LDAP tree and selecting the DN WARNING we expect that LDAP connection is already correctly initialized !
Function parameters
string root_dn
Return value
string - DN of selected item, empty string when canceled
Generic popup for editing attribute's value
Function parameters
map settings
Return value
list<string> - of atrtibute values (edited or unchanged)
Open the LDAP Browse popup and initialize initialize LDAP connection before.
Function parameters
string root_dn
map connection
Return value
string - DN of selected item, empty string when canceled
Popup for adding new configuration module
Function parameters
list available
list conflicts
Return value
map - of new module (contains its name and object class)
LinuxUserMgmt settings, input and output functions
List of Global Functions
Abort - Abort function
AutoPackages - Return packages needed to be installed and removed during Autoinstallation to insure module has all needed software installed.
Export - Dump the linux-user-mgmt settings to a single map (For use by autoinstallation.)
Import - Get all linux-user-mgmt settings from the first parameter (For use by autoinstallation.)
Modified - Prototypes
Modified - Data was modified?
Overview - Create an overview table with all configured cards
Read - Read all linux-user-mgmt settings
Summary - Create a textual summary and a list of unconfigured cards
Write - Write all linux-user-mgmt settings
List of Global Variables
Settings - Settings Map
modified - Data was modified?
write_only - Write only, used during autoinstallation. Don't run services and SuSEconfig, it's all done at one place.
Return packages needed to be installed and removed during Autoinstallation to insure module has all needed software installed.
Return value
map - with 2 lists.
Dump the linux-user-mgmt settings to a single map (For use by autoinstallation.)
Return value
map - Dumped settings (later acceptable by Import ())
Get all linux-user-mgmt settings from the first parameter (For use by autoinstallation.)
Function parameters
map settings
Return value
boolean - True on success
Create a textual summary and a list of unconfigured cards
Return value
list - summary of the current configuration
List of Global Functions
WriteYaSTInf - Write /etc/yast.inf during installation
braille - braille mode ?
display_ip - remote X mode ?
serial_console - running via serial console
text - we're running in textmode (-> UI::GetDisplayInfo())
usessh - ssh mode ? if booted with 'vnc=1 usessh=1', keep vnc mode, but start sshd if booted with 'display_ip=1.2.3.4 usessh=1', keep remote X mode, but start sshd this has to be checked by the caller, not here
vnc - vnc mode ?
List of Global Variables
Write /etc/yast.inf during installation
Function parameters
map<string,string> linuxrc
Return value
void
ssh mode ? if booted with 'vnc=1 usessh=1', keep vnc mode, but start sshd if booted with 'display_ip=1.2.3.4 usessh=1', keep remote X mode, but start sshd this has to be checked by the caller, not here
Return value
boolean
Displaying a log with additional functionality
List of Global Functions
AdvancedHelp - Get the second part of the help for the log in case of advanced functions
AdvancedSaveHelp - Get the second part of the help for the log in case of advanced functions and save support
CreateWidget - Get the map with the log view widget
Display - Main function for displaying logs
DisplayFiltered - Display log with filtering with 100 lines
DisplaySimple - Display specified file, list 100 lines
LogHandle - Handle the event on the log view widget
LogInit - Initialize the displayed log
LogSelectionHelp - Get the help for the log in case of multiple logs
SaveHelp - Get the second part of the help for the log in case of save support
SingleLogHelp - Get the help for the log in case of a single log
List of Global Variables
Get the second part of the help for the log in case of advanced functions
Function parameters
string label
Return value
string - part of the log
Get the second part of the help for the log in case of advanced functions and save support
Function parameters
string label
Return value
string - part of the log
Get the map with the log view widget
Function parameters
map<string,any> parameters
list<map<string,any> > log_files
Return value
map - the log widget
Main function for displaying logs
Function parameters
map<string, any> parameters
Return value
void
Display log with filtering with 100 lines
Function parameters
string file
string grep
Return value
void
Display specified file, list 100 lines
Function parameters
string file
Return value
void
Handle the event on the log view widget
Function parameters
string key
map event
Return value
symbol - always nil
Get the help for the log in case of multiple logs
Return value
string - part of the log
Get the second part of the help for the log in case of save support
Return value
string - part of the log
Displaying a log
List of Global Functions
Start - Starts the log reading command via process agent.
List of Global Variables
Data for configuration of mail, input and output functions.
List of Global Functions
AutoPackages - Return required packages for auto-installation
CreateConfig - If MAIL_CREATE_CONFIG is not yes, the user does not want SuSEconfig to modify sendmail.cf/main.cf. So we will warn him before setting it to yes.
Export - Dump the mail settings to a single map (For use by autoinstallation.)
Fake - Make up data for screnshots
Import - Get all mail settings from the first parameter (For use by autoinstallation.)
ProbePackages - Detect which packages have to be installed and return a descriptive string for a plain text pop-up.
Read - Read all mail settings from the SCR
Summary - Summary
Touch - A convenient shortcut for setting touched.
Write - Update the SCR according to mail settings
List of Global Variables
amavis_allowed - Is amavis available on the installation media?
connection_type - `permanent, `dialup or `none
fetchmail - List of maps: $[server:, protocol:, remote_user:, local_user:, password:, enabled:(bool), other_(server|client)_options: ]
fetchmail_mode - When should fetchmail run: <dl> <dt> `manual <dd> <dt> `ppp <dd> for a ppp conection, /etc/ppp/ip-{up,down}.d <dt> `network <dd> for any network connection, /etc/sysconfig/network/if-{up,down}.d </dl> #22903 Unused yet! #37139, just enable rcfetchmail.
from_header - Mail will appear to come from this domain. Applies also for the envelope. Does not apply for mail from root.
install_packages - Read only, set by ProbePackages. Use as an argument to Package::DoInstallAndRemove
listen_remote - If false, port 25 will listen only for localhost
local_domains - Domains for locally delivered mail. (ahost.acompany.com is a domain)
masquerade_other_domains - If empty, from_header will be applied to mails coming from local_domains, otherwise from these domains. (Remember: mail domains)
masquerade_users - User specific sender masquerading. List of maps: $[comment:, user:, address:] (all are strings)
mta - `sendmail, `postfix or `other Initialized by ReadMta
outgoing_mail_server - A relay server for outgoing mail. May be enclosed in [brackets] to prevent MX lookups.
postfix_mda - sysconfig/postfix:POSTFIX_MDA #26052
protocol_choices - Fetchmail protocols, as defined in rcfile_l.l Probably not all of them are compatible with our simplified scheme but it does not hurt to include them. Must check for validity: the agent matches [[:alnum:]]+, lowercase names are valid too.
remove_packages - Read only, set by ProbePackages. Use as an argument to Package::DoInstallAndRemove
required_packages - Required packages
smtp_auth - SMTP AUTH (#23000) list of maps: The ui only handles the first list item, the rest is for autoyast $[server: string, user: string, password: string(plain text)] There are other map keys that must be preserved on editing.
smtp_use_TLS - Do the MTA use TLS for sending the email.
touched - Has the configuration been changed? Can be used as an argument to Popup::ReallyAbort
use_amavis - Use a virus scanner (AMaViS). amavisd-new (mta-independent) must be installed. It will be installed if amavis_allowed and it is not installed.
virtual_users - Domain-specific aliases. List of maps: $[comment:, alias:, destinations:] (all are strings)
write_only - If true, don't run SuSEconfig or restart the services. Autoinstall uses this to do all in one place.
Return required packages for auto-installation
Return value
map - of packages to be installed and to be removed
If MAIL_CREATE_CONFIG is not yes, the user does not want SuSEconfig to modify sendmail.cf/main.cf. So we will warn him before setting it to yes.
Return value
boolean - Is it yes?
Dump the mail settings to a single map (For use by autoinstallation.)
Return value
map - Dumped settings (later acceptable by Import ())
Get all mail settings from the first parameter (For use by autoinstallation.)
Function parameters
map Settings
Return value
boolean - True on success
Detect which packages have to be installed and return a descriptive string for a plain text pop-up.
Return value
string - "" or "Foo will be installed.\nBar will be installed.\n"
Read all mail settings from the SCR
Function parameters
block<boolean> abort
Return value
boolean - True on success
A convenient shortcut for setting touched.
Function parameters
boolean really
Return value
void
List of maps: $[server:, protocol:, remote_user:, local_user:, password:, enabled:(bool), other_(server|client)_options: ]
When should fetchmail run: <dl> <dt> `manual <dd> <dt> `ppp <dd> for a ppp conection, /etc/ppp/ip-{up,down}.d <dt> `network <dd> for any network connection, /etc/sysconfig/network/if-{up,down}.d </dl> #22903 Unused yet! #37139, just enable rcfetchmail.
Mail will appear to come from this domain. Applies also for the envelope. Does not apply for mail from root.
Read only, set by ProbePackages. Use as an argument to Package::DoInstallAndRemove
If empty, from_header will be applied to mails coming from local_domains, otherwise from these domains. (Remember: mail domains)
User specific sender masquerading. List of maps: $[comment:, user:, address:] (all are strings)
A relay server for outgoing mail. May be enclosed in [brackets] to prevent MX lookups.
Fetchmail protocols, as defined in rcfile_l.l Probably not all of them are compatible with our simplified scheme but it does not hurt to include them. Must check for validity: the agent matches [[:alnum:]]+, lowercase names are valid too.
Read only, set by ProbePackages. Use as an argument to Package::DoInstallAndRemove
SMTP AUTH (#23000) list of maps: The ui only handles the first list item, the rest is for autoyast $[server: string, user: string, password: string(plain text)] There are other map keys that must be preserved on editing.
Has the configuration been changed? Can be used as an argument to Popup::ReallyAbort
Use a virus scanner (AMaViS). amavisd-new (mta-independent) must be installed. It will be installed if amavis_allowed and it is not installed.
Domain-specific aliases. List of maps: $[comment:, alias:, destinations:] (all are strings)
Data for configuration of mail aliases, input and output functions.
List of Global Functions
FilterRootAlias - Separates aliases into aliases, root_alias and root_alias_comment
GetRootAlias - For use by the Users package. Does not rely on the internal state, first calls the agent.
ReadAliases - Read the aliases table (and separate the root alias)
SetRootAlias - For use by the Users package. Does not use the internal state, just calls the agent. SuSEconfig or newaliases is NOT called! (TODO: what if it is called while the main module is running?) Errors are reported via Report::Error.
WriteAliases - Part of Write.
List of Global Variables
aliases - List of maps: $[comment:, alias:, destinations:] (all are strings) Except root.
root_alias - Separated/joined with aliases by read/write/set/export
Separates aliases into aliases, root_alias and root_alias_comment
Return value
void
For use by the Users package. Does not rely on the internal state, first calls the agent.
Return value
string - eg. "joe, \\root", "" if not defined
Function parameters
list<map> aliases
Return value
list<map> - prepend root alias data to aliases, if set
Read the aliases table (and separate the root alias)
Return value
boolean - success?
For use by the Users package. Does not use the internal state, just calls the agent. SuSEconfig or newaliases is NOT called! (TODO: what if it is called while the main module is running?) Errors are reported via Report::Error.
Function parameters
string destinations
Return value
boolean - true on success
MailServer settings, input and output functions
List of Global Functions
Abort - Abort function
AutoPackages - Return packages needed to be installed and removed during Autoinstallation to insure module has all needed software installed.
CheckPackages - Check if all needed packages are installed
Export - Dump the mail-server settings to a single map (For use by autoinstallation.)
Import - Get all mail-server settings from the first parameter (For use by autoinstallation.)
Modified - Prototypes
Modified - Data was modified?
Overview - Create an overview table with all configured cards
Read - Read all mail-server settings
Summary - Create a textual summary and a list of unconfigured cards
Write - Write all mail-server settings
List of Global Variables
AdminPassword - Some additional parameter needed for the configuration.
CertExist - True if there is server certificate.
FetchingMail - Map of the mail server fetching mail jobs.
GlobalSettings - Map of the mail server global settings.
LDAPDefaults - Map of the mail server local domains.
MailLocalDelivery - Map of the mail server local delivery settings.
MailLocalDomains - Map of the mail server local domains.
MailPrevention - Map of the mail server prevention settings.
MailRelaying - Map of the mail server relaying settings.
MailTransports - Map of the mail transport settings.
ModulesTreeContent - List of the Configuration Modules
PPPCards - List of the PPP devices
modified - Data was modified?
setup - True if the modul was started with the option 'setup'.
write_only - Write only, used during autoinstallation. Don't run services and SuSEconfig, it's all done at one place.
Return packages needed to be installed and removed during Autoinstallation to insure module has all needed software installed.
Return value
map - with 2 lists.
Check if all needed packages are installed
Return value
boolean - true on success
Dump the mail-server settings to a single map (For use by autoinstallation.)
Return value
map - Dumped settings (later acceptable by Import ())
Get all mail-server settings from the first parameter (For use by autoinstallation.)
Function parameters
map settings
Return value
boolean - True on success
Create a textual summary and a list of unconfigured cards
Return value
list - summary of the current configuration
Map manipulation routines
List of Global Functions
CheckKeys - Check if a map contains all needed keys
FromString - Convert string "var=val ..." to map $[val:var, ...]
Keys - Return all keys from the map
KeysToLower - Switch map keys to lower case
KeysToUpper - Switch map keys to upper case
ToString - Convert options map $[var:val, ...] to string "var=val ..."
Values - Return all values from the map
List of Global Variables
Check if a map contains all needed keys
Function parameters
map m
list keys
Return value
boolean - true if map kontains all keys
Convert string "var=val ..." to map $[val:var, ...]
Function parameters
string s
Return value
map - converted string
Return all keys from the map
Function parameters
map m
Return value
list - a list of all keys from the map
Switch map keys to lower case
Function parameters
map<string, any> m
Return value
map - with keys converted to lower case
Switch map keys to upper case
Function parameters
map<string, any> m
Return value
map - with keys converted to lower case
Convert options map $[var:val, ...] to string "var=val ..."
Function parameters
map m
Return value
string - converted map
Often used messages
Lukas Ocilka <locilka@suse.cz>
Copyright: Copyright 2004, Novell, Inc. All rights reserved.
List of Global Functions
CannotAdjustService - Cannot ajust 'service_name' service
CannotContinueWithoutPackagesInstalled - Cannot continue without required packages installed
CannotOpenFile - Cannot open file 'file'
CannotOpenFileBecause - Cannot open file 'file'\n\nReason: reason
CannotReadCurrentSettings - When is is not able to read current settings
CannotRestartService - Cannot restart 'service_name' service
CannotStartService - Cannot start 'service_name' service
CannotStopService - Cannot stop 'service_name' service
CannotWriteSettingsTo - Cannot write settings to 'destination'
CannotWriteSettingsToBecause - Cannot write settings to 'destination'\n\nReason: reason
CheckEnvironment - Check the environment
DirectoryDoesNotExistCreate - Question: Directory does not exist. Create it?
DoNotShowMessageAgain - Push Button / CheckBox for not to disturb with this message again
DomainHasChangedMustReboot - Domain has changed, you have to reboot now for domain to take effect
ErrorWritingFile - Error writing file 'file'
ErrorWritingFileBecause - Error writing file 'file'\n\nReason: reason
FailedToInstallPackages - Installing packages failed
Finished - Finished
MissingParameter - When some parameter is missing
RequiredItem - Required text item
SuSEConfigFailed - Running SuSEConfig failed
UnableToCreateDirectory - When is is not able to create directory
UnknownError - UnknownError\n\nReason: reason
List of Global Variables
Cannot ajust 'service_name' service
Function parameters
string service_name
Return value
string - Cannot adjust 'service_name' service
Cannot continue without required packages installed
Return value
string - Cannot continue without required packages installed
Cannot open file 'file'
Function parameters
string file
Return value
string - Cannot open file 'file'
Cannot open file 'file'\n\nReason: reason
Function parameters
string file
string reason
Return value
string - Cannot open file 'file'\n\nReason: reason
When is is not able to read current settings
Return value
string - Cannot read current settings.
Cannot restart 'service_name' service
Function parameters
string service_name
Return value
string - Cannot restart 'service_name' service
Cannot start 'service_name' service
Function parameters
string service_name
Return value
string - Cannot start 'service_name' service
Cannot stop 'service_name' service
Function parameters
string service_name
Return value
string - Cannot stop 'service_name' service
Cannot write settings to 'destination'
Function parameters
string destination
Return value
string - Cannot write settings to 'destination'
Cannot write settings to 'destination'\n\nReason: reason
Function parameters
string destination
string reason
Return value
string - Cannot write settings to 'destination'\n\nReason: reason
Question: Directory does not exist. Create it?
Function parameters
string directory
Return value
string - The directory '%1' does not exist.\nCreate it?
Push Button / CheckBox for not to disturb with this message again
Return value
string - Do Not Show This Message &Again
Domain has changed, you have to reboot now for domain to take effect
Return value
string - The domain has changed.\nYou must reboot for the changes to take effect.
Error writing file 'file'
Function parameters
string file
Return value
string - Error writing file 'file'
Error writing file 'file'\n\nReason: reason
Function parameters
string file
string reason
Return value
string - Error writing file 'file'\n\nReason: reason
Installing packages failed
Return value
string - Failed to install required packages.
When some parameter is missing
Function parameters
string parameter
Return value
string - Missing parameter '%1'.
When is is not able to create directory
Function parameters
string directory
Return value
string - Unable to create directory '%1'.
Expert Partitioner
List of Global Functions
CustomSysconfigRead - Try to read value from sysconfig file and return the result if successful. Function reads from arbitrary sysconfig file, for which the agent doesn't exist: e.g. from different partition like /mnt/etc/sysconfig/file.
SplitOptions - MergeOptions Merges "opt1=val1 opt2=val2 ..." and $["opta":"vala", ..."] to $["opt1":"val1", "opt2":"val2", "opta":"vala", ...] as needed by modules.conf agent
SysconfigRead - SysconfigRead()
SysconfigWrite - SysconfigWrite()
List of Global Variables
Try to read value from sysconfig file and return the result if successful. Function reads from arbitrary sysconfig file, for which the agent doesn't exist: e.g. from different partition like /mnt/etc/sysconfig/file.
Function parameters
string key
string defval
string location
Return value
string - Success --> Result of SCR::Read<br> Failure --> Default value
Example 25.
Misc::CustomSysconfigRead ("INSTALLED_LANGUAGES", "", Installation::destdir + "/etc/sysconfig/language");
Function parameters
string first
string second
Return value
any - content of file try to read first file, if it doesn't exist, read second files must reside below /usr/lib/YaST2 files must have ycp syntax
MergeOptions Merges "opt1=val1 opt2=val2 ..." and $["opta":"vala", ..."] to $["opt1":"val1", "opt2":"val2", "opta":"vala", ...] as needed by modules.conf agent
Function parameters
string options
map optmap
Return value
map - $["opt1":"val1", "opt2":"val2", ...]
SysconfigRead()
Function parameters
path sysconfig_path
string defaultv
Return value
string - Success --> Result of SCR::Read<br> Failure --> Default value
SysconfigWrite()
Function parameters
path level
list<list> values
Return value
boolean - false if SCR::Write reported error write list of sysyconfig entries via rcconfig agent
Function parameters
map hardware_entry
Return value
string - vendor and device name common function to extract 'name' of hardware
Installation mode
List of Global Functions
Initialize - initialize everything from command-line of y2base
autoinst - doing auto-installation
commandline - we're running in command line interface
config - configuration for auto-installation, only in running system
installation - we're doing a fresh installation
live_installation - we're doing a fresh installation from live CD/DVD
mode - Returns the current mode name. It's one of "installation", "normal", "update", "repair", "autoinstallation", "autoinst_config"
normal - normal, running system
repair - start repair module
screen_shot - dump screens to /tmp. Implies @ref #demo . See installation/Test-Scripts/yast2-screen-shots*
test - Just testing. See installation/Test-Scripts/doit*
testsuite - Returns whether running in testsuite.
ui - Returns the current UI mode. It's one of "commandline", "dialog", "none"
update - we're doing an update
List of Global Variables
we're running in command line interface
Return value
boolean - true if command-line is running
Returns the current mode name. It's one of "installation", "normal", "update", "repair", "autoinstallation", "autoinst_config"
Return value
string
dump screens to /tmp. Implies @ref #demo . See installation/Test-Scripts/yast2-screen-shots*
Return value
boolean
Returns the current UI mode. It's one of "commandline", "dialog", "none"
Return value
string
Modem data
List of Global Functions
Add - Add a new device
Adding - Used to see whether we are in the process of adding a new interface or editing an existing one.
Commit - Commit the pending operation
Delete - Delete the given device
Edit - Edit the given device
Export - Export data
Import - Import data
Modified - Data was modified?
Overview - Create an overview table with all configured devices
Read - Read all network settings from the SCR
Select - Select the given device
SelectHW - Select the hardware component
Summary - Create a textual summary and a list of unconfigured devices
Write - Update the SCR according to network settings
List of Global Variables
AbortFunction - Abort function return boolean return true if abort
hotplug - Hotplug type ("" if not hot pluggable)
Used to see whether we are in the process of adding a new interface or editing an existing one.
Return value
boolean - adding?
Delete the given device
Function parameters
string name
Return value
boolean - true if success
Edit the given device
Function parameters
string name
Return value
boolean - true if success
Create an overview table with all configured devices
Return value
list - table items
Select the given device
Function parameters
string dev
Return value
boolean - true if success
Create a textual summary and a list of unconfigured devices
Function parameters
boolean split
Return value
list - summary of the current configuration
Klaus Kaempf <kkaempf@suse.de> (initial)
Purpose:
This module does all module loading stuff.
List of Global Functions
List of Global Variables
Function parameters
string modulename
string moduleargs
string vendorname
string devicename
boolean ask_before_loading
boolean with_modprobe
Return value
symbol - : `dont user choose *not* to load module `ok module loaded ok `fail module loading failed load a module if not already loaded by linuxrc
Library for handling special comments in /etc/modules.conf
List of Global Functions
ExtractFromComment - Extacts the unique key and the name of the card from comment in the modules.conf placed before the alias differentiatin the card.
StoreToComment - Create comment for modules.conf from the unique key and the name of the card. It will be parsed when reading. This comment should be placed before the alias differentiating the card (char-major-81-x for TV cards, ethx for ethernet, ...)
List of Global Variables
Extacts the unique key and the name of the card from comment in the modules.conf placed before the alias differentiatin the card.
Function parameters
string comment
Return value
map - Returns map: $[ "unique_key" : string, "name" : string ]
Example 26.
ModulesComments::ExtractFromComment ("# xyza.aiLKJkjsdlj:Ultra brutal TV card\n")
-> $[ "name" : "Ultra brutal TV card", "unique_key" : "xyza.aiLKJkjsdlj" ]Create comment for modules.conf from the unique key and the name of the card. It will be parsed when reading. This comment should be placed before the alias differentiating the card (char-major-81-x for TV cards, ethx for ethernet, ...)
Function parameters
string name
string unique_key
Return value
string - The comment.
Example 27.
ModulesComments::StoreToComment ("Ultra brutal TV card", "xyza.aiLKJkjsdlj")
-> "# xyza.aiLKJkjsdlj:Ultra brutal TV card\n"All modules.conf related functions are here
List of Global Functions
ModuleArgs - ModuleArgs save arguments for a kernel module
RunDepmod - RunDepmod runs /sbin/depmod !! call only when SCR runs on target !!
Save - Save save module names and arguments to /etc/modules.conf
List of Global Variables
ModuleArgs save arguments for a kernel module
Function parameters
string name
string arg
Return value
void
RunDepmod runs /sbin/depmod !! call only when SCR runs on target !!
Function parameters
boolean force
Return value
void
List of Global Functions
Abort - Abort function
Read - Read all multipath settings
ReadDialog - Read settings dialog
Write - Write all multipath settings
WriteDialog - Write settings dialog
List of Global Variables
Network detection
List of Global Functions
DuplicateIP - Duplicate IP detection
ResolveIP - Resolve IP to hostname
Start - Start the detection
Stop - Stop the detection
Duplicate IP detection
Function parameters
string ip
Return value
boolean - true if duplicate found
See also:
arping(8), ip(8)
Resolve IP to hostname
Function parameters
string ip
Return value
string - resolved host
Netmask manipulation routines
List of Global Functions
List of Global Variables
Check the netmask
Function parameters
string netmask
Return value
boolean - true if correct
Check the IPv4 netmask Note that 0.0.0.0 is not a correct netmask.
Function parameters
string netmask
Return value
boolean - true if correct
Check the IPv6 netmask
Function parameters
string netmask
Return value
boolean - true if correct
Convert netmask in bits form (20) to netmask string (255.255.240.0)
Function parameters
integer bits
Return value
string - netmask string
Network data
Network configuration data
Interface manipulation (/etc/sysconfig/network/ifcfg-*)
List of Global Functions
Add - Add a new device
CanonicalizeIP - Canonicalize netmask data (#46885) Sysconfig allows: IPADDR=10.0.0.1/8 IPADDR=10.0.0.1 PREFIXLEN=8 IPADDR=10.0.0.1 NETMASK=255.0.0.0 (IPADDR overrides PREFIXLEN, NETMASK used only if prefix length unspecified) If prefix length and NETMASK are unspecified, 32 is implied. Canonicalize it to IPADDR=10.0.0.1 PREFIXLEN= NETMASK=255.0.0.0
CanonicalizeStartmode - STARTMODE: onboot, on and boot are aliases for auto
Check - Check presence of the device (alias)
CleanCacheRead - re-read all settings again from system for creating new proposal from scratch (#170558)
CleanHotplugSymlink - Clean the hotplug devices compatibility symlink, usually ifcfg-eth-pcmcia -> ifcfg-eth-pcmcia-0.
ConcealSecrets - Conceal secret information, such as WEP keys, so that the output can be passed to y2log and bugzilla. (#65741)
ConcealSecrets1 - Conceal secret information, such as WEP keys, so that the output can be passed to y2log and bugzilla.
Delete - Delete the given device
DeleteAlias - Add the alias to the list of deleted items. Called when exiting from the aliases-of-device dialog. #48191
Edit - Edit the given device
Export - Export data
Fastest - Find the fastest available device
FilterDevices - Used in BuildSummary, BuildOverview
GetDevTypeDescription - Return textual device type
GetDeviceType - Return device type in human readable form :-)
GetDeviceTypes - Return supported network device types (for type netcard) for this hardware
GetFreeDevice - Return free device
GetFreeDevicesOld - Compute free devices
GetIP - get IP addres + additional IP addresses
HasAliases - Check if the given device has any virtual alias.
Import - Import data
IsConnected - Test whether device is connected (Link:up) The info is taken from sysfs
IsHotplug - Test hotplugability of a device
List - Get devices of the given type
ListDevicesExcept - list of all devices except given one by parameter dev also loopback is ommited
Locate - Locate devices of the given type and value
LocateNOT - Locate devices of the given type and value
LocateProvider - Check if any device is using the specified provider
Modified - Were the devices changed?
Push - DSL needs to save its config while the underlying network card is being configured.
Read - Read devices from files
RealType - Return real type of the device (incl. PCMCIA, USB, ...)
Select - Select the given device
UpdateModemSymlink - Update /dev/modem symlink
ValidCharsIfcfg - #46803: forbid "/" (filename), maybe also "-" (separator) "_" (escape)
Write - Write devices to files
alias_name - Create a alias name from its type and numbers
alias_num - Return a device alias number
device_name - Create a device name from its type and number
device_num - Return a device number
device_type - Return a device type
List of Global Variables
CardRegex - Predefined network card regular expressions
Current - Current device information
DeviceRegex - Predefined network device regular expressions
Name - Current device identifier
report_every_check - False suppresses tones of logs 'NetworkInterfaces.ycp:ABC Check(eth,id-00:aa:bb:cc:dd:ee,)'
Canonicalize netmask data (#46885) Sysconfig allows: IPADDR=10.0.0.1/8 IPADDR=10.0.0.1 PREFIXLEN=8 IPADDR=10.0.0.1 NETMASK=255.0.0.0 (IPADDR overrides PREFIXLEN, NETMASK used only if prefix length unspecified) If prefix length and NETMASK are unspecified, 32 is implied. Canonicalize it to IPADDR=10.0.0.1 PREFIXLEN= NETMASK=255.0.0.0
Function parameters
map<string, any> ifcfg
Return value
map<string, any> - the map with IPADDR, NETMASK adjusted; PREFIXLEN "" others unchanged. If IPADDR is empty, return the original.
STARTMODE: onboot, on and boot are aliases for auto
Function parameters
map<string, any> ifcfg
Return value
map<string, any>
Check presence of the device (alias)
Function parameters
string dev
Return value
boolean - true if device is present
re-read all settings again from system for creating new proposal from scratch (#170558)
Return value
boolean
Clean the hotplug devices compatibility symlink, usually ifcfg-eth-pcmcia -> ifcfg-eth-pcmcia-0.
Return value
boolean - true if success
Conceal secret information, such as WEP keys, so that the output can be passed to y2log and bugzilla. (#65741)
Function parameters
map devs
Return value
map - ifcfgs with secret fields masked out
Conceal secret information, such as WEP keys, so that the output can be passed to y2log and bugzilla.
Function parameters
map<string, any> ifcfg
Return value
map - ifcfg with secret fields masked out
Delete the given device
Function parameters
string name
Return value
boolean - true if success
Add the alias to the list of deleted items. Called when exiting from the aliases-of-device dialog. #48191
Function parameters
string device
string aid
Return value
boolean
Edit the given device
Function parameters
string name
Return value
boolean - true if success
Export data
Function parameters
string devregex
Return value
map<string,map> - dumped settings (later acceptable by Import())
Used in BuildSummary, BuildOverview
Function parameters
string devregex
Return value
map<string,map>
Return textual device type
Function parameters
string type
boolean longdescr
Return value
string - textual form of device type
Example 28.
GetDevTypeDescription("eth", false) -> "Ethernet"
GetDevTypeDescription("eth", true) -> "Ethernet Network Card"Return device type in human readable form :-)
Function parameters
string dev
Return value
string - device type
Example 29.
GetDeviceType(eth-bus-pci-0000:01:07.0) -> "Network Card" GetDeviceType(modem0) -> "Modem"
Return supported network device types (for type netcard) for this hardware
Return value
list<string>
Return free device
Function parameters
string type
Return value
string - free device
Compute free devices
Function parameters
string type
integer num
Return value
list - num of free devices
get IP addres + additional IP addresses
Function parameters
string device
Return value
list<string> - of IP addresses of selected interface
Check if the given device has any virtual alias.
Function parameters
string name
Return value
boolean - true if there are some aliases
Import data
Function parameters
string devregex
map<string,map> devices
Return value
boolean - true on success
Test whether device is connected (Link:up) The info is taken from sysfs
Function parameters
string dev
Return value
boolean - true if connected
Test hotplugability of a device
Function parameters
string type
Return value
boolean - true if hotpluggable
Get devices of the given type
Function parameters
string devregex
Return value
list<string> - of found devices
list of all devices except given one by parameter dev also loopback is ommited
Function parameters
string dev
Return value
list<string>
Locate devices of the given type and value
Function parameters
string key
string val
Return value
list<string> - of devices with key=val
Locate devices of the given type and value
Function parameters
string key
string val
Return value
list<string> - of devices with key!=val
Check if any device is using the specified provider
Function parameters
string provider
Return value
boolean - true if there is any
Were the devices changed?
Function parameters
string devregex
Return value
boolean - true if modified
DSL needs to save its config while the underlying network card is being configured.
Return value
void
Return real type of the device (incl. PCMCIA, USB, ...)
Function parameters
string type
string hotplug
Return value
string - real type
Select the given device
Function parameters
string name
Return value
boolean - true if success
#46803: forbid "/" (filename), maybe also "-" (separator) "_" (escape)
Return value
string
Write devices to files
Function parameters
string devregex
Return value
boolean - true if success
Create a alias name from its type and numbers
Function parameters
string typ
string num
string anum
Return value
string - alias name
Return a device alias number
Function parameters
string dev
Return value
string - alias number
Create a device name from its type and number
Function parameters
string typ
string num
Return value
string - device name
Return a device number
Function parameters
string dev
Return value
string - device number
Popup dialogs for browsing the local network
List of Global Functions
ChooseItem - Let the user choose one of a list of items
HostName - Give me one host name on the local network
NFSExport - Give me export path of selected server
NFSServer - Give me NFS server name on the local network
List of Global Variables
Let the user choose one of a list of items
Function parameters
string title
list<string> items
string selected
Return value
string - one item or nil
Give me one host name on the local network
Function parameters
string selected
Return value
string - a hostname or nil if "Cancel" was pressed
Give me export path of selected server
Function parameters
string server
string selected
Return value
string - an export or nil if "Cancel" was pressed
Init script handling, ifup vs NetworkManager
List of Global Functions
ConfirmNetworkManager - Opens up a continue/cancel confirmation popup in the case when NetworkManager is enabled. User is informed that continuing the configuration may produce undefined results. If NetworkManager is not used, silently returns true.
EnableDisable - Enables and disables the appropriate services.
IsManaged - Whether use NetworkManager or ifup
Read - Initialize module data
RunningNetworkPopup - If there is network running, return true. Otherwise show error popup depending on Mode and return false
StartStop - Starts and stops the appropriate services.
List of Global Variables
Opens up a continue/cancel confirmation popup in the case when NetworkManager is enabled. User is informed that continuing the configuration may produce undefined results. If NetworkManager is not used, silently returns true.
Return value
boolean - continue
If there is network running, return true. Otherwise show error popup depending on Mode and return false
Return value
boolean - true if network running
Networked disks
List of Global Functions
isDiskOnNetwork - If the disk is on a networked device (NFS, ISCSI), the main NIC needs STARTMODE nfsroot instead of auto.
List of Global Variables
List of Global Functions
Activate - Activate value stored in the internal list
MakeProposal - Return new ID description
List of Global Variables
Activate value stored in the internal list
Return value
boolean - True if all settings were successfuly set
NFS client configuration data, I/O functions.
Jan Holesovsky <kendy@suse.cz>
Dan Vesely <dan@suse.cz>
Martin Vidner <mvidner@suse.cz>
List of Global Functions
AutoPackages - Return required packages for auto-installation
Export - Dump the NFS settings to a map, for autoinstallation use.
GetModified - Functions which returns if the settings were modified
Import - Get all NFS configuration from a map. When called by nfs_auto (preparing autoinstallation data) the map may be empty.
Mount - Mount NFS directory
Read - Reads NFS settings from the SCR (.etc.fstab)
Set - Set module data
SetModified - Function sets internal variable, which indicates, that any settings were modified, to "true"
Summary - Summary()
Unmount - Unmount NFS directory from the system
Write - Writes the NFS client configuration and starts/stops the service. (No parameters because it is too short to abort)
WriteOnly - Writes the NFS client configuration without starting/stopping the service. Autoinstallation uses this and then calls SuSEconfig only once and starts the services together. (No parameters because it is too short to abort)
List of Global Variables
nfs_entries - eg.: [ $["spec": "moon:/cheese", file: "/mooncheese", "mntopts": "defaults"], ...]
non_nfs_entries - Read only, intended for checking mount-point uniqueness.
required_packages - Required packages
Return required packages for auto-installation
Return value
map - of packages to be installed and to be removed
Dump the NFS settings to a map, for autoinstallation use.
Return value
list - a list of nfs entries.
Functions which returns if the settings were modified
Return value
boolean - settings were modified
Get all NFS configuration from a map. When called by nfs_auto (preparing autoinstallation data) the map may be empty.
Function parameters
list<map> settings
Return value
boolean - success
Mount NFS directory
Function parameters
string server
string share
string mpoint
string options
Return value
string - directory where volume was mounted or nil if mount failed
Function sets internal variable, which indicates, that any settings were modified, to "true"
Return value
void
Unmount NFS directory from the system
Function parameters
string mpoint
Return value
boolean - true on success
Writes the NFS client configuration and starts/stops the service. (No parameters because it is too short to abort)
Return value
boolean - true on success
eg.: [ $["spec": "moon:/cheese", file: "/mooncheese", "mntopts": "defaults"], ...]
NFS server configuration data, I/O functions.
List of Global Functions
AutoPackages - Return required packages for auto-installation
Export - Dump the NFS settings to a map, for autoinstallation use.
GetModified - Functions which returns if the settings were modified
Import - Get all NFS server configuration from a map. When called by nfs_server_auto (preparing autoinstallation data) the map may be empty.
Read - Reads NFS settings from the SCR (.etc.exports), from SCR (.sysnconfig.nfs) and SCR (.etc.idmapd_conf),if necessary.
Set - Set the variables just as is and without complaining
SetModified - Function sets internal variable, which indicates, that any settings were modified, to "true"
Summary -
Write - Saves NFS server configuration. (exports(5)) Creates any missing directories.
WriteExports - Saves /etc/exports and creates missing directories.
List of Global Variables
domain - Domain name to be used for nfsv4 (idmapd.conf)
enable_nfsv4 - Enable nfsv4
exports -
nfs_security - GSS Security ?
required_packages - Required packages for this module to operate
start - Should the server be started? New since 9.0: Exports are independent of this setting.
write_only - Write only, used during autoinstallation. Don't run services and SuSEconfig, it's all done at one place.
Return required packages for auto-installation
Return value
map - of packages to be installed and to be removed
Dump the NFS settings to a map, for autoinstallation use.
Return value
map - $["start_nfsserver": "nfs_exports":]
See also:
exports
Functions which returns if the settings were modified
Return value
boolean - settings were modified
Get all NFS server configuration from a map. When called by nfs_server_auto (preparing autoinstallation data) the map may be empty.
Function parameters
map settings
Return value
boolean - success
See also:
exports
Reads NFS settings from the SCR (.etc.exports), from SCR (.sysnconfig.nfs) and SCR (.etc.idmapd_conf),if necessary.
Return value
boolean - true on success
Set the variables just as is and without complaining
Function parameters
map settings
Return value
void
Function sets internal variable, which indicates, that any settings were modified, to "true"
Return value
void
Saves NFS server configuration. (exports(5)) Creates any missing directories.
Return value
boolean - true on success
Should the server be started? New since 9.0: Exports are independent of this setting.
NIS client configuration data, I/O functions.
Jan Holesovsky <kendy@suse.cz>
Dan Vesely <dan@suse.cz>
Martin Vidner <mvidner@suse.cz>
List of Global Functions
AutoPackages - Return needed packages and packages to be removed during autoinstallation.
BrItem - Makes an item for the short summary. I guess the users module wants to avoid paragraph breaks.
DomainChanged - If the domain has changed from a nonempty one, it may only be changed at boot time. Use this to warn the user.
Export - Dump the NIS settings to a map, for autoinstallation use.
Fake - Make up data for screnshots. To be used instead of @ref Read .
GetModified - Functions which returns if the settings were modified
Import - Get all the NIS configuration from a map. When called by nis_auto (preparing autoinstallation data) the map may be empty.
ProbePackages - Detect which packages have to be installed and return a descriptive string for a plain text pop-up.
Read - Reads NIS settings from the SCR
Set - Set module data
SetDomain - Set the NIS domain.
SetModified - Function sets internal variable, which indicates, that any settings were modified, to "true"
SetServers - Set the servers from a string
ShortSummary - Create a short textual summary with configuration abstract It is called by "authentication/user sources" dialog in yast2-users
Summary -
Touch - A convenient shortcut for setting touched.
UsersByLdap - Used in the UI when NIS is turned on.
Write - Saves NIS configuration.
WriteNssConf - Configures the name service switch for the user databases according to chosen settings
WriteOnly - Only write new configuration w/o starting any scripts
check_address_nis - Check syntax of a network address (ip4 or name), names only if nsswitch.conf does not have hosts: nis
check_nisdomainname - Check syntax of a NIS domain name
getNetconfigValues - Read Netconfig configuration
setNetconfigValues - Write the netconfig configuration
valid_address_nis - Describe a valid address - ip4 or name, names only if nsswitch.conf does not have hosts: nis
List of Global Variables
YpbindErrors - Output of "rcypbind start", if there was an error. Read only. This is currently used only in nis-server for its more advanced error reporting. (Bug 14706)
_autofs_allowed - If no, automounter will not be affected.
_start_autofs - Start automounter and import the settings from NIS. (Bug 6092)
broken_server - You should set this to "yes" if you have a NIS server in your network, which binds only to high ports over 1024. Since this is a security risk, you should consider to replace the NIS server with another implementation.
default_broadcast - Broadcast for the default domain? (New in ypbind-1.12)
dhcp_restart - If dhcp_wanted changes, we need to restart the DHCP client
dhcpcd_running - #35654: if the server is running and sysconfig wants NIS data, it's ok to FitIntoSingle
global_broadcast - If this option is set, ypbind will ignore /etc/yp.conf and use a broadcast call to find a NIS server in the local subnet. You should avoid to use this, it is a big security risk.
install_packages - Read only, set by ProbePackages. Use as an argument to DoInstallAndRemove
local_only - If this option is set, ypbind will only bind to the loopback interface and remote hosts cannot query it.
multidomain_broadcast - Servers for a multiple-domain configuration. Whether a broadcast will be done if the servers don't respond. Keys are domains, values are booleans. The domains must be the same as for multidomain_servers
multidomain_servers - Servers for a multiple-domain configuration. Keys are domains, values are lists of servers (strings). The domains must be the same as for multidomain_broadcast
options - Extra options for ypbind. Here you can add options like "-ypset", "-ypsetme", "-p port" or "-no-ping".
required_packages - Required packages for this module to operate
servers - IP addresses of NIS servers.
start - Should ypbind be started at boot? If not, other settings are not touched.
touched - Has the configuration been changed? Can be used as an argument to Popup::ReallyAbort
Return needed packages and packages to be removed during autoinstallation.
Return value
map - of lists.
Makes an item for the short summary. I guess the users module wants to avoid paragraph breaks.
Function parameters
string title
string value
Return value
string - [b]title[/b]: value[br]
If the domain has changed from a nonempty one, it may only be changed at boot time. Use this to warn the user.
Return value
boolean - whether changed by SetDomain
Dump the NIS settings to a map, for autoinstallation use.
Return value
map - $["start":, "servers":[...], "domain":]
Functions which returns if the settings were modified
Return value
boolean - settings were modified
Get all the NIS configuration from a map. When called by nis_auto (preparing autoinstallation data) the map may be empty.
Function parameters
map settings
Return value
boolean - success
Detect which packages have to be installed and return a descriptive string for a plain text pop-up.
Return value
string - "" or "Foo will be installed.\nBar will be installed.\n"
Function sets internal variable, which indicates, that any settings were modified, to "true"
Return value
void
Set the servers from a string
Function parameters
string servers_s
Return value
void
Create a short textual summary with configuration abstract It is called by "authentication/user sources" dialog in yast2-users
Return value
string - summary of the current configuration
A convenient shortcut for setting touched.
Function parameters
boolean really
Return value
void
Configures the name service switch for the user databases according to chosen settings
Return value
boolean - success?
Only write new configuration w/o starting any scripts
Return value
boolean - true on success
Check syntax of a network address (ip4 or name), names only if nsswitch.conf does not have hosts: nis
Function parameters
string a
Return value
boolean - true if correct
Check syntax of a NIS domain name
Function parameters
string domain
Return value
boolean - true if correct
Describe a valid address - ip4 or name, names only if nsswitch.conf does not have hosts: nis
Return value
string - a description
Output of "rcypbind start", if there was an error. Read only. This is currently used only in nis-server for its more advanced error reporting. (Bug 14706)
You should set this to "yes" if you have a NIS server in your network, which binds only to high ports over 1024. Since this is a security risk, you should consider to replace the NIS server with another implementation.
#35654: if the server is running and sysconfig wants NIS data, it's ok to FitIntoSingle
If this option is set, ypbind will ignore /etc/yp.conf and use a broadcast call to find a NIS server in the local subnet. You should avoid to use this, it is a big security risk.
See also:
multidomain_broadcast
default_broadcast
If this option is set, ypbind will only bind to the loopback interface and remote hosts cannot query it.
Servers for a multiple-domain configuration. Whether a broadcast will be done if the servers don't respond. Keys are domains, values are booleans. The domains must be the same as for multidomain_servers
See also:
multidomain_servers
global_broadcast
Servers for a multiple-domain configuration. Keys are domains, values are lists of servers (strings). The domains must be the same as for multidomain_broadcast
See also:
multidomain_broadcast
Extra options for ypbind. Here you can add options like "-ypset", "-ypsetme", "-p port" or "-no-ping".
NIS Server, input and output functions.
List of Global Functions
Client - Calls NIS client configuration writing
EnsureDirectory - Ensures that the domain directory exists.
Export - Dump the nisServer settings to a single map (For use by autoinstallation.)
GetAllMaps - All tables that ypserv Makefile knows about
GetModified - Functions which returns if the settings were modified
GetSaveList - Returns a list of what to save
Import - Get all nisServer settings from the first parameter (For use by autoinstallation.)
Read - Read all NIS server settings.
Remove - Removes file or directory and log errors
SaveSecurenets - Save securenets list
SaveSlaves - Save list of slaves by calling appropriate any agent
SaveVariables - Saves config variables according to workflow
SetModified - Function sets internal variable, which indicates, that any settings were modified, to "true"
Summary - Create a textual summary and a list of unconfigured cards
Write - Write all NIS server settings
YPDaemons - Starts or stop daemons
YPGetMaps - Gets the YP maps from master for slave
YPMake - Creates initial database
addError - Adds an error to error_msg
addErrorDetail - Adds an error to error_details
getMaster - Gets the master server (name or IP?) from any of this server's maps
List of Global Variables
dhcp_changes_domain - If DHCP client could change domain name (#28727)
domain - The domain we are serving. (for simplicity, we assume a single domain) US ".etc.defaultdomain"
maps - Maps to be served
merge_passwd - Merge passwd and shadow to one map? Makefile: string true|false
mingid - Minimal GID to include in the user maps
minuid - Minimal UID to include in the user maps
modified - Data was modified?
nisclient_local - NIS client is configured localy (with current machine as server)
nopush - Don't push the changes to slave servers. (useful if there aren't any) Makefile: string true|false
old_domainname - For warning if the domain was changed. TODO delegate to the client module?
pwd_chfn - YPPWD_CHFN - allow changing the full name?
pwd_chsh - YPPWD_CHSH - allow changing the login shell?
pwd_srcdir - YPPWD_SRCDIR - source directory for passwd data
required_packages - Packages to be installed for this module to operate
start_ypbind - Start also the client? (only when client is configured locally)
start_yppasswdd - Start also the password daemon?
start_ypxfrd - Start also the map transfer daemon?
ui_master_ip - If we are a slave, where is the master? (it may actually be a hostname, TODO solve like in the client using nsswitch)
ui_what - What kind of server to run: `master, `slave, `none
write_only - Write only, used during autoinstallation. Don't run services and SuSEconfig, it's all done at one place.
ypservers - Slave servers
Ensures that the domain directory exists.
Function parameters
string directory
Return value
boolean - false if not and cannot be created
Dump the nisServer settings to a single map (For use by autoinstallation.)
Return value
map - Dumped settings (later acceptable by Import ())
Functions which returns if the settings were modified
Return value
boolean - settings were modified
Returns a list of what to save
Function parameters
symbol workflow
Return value
list<map> - a list of maps: <pre>$[ "save_label": ..., "progress_label": ..., "function": @see CallFunction01 ]</pre>
Get all nisServer settings from the first parameter (For use by autoinstallation.)
Function parameters
map settings
Return value
boolean - True on success
Saves config variables according to workflow
Function parameters
any which
Return value
void
Function sets internal variable, which indicates, that any settings were modified, to "true"
Return value
void
Create a textual summary and a list of unconfigured cards
Return value
list - summary of the current configuration
Gets the master server (name or IP?) from any of this server's maps
Return value
string - nil if no map is found or it has no YP_MASTER_NAME
The domain we are serving. (for simplicity, we assume a single domain) US ".etc.defaultdomain"
Don't push the changes to slave servers. (useful if there aren't any) Makefile: string true|false
securenet network: string netmask: string * or hash: "#" (optional) comment: string
If we are a slave, where is the master? (it may actually be a hostname, TODO solve like in the client using nsswitch)
Write only, used during autoinstallation. Don't run services and SuSEconfig, it's all done at one place.
NovellCasa settings, input and output functions
casa <casa@novell.com>
********************************************************************
Copyright (C) 2005-2006 Novell, Inc. All Rights Reserved.
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; version 2.1
of the License.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Library Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library; if not, Novell, Inc.
To contact Novell about this file by physical or electronic mail,
you may find current contact information at www.novell.com.
********************************************************************
Representation of the configuration of CASA.
Input and output routines.
List of Global Functions
Abort - Abort function
AutoPackages - Return packages needed to be installed and removed during Autoinstallation to insure module has all needed software installed.
Export - Dump the CASA settings to a single map (For use by autoinstallation.)
Import - Get all CASA settings from the first parameter (For use by autoinstallation.)
Modified - Prototypes
Modified - Data was modified?
Overview - Create an overview table with all configured cards
Read - Read all CASA settings
Summary - Create a textual summary and a list of unconfigured cards
Write - Write all CASA settings
List of Global Variables
modified - Data was modified?
write_only - Write only, used during autoinstallation. Don't run services and SuSEconfig, it's all done at one place.
Return packages needed to be installed and removed during Autoinstallation to insure module has all needed software installed.
Return value
map - with 2 lists.
Dump the CASA settings to a single map (For use by autoinstallation.)
Return value
map - Dumped settings (later acceptable by Import ())
Get all CASA settings from the first parameter (For use by autoinstallation.)
Function parameters
map settings
Return value
boolean - True on success
Create a textual summary and a list of unconfigured cards
Return value
list - summary of the current configuration
Dialogs definitions
Novell utility routines
List of Global Functions
CheckForInstalledSoftware - CheckForInstalledSoftware()
FindValueInRegistry - Find a value in the Novell registry
GetDefaultAndFallbackIPAddresses - Determine what the default and fallback IP addresses should be for a product.
GetIPAddr - Function: global string GetIPAddr()
IsEdirectoryInstalledLocally - See if eDirectory is installed locally on this machine and is running.
IsSelectionInstalled - See if the specified product was installed during phase 1 of the install. This is how we determine if a product should show up in the proposal screen. The input parameter "selection_name" should match the name of the selection file for which information is required (e.g. novell-imanager, novell-ifolder2, X11, Linux_tools, etc.). The parameter "selection_name" is not case sensitive.
MapIPAddrToDevice - Function: MapIPAddrToDevice(string ip)
ReplaceSubString - Function: ReplaceSubString(string text, string replace, string replacement)
Typeful2Typeless - Typeful2Typeless (string ndsName)
ValidatePassword - Validate password
List of Global Variables
Find a value in the Novell registry
Function parameters
string key
Return value
string - registry value for key on success, nil string on failure or no value.
Determine what the default and fallback IP addresses should be for a product.
Function parameters
string ldapIP
Return value
map
See if eDirectory is installed locally on this machine and is running.
Return value
boolean
See if the specified product was installed during phase 1 of the install. This is how we determine if a product should show up in the proposal screen. The input parameter "selection_name" should match the name of the selection file for which information is required (e.g. novell-imanager, novell-ifolder2, X11, Linux_tools, etc.). The parameter "selection_name" is not case sensitive.
Function parameters
string selection_name
Return value
boolean
Function: MapIPAddrToDevice(string ip)
Function parameters
string ip
Return value
string
Function: ReplaceSubString(string text, string replace, string replacement)
Function parameters
string text
string replace
string replacement
Return value
string
Typeful2Typeless (string ndsName)
Function parameters
string ndsName
Return value
string
Novell validation routines
List of Global Functions
ValidateContext - Validate Context
ValidateCredentials - Validate credentials
ValidateDNSorIP - Validate DNS or IP address
ValidateFDN - Validate FDN. If the name is optional pass in 'true' as the second param, otherwise pass in 'false'. In some cases we allow an optional name, in others the name is manditory. Returns true if the fully distiguished name is valid, else false
ValidateIP - Validate IP address
ValidateIPMsg - Validate IP address
ValidatePassword - Validate password Returns true if the password is valid, else false
ValidatePasswords - Validate passwords Returns true if the passwords are valid and match, else false
ValidatePort - Validate port, is it a valid number and is it already in use. Displays an warning to the user if the port is in use. Returns true if the port is valid, else false
List of Global Variables
Validate credentials
Function parameters
string userName
string password
string ip
integer port
boolean doFeedback
Return value
integer
Validate FDN. If the name is optional pass in 'true' as the second param, otherwise pass in 'false'. In some cases we allow an optional name, in others the name is manditory. Returns true if the fully distiguished name is valid, else false
Function parameters
string name
boolean optional
Return value
boolean
Validate password Returns true if the password is valid, else false
Function parameters
string pw1
Return value
boolean
Validate passwords Returns true if the passwords are valid and match, else false
Function parameters
string pw1
string pw2
Return value
boolean
Configuration of /etc/nsswitch.conf
List of Global Functions
ReadDb - Reads a database entry from nsswitch_conf and returns it as a list
Write - Writes the edited files to the disk
WriteAutofs - Configures the name service switch for autofs according to chosen settings
WriteDb - Writes a database entry as a list to nsswitch_conf
List of Global Variables
Reads a database entry from nsswitch_conf and returns it as a list
Function parameters
string db
Return value
list<string> - eg. ["files", "nis"]
Configures the name service switch for autofs according to chosen settings
Function parameters
boolean start
string source
Return value
boolean - success?
Data for configuration of ntp-client, input and output functions.
List of Global Functions
ActivateRandomPoolServersFunction - Add servers needed for random_pool_servers function into the current configuration.
AutoPackages - Return required packages for auto-installation
DeActivateRandomPoolServersFunction - Removes all servers contained in the random_pool_servers list from the current configuration.
DetectNtpServers - Detect NTP servers present in the local network
Export - Dump the ntp-client settings to a single map (For use by autoinstallation.)
GetAllKnownCountries - Reads and returns all known countries with their country codes
GetCountryNames - Get the mapping between country codea and names ("CZ" -> "Czech Republic")
GetCurrentLanguageCode - Read current language (RC_LANG from sysconfig)
GetNtpServers - Get the list of known NTP servers
GetNtpServersByCountry - Get list of public NTP servers for a country
GetUsedNtpServers - Function returns list of NTP servers used in the configuration.
Import - Get all ntp-client settings from the first parameter (For use by autoinstallation.)
IsRandomServersServiceEnabled - Checks whether all servers listed in the random_pool_servers list are used in the configuration.
ProcessNtpConf - Read and parse /etc.ntp.conf
Read - Read all ntp-client settings
Summary - Create a textual summary and a list of unconfigured cards
TestNtpServer - Test if specified NTP server answers
Write - Write all ntp-client settings
deleteSyncRecord - Delete specified synchronization record
findSyncRecord - Find index of synchronization record
getSyncRecords - Get the list of synchronization-related records
selectSyncRecord - Select synchronization record
storeSyncRecord - Store currently sellected synchronization record
List of Global Variables
ad_controller - Active Directory controller
change_firewall - Should the firewall settings be changed?
firewall_services - ports in firewall to open
modified - Data was modified?
ntp_policy - Netconfig policy: for merging and prioritizing static and DHCP config. FIXME get a public URL https://svn.suse.de/svn/sysconfig/branches/mt/dhcp6-netconfig/netconfig/doc/README
ntp_records - Read all ntp-client settings
random_pool_servers - List of servers defined by the pool.ntp.org to get random ntp servers
required_packages - Required packages
run_chroot - Should the daemon be started in chroot environment?
run_service - Should the daemon be started when system boots?
selected_index - Index of the currently sellected item
selected_record - The currently sellected item
service_name - Service name of the NTP daemon
write_only - Write only, used during autoinstallation. Don't run services and SuSEconfig, it's all done at one place.
Add servers needed for random_pool_servers function into the current configuration.
Return value
void
Return required packages for auto-installation
Return value
map - of packages to be installed and to be removed
Removes all servers contained in the random_pool_servers list from the current configuration.
Return value
void
Detect NTP servers present in the local network
Function parameters
symbol method
Return value
list<string> - a list of found NTP servers
Dump the ntp-client settings to a single map (For use by autoinstallation.)
Return value
map - Dumped settings (later acceptable by Import ())
Reads and returns all known countries with their country codes
Return value
map <string, string> - of known contries
$[ "CL" : "Chile", "FR" : "France", ... ]
Get the mapping between country codea and names ("CZ" -> "Czech Republic")
Return value
map<string, string> - a map the country codes and names mapping
Read current language (RC_LANG from sysconfig)
Return value
string - two-letter language code (cs_CZ.UTF-8 -> CZ)
Get the list of known NTP servers
Return value
map<string, map<string,string> > - a list of known NTP servers
Get list of public NTP servers for a country
Function parameters
string country
boolean terse_output
Return value
list - of servers (usable as combo-box items)
Function returns list of NTP servers used in the configuration.
Return value
list <string> - of servers
Get all ntp-client settings from the first parameter (For use by autoinstallation.)
Function parameters
map settings
Return value
boolean - True on success
Checks whether all servers listed in the random_pool_servers list are used in the configuration.
Return value
boolean - true if enabled
Create a textual summary and a list of unconfigured cards
Return value
string - summary of the current configuration
Test if specified NTP server answers
Function parameters
string server
symbol verbosity
Return value
boolean - true if NTP server answers properly
Delete specified synchronization record
Function parameters
integer index
Return value
boolean - true on success
Find index of synchronization record
Function parameters
string type
string address
Return value
integer - index of the record if found, -1 otherwise
Get the list of synchronization-related records
Return value
list<map<string,any> > - a list of maps with keys type (eg. "server"), address and index.
Select synchronization record
Function parameters
integer index
Return value
boolean - true on success
Netconfig policy: for merging and prioritizing static and DHCP config. FIXME get a public URL https://svn.suse.de/svn/sysconfig/branches/mt/dhcp6-netconfig/netconfig/doc/README
List of servers defined by the pool.ntp.org to get random ntp servers
See also:
http://www.pool.ntp.org/
Control of the automatic scan and repair sequence.
List of Global Functions
CheckGroupRequires - check the dependencies for seleced detect groups
Detect - Start detection loop.
DetectGroupList - get value of OSRCommon::detect_group_list
GroupItems - Build item list with all group items.
Init - This method initializes the YaST OS Repair system. It is started at first and builds the main window, initializes the global osr_map and a lot of other data.
Reset - Reset all.
ResetDetect - Reset detect settings.
ResetDetectGroupList - set OSRCommon::detect_group_list to []
ResetDetectionModules - Reset the temporary changes. e.g.: Umount temporary mounted partitions ...
SetDetectGroupList - set new value for OSRCommon::detect_group_list
SetReboot - Prepare for reboot system
SizeDetectGroupList - return size of OSRCommon::detect_group_list
osr_empty - Empty term.
List of Global Variables
next_detect_method - Allowed back jump in a scan and repair sequence error appear.
check the dependencies for seleced detect groups
Return value
list<string>
Build item list with all group items.
Function parameters
boolean mode
Return value
list<term>
This method initializes the YaST OS Repair system. It is started at first and builds the main window, initializes the global osr_map and a lot of other data.
Return value
boolean - True if the initialization progress succeeded.
Reset the temporary changes. e.g.: Umount temporary mounted partitions ...
Return value
boolean
set new value for OSRCommon::detect_group_list
Function parameters
list<string> gl
Return value
void
Bootloader checks
List of Global Functions
BootloaderPackages - Return all needed packages of a boot loader.
CheckConfig - Check the boot loader configuration.
CheckInitrdModules - Check the specified initrd modules.
CheckLoaderPackages - Check boot loader packages.
CheckSysconfigFiles - Check the main config file for boot loader and kernel initrd
ExistsConf - Check if the boot loader conf file exists.
InstallLoaderPackage - Install all missing package if the user accept.
InstallNewLoader - Install a new boot loader
PackageVersionStrings - Return a list of strings with all required boot loader packages with the current and the required version.
RepairConfig - Repair a damaged boot loader configuration.
RepairInitrdModules - Wirte initrd modules and call mkinitrd
RepairSysconfigFiles - Repairing configuration files.
Reset - Reset module settings.
VersionIsHigherOrEqual - Compares the two specified version numbers. Each version number has to be a string of the form "21.6-34", "34.4.3", ...
repair_grub_config - Repair a damaged grub configuration.
sectOptions2Map - reads specified section and returns values as list [$[option:$[value:..., comment:...]]]
List of Global Variables
boot_device - The boot device e.g.: /dev/hda1
missing_packages - A list of all not installed boot loader packages
needed_config_files - Configuration files needed by every boot loader
root_device - The root device e.g.: /dev/hda2
root_mountpoint - The root mount point.
Return all needed packages of a boot loader.
Function parameters
string bootloader
Return value
list<string>
Check the boot loader configuration.
Function parameters
string loader
string root
string root_dev
string boot_dev
Return value
boolean
Check the specified initrd modules.
Function parameters
string root
Return value
boolean
Check boot loader packages.
Function parameters
string loader
string root
string what
Return value
boolean
Check the main config file for boot loader and kernel initrd
Function parameters
string root
Return value
boolean
Check if the boot loader conf file exists.
Function parameters
string loader
string root
Return value
boolean
Install all missing package if the user accept.
Function parameters
string loader
string root
string install_reason
Return value
symbol
Return a list of strings with all required boot loader packages with the current and the required version.
Function parameters
string bootloader
list<string> packages
Return value
list<string>
Repair a damaged boot loader configuration.
Function parameters
string loader
boolean show_message
Return value
symbol
Compares the two specified version numbers. Each version number has to be a string of the form "21.6-34", "34.4.3", ...
Function parameters
string version_1
string version_2
Return value
boolean - True if the first version number is newer than the second one.
Common functions and variables, used by other OSR modules
List of Global Functions
EmptyMap -
False - Functions that could be used as a default in lookups for functin pointers
GetGroupMap - Get group data.
GlobalProvides - Set the new value of global_provides map
IsSubSet - Checks if the first specified list (of strings) is a subset of the second one. The sequence of entries in the lists is nonrelevant.
ProvideBoolean - Stores the given boolean value with the specified name into the global_provides map in the osr_map.
ProvideList - Stores the given list with the specified name into the global_provides map in the osr_map.
ProvideMap - Stores the given map with the specified name into the global_provides map in the osr_map.
ProvidePath - Stores the given path with the specified name into the global_provides map in the osr_map.
ProvideString - Stores the given string with the specified name into the global_provides map in the osr_map.
RequireBoolean - Returns the required boolean value from the global_provides map in the osr_map.
RequireList - Returns the required list from the global_provides map in the osr_map.
RequireMap - Returns the required map from the global_provides map in the osr_map.
RequirePath - Returns the required path from the global_provides map in the osr_map.
RequireString - Returns the required string from the global_provides map in the osr_map.
Reset - Reset variables moved from OSR.ycp
SetGlobalProvides - Set the new value of global_provides map
List of Global Variables
current_detect_map - The current detection map during detection.
current_direct_name - The name of the current direct repair method.
current_module_name - The name of the current module during detection. e.g.: osr_module_partition
detect_group_list - ["init", "mbr_check", "swap_check", "fs_check", "fstab_check"]
global_entries - $[ "fs_check" : $[ "help" : "Mounting a filesystem is not possible", "text" : "Check filesystem" ], "fstab_check" : $[ "help" : "Mounting a filesystem is not possible", "text" : "Check fstab entries" ], "init" : $[ "help" : "", "mode" : "forall", "text" : "Init repair system" ], "mbr_check" : $[ "help" : "If you have installed a other os after inst. Linux", "text" : "Check master boot record" ], ........ ]
tool_name - The name of the repair and rescue tool.
Functions that could be used as a default in lookups for functin pointers
Return value
boolean - false
Checks if the first specified list (of strings) is a subset of the second one. The sequence of entries in the lists is nonrelevant.
Function parameters
list<string> l1
list<string> l2
Return value
boolean - True if all elements of l1 are contained in l2 or if l1 is empty.
Example 41.
OSRIsSubSet([], ["a", "b"]) -> true; OSRIsSubSet(["a"], ["a", "b"]) -> true; OSRIsSubSet(["c"], ["a", "b"]) -> false; OSRIsSubSet(["a", "b", "c"], ["a", "b"]) -> false;
Stores the given boolean value with the specified name into the global_provides map in the osr_map.
Function parameters
string name
boolean value
Return value
boolean - True.
Stores the given list with the specified name into the global_provides map in the osr_map.
Function parameters
string name
list value
Return value
boolean - True.
Stores the given map with the specified name into the global_provides map in the osr_map.
Function parameters
string name
map value
Return value
boolean - True.
Stores the given path with the specified name into the global_provides map in the osr_map.
Function parameters
string name
path value
Return value
boolean - True.
Stores the given string with the specified name into the global_provides map in the osr_map.
Function parameters
string name
string value
Return value
boolean - True.
Returns the required boolean value from the global_provides map in the osr_map.
Function parameters
string name
Return value
boolean - value The required boolean value, false as default.
Returns the required list from the global_provides map in the osr_map.
Function parameters
string name
Return value
list - The required list, [] as default.
Returns the required map from the global_provides map in the osr_map.
Function parameters
string name
Return value
map - The required map, $[] as default.
Returns the required path from the global_provides map in the osr_map.
Function parameters
string name
Return value
path - value The required path, . as default.
Returns the required string from the global_provides map in the osr_map.
Function parameters
string name
Return value
string - value The required string, "" as default.
Set the new value of global_provides map
Function parameters
map new
Return value
void
The name of the current module during detection. e.g.: osr_module_partition
$[ "fs_check" : $[ "help" : "Mounting a filesystem is not possible", "text" : "Check filesystem" ], "fstab_check" : $[ "help" : "Mounting a filesystem is not possible", "text" : "Check fstab entries" ], "init" : $[ "help" : "", "mode" : "forall", "text" : "Init repair system" ], "mbr_check" : $[ "help" : "If you have installed a other os after inst. Linux", "text" : "Check master boot record" ], ........ ]
Dialog and Execute of direct repair function. Repair Tool Box
List of Global Functions
AddEntries - Add a new entry to the direct_methods map. Used in OSR module at the initial sequence.
EvalDirectMethod - Eval the selected direct repair method.
OptionMenu - Return a automatically generated menu for all direct repair methods.
Reset - Reset the module settings. Don`t reset direct_methods.
List of Global Variables
mounted_root_partition - Mounted root partition.
Add a new entry to the direct_methods map. Used in OSR module at the initial sequence.
Function parameters
list new_entries
string client
Return value
void
Eval the selected direct repair method.
Function parameters
string method
Return value
symbol
Return a automatically generated menu for all direct repair methods.
Return value
term
List of Global Functions
Command - Wrapper to CommandProgress, with the use of current log file
CommandOutput - Executes the given commandline in a bash and writes all execution-information to the standard log file. This function returns all output from the commandline in a result map. Use these functions instead of directly calling the SCR or WFM agents (e.g. SCR::Execute(.target.bash_output, "rpm -q lilo") resp. WFM::(.local.bash_output, "rpm -q -r /mnt lilo")) to be sure to support logging correctly.
CommandProgress - Executes the given commandline in a bash and writes all execution-information to the specified logfile. Use these functions instead of directly calling the SCR or WFM agents (e.g. SCR::Execute(.target.bash, "rpm -q lilo") resp. WFM::(.local.bash, "rpm -q -r /mnt lilo")) to be sure to support logging correctly.
List of Global Variables
Wrapper to CommandProgress, with the use of current log file
Function parameters
path environment
string commandline
Return value
boolean
Executes the given commandline in a bash and writes all execution-information to the standard log file. This function returns all output from the commandline in a result map. Use these functions instead of directly calling the SCR or WFM agents (e.g. SCR::Execute(.target.bash_output, "rpm -q lilo") resp. WFM::(.local.bash_output, "rpm -q -r /mnt lilo")) to be sure to support logging correctly.
Function parameters
path environment
string commandline
Return value
boolean
Executes the given commandline in a bash and writes all execution-information to the specified logfile. Use these functions instead of directly calling the SCR or WFM agents (e.g. SCR::Execute(.target.bash, "rpm -q lilo") resp. WFM::(.local.bash, "rpm -q -r /mnt lilo")) to be sure to support logging correctly.
Function parameters
path environment
string commandline
string progress_file
Return value
boolean - Success
Example 42.
OSRExecute::CommandProgress (.local.bash, "rpm -qi -r /mnt/ lilo", "/tmp/progress_file"); $ cat /tmp/osr.log *** /bin/rpm -qi lilo *** Name : lilo Relocations: (not relocateable) Version : 21.6 Vendor: SuSE GmbH, Nuernberg, Germany [...] SuSE series: a *** exit code: 0 ***
How to use OSRFloppy module: 1. OSRFloppy::Open( with ui support, count of files to read/wirte ); 2. optional: OSRFloppy::NextStep(_(Copy the file .. )); WFM::Execute(.local.bash, "/bin/cp ... "); or OSRFloppy::ReadMap( .. ) or OSRFloppy::SaveMap( .. ) 3. OSRFloppy::Close();
List of Global Functions
Close - Close Floppy Dialog and unmount floppy device. You must call OSRFloppy::Open(.. ) before.
NextStep - Change the text in the floppy dialog and increase the progress bar. If not dialog is opened, write the test to the YaST2 log file (y2log).
Open - Open floppy for IO. Afterwards you must call OSRFloppy::Close().
List of Global Variables
floppy_device - Default floppy device
mount_point - Default mount point
Close Floppy Dialog and unmount floppy device. You must call OSRFloppy::Open(.. ) before.
Return value
boolean
Change the text in the floppy dialog and increase the progress bar. If not dialog is opened, write the test to the YaST2 log file (y2log).
Function parameters
string label
Return value
void
YaST OS Repair. Automatic error detection & repair tool for Linux.
List of Global Functions
Check - Test the filesystem of one partition.
IsNonLinuxFileSystem - checks for filesystem type (Repair module should not touch non-linux partitions - bug #25002)
LoadAllFsModules - Load all needed fileystem and lvm/raid modules.
OSRFsck - Constructor. Fill the list fsck_fsid with the date from module Partition.
PossiblePartitions - Return a list witch contains all partitions names that can be used for a fsck.
Repair - The main repair dialog.
List of Global Variables
fs_kernel_modules - The loaded modules.
fsck_fsid - A list of all possible filesystem id's for fsck...
fsck_type - A list of all possible types for a fsck ...
not_installed_modules - The not loaded filesystem an lvm/raid modules.
checks for filesystem type (Repair module should not touch non-linux partitions - bug #25002)
Function parameters
symbol fs
Return value
boolean
Constructor. Fill the list fsck_fsid with the date from module Partition.
Return value
void
Return a list witch contains all partitions names that can be used for a fsck.
Return value
list<map>
YaST OS Repair. Automatic error detection & repair tool for Linux.
Johannes Buchhold <jbuch@suse.de>
Use:
OSRFstab::LinuxPartitions ("/dev/hda1", "/dev/hda2", .. ]);
OSRFstab::MountablePartitions( ..);
OSRFstab::ValidRootPartitions( ..);
OSRFstab::ReadFstab("/");
OSRFstab::CheckRootEntry ("/dev/hda1",
["/dev/hda2"], ["/dev/hda3", "/dev/hda4" ]);
OSRFstab::Repair();
OSRFstab::Check(["/dev/hda2"], ["/dev/hda3", "/dev/hda4" ]);
OSRFstab::Repair();
List of Global Functions
BootDev -
Check - Check if all entries in the fstab are valid and if all found devices have an entry in the fstab.
LinuxPartitions - Find the list of all valid linux-partitions in the target-map.
MountAll - Mount all partitions specified in the fstab. If no fstab was readed try to find root partition and read fstab. Afterwards mount all partitions.
MountablePartitions - Returns a list of names of all mountable partitions out of the specified list.
OSRFstab - Constructor: initialize data structures with default values
ReadFstab - Read the fstab file.
ReadSuccessfully - /etc/fstab was read
Repair - Repair the fstab. Call sub dialogs.
RootDev -
SelectRoot - ask user to select the root partition
ValidRootPartitions - Returns a list of names of all mountable partitions that contain a file /etc/fstab out of the specified list.
partition_mounted - Check if given partition is already mounted workaround; this should be done via Storage API (bnc#372238)
List of Global Variables
fstabpath - The path
Check if all entries in the fstab are valid and if all found devices have an entry in the fstab.
Function parameters
list<string> tswapable_partition_list
list<string> tchecked_partitions
list<string> tencrypted_partitions
Return value
boolean
Function parameters
string dev_name
list<string> tswapable_partition_list
list<string> tchecked_partitions
Return value
boolean
Find the list of all valid linux-partitions in the target-map.
Function parameters
list checked_partitions
Return value
list<string> - The list of names of valid linux-partitions.
Mount all partitions specified in the fstab. If no fstab was readed try to find root partition and read fstab. Afterwards mount all partitions.
Function parameters
string root
Return value
list<map>
Returns a list of names of all mountable partitions out of the specified list.
Function parameters
list<string> linux_partition_list
string m_point
Return value
list<string> - List of partition names successfully mounted to m_point.
Read the fstab file.
Function parameters
string mount_p
boolean strict
Return value
boolean
ask user to select the root partition
Function parameters
list<map> valid_root_partition_list
Return value
string
Returns a list of names of all mountable partitions that contain a file /etc/fstab out of the specified list.
Function parameters
list<string> mount_possible_list
string mount_p
Return value
list<map> - The list of partition-names that were successfully mounted to /mnt and contain a filesystem table.
Function parameters
map cmp
Return value
map - create failed for mount points $[ 1 : "/hhh" ];
YaST2 OS Repair. Automatic error detection & repair tool for Linux.
List of Global Functions
Add - Writes the specified string to the end of the log file.
GetLogFileName - This function returns the name of the global log file.
GetTmpDir - Returns the path of the global temporary directory, e.g. "/tmp/YaST2-02274".
OSRLogFile - Constructor.
List of Global Variables
Writes the specified string to the end of the log file.
Function parameters
string the_string
Return value
boolean - True if the specified string was successfully written
This function returns the name of the global log file.
Return value
string - The name of the global log file.
Returns the path of the global temporary directory, e.g. "/tmp/YaST2-02274".
Return value
string - The path of the temporary directory.
Special OSR mode
List of Global Functions
IsValid - Get the execution-mode, description: Stage::initial () == true -> Initial boot per CD-Rom or NFS Stage::cont () == true -> Continue installation Stage::initial ()e == false) && (Stage::cont () == false) -> Running Linux-system
List of Global Variables
automatic - Automatic detection and repair, no user-interaction but GUI.
demo - No real error-detection or repair, only demonstration, GUI.
detection - Only detection, no repair, GUI.
provides - Prints the values provided by the detection-modules to the
script - No GUI, no user-interaction, input-values come from a map.
Load and unload kernel modules
List of Global Functions
Load - Load a module if not already loaded by linuxrc and saves the name of the loaded modules in the list loaded_modules.
OSRModuleLoading - The constructor init the startup_loaded_modules list.
Unload - Unload one kernel module.
UnloadAll - Unload all loaded kernel modules.
List of Global Variables
Load a module if not already loaded by linuxrc and saves the name of the loaded modules in the list loaded_modules.
Function parameters
string modulename
string moduleargs
string vendorname
string devicename
boolean ask_before_loading
boolean with_modprobe
Return value
boolean - : `dont user choose *not* to load module `ok module loaded ok `fail module loading failed
Packages check
List of Global Functions
CheckDB - Return false if db files are missing. Save missing files in the list not_found_files.
CheckMinimum - Check if all minimal required packages are installed.
CheckProductVersions - Check if target product is the same as the source (bug #45306)
InstallMissing - Install selected Packages. The packages are damaged or not install. Call CheckMinimum or VerifyPackages before.
OSRPkg - Constructor.
OpenPkg - Open the package database.
RepairDB - Repair or initialise a damaged package damaged. Call CheckDB before.
Reset - Reset the module settings.
VerifyPackages - Verify all specified packages.
List of Global Variables
error_text - Error text.
help_text - Help text to show errors.
install_missing_dialog_data - Dialog description for the install missing or damaged packages.
missing_packages - Not installed base packages or damaged packages.
not_found_files - Missing packages database files.
root_mountpoint - Mount point where the target system is mounted.
Return false if db files are missing. Save missing files in the list not_found_files.
Function parameters
string root
Return value
boolean
Check if all minimal required packages are installed.
Function parameters
string root
Return value
boolean
Check if target product is the same as the source (bug #45306)
Return value
boolean - true if product are the same
Install selected Packages. The packages are damaged or not install. Call CheckMinimum or VerifyPackages before.
Function parameters
boolean use_dialog
Return value
symbol
Repair or initialise a damaged package damaged. Call CheckDB before.
Return value
symbol
Dialog description for the install missing or damaged packages.
Packages check UI
List of Global Functions
EvalUserInput - Eval the user input.
Finish - Finish the dialog.
OSRPkgUI - Constructor- reset module settings.
OpenVerifyDialog - Open the main dialog depending on the values t_expert_mode (expert_mode).
ProtocolDialog - Show the detailed list of packages that failed to be verified, together with rpm -V output. User can review the errors and choose the packages to reinstall.
Reset - Reset all (not static) module settings.
update_missing_packages - update the item list of 'missing_packages' with the ones selected to reinstall by user during verification
List of Global Variables
expert_mode - If expert is activated.
Open the main dialog depending on the values t_expert_mode (expert_mode).
Function parameters
integer size_progress
string headline
boolean t_expert_mode
Return value
boolean
Show the detailed list of packages that failed to be verified, together with rpm -V output. User can review the errors and choose the packages to reinstall.
Function parameters
list selected
Return value
list - packages that are selected for reinstallation
Packages check
List of Global Functions
GreenPackageProblems - Return if a package was not build correctly.
OSRPkgVerify - module constructor: read packages with build problems
Reset -
Verify -
WriteVerifiedPackages - Debug the verified packages informations.
List of Global Variables
initial_verified_packages - Verified packages after a new installation.
max_files - maximum of file entries shown in detailed pkg verification summary (necessary because of potential large memory requirements)
missing - Missing key. For parsing rpm output.
separator - Key seperate packagename with not valid file count.
unsatisfied - Unsatisfied key. For parsing rpm output.
Return if a package was not build correctly.
Function parameters
string pkg_name
map pkg_data
Return value
string
maximum of file entries shown in detailed pkg verification summary (necessary because of potential large memory requirements)
List of Global Functions
ChangeFieldDialog - Dialog to change one field in the fstab.
MultiSelectionBox - A dialog with to messages and a multi selection box in the center.
OpenMainRepairDialog - Open a dialog with the term r_options in the center.
OpenSuggestDialog - Open the base dialog to suggest modify.
RadioButtonGroup - This method opens a popup window that offers the specified items to the user. The items can be selected in a RadioButtonGroup. A default item has to be specified. It is marked as selected from start. If the default is "", the first item in the list is marked as selected. It provides an OK button and a Cancel button. If OK is pressed the selected item is returned as a string, if cancel is pressed, the specified default is returned.
RadioButtonGroupText - This method opens a popup window that offers the specified items to the user. The items can be selected in a RadioButtonGroup. A default item has to be specified. It is marked as selected from start. If the default is "", the first item in the list is marked as selected. It provides an OK button and a Cancel button. If OK is pressed the selected item is returned as a string, if cancel is pressed, the specified cancel-value is returned.
Repair - This method opens a new popup window that displays the error message. It provides a repair button, a skip button and a help button.
build_label_description - Build (return) a description text for a label in the help_text field.
List of Global Variables
Dialog to change one field in the fstab.
Function parameters
string org_value
string description
Return value
string
A dialog with to messages and a multi selection box in the center.
Function parameters
string headline
string message_top
string message_bottom
string help_text
string box_headline
list<list> item_list
list<list> special_buttons_list
Return value
list<string>
Open a dialog with the term r_options in the center.
Function parameters
string headline
string error_text
term r_options
Return value
boolean
Open the base dialog to suggest modify.
Function parameters
string headline
string message
string help_text
term body
integer hweight
Return value
boolean
This method opens a popup window that offers the specified items to the user. The items can be selected in a RadioButtonGroup. A default item has to be specified. It is marked as selected from start. If the default is "", the first item in the list is marked as selected. It provides an OK button and a Cancel button. If OK is pressed the selected item is returned as a string, if cancel is pressed, the specified default is returned.
Function parameters
string headline
string message
list<string> item_list
string default_val
boolean strict
Return value
string - The selected item, the default if cancel is pressed.
Example 44.
string result = OSRPopup::RadioButtonGroup("Test", "This is just a test.", ["a", "b", "c"], "b", true);This method opens a popup window that offers the specified items to the user. The items can be selected in a RadioButtonGroup. A default item has to be specified. It is marked as selected from start. If the default is "", the first item in the list is marked as selected. It provides an OK button and a Cancel button. If OK is pressed the selected item is returned as a string, if cancel is pressed, the specified cancel-value is returned.
Function parameters
string headline
string message
list<list> item_list
string default_val
string cancel
boolean strict
Return value
string - The selected item, the default if cancel is pressed.
Example 45.
string result = OSRPopup::RadioButtonGroupText("Test",
"This is a test.",
[["a" , "First choice"], ["b", "Second choice"]],
"b",
"cancel",
true); This method opens a new popup window that displays the error message. It provides a repair button, a skip button and a help button.
Function parameters
string headline
string message
string help_text
Return value
boolean - True if the repair button was pressed by the user.
Example 46.
boolean repair_question = OSRPopup::Repair( "Error detected", error_message, help_text);
List of Global Functions
Create - Create a new Progress Widget
DeleteFile - Only for DownloadProgress !! Delete the progress file.
Fill - Fills the global-progress-bar with 100%.
Increase - This method is called after one detection function is successfully executed. It shows the continuous progress to the user with the global progress bar.
Reset - Reset module settings.
SetFile - Specifies a new filename for the DownloadProgress widget.
SetLabel - Set the label of a progress-bar to the specified one.
SetLength - Set the length of a progress bar.
SetSteps - Set the Steps of a normal ProgressBar Widget.
List of Global Variables
length - The length of a ProgressBar
Create a new Progress Widget
Function parameters
symbol id
string label
integer steps
boolean downloadprogress
Return value
term
Only for DownloadProgress !! Delete the progress file.
Function parameters
string file
Return value
boolean
Fills the global-progress-bar with 100%.
Function parameters
symbol id
Return value
boolean - True if the progress value was increased successfully.
This method is called after one detection function is successfully executed. It shows the continuous progress to the user with the global progress bar.
Function parameters
symbol id
Return value
boolean - True if the progress value was increased successfully.
Specifies a new filename for the DownloadProgress widget.
Function parameters
symbol id
string new_file
Return value
boolean
Set the label of a progress-bar to the specified one.
Function parameters
symbol id
string new_label
Return value
boolean - boolen True if the label was set correctly.
Set the length of a progress bar.
Function parameters
symbol id
integer new_length
Return value
boolean
YaST OS Repair. Automatic error detection & repair tool for Linux.
List of Global Functions
MainPtblRepairDialog - Main Dialog for repairing deleted/not valid partition tables.
RestoreWithGpart - Restoring a partition tables with gpart.
WritePartitionsInfo2Floppy - Write partition info of given disk to floppy (needs mounted floppy)
List of Global Variables
Main Dialog for repairing deleted/not valid partition tables.
Function parameters
string t_target
Return value
symbol
UI functions
List of Global Functions
InitDialog - Init Dialog
OSRRepairUI - Constructor
OsrMainDialog - Main dialog. Manage the sequence of the different dialogs.
Reset - Reset api modules for the next scan and repair sequence.
List of Global Variables
List of Global Functions
DetectError - This function is a wrapper for the definition of the correct status.
DetectError2Name - This function is a wrapper for the definition of the correct status.
DetectOK - This function is a wrapper for the definition of the correct status.
DetectOK2Name - This function is a wrapper for the definition of the correct status.
DetectOmit - This function is a wrapper for the definition of the correct status.
DetectProblem - This function is a wrapper for the definition of the correct status.
DetectProblem2Name - This function is a wrapper for the definition of the correct status.
ErrorSeverityBlocking - Sets the level of severity of the detected error. API function.
ErrorSeverityModuleBlocking - Sets the level of severity of the detected error. API function.
Exit - This function is a wrapper for the definition of the correct status.
IsErrorSeverityBlocking - Returns the level of severity of the detected error. This severity involves the rescue system to stop the further execution if the detected error is not repaired. E.g. if the rescue system does not detect any harddisks it makes no sense to go on checking for any errors. The rescue system will halt.
IsErrorSeverityModuleBlocking - Returns the level of severity of the detected error. This severity means that the detected error involves to jump to the next detection module without executing any further method of the current module. E.g. if the rescue system detects that the LILO package is not installed on the system and this error could not be repaired, it makes no sense to check the LILO configuration file for any errors. So the rescue system jumps to the next module in the module sequence.
IsStatusDetectError - This function is a wrapper for the definition of the correct status.
IsStatusDetectOK - This function is a wrapper for the definition of the correct status.
IsStatusDetectOmit - This function is a wrapper for the definition of the correct status.
IsStatusDetectProblem - This function is a wrapper for the definition of the correct status.
IsStatusExit - This function is a wrapper for the definition of the correct status.
IsStatusRepairError - This function is a wrapper for the definition of the correct status.
IsStatusRepairOK - This function is a wrapper for the definition of the correct status.
IsStatusRepairOmit - This function is a wrapper for the definition of the correct status.
NotFound2Name - This function is a wrapper for the definition of the correct status.
RepairError - This function is a wrapper for the definition of the correct status.
RepairError2Name - This function is a wrapper for the definition of the correct status.
RepairOK - This function is a wrapper for the definition of the correct status.
RepairOK2Name - This function is a wrapper for the definition of the correct status.
RepairOmit - This function is a wrapper for the definition of the correct status.
RepairOmit2Name - This function is a wrapper for the definition of the correct status.
List of Global Variables
This function is a wrapper for the definition of the correct status.
Return value
void
This function is a wrapper for the definition of the correct status.
Function parameters
string tnext_detect_method_name
Return value
void
This function is a wrapper for the definition of the correct status.
Return value
void
This function is a wrapper for the definition of the correct status.
Function parameters
string tnext_detect_method_name
Return value
void
This function is a wrapper for the definition of the correct status.
Return value
void
This function is a wrapper for the definition of the correct status.
Return value
void
This function is a wrapper for the definition of the correct status.
Function parameters
string tnext_detect_method_name
Return value
void
Sets the level of severity of the detected error. API function.
Return value
void - The severity of the detected error.
Sets the level of severity of the detected error. API function.
Return value
void - The severity of the detected error.
Returns the level of severity of the detected error. This severity involves the rescue system to stop the further execution if the detected error is not repaired. E.g. if the rescue system does not detect any harddisks it makes no sense to go on checking for any errors. The rescue system will halt.
Return value
boolean - The severity of the detected error.
Returns the level of severity of the detected error. This severity means that the detected error involves to jump to the next detection module without executing any further method of the current module. E.g. if the rescue system detects that the LILO package is not installed on the system and this error could not be repaired, it makes no sense to check the LILO configuration file for any errors. So the rescue system jumps to the next module in the module sequence.
Return value
boolean - The severity of the detected error.
This function is a wrapper for the definition of the correct status.
Return value
boolean - Is error?
This function is a wrapper for the definition of the correct status.
Return value
boolean - Is OK?
This function is a wrapper for the definition of the correct status.
Return value
boolean - Omitted?
This function is a wrapper for the definition of the correct status.
Return value
boolean - Is detect problem?
This function is a wrapper for the definition of the correct status.
Return value
boolean
This function is a wrapper for the definition of the correct status.
Return value
boolean - Repair failed?
This function is a wrapper for the definition of the correct status.
Return value
boolean - Repaired?
This function is a wrapper for the definition of the correct status.
Return value
boolean - Repait omitted?
This function is a wrapper for the definition of the correct status.
Function parameters
string tnext_detect_method_name
Return value
void
This function is a wrapper for the definition of the correct status.
Return value
void
This function is a wrapper for the definition of the correct status.
Function parameters
string tnext_detect_method_name
Return value
void
This function is a wrapper for the definition of the correct status.
Return value
void
This function is a wrapper for the definition of the correct status.
Function parameters
string tnext_detect_method_name
Return value
void
This function is a wrapper for the definition of the correct status.
Return value
void
Johannes Buchhold <jbuch@suse.de>, 2002
Create a unified-looking RichText description of the not configured/configured devices.
This is used in <module_name>_summary.ycp modules.
List of Global Functions
DetectError - Changes the summary of the specified module in the RichText widget. Shows that the rescue system has detected an error. Red font is used for the headline.
DetectOK - Changes the summary of the specified module in the RichText widget. Shows that the rescue system has found no error. Blue font is used for the headline.
DetectOmit - Changes the summary of the specified module in the RichText widget. Shows that the rescue system has found no error. Blue font is used for the headline.
DetectProblem - Changes the summary of the specified module in the RichText widget. Shows that the rescue system has detected a potential problem. Red font is used for the headline.
RepairError - Changes the summary of the specified module in the RichText widget. Shows that an error occurred during the repair-process. ??? font is used for the headline.
RepairOK - Changes the summary of the specified module in the RichText widget. Shows that the rescue system repaired the detected error. ??? font is used for the headline.
RepairOmit - Changes the summary of the specified module in the RichText widget. Shows that the repair process was omitted by the user.
Update - Updates the contents of the RichText widget.
List of Global Variables
Changes the summary of the specified module in the RichText widget. Shows that the rescue system has detected an error. Red font is used for the headline.
Function parameters
string header
string description
Return value
boolean - True if the RichText widget was updated successfully.
Changes the summary of the specified module in the RichText widget. Shows that the rescue system has found no error. Blue font is used for the headline.
Function parameters
string header
string description
Return value
boolean - True if the RichText widget was updated successfully.
Changes the summary of the specified module in the RichText widget. Shows that the rescue system has found no error. Blue font is used for the headline.
Function parameters
string header
string description
Return value
boolean - True if the RichText widget was updated successfully.
Changes the summary of the specified module in the RichText widget. Shows that the rescue system has detected a potential problem. Red font is used for the headline.
Function parameters
string header
string description
Return value
boolean - True if the RichText widget was updated successfully.
Changes the summary of the specified module in the RichText widget. Shows that an error occurred during the repair-process. ??? font is used for the headline.
Function parameters
string header
string description
Return value
boolean - True if the RichText widget was updated successfully.
Changes the summary of the specified module in the RichText widget. Shows that the rescue system repaired the detected error. ??? font is used for the headline.
Function parameters
string header
string description
Return value
boolean - True if the RichText widget was updated successfully.
Changes the summary of the specified module in the RichText widget. Shows that the repair process was omitted by the user.
Function parameters
string header
string description
Return value
boolean - True if the RichText widget was updated successfully.
YaST OS Repair. Automatic error detection & repair tool for Linux.
List of Global Functions
Partitions - Get all valid swap-partitions.
Repair - Create swap area on a swap partition.
ValidPartitions - Returns a list of names (e.g. ["/dev/hda1", "/dev/hdb3"]) of all partitions that can be mounted to the system as swap out of the specified list.
List of Global Variables
Get all valid swap-partitions.
Return value
list<string> - The list of valid swap-partitions.
Create swap area on a swap partition.
Function parameters
string target
Return value
symbol
Returns a list of names (e.g. ["/dev/hda1", "/dev/hdb3"]) of all partitions that can be mounted to the system as swap out of the specified list.
Function parameters
list<string> partition_list
Return value
list<string> - The list of partition names that were successfully added to the system as swap partitions.
List of Global Functions
ChangeRoot - Change the root environment.
SetTargetRoot - Change root to target root mount point.
List of Global Variables
Change the root environment.
Function parameters
string new_root
Return value
boolean
List of Global Functions
FromXML - DeSerialises this data structure from XML.
GetName -
Load - Load the Metapackage from the URL supplied for further processing. Converts from original form into a simple two lists, one of repositories, other of software. Uses the Product.ycp to obtain the correct version for our product. Uses the Language.ycp to obtain correct strings for our language.
SetNonRequiredRepository - Ensures that the repository with the specified URL is NOT selected for addition.
SetNonRequiredSoftware - Ensures the software with the specified name is NOT selected for installation or removal.
SetRemainSubscribed - Specify whether the user should remain subscribed to the repositories after installation of this software is complete.
SetRequiredRepositories - Ensures that the repositories with specified URLs are selected for addition, and all others are not.
SetRequiredRepository - Ensures that the repository with the specified URL is selected for addition.
SetRequiredSoftware - Ensures the software with the specified name is selected for installation or removal.
SetRequiredSoftwares - Ensures that the repositories with specified URLs are selected for addition, and all others are not. Invalid pluralisation due to lack of proper overloading :(
ToXML - Serialises this data structure to XML.
List of Global Variables
DeSerialises this data structure from XML.
Function parameters
string filename
Return value
void
Return value
string - the description for this software bundle. This will be in the user's current language if there was a localised description available.
Return value
list<string> - a list of the names of the software currently selected for removal.
Return value
list<string> - a list of the URLs of the repositories currently NOT selected for addition.
Return value
list<string> - a list of the names of the software currently NOT selected for installation.
Return value
boolean - the current setting of whether the user should remain subscribed to repositories after installation.
Function parameters
string url
Return value
string - the description of the repository with the specified name. This will be in the user's current language if there was a localised description available.
Function parameters
string url
Return value
string - the name of the repository with the specified name.
Function parameters
string url
Return value
string - the summary of the repository with the specified name. This will be in the user's current language if there was a localised summary available.
Return value
list<string> - a list of the names of the software currently selected for removal.
Return value
list<string> - a list of the URLs of the repositories currently selected for addition.
Return value
list<string> - a list of the names of the software currently selected for installation.
Function parameters
string name
Return value
string - the description for the software with specified name. This will be in the user's current language if there was a localised description available.
Function parameters
string name
Return value
string - the summary for the software with specified name. This will be in the user's current language if there was a localised summary available.
Return value
string - the summary for this software bundle. This will be in the user's current language if there was a localised summary available.
Return value
boolean - Whether we have any recommended repositories or packages If not we will have to show advanced view.
Return value
boolean - Whether we have anything to do Determine whether we have a proper metapackage, useful as we can't throw exceptions.
Return value
boolean - Whether we have a bundle description for the whole bundle Build service isn't currently generating one for YMPs for individual packages.
Return value
boolean - Find out whether we have any software that needs to be removed for this installation. Useful to find out whether to display this wizard step.
Return value
boolean - Find out whether we have any repositories that need to be added for this installation. Useful to find out whether to display this wizard step.
Return value
boolean - Find out whether we have any software that needs to be installed for this installation. Useful to find out whether to display this wizard step.
Load the Metapackage from the URL supplied for further processing. Converts from original form into a simple two lists, one of repositories, other of software. Uses the Product.ycp to obtain the correct version for our product. Uses the Language.ycp to obtain correct strings for our language.
Function parameters
string url
Return value
void
Ensures that the repository with the specified URL is NOT selected for addition.
Function parameters
string url
Return value
void
Ensures the software with the specified name is NOT selected for installation or removal.
Function parameters
string name
Return value
void
Specify whether the user should remain subscribed to the repositories after installation of this software is complete.
Function parameters
boolean value
Return value
void
Ensures that the repositories with specified URLs are selected for addition, and all others are not.
Function parameters
list<string> urls
Return value
void
Ensures that the repository with the specified URL is selected for addition.
Function parameters
string url
Return value
void
Ensures the software with the specified name is selected for installation or removal.
Function parameters
string name
Return value
void
Ensures that the repositories with specified URLs are selected for addition, and all others are not. Invalid pluralisation due to lack of proper overloading :(
Function parameters
list<string> names
Return value
void
Module for parsing One Click Install Standard http://en.opensuse.org/Standards/One_Click_Install
List of Global Functions
GetRepositoriesFromXML - Converts XML file to a list of maps with all repositories described in the XML content.
List of Global Variables
Converts XML file to a list of maps with all repositories described in the XML content.
Function parameters
string filename
Return value
list <map <string, any> > - <map, <string, any> >
$[
"distversion" : "openSUSE Factory",
"url" : "full url of the repository (http://.../)",
"format" : "yast",
"recommended" : true,
"description" : "repository description",
"localized_description" : $[
"en_GB" : "repository description (localized to en_GB)",
...
],
"summary" : "repository summary",
"localized_summary" : $[
"en_GB" : "repository summary (localized to en_GB)",
...
],
"name" : "repository name",
"localized_name" : $[
"en_GB" : "repository name (localized to en_GB)",
...
],
]List of Global Functions
AddRepositories - * Subscribe to all the specified repositories * return true if all catalogues were added successfully, false otherwise.
DeDupe - * Check whether this repository is already subscribed
InstallPackages - * Install all the specified packages * return true if all installations were successful, false otherwise
InstallPatterns - * Install all the specified patterns * return true if all installations were successful, false otherwise
RemovePackages - * Remove all the specified packages * return true if all installations were successful, false otherwise
List of Global Variables
* Subscribe to all the specified repositories * return true if all catalogues were added successfully, false otherwise.
Function parameters
list<string> repositories
Return value
boolean
* Check whether this repository is already subscribed
Function parameters
list<string> url_list
Return value
list<string>
* Install all the specified packages * return true if all installations were successful, false otherwise
Function parameters
list<string> packages
Return value
boolean
* Install all the specified patterns * return true if all installations were successful, false otherwise
Function parameters
list<string> patterns
Return value
boolean
List of Global Variables
DeSerialises this data structure from XML.
Function parameters
string filename
Return value
void
Return value
string - the string representation of the failure stage of the install process.
Data used for Online Update
List of Global Functions
List of Global Variables
cd_directory - Default Patch CD source directory
cd_update - flag: do we do an update from CD?
cd_url - Default URL for Patch CD source
simple_mode - If simple Package selector should be opened
Cornelius Schumacher <cschum@suse.de>
Purpose: provides the Callbacks for the online update
List of Global Functions
DonePackage - callback for 'package installed' action
DoneProvide - callback for 'package provided' action
FinishLine - Callback for finishing an action in the log
PatchProgressCallback - Callback for patch (resp. delta rpm) progress widget.
ProblemDeltaApply - callback for problem during aplying delta
ProblemDeltaDownload - callback for problem during downloading delta
ProblemPatchDownload - callback for problem during aplying delta
ProgressDeltaApply - progress of applying delta (cannot be aborted)
ProgressDeltaDownload - callback for delta download progress
ProgressLog - add a text to the installation progress log
ProgressPatchDownload - callback for path download progress
RefreshSources - Refresh sources given by argument
RegisterOnlineUpdateCallbacks - Constructor
StartDeltaDownload - callback for start of delta download
StartPackage - Callback for starting installation of a package.
StartPatchDownload - callback for start of downloading patch
StartProvide - Callback for starting download of a package.
List of Global Variables
callback for 'package installed' action
Function parameters
integer error
string reason
Return value
string
callback for 'package provided' action
Function parameters
integer error
string reason
string name
Return value
string
Callback for finishing an action in the log
Function parameters
boolean line
Return value
boolean
Callback for patch (resp. delta rpm) progress widget.
Function parameters
integer num
Return value
boolean
callback for problem during aplying delta
Function parameters
string description
Return value
void
callback for problem during downloading delta
Function parameters
string description
Return value
void
callback for problem during aplying delta
Function parameters
string description
Return value
void
progress of applying delta (cannot be aborted)
Function parameters
integer num
Return value
void
callback for delta download progress
Function parameters
integer num
Return value
boolean - abort the download?
add a text to the installation progress log
Function parameters
string text
Return value
void
callback for path download progress
Function parameters
integer num
Return value
boolean - abort the download?
Refresh sources given by argument
Function parameters
list<map> sources
Return value
void
callback for start of delta download
Function parameters
string name
integer download_size
Return value
void
Callback for starting installation of a package.
Function parameters
string name
string summary
integer installsize
boolean is_delete
Return value
void
callback for start of downloading patch
Function parameters
string name
integer download_size
Return value
void
Registration related stuff
List of Global Functions
Export - AutoYaST interface function: Export()
List of Global Variables
YOU dialogs
Packages manipulation
List of Global Functions
DoInstall - Install list of packages
DoInstallAndRemove - Install and Remove list of packages in one go
DoRemove - Remove list of packages
List of Global Variables
Install list of packages
Function parameters
list<string> packages
Return value
boolean - True on success
Install and Remove list of packages in one go
Function parameters
list<string> toinstall
list<string> toremove
Return value
boolean - True on success
Packages manipulation (autoinstallation)
List of Global Functions
GetModified - Functions which returns if the settings were modified
PackageAvailable - Is a package available? Checks only package name, not list of provides.
PackageInstalled - Is a package installed? Checks only the package name in contrast to Installed() function.
SetModified - Function sets internal variable, which indicates, that any settings were modified, to "true"
List of Global Variables
Functions which returns if the settings were modified
Return value
boolean - settings were modified
Is a package available? Checks only package name, not list of provides.
Function parameters
string package
Return value
boolean - true if yes
Is a package installed? Checks only the package name in contrast to Installed() function.
Function parameters
string package
Return value
boolean - true if yes
Gabriele Strattner <gs@suse.de>
Klaus Kaempf <kkaempf@suse.de>
Arvin Schnell <arvin@suse.de>
Purpose: provides the default Callbacks for Pkg::
List of Global Functions
DonePackage - After package install.
DoneScanDb - Callback for finish RPM DB scan event
EnableAsterixPackage - Enable or disable StartPackage, ProgressPackage and DonePackage callbacks, but only the progress bar and not the final error message. Returns old value.
ErrorScanDb - Callback for error handling during RPM DB scan
InitPackageCallbacks - Register package manager callbacks
PackageCallbacks - constructor
ProcessDone - Hander for ProcessDone callback - the process has been finished
ProcessNextStage - Hander for ProcessNextStage callback - the current stage has been finished
ProcessProgress - Hander for ProcessProgress callback - report total progress
ProcessStart - Hanler for ProcessStart callback - handle start of a package manager process
ProgressPackage - During package install.
ProgressScanDb - Callback for RPM DB scan progress
SetMediaCallbacks - Register callbacks for media change
SourceChange - dummy repository change callback, see SlideShowCallbacks for the real one
StartPackage - At start of package install.
StartScanDb - Callback for start RPM DB scan event
List of Global Variables
After package install.
Function parameters
integer error
string reason
Return value
string
Callback for finish RPM DB scan event
Function parameters
integer error
string description
Return value
void
Enable or disable StartPackage, ProgressPackage and DonePackage callbacks, but only the progress bar and not the final error message. Returns old value.
Function parameters
boolean f
Return value
boolean
Callback for error handling during RPM DB scan
Function parameters
integer error
string description
Return value
string
Hander for ProcessDone callback - the process has been finished
Return value
void
Hander for ProcessNextStage callback - the current stage has been finished
Return value
void
Hander for ProcessProgress callback - report total progress
Function parameters
integer percent
Return value
boolean
Hanler for ProcessStart callback - handle start of a package manager process
Function parameters
string task
list<string> stages
string help
Return value
void
During package install.
Function parameters
integer percent
Return value
boolean
Callback for RPM DB scan progress
Function parameters
integer value
Return value
boolean
dummy repository change callback, see SlideShowCallbacks for the real one
Function parameters
integer source
integer medianr
Return value
void
At start of package install.
Function parameters
string name
string summary
integer installsize
boolean is_delete
Return value
void
Initialize packager callbacks
List of Global Functions
InitPackageCallbacks - Register package manager callbacks
List of Global Variables
List of Global Functions
CommitPackages - commitPackages marked for deletion or installation Return: [ int successful, list failed, list remaining, list srcremaining ]
List of Global Variables
Packages manipulation (system)
List of Global Functions
Check - Tries to acquire the packager (zypp) lock. Reports an error if another process has the lock already. Will only report once even if called multiple times.
Connect - Tries to acquire the packager (zypp) lock. Reports an error if another process has the lock already. Will only report once even if called multiple times.
List of Global Variables
Tries to acquire the packager (zypp) lock. Reports an error if another process has the lock already. Will only report once even if called multiple times.
Return value
boolean - true if we can continue
List of Global Functions
InitPkgData - Initialize internal pacakge data, such as remaining package sizes and times. This may not be called before the pkginfo server is up and running, so this cannot be reliably done from the constructor in all cases.
SetCurrentCdNo - Set the current repository and CD number. Must be called for each CD change. src_no: 1...n cd_no: 1...n
SetMediaType - set media type "CD" or "DVD"
SlideDisplayDone - package start display update - this is called at the end of a new package
SlideDisplayStart - package start display update - this is called at the beginning of a new package
SlideProvideStart - Package providal start
StripPath - Get package file name from path
StripReleaseNo - Get version info for a package (without build no.)
UpdateAllCdProgress - Update progress widgets for all CDs. Uses global statistics variables.
UpdateCurrentCdProgress - Update progress widgets for the current CD: Label and ProgressBar. Use global statistics variables for that.
UpdateCurrentPackageProgress - Progress display update This is called via the packager's progress callbacks.
List of Global Variables
Initialize internal pacakge data, such as remaining package sizes and times. This may not be called before the pkginfo server is up and running, so this cannot be reliably done from the constructor in all cases.
Function parameters
boolean force
Return value
void
Set the current repository and CD number. Must be called for each CD change. src_no: 1...n cd_no: 1...n
Function parameters
integer src_no
integer cd_no
Return value
void
set media type "CD" or "DVD"
Function parameters
string new_media_type
Return value
void
package start display update - this is called at the end of a new package
Function parameters
string pkg_name
integer pkg_size
boolean deleting
Return value
void
package start display update - this is called at the beginning of a new package
Function parameters
string pkg_name
string pkg_summary
integer pkg_size
boolean deleting
Return value
void
Package providal start
Function parameters
string pkg_name
integer sz
boolean remote
Return value
void
Get package file name from path
Function parameters
string pkg_name
Return value
string - package file name
Get version info for a package (without build no.)
Function parameters
string pkg_name
Return value
string - version string
Update progress widgets for all CDs. Uses global statistics variables.
Function parameters
boolean silent_check
Return value
void
Update progress widgets for the current CD: Label and ProgressBar. Use global statistics variables for that.
Function parameters
boolean silent_check
Return value
void
Packages manipulation (system)
List of Global Functions
Available - Is a package available?
CheckAndInstallPackages - Check if packages are installed
CheckAndInstallPackagesInteractive - Check if packages are installed
EnsureSourceInit - Ensure that Pkg:: calls working with the installation sources work
EnsureTargetInit - Ensure that Pkg:: calls work. This may become superfluous.
Installed - Is a package provided in the system? Is there any installed package providing 'package'?
PackageAvailable - Is a package available? Checks only package name, not list of provides.
PackageInstalled - Is a package installed? Checks only the package name in contrast to Installed() function.
List of Global Variables
Is a package available?
Function parameters
string package
Return value
boolean - true if yes (nil = no package source available)
Check if packages are installed
Function parameters
list<string> packages
Return value
boolean - true if installation succeeded or packages were installed, false otherwise
Check if packages are installed
Function parameters
list<string> packages
Return value
boolean - true if installation succeeded, packages were installed before or user decided to continue, false otherwise
Ensure that Pkg:: calls working with the installation sources work
Return value
void
Ensure that Pkg:: calls work. This may become superfluous.
Return value
void
Is a package provided in the system? Is there any installed package providing 'package'?
Function parameters
string package
Return value
boolean - true if yes
Is a package available? Checks only package name, not list of provides.
Function parameters
string package
Return value
boolean - true if yes (nil = no package source available)
List of Global Functions
CheckContentFile - Check whether content file in the specified repository is the same as the one in the ramdisk
CheckDiskSize - Check if selected software fits on the partitions
CheckOldAddOns - Checks which products have been selected for removal and modifies the warning messages accordingly.
ComputeSystemPackageList - Build and return list of packages which depends on the the current target system and the preselected packages (architecture, X11....)
CountSizeToBeDownloaded - Count the total size of packages to be installed
CountSizeToBeInstalled - Count the total size of packages to be installed
GetBaseSourceID - Returns ID of the base product repository.
InfoAboutSubOptimalDistribution - Return information about suboptimal distribution if relevant
Initialize - Initialize the repositories
InitializeAddOnProducts - Initialize add-on products provided by the repository
InitializeCatalogs - Initialize the repositories with popup feedback Use Packages::Initialize (true) instead
ListSelected - List selected resolvables of specified kind
Proposal - Make a proposal for package selection
Reset - Reset package selection, but keep objects of specified type
SelectProduct - Select the base product on the media for installation
Summary - Print the installatino proposal summary
SummaryOutput - Return the summary output lines
addAdditionalPackage - Add a package to list to be selected before proposal Can be called only before the installation proposal, later doesn't have any effect. OBSOLETE! Please, use PackagesProposal::AddResolvables() instead.
List of Global Variables
Check whether content file in the specified repository is the same as the one in the ramdisk
Function parameters
integer source
Return value
boolean - true if content files match
Check if selected software fits on the partitions
Function parameters
boolean init
Return value
boolean - true if selected software fits, false otherwise
Checks which products have been selected for removal and modifies the warning messages accordingly.
Function parameters
map & ret
Return value
void
Build and return list of packages which depends on the the current target system and the preselected packages (architecture, X11....)
Return value
list<string> - packages
Count the total size of packages to be installed
Return value
integer - size of packages to be installed (in bytes)
Count the total size of packages to be installed
Return value
string - formatted size of packages to be installed
Returns ID of the base product repository.
Return value
integer - base source ID
Return information about suboptimal distribution if relevant
Return value
string - the information string or empty string
Initialize the repositories
Function parameters
boolean show_popup
Return value
void
Initialize add-on products provided by the repository
Return value
void
Initialize the repositories with popup feedback Use Packages::Initialize (true) instead
Return value
void
List selected resolvables of specified kind
Function parameters
symbol what
string format
Return value
list<string> - a list of selected resolvables
Make a proposal for package selection
Function parameters
boolean force_reset
boolean reinit
boolean simple
Return value
map - for the API proposal
Reset package selection, but keep objects of specified type
Function parameters
list<symbol> keep
Return value
void
Select the base product on the media for installation
Return value
boolean - true on success
Print the installatino proposal summary
Function parameters
list<symbol> flags
boolean use_cache
Return value
map
Return the summary output lines
Function parameters
list<symbol> flags
Return value
list<string> - a list of the output lines
API for selecting or de-selecting packages for installation
List of Global Functions
AddResolvables - Adds list of resolvables to pool that is then used by software proposal to propose a selection of resolvables to install.
GetAllResolvables - Returns list of selected resolvables of a given type
GetAllResolvablesForAllTypes - Returns all selected resolvables for all supported types
GetResolvables - Returns all resolvables selected for installation.
GetSupportedResolvables - Returns list of resolvables currently supported by this module.
IsUniqueID - Return whether a unique ID is already in use.
RemoveResolvables - Removes list of packages from pool that is then used by software proposal to propose a selection of resolvables to install.
ResetAll - Resets all resolvables to install. Use carefully.
SetResolvables - Replaces the current resolvables with new ones. Similar to AddResolvables() but it replaces the list of resolvables instead of adding them to the pool. It always replaces only the part that is identified by the unique_ID.
List of Global Variables
Adds list of resolvables to pool that is then used by software proposal to propose a selection of resolvables to install.
Function parameters
string unique_ID
symbol type
list <string> resolvables
Return value
boolean - whether successful
Example 48.
AddResolvables ("y2_kdump", `package, ["yast2-kdump", "kdump"]) -> true
// `not_supported is definitely not a supported resolvable
AddResolvables ("test", `not_supported, ["bash"]) -> false
See also:
supported_resolvables
RemoveResolvables()
Returns list of selected resolvables of a given type
Function parameters
symbol type
Return value
list <string> - list of resolvables
Example 49.
GetAllResolvables (`package) -> ["list", "of", "packages"] GetAllResolvables (`pattern) -> ["list", "of", "patterns"] // not a supported resolvable type GetAllResolvables (`unknown) -> nil
See also:
supported_resolvables
Returns all selected resolvables for all supported types
Return value
map <symbol, list <string> > - map of resolvables
$[ `resolvable_type : [ "list", "of", "resolvables" ], `another_type : [ "list", "of", "resolvables" ], ]
Example 50.
// No resolvables selected GetAllResolvablesForAllTypes() -> $[] // Only patterns selected GetAllResolvablesForAllTypes() -> $[`pattern : ["some", "patterns"]] // Also packages selected GetAllResolvablesForAllTypes() -> $[ `pattern : ["some", "patterns"], `package : ["some", "packages"], ]
Returns all resolvables selected for installation.
Function parameters
string unique_ID
symbol type
Return value
list <string> - of resolvables
Returns list of resolvables currently supported by this module.
Return value
list <symbol> - of resolvables
Return whether a unique ID is already in use.
Function parameters
string unique_ID
Return value
boolean - whether the ID is not in use yet
Removes list of packages from pool that is then used by software proposal to propose a selection of resolvables to install.
Function parameters
string unique_ID
symbol type
list <string> resolvables
Return value
boolean - whether successful
See also:
supported_resolvables
AddResolvables()
Replaces the current resolvables with new ones. Similar to AddResolvables() but it replaces the list of resolvables instead of adding them to the pool. It always replaces only the part that is identified by the unique_ID.
Function parameters
string unique_ID
symbol type
list <string> resolvables
Return value
boolean - whether successful
Gabriele Strattner (gs@suse.de)
Ladislav SlezĂĄk <lslezak@novell.com>
Purpose: Provides common dialogs related to
the package management.
List of Global Functions
ConfirmLicenses - Display unconfirmed licenses of the selected packages.
RunPackageSelector - Start the detailed package selection.
RunPatternSelector - Start the pattern selection dialog. If the UI does not support the PatternSelector, start the detailed selection with "patterns" as the initial view.
List of Global Variables
Display unconfirmed licenses of the selected packages.
Return value
boolean - true when all licenses were accepted (or there was no license to confirm)
Start the detailed package selection.
Function parameters
map<string,any> options
Return value
symbol - Returns `accept or `cancel .
YaST intrerface for /etc/pam.d/* files
List of Global Variables
Add options or new PAM module
Function parameters
string mod
Return value
boolean - success
Query PAM configuration for status of given module
Function parameters
string mod
Return value
map - keys are 'management groups' (e.g. auth), values are lists of options
Remove options or PAM module
Function parameters
string mod
Return value
boolean - success
YaST intrerface for /etc/default/passwd agent
List of Global Functions
AddValue - Adds a new options to the current list of options
GetDefaultValue - Reads the value from /etc/default/passwd
GetFile - Returns the given file contents in the map form
GetFiles - Returns list of files currently handled by the module
GetGroupHashMethod - Reads the value of default crypt hash for group passwords
GetHashMethod - Reads the value of default crypt hash (defined in /etc/default/passwd)
GetValues - Returns the values (options) of one type in the given file
RemoveValue - Deletes an options from the current list of options
SetDefaultValue - Set the value of key in /etc/default/passwd
SetGroupHashMethod - Sets the new value of default crypt hash for group passwords
SetHashMethod - Sets the new value of default crypt hash - modifies /etc/default/passwd !
SetValues - Saves the new list of options of one type to given file
Write - Writes all edited files to the disk
List of Global Variables
Adds a new options to the current list of options
Function parameters
string file
string type
string value
Return value
boolean - success
Reads the value from /etc/default/passwd
Function parameters
string key
Return value
string
Returns the given file contents in the map form
Function parameters
string file
Return value
map - which maps type to list of its options
Reads the value of default crypt hash for group passwords
Return value
string
Reads the value of default crypt hash (defined in /etc/default/passwd)
Return value
string
Returns the values (options) of one type in the given file
Function parameters
string file
string type
Return value
list<string> - of options
Deletes an options from the current list of options
Function parameters
string file
string type
string value
Return value
boolean - success
Set the value of key in /etc/default/passwd
Function parameters
string key
string value
Return value
boolean
Sets the new value of default crypt hash for group passwords
Function parameters
string hash
Return value
boolean
Sets the new value of default crypt hash - modifies /etc/default/passwd !
Function parameters
string hash
Return value
boolean
Saves the new list of options of one type to given file
Function parameters
string file
string type
list<string> values
Return value
boolean - success
Thomas Fehr <fehr@suse.de>
Arvin Schnell <aschnell@suse.de>
Purpose: Provides information about partitions
List of Global Functions
CurMounted - Return a list with all mounted partition
List of Global Variables
Commonly used popup dialogs
Gabriele Strattner <gs@suse.de>
Stefan Hundhammer <sh@suse.de>
Arvin Schnell <arvin@suse.de>
List of Global Functions
AnyMessage - Generic message popup
AnyQuestion - Generic question popup with two buttons.
AnyQuestion3 - Generic question popup with three buttons.
AnyQuestionRichText - Show a question that might need scrolling.
AnyTimedMessage - Generic message popup
ClearFeedback - Clear feedback message
ConfirmAbort - Confirmation for "Abort" button during installation.
ContinueCancel - Dialog which displays the "message" and has a <b>Continue</b> and a <b>Cancel</b> button.
ContinueCancelHeadline - Dialog which displays the "message" and has a <b>Continue</b> and a <b>Cancel</b> button.
Error - Show an error message and wait until user clicked "OK".
ErrorDetails - Show an error message with Details button and wait until user clicked "OK".
LongError - Show a long error and wait until user clicked "OK".
LongErrorGeometry - Show a long error message and wait until user clicked "OK". Size of the popup window is adjustable.
LongMessage - Show a long message and wait until user clicked "OK".
LongMessageGeometry - Show a long message and wait until user clicked "OK". Size of the popup window is adjustable.
LongNotify - Show a long notify message and wait until user clicked "OK".
LongNotifyGeometry - Show a long notify message and wait until user clicked "OK". Size of the popup window is adjustable.
LongText - Show a long text that might need scrolling.
LongWarning - Show a long warning and wait until user clicked "OK".
LongWarningGeometry - Show a long warning and wait until user clicked "OK". Size of the popup window is adjustable
Message - Show a simple message and wait until user clicked "OK".
MessageDetails - Show a message with Details button and wait until user clicked "OK".
ModuleError - Special error popup for YCP modules that don't work.
NoHeadline - Indicator for empty headline for popups that can optionally have one
NoIcon - Indicator for empty icon for popups that can have one - for code readability.
Notify - Show a notification message and wait until user clicked "OK".
NotifyDetails - Show a notify message with Details button and wait until user clicked "OK".
ReallyAbort - Confirmation popup when user clicked "Abort".
ShowFeedback - Show popup with a headline and a message for feedback
ShowFile - Show the contents of an entire file in a popup.
ShowText - Show the contents of an entire file in a popup.
ShowTextTimed - Show the contents of an entire file in a popup.
TimedAnyQuestion - Timed question popup with two buttons and time display
TimedError - Show an error message and wait specified amount of time or until user clicked "OK".
TimedLongError - Show a long error message and wait until user clicked "OK" or time is out.
TimedLongErrorGeometry - Show a long error message and wait until user clicked "OK" or time is out. Size of the popup window is adjustable.
TimedLongMessage - Show a long message and wait until user clicked "OK" or time is out.
TimedLongMessageGeometry - Show a long message and wait until user clicked "OK" or time is out. Size of the popup window is adjustable.
TimedLongNotify - Show a long error message and wait until user clicked "OK" or time is out.
TimedLongNotifyGeometry - Show a long notify message and wait until user clicked "OK" or time is out. Size of the popup window is adjustable.
TimedLongWarning - Show a long warning message and wait until user clicked "OK" or time is out.
TimedLongWarningGeometry - Show a long warning and wait until user clicked "OK" or time is out. Size of the popup window is adjustable.
TimedMessage - Show a message and wait until user clicked "OK" or time is out
TimedNotify - Show a long notify message and wait until user clicked "OK" or the time is out.
TimedOKCancel - Display a message with a timeout
TimedWarning - Show a warning message and wait specified amount of time or until user clicked "OK".
Warning - Show a warning message and wait until user clicked "OK".
WarningDetails - Show a warning with Details button and wait until user clicked "OK".
YesNo - Display a yes/no question and wait for answer.
YesNoHeadline - This dialog displays "message" (a question) and has a <b>Yes</b> and a <b>No</b> button.
List of Global Variables
Generic message popup
Function parameters
string headline
string message
Return value
void
Generic question popup with two buttons.
Function parameters
string headline
string message
string yes_button_message
string no_button_message
symbol focus
Return value
boolean - true: first button has been clicked false: second button has been clicked
Example 60.
Popup::AnyQuestion( Label::WarningMsg(), "Do really want to ...?", "Install", "Don't do it", `focus_no );
See also:
YesNo
ContinueCancel
Generic question popup with three buttons.
Function parameters
string headline
string message
string yes_button_message
string no_button_message
string retry_button_message
symbol focus
Return value
symbol - - `yes: first button has been clicked - `no: second button has been clicked - `retry: third button has been clicked
Example 61.
Popup::AnyQuestion3( Label::WarningMsg(), _("... failed"), _("Continue"), _("Cancel"), _("Retry"), `focus_yes );See also:
AnyQuestion
Show a question that might need scrolling.
Function parameters
string headline
string richtext
integer hdim
integer vdim
string yes_button_message
string no_button_message
symbol focus
Return value
boolean - left button pressed?
Generic message popup
Function parameters
string headline
string message
integer timeout
Return value
void -
Confirmation for "Abort" button during installation.
Function parameters
symbol severity
Return value
boolean -
Dialog which displays the "message" and has a <b>Continue</b> and a <b>Cancel</b> button.
Function parameters
string message
Return value
boolean -
See also:
AnyQuestion
Dialog which displays the "message" and has a <b>Continue</b> and a <b>Cancel</b> button.
Function parameters
string headline
string message
Return value
boolean -
See also:
ContinueCancel
YesNo
AnyQuestion
Show an error message and wait until user clicked "OK".
Function parameters
string message
Return value
void
See also:
Message
Notify
Warning
AnyMessage
Show an error message with Details button and wait until user clicked "OK".
Function parameters
string message
string details
Return value
void
See also:
Message
Show a long error and wait until user clicked "OK".
Function parameters
string message
Return value
void
Show a long error message and wait until user clicked "OK". Size of the popup window is adjustable.
Function parameters
string message
integer width
integer height
Return value
void
Show a long message and wait until user clicked "OK".
Function parameters
string message
Return value
void
Show a long message and wait until user clicked "OK". Size of the popup window is adjustable.
Function parameters
string message
integer width
integer height
Return value
void
Show a long notify message and wait until user clicked "OK".
Function parameters
string message
Return value
void
Show a long notify message and wait until user clicked "OK". Size of the popup window is adjustable.
Function parameters
string message
integer width
integer height
Return value
void
Show a long text that might need scrolling.
Function parameters
string headline
term richtext
integer hdim
integer vdim
Return value
void
Example 67.
Popup::LongText ( "Package description", `Richtext("<p>Hello, this is a long description .....</p>"), 50, 20 );Show a long warning and wait until user clicked "OK".
Function parameters
string message
Return value
void
Show a long warning and wait until user clicked "OK". Size of the popup window is adjustable
Function parameters
string message
integer width
integer height
Return value
void
Show a simple message and wait until user clicked "OK".
Function parameters
string message
Return value
void
See also:
AnyMessage
Notify
Warning
Error
Show a message with Details button and wait until user clicked "OK".
Function parameters
string message
string details
Return value
void
Example 69.
Popup::MessageDetails("This is an information about ... .", "This service is intended to...");
See also:
Message
Special error popup for YCP modules that don't work.
Function parameters
string text
Return value
symbol - `back, `again, `cancel, `next
Indicator for empty headline for popups that can optionally have one
Return value
string - empty string ("")
Indicator for empty icon for popups that can have one - for code readability.
Return value
string
Show a notification message and wait until user clicked "OK".
Function parameters
string message
Return value
void
See also:
Message
AnyMessage
Show a notify message with Details button and wait until user clicked "OK".
Function parameters
string message
string details
Return value
void
See also:
Message
Confirmation popup when user clicked "Abort".
Function parameters
boolean have_changes
Return value
boolean - true: "abort" confirmed; false: don't abort
Show popup with a headline and a message for feedback
Function parameters
string headline
string message
Return value
void
Show the contents of an entire file in a popup.
Function parameters
string headline
string filename
Return value
void
Show the contents of an entire file in a popup.
Function parameters
string headline
string text
Return value
void
Show the contents of an entire file in a popup.
Function parameters
string headline
string text
integer timeout
Return value
void
Timed question popup with two buttons and time display
Function parameters
string headline
string message
string yes_button_message
string no_button_message
symbol focus
integer timeout_seconds
Return value
boolean - True if Yes, False if no
See also:
AnyQuestion
Show an error message and wait specified amount of time or until user clicked "OK".
Function parameters
string message
integer timeout_seconds
Return value
void -
See also:
Error
Show a long error message and wait until user clicked "OK" or time is out.
Function parameters
string message
integer timeout_seconds
Return value
void
Show a long error message and wait until user clicked "OK" or time is out. Size of the popup window is adjustable.
Function parameters
string message
integer timeout_seconds
integer width
integer height
Return value
void
Show a long message and wait until user clicked "OK" or time is out.
Function parameters
string message
integer timeout_seconds
Return value
void
Show a long message and wait until user clicked "OK" or time is out. Size of the popup window is adjustable.
Function parameters
string message
integer timeout_seconds
integer width
integer height
Return value
void
Show a long error message and wait until user clicked "OK" or time is out.
Function parameters
string message
integer timeout_seconds
Return value
void
Show a long notify message and wait until user clicked "OK" or time is out. Size of the popup window is adjustable.
Function parameters
string message
integer timeout_seconds
integer width
integer height
Return value
void
Show a long warning message and wait until user clicked "OK" or time is out.
Function parameters
string message
integer timeout_seconds
Return value
void
Show a long warning and wait until user clicked "OK" or time is out. Size of the popup window is adjustable.
Function parameters
string message
integer timeout_seconds
integer width
integer height
Return value
void
Show a message and wait until user clicked "OK" or time is out
Function parameters
string message
integer timeout_seconds
Return value
void
Show a long notify message and wait until user clicked "OK" or the time is out.
Function parameters
string message
integer timeout_seconds
Return value
void
Display a message with a timeout
Function parameters
string message
integer timeout_seconds
Return value
boolean - true --> "OK" or timer expired<br> false --> "Cancel"
Show a warning message and wait specified amount of time or until user clicked "OK".
Function parameters
string message
integer timeout_seconds
Return value
void -
See also:
Warning
Show a warning message and wait until user clicked "OK".
Function parameters
string message
Return value
void
See also:
Message
Notify
Error
AnyMessage
Show a warning with Details button and wait until user clicked "OK".
Function parameters
string message
string details
Return value
void
Example 77.
Popup::WarningDetails("Something is wrong. Please check your configuration.", "possible problem is in..." );
See also:
Message
Display a yes/no question and wait for answer.
Function parameters
string message
Return value
boolean - true if [Yes] has been pressed
See also:
YesNoHeadline
ContinueCancel
AnyQuestion
This dialog displays "message" (a question) and has a <b>Yes</b> and a <b>No</b> button.
Function parameters
string headline
string message
Return value
boolean - true if [Yes] has been pressed
See also:
YesNo
AnyQuestion
Definition of Port Aliases.
List of Global Functions
AllowedPortNameOrNumber - Function returns string describing allowed port name or number.
GetListOfServiceAliases - Function returns list of aliases (port-names and port-numbers) for requested port-number or port-name. Also the requested name or port is returned.
GetPortNumber - Function returns a port number for the port name alias
IsAllowedPortName - Function returns if the port name is allowed port name (or number).
IsKnownPortName - Function returns if the requested port-name is known port. Known port have an IANA alias.
List of Global Variables
Function returns string describing allowed port name or number.
Return value
string - with description
Function returns list of aliases (port-names and port-numbers) for requested port-number or port-name. Also the requested name or port is returned.
Function parameters
string port
Return value
list <string> - [string] of aliases
Function returns a port number for the port name alias
Function parameters
string port_name
Return value
integer
Function returns if the port name is allowed port name (or number).
Function parameters
string port_name
Return value
boolean - if allowed
Checking and manipulation with port ranges (iptables).
List of Global Functions
CreateNewPortRange - Function creates a port range from min and max params. Max must be bigger than min. If something is wrong, it returns an empty string.
DividePortsAndPortRanges - Function divides list of ports to the map of ports and port ranges. If with_aliases is 'true' it also returns ports wit their port aliases. Port ranges are not affected with it.
FlattenServices - Function tries to flatten services into the minimal list. If ports are already mentioned inside port ranges, they are dropped.
IsPortRange - Function returns where the string parameter is a port range. Port ranges are defined by the syntax "min_port_number:max_port_number". Port range means that these maximum and minimum ports define the range of currency in Firewall. Ports defining the range are included in it. This function doesn't check whether the port range is valid or not.
IsValidPortRange - Checks whether the port range is valid.
PortIsInPortranges - Function returns where the port name or port number is included in the list of port ranges. Port ranges must be defined as a string with format "min_port_number:max_port_number".
RemovePortFromPortRanges - Function removes port number from all port ranges. Port must be in its numeric form.
List of Global Variables
max_port_number - Maximal number of port number, they are in the interval 1-65535 included. The very same value should appear in SuSEFirewall::max_port_number.
Function creates a port range from min and max params. Max must be bigger than min. If something is wrong, it returns an empty string.
Function parameters
integer min_pr
integer max_pr
Return value
string - new port range
Function divides list of ports to the map of ports and port ranges. If with_aliases is 'true' it also returns ports wit their port aliases. Port ranges are not affected with it.
Function parameters
list <string> unsorted_ports
boolean with_aliases
Return value
map <string, list <string> > - <map <string, list <string> > > of divided ports
Returns $[
"ports" : [ list of ports ],
"port_ranges" : [ list of port ranges ],
]
Function tries to flatten services into the minimal list. If ports are already mentioned inside port ranges, they are dropped.
Function parameters
list <string> old_list
string protocol
Return value
list <string> - of flattened services and port ranges
Function returns where the string parameter is a port range. Port ranges are defined by the syntax "min_port_number:max_port_number". Port range means that these maximum and minimum ports define the range of currency in Firewall. Ports defining the range are included in it. This function doesn't check whether the port range is valid or not.
Function parameters
string check_this
Return value
boolean - whether the checked string is a port range or not
Example 80.
IsPortRange("34:38") -> true
IsPortRange("0:38") -> true
IsPortRange("port-range") -> false
IsPortRange("19-22") -> falseSee also:
IsValidPortRange()
Checks whether the port range is valid.
Function parameters
string port_range
Return value
boolean - if it is valid
Example 81.
IsValidPortRange("54:135") -> true // valid
IsValidPortRange("135:54") -> false // reverse order
IsValidPortRange("0:135") -> false // cannot be from 0
IsValidPortRange("135") -> false // cannot be one number
IsValidPortRange("54-135") -> false // wrong separatorSee also:
IsPortRange()
Function returns where the port name or port number is included in the list of port ranges. Port ranges must be defined as a string with format "min_port_number:max_port_number".
Function parameters
string port
list <string> port_ranges
Return value
boolean
Example 82.
PortIsInPortranges ("130", ["100:150","10:30"]) -> true
PortIsInPortranges ("30", ["100:150","10:20"]) -> false
PortIsInPortranges ("pop3", ["100:150","10:30"]) -> true
PortIsInPortranges ("http", ["100:150","10:20"]) -> falseFunction removes port number from all port ranges. Port must be in its numeric form.
Function parameters
integer port_number
list <string> port_ranges
Return value
list <string> - of filtered port_ranges
See also:
PortAliases::GetPortNumber()
PowerManagement settings, input and output functions
List of Global Functions
Abort - Abort function
AutoPackages - Return packages needed to be installed and removed during Autoinstallation to insure module has all needed software installed.
Export - Dump the power-management settings to a single map (For use by autoinstallation.)
FetchScheme - fetch a scheme
FetchSchemes - Fetch all schemes
FindScheme - Find index of a scheme
Import - Get all power-management settings from the first parameter (For use by autoinstallation.)
Modified - Was the settings modified?
Modified - Data was modified?
Read - Read all power-management settings
StoreScheme - Store the current scheme
StoreSchemes - Store all schemes
Summary - Create a textual summary and a list of unconfigured cards
TranslatePowersaveText - Translate a text using powersave mo-file
TranslateSchemeDescription - Get localized scheme description
TranslateSchemeName - Get localized scheme name
Write - Write all power-management settings
List of Global Variables
modified - Data was modified?
write_only - Write only, used during autoinstallation. Don't run services and SuSEconfig, it's all done at one place.
Return packages needed to be installed and removed during Autoinstallation to insure module has all needed software installed.
Return value
map - with 2 lists.
Dump the power-management settings to a single map (For use by autoinstallation.)
Return value
map - Dumped settings (later acceptable by Import ())
Find index of a scheme
Function parameters
string name
Return value
integer - scheme index (-1 if not found)
Get all power-management settings from the first parameter (For use by autoinstallation.)
Function parameters
map settings
Return value
boolean - True on success
Create a textual summary and a list of unconfigured cards
Return value
list<string> - summary of the current configuration
Translate a text using powersave mo-file
Function parameters
string text
Return value
string - translated text
Get localized scheme description
Function parameters
string descr
Return value
string - localized scheme decription
Get localized scheme name
Function parameters
string name
Return value
string - localized scheme name
List of Global Functions
Abort - Abort function
AddQueue - Add new queue or overwrite existing queue
AutoPackages - Return packages needed to be installed and removed during Autoinstallation to insure module has all needed software installed.
AutodetectQueues - Autodetect queues by calling a bash script which calls "lpstat -v" and processes its output and stores the results as YCP list in a temporary file and then read the temporary file (SCR::Read) to get the YCP list of @ref autodetected_queue_map
ConnectionItems - Create a list of items from the autodetected connections which is used for the SelectionBox in the BasicAddDialog and SelectConnectionDialog
DeleteQueue - Delete queue
DetermineDriverOptions - Determine driver options by calling a bash script which calls "lpoptions -l" and processes its output and stores the results as YCP list in a temporary file and then read the temporary file (SCR::Read) to get the YCP list of @ref autodetected_queue_map
DriverItems - Create a list of items from the PPD database entries which is used for the SelectionBox in the BasicAddDialog and SelectDriverDialog
DriverOptionItems - Create a list of tree widget items from the driver_options which is used for the tree widget in the DriverOptionsDialog
Export - Dump the printer settings to a single map (For use by autoinstallation.)
FirewallConfig - Determined and set at runtime in the "Print via Network" and "Sharing" dialogs by calling Printer::FirewallConfig("read") and Printer::FirewallConfig("write")
Import - Get all printer settings from the first parameter (For use by autoinstallation.)
Modified - Prototypes
Modified - Data was modified?
NewQueueName - Create a valid new queue name.
QueueItems - Create the list of queues for the Table in the OverviewDialog
Read - Initialize printer configuration (checks only the installed packages) see http://en.opensuse.org/YaST/Development/Printer_Enhancement#Basic_Implementation_Principles: for background information
Write - Finish printer configuration (does actually nothing except to exit verbosely) see http://en.opensuse.org/YaST/Development/Printer_Enhancement#Basic_Implementation_Principles: for background information
List of Global Variables
connections - Autodetected printers: Determined at runtime via Printer::AutodetectPrinters() which calls the bash script "/usr/lib/YaST2/bin/autodetect_printers" which outputs on stdout a YCP list of @ref autodetected_printer_map where the last list entry is an emtpy map.
driver_options - Driver options (options in the PPD for one specific existing queue): Determined at runtime via Printer::DetermineDriverOptions( "queue_name") which calls the bash script "/usr/lib/YaST2/bin/determine_printer_driver_options" which outputs on stdout a YCP list of @ref driver_option_map where the last list entry is an emtpy map.
firewall_config - Firewall configuration: Determined and set at runtime in the "Print via Network" and "Sharing" dialogs by calling Printer::FirewallConfig("read") and Printer::FirewallConfig("write") which calls SuSEFirewall functions to fill in the map @ref firewall_config except "ui_browsing_from_int", "ui_access_from_int", and "ui_deny_from_ext" which are the user settings in the dialog or change the SuSEFirewall settings according to "ui_browsing_from_int", "ui_access_from_int", and "ui_deny_from_ext". The entries are such that "true" is the default, reasonable and intended setting. In particular it is reasonable to deny CUPS Browsing packages (port 631 UDP) from the EXT zone to avoid "print job phishing" by announcing local queue names from a malicious external host, see http://www.cups.org/newsgroups.php?gcups.general+T+Q"print+job+phishing"
modified - Data was modified?
number_chars - Explicite listing of all alphanumeric ASCII characters. The reason is that in certain special locales for example [a-z] is not equivalent to "abcdefghijklmnopqrstuvwxyz" because in certain special languages the 'z' is not the last character in the alphabet, e.g. the Estonian alphabet ends with ... s ... z ... t u v w ... x y (non-ASCII characters omitted here) so that [a-z] would exclude t u v w x y in an Estonian locale. Therefore uppercase and lowercase characters are both explicitely listed to avoid any unexpected result e.g. of "tolower(uppercase_characters)".
ppds - PPD database: the database is created anew in Printer::CreateDatabase() which calls the bash script "/usr/lib/YaST2/bin/create_ppd_database" which outputs on stdout a YCP list of @ref printer_ppd_map where the last list entry is an emtpy map. Printer::CreateDatabase() leaves manufacturer and modelname empty because it would take several minutes (instead of a few seconds) to fill them up (see the comments in create_ppd_database). Both fields can be filled up during runtime for particular PPDs (e.g. for a more detailed PPD selection among several PPDs which match to a particular model or manufacturer but not for all the thousands of PPDs which are installed in the system).
queue_filter_show_local - Queue filter string: Can be either "all" or "local" or "remote" depending on which kind of queues from the queues list (of queue maps) the user wants to see in the overview dialog. Preset to "all" which indicates that all queues are shown.
queues - Autodetected queues: Determined at runtime via Printer::AutodetectQueues() which calls the bash script "/usr/lib/YaST2/bin/autodetect_print_queues" which outputs on stdout a YCP list of @ref autodetected_queue_map where the last list entry is an emtpy map.
selected_connections_index - Selected autodetected printer index: The index in the autodetected printers list (of connection maps) for the connection which was selected by the user. Preset to -1 which indicates that no connection is selected.
selected_ppds_index - Selected PPD database index: The index in the PPD database list (of PPD maps) for the PPD which was selected by the user. Preset to -1 which indicates that no PPD is selected.
selected_queues_index - Selected queue index: The index in the queues list (of queue maps) for the queue which was selected by the user. Preset to -1 which indicates that no queue is selected.
write_only - Write only, used during autoinstallation. Don't run services and SuSEconfig, it's all done at one place.
Add new queue or overwrite existing queue
Function parameters
string queue_name
Return value
boolean - true on success
Return packages needed to be installed and removed during Autoinstallation to insure module has all needed software installed.
Return value
map - with 2 lists.
Autodetect queues by calling a bash script which calls "lpstat -v" and processes its output and stores the results as YCP list in a temporary file and then read the temporary file (SCR::Read) to get the YCP list of @ref autodetected_queue_map
Return value
boolean - true on success
Create a list of items from the autodetected connections which is used for the SelectionBox in the BasicAddDialog and SelectConnectionDialog
Function parameters
string connection_filter_string
Return value
list - of connections (i.e. DeviceURI, model, and info of the "lpinfo -l -v" output)
Delete queue
Function parameters
string queue_name
Return value
boolean - true on success
Determine driver options by calling a bash script which calls "lpoptions -l" and processes its output and stores the results as YCP list in a temporary file and then read the temporary file (SCR::Read) to get the YCP list of @ref autodetected_queue_map
Function parameters
string queue_name
Return value
boolean - true on success
Create a list of items from the PPD database entries which is used for the SelectionBox in the BasicAddDialog and SelectDriverDialog
Function parameters
string driver_filter_string
boolean preselection
Return value
list - of drivers (i.e. the NickName entries of the PPDs)
Create a list of tree widget items from the driver_options which is used for the tree widget in the DriverOptionsDialog
Function parameters
string selected_keyword
string selected_value
Return value
list - of driver options items for a tree widget
Dump the printer settings to a single map (For use by autoinstallation.)
Return value
map - Dumped settings (later acceptable by Import ())
Determined and set at runtime in the "Print via Network" and "Sharing" dialogs by calling Printer::FirewallConfig("read") and Printer::FirewallConfig("write")
Function parameters
string action
Return value
boolean - true on success
Get all printer settings from the first parameter (For use by autoinstallation.)
Function parameters
map settings
Return value
boolean - True on success
Create a valid new queue name.
Function parameters
string proposal
Return value
string
Create the list of queues for the Table in the OverviewDialog
Function parameters
boolean local
boolean remote
Return value
list - table items
Initialize printer configuration (checks only the installed packages) see http://en.opensuse.org/YaST/Development/Printer_Enhancement#Basic_Implementation_Principles: for background information
Return value
boolean - true on success
Autodetected printers: Determined at runtime via Printer::AutodetectPrinters() which calls the bash script "/usr/lib/YaST2/bin/autodetect_printers" which outputs on stdout a YCP list of @ref autodetected_printer_map where the last list entry is an emtpy map.
autodetected_printer_map
$[ "uri":"the full CUPS DeviceURI (required)",
"model":"the manufacturer and model, often "Unknown" (may be the empty string)",
"deviceID":"what the printer reported as its device ID (often the empty string)",
"info":"arbitrary info regarding this connection (may be the empty string)",
"class":"the kind of connection, e.g. "direct","network","file" (may be the empty string)"
]Driver options (options in the PPD for one specific existing queue): Determined at runtime via Printer::DetermineDriverOptions( "queue_name") which calls the bash script "/usr/lib/YaST2/bin/determine_printer_driver_options" which outputs on stdout a YCP list of @ref driver_option_map where the last list entry is an emtpy map.
driver_option_map
$[ "keyword":"the main keyword of the option in the PPD (required)",
"translation":"the translation string of the main keyword (may be the empty string)",
"values":["a list of the option keywords in the PPD (at least one non-empty entry is required)
i.e. the values for the main keyword (i.e. the values for this option)
where the currently set option value of the queue is marked by a leading '*'
and where the last list entry is an emtpy string"],
"selected":"the curently selected value in the DriverOptionsDialog (may be the empty string)"
]Firewall configuration: Determined and set at runtime in the "Print via Network" and "Sharing" dialogs by calling Printer::FirewallConfig("read") and Printer::FirewallConfig("write") which calls SuSEFirewall functions to fill in the map @ref firewall_config except "ui_browsing_from_int", "ui_access_from_int", and "ui_deny_from_ext" which are the user settings in the dialog or change the SuSEFirewall settings according to "ui_browsing_from_int", "ui_access_from_int", and "ui_deny_from_ext". The entries are such that "true" is the default, reasonable and intended setting. In particular it is reasonable to deny CUPS Browsing packages (port 631 UDP) from the EXT zone to avoid "print job phishing" by announcing local queue names from a malicious external host, see http://www.cups.org/newsgroups.php?gcups.general+T+Q"print+job+phishing"
firewall_config
$[ "suse_firewall_used":"true if Suse Firewall and no other firewall is used",
"firewall_active":"true if Suse Firewall is actually running",
"no_firewall_for_int":"true if Suse Firewall does not potect the INT zone",
"browsing_from_int":"true if Suse Firewall does not deny CUPS Browsing (port 631 UDP) from the INT zone",
"ui_browsing_from_int":"true if user has set in dialog not to deny CUPS Browsing from the INT zone",
"access_from_int":"true if Suse Firewall does not deny CUPS access (port 631 TCP) from the INT zone",
"ui_access_from_int":"true if user has set in dialog not to deny CUPS access from the INT zone",
"deny_from_ext":"true if any CUPS access (port 631 UDP and TCP) is denied from the EXT zone",
"ui_deny_from_ext":"true if user has set in dialog to deny any CUPS access from the EXT zone"
]Explicite listing of all alphanumeric ASCII characters. The reason is that in certain special locales for example [a-z] is not equivalent to "abcdefghijklmnopqrstuvwxyz" because in certain special languages the 'z' is not the last character in the alphabet, e.g. the Estonian alphabet ends with ... s ... z ... t u v w ... x y (non-ASCII characters omitted here) so that [a-z] would exclude t u v w x y in an Estonian locale. Therefore uppercase and lowercase characters are both explicitely listed to avoid any unexpected result e.g. of "tolower(uppercase_characters)".
PPD database: the database is created anew in Printer::CreateDatabase() which calls the bash script "/usr/lib/YaST2/bin/create_ppd_database" which outputs on stdout a YCP list of @ref printer_ppd_map where the last list entry is an emtpy map. Printer::CreateDatabase() leaves manufacturer and modelname empty because it would take several minutes (instead of a few seconds) to fill them up (see the comments in create_ppd_database). Both fields can be filled up during runtime for particular PPDs (e.g. for a more detailed PPD selection among several PPDs which match to a particular model or manufacturer but not for all the thousands of PPDs which are installed in the system).
printer_ppd_map
$[ "ppd":"the PPD file name with path below /usr/share/cups/model/ (required)",
"nickname":"the NickName entry in the PPD (required)",
"deviceID":"the 1284DeviceID entry in the PPD (may be the empty string)",
"language":"the language of the PPD, usually "en" (may be the empty string)",
"manufacturer":"the Manufacturer entry in the PPD (initially the empty string)",
"modelname":"the ModelName entry in the PPD (initially the empty string)"
]Queue filter string: Can be either "all" or "local" or "remote" depending on which kind of queues from the queues list (of queue maps) the user wants to see in the overview dialog. Preset to "all" which indicates that all queues are shown.
Autodetected queues: Determined at runtime via Printer::AutodetectQueues() which calls the bash script "/usr/lib/YaST2/bin/autodetect_print_queues" which outputs on stdout a YCP list of @ref autodetected_queue_map where the last list entry is an emtpy map.
autodetected_queue_map
$[ "name":"the queue name (required)",
"uri":"the full CUPS DeviceURI (required)",
"description":"(may be the empty string)",
"location":"(may be the empty string)",
"ppd":"/etc/cups/ppd/<queue-name>.ppd (may be the empty string)",
"default":"'yes' if it is a DefaultPrinter in /etc/cups/printers.conf, otherwise the empty string",
"disabled":"'yes' if printing is disabled, otherwise 'no'",
"rejecting":"'yes' if print job are rejected, otherwise 'no'",
"config":"either 'local' if the queue exists in /etc/cups/printers.conf, otherwise 'remote' (required)"
]Selected autodetected printer index: The index in the autodetected printers list (of connection maps) for the connection which was selected by the user. Preset to -1 which indicates that no connection is selected.
Selected PPD database index: The index in the PPD database list (of PPD maps) for the PPD which was selected by the user. Preset to -1 which indicates that no PPD is selected.
Selected queue index: The index in the queues list (of queue maps) for the queue which was selected by the user. Preset to -1 which indicates that no queue is selected.
List of Global Functions
ExecuteBashCommand - Wrapper for SCR::Execute to execute a bash command to increase verbosity via y2milestone. It reports the command via y2milestone in any case and it reports exit code, stdout and stderr via y2milestone in case of non-zero exit code.
TestAndInstallPackage - Test whether the package is installed (calls 'rpm -q package_name') or test whether the package is available to be installed (Package::Available) and if yes then install it (Package::Install) if it is not yet installed or remove the package (Package::Remove) if it is installed.
List of Global Variables
Wrapper for SCR::Execute to execute a bash command to increase verbosity via y2milestone. It reports the command via y2milestone in any case and it reports exit code, stdout and stderr via y2milestone in case of non-zero exit code.
Function parameters
string bash_commandline
Return value
boolean - true on success
Test whether the package is installed (calls 'rpm -q package_name') or test whether the package is available to be installed (Package::Available) and if yes then install it (Package::Install) if it is not yet installed or remove the package (Package::Remove) if it is installed.
Function parameters
string package_name
string action
Return value
boolean - true on success
Product data
List of Global Functions
Product - Constructor
ReadProducts - Read the products from the package manager
List of Global Variables
baseproduct - base product
dist - Distribution: Personal, Professional, etc.
flags - list of flags from content file
name - General product name and version
patterns - list of patterns from content file
product_of_relnotes - map relnotes url to product name
relnotesurl - url of release notes (downloaded during internet test)
relnotesurl_all - list of all urls of release notes (downloaded during internet test) bugzilla #160563
run_you - Run YOU during the Internet connection test.
shortlabel - Short label for bootloader entry
list of all urls of release notes (downloaded during internet test) bugzilla #160563
Product Control routines
Anas Nashif <nashif@suse.de>
Stanislav Visnovsky <visnov@suse.cz>
Jiri Srain <jsrain@suse.cz>
Lukas Ocilka <locilka@suse.cz>
List of Global Functions
AddWizardSteps - Add Wizard Steps
DisableModule - Disable given module in installation workflow
DisableProposal - Disable given proposal in installation workflow
EnableModule - Enable given disabled module
EnableProposal - Enable given disabled proposal
GetDisabledModules - Returns list of modules disabled in workflow
GetDisabledProposals - Returns list of proposals disabled in workflow
GetUseAutomaticConfiguration - Returns whether automatic configuration will be enabled.
Init - Initialize Product Control
InitAutomaticConfiguration - Inits the default value for use_automatic_configuration
ProductControl - ProductControl Constructor
ReadControlFile - Read XML Control File
RequiredFiles - Get list of required files for the workflow.
ResetAdditionalWorkflowParams - Resets all additional params for selecting the workflow
RestartingStep - Return step which restarted YaST (or rebooted the system)
RetranslateWizardSteps - Retranslate Wizard Steps
Run - Run Workflow
RunRequired - Returns whether is is required to run YaST in the defined stage and mode
SetAdditionalWorkflowParams - Sets additional params for selecting the workflow
SetUseAutomaticConfiguration - Adjust the automatic configuration to be either enabled or disabled. Enabling it means that second stage will be disabled.
SkippedSteps - List steps which were skipped since last restart of YaST
UpdateWizardSteps - Update Steps
checkArch - Check if valid architecture
checkDisabled - Check if a module is disabled
getClientTerm - Return term to be used to run module with CallFunction
getCompleteWorkflow - Get Workflow
getLockedProposals - Get Proposal list that can not be changed by the user.
getModeDefaults - Get workflow defaults
getModules - Get modules of current Workflow
getProposalProperties - Return proposal Label
getProposalTextDomain - Return text domain
getProposals - Get modules of current Workflow
getWorkflowLabel - Get Workflow Label
setClientPrefix - Set Client Prefix
List of Global Variables
Disable given module in installation workflow
Function parameters
string modname
Return value
list<string> - current list of disabled modules
Disable given proposal in installation workflow
Function parameters
string disable_proposal
Return value
list<string> - current list of disabled proposals
Enable given disabled module
Function parameters
string modname
Return value
list<string> - current list of disabled modules
Enable given disabled proposal
Function parameters
string enable_proposal
Return value
list<string> - current list of disabled proposals
Returns list of modules disabled in workflow
Return value
list <string> - DisabledModules
Returns list of proposals disabled in workflow
Return value
list <string> - DisabledProposals
Returns whether automatic configuration will be enabled.
Return value
boolean - if enabled
Inits the default value for use_automatic_configuration
Return value
void
Read XML Control File
Function parameters
string controlfile
Return value
boolean
Get list of required files for the workflow.
Function parameters
string stage
string mode
Return value
list<string> - Required files list.
Resets all additional params for selecting the workflow
Return value
void
See also:
SetAdditionalWorkflowParams()
Return step which restarted YaST (or rebooted the system)
Return value
map - a map describing the step
Returns whether is is required to run YaST in the defined stage and mode
Function parameters
string stage
string mode
Return value
boolean - if needed
Sets additional params for selecting the workflow
Function parameters
map <string, any> params
Return value
void
Example 84.
SetAdditionalWorkflowParams ($["add_on_mode":"update"]); SetAdditionalWorkflowParams ($["add_on_mode":"installation"]);
Adjust the automatic configuration to be either enabled or disabled. Enabling it means that second stage will be disabled.
Function parameters
boolean set_param
Return value
void
List steps which were skipped since last restart of YaST
Return value
list<map> - a list of maps describing the steps
Check if valid architecture
Function parameters
map mod
map def
Return value
boolean - true if arch match
Return term to be used to run module with CallFunction
Function parameters
map step
map def
any former_result
Return value
term - module data with params
Get Workflow
Function parameters
string stage
string mode
Return value
map - Workflow map
Get Proposal list that can not be changed by the user.
Function parameters
string stage
string mode
string proptype
Return value
list<string> - list of locked proposals
Get workflow defaults
Function parameters
string stage
string mode
Return value
map - defaults
Get modules of current Workflow
Function parameters
string stage
string mode
symbol which
Return value
list <map> - modules
Return proposal Label
Function parameters
string stage
string mode
string proptype
Return value
map
Get modules of current Workflow
Function parameters
string stage
string mode
string proptype
Return value
list < list > - modules
Get Workflow Label
Function parameters
string stage
string mode
string wz_td
Return value
string
Data for configuration of product-creator, input and output functions.
List of Global Functions
Abort - Abort function
CheckLanguage - Check if there is a language selected in the package manager, if not then select the language used in the UI. Htis prevents the solver from allocating too many resources (see bug #339756)
CopyMiscFiles - CopyMiscFiles Copy other files to directory tree
CopyPackages - CopyPackages() Copy selected package to target tree
CreateSkeleton - Create Skeleton
EnableSource - Enable source and get source meta data
Export - Dump the product-creator settings to a single map (For use by autoinstallation.)
GetDirSources - Get all possible sources
Import - Get all product-creator settings from the first parameter (For use by autoinstallation.)
Modified - Data was modified?
Overview - Create an overview table with all configured cards
PollAbort - Check for pending Abort press
PrepareConfigs - Prepare map for writing into XML
ProductCreator - Constructor
Read - Read all product-creator settings
Readisolinux - Return contents of isolinux.cfg from the given source
ReallyAbort - If modified, ask for confirmation
SetPackageArch - Set the target package architecture
Summary - Create a textual summary and a list of unconfigured cards
Write - Write all product-creator settings
WritePatternFile - Write the modified file with pattern definitions
checkPackageAvail - Check if selected packages are available
checkProductDependency - Check Product dependencies and determine product to be used for booting. Also determine what is the main product.
configSetup - Create XML Configuration
getSourceDir - get path to directory source
getSourceURLs - Get media urls
setPackages - Set packages to be copied to iso image tree
List of Global Variables
AbortFunction - Abort function return boolean return true if abort
modified - Data was modified?
Check if there is a language selected in the package manager, if not then select the language used in the UI. Htis prevents the solver from allocating too many resources (see bug #339756)
Return value
void
CopyMiscFiles Copy other files to directory tree
Function parameters
string boot_arch
Return value
boolean - true on success
Create Skeleton
Function parameters
integer base_source
boolean bootable_product
string boot_architecture
Return value
boolean - true on success
Dump the product-creator settings to a single map (For use by autoinstallation.)
Return value
map - Dumped settings (later acceptable by Import ())
Get all possible sources
Function parameters
string source
Return value
list<term> - available enabled sources list for widget
Get all product-creator settings from the first parameter (For use by autoinstallation.)
Function parameters
map settings
Return value
boolean - True on success
Return contents of isolinux.cfg from the given source
Return value
string - with contents of file.
If modified, ask for confirmation
Return value
boolean - true if abort is confirmed
Set the target package architecture
Function parameters
string new_arch
Return value
boolean - true on success
Create a textual summary and a list of unconfigured cards
Return value
list - summary of the current configuration
Write the modified file with pattern definitions
Function parameters
string file_path
list<map> patterns
Return value
boolean - success
Check if selected packages are available
Return value
string - error message
Check Product dependencies and determine product to be used for booting. Also determine what is the main product.
Return value
integer
get path to directory source
Function parameters
string url
Return value
string - path
Get media urls
Function parameters
list<integer> ids
Return value
list - list of urls
Product features
List of Global Functions
Export - Exports the current set of ProductFeatures
GetBooleanFeature - Get value of a feature
GetFeature - Get value of a feature
GetSection - Get a complete section for evaluation
GetStringFeature - Get value of a feature
Import - Imports product features
InitIfNeeded - Initialize the features structure if needed Either read from /etc/YaST2/ProductFeatures or set default values
Restore - Restore product features in running system
Save - Save product features
SetBooleanFeature - Set value of a feature
SetFeature - Set value of a feature
SetSection - Set a feature section Default values will be used where value not defined
SetStringFeature - Set value of a feature
List of Global Variables
Exports the current set of ProductFeatures
Return value
map <string, map <string, any> > - features
Get value of a feature
Function parameters
string section
string feature
Return value
boolean - the feature value
Get value of a feature
Function parameters
string section
string feature
Return value
any - the feature value
Get a complete section for evaluation
Function parameters
string section_name
Return value
map<string,any> - a map key->value, options in the section
Get value of a feature
Function parameters
string section
string feature
Return value
string - the feature value
Imports product features
Function parameters
map <string, map <string, any> > import_settings
Return value
void
Initialize the features structure if needed Either read from /etc/YaST2/ProductFeatures or set default values
Return value
void
Set value of a feature
Function parameters
string section
string feature
boolean value
Return value
void
Set value of a feature
Function parameters
string section
string feature
any value
Return value
void
Set a feature section Default values will be used where value not defined
Function parameters
string section_name
map<string,any> section_map
Return value
void
Provide access / dialog for product license
List of Global Functions
AcceptanceNeeded - Returns whether accepting the license manually is requied.
AskLicenseAgreement - Ask user to confirm license agreement
ShowFullScreenLicenseInInstallation - Called from the first stage Welcome dialog by clicking on a button
ShowLicenseInInstallation - Used in the first-stage Welcome dialog
List of Global Variables
Returns whether accepting the license manually is requied.
Return value
boolean - if required
See also:
BNC #448598
Ask user to confirm license agreement
Function parameters
integer src_id
string dir
list<string> patterns
string action
boolean enable_back
boolean base_product
boolean require_agreement
Return value
symbol
Called from the first stage Welcome dialog by clicking on a button
Function parameters
any replace_point_ID
Return value
boolean
Profile handling
List of Global Functions
Import - Import Profile
Prepare - Prepare Profile for saving and remove empty data structs
Profile - Constructor
ReadProfileStructure - Read YCP data as the control file
ReadProperties - Read Profile properties and Version
ReadXML - Read XML into YCP data
Reset - Reset profile to initial status
Save - Save YCP data into XML
SaveProfileStructure - Save the current data into a file to be read after a reboot.
SaveSingleSections - Save sections of current profile to separate files
convertLVM - Provide Compatibility to older distributions.
convertRAID - Provide Compatibility to older distributions.
generalCompat - compatibility to new language,keyboard and timezone client in 10.1
setElementByList - this function is a replacement for this code: list<any> l = [ "key1",0,"key3" ]; m[ l ] = v;
List of Global Variables
Read YCP data as the control file
Function parameters
string parsedControlFile
Return value
boolean
Read Profile properties and Version
Function parameters
map properties
Return value
void
Save YCP data into XML
Function parameters
string file
Return value
boolean - true on success
Save the current data into a file to be read after a reboot.
Function parameters
string parsedControlFile
Return value
boolean - true on success
See also:
Restore()
Save sections of current profile to separate files
Function parameters
string dir
Return value
map<string,string> - - list of filenames
Provide Compatibility to older distributions.
Function parameters
list<map> lvm_standalone
Return value
list<map> - LVM configuration integrated into partitioning resource
Provide Compatibility to older distributions.
Function parameters
list<map> raid_standalone
Return value
map - RAID configuration integrated into partitioning resource
compatibility to new language,keyboard and timezone client in 10.1
Return value
void
Process Auto-Installation Location
List of Global Functions
Process - Initiate retrieving of control files and Rules.
ProfileLocation - Constructor
List of Global Variables
Data for configuration of profile-manager, input and output funcs.
List of Global Functions
CheckNameValidity - Checks if the name of the new profile consists of valid characters: [a-zA-Z0-9_-.]
GetDefaultResourceGroups - get the map of default resource groups
GetHashMarks - Gets the hash marks (to show in ProgressPopup) from the hashfile
GetProgressText - Reads the file with the progress informations.
GetResourceGroupResources - Gets resources of resource group.
GetResourceGroups - Returns all available resource groups.
GetUsernames - Return list of user names available in system First time, read it using yast2-users, use cache for later calls.
GetUsers - Return the map of users able to run scpm
GetUsersAllowed - Check if users are able to switch profiles
Modified - Was anything modified?
ProgressPopup - Popup for showing progress informations
Read - Read all profile-manager settings
ReadConfigFile - reads a contents of scpm config file (/etc/scpm.conf)
ReadResourceGroups - Reads all available resource groups.
ReadUsers - Read the set of users allowed to run SCPM
RebuildDB - Rebuilds SCPM database after changing resources.
Recover - Calls SCPM::Recover (false) function, which replays journal after the crash (started in separate agen'ts thread, return value must be checked with Wait)
ResetResourceGroup - Resets one resource group to default values
ResetResourceGroups - Resets RG's to default values
Rollback - Calls SCPM::Recover (true)
SaveResourceGroups - Save the resource groups edited in YaST UI
SetUsers - Upodate the global map of users
Wait - Checks the return value of agent's thread
Write - Write all profile-manager settings
WriteConfigFile - writes configuration data to scpm config file (/etc/scpm.conf)
WriteResourceGroups - function for writing modifications in resource groups
WriteSCPMStatus - Enables or disables SCPM (depends on value of enabled variable).
WriteStatus - general function for writing status (enable/disable)
WriteStatusFirst - Enables SCPM for the first time
WriteUsers - Write new set of users allowed to run scpm
WriteUsersAllowed - Write the new status if the users are allowed to run SCPM or not
List of Global Variables
conf_modified - if SCPM configuration (stored in scpm_conf map) was modified
enabled - Is SCPM enabled?
hash_size - how many times was progress bar used
initialized - Is SCPM initialized? This is set to true after first enabling.
needs_recover - Is SCPM recovery? (after something failed)
needs_reinit - Is SCPM re-initialization needed? (possibly after update)
resource_groups - all resource groups available; filled by ReadResourceGroups()
resource_groups_deleted - list of resource groups marked for deletion
resource_groups_modified - if resource groups were modified
scpm_conf - this map holds the contents of scpm.conf configuration file
scpm_error - When scpm action fails, the error message is stored here by SetError()
status_modified - Was enabled/disabled status changed?
users_allowed - If users are available to switch profiles
users_modified - if list of users was modified
Checks if the name of the new profile consists of valid characters: [a-zA-Z0-9_-.]
Function parameters
string name
Return value
boolean - true if valid
Gets the hash marks (to show in ProgressPopup) from the hashfile
Return value
integer - number of characters in hashfile
Reads the file with the progress informations.
Function parameters
boolean everything
Return value
string - the text to show in ProgressPopup (one line in normal case)
Gets resources of resource group.
Function parameters
string groupname
Return value
list - of resources
Returns all available resource groups.
Return value
map<string,map> - of groups
Return list of user names available in system First time, read it using yast2-users, use cache for later calls.
Return value
list<string> - of user names (for local users)
Popup for showing progress informations
Function parameters
string position
integer start
integer end
Return value
boolean - true
reads a contents of scpm config file (/etc/scpm.conf)
Return value
boolean - false when file doesn't exist
Reads all available resource groups.
Return value
boolean - true on success
Rebuilds SCPM database after changing resources.
Return value
boolean - true on success
Calls SCPM::Recover (false) function, which replays journal after the crash (started in separate agen'ts thread, return value must be checked with Wait)
Return value
void
Resets one resource group to default values
Function parameters
string groupname
Return value
boolean - success
Save the resource groups edited in YaST UI
Return value
boolean - success
Upodate the global map of users
Function parameters
map<string,string> current_users
Return value
boolean
Checks the return value of agent's thread
Return value
boolean - true if thread finished succesfully
writes configuration data to scpm config file (/etc/scpm.conf)
Return value
boolean - true
function for writing modifications in resource groups
Return value
boolean
Enables or disables SCPM (depends on value of enabled variable).
Return value
boolean - true on success
Progress bar
List of Global Functions
CloseSuperior - Replaces stages of superior progress by an empty help text.
CurrentSubprogressType - Get current subprogress type
Finish - Moves progress bar to the end and marks all stages as completed.
New - New complex progress bar with stages.
NewProgressIcons - Function adds icon-support to progress dialog. Parameters are the same as for Progress::New() function with one parameter added.
NextStage - Advance stage, advance step by 1 and set progress bar caption to that defined in New.
NextStageStep - Jumps to the next stage and sets step to st.
NextStep - Some people say it is the best operating system ever. But now to the function. Advances progress bar value by 1.
OpenSuperior - Creates a higher-level progress bar made of stages. Currently it is placed instead of help text.
Simple - Create simple progress bar with no stages, only with progress bar.
Stage - Go to stage st, change progress bar title to title and set progress bar step to step.
Step - Changes progress bar value to st.
StepSuperior - Make one step in a superior progress bar.
SubprogressTitle - Set the label of the subprogress
SubprogressType - Create (or remove) a new subprogress above the progress bar, can be use for detailed progress of the current task
SubprogressValue - Set value of the subprogress
Title - Change progress bar title.
off - Turns progress bar off. All Progress:: calls return immediatelly.
on - Turns progress bar on after calling Progress::off.
set - Sets progress bar state: on = normal operation, off = All Progress:: calls return immediatelly.
status - Returns currently selected visibility status of all UI-modifying Progress:: functions.
List of Global Variables
Get current subprogress type
Return value
symbol - Current type of the subprogress widget - can be `progress, `tick or `none
New complex progress bar with stages.
Function parameters
string window_title
string progress_title
integer length
list<string> stg
list tits
string help_text
Return value
void
Function adds icon-support to progress dialog. Parameters are the same as for Progress::New() function with one parameter added.
Function parameters
string window_title
string progress_title
integer length
list<string> stg
list tits
string help_textmap
list <list <string> > icons_definition
Return value
void
icons_definition = $[
[ // first 'visible'
"/path/to/icon-highlighted.png"
"/path/to/another-icon-highlighted.png",
]
[ // then 'invisible'
"/path/to/icon-gryscale.png",
nil, // fallback icon will be used
],
]
See also:
Function Progress::New()
Advance stage, advance step by 1 and set progress bar caption to that defined in New.
Return value
void
Jumps to the next stage and sets step to st.
Function parameters
integer st
Return value
void
Some people say it is the best operating system ever. But now to the function. Advances progress bar value by 1.
Return value
void
Creates a higher-level progress bar made of stages. Currently it is placed instead of help text.
Function parameters
string title
list<string> stages
Return value
void
Create simple progress bar with no stages, only with progress bar.
Function parameters
string window_title
string progress_title
integer length
string help_text
Return value
void
Go to stage st, change progress bar title to title and set progress bar step to step.
Function parameters
integer st
string title
integer step
Return value
void
Set the label of the subprogress
Function parameters
string title
Return value
void
Create (or remove) a new subprogress above the progress bar, can be use for detailed progress of the current task
Function parameters
symbol type
integer max_value
Return value
void
Set value of the subprogress
Function parameters
integer value
Return value
void
Sets progress bar state: on = normal operation, off = All Progress:: calls return immediatelly.
Function parameters
boolean state
Return value
boolean - previous state
Provider data
List of Global Functions
Add - Add a new provider
Clone - Clone the given provider
CloneSystem - Clone the given system provider
Commit - Commit pending operation
Delete - Delete the given provider
Edit - Edit the given provider
Export - Export data
GetCountries - Get list of countries
GetCountry - This is a single point of dependence on the Language module of yast2-country-data
GetProviders - Get providers from a group (country/other)
Import - Import data
IsUnique - Check if provider name is unique
Modified - Were the providers changed?
Overview - Create an overview table with all configured providers
ProviderType - Return current provider type
Read - Read providers data (custom only) and country mappings
Select - Select the given provider
SelectSystem - Select the given system provider
Summary - Create a textual summary and a list of unconfigured providers
Write - Write custom providers data
List of Global Variables
Current - Current provider structure depends on Type. See providers.rpm
LastCountry - Last selected country
Name - Current provider name
Type - Current provider type
Clone the given provider
Function parameters
string name
Return value
boolean - true if success
Clone the given system provider
Function parameters
path name
Return value
boolean - true if success
Delete the given provider
Function parameters
string name
Return value
boolean - true if success
Edit the given provider
Function parameters
string name
Return value
boolean - true if success
Export data
Function parameters
string type
Return value
map - dumped settings (later acceptable by Import())
This is a single point of dependence on the Language module of yast2-country-data
Return value
string
Get providers from a group (country/other)
Function parameters
string type
string country
string preselect
Return value
list - of items for SelectionBox
Import data
Function parameters
string type
map providers
Return value
map - true on success
Check if provider name is unique
Function parameters
string name
Return value
boolean - true if OK
Were the providers changed?
Function parameters
string type
Return value
boolean - true if modified
Create an overview table with all configured providers
Function parameters
string type
Return value
list - table items
Read providers data (custom only) and country mappings
Return value
boolean - true if success
Select the given provider
Function parameters
string name
Return value
boolean - true if success
Select the given system provider
Function parameters
path name
Return value
boolean - true if success
Create a textual summary and a list of unconfigured providers
Function parameters
string type
boolean split
Return value
list - summary of the current configuration
Proxy data
List of Global Functions
Export - Dump the Routing settings to a map, for autoinstallation use.
GetEnvironment - Function returns an environment usable for curl. The proxy user/password are read from /root/.curlrc.
GetModified - Function which returns if the settings were modified
Import - Get all settings from a map. When called by <name>_auto (preparing autoinstallation data) the map may be empty.
RunTestProxy - Runs tests of the HTTP and FTP proxy
SetModified - Function sets internal variable, which indicates, that any settings were modified, to "true"
Summary - Create proxy summary
Write - Write routing settings and apply changes
List of Global Variables
modified - Data was modified?
Dump the Routing settings to a map, for autoinstallation use.
Return value
map - autoinstallation settings
Function returns an environment usable for curl. The proxy user/password are read from /root/.curlrc.
Return value
map <string, string>
Function which returns if the settings were modified
Return value
boolean - settings were modified
Get all settings from a map. When called by <name>_auto (preparing autoinstallation data) the map may be empty.
Function parameters
map settings
Return value
boolean - true if success
Runs tests of the HTTP and FTP proxy
Function parameters
string http_proxy
string https_proxy
string ftp_proxy
string proxy_user
string proxy_password
Return value
map <string, map <string, any> > - with results of the test
return = $[ "HTTP" : $[ "exit" : _exit_code, "stdout" : _stdout, "stderr" : _stderr, ], "HTTPS" : $[ "exit" : _exit_code, "stdout" : _stdout, "stderr" : _stderr, ], "FTP" : $[ "exit" : _exit_code, "stdout" : _stdout, "stderr" : _stderr, ], ]
Function sets internal variable, which indicates, that any settings were modified, to "true"
Return value
void
DNS Punycode Handling
List of Global Functions
DecodeDomainName - Decodes the domain name (relative or FQDN) from the Punycode.
DecodePunycodes - Converts list of Punycode strings into their UTF-8 representation.
DocodeDomainNames - Decodes the list of domain names to their Unicode representation. This function is similar to DecodePunycodes but it works with every string as a domain name (that means every domain name is parsed by dots and separately evaluated).
EncodeDomainName - Encodes the domain name (relative or FQDN) to the Punycode.
EncodePunycodes - Converts list of UTF-8 strings into their Punycode ASCII repserentation.
GetMaximumCacheSize - Returns the maximum cache size (sum of already converted strings).
SetMaximumCacheSize - Offers to set the maximum cache size (sum of already converted strings).
List of Global Variables
Decodes the domain name (relative or FQDN) from the Punycode.
Function parameters
string encoded_domain_name
Return value
string - decoded domain_name
Example 85.
DecodeDomainName("xn--ala-qma83eb.xn--jlinka-3mb.go.home")
-> "ĹžĂĹžala.jĹŻlinka.go.home"Converts list of Punycode strings into their UTF-8 representation.
Function parameters
list <string> punycode_strings
Return value
list <string> - decoded_strings
Decodes the list of domain names to their Unicode representation. This function is similar to DecodePunycodes but it works with every string as a domain name (that means every domain name is parsed by dots and separately evaluated).
Function parameters
list <string> encoded_domain_names
Return value
list <string> - decoded_domain_names
Example 86.
DocodeDomainNames(["mx1.example.org", "xp3.example.org.", "xn--ala-qma83eb.org.example."]) -> ["mx1.example.org", "xp3.example.org.", "ĹžĂĹžala.org.example."]
Encodes the domain name (relative or FQDN) to the Punycode.
Function parameters
string decoded_domain_name
Return value
string - encoded domain_name
Example 87.
EncodeDomainName("ĹžĂĹžala.jĹŻlinka.go.home")
-> "xn--ala-qma83eb.xn--jlinka-3mb.go.home"Converts list of UTF-8 strings into their Punycode ASCII repserentation.
Function parameters
list <string> punycode_strings
Return value
list <string> - encoded_strings
Returns the maximum cache size (sum of already converted strings).
Return value
integer - maximum_cache_size
See also:
SetMaximumCacheSize()
Expert Partitioner
Arvin Schnell <aschnell@suse.de>
A region is a list of two integers, the first being the start and the
second the length.
List of Global Functions
Inside - Checks whether region b lies within region a.
List of Global Variables
Registration related stuff
List of Global Functions
Export - AutoYaST interface function: Export()
List of Global Variables
List of Global Functions
Abort - Abort function
AutoPackages - Return packages needed to be installed and removed during Autoinstallation to insure module has all needed software installed.
Export - Dump the reipl settings to a single map (For use by autoinstallation.)
FindBootPartition - Returns the parameters of the boot partition that was found where the MBR was located.
FindSysfsRoot - Find where sysfs has been mounted.
Import - Get all reipl settings from the first parameter (For use by autoinstallation.)
Modified - Has the user modified the dialog values?
Modified - Data was modified?
ModifyReiplWithBootPartition - Modifys the reipl configuration passed in with what it should be for the detected boot partition.
Read - Read all reipl settings
ReadState - Read all reipl settings
SanityCheck - Check to see if reipl is supported by the kernel.
SetModified - Indicate that the data was modified
Summary - Create a textual summary and a list of unconfigured cards
Write - Write all reipl settings
WriteState - Write all reipl setting to the firmware
List of Global Variables
modified - Data was modified?
write_only - Write only, used during autoinstallation. Don't run services and SuSEconfig, it's all done at one place.
Return packages needed to be installed and removed during Autoinstallation to insure module has all needed software installed.
Return value
map - with 2 lists.
Dump the reipl settings to a single map (For use by autoinstallation.)
Return value
map - Dumped settings (later acceptable by Import ())
Returns the parameters of the boot partition that was found where the MBR was located.
Return value
list<string> - a list of parameters
Get all reipl settings from the first parameter (For use by autoinstallation.)
Function parameters
map settings
Return value
boolean - True on success
Has the user modified the dialog values?
Return value
boolean - return true if modified
Modifys the reipl configuration passed in with what it should be for the detected boot partition.
Function parameters
map <string, any> configuration
Return value
map <string, any> - a map of the new configuration.
Check to see if reipl is supported by the kernel.
Return value
boolean - true if support exists.
Create a textual summary and a list of unconfigured cards
Return value
list - summary of the current configuration
Module for Remote Administration via VNC
List of Global Variables
allow_administration - Allow remote administration
default_dm - Default display manager
Function proposes a configuration But only if it hasn't been proposed already
Return value
void
Messages handling
List of Global Functions
AnyQuestion - Question with headline and Yes/No Buttons
ClearAll - Clear all stored messages (errors, messages and warnings)
ClearErrors - Clear stored errors
ClearMessages - Clear stored messages
ClearWarnings - Clear stored warnings
ClearYesNoMessages - Clear stored yes/no messages
DisplayErrors - Error popup dialog can displayed immediately when new error is stored.
DisplayMessages - Message popup dialog can be displayed immediately when a new message is stored.
DisplayWarnings - Warning popup dialog can displayed immediately when new warningr is stored.
DisplayYesNoMessages - Yes/No Message popup dialog can be displayed immediately when a new message is stored.
Error - Store new error text
Export - Dump the Report settings to a map, for autoinstallation use.
GetMessages - Create rich text string from stored warning, message or error messages.
GetModified - Functions which returns if the settings were modified
Import - Get all the Report configuration from a map.
LogErrors - Set warnings logging to .y2log file
LogMessages - Set messages logging to .y2log file
LogWarnings - Set warnings logging to .y2log file
LogYesNoMessages - Set yes/no messages logging to .y2log file
LongError - Store new error text, the text is displayed in a richtext widget - long lines are automatically wrapped
LongMessage - Store new message text, the text is displayed in a richtext widget - long lines are automatically wrapped
LongWarning - Store new warning text, the text is displayed in a richtext widget - long lines are automatically wrapped
Message - Store new message text
NumErrors - Return number of stored errors
NumMessages - Return number of stored messages
NumWarnings - Return number of stored warnings
NumYesNoMessages - Return number of stored yes/no messages
SetModified - Function sets internal variable, which indicates, that any settings were modified, to "true"
ShowText - Store new message text
Summary - Summary of current settings
Warning - Store new warning text
List of Global Variables
Question with headline and Yes/No Buttons
Function parameters
string headline
string message
string yes_button_message
string no_button_message
symbol focus
Return value
boolean - True if Yes is pressed, otherwise false
Error popup dialog can displayed immediately when new error is stored.
Function parameters
boolean display
integer timeout
Return value
void
Message popup dialog can be displayed immediately when a new message is stored.
Function parameters
boolean display
integer timeout
Return value
void
Warning popup dialog can displayed immediately when new warningr is stored.
Function parameters
boolean display
integer timeout
Return value
void
Yes/No Message popup dialog can be displayed immediately when a new message is stored.
Function parameters
boolean display
integer timeout
Return value
void
Dump the Report settings to a map, for autoinstallation use.
Return value
map - Map with settings
Create rich text string from stored warning, message or error messages.
Function parameters
boolean w
boolean e
boolean m
boolean ynm
Return value
string - rich text string
Functions which returns if the settings were modified
Return value
boolean - settings were modified
Get all the Report configuration from a map.
Function parameters
map settings
Return value
boolean - success
Set warnings logging to .y2log file
Function parameters
boolean log
Return value
void
Set messages logging to .y2log file
Function parameters
boolean log
Return value
void
Set warnings logging to .y2log file
Function parameters
boolean log
Return value
void
Set yes/no messages logging to .y2log file
Function parameters
boolean log
Return value
void
Store new error text, the text is displayed in a richtext widget - long lines are automatically wrapped
Function parameters
string error_string
Return value
void
Store new message text, the text is displayed in a richtext widget - long lines are automatically wrapped
Function parameters
string message_string
Return value
void
Store new warning text, the text is displayed in a richtext widget - long lines are automatically wrapped
Function parameters
string warning_string
Return value
void
Return number of stored yes/no messages
Return value
integer - number of messages
Function sets internal variable, which indicates, that any settings were modified, to "true"
Return value
void
Store new message text
Function parameters
string headline_string
string message_string
Return value
void
Summary of current settings
Return value
string - Html formatted configuration summary
Data for configuration of restore, input and output functions.
List of Global Functions
ActivateBootloader - Activate boot loader configuration if requested. Uses variable Restore::runbootloader
ClearInstalledPackagesCache - Clear cache of installed packages. Next use of GetActualInstalledPackages() function will reread installed packages.
Export - Dump the restore settings to a single map - for use by autoinstallation.
GetActualInstalledPackages - Return installed packages. Result is cached in Restore module, so only first use takes long time
GetArchiveComment - Return user comment stored in archive. Comment is stored in file info/comment.
GetArchiveDate - Return date when backup archive was created. Date is stored in archive in file info/date.
GetArchiveFiles - Return list of files in the backup archive
GetArchiveHostname - Return host name of machine on which backup archive was created. Host name is stored in archive in file info/hostname.
GetArchiveInfo - Return restore configuration
GetArchiveInstalledPackages - Return map with packages installed at backup time (form is $["package name" : "version"]).
GetArchiveName - Return name of backup archive
GetExtraPackages - Return extra packages (packages which are installed at restore time, but at restore time they are installed)
GetInputName - Return name of backup archive
GetMismatchedPackages - Return packages which have different version at backup archive and in system
GetMissingPackages - Return missing packages (packages which were installed at backup time, but at restore time they are not installed)
GetSelectedPackages - Returns selected packages (even partially).
Import - Get all restore settings - for use by autoinstallation
IsMultiVolume - Selected archive has more parts
Modified - Return modified flag
MountInput - Mount input source
Read - Read contents of archive
ReadActualInstalledPackages - Read installed packages.
ReadNextVolume - Read next volume of multi volume archive
ResetAll - Clear all settings (archive and list of installed packages)
ResetArchiveSelection - Clear all archive settings
Set - Set settings
SetRestoreSelection - Change restore selection of package.
SetSelectionProperty - Set selection in _auto client and display properties of archive
Summary - Create restore configuration summary. Used in autoinstallation restore module configuration.
TestAllVolumes - Test all volumes together
TotalFilesToRestore - Return number of files which will be unpacked from archive
TotalPackagesToRestore - Return number of packages which will be restored from archive
Umount - Umount mounted file system.
Write - Restore files from archive
List of Global Variables
restoreRPMdb - Rewrite RPM db - unapack /var/lib/rpm/* files from backup if present
runSuSEconfig - Run SuSEconfig after files are restored
runbootloader - Run lilo after files are restored
Activate boot loader configuration if requested. Uses variable Restore::runbootloader
Return value
boolean - true on success
Clear cache of installed packages. Next use of GetActualInstalledPackages() function will reread installed packages.
Return value
void
Dump the restore settings to a single map - for use by autoinstallation.
Return value
map - Dumped settings (later acceptable by Import ())
Return installed packages. Result is cached in Restore module, so only first use takes long time
Return value
map<string,string> - Map $[ "packagename" : "version" ]
Return user comment stored in archive. Comment is stored in file info/comment.
Return value
string - Archive comment
Return date when backup archive was created. Date is stored in archive in file info/date.
Return value
string - Date
Return list of files in the backup archive
Return value
list - Files in the archive
Return host name of machine on which backup archive was created. Host name is stored in archive in file info/hostname.
Return value
string - Host name
Return restore configuration
Return value
map<string, map<string, any> > - Map $[ "packagename" : $["vers" : "version", "files" : ["files in the archive"], "prefix" : "installprefix", "descr" : "Short description", "sel_type" : "X", "sel_file" : ["selected files to restore"] ] ], possible values for "sel_type" key are: "X" - restore all files from archive, " " - do not restore this package, "P" - partial restore, restore only selected files at "sel_file" key. Package name "" means files not owned by any package.
Return map with packages installed at backup time (form is $["package name" : "version"]).
Return value
map<string,string> - Installed packages at backup time
Return extra packages (packages which are installed at restore time, but at restore time they are installed)
Return value
map<string,map<string,string> > - Map $[ "packagename" : $[ "ver" : "version", "descr" : "Short description of the package"]], key description is present only if decription exists
Return packages which have different version at backup archive and in system
Return value
map<string, map <string, string> > - Map $[ "packagename" : $[ "inst": "installed version", "ver" : "version at backup time, "descr" : "Short description of the package"]], key description is present only if decription exists
Return missing packages (packages which were installed at backup time, but at restore time they are not installed)
Return value
map<string, map<string, string> > - Map $[ "packagename" : $[ "ver" : "version", "descr" : "Short description of the package"]], key description is present only if decription exists
Returns selected packages (even partially).
Return value
map<string, map> - Map with same keys as map returned by GetArchiveInfo()
Get all restore settings - for use by autoinstallation
Function parameters
map settings
Return value
boolean - True on success
Selected archive has more parts
Return value
boolean - boolen True if archive have more than one part.
Mount input source
Function parameters
string input
Return value
map - Map $[ "success" : boolean (true on success), "mpoint" : string (mount point), "file" : string (file name on the local system) ];
Read contents of archive
Function parameters
string input
Return value
boolean - True if archive was succesfully read, otherwise false (file does not exist, not tar archive, broken archive, archive not created by Backup module, ...)
Read installed packages.
Return value
map<string,string> - Map $[ "packagename" : "version" ]
Read next volume of multi volume archive
Function parameters
string input
Return value
map - Map $[ "success" : boolean (true on success), "lastvolume" : boolean (true if archive is last volume) ]
Change restore selection of package.
Function parameters
string pkgname
map selection
Return value
void
Set selection in _auto client and display properties of archive
Function parameters
map<string,map> settings
Return value
void
Create restore configuration summary. Used in autoinstallation restore module configuration.
Return value
string - rich text summary
Test all volumes together
Return value
boolean - True: all volumes are OK, false: an error occured
Return number of files which will be unpacked from archive
Return value
integer - Total selected files
Return number of packages which will be restored from archive
Return value
integer - Total selected packages
Rich text manipulation routines
List of Global Functions
DetectRichText - Parse provided text and see if it contains richtext
Rich2Plain - Convert a richtext string into a formatted plain text.
List of Global Variables
Parse provided text and see if it contains richtext
Function parameters
string file
Return value
symbol
Arvin Schnell <arvin@suse.de>
Purpose: Responsible for searching of root partitions and
mounting of target partitions.
List of Global Functions
FindRootPartitions - Find all valid root partitions and place the result in rootPartitions. The partitions are mounted and unmounted again (to Installation::destdir). Loads a bunch of kernel modules.
GetInfoOfSelected - Get the key what of the selected root partition.
IncompleteInstallationDetected - Checks the partition whether it contains an incomplete installation.
MountPartitions - Mounting root-partition; reading fstab and mounting read partitions
SetSelectedToValid - Set the selected root partition to some valid one. Only make sense if the number of valid root partition is one.
UnmountPartitions - Unmount all mounted partitions, deactivate swaps, detach loopback devices. Uses list activated to make actions in reverse order.
List of Global Variables
Function parameters
string headline
string question
string button_yes
string button_no
string details
Return value
boolean
Find all valid root partitions and place the result in rootPartitions. The partitions are mounted and unmounted again (to Installation::destdir). Loads a bunch of kernel modules.
Return value
void
Get the key what of the selected root partition.
Function parameters
symbol what
Return value
string
Checks the partition whether it contains an incomplete installation.
Function parameters
string mounted_to
Return value
boolean - true if incomplete
See also:
BNC #441919
Mounting root-partition; reading fstab and mounting read partitions
Function parameters
string root_device_current
Return value
boolean
Set the selected root partition to some valid one. Only make sense if the number of valid root partition is one.
Return value
void
Routing data (/etc/sysconfig/network/routes)
List of Global Functions
Export - Dump the Routing settings to a map, for autoinstallation use.
GetDevices - Get the current devices list
GetGateway - Get the default gateway
Import - Get all the Routing configuration from a map. When called by routing_auto (preparing autoinstallation data) the map may be empty.
Modified - Data was modified?
Read - Read routing settings If no routes, sets a default gateway from Detection
ReadFromGateway - Set the routes to contain only the default route, if it is defined. Used when there is nothing better.
RemoveDefaultGw - Remove route with default gateway from Routes list
SetDevices - Set the available devices list (for expert routing dialog)
Summary - Create routing text summary
Write - Write routing settings and apply changes
Dump the Routing settings to a map, for autoinstallation use.
Return value
map - autoinstallation settings
Get all the Routing configuration from a map. When called by routing_auto (preparing autoinstallation data) the map may be empty.
Function parameters
map settings
Return value
boolean - true if success
Read routing settings If no routes, sets a default gateway from Detection
Return value
boolean - true if success
Set the routes to contain only the default route, if it is defined. Used when there is nothing better.
Function parameters
string gw
Return value
boolean - true if success
Set the available devices list (for expert routing dialog)
Function parameters
list devs
Return value
boolean - true if success
Service manipulation
Data for configuration of services, input and output functions.
Martin Vidner <mvidner@suse.cz>
Petr Blahos <pblahos@suse.cz>
Martin Lazar <mlazar@suse.cz>
List of Global Functions
CheckPortmap - Check for portmap. Portmap should be started if inetd, nfs, nfsserver, nis, ... is started. This checks the dependency.
ClearServices - Set all dirty services as clean and tries to read original "start"/"stop" for them.
Export - Export user settings.
FilterAlreadyDoneServices - Gets a list of dependent services and a target state they should be in. Filters out those that are already in the target state. If both init_time and run_time are on, a conjunction is needed.
GetModified - Returns true if the settings were modified
GetRunlevel4Support - Returns whether runlevel 4 is supported in RLEd.
Import - Import user settings
Init - Init function.
Read - Read settings
ServiceDependencies - Resolve which services need to be enabled/disabled
ServiceInstall - Enable specified service, and all required services.
ServiceRemove - Disable specified service, and all dependence services.
SetModified - Function sets an internal variable indicating that any settings were modified to "true". Used for autoinst cloning.
SetRunlevel4Support - Sets whether runlevel 4 should be supported.
StartContainsImplicitly - Is a service started in a runlevel, given the list of rulevels it is started in? This looks like a simple contains, but "B" implicitly expands to all runlevels. See also bug #17234.
Summary -
Write - Save changed services into proper runlevels. Save also changed default runlevel.
getDefaultPicker - Returns items for default runlevel combo box. (Excludes 0, 1, 6, S and B)
getRunlevelDescr - Returns textual runlevel description. Descriptions are hard-coded in ycp script.
isDirty - Were some settings changed?
isDisabled - Is a service disabled? Checks whether the default runlevel is in the list of runlevels
List of Global Variables
current - Current runlevel
default_runlevel - Default runlevel (after boot)
runlevels - List of all runlevels available in the system.
service_list - List of all service names. Filled by Read, used to get all services' status.
services - List of all services. Each item is a map described above. @ref service
x11_selected - Proposal parameter: if it changes, we repropose
Check for portmap. Portmap should be started if inetd, nfs, nfsserver, nis, ... is started. This checks the dependency.
Return value
string - name of the first enabled service that requires portmap
Set all dirty services as clean and tries to read original "start"/"stop" for them.
Return value
void
Export user settings.
Return value
map - user settings:<pre>$[ "services": $[ map of dirty services ], "default": the default runlevel, if changed, ]</pre>
Gets a list of dependent services and a target state they should be in. Filters out those that are already in the target state. If both init_time and run_time are on, a conjunction is needed.
Function parameters
list<string> svcs
list<string> rls
boolean enable
boolean init_time
boolean run_time
Return value
list<string>
Returns true if the settings were modified
Return value
boolean - settings were modified
Returns whether runlevel 4 is supported in RLEd.
Return value
boolean - supported
Import user settings
Function parameters
map s
Return value
boolean - success state
See also:
Export
Init function.
Return value
void
See also:
FATE #303798: YaST2 runlevel editor: offer easy enablement and configuration of runlevel 4
Resolve which services need to be enabled/disabled
Function parameters
string service
boolean enable
Return value
list<string> - a list of services (excluding itself) required to start a service (enable) or to be stopped because they require the service (disable), ordered by their dependencies. Missing services are included, system facilities excluded.<br> If dependencies are disabled, returns an empty list, as if there were no dependencies.
Enable specified service, and all required services.
Function parameters
string service
list<string> rls
Return value
integer - 0 = ok, 1 = service not found
Disable specified service, and all dependence services.
Function parameters
string service
list<string> rls
Return value
integer - 0 = ok
Function sets an internal variable indicating that any settings were modified to "true". Used for autoinst cloning.
Return value
void
Sets whether runlevel 4 should be supported.
Function parameters
boolean new_state
Return value
void
See also:
FATE #303798
Is a service started in a runlevel, given the list of rulevels it is started in? This looks like a simple contains, but "B" implicitly expands to all runlevels. See also bug #17234.
Function parameters
list<string> rls
string rl
Return value
boolean - should it be running in rl?
Save changed services into proper runlevels. Save also changed default runlevel.
Return value
boolean - success
Returns items for default runlevel combo box. (Excludes 0, 1, 6, S and B)
Function parameters
symbol mode
Return value
list - List of items. Default is selected.
Returns textual runlevel description. Descriptions are hard-coded in ycp script.
Function parameters
string rl
Return value
string - Description.
Access to SLP Agent functions
List of Global Functions
AttrSummary - Attribute summary
DeReg - Deregister service with SLP
DeRegFile - De-Register service with SLP by removing the reg file
FindAttrs - Find attributes of a service
FindSrvTypes - Issues an SLP service type request for service types in the scopes indicated by the pcScopeList.
FindSrvs - Issue the query for services
GetAttrMap - Find attributes of a service and return a map
GetUnicastAttrMap - Find attributes (using unicast query) of a service and return a map
MatchType - Match Srv Type and return all data
Reg - Register service with SLP
RegFile - Register service with SLP using a reg file
UnicastFindAttrs - Find attributes of a service using a unicast query
List of Global Variables
Attribute summary
Function parameters
list<string> Attrs
Return value
string - summary
Deregister service with SLP
Function parameters
string service
Return value
boolean - True on success
De-Register service with SLP by removing the reg file
Function parameters
string regfile
Return value
boolean - True on success
Find attributes of a service
Function parameters
string pcURLOrServiceType
Return value
list<string> - attributes
Issues an SLP service type request for service types in the scopes indicated by the pcScopeList.
Function parameters
string pcNamingAuthority
string pcScopeList
Return value
list<string> - Service Types
Issue the query for services
Function parameters
string pcServiceType
string pcScopeList
Return value
list<map> - List of Services
Find attributes of a service and return a map
Function parameters
string pcURLOrServiceType
Return value
map<string,string> - attributes
Find attributes (using unicast query) of a service and return a map
Function parameters
string pcURLOrServiceType
string ip
Return value
map<string,string> - attributes
Match Srv Type and return all data
Function parameters
string match
Return value
list<map> - list of services matching with all relevant data
Register service with SLP
Function parameters
string service
Return value
boolean - True on success
Register service with SLP using a reg file
Function parameters
string service
map<string,string> attr
string regfile
Return value
boolean - True on Success
Data for configuration of samba-client, input and output functions.
List of Global Functions
AdjustSharesServices - adjust the services for sharing
AutoPackages - Return required packages for auto-installation
Export - Dump the samba-client settings to a single map (For use by autoinstallation.)
GetDHCP - Check if dhcp.conf is included in smb.conf
GetGuessAccess - check if shares guest access is allowed
GetHostsResolution - Read /etc/nsswitch.conf and check if WINS is used for hosts resolution
GetMaxShares - get number of max shares from smb.conf; 0 mean shares are not enabled
GetModified - Data was modified?
GetPAMMountVolumes - Return the list of 'volume' entries from pam_mount.conf.xml
GetSSHSupport - Get the current status of ssh single-sign-on support
GetWinbind - Get a winbind status
GetWinbindCaching - Get the current status of winbind caching
GetWorkgroup - Get a host workgroup
Import - Get all samba-client settings from the first parameter (For use by autoinstallation.)
Read - Read all samba-client settings
ReadMkHomeDir - Read the state of mkhomedir in /etc/pam.d/common-session (bug #143519)
ReadPAMMount - Read the data from /etc/security/pam_mount.conf.xml regarding mounting user's home directories
ReadSSHSupport - Read the current status of ssh single-sign-on support (fate #303415)
ReadSharesSetting - Read user shares settings
SetDHCP - Set the support of DHCP (include dhcp.conf in smb.conf)
SetGuessAccess - Set the new value for guest access (#144787)
SetHostsResolution - Set the new value for hosts resolution
SetMkHomeDir - Set the new value of mkhomedir
SetPAMMountVolumes - Set the new list of 'volume' entries
SetSSHSupport - Set the new value for sh single-sign-on support
SetShares - set the new values for user shares
SetStartFAM - update the information if FAM should be started
SetWinbind - Set a windind status
SetWinbindCaching - Set the new value for winbind caching (see bug #143927)
SetWorkgroup - Set a host workgroup
ShortSummary - Create shorter textual summary and a list of unconfigured options
Summary - Create a textual summary and a list of unconfigured options
UpdatedArchPackages - Return list of architecture specific packages (derived from package list given as parameter) merged with the packages in parameter
Write - Write all samba-client settings
WriteHostsResolution - Write /etc/nsswitch.conf if modified
WriteMkHomeDir - Write the new value of pam_mkhomedir to /etc/pam.d/common-session
WritePAMMount - Write the changes to /etc/security/pam_mount.conf.xml
WriteSSHSupport - Write the new value for sh single-sign-on support (fate #303415)
WriteShares - create the shares directory with correct rights
List of Global Variables
globals_configured - Are globals already configured (for AutoYaST)
mkhomedir - if pam_mkhomedir is set in /etc/pam.d/commond-session
modified - Data was modified?
password_data - map with user name and password (used for autoinstallation only)
start_fam - If FAM should be started
winbind_enabled - Should be winbind enabled?
write_only - Write only, used during autoinstallation. Don't run services and SuSEconfig, it's all done at one place.
adjust the services for sharing
Function parameters
boolean write_only
Return value
boolean
Return required packages for auto-installation
Return value
map - of packages to be installed and to be removed
Dump the samba-client settings to a single map (For use by autoinstallation.)
Return value
map - Dumped settings (later acceptable by Import ())
Read /etc/nsswitch.conf and check if WINS is used for hosts resolution
Return value
boolean
get number of max shares from smb.conf; 0 mean shares are not enabled
Return value
integer
Return the list of 'volume' entries from pam_mount.conf.xml
Return value
list<map>
Get all samba-client settings from the first parameter (For use by autoinstallation.)
Function parameters
map settings
Return value
boolean - True on success
Read the state of mkhomedir in /etc/pam.d/common-session (bug #143519)
Return value
boolean
Read the data from /etc/security/pam_mount.conf.xml regarding mounting user's home directories
Return value
boolean
Read the current status of ssh single-sign-on support (fate #303415)
Return value
boolean
Set the support of DHCP (include dhcp.conf in smb.conf)
Function parameters
boolean new
Return value
boolean - if status was changed
Set the new value for guest access (#144787)
Function parameters
boolean guest
Return value
boolean
Set the new value for hosts resolution
Function parameters
boolean resolve
Return value
boolean
Set the new value of mkhomedir
Function parameters
boolean new_value
Return value
boolean
Set the new list of 'volume' entries
Function parameters
list<map> new_volumes
Return value
void
Set the new value for sh single-sign-on support
Function parameters
boolean enable
Return value
boolean
set the new values for user shares
Function parameters
integer max
string group
Return value
boolean
update the information if FAM should be started
Function parameters
boolean fam
Return value
boolean - current fam status
Set the new value for winbind caching (see bug #143927)
Function parameters
boolean enable
Return value
boolean
Create shorter textual summary and a list of unconfigured options
Return value
string - summary of the current configuration
Create a textual summary and a list of unconfigured options
Return value
string - summary of the current configuration
Return list of architecture specific packages (derived from package list given as parameter) merged with the packages in parameter
Function parameters
list<string> packages
Return value
list<string>
Write all samba-client settings
Function parameters
boolean write_only
Return value
boolean - true on success
Write the new value of pam_mkhomedir to /etc/pam.d/common-session
Function parameters
boolean enabled
Return value
boolean
Write the new value for sh single-sign-on support (fate #303415)
Function parameters
boolean enable
Return value
boolean
Scanner settings, input and output functions
List of Global Functions
Abort - Abort function
ActivateBackend - Activate the backend in /etc/sane.d/dll.conf according to the specified backend_name or if the specified backend_name is the empty string then set the backend_name according to a specified database_index.
AutoPackages - Return packages needed to be installed and removed during autoinstallation to insure module has all needed software installed.
DeactivateBackend - Deactivate the backend in /etc/sane.d/dll.conf according to the specified backend_name or if the specified backend_name is the empty string then set the backend_name according to a specified database_index.
DetermineNetworkScanningConfig - Determine the network scanning config by calling a bash script which calls "grep ... /etc/sane.d/net.conf" and "grep ... /etc/sane.d/saned.conf" and processes its output and stores the results as YCP map in a temporary file and then read the temporary file (SCR::Read) to get the YCP map. Additionally call SuSEFirewall functions to determine the firewall settings regarding remote access to the saned (service "sane-port" 6566/tcp,6566/udp).
Export - Dump the scanner settings to a single map. For use by autoinstallation.
Import - Get all scanner settings from the first parameter. For use by autoinstallation.
ModelItems - Create a list of items from the database entries which is used for the SelectionBox in the SelectModelDialog
Modified - Something was committed to the system?
OverviewContents - Create the content for WizardHW::SetContents
Read - Read all scanner settings: - Check installed packages - Read or create the scanner database - Determine active scanners - Determine active backends - Try to autodetect USB and SCSI scanners and HP all-in-one USB and NETWORK scanners
RestartDetection - Restart the whole autodetection by calling all autodetection functions in the same order as during the initial Read(): DetermineActiveScanners results a new active_scanners map which is empty if nothing was detected or if DetermineActiveScanners fails. DetermineActiveBackends results a new active_backends list which is empty if nothing was detected or if DetermineActiveBackends fails. AutodetectScanners results a new autodetected_scanners map which is empty if nothing was detected or if AutodetectScanners fails. RestartDetection is called when the user restarts the detection in the OverviewDialog and if testing of an active scanner failed (see the TestBackend function). The result is that all information in the OverviewDialog is recreated.
RunHpsetup - Run hp-setup:
SetupNetworkScanningConfig - Setup the network scanning config by calling a bash script which activates or deactivates the "net" backend and which writes into /etc/sane.d/net.conf, /etc/sane.d/saned.conf, and /etc/xinetd.d/sane-port and reloads or starts the xinetd dependig on whether it is running or not. Additionally call SuSEFirewall functions to commit changed firewall settings regarding remote access to the saned (service "sane-port" 6566/tcp,6566/udp).
TestBackend - Test the backend according to the specified backend_name.
Write - Write scanner settings: - Save the actual environment
List of Global Variables
active_backends - Active backends: Determined at runtime via Scanner::DetermineActiveBackends() which calls the bash script "/usr/lib/YaST2/bin/determine_active_scanner_backends YCP" which outputs on stdout a YCP list of backends [ "The name of the backend", ... "" ] where the last list entry is an empty string.
active_scanners - Active scanners: Determined at runtime via Scanner::DetermineActiveScanners() which calls the bash script "/usr/lib/YaST2/bin/determine_active_scanners YCP" which outputs on stdout a YCP list of @ref active_scanner_map where the last list entry is an emtpy map.
actual_environment - Environment values: It is a map of @ref environment_values
autodetected_scanners - Autodetected scanners: Determined at runtime via Scanner::AutodetectScanners() which calls the bash script /usr/lib/YaST2/bin/autodetect_scanners YCP which calls "sane-find-scanner" and (if available) "hp-probe" which may result for example the description strings in the example below. Only in case of USB an automated extraction of manufacturer is possible. If there are two '[...]' substrings then the first one is the manufacturer and the second one is the model (but there may be only one or none substring). The result is a YCP list of @ref autodetected_scanner_map where the last list entry is an emtpy map.
database - Scanner database: When package version of sane-backends/hplip/iscan/iscan-free changes the database is created anew in Scanner::Read() which calls the bash script "/usr/lib/YaST2/bin/create_scanner_database YCP" which outputs on stdout a YCP list of @ref scanner_model_map where the last list entry is an emtpy map.
database_manufacturers - Manufacturer list: List of unique manufacturer names. Derived during startup from the scanner database (in the Read function stage "Read or create the scanner database").
database_usbids - Known USB scanner USB IDs list: List of known USB scanner USB vendor and product IDs. Derived during startup from the scanner database (in the Read function stage "Read or create the scanner database").
firewall_config - Firewall network scanning configuration: Determined at runtime via Scanner::DetermineNetworkScanningConfig() which calls SuSEFirewall functions to fill the map @ref firewall_config except "ui_no_firewall_for_int" and "ui_deny_from_ext" which are the user settings in the dialog. The entries are such that "true" is the default, reasonable and intended setting.
ignore_unknown_USB_scanners - Ignore unknown USB scanners: Whether or not unknown USB scanners should be ignored during AutodetectScanners. As there is no USB device class for scanners (they have the unspecific USB device class 255), sane-find-scanner can only do some best guess to determine if a USB device is a scanner or not. Therefore also other USB devices with the device class 255 are reported as possible USB scanners. Preset to true so that initially only scanners for which the USB IDs are known by SANE are shown. It changes to false (i.e. show all USB devices with the device class 255 as possible USB scanners) when the user explicitely requests a "Restart Detection" in the OverviewDialog. A second "Restart Detection" changes it back to true so that "Restart Detection" toggles it. The idea behind is that the user can simply "Restart Detection" as often as he likes until the result is o.k. for him because "Restart Detection" does not cause harm and it avoids a separated button or check-box to determine the autodetection behaviour which would require additional explanatory (complicated) help text about the whole stuff. Examples: Assume there is a known powered-off USB scanner and another USB device with class 255: Initially nothing is shown. After the first "Restart Detection" only the other USB device with class 255 is shown. This unexpected result makes the user think about what is wrong and he powers-on the scanner. After the second "Restart Detection" only the USB scanner is shown. Assume there is an unknown powered-off USB scanner and another USB device with class 255. Initially nothing is shown. After the first "Restart Detection" only the other USB device with class 255 is shown. This unexpected result makes the user think about what is wrong and he powers-on the scanner. After the second "Restart Detection" nothing is shown. A third "Restart Detection" shows both the USB scanner and the other USB device with class 255. This is the best possible result because it is not possible to show only the unknown USB scanner.
modified - Something was committed to the system? True if system may have been modified.
network_scanning_config - Network scanning configuration: Determined at runtime via Scanner::DetermineNetworkScanningConfig() which calls the bash script "/usr/lib/YaST2/bin/determine_network_scanner_config YCP" which outputs on stdout a YCP map @ref network_scanner_config
number_chars - Explicite listing of all alphanumeric ASCII characters. The reason is that in certain special locales for example [a-z] is not equivalent to "abcdefghijklmnopqrstuvwxyz" because in certain special languages the 'z' is not the last character in the alphabet, e.g. the Estonian alphabet ends with ... s ... z ... t u v w ... x y (non-ASCII characters omitted here) so that [a-z] would exclude t u v w x y in an Estonian locale. Therefore uppercase and lowercase characters are both explicitely listed to avoid any unexpected result e.g. of "tolower(uppercase_characters)".
selected_autodetected_scanners_index - Selected autodetected scanners index: The index in the autodetected scanners list (of autodetected scanner maps) for the model which was selected by the user in the OverviewDialog. Preset to -1 which indicates that no model is selected.
selected_model_database_index - Selected model database index: The index in the scanner database list (of model maps) for the model which was selected by the user in the SelectModelDialog. Preset to -1 which indicates that no model is selected.
write_only - Write only, used during autoinstallation. Don't run services and SuSEconfig, it's all done at one place.
Activate the backend in /etc/sane.d/dll.conf according to the specified backend_name or if the specified backend_name is the empty string then set the backend_name according to a specified database_index.
Function parameters
string backend_name
integer database_index
boolean user_confirmation
Return value
boolean - true on success
Return packages needed to be installed and removed during autoinstallation to insure module has all needed software installed.
Return value
map - with 2 lists.
Deactivate the backend in /etc/sane.d/dll.conf according to the specified backend_name or if the specified backend_name is the empty string then set the backend_name according to a specified database_index.
Function parameters
string backend_name
integer database_index
boolean user_confirmation
Return value
boolean - true on success
Determine the network scanning config by calling a bash script which calls "grep ... /etc/sane.d/net.conf" and "grep ... /etc/sane.d/saned.conf" and processes its output and stores the results as YCP map in a temporary file and then read the temporary file (SCR::Read) to get the YCP map. Additionally call SuSEFirewall functions to determine the firewall settings regarding remote access to the saned (service "sane-port" 6566/tcp,6566/udp).
Return value
boolean - true on success
Dump the scanner settings to a single map. For use by autoinstallation.
Return value
map - Dumped settings (later acceptable by Import ())
Get all scanner settings from the first parameter. For use by autoinstallation.
Function parameters
map settings
Return value
boolean - true on success
Create a list of items from the database entries which is used for the SelectionBox in the SelectModelDialog
Function parameters
string filter_string
Return value
list - of model strings (manufacturer, model, backend, comment)
Something was committed to the system?
Return value
boolean - true if system may have been modified
Create the content for WizardHW::SetContents
Return value
list< map< string, any > > - a list of maps with keys "id" : string = the identification of the device, "rich_descr" : string = RichText description of the device "table_descr" : list<string> = fields of the table
Read all scanner settings: - Check installed packages - Read or create the scanner database - Determine active scanners - Determine active backends - Try to autodetect USB and SCSI scanners and HP all-in-one USB and NETWORK scanners
Return value
boolean - true on success
Restart the whole autodetection by calling all autodetection functions in the same order as during the initial Read(): DetermineActiveScanners results a new active_scanners map which is empty if nothing was detected or if DetermineActiveScanners fails. DetermineActiveBackends results a new active_backends list which is empty if nothing was detected or if DetermineActiveBackends fails. AutodetectScanners results a new autodetected_scanners map which is empty if nothing was detected or if AutodetectScanners fails. RestartDetection is called when the user restarts the detection in the OverviewDialog and if testing of an active scanner failed (see the TestBackend function). The result is that all information in the OverviewDialog is recreated.
Return value
boolean - true in any case (errors result only empty maps or list).
Run hp-setup:
Return value
boolean - false if hp-setup cannot be run and return true in any other case because there is no usable exit code of hp-setup (always zero even in case of error).
Setup the network scanning config by calling a bash script which activates or deactivates the "net" backend and which writes into /etc/sane.d/net.conf, /etc/sane.d/saned.conf, and /etc/xinetd.d/sane-port and reloads or starts the xinetd dependig on whether it is running or not. Additionally call SuSEFirewall functions to commit changed firewall settings regarding remote access to the saned (service "sane-port" 6566/tcp,6566/udp).
Return value
boolean - true on success
Test the backend according to the specified backend_name.
Function parameters
string backend_name
Return value
boolean - true on success
Active backends: Determined at runtime via Scanner::DetermineActiveBackends() which calls the bash script "/usr/lib/YaST2/bin/determine_active_scanner_backends YCP" which outputs on stdout a YCP list of backends [ "The name of the backend", ... "" ] where the last list entry is an empty string.
Active scanners: Determined at runtime via Scanner::DetermineActiveScanners() which calls the bash script "/usr/lib/YaST2/bin/determine_active_scanners YCP" which outputs on stdout a YCP list of @ref active_scanner_map where the last list entry is an emtpy map.
active_scanner_map
$[ "backend":"The name of the backend (required)",
"sane_device":"The SANE device (required)",
"manufacturer":"The manufacturer name of the scanner (required)",
"model":"The model name of the scanner (required)",
]Environment values: It is a map of @ref environment_values
environment_values
$[ "sane-backends_version":"What 'rpm -q sane-backends' returns (required)",
"hplip_version":"What 'rpm -q hplip' returns (required)",
"iscan_version":"What 'rpm -q iscan' returns (required)"
"iscan-free_version":"What 'rpm -q iscan-free' returns (required)"
]Autodetected scanners: Determined at runtime via Scanner::AutodetectScanners() which calls the bash script /usr/lib/YaST2/bin/autodetect_scanners YCP which calls "sane-find-scanner" and (if available) "hp-probe" which may result for example the description strings in the example below. Only in case of USB an automated extraction of manufacturer is possible. If there are two '[...]' substrings then the first one is the manufacturer and the second one is the model (but there may be only one or none substring). The result is a YCP list of @ref autodetected_scanner_map where the last list entry is an emtpy map.
autodetected_scanner_map
$[ "connection":"Either USB or SCSI or NETWORK (required)",
"device":"The device, e.g. '/dev/sg0' or 'libusb:001:002' (may be the empty string)"
"manufacturer":"The manufacturer name of the scanner (may be the empty string)",
"usb_vendor_id":"The vendor ID (e.g. 0x04b8) of a USB scanner (may be the empty string)",
"model":"The model name of the scanner (may be the empty string)",
"usb_product_id":"The product ID (e.g. 0x010b) of a USB scanner (may be the empty string)",
"description":"The sane-find-scanner output description string (required)"
]Scanner database: When package version of sane-backends/hplip/iscan/iscan-free changes the database is created anew in Scanner::Read() which calls the bash script "/usr/lib/YaST2/bin/create_scanner_database YCP" which outputs on stdout a YCP list of @ref scanner_model_map where the last list entry is an emtpy map.
scanner_model_map
$[ "package":"The package which provides the backend: sane-backends/hplip/iscan/iscan-free (required)",
"backend":"The name of the backend (required)",
"manufacturer":"The manufacturer name of the scanner (required)",
"model":"The model name of the scanner (required)",
"firmware":"Whether or not firmware upload is required (value is 'required' or the empty string)",
"interface":"None or one or more scanner interfaces (may be the empty string)",
"usbid":"USBvendorID:USBproductID" e.g. "0x0a1b:0x2c3d" (may be the empty string)",
"status":"The support status: basic/complete/good/minimal/unsupported/untested (required)",
"comment":"An optional comment (may be the empty string)"
]Manufacturer list: List of unique manufacturer names. Derived during startup from the scanner database (in the Read function stage "Read or create the scanner database").
Known USB scanner USB IDs list: List of known USB scanner USB vendor and product IDs. Derived during startup from the scanner database (in the Read function stage "Read or create the scanner database").
Firewall network scanning configuration: Determined at runtime via Scanner::DetermineNetworkScanningConfig() which calls SuSEFirewall functions to fill the map @ref firewall_config except "ui_no_firewall_for_int" and "ui_deny_from_ext" which are the user settings in the dialog. The entries are such that "true" is the default, reasonable and intended setting.
firewall_config
$[ "suse_firewall_used":"true if Suse Firewall and no other firewall is used",
"firewall_active":"true if Suse Firewall is actually running",
"no_firewall_for_int":"true if Suse Firewall does not potect the INT zone",
"ui_no_firewall_for_int":"true if user has set in dialog no Suse Firewall protection for INT",
"denied_from_ext":"true if saned access (sane-port 6566) is denied from EXT zone",
"ui_deny_from_ext":"true if user has set in dialog to deny access from EXT"
]Ignore unknown USB scanners: Whether or not unknown USB scanners should be ignored during AutodetectScanners. As there is no USB device class for scanners (they have the unspecific USB device class 255), sane-find-scanner can only do some best guess to determine if a USB device is a scanner or not. Therefore also other USB devices with the device class 255 are reported as possible USB scanners. Preset to true so that initially only scanners for which the USB IDs are known by SANE are shown. It changes to false (i.e. show all USB devices with the device class 255 as possible USB scanners) when the user explicitely requests a "Restart Detection" in the OverviewDialog. A second "Restart Detection" changes it back to true so that "Restart Detection" toggles it. The idea behind is that the user can simply "Restart Detection" as often as he likes until the result is o.k. for him because "Restart Detection" does not cause harm and it avoids a separated button or check-box to determine the autodetection behaviour which would require additional explanatory (complicated) help text about the whole stuff. Examples: Assume there is a known powered-off USB scanner and another USB device with class 255: Initially nothing is shown. After the first "Restart Detection" only the other USB device with class 255 is shown. This unexpected result makes the user think about what is wrong and he powers-on the scanner. After the second "Restart Detection" only the USB scanner is shown. Assume there is an unknown powered-off USB scanner and another USB device with class 255. Initially nothing is shown. After the first "Restart Detection" only the other USB device with class 255 is shown. This unexpected result makes the user think about what is wrong and he powers-on the scanner. After the second "Restart Detection" nothing is shown. A third "Restart Detection" shows both the USB scanner and the other USB device with class 255. This is the best possible result because it is not possible to show only the unknown USB scanner.
Network scanning configuration: Determined at runtime via Scanner::DetermineNetworkScanningConfig() which calls the bash script "/usr/lib/YaST2/bin/determine_network_scanner_config YCP" which outputs on stdout a YCP map @ref network_scanner_config
network_scanner_config
$[ "net_backend_hosts":"Comma seperated list of hosts in /etc/sane.d/net.conf",
"saned_hosts":"Comma seperated list of hosts or subnets in /etc/sane.d/saned.conf"
]Explicite listing of all alphanumeric ASCII characters. The reason is that in certain special locales for example [a-z] is not equivalent to "abcdefghijklmnopqrstuvwxyz" because in certain special languages the 'z' is not the last character in the alphabet, e.g. the Estonian alphabet ends with ... s ... z ... t u v w ... x y (non-ASCII characters omitted here) so that [a-z] would exclude t u v w x y in an Estonian locale. Therefore uppercase and lowercase characters are both explicitely listed to avoid any unexpected result e.g. of "tolower(uppercase_characters)".
Selected autodetected scanners index: The index in the autodetected scanners list (of autodetected scanner maps) for the model which was selected by the user in the OverviewDialog. Preset to -1 which indicates that no model is selected.
Selected model database index: The index in the scanner database list (of model maps) for the model which was selected by the user in the SelectModelDialog. Preset to -1 which indicates that no model is selected.
Data for the security configuration
List of Global Functions
Abort - Abort function
Export - Dump the security settings to a single map (For use by autoinstallation.)
GetModified - Function which returns if the settings were modified
Import - Get all security settings from the first parameter (For use by autoinstallation.)
Modified - Data was modified?
Overview - Create an overview table with all configured cards
PollAbort - Check for pending Abort press
Read - Read all security settings
SetModified - Function sets internal variable, which indicates, that any settings were modified, to "true"
Summary - Create a textual summary and a list of unconfigured cards
Write - Write all security settings
List of Global Variables
AbortFunction - Abort function return boolean return true if abort
PasswordMaxLengths - Number of sigificant characters in the password
Settings - All security settings
modified - Data was modified?
Dump the security settings to a single map (For use by autoinstallation.)
Return value
map - Dumped settings (later acceptable by Import ())
Function which returns if the settings were modified
Return value
boolean - settings were modified
Get all security settings from the first parameter (For use by autoinstallation.)
Function parameters
map settings
Return value
boolean - True on success
Function sets internal variable, which indicates, that any settings were modified, to "true"
Return value
void
Create a textual summary and a list of unconfigured cards
Return value
list - summary of the current configuration
Service manipulation
Martin Vidner <mvidner@suse.cz>
Petr Blahos <pblahos@suse.cz>
Michal Svec <msvec@suse.cz>
Lukas Ocilka <locilka@suse.cz>
List of Global Functions
Adjust - Adjust runlevels in which the service runs.
Disable - Disable service
Enable - Enable service
Enabled - Check if service is enabled
EnabledServices - Get list of enabled services in a runlevel
Error - Error Message
Find - Return the first of the list of services which is available (has init script) or "" if none is.
Finetune - Set service to run in selected runlevels.
FullInfo - Get service info and find out whether service is running.
Info - Get service info without peeking if service runs.
Reload - Reload service
Restart - Restart service
RunInitScript - Run init script.
RunInitScriptWithTimeOut - Run init script with a time-out.
Start - Start service
Status - Get service status.
Stop - Stop service
List of Global Variables
Adjust runlevels in which the service runs.
Function parameters
string name
string action
Return value
boolean - success state
Disable service
Function parameters
string service
Return value
boolean - true if operation is successful
Enable service
Function parameters
string service
Return value
boolean - true if operation is successful
Check if service is enabled
Function parameters
string name
Return value
boolean - true if service is set to run in any runlevel
Get list of enabled services in a runlevel
Function parameters
integer runlevel
Return value
list<string> - enabled services
Return the first of the list of services which is available (has init script) or "" if none is.
Function parameters
list <string> services
Return value
string - the first found service
Set service to run in selected runlevels.
Function parameters
string name
list rl
Return value
boolean - success state
Get service info and find out whether service is running.
Function parameters
string name
Return value
map - service map or empty map ($[])
Get service info without peeking if service runs.
Function parameters
string name
Return value
map - Service information or empty map ($[])
Reload service
Function parameters
string service
Return value
boolean - true if operation is successful
Restart service
Function parameters
string service
Return value
boolean - true if operation is successful
Run init script.
Function parameters
string name
string param
Return value
integer - exit value
Run init script with a time-out.
Function parameters
string name
string param
Return value
integer - exit value
Start service
Function parameters
string service
Return value
boolean - true if operation is successful
Get service status.
Function parameters
string name
Return value
integer - init script exit status or -1 if it does not exist
List of Global Functions
CheckSignatures - A semi-public helper. Convert the kernel parameter to the sysconfig string
CheckSignaturesInYaST - Should signatures be checked at all? Check a sysconfig variable (or a kernel parameter for the 1st installation stage).
GetDefaultDialogReturn - Function returns the default popup return value for case when user selected "don't show again"
GetShowThisPopup - Function returns whether user want's to show the dialog (again). true is the default if nothing is set.
ImportGPGKeyDialog - ImportGPGKeyDialog
ImportGPGKeyIntoTrustedDialog - ImportUntrustedGPGKeyIntoTrustedDialog
ItemSignedWithPublicSignature - Used for file or package signed by a public key. This key is still not listed in trusted keys.
ItemSignedWithUnknownSignature - Used for file or package signed by unknown key.
SetDefaultDialogReturn - Function sets the default dialog return value for case when user selected "don't show again"
SetShowThisPopup - Functions sets whether user want's to show the dialog again
UseCorruptedItem - Used for corrupted file or package. Opens dialog asking whether user wants to use this corrupted item.
UseFileWithUnknownDigest - Ask user to accept a file with unknown checksum
UseFileWithWrongDigest - Ask user to accept wrong digest
UseItemWithNoChecksum - Used for file or package on signed repository but without any checksum. Opens dialog asking whether user wants to use this item.
UseUnsignedItem - Used for unsiged file or package. Opens dialog asking whether user wants to use this unsigned item.
List of Global Variables
A semi-public helper. Convert the kernel parameter to the sysconfig string
Return value
string - sysconfig value: yes, yast, no
Should signatures be checked at all? Check a sysconfig variable (or a kernel parameter for the 1st installation stage).
Return value
boolean - do checking?
Function returns the default popup return value for case when user selected "don't show again"
Function parameters
string popup_type
string popup_url
Return value
boolean
Function returns whether user want's to show the dialog (again). true is the default if nothing is set.
Function parameters
string popup_type
string popup_url
Return value
boolean - show the dialog
ImportGPGKeyDialog
Function parameters
map<string,any> key
Return value
symbol
ImportUntrustedGPGKeyIntoTrustedDialog
Function parameters
map<string,any> key
integer repository
Return value
boolean - whether zypp should import the key into the keyring of trusted keys
Used for file or package signed by a public key. This key is still not listed in trusted keys.
Function parameters
symbol item_type
string item_name
map<string,any> key
Return value
symbol - `key_import, `install, `skip
Used for file or package signed by unknown key.
Function parameters
symbol item_type
string item_name
string key_id
string dont_show_dialog_ident
integer repoid
Return value
boolean - true if 'yes, use file'
Function sets the default dialog return value for case when user selected "don't show again"
Function parameters
string popup_type
boolean default_return
string popup_url
Return value
void
Functions sets whether user want's to show the dialog again
Function parameters
string popup_type
boolean show_it
string popup_url
Return value
void
Used for corrupted file or package. Opens dialog asking whether user wants to use this corrupted item.
Function parameters
symbol item_type
string item_name
map<string,any> key
integer repository
Return value
boolean - use or don't use ('true' if 'yes')
Ask user to accept a file with unknown checksum
Function parameters
string filename
string digest
string dont_show_dialog_ident
Return value
boolean - true when user accepts the file
Ask user to accept wrong digest
Function parameters
string filename
string requested_digest
string found_digest
string dont_show_dialog_ident
Return value
boolean - true when user accepts the file
Used for file or package on signed repository but without any checksum. Opens dialog asking whether user wants to use this item.
Function parameters
symbol item_type
string item_name
string dont_show_dialog_ident
Return value
boolean - use or don't use ('true' if 'yes')
List of Global Functions
AppendMessageToInstLog - Append message to the installation log.
ChangeSlideIfNecessary - Check if the current slide needs to be changed and do that if necessary.
CheckForSlides - Check if the slide show is available. This must be called before trying to access any slides; some late initialization is done here.
CloseDialog - Close the slide show dialog.
CurrentStageDescription - Return the description for the current stage.
GenericHandleInput - Check for user button presses and handle them. Generic handling to be used in the progress handlers.
GetSetup - Returns the current setup defined by Setup().
GetUserAbort - Get the status of the flag that user requested abort of the installation
GlobalProgressStart - Restart the global progress of the slideshow. This means the label will be set to \param text, value to 0.
HandleInput - Process (slide show) input (button press).
HaveSlideWidget - Check if the dialog is currently set up so the user could switch to the slide page.
MoveToStage - Move the global progress to the beginning of the given stage.
OpenDialog - Open the slide show dialog.
RebuildDialog - Rebuild the dialog. Useful if slides become available post-creating the dialog.
Reset - Initialize generic data to default values
ResetTimer - Reset the internal (global) timer.
SetGlobalProgressLabel - Return the current global progress label.
SetLanguage - Set the curent language. Must be called once during initialization.
SetUserAbort - Set the flag that user requested abort of the installation
Setup - Prepare the stages for the global progressbar. Will compute the total estimate of time and partition the global 100% to given stages based on their estimates. Can compute out of time and size to download.
ShowingDetails - Check if currently the "Details" page is shown
ShowingRelNotes - Check if currently the "Release Notes" page is shown
ShowingSlide - Check if currently the "Slide Show" page is shown
StageProgress - Update the global progress according to the progress in the current stage. The new value will be set to the per cent of the current stage according to \param value.The value must be lower that 100 (or it's corrected to 100). If the \text is not nil, the label will be updated to this text as well. Otherwise label will not change.
StartTimer - Start the internal (global) timer.
StopTimer - Stop the internal (global) timer and account elapsed time.
SubProgress - Update status of subprogress of the slideshow. The new value will be set to \param value, if the \text is not nil, the label will be updated to this text as well. Otherwise label will not change.
SubProgressStart - Restart the subprogress of the slideshow. This means the label will be set to \param text, value to 0.
SwitchToDetailsView - Switch from the 'slide show' view to the 'details' view.
SwitchToReleaseNotesView - Switch to the 'release notes' view.
SwitchToSlideView - Switch from the 'details' view to the 'slide show' view.
TableItem - Create one single item for the CD statistics table
List of Global Variables
Append message to the installation log.
Function parameters
string msg
Return value
void
Check if the current slide needs to be changed and do that if necessary.
Return value
void
Check if the slide show is available. This must be called before trying to access any slides; some late initialization is done here.
Return value
void
Return the description for the current stage.
Return value
string - localized string description
Check for user button presses and handle them. Generic handling to be used in the progress handlers.
Return value
void
Returns the current setup defined by Setup().
Return value
map <string, map <string,any> > - stages
$[ stage_name : $[ stage_setup ], ... ]
See also:
Setup()
Get the status of the flag that user requested abort of the installation
Return value
boolean - state of the abort requested flag (true = abort requested)
Restart the global progress of the slideshow. This means the label will be set to \param text, value to 0.
Function parameters
string text
Return value
void
Process (slide show) input (button press).
Function parameters
any button
Return value
void
Check if the dialog is currently set up so the user could switch to the slide page.
Return value
boolean
Move the global progress to the beginning of the given stage.
Function parameters
string stage_name
Return value
void
Rebuild the dialog. Useful if slides become available post-creating the dialog.
Return value
void
Return the current global progress label.
Function parameters
string text
Return value
void - current label
Set the curent language. Must be called once during initialization.
Function parameters
string new_language
Return value
void
Set the flag that user requested abort of the installation
Function parameters
boolean abort
Return value
void
Prepare the stages for the global progressbar. Will compute the total estimate of time and partition the global 100% to given stages based on their estimates. Can compute out of time and size to download.
Function parameters
list< map<string,any> > stages
Return value
void
Check if currently the "Details" page is shown
Return value
boolean - true if showing details, false otherwise
Check if currently the "Release Notes" page is shown
Return value
boolean - true if showing details, false otherwise
Check if currently the "Slide Show" page is shown
Return value
boolean - true if showing details, false otherwise
Update the global progress according to the progress in the current stage. The new value will be set to the per cent of the current stage according to \param value.The value must be lower that 100 (or it's corrected to 100). If the \text is not nil, the label will be updated to this text as well. Otherwise label will not change.
Function parameters
integer value
string text
Return value
void
Update status of subprogress of the slideshow. The new value will be set to \param value, if the \text is not nil, the label will be updated to this text as well. Otherwise label will not change.
Function parameters
integer value
string text
Return value
void
Restart the subprogress of the slideshow. This means the label will be set to \param text, value to 0.
Function parameters
string text
Return value
void
Switch from the 'slide show' view to the 'details' view.
Return value
void
Switch from the 'details' view to the 'slide show' view.
Return value
void
Gabriele Strattner <gs@suse.de>
Klaus Kaempf <kkaempf@suse.de>
Purpose: provides the Callbacks for SlideShow
List of Global Functions
CallbackSourceChange - change of repository source: 0 .. n-1 media: 1 .. n
DisplayStartInstall - Callback that will be called by the packager for each RPM as it is being installed or deleted. Note: The packager doesn't call this directly - the corresponding wrapper callbacks do and pass the "deleting" flag as appropriate.
DonePackage - at end of install just to override the PackageCallbacks default (which does a 'CloseDialog' :-})
DoneProvide - during file providal
FinishPatchDeltaProvide - at end of file providal
InstallSlideShowCallbacks - Install callbacks for slideshow. Should be in SlideShowCallbacks but that doesn't work at the moment.
ProgressDeltaApply - during file providal
ProgressPackage - ProgressPackage percent
ProgressProvide - during file providal
RemoveSlideShowCallbacks - Remove callbacks for slideshow. Should be in SlideShowCallbacks but that doesn't work at the moment.
StartDeltaApply - at start of file providal
StartDeltaProvide - at start of file providal
StartPackage - at start of package install
StartPatchProvide - at start of file providal
StartProvide - at start of file providal
List of Global Variables
change of repository source: 0 .. n-1 media: 1 .. n
Function parameters
integer source
integer media
Return value
void
Callback that will be called by the packager for each RPM as it is being installed or deleted. Note: The packager doesn't call this directly - the corresponding wrapper callbacks do and pass the "deleting" flag as appropriate.
Function parameters
string pkg_name
string pkg_description
integer pkg_size
boolean deleting
Return value
void
at end of install just to override the PackageCallbacks default (which does a 'CloseDialog' :-})
Function parameters
integer error
string reason
Return value
string
during file providal
Function parameters
integer error
string reason
string name
Return value
string
Install callbacks for slideshow. Should be in SlideShowCallbacks but that doesn't work at the moment.
Return value
void
ProgressPackage percent
Function parameters
integer pkg_percent
Return value
boolean
Remove callbacks for slideshow. Should be in SlideShowCallbacks but that doesn't work at the moment.
Return value
void
at start of file providal
Function parameters
string name
integer archivesize
Return value
void
at start of package install
Function parameters
string name
string summary
integer install_size
boolean is_delete
Return value
void
at start of file providal
Function parameters
string name
integer archivesize
Return value
void
List of Global Functions
CheckBasePath - Check, if the base path set up for slides is valid (it exists and contains slides)
HaveSlideSupport - Check if showing slides is supported.
HaveSlides - Check if slides are available.
LoadSlideFile - Load one slide from files complete with image and textual description. Also adapt img links
LoadSlides - Load slides for the given language and store them in the internal variables.
SetSlideDir - Set the slide show directory
List of Global Variables
Check, if the base path set up for slides is valid (it exists and contains slides)
Return value
boolean - true, if it is possible to load the slides
Check if showing slides is supported.
Return value
boolean - if the current UI is capable of showing slides
Check if slides are available.
Return value
boolean - if the loaded list of slides contains any slides
Load one slide from files complete with image and textual description. Also adapt img links
Function parameters
string slide_name
Return value
string - true if OK, false if error
Load slides for the given language and store them in the internal variables.
Function parameters
string language
Return value
void
SlpServer settings, input and output functions
List of Global Functions
Abort - Abort function
AutoPackages - Return packages needed to be installed and removed during Autoinstallation to insure module has all needed software installed.
Export - Dump the slp-server settings to a single map (For use by autoinstallation.)
Import - Get all slp-server settings from the first parameter (For use by autoinstallation.)
Modified - Prototypes
Modified - Data was modified?
Overview - Create an overview table with all configured cards
Read - Read all slp-server settings
Summary - Create a textual summary and a list of unconfigured cards
Write - Write all slp-server settings
List of Global Variables
modified - Data was modified?
write_only - Write only, used during autoinstallation. Don't run services and SuSEconfig, it's all done at one place.
Return packages needed to be installed and removed during Autoinstallation to insure module has all needed software installed.
Return value
map - with 2 lists.
Dump the slp-server settings to a single map (For use by autoinstallation.)
Return value
map - Dumped settings (later acceptable by Import ())
Get all slp-server settings from the first parameter (For use by autoinstallation.)
Function parameters
map settings
Return value
boolean - True on success
Create a textual summary and a list of unconfigured cards
Return value
list - summary of the current configuration
Sound data
List of Global Functions
Changed - Status of configuration
CollectOptions - this function converts options for modules from 'modules_conf' data structure to another - it is needed for writing options to /etc/modules conf. eg. we have these configured cards: [ $["model": "sblive", "module":"snd-emu10k1", "options" :$["opt1": "a", "opt2": "b"]], $["model": "sblive", "module":"snd-emu10k1", "options": $["opt2": "c"]], $["model": "other", "module":"mod2", "options": $["opt1": "a", "opt2": "b"]] ] CollectOptions ("snd-emu10k1") returns $["opt1":"a,", "opt2":"b,c"]
CreateModprobeCommands - creates list of command that will be used for sound system start (emulates 'rcalsasound start' somehow)
DetectHardware - do hardware detection
DetectOldCards - Detect old ISA cards (which hwinfo doesn't know) using alsaconf
Export - Dump the sound settings to a single map. self explaining (For use by autoinstallation.)
ForceReset - reset settings. used at installation time when user invokes 'reset to original proposal'
GetJoystickSettings - Get joystick settings from sound database
GetModified - Functions which returns if the settings were modified
GetSoundCardList - returns list of configured/proposed sound cards.
GetSoundCardListWithJoy - Return list of configured/proposed sound cards which support joystick
HasJoystick - Test whether sound card supports joystick
Import - Get all sound settings from the first parameter (For autoinstallation use.)
InitMixer - initialises volume after adding a new card. unmutes and sets volume for some channels
LoadDatabase - opens alsa sound cards database
LoadPackageDatabase - opens alsa sound cards database
ProbeOldChip - Probe one card with alsaconf call
Propose - create a proposal
Read - Read all sound settings from the SCR
ReadModulesConf - searches for sound alias in /etc/modules.conf
RequiredKernelModules - Get list of all kernel modules which are requied by the configured cards
RestoreSettings - restore settings from backup variables
Set - Just Set module data
SetModified - Function sets internal variable, which indicates, that any settings were modified, to "true"
SetVolume - sets the channel volume to value [0..100]
Sound - sound module constructor
StoreMixer - store mixer settings
StoreSettings - copy settings to backup variables
StoreUniqueKeys - stores unique keys. this function is not part of sound_write module because it should not be called during autoinstallation
Summary - returns html formated configuration summary
UpdateUnconfiguredCards - update list of unconfigured cards (necessary when deleting configured card)
Write - Update the SCR according to sound settings
getConfigurableCards - returns list of autodetected sound cards that haven't been already configured
List of Global Variables
STRINGS - text constants for sound module
card_id - id of current card
configure_detected - When true: During autoinstallation, detected cards will be added automaticaly even if they are not defined in control file
curr_driver - currently used card driver (pointer to table)
curr_model - currently used card model (pointer to table)
curr_vendor - currently used card vendor (pointer to table)
db_modules - module details
db_vendors - map of card vendors
default_volume - default value of volume for new card
detected_cards - list for storing detected cards
installation - flag for letting the module know, that it's launched from then hardware installation screen
modules_conf - settings to save to /etc/modules.conf (only those concerning to sound)
modules_conf_b - backup structures for sound settings
proposal_created - was the proposal already generated?
rc_vars - rc settings
removed_info - list for storing information about removed cards
save_entry - configuration map of current card
skip_detection - Do not detect sounc cards, skip hardware probing
unconfigured_cards - list of detected and unconfigured cards
use_alsa - what sound system we're using (true=alsa, false=oss)
use_ui - flag for showing/not showing ui stuff (eg when loading alsa database)
used_modprobe_conf - This is true, if sound data were read from /etc/modprobe.conf On write, they shoud be removed and written only to /etc/modprobe.d/sound
volume_settings - settings to save using .audio.alsa ... mixer
write_only - write only mode? (-> do not restart services during writing)
this function converts options for modules from 'modules_conf' data structure to another - it is needed for writing options to /etc/modules conf. eg. we have these configured cards: [ $["model": "sblive", "module":"snd-emu10k1", "options" :$["opt1": "a", "opt2": "b"]], $["model": "sblive", "module":"snd-emu10k1", "options": $["opt2": "c"]], $["model": "other", "module":"mod2", "options": $["opt1": "a", "opt2": "b"]] ] CollectOptions ("snd-emu10k1") returns $["opt1":"a,", "opt2":"b,c"]
Function parameters
string modname
Return value
map - Map with collected options
creates list of command that will be used for sound system start (emulates 'rcalsasound start' somehow)
Return value
list - of shell commands
Detect old ISA cards (which hwinfo doesn't know) using alsaconf
Return value
boolean - success
Dump the sound settings to a single map. self explaining (For use by autoinstallation.)
Return value
map - Dumped settings (later acceptable by Import())
reset settings. used at installation time when user invokes 'reset to original proposal'
Return value
void
Get joystick settings from sound database
Function parameters
string modname
Return value
map - map with options
Functions which returns if the settings were modified
Return value
boolean - settings were modified
returns list of configured/proposed sound cards.
Return value
list - of maps: [$["name": "ASDASD", "card_no": 0]...]
Return list of configured/proposed sound cards which support joystick
Return value
list - list of maps: [$["card_no":0, "name":"Sound Blaster Live!"]]
Test whether sound card supports joystick
Function parameters
integer c_id
Return value
boolean - True if sound card c_id supports joystick
Get all sound settings from the first parameter (For autoinstallation use.)
Function parameters
map settings
Return value
boolean - True on success
initialises volume after adding a new card. unmutes and sets volume for some channels
Function parameters
integer c_id
string modname
Return value
void
opens alsa sound cards database
Function parameters
boolean use_ui
Return value
void
Probe one card with alsaconf call
Function parameters
string chip
Return value
string - non-empty string with card options when card is present
Read all sound settings from the SCR
Function parameters
boolean interactive
Return value
boolean - True on success
Get list of all kernel modules which are requied by the configured cards
Return value
list<string> - Unique list of modules
Function sets internal variable, which indicates, that any settings were modified, to "true"
Return value
void
sets the channel volume to value [0..100]
Function parameters
integer c_id
string channel
integer value
Return value
boolean - success
stores unique keys. this function is not part of sound_write module because it should not be called during autoinstallation
Return value
void
update list of unconfigured cards (necessary when deleting configured card)
Return value
void
When true: During autoinstallation, detected cards will be added automaticaly even if they are not defined in control file
flag for letting the module know, that it's launched from then hardware installation screen
This is true, if sound data were read from /etc/modprobe.conf On write, they shoud be removed and written only to /etc/modprobe.d/sound
Jiri Srain <jsrain@suse.cz>
Klaus Kaempf <kkaempf@suse.de>
Gabriele Strattner <gs@suse.de>
Stefan Schubert <schubi@suse.de>
Cornelius Schumacher <cschum@suse.de>
Purpose:
Displays possibilities to install from NFS, CD or partion
List of Global Functions
EditDialog - Sample implementation of URL selection dialog
EditDialogProtocol - Sample implementation of URL selection dialog
EditDialogProtocolService - Sample implementation of URL selection dialog
EditPopup - URL editation popup
EditPopupNoHTTPS - URL editation popup without the HTTPS option
EditPopupService - URL editation popup
EditPopupType - URL editation popup, allows setting plaindir type
GetRepoName - Return RepoName after the run of the dialog
GetURL - Return URL after the run of the dialog
SetRepoName - Set the RepoName to work with
SetURL - Set the URL to work with
SetURLType - Set the URL to work with, set the plaindir flag (type of the repository)
TypeDialog - Sample implementation of URL type selection dialog
TypeDialogDownloadOpt - Sample implementation of URL type selection dialog
TypePopup - URL editation popup with the HTTPS option
List of Global Variables
Sample implementation of URL selection dialog
Return value
symbol - for wizard sequencer
Sample implementation of URL selection dialog
Function parameters
string proto
Return value
symbol - for wizard sequencer
Sample implementation of URL selection dialog
Function parameters
string proto
Return value
symbol - for wizard sequencer
URL editation popup
Function parameters
string url
Return value
string - modified URL or empty string if canceled
URL editation popup without the HTTPS option
Function parameters
string url
Return value
string - modified URL or empty string if canceled
URL editation popup
Function parameters
string url
Return value
string - modified URL or empty string if canceled
URL editation popup, allows setting plaindir type
Function parameters
string url
boolean plaindir_type
Return value
string - modified URL or empty string if canceled
Set the RepoName to work with
Function parameters
string repo_name
Return value
void
Set the URL to work with, set the plaindir flag (type of the repository)
Function parameters
string url
boolean plaindir_type
Return value
void
Sample implementation of URL type selection dialog
Return value
symbol - for wizard sequencer
Sample implementation of URL type selection dialog
Return value
map<string,any> - for wizard sequencer
SourceManager settings, input and output functions
Anas Nashif <nashif@suse.de>
Lukas Ocilka <locilka@suse.cz>
Martin Vidner <mvidner@suse.cz>
Status: Work in Progress
List of Global Functions
Abort - Abort function
AbortFunction - Abort function return boolean return true if abort
AddUpdateSources - Used by registration. This is really hairy because we simultaneously add them to zypp and ZENworks, but not if they are not signed. (thus being better than inst_source)
AskForCD -
CommitSources - Commit changed repositories
Export - Dump the repository-manager settings to a single map (For use by autoinstallation.)
GetSrcIdByIndex - Get Repository ID by index
GetSyncFlag - Return ZMD synchronization flag.
Import - Get all repository-manager settings from the first parameter (For use by autoinstallation.)
InstInitSourceMoveDownloadArea - Finds the biggest temporary directory and uses it as packager download area.
InstallationSourceOnPartition - Function returns the partiton name which is used as a repository for the installation (IF any partition is used as a repository for installation, of course). Otherwise it returns an empty string "". See bugzilla #208222 for more information.
Lock - Start a section where other processes (such as ZMD helpers) should not access the repository database. #170113 The calls may be nested.
Modified - Prototypes
Modified - Data was modified?
Overview - Create an overview table with all configured cards
Read - Read all source-manager settings
ReadSyncFlag - Read ZMD sync flag from the persistent store (/var/lib/YaST2/inst_source_config.ycp)
RunCommandWithTimeout - Runs a bash command with timeout.
RunDumbTimeout - Run - with a timeout - on dumb terminal to disable colors etc - using 'exit $?' because of buggy behavior '.background vs. ZMD' (FIXME still needed???)
SetSyncFlag - Set ZMD synchronization flag.
SetUrlByIndex - Set current used repository URL by index
SourceData - Gather Repository Metadata
Summary - Create a textual summary and a list of unconfigured cards
SyncAddedAndDeleted - Sync the changed repositories to ZENworks
SyncYaSTInstSourceWithZMD - Checks whether ZMD is running, starts it when isn't. Checks whether a ZYPP repository is listed in the ZMD services, adds one if it is missing. Everything is done via the .process agent with timeout (number in seconds).
Unlock - Other processes may access the repository database again
Write - Write all repository-manager settings
WriteSyncFlag - Write ZMD sync flag to the persistent store
createSource - Create a repository from an URL
deleteSourceByIndex - Delete Repository by the repository index
deleteSourceBySrcId - Delete repository by Repository ID
deleteSourceByUrl - Delete Repository by repository URL
getSourceId - Get Repository ID when only URL is known
List of Global Variables
modified - Data was modified?
Used by registration. This is really hairy because we simultaneously add them to zypp and ZENworks, but not if they are not signed. (thus being better than inst_source)
Function parameters
list<string> urls
Return value
list<string> - a list of added URLs
Dump the repository-manager settings to a single map (For use by autoinstallation.)
Return value
map - Dumped settings (later acceptable by Import ())
Get Repository ID by index
Function parameters
integer idx
Return value
integer
Return ZMD synchronization flag.
Return value
boolean - true/false = ZMD sync is enabled/disabled, nil = unknown (not configured/read)
Get all repository-manager settings from the first parameter (For use by autoinstallation.)
Function parameters
map settings
Return value
boolean - True on success
Finds the biggest temporary directory and uses it as packager download area.
Return value
void
Function returns the partiton name which is used as a repository for the installation (IF any partition is used as a repository for installation, of course). Otherwise it returns an empty string "". See bugzilla #208222 for more information.
Return value
string - partition name
Start a section where other processes (such as ZMD helpers) should not access the repository database. #170113 The calls may be nested.
Return value
void
Read ZMD sync flag from the persistent store (/var/lib/YaST2/inst_source_config.ycp)
Return value
boolean - true = success, false = read/parse error or the file doesn't exist
Runs a bash command with timeout.
Function parameters
string run_command
string log_command
integer script_time_out
Return value
map - with out, err and ret_code
Returns map $[
"exit" : int_return_code,
"stdout" : [ "script", "stdout", "lines" ],
"stderr" : [ "script", "stderr", "lines" ],
]
Run - with a timeout - on dumb terminal to disable colors etc - using 'exit $?' because of buggy behavior '.background vs. ZMD' (FIXME still needed???)
Function parameters
string command
string log_command
integer seconds
Return value
map - with out, err and ret_code
Set ZMD synchronization flag.
Function parameters
boolean sync_enabled
Return value
void
Set current used repository URL by index
Function parameters
integer idx
Return value
void
Create a textual summary and a list of unconfigured cards
Return value
list - summary of the current configuration
Sync the changed repositories to ZENworks
Function parameters
list<integer> added_src_ids
list<integer> deleted_src_ids
Return value
boolean - success
Checks whether ZMD is running, starts it when isn't. Checks whether a ZYPP repository is listed in the ZMD services, adds one if it is missing. Everything is done via the .process agent with timeout (number in seconds).
Return value
boolean - whether the syncing succeeds
Write ZMD sync flag to the persistent store
Return value
boolean - true = success
Create a repository from an URL
Function parameters
string url
Return value
symbol
Delete Repository by the repository index
Function parameters
integer idx
Return value
void
Delete repository by Repository ID
Function parameters
integer SrcId
Return value
void
Delete Repository by repository URL
Function parameters
string url
Return value
void
SLP-related SourceManager settings
List of Global Functions
AddSourceTypeSLP - Function scans for SLP installation servers on the network
SelectOneSLPService - Function searches the SLP services on the current network. If there are some SLP services, opens up a dialog containing them and user has to select one or cancel the operation. Selected URL is returned as string, otherwise a nil is returned.
List of Global Variables
Function scans for SLP installation servers on the network
Return value
string - one of `back, `next
Function searches the SLP services on the current network. If there are some SLP services, opens up a dialog containing them and user has to select one or cancel the operation. Selected URL is returned as string, otherwise a nil is returned.
Return value
string - service_URL
Klaus Kaempf (kkaempf@suse.de)
Gabriele Strattner (gs@suse.de)
Stefan Schubert (schubi@suse.de)
Purpose: Package installation functions usable
when the installation media is available
on Installation::sourcedir
List of Global Functions
CheckDiskFreeSpace - Check, if there is enough free space after installing the current selection
EvaluateFreeSpace - Evaluate the free space on the file system. Runs the command "df" and creates a map containig information about used and free space on every partition. Free space is calculated respecting the spare_percentage given in second argument.
List of Global Variables
Check, if there is enough free space after installing the current selection
Function parameters
integer free_percent
integer max_unsufficient_free_size
Return value
list<map> - of partitions which have less than free_percent free size
Evaluate the free space on the file system. Runs the command "df" and creates a map containig information about used and free space on every partition. Free space is calculated respecting the spare_percentage given in second argument.
Function parameters
integer spare_percentage
Return value
list<map<string,any> > - partition list, e.g. [$["free":389318, "name":"/", "used":1487222], $["free":1974697, "name":"usr", "used":4227733]]
List of Global Functions
ACLIsUsedBy - Returns list of options which use this ACL (identified by id_item). It's necessary to run this function before deleting ACL to know if any options are not affected.
Abort - Abort function
Export - Dump the squid settings to a single map (For use by autoinstallation.)
GetHttpPortsOnly - Returns only list of configured ports (no hosts and so on)
Import - Get all squid settings from the first parameter (For use by autoinstallation.)
IsServiceRunning - Returns true if Squid service is running.
NumACLs - Returns number of occurences of ACL (definition lines) in config file.
NumACLsByName - Same as NumACLs but ACL is identified by name.
Read - Read all squid settings
StartService - Start Squid service if not running otherwise reload. Returns true if squid was successfuly started
StopService - Stop Squid service. Returns true if squid was successfuly stopped
Summary - Create a textual summary and a list of unconfigured cards
Write - Write all squid settings
List of Global Variables
write_only - Write only, used during autoinstallation. Don't run services and SuSEconfig, it's all done at one place.
Returns list of options which use this ACL (identified by id_item). It's necessary to run this function before deleting ACL to know if any options are not affected.
Function parameters
integer id_item
Return value
list<string>
Dump the squid settings to a single map (For use by autoinstallation.)
Return value
map - Dumped settings (later acceptable by Import ())
Returns only list of configured ports (no hosts and so on)
Return value
list<string>
Get all squid settings from the first parameter (For use by autoinstallation.)
Function parameters
map sett
Return value
boolean - True on success
Returns number of occurences of ACL (definition lines) in config file.
Function parameters
integer id_item
Return value
integer
Same as NumACLs but ACL is identified by name.
Function parameters
string name
Return value
integer
Start Squid service if not running otherwise reload. Returns true if squid was successfuly started
Return value
boolean
Stop Squid service. Returns true if squid was successfuly stopped
Return value
boolean
Create a textual summary and a list of unconfigured cards
Return value
list - summary of the current configuration
List of Global Functions
GetOptions - Returns values from widget as list of options in correct form to store them into Squid module.
GetTypesToComboBox - Returns list of terms in form: [ `item(`id(key), acl_map[key]["name"]:""), `item(... ) ] Returned list is preferably to place in UI::ComboBox as list of all available types of ACLs.
InitWidget - Initialize widget of acl identified by id_acl_type. If id_item is not nil, function initialize widgets by default values from module Squid.
Replace - Replace widget with id widget_id by widget acl_map[id_acl_type]["widget"].
SupportedACLs - Returns list of supported ACLs. It's necessary to have saved unsupported ACLs but do not handle with them.
Verify - This function call verification function joined with acl type identified by id_acl_type. Returns return value of verification function.
List of Global Variables
Returns values from widget as list of options in correct form to store them into Squid module.
Function parameters
string id_acl_type
Return value
list<string>
Returns list of terms in form: [ `item(`id(key), acl_map[key]["name"]:""), `item(... ) ] Returned list is preferably to place in UI::ComboBox as list of all available types of ACLs.
Return value
list<term>
Initialize widget of acl identified by id_acl_type. If id_item is not nil, function initialize widgets by default values from module Squid.
Function parameters
string id_acl_type
integer id_item
any help_widget_id
Return value
void
Replace widget with id widget_id by widget acl_map[id_acl_type]["widget"].
Function parameters
any widget_id
string id_acl_type
Return value
void
Returns list of supported ACLs. It's necessary to have saved unsupported ACLs but do not handle with them.
Return value
list<string>
List of Global Functions
GetLanguageFromPath - Inverse function to GetPath. Returns languge which has path pth to directory containing error messages.
GetLanguages - Returns list of all available languages
GetLanguagesToComboBox - Returns list of all available languages in form of items of ComboBox.
GetPath - Returns path to directory containing error messages in given language.
List of Global Variables
Inverse function to GetPath. Returns languge which has path pth to directory containing error messages.
Function parameters
string pth
Return value
string
Returns list of all available languages in form of items of ComboBox.
Return value
list<term>
SSHD settings, input and output functions
Lukas Ocilka <locilka@suse.cz>
Representation of the configuration of SSHD.
Input and output routines.
List of Global Functions
Abort - Returns a confirmation popup dialog whether user wants to really abort.
Export - Exports the current configuration.
GetDefaultSSHDOption - Returns default SSHD Option as a list of strings.
GetModified - Returns whether the configuration has been modified.
GetSSHDOption - Returns the SSHD Option as a list of strings.
Import - Imports a configuration
PollAbort - Checks whether an Abort button has been pressed. If so, calls function to confirm the abort call.
Read - Read all SSHD settings
SetModified - Sets that the configuration has been modified.
SetSSHDOption - Sets values for an option.
Write - Write all SSHD settings
List of Global Variables
Returns a confirmation popup dialog whether user wants to really abort.
Return value
boolean
Exports the current configuration.
Return value
map - of a current configuration
$[ "config" : (map <string, list<string> >) SETTINGS, "status" : (boolean) service_status, ]
Returns default SSHD Option as a list of strings.
Function parameters
string option_key
Return value
list <string> - with option_values
Returns the SSHD Option as a list of strings.
Function parameters
string option_key
Return value
list <string> - with option_values
Checks whether an Abort button has been pressed. If so, calls function to confirm the abort call.
Return value
boolean - true if abort confirmed
Sets values for an option.
Function parameters
string option_key
list <string> option_vals
Return value
void
SSHD CommandLine functions
Installation mode
List of Global Functions
Set - Set the installation stage
cont - continuing installation in target system
firstboot - Firstboot stage
initial - starting installation in inst-sys system
normal - normal, running system
reprobe - This flag indicates that a config module has been called due to a change in the system hardware that has been detected on boot time.
stage - Get the current stage
List of Global Variables
continuing installation in target system
Return value
boolean - true if installation continues on the target system
starting installation in inst-sys system
Return value
boolean - true if installation first stage is running
This flag indicates that a config module has been called due to a change in the system hardware that has been detected on boot time.
Return value
boolean - true if YaST was invoked because new hardware was probed
Johannes Buchhold (jbuch@suse.de)
Purpose: These module contains all settings/information which
are needed to partitioning the harddisk. Futhermore it contains a interface
to * access and modify the partitioning settings.
Todo: Translate
Diese Modul enthält alle Informationen die für die Partitionierung der
Festplatten erforderlich sind. Diese Informationen bestehen aus der
Beschreibung, der vor der Partitionierung vorhandenen Platteneinstellungen,
und der Art und Weise wie diese verändert werden soll.
Alle nötigen Zugriffsfunktionen auf diese Datenstruktur sind ebenfalls in
diesem Modul enthalten. Der Zugriff auf die Speicherung der
Partitionseinstellungen läuft also nur über dieses Modul.
Der Zugriff und die Rückgabe von Teilen der Partitionsdatenstruktur
wurde versucht "intelligent" zu gestallten und ist im einzelen bei den
entspechenden Funktionen näher erklärt.
List of Global Functions
AddFstabEntry - Adds an entry into the fstab
AddMountPointInfo - Adds mountpoint info to the target map and returns the changed map
AddSwapMp - mark swap-partitions with pseudo Mountpoint swap in targetMap
AddWinInfo - Adds ... and returns the changed map
CheckForLvmRootFs - CheckForLvmRootFs --------------------------------------------------------------------- check if the root filesystem is a lvm logical volume
CheckSwapOn - Check if swap paritition is availbe on a disk
CommitChanges - Apply storage changes
CreatePartition - Creates a new partition
DeletePartitionTable - Delete the partition table and disk label of device
DetectFs - Detects a filesystem on a device
GetDeviceName - Returns Device Name
GetDisk - Returns disk identified by 'device' taken from the 'tg' (target) map
GetDiskPartition - Returns map describing the disk partition
GetFreeSpace - Returns map of free space per partition
GetMountPoints - GetMountPoints() collect mountpoint:device as map to get a sorted list
GetOndiskTarget - Returns map describing the disk target
GetOtherLinuxPartitions - Get list of all Linux Partitions on all real disks
GetPrimPartitions - Returns list of primary partitions found
GetTargetMap - Returns a system target map.
HandleProposalPackages - Takes care of selecting packages needed by storage in installation (replacement for HandlePackages in *_proposal clients)
InitializeDisk - Set the flag if a disk needs to be initialized
IsPartitionable - Checks if a container is partitionable
IsRealDisk - Check if a disk is a real disk and not RAID or LVM
IsResizable - Returns whether a partition is resizable
Mount - Mounts a device
MountOpt - Mounts a device
ReReadTargetMap - Rereads the system target map and returns it
ReadFstab - Reads and returns fstab from directory
RemoveDmMapsTo - Removes ... maps to ...
ResizePartition - Sets a new size for volume
ResizeVolume - Sets a new size for volume
SetPartitionData - Set <key> in partition <device> to the given <value> and return changed map <tg>
SetPartitionFormat - Sets whether a partition should be formatted
SetPartitionId - Sets partition ID
SetPartitionMount - Sets a mountpoint for partition
SwappingPartitions - Get List of swap partitions
Umount - Umounts a device
UnchangePartitionId - Restores the original partition ID
Update - Updates fstab on disk
UpdateTargetMap - Updates target map
WriteFstab - Writes fstab to the disk
getDiskInfo - Returns map with disk info
List of Global Variables
Adds an entry into the fstab
Function parameters
map e
Return value
integer - (0 and higher == OK, otherwise error)
Adds mountpoint info to the target map and returns the changed map
Function parameters
map<string,map> target
Return value
map<string,map> - target
mark swap-partitions with pseudo Mountpoint swap in targetMap
Function parameters
map<string,map> target
Return value
map<string,map> - modified target
Adds ... and returns the changed map
Function parameters
map<string,map> targets
Return value
map<string,map> - targets
CheckForLvmRootFs --------------------------------------------------------------------- check if the root filesystem is a lvm logical volume
Return value
boolean
Check if swap paritition is availbe on a disk
Function parameters
string disk
Return value
boolean - true if swap available.
Creates a new partition
Function parameters
string disk
string device
symbol ptype
integer id
integer start
integer len
symbol mby
Return value
boolean - if successful
Delete the partition table and disk label of device
Function parameters
string disk
integer size_k
Return value
boolean
Detects a filesystem on a device
Function parameters
string device
Return value
symbol - filesystem
Returns Device Name
Function parameters
string disk
any partition
Return value
string - device name
Returns disk identified by 'device' taken from the 'tg' (target) map
Function parameters
map<string,map> tg
string device
Return value
map<string,any>
Returns map describing the disk partition
Function parameters
string device
Return value
map - DiskPartition Examples: "/dev/sda" -> $[ "disk" : "/dev/sda", "nr" : "" ] "/dev/sda2" -> $[ "disk" : "/dev/sda", "nr" : 2 ] "/dev/system" -> $[ "disk" : "/dev/system", "nr" : "" ] "/dev/system/abuild" -> $[ "disk" : "/dev/system", "nr" : "abuild" ]
Returns map of free space per partition
Function parameters
string device
integer testsize
symbol used_fs
boolean verbose
Return value
map
GetMountPoints() collect mountpoint:device as map to get a sorted list
Return value
map - of lists, the map key is the mount point, usually starting with a "/". Exception is "swap" For directory mount points (key starting with /) the value is a list [partitionName, fsid, targetdevice, raid_type] For swap mount points, the value is a list of lists: [[partitionName, fsid, targetdevice, raid_type], ...]
Get list of all Linux Partitions on all real disks
Return value
list - Partition list
Returns list of primary partitions found
Function parameters
map<string,map> targets
boolean foreign_os
Return value
list - of primary partitions
Returns a system target map.
Return value
map<string, map> - target map
$[
... ?
]Takes care of selecting packages needed by storage in installation (replacement for HandlePackages in *_proposal clients)
Return value
void
Set the flag if a disk needs to be initialized
Function parameters
string disk
boolean value
Return value
boolean
Checks if a container is partitionable
Function parameters
map entry
Return value
boolean - true if partitionable
entry ~ $[ "type" : ... ? ]
Check if a disk is a real disk and not RAID or LVM
Function parameters
map entry
Return value
boolean - true if real disk
entry ~ $[ "type":`CT_DISK, "driver" : "?", "readonly" : false / true, ]
Returns whether a partition is resizable
Function parameters
map part
Return value
map - resizable ?
Mounts a device
Function parameters
string dev
string mp
Return value
boolean - if successful
See also:
Umount()
Mounts a device
Function parameters
string dev
string mp
string fstopt
Return value
boolean - if successful
See also:
Umount()
Rereads the system target map and returns it
Return value
map<string, map> - target map
See also:
GetTargetMap();
Reads and returns fstab from directory
Function parameters
string dir
Return value
list
Sets a new size for volume
Function parameters
string device
string disk
integer new_cyls
Return value
boolean - if successfull
Sets a new size for volume
Function parameters
string device
string disk
integer new_size_k
Return value
boolean - if successfull
Set <key> in partition <device> to the given <value> and return changed map <tg>
Function parameters
map<string,map> tg
string device
string key
any value
Return value
map<string,map> - changed target map
Sets whether a partition should be formatted
Function parameters
string device
boolean format
symbol fs
Return value
boolean - if successful
Sets partition ID
Function parameters
string device
integer id
Return value
boolean - if successful
See also:
UnchangePartitionId()
Sets a mountpoint for partition
Function parameters
string device
string mp
Return value
boolean - if successful
Umounts a device
Function parameters
string dev
Return value
boolean - if successful
See also:
Mount()
Restores the original partition ID
Function parameters
string device
Return value
boolean - if succesful
See also:
SetPartitionId()
Updates fstab on disk
Function parameters
map oldv
map newv
Return value
void
version $[ // This means version 9.1 "major" : 9, "minor" : 1, ]
Thomas Fehr <fehr@suse.de>
Arvin Schnell <arvin@suse.de>
Purpose: Define callbacks for libstorage.
Klaus Kaempf <kkaempf@suse.de> (initial)
Purpose:
This module does all floppy disk related stuff:
- Detect the floppy devices
SCR: Read(.probe.storage)
List of Global Functions
Probe - Probe storage controllers probing, loading modules
StartHotplugStorage - Start storage related USB and FireWire stuff
List of Global Variables
Return value
void - Init storage controllers (module loading) Must have called StorageControllers::probe() before ! // O: list of [ loaded modules, module argument ]
Probe storage controllers probing, loading modules
Return value
integer - number of controllers, 0 = none found
This module does all storage device related stuff: - hard disk drives - removable drives (ZIP) - floppy devices
Expert Partitioner
List of Global Functions
IterateTargetMap - Call callback for every disk of target_map in a well defined sorted order.
OverviewContents - The device must be the device entry in the target-map, e.g. "/dev/sda1", not something like "LABEL=test".
PredicateAll - Predicate function for Table and TableContents.
PredicateDevice - Predicate function for Table and TableContents.
PredicateDiskDevice - Predicate function for Table and TableContents.
PredicateDiskType - Predicate function for Table and TableContents.
PredicateUsedByDevice - Predicate function for Table and TableContents.
TableContents - The predicate function determines whether the disk/partition is included. The predicate function takes two arguments, disk and partition. For disks predicate is called with the partitions set to nil.
List of Global Variables
Call callback for every disk of target_map in a well defined sorted order.
Function parameters
map<string, map> target_map
Return value
void
The device must be the device entry in the target-map, e.g. "/dev/sda1", not something like "LABEL=test".
Function parameters
list<symbol> fields
map<string, map> target_map
string device
Return value
string
Predicate function for Table and TableContents.
Function parameters
map disk
map partition
Return value
symbol
Predicate function for Table and TableContents.
Function parameters
map disk
map partition
list<string> devices
Return value
symbol
Predicate function for Table and TableContents.
Function parameters
map disk
map partition
list<string> disk_devices
Return value
symbol
Predicate function for Table and TableContents.
Function parameters
map disk
map partition
list<symbol> disk_types
Return value
symbol
Predicate function for Table and TableContents.
Function parameters
map disk
map partition
list<string> devices
Return value
symbol
The predicate function determines whether the disk/partition is included. The predicate function takes two arguments, disk and partition. For disks predicate is called with the partitions set to nil.
Function parameters
list<symbol> fields
map<string, map> target_map
Return value
list<term>
Expert Partitioner
String manipulation routines
List of Global Functions
CAlnum - The 62 upper and lowercase ASCII letters and digits
CAlpha - The 52 upper and lowercase ASCII letters
CDigit - Digits: 0123456789
CGraph - Printable ASCII charcters except whitespace, 33-126
CLower - The 26 lowercase ASCII letters
CPrint - Printable ASCII characters including whitespace
CPunct - The ASCII printable non-blank non-alphanumeric characters
CSpace - ASCII whitespace: SPACE CR LF HT VT FF
CUpper - The 26 uppercase ASCII letters
CXdigit - Hexadecimal digits: 0123456789ABCDEFabcdef
CutBlanks - Remove blanks at begin and end of input string.
CutRegexMatch - Remove first or every match of given regular expression from a string
CutZeros - Remove any leading zeros
EscapeTags - Function for escaping (replacing) (HTML|XML...) tags with their (HTML|XML...) meaning.
FirstChunk - Shorthand for select (splitstring (s, separators), 0, "") Useful now that the above produces a deprecation warning.
FormatFilename - Format file name - truncate the middle part of the directory to fit to the reqested lenght. Path elements in the middle of the string are replaced by ellipsis (...). The result migth be longer that requested size if size of the last element (with ellipsis) is longer than the requested size. If the requested size is greater than size of the input then the string is not modified. The last part (file name) is never removed.
FormatRate - Return a pretty description of a download rate
FormatRateMessage - Add a download rate status to a message.
FormatSize - Return a pretty description of a byte count
FormatSizeWithPrecision - Return a pretty description of a byte count
GetCommentLines - Get comment without metadata
GetMetaDataLines - Get metadata lines from input string
NonEmpty -
OptFormat - Optional formatted text
OptParens - Optional parenthesized text
Pad - Add spaces after the text to make it long enough
PadZeros - Add zeros before the text to make it long enough.
ParseOptions - Parse string of values
ParseSysconfigComment - Parse metadata from a sysconfig comment
Quote - Quote a string with 's
Random - Make a random base-36 number. srandom should be called beforehand.
Replace - Replace substring in a string. All substrings source are replaced by string target.
TextTable - Function creates text table without using HTML tags. (Useful for commandline) Undefined option uses the default one.
UnQuote - Unquote a string with 's (quoted with quote)
UnderlinedHeader - Function returns underlined text header without using HTML tags. (Useful for commandline)
ValidCharsFilename - Characters valid in a filename (not pathname). Naturally "/" is disallowed. Otherwise, the graphical ASCII characters are allowed.
WrapAt - Returns text wrapped at defined margin. Very useful for translated strings used for pop-up windows or dialogs where you can't know the width. It controls the maximum width of the string so the text should allways fit into the minimal ncurses window. If you expect some long words, such us URLs or words with a hyphen inside, you can also set the additional split-characters to "/-". Then the function can wrap the word also after these characters. This function description was wrapped using the function String::WrapAt().
List of Global Variables
Remove blanks at begin and end of input string.
Function parameters
string input
Return value
string - stripped string
Remove first or every match of given regular expression from a string
Function parameters
string input
string regex
boolean glob
Return value
string - that has matches removed
Remove any leading zeros
Function parameters
string input
Return value
string - that has leading zeros removed
Function for escaping (replacing) (HTML|XML...) tags with their (HTML|XML...) meaning.
Function parameters
string text
Return value
string - escaped text
Shorthand for select (splitstring (s, separators), 0, "") Useful now that the above produces a deprecation warning.
Function parameters
string s
string separators
Return value
string - first component or ""
Format file name - truncate the middle part of the directory to fit to the reqested lenght. Path elements in the middle of the string are replaced by ellipsis (...). The result migth be longer that requested size if size of the last element (with ellipsis) is longer than the requested size. If the requested size is greater than size of the input then the string is not modified. The last part (file name) is never removed.
Function parameters
string file_path
integer len
Return value
string - Truncated file name
Example 91.
FormatFilename("/really/very/long/file/name", 15) -> "/.../file/name"
FormatFilename("/really/very/long/file/name", 5) -> ".../name"
FormatFilename("/really/very/long/file/name", 100) -> "/really/very/long/file/name"
Return a pretty description of a download rate
Function parameters
integer bytes_per_second
Return value
string - formatted string
Add a download rate status to a message.
Function parameters
string text
integer avg_bps
integer curr_bps
Return value
string - formatted message
Return a pretty description of a byte count
Function parameters
integer bytes
Return value
string - formatted string
Return a pretty description of a byte count
Function parameters
integer bytes
integer precision
boolean omit_zeroes
Return value
string - formatted string
Example 94.
FormatSizeWithPrecision(128, 2, true) -> "128 B" FormatSizeWithPrecision(4096, 2, true) -> "4 kB" FormatSizeWithPrecision(4096, 2, false) -> "4.00 kB" FormatSizeWithPrecision(1024*1024, 2, true) -> "1 MB"
Get comment without metadata
Function parameters
string input
Return value
string - Comment used as variable description
Get metadata lines from input string
Function parameters
string input
Return value
list<string> - Metadata lines in list
Function parameters
string s
Return value
list<string> - the items as a list, with empty lines removed
Optional formatted text
Function parameters
string f
string s
Return value
string - sformat (f, s) if s is neither empty or nil, else ""
Optional parenthesized text
Function parameters
string s
Return value
string - " (Foo)" if Foo is neither empty or nil, else ""
Add spaces after the text to make it long enough
Function parameters
string text
integer length
Return value
string - padded text
Add zeros before the text to make it long enough.
Function parameters
string text
integer length
Return value
string - padded text
Parse string of values
Function parameters
string options
map parameters
Return value
list<string> - List of strings
Parse metadata from a sysconfig comment
Function parameters
string comment
Return value
map<string, string> - parsed metadata
Quote a string with 's
Function parameters
string var
Return value
string - quoted string
Make a random base-36 number. srandom should be called beforehand.
Function parameters
integer len
Return value
string - random string of 0-9 and a-z
Replace substring in a string. All substrings source are replaced by string target.
Function parameters
string s
string source
string target
Return value
string - result
Function creates text table without using HTML tags. (Useful for commandline) Undefined option uses the default one.
Function parameters
list<string> header
list <list <string> > items
map <string, any> options
Return value
string - table Header: [ "Id", "Configuration", "Device" ] Items: [ [ "1", "aaa", "Samsung Calex" ], [ "2", "bbb", "Trivial Trinitron" ] ] Possible Options: horizontal_padding (for columns), table_left_padding (for table)
Unquote a string with 's (quoted with quote)
Function parameters
string var
Return value
string - unquoted string
See also:
quote
Function returns underlined text header without using HTML tags. (Useful for commandline)
Function parameters
string header_line
integer left_padding
Return value
string - underlined header line
Characters valid in a filename (not pathname). Naturally "/" is disallowed. Otherwise, the graphical ASCII characters are allowed.
Return value
string - for ValidChars
Returns text wrapped at defined margin. Very useful for translated strings used for pop-up windows or dialogs where you can't know the width. It controls the maximum width of the string so the text should allways fit into the minimal ncurses window. If you expect some long words, such us URLs or words with a hyphen inside, you can also set the additional split-characters to "/-". Then the function can wrap the word also after these characters. This function description was wrapped using the function String::WrapAt().
Function parameters
string text
integer width
string split_string
Return value
string - wrapped string
Interface manipulation of /etc/sysconfig/SuSEFirewall
List of Global Functions
ActivateConfiguration - Function which stops firewall. Then firewall is started immediately when firewall is wanted to be started: SetStartService(boolean).
AddForwardIntoMasqueradeRule - Adds forward into masquerade rule.
AddInterfaceIntoZone - Functions adds interface into defined zone. All appearances of interface in other zones are removed.
AddService - Function adds service into selected zone (or zone of interface) for selected protocol. Function take care about port-aliases, first of all, removes all of them.
AddSpecialInterfaceIntoZone - Functions adds special string into defined zone.
AddXenSupport - Function adds a special interface 'xenbr+' into the FW_FORWARD_ALWAYS_INOUT_DEV variable.
ConvertToServicesDefinedByPackages - Converts old built-in service definitions to services defined by packages.
DisableServices - Functions disables services needed for SuSEFirewall in /etc/inet.d/
EnableServices - Functions enables services needed for SuSEFirewall in /etc/inet.d/
Export - Function for getting exported SuSEFirewall configuration
GetAcceptExpertRules - Returns list of rules describing protocols and ports that are allowed to be accessed from listed hosts. All is returned as a single string. Zone needs to be defined.
GetAdditionalServices - This powerful function returns list of services/ports which are not assigned to any fully-supported known-services. This function doesn't check for services defined by packages. They are listed by a different way.
GetAllDialUpInterfaces - Function returns list of dial-up interfaces.
GetAllKnownInterfaces - Function returns list of maps of known interfaces.
GetAllNonDialUpInterfaces - Function returns list of non-dial-up interfaces.
GetBroadcastAllowedPorts - Local function return map of allowed ports (without aliases). If any list for zone is defined but empty, all allowed UDP ports for this zone also accept broadcast packets. This function returns only ports that are mentioned in configuration, it doesn't return ports that are listed in some service (defined by package) which is enabled.
GetEnableService - Function which returns whether SuSEfirewall should be enabled in /etc/init.d/ starting scripts during the Write() process
GetFirewallInterfaces - Function returns all interfaces already configured in firewall.
GetFirewallInterfacesMap - Function returns map of `interfaces in zones`.
GetFirewallKernelModules - Returns list of additional kernel modules, that are loaded by firewall on startup. For instance "ip_conntrack_ftp" and "ip_nat_ftp" for FTP service.
GetIgnoreLoggingBroadcast - Function returns yes/no - ingoring broadcast for zone
GetInterfacesInZone - Function returns list of known interfaces in requested zone. Special strings like 'any' or 'auto' and unknown interfaces are removed from list.
GetInterfacesInZoneSupportingAnyFeature - Function returns list of known interfaces in requested zone. Special string 'any' in EXT zone covers all interfaces without any zone assignment.
GetKnownFirewallZones - Function returns list of known firewall zones (shortnames)
GetListOfForwardsIntoMasquerade - Function returns list of rules of forwarding ports to masqueraded IPs.
GetListOfKnownInterfaces - Function returns list of all known interfaces.
GetLoggingSettings - Function returns actual state of logging for rule taken as parameter.
GetMasquerade - Function returns actual state of Masquerading support.
GetModified - Functions returns whether any firewall's configuration was modified.
GetProtectFromInternalZone - Function returns if firewall is protected from internal zone.
GetProtocolTranslatedName - Returns translated protocol name. Translation is provided from SuSEfirewall2 sysconfig format to l10n format.
GetServices - Function returns map of supported services in all firewall zones.
GetServicesAcceptRelated - Returns list of FW_SERVICES_ACCEPT_RELATED_*: Services to allow that are considered RELATED by the connection tracking engine, e.g., SLP browsing reply or Samba browsing reply.
GetServicesInZones - Function returns map of supported services all network interfaces.
GetSpecialInterfacesInZone - Function returns list of special strings like 'any' or 'auto' and uknown interfaces.
GetStartService - Function which returns if SuSEfirewall2 should start in Write process. In fact it means that SuSEfirewall2 will at the end.
GetSupportRoute - Function returns if firewall supports routing.
GetTrustIPsecAs - Function returns the trust level of IPsec packets. See SetTrustIPsecAs() for more information.
GetZoneFullName - Function returns localized name of the zone identified by zone shortname.
GetZoneOfInterface - Function returns the firewall zone of interface, nil if no zone includes the interface. Error is reported when interface is found in multiple firewall zones, then the first appearance is returned.
GetZonesOfInterfaces - Function returns list of zones of requested interfaces
GetZonesOfInterfacesWithAnyFeatureSupported - Function returns list of zones of requested interfaces. Special string 'any' in 'EXT' zone is supported.
HaveService - Function returns if requested service is allowed in respective zone. Function takes care for service's aliases (only for TCP and UDP). Service is defined by set of parameters such as port and protocol.
Import - Function for setting SuSEFirewall configuration from input
InterfacesSupportedByAnyFeature - Returns list of interfaces not mentioned in any zone and covered by the special string 'any' in zone 'EXT' if such string exists there and the zone is EXT. If the feature 'any' is not set, function returns empty list.
IsAnyNetworkInterfaceSupported - Function returns whether the feature 'any' network interface is supported in the firewall configuration. The string 'any' must be in the 'EXT' zone.
IsEnabled - Function determines if all SuSEFirewall scripts are enabled in init scripts /etc/init.d/ now. For configuration "enabled" status use GetEnableService().
IsInterfaceInZone - Function returns if the interface is in zone.
IsOtherFirewallRunning - Function returns if any other firewall then SuSEfirewall2 is currently running on the system. It uses command `iptables` to get information about just active iptables rules and compares the output with current status of SuSEfirewall2.
IsServiceSupportedInZone - Function returns if service is supported (allowed) in zone. Service must be defined in the SuSEFirewallServices. Works transparently also with services defined by packages. Such service starts with "service:" prefix.
IsStarted - Function determines if at least one SuSEFirewall script is started now. For configuration "started" status use GetStartService().
Read - Function for reading SuSEFirewall configuration. Fills internal variables only.
RemoveForwardIntoMasqueradeRule - Function removes rule for forwarding into masquerade from the list of current rules returned by GetListOfForwardsIntoMasquerade().
RemoveInterfaceFromZone - Function removes interface from defined zone.
RemoveService - Function removes service from selected zone (or for interface) for selected protocol. Function takes care about port-aliases, removes all of them.
RemoveSpecialInterfaceFromZone - Function removes special string from defined zone.
ResetModified - Do not use this function. Only for firewall installation proposal.
ResetReadFlag - Function resets flag which doesn't allow to read configuration from disk again. So you actually can reread the configuration from disk. Currently, only the first Read() call reads the configuration from disk.
SaveAndRestartService - Function for saving configuration and restarting firewall. Is is the same as Write() but write is allways forced.
SetAcceptExpertRules - Sets expert allow rules for zone.
SetAdditionalServices - Function sets additional ports/services from taken list. Firstly, all additional services are removed also with their aliases. Secondly new ports/protocols are added. It uses GetAdditionalServices() function to get the current state and then it removes what has been removed and adds what has been added.
SetBroadcastAllowedPorts - Function creates allowed-broadcast-ports string from broadcast map and saves it.
SetEnableService - Function which sets if SuSEfirewall should start in Write process
SetFirewallKernelModules - Sets list of additional kernel modules to be loaded by firewall on startup.
SetIgnoreLoggingBroadcast - Function sets yes/no - ingoring broadcast for zone
SetInstallPackagesIfMissing - By default SuSEfirewall2 packages are just checked whether they are installed. With this function, you can change the behavior to also offer installing the packages.
SetLoggingSettings - Function sets state of logging for rule taken as parameter.
SetMasquerade - Function sets Masquerade support.
SetModified - Function sets internal variable, which indicates, that any "firewall settings were modified", to "true".
SetProtectFromInternalZone - Function sets if firewall should be protected from internal zone.
SetServices - Function sets status for several services on several network interfaces.
SetServicesAcceptRelated - Functions sets FW_SERVICES_ACCEPT_RELATED_*: Services to allow that are considered RELATED by the connection tracking engine, e.g., SLP browsing reply or Samba browsing reply.
SetServicesForZones - Function sets status for several services in several firewall zones.
SetStartService - Function which sets if SuSEfirewall should start in Write process.
SetSupportRoute - Function sets if firewall should support routing.
SetTrustIPsecAs - Function sets how firewall should trust successfully decrypted IPsec packets. It should be the zone name (shortname) or 'no' to trust packets the same as firewall trusts the zone from which IPsec packet came.
StartServices - Functions starts services needed for SuSEFirewall
StopServices - Functions stops services needed for SuSEFirewall
SuSEFirewallIsInstalled - Returns whether all needed packages are installed.
Write - Function for writing and enabling configuration it is an union of WriteConfiguration() and ActivateConfiguration().
WriteConfiguration - Function writes configuration into /etc/sysconfig/ and enables or disables firewall in /etc/init.d/ by the setting SetEnableService(boolean). This is a write-only configuration, firewall is never started only enabled or disabled.
WriteOnly - Helper function for the backward compatibility. See WriteConfiguration(). Remove from code ASAP.
List of Global Variables
max_port_number - Maximal number of port number, they are in the interval 1-65535 included
special_all_interface_string - String which includes all interfaces not-defined in any zone
special_all_interface_zone - Zone which works with the special_all_interface_string string
Function which stops firewall. Then firewall is started immediately when firewall is wanted to be started: SetStartService(boolean).
Return value
boolean - if successful
Adds forward into masquerade rule.
Function parameters
string source_net
string forward_to_ip
string protocol
string req_port
string redirect_to_port
string requested_ip
Return value
void
Functions adds interface into defined zone. All appearances of interface in other zones are removed.
Function parameters
string interface
string zone
Return value
void
Function adds service into selected zone (or zone of interface) for selected protocol. Function take care about port-aliases, first of all, removes all of them.
Function parameters
string service
string protocol
string interface
Return value
boolean - success
Functions adds special string into defined zone.
Function parameters
string interface
string zone
Return value
void
Function adds a special interface 'xenbr+' into the FW_FORWARD_ALWAYS_INOUT_DEV variable.
Return value
void
See also:
https://bugzilla.novell.com/show_bug.cgi?id=154133
https://bugzilla.novell.com/show_bug.cgi?id=233934
https://bugzilla.novell.com/show_bug.cgi?id=375482
Converts old built-in service definitions to services defined by packages.
Return value
void
See also:
#bnc 399217
Functions disables services needed for SuSEFirewall in /etc/inet.d/
Return value
boolean - result
Functions enables services needed for SuSEFirewall in /etc/inet.d/
Return value
boolean - result
Function for getting exported SuSEFirewall configuration
Return value
map <string, any> - with configuration
Returns list of rules describing protocols and ports that are allowed to be accessed from listed hosts. All is returned as a single string. Zone needs to be defined.
Function parameters
string zone
Return value
string - with rules
This powerful function returns list of services/ports which are not assigned to any fully-supported known-services. This function doesn't check for services defined by packages. They are listed by a different way.
Function parameters
string protocol
string zone
Return value
list <string> - of additional (unassigned) services
Function returns list of dial-up interfaces.
Return value
list <string> - of dial-up interface names
Function returns list of maps of known interfaces.
Return value
list <map <string, string> > - of all interfaces
[ $[ "id":"modem0", "name":"Askey 815C", "type":"dialup", "zone":"EXT" ], ... ]
Function returns list of non-dial-up interfaces.
Return value
list <string> - of non-dial-up interface names
Local function return map of allowed ports (without aliases). If any list for zone is defined but empty, all allowed UDP ports for this zone also accept broadcast packets. This function returns only ports that are mentioned in configuration, it doesn't return ports that are listed in some service (defined by package) which is enabled.
Return value
map <string, list <string> > - strings are allowed ports or port ranges
$[ "ZONE1" : [ "port1", "port2" ], "ZONE2" : [ "port3", "port4" ], "ZONE3" : [ ] ]
Function which returns whether SuSEfirewall should be enabled in /etc/init.d/ starting scripts during the Write() process
Return value
boolean - if the firewall should start
See also:
Write()
EnableServices()
Function returns all interfaces already configured in firewall.
Return value
list<string> - of configured interfaces
Function returns map of `interfaces in zones`.
Return value
map <string, list <string> > - interface in zones
map $[zone : [list of interfaces]]
Returns list of additional kernel modules, that are loaded by firewall on startup. For instance "ip_conntrack_ftp" and "ip_nat_ftp" for FTP service.
Return value
list <string> - of kernel modules
See also:
/etc/sysconfig/SuSEfirewall2 option nr. 32 (FW_LOAD_MODULES)
Function returns yes/no - ingoring broadcast for zone
Function parameters
string zone
Return value
string - "yes" or "no"
Function returns list of known interfaces in requested zone. Special strings like 'any' or 'auto' and unknown interfaces are removed from list.
Function parameters
string zone
Return value
list<string> - of interfaces
Function returns list of known interfaces in requested zone. Special string 'any' in EXT zone covers all interfaces without any zone assignment.
Function parameters
string zone
Return value
list<string> - of interfaces
Function returns list of known firewall zones (shortnames)
Return value
list <string> - of firewall zones
Function returns list of rules of forwarding ports to masqueraded IPs.
Return value
list <map <string, string> > - list of rules
list [$[ key: value ]]
Example 107.
GetListOfForwardsIntoMasquerade() -> [ $[ "forward_to":"172.24.233.1", "protocol":"tcp", "req_ip":"192.168.0.3", "req_port":"355", "source_net":"192.168.0.0/20", "to_port":"533"], ... ]
Function returns list of all known interfaces.
Return value
list <string> - of interfaces
Function returns actual state of logging for rule taken as parameter.
Function parameters
string rule
Return value
string - 'ALL', 'CRIT', or 'NONE'
Function returns actual state of Masquerading support.
Return value
boolean - if supported
Functions returns whether any firewall's configuration was modified.
Return value
boolean - if the configuration was modified
Function returns if firewall is protected from internal zone.
Return value
boolean - if protected from internal
Returns translated protocol name. Translation is provided from SuSEfirewall2 sysconfig format to l10n format.
Function parameters
string protocol
Return value
string - translated string (e.g., RPC)
Function returns map of supported services in all firewall zones.
Function parameters
list<string> services
Return value
map <string, map <string, boolean> > -
Returns $[service : $[ zone_name : supported_status]]
Example 110.
// Firewall in not protected from internal zone, that's why
// all services report that they are enabled in INT zone
GetServices (["samba-server", "service:irc-server"]) -> $[
"samba-server" : $["DMZ":false, "EXT":false, "INT":true],
"service:irc-server" : $["DMZ":false, "EXT":true, "INT":true]
]Returns list of FW_SERVICES_ACCEPT_RELATED_*: Services to allow that are considered RELATED by the connection tracking engine, e.g., SLP browsing reply or Samba browsing reply.
Function parameters
string zone
Return value
list <string> - list of definitions
See also:
SetServicesAcceptRelated()
Function returns map of supported services all network interfaces.
Function parameters
list<string> services
Return value
map <string, map <string, boolean> > -
Returns $[service : $[ interface : supported_status ]]
Example 112.
GetServicesInZones (["service:irc-server"]) -> $["service:irc-server":$["eth1":true]] // No such service "something" GetServicesInZones (["something"])) -> $["something":$["eth1":nil]] GetServicesInZones (["samba-server"]) -> $["samba-server":$["eth1":false]]
Function returns list of special strings like 'any' or 'auto' and uknown interfaces.
Function parameters
string zone
Return value
list <string> - special strings or unknown interfaces
Function which returns if SuSEfirewall2 should start in Write process. In fact it means that SuSEfirewall2 will at the end.
Return value
boolean - if the firewall should start
Function returns if firewall supports routing.
Return value
boolean - if route is supported
Function returns the trust level of IPsec packets. See SetTrustIPsecAs() for more information.
Return value
string - zone or "no"
Function returns localized name of the zone identified by zone shortname.
Function parameters
string zone
Return value
string - zone name
Example 114.
LANG=en_US GetZoneFullName ("EXT") -> "External Zone"
LANG=cs_CZ GetZoneFullName ("EXT") -> "ExternĂ ZĂłna"Function returns the firewall zone of interface, nil if no zone includes the interface. Error is reported when interface is found in multiple firewall zones, then the first appearance is returned.
Function parameters
string interface
Return value
string - zone
Function returns list of zones of requested interfaces
Function parameters
list<string> interfaces
Return value
list<string> - firewall zones
Function returns list of zones of requested interfaces. Special string 'any' in 'EXT' zone is supported.
Function parameters
list<string> interfaces
Return value
list<string> - firewall zones
Function returns if requested service is allowed in respective zone. Function takes care for service's aliases (only for TCP and UDP). Service is defined by set of parameters such as port and protocol.
Function parameters
string service
string protocol
string interface
Return value
boolean - if service is allowed
Example 118.
HaveService ("ssh", "TCP", "EXT") -> true
HaveService ("ssh", "TCP", "modem0") -> false
HaveService ("53", "UDP", "dsl") -> falseFunction for setting SuSEFirewall configuration from input
Function parameters
map <string, any> import_settings
Return value
void
Returns list of interfaces not mentioned in any zone and covered by the special string 'any' in zone 'EXT' if such string exists there and the zone is EXT. If the feature 'any' is not set, function returns empty list.
Function parameters
string zone
Return value
list<string> - of interfaces covered by special string 'any'
See also:
IsAnyNetworkInterfaceSupported()
Function returns whether the feature 'any' network interface is supported in the firewall configuration. The string 'any' must be in the 'EXT' zone.
Return value
boolean - is_supported whether the feature is supported or not
Function determines if all SuSEFirewall scripts are enabled in init scripts /etc/init.d/ now. For configuration "enabled" status use GetEnableService().
Return value
boolean - if enabled
Function returns if the interface is in zone.
Function parameters
string interface
string zone
Return value
boolean - is in zone
Function returns if any other firewall then SuSEfirewall2 is currently running on the system. It uses command `iptables` to get information about just active iptables rules and compares the output with current status of SuSEfirewall2.
Return value
boolean - if other firewall is running
Function returns if service is supported (allowed) in zone. Service must be defined in the SuSEFirewallServices. Works transparently also with services defined by packages. Such service starts with "service:" prefix.
Function parameters
string service
string zone
Return value
boolean - if supported
Example 120.
// All ports defined by dns-server service in SuSEFirewallServices module
// are enabled in the respective zone
IsServiceSupportedInZone ("dns-server", "EXT") -> true
// irc-server definition exists on the system and the irc-server
// is mentioned in FW_CONFIGURATIONS_EXT variable of SuSEfirewall2
IsServiceSupportedInZone ("service:irc-server", "EXT") -> trueSee also:
YCP Module SuSEFirewallServices
Function determines if at least one SuSEFirewall script is started now. For configuration "started" status use GetStartService().
Return value
boolean - if started
Function for reading SuSEFirewall configuration. Fills internal variables only.
Return value
boolean - if successful
Function removes rule for forwarding into masquerade from the list of current rules returned by GetListOfForwardsIntoMasquerade().
Function parameters
integer remove_item
Return value
void
See also:
GetListOfForwardsIntoMasquerade()
Function removes interface from defined zone.
Function parameters
string interface
string zone
Return value
void
Function removes service from selected zone (or for interface) for selected protocol. Function takes care about port-aliases, removes all of them.
Function parameters
string service
string protocol
string interface
Return value
boolean - success
Example 122.
RemoveService ("22", "TCP", "DMZ") -> true
is the same as
RemoveService ("ssh", "TCP", "DMZ") -> trueFunction removes special string from defined zone.
Function parameters
string interface
string zone
Return value
void
Do not use this function. Only for firewall installation proposal.
Return value
void
Function resets flag which doesn't allow to read configuration from disk again. So you actually can reread the configuration from disk. Currently, only the first Read() call reads the configuration from disk.
Return value
void
Function for saving configuration and restarting firewall. Is is the same as Write() but write is allways forced.
Return value
boolean - if successful
Sets expert allow rules for zone.
Function parameters
string zone
string expert_rules
Return value
boolean - if successful
Function sets additional ports/services from taken list. Firstly, all additional services are removed also with their aliases. Secondly new ports/protocols are added. It uses GetAdditionalServices() function to get the current state and then it removes what has been removed and adds what has been added.
Function parameters
string protocol
string zone
list <string> new_list_services
Return value
void
See also:
GetAdditionalServices()
Function creates allowed-broadcast-ports string from broadcast map and saves it.
Function parameters
map <string, list <string> > broadcast
Return value
void
See also:
GetBroadcastAllowedPorts() for an example of data
Function which sets if SuSEfirewall should start in Write process
Function parameters
boolean enable_service
Return value
void
Sets list of additional kernel modules to be loaded by firewall on startup.
Function parameters
list <string> k_modules
Return value
void
See also:
/etc/sysconfig/SuSEfirewall2 option nr. 32
Function sets yes/no - ingoring broadcast for zone
Function parameters
string zone
string bcast
Return value
void
By default SuSEfirewall2 packages are just checked whether they are installed. With this function, you can change the behavior to also offer installing the packages.
Function parameters
boolean new_status
Return value
void
Function sets state of logging for rule taken as parameter.
Function parameters
string rule
string state
Return value
void
Function sets Masquerade support.
Function parameters
boolean enable
Return value
void
Function sets internal variable, which indicates, that any "firewall settings were modified", to "true".
Return value
void
Function sets if firewall should be protected from internal zone.
Function parameters
boolean set_protect
Return value
void
Function sets status for several services on several network interfaces.
Function parameters
list<string> services_ids
list<string> interfaces
boolean new_status
Return value
boolean - if successfull
Example 127.
// Disabling services SetServices (["samba-server", "service:irc-server"], ["eth1", "modem0"], false) // Enabling services SetServices (["samba-server", "service:irc-server"], ["eth1", "modem0"], true)
See also:
SetServicesForZones()
Functions sets FW_SERVICES_ACCEPT_RELATED_*: Services to allow that are considered RELATED by the connection tracking engine, e.g., SLP browsing reply or Samba browsing reply.
Function parameters
string zone
list <string> ruleset
Return value
void
See also:
GetServicesAcceptRelated()
Function sets status for several services in several firewall zones.
Function parameters
list<string> services_ids
list<string> firewall_zones
boolean new_status
Return value
boolean - if successfull
Example 129.
SetServicesForZones (["samba-server", "service:irc-server"], ["DMZ", "EXT"], false); SetServicesForZones (["samba-server", "service:irc-server"], ["EXT", "DMZ"], true);
See also:
GetServicesInZones()
GetServices()
Function which sets if SuSEfirewall should start in Write process.
Function parameters
boolean start_service
Return value
void
See also:
GetStartService()
Function sets if firewall should support routing.
Function parameters
boolean set_route
Return value
void
Function sets how firewall should trust successfully decrypted IPsec packets. It should be the zone name (shortname) or 'no' to trust packets the same as firewall trusts the zone from which IPsec packet came.
Function parameters
string zone
Return value
void
Functions starts services needed for SuSEFirewall
Return value
boolean - result
Returns whether all needed packages are installed.
Return value
boolean - whether SuSEfirewall2 is installed
Function for writing and enabling configuration it is an union of WriteConfiguration() and ActivateConfiguration().
Return value
boolean - if succesfull
Function writes configuration into /etc/sysconfig/ and enables or disables firewall in /etc/init.d/ by the setting SetEnableService(boolean). This is a write-only configuration, firewall is never started only enabled or disabled.
Return value
boolean - if successful
Module for handling interfaces in SuSEfirewall2
List of Global Functions
ChangedByUser - Functions sets that a firewall proposal was changed by user by editing firewall zone of network interface (applicable during 2nd stage of installation only)
FirewallZonesComboBoxItems - Function returns list of items for combo box with all known firewall zones. There's also an item for "" (no zone or fw off).
GetZoneOfInterface - Function returns the firewall zone of interface, "" if no zone includes the interface. Error is reported when interface is found in multiple firewall zones, then the first appearance is returned. If firewall is off, "" is returned.
IsOn -
IsProtectedByFirewall - Function returns if interface is protected by firewall. It means: Firewall is Running and Enabled. Interface is included in any protected firewall zone (means EXT, DMZ or INT).
ProtectByFirewall - Functions sets protection of interface by the protect-status.<br> protect==true -> add interface into selected firewall zone, sets firewall to be started and enabled when booting.<br> protect==false -> removes interface from all firewall zones, if there are no other interfaces protected by firewall, stops it and removes it from boot process.
Read - Function reads configuration of SuSEFirewall.
Write - Function writes configuration of SuSEFirewall.
List of Global Variables
Functions sets that a firewall proposal was changed by user by editing firewall zone of network interface (applicable during 2nd stage of installation only)
Function parameters
boolean changed
Return value
void
Function returns list of items for combo box with all known firewall zones. There's also an item for "" (no zone or fw off).
Return value
list< list<string> > - item list for CWM
Function returns the firewall zone of interface, "" if no zone includes the interface. Error is reported when interface is found in multiple firewall zones, then the first appearance is returned. If firewall is off, "" is returned.
Function parameters
string interface
Return value
string - zone
Function returns if interface is protected by firewall. It means: Firewall is Running and Enabled. Interface is included in any protected firewall zone (means EXT, DMZ or INT).
Function parameters
string interface
Return value
boolean - if it is protected
Functions sets protection of interface by the protect-status.<br> protect==true -> add interface into selected firewall zone, sets firewall to be started and enabled when booting.<br> protect==false -> removes interface from all firewall zones, if there are no other interfaces protected by firewall, stops it and removes it from boot process.
Function parameters
string interface
string zone
boolean protect_status
Return value
boolean - if successful
Return value
boolean - Whether the UI should warn about interfaces that are not in any zone
Interface manipulation of /etc/sysconfig/SuSEFirewall (expert rules)
List of Global Functions
AddNewAcceptRule - Adds a new accept-rule. Possible keys for parameters are "network", "protocol", "dport" and "sport". Needed are "network" and "protocol".
DeleteRuleID - Deletes Custom Rule defined by the ID of the rule. The ID is an order of list returned by GetListOfAcceptRules(). ID starts at number 0. Every time you delete some rule, the list is, of course, regenerated.
GetAllExpertRulesProtocols - Returns list of all protocols accepted by the expert rules.
GetListOfAcceptRules - Returns list of rules (maps) describing protocols and ports that are allowed to be accessed from listed hosts. "network" and "protocol" are needed arguments, "dport" and "sport" are optional. Undefined values are returned as empty strings.
IsValidNetwork - Function checks the network definition used for firewall expert rules.
RemoveAcceptRule - Removes a single expert firewall rule.
ValidNetwork - Returns string of valid network definition.
List of Global Variables
Adds a new accept-rule. Possible keys for parameters are "network", "protocol", "dport" and "sport". Needed are "network" and "protocol".
Function parameters
string zone
map <string, string> params
Return value
boolean - if successful
Example 130.
AddNewAcceptRule (
"EXT",
$["network":"192.168.0.1/255.255.240.0", "protocol":"tcp", "sport":"22"]
) -> trueSee also:
GetListOfAcceptRules()
RemoveAcceptRule()
Deletes Custom Rule defined by the ID of the rule. The ID is an order of list returned by GetListOfAcceptRules(). ID starts at number 0. Every time you delete some rule, the list is, of course, regenerated.
Function parameters
string zone
integer rule_id
Return value
boolean - if successful
See also:
GetListOfAcceptRules()
Returns list of all protocols accepted by the expert rules.
Return value
list <string> - of protocols
See also:
list <string> allowed_expert_protocols
Returns list of rules (maps) describing protocols and ports that are allowed to be accessed from listed hosts. "network" and "protocol" are needed arguments, "dport" and "sport" are optional. Undefined values are returned as empty strings.
Function parameters
string zone
Return value
list <map <string, string> > - of rules
This might return, e.g., [
// All requests from 80.44.11.22 to TCP port 22
$[ "network" : "80.44.11.22", "protocol" : "tcp", "dport" : "22", "sport" : "" ],
// All requests from network 80.44.11.0/24 to UDP port 53 originating on port 53
$[ "network" : "80.44.11.0/24", "protocol" : "udp", "dport" : "53", "sport" : "53" ],
// All requests from network 0/0 (everywhere) to TCP port 443
$[ "network" : "0/0", "protocol" : "tcp", "dport" : "443", "sport" : "" ],
]
See also:
IsValidNetwork()
Function checks the network definition used for firewall expert rules.
Function parameters
string network
Return value
boolean - if it is a valid network definition
Example 133.
IsValidNetwork("192.168.0.1") -> true
IsValidNetwork("192.168.0.355") -> false
IsValidNetwork("192.168.0.0/24") -> true
IsValidNetwork("192.168.0.1/32") -> true
IsValidNetwork("192.168.0.1/0") -> false
IsValidNetwork("192.168.0.0/255.255.0.0") -> true
IsValidNetwork("192.168.0.0/255.255.333.0") -> false
IsValidNetwork("192.168.0.0/255.255.224.0") -> true
IsValidNetwork("0/0") -> true
See also:
`man iptables`
Removes a single expert firewall rule.
Function parameters
string zone
map <string, string> params
Return value
boolean - if successful
Example 134.
RemoveAcceptRule (
"EXT",
$["network":"192.168.0.1/255.255.240.0", "protocol":"tcp", "sport":"22"]
) -> trueSee also:
GetListOfAcceptRules() for possible keys in map
AddNewAcceptRule()
Functional interface for SuSEFirewall installation proposal
List of Global Functions
GetChangedByUser - Local function returns if proposal was changed by user
GetProposalInitialized - Local function returns if proposal was initialized already
OpenServiceOnNonDialUpInterfaces - Function opens up the service on all non-dial-up network interfaces. If there are no network interfaces known and the 'any' feature is supported, function opens the service for the zone supporting that feature. If there are only dial-up interfaces, function opens the service for them.
ProposalSummary - Function returns the proposal summary
Propose - Function proposes the SuSEfirewall2 configuration
Reset - Function fills up default configuration into internal values
SetChangedByUser - Function sets that proposal was changed by user
SetProposalInitialized - Function sets that proposal was initialized
List of Global Variables
Local function returns if proposal was changed by user
Return value
boolean - if proposal was changed by user
Local function returns if proposal was initialized already
Return value
boolean - if proposal was initialized
Function opens up the service on all non-dial-up network interfaces. If there are no network interfaces known and the 'any' feature is supported, function opens the service for the zone supporting that feature. If there are only dial-up interfaces, function opens the service for them.
Function parameters
string service
list <string> fallback_ports
Return value
void
Function returns the proposal summary
Return value
map<string, string> - proposal
map $[ "output" : "HTML Proposal Summary", "warning" : "HTML Warning Summary", ]
Function sets that proposal was changed by user
Function parameters
boolean changed
Return value
void
Definition of Supported Firewall Services and Port Aliases.
List of Global Functions
GetFilenameFromServiceDefinedByPackage - Creates a file name from service name defined by package. Service MUST be defined by package, otherwise it returns 'nil'.
GetListOfServicesAddedByPackage - Returns list of service-ids defined by packages.
GetModified - Returns whether configuration was modified
GetNeededBroadcastPorts - Function returns needed ports allowing broadcast
GetNeededIPProtocols - Function returns needed IP protocols for service
GetNeededPortsAndProtocols - Function returns needed ports and protocols for service. Function cares about if the service is defined or not.
GetNeededRPCPorts - Function returns needed RPC ports for service
GetNeededTCPPorts - Function returns needed TCP ports for service
GetNeededUDPPorts - Function returns needed UDP ports for service
GetPossiblyConflictServices - Function returns list of possibly conflicting services. Conflicting services are for instance nis-client and nis-server. DEPRECATED - we currently don't have such services - services are defined by packages.
GetSupportedServices - Function returns the map of supported (known) services.
IsKnownService - Function returns if the service_id is a known (defined) service
ReadServicesDefinedByRPMPackages - Reads definition of services that can be used in FW_CONFIGURATIONS_[EXT|INT|DMZ] in SuSEfirewall2.
ResetModified - Sets that configuration was not modified
ServiceDefinedByPackage - Returns whether the service ID is defined by package. Returns 'false' if it isn't.
SetModified - Sets that configuration was modified
SetNeededPortsAndProtocols - Immediately writes the configuration of service defined by package to the service definition file. Service must be defined by package, this function doesn't work for hard-coded services (SuSEFirewallServices).
List of Global Variables
Creates a file name from service name defined by package. Service MUST be defined by package, otherwise it returns 'nil'.
Function parameters
string service
Return value
string - file name (e.g., 'abc')
Example 135.
GetFilenameFromServiceDefinedByPackage ("service:abc") -> "abc"
GetFilenameFromServiceDefinedByPackage ("abc") -> nilReturns list of service-ids defined by packages.
Return value
list <string> - service ids
Function returns needed ports allowing broadcast
Function parameters
string service
Return value
list <string> - of needed broadcast ports
Function returns needed IP protocols for service
Function parameters
string service
Return value
list <string> - of needed IP protocols
Function returns needed ports and protocols for service. Function cares about if the service is defined or not.
Function parameters
string service
Return value
map <string, list <string> > - of needed ports and protocols
Example 136.
GetNeededPortsAndProtocols ("service:aaa") -> $[
"tcp_ports" : [ "122", "ftp-data" ],
"udp_ports" : [ "427" ],
"rpc_ports" : [ "portmap", "ypbind" ],
"ip_protocols" : [],
"broadcast_ports" : [ "427" ],
];Function returns needed RPC ports for service
Function parameters
string service
Return value
list <string> - of needed RPC ports
Function returns needed TCP ports for service
Function parameters
string service
Return value
list <string> - of needed TCP ports
Function returns needed UDP ports for service
Function parameters
string service
Return value
list <string> - of needed UDP ports
Function returns list of possibly conflicting services. Conflicting services are for instance nis-client and nis-server. DEPRECATED - we currently don't have such services - services are defined by packages.
Return value
list <string> - of conflicting services
Function returns the map of supported (known) services.
Return value
map <string, string> - supported services
$[ service_id : localized_service_name ]
$[
"dns-server" : "DNS Server",
"vnc" : "Remote Administration",
]Function returns if the service_id is a known (defined) service
Function parameters
string service_id
Return value
boolean - if is known (defined)
Reads definition of services that can be used in FW_CONFIGURATIONS_[EXT|INT|DMZ] in SuSEfirewall2.
Return value
boolean - if successful
Returns whether the service ID is defined by package. Returns 'false' if it isn't.
Function parameters
string service
Return value
boolean - whether service is defined by package
Example 137.
ServiceDefinedByPackage ("http-server") -> false
ServiceDefinedByPackage ("service:http-server") -> trueImmediately writes the configuration of service defined by package to the service definition file. Service must be defined by package, this function doesn't work for hard-coded services (SuSEFirewallServices).
Function parameters
string service
map <string, list <string> > store_definition
Return value
boolean - if successful (nil in case of developer's mistake)
Example 138.
SetNeededPortsAndProtocols ( "service:something", $[ "tcp_ports" : [ "22", "ftp-data", "400:420" ], "udp_ports" : [ ], "rpc_ports" : [ "portmap", "ypbind" ], "ip_protocols" : [ "esp" ], "broadcast_ports" : [ ], ] );
See also:
IsKnownService()
ServiceDefinedByPackage()
Jiri Srain <jsrain@suse.de>
Purpose: Responsible for getting information from the /etc/SuSE-release
(and similar for other system) file
List of Global Functions
ReleaseInformation - Get information about the release for displaying in the selection list of found systems
ReleaseName - Get information about the release for using in the help text Is limited for the currently running product
ReleaseVersion - Get information about the release Is limited for the currently running product
List of Global Variables
Get information about the release for displaying in the selection list of found systems
Function parameters
string directory
Return value
string - the release information
Get information about the release for using in the help text Is limited for the currently running product
Return value
string - the release information
List of Global Functions
GetModified - Data was modified?
PollAbort - Checks whether an Abort button has been pressed. If so, calls function to confirm the abort call. :*
Read - Read all sudo settings
Write - Write all sudo settings
List of Global Variables
Checks whether an Abort button has been pressed. If so, calls function to confirm the abort call. :*
Return value
boolean - true if abort confirmed
Support for summaries of the configured devices
List of Global Functions
AddHeader - Add a RichText section header to an existing summary.
AddLine - Add a line to an existing summary.
AddListItem - Add a list item to an existing summary. Requires a previous call to 'summaryOpenList()'.
AddNewLine - Add a newline to an existing summary.
AddSimpleSection - Add a simple section to an existing summary, consisting of a header and one single item.
CloseList - End a list within a summary.
Device - Function that creates description of one device.
DevicesList - Function that creates the whole final product. "Not detected" will be returned if the list is empty.
NotConfigured - Function that creates a 'Not configured.' message.
OpenList - Start a list within a summary.
List of Global Variables
Add a RichText section header to an existing summary.
Function parameters
string summary
string header
Return value
string - the new summary including the new header
Add a line to an existing summary.
Function parameters
string summary
string line
Return value
string - the new summary including the new line
Add a list item to an existing summary. Requires a previous call to 'summaryOpenList()'.
Function parameters
string summary
string item
Return value
string - the new summary including the new line
Add a newline to an existing summary.
Function parameters
string summary
Return value
string - the new summary
Add a simple section to an existing summary, consisting of a header and one single item.
Function parameters
string summary
string header
string item
Return value
string - the new summary including the new line
End a list within a summary.
Function parameters
string summary
Return value
string - the new summary
Function that creates description of one device.
Function parameters
string name
string description
Return value
string - String with the item.
Function that creates the whole final product. "Not detected" will be returned if the list is empty.
Function parameters
list<string> devices
Return value
string - The resulting text.
Function that creates a 'Not configured.' message.
Return value
string - String with the message.
List of Global Functions
Abort - Abort function
AutoPackages - Return packages needed to be installed and removed during Autoinstallation to insure module has all needed software installed.
Export - Dump the support settings to a single map (For use by autoinstallation.)
Import - Get all support settings from the first parameter (For use by autoinstallation.)
Modified - Prototypes
Modified - Data was modified?
Overview - Create an overview table with all configured cards
Read - Read all support settings
SetModified - Mark as modified, for Autoyast.
SetWriteOnly - Set write_only flag (for autoinstalation).
Summary - Create a textual summary and a list of unconfigured cards
Write - Write all support settings
List of Global Variables
root_pw - root password for running supportconfig if module run as non-root
Return packages needed to be installed and removed during Autoinstallation to insure module has all needed software installed.
Return value
map - with 2 lists.
Dump the support settings to a single map (For use by autoinstallation.)
Return value
map - Dumped settings (later acceptable by Import ())
Get all support settings from the first parameter (For use by autoinstallation.)
Function parameters
map settings
Return value
boolean - True on success
Mark as modified, for Autoyast.
Function parameters
boolean value
Return value
void
Set write_only flag (for autoinstalation).
Function parameters
boolean value
Return value
void
Create a textual summary and a list of unconfigured cards
Return value
list - summary of the current configuration
Data for configuration of sysconfig, input and output functions.
List of Global Functions
Export - Dump the sysconfig settings to a single map (For use by autoinstallation.)
Import - Set all sysconfig settings from the list and read information from files (For use by autoinstallation.)
Modified - Data was modified?
Read - Read all sysconfig variables
RegisterAgents - Register .syseditor path (use INI agent in multiple file mode)
Search - Search in syscnfig files for value
Set - Set all sysconfig settings from the list (For use by autoinstallation.)
Summary - Create a textual summary
Write - Write all sysconfig settings
get_all - Get list of all variables
get_all_names - Get map of all variables
get_description - Get description of selected variable
get_file_from_id - Get file name where is variable located from variable identification
get_location_from_id - Get variable location in tree widget from variable identification
get_metadata - Get metadata lines from input string
get_modified - Get list of modified variables
get_name_from_id - Get variable name from variable identification or empty string if input is invalid
get_only_comment - Get comment without metadata
modified - Return modification status of variable
parse_metadata - Parse metadata from comment
remove_whitespaces - Remove white spaces at beginning or at the end of string
set_value - Set new variable value
List of Global Variables
Dump the sysconfig settings to a single map (For use by autoinstallation.)
Return value
list - Dumped settings (later acceptable by Import ())
Set all sysconfig settings from the list and read information from files (For use by autoinstallation.)
Function parameters
list settings
Return value
boolean - True on success
Register .syseditor path (use INI agent in multiple file mode)
Return value
void
Search in syscnfig files for value
Function parameters
map params
boolean show_progress
Return value
list<string> - List of found variables (IDs)
Set all sysconfig settings from the list (For use by autoinstallation.)
Function parameters
list<map> settings
Return value
void
Get list of all variables
Return value
list<string> - List of variable identifications
Get map of all variables
Return value
map<string, list<string> > - Map of variable names, key is variable name, value is a list of variable identifications
Get description of selected variable
Function parameters
string varid
Return value
map<string, any> - Description map
Get file name where is variable located from variable identification
Function parameters
string id
Return value
string - File name
Get variable location in tree widget from variable identification
Function parameters
string id
Return value
string - Variable location
Get metadata lines from input string
Function parameters
string input
Return value
list<string> - Metadata lines in list
Get list of modified variables
Return value
list<string> - List of modified variables
Get variable name from variable identification or empty string if input is invalid
Function parameters
string id
Return value
string - Variable name
Get comment without metadata
Function parameters
string input
Return value
string - Comment used as variable description
Return modification status of variable
Function parameters
string varid
Return value
boolean - True if variable was modified
Parse metadata from comment
Function parameters
string comment
Return value
map<string, string> - parsed metadata
Remove white spaces at beginning or at the end of string
Function parameters
string input
Return value
string - String without white spaces
Set new variable value
Function parameters
string variable
string new_value
boolean force
boolean force_change
Return value
symbol - Result: `not_found (specified variable was not found in config file), `not_valid (new value is not valid - doesn't match variable type definition), `ok (success)
Functionality for copying files from another systems
List of Global Functions
CopyFilesToSystem - Proceeds the copying of all files in inst-sys (that were copied from another partition before) to the directory.
CopyFilesToTemp - Mounts the partition and proceeds the copying files from that partition to the inst-sys.
CreateDirectoryIfMissing - Checks whether the directory exists and creates it if it is missing If the path exists but it is not a directory, it tries to create another directory and returns its name. 'nil' is returned when everythig fails.
GetCopySystemFiles - Returns list of copy_files definitions
GetUseControlFileDef - Sets whether copy_files from control file should be used
SaveInstSysContent - Function reads <globals><save_instsys_content /></globals> from control file and copies all content from inst-sys to the just installed system.
SetCopySystemFiles - Sets new rules which files will be copied during installation.
SetUseControlFileDef - Sets whether to use copy_files from control file
List of Global Variables
Proceeds the copying of all files in inst-sys (that were copied from another partition before) to the directory.
Function parameters
string extract_to_dir
Return value
boolean
Mounts the partition and proceeds the copying files from that partition to the inst-sys.
Function parameters
string partition
list <string> filenames
string copy_to
Return value
boolean
copy_to == "/root/" (where to copy it to the installed system)
Checks whether the directory exists and creates it if it is missing If the path exists but it is not a directory, it tries to create another directory and returns its name. 'nil' is returned when everythig fails.
Function parameters
string create_directory
Return value
string
Returns list of copy_files definitions
Return value
list <map>
See also:
SetCopySystemFiles for more info
Sets whether copy_files from control file should be used
Return value
boolean - whether to use them
See also:
SetUseControlFileDef
Function reads <globals><save_instsys_content /></globals> from control file and copies all content from inst-sys to the just installed system.
Return value
boolean
<globals>
<save_instsys_content config:type="list">
<save_instsys_item>
<instsys_directory>/root/</instsys_directory>
<system_directory>/root/inst-sys/</system_directory>
</save_instsys_item>
</save_instsys_content>
</globals>Sets new rules which files will be copied during installation.
Function parameters
list <map> new_copy_files
Return value
void
[
"copy_to_dir" : (string) "system_directory_to_copy_to",
"mandatory_files" : (list <string>) [ list of mandatory files ],
"optional_files" : (list <string>) [ list of optional files ],
]
Example 140.
SetCopySystemFiles ([
$["copy_to_dir":"/root/backup", "mandatory_files":["/etc/passwd", "/etc/shadow"]]
$["copy_to_dir":"/root/backup", "mandatory_files":["/etc/ssh/ssh_host_dsa_key"], "optional_files":["/etc/ssh/ssh_host_rsa_key.pub"]]
])See also:
FATE #305019: configure the files to copy from a previous installation
List of Global Functions
AutoPackages - Return packages needed to be installed and removed during Autoinstallation to insure module has all needed software installed.
Export - Dump the system-profile settings to a single map (For use by autoinstallation.)
Import - Get all system-profile settings from the first parameter (For use by autoinstallation.)
Modified - Data was modified?
Read - Read all system-profile settings
SetModified - Mark as modified, for Autoyast.
Write - Write all system-profile settings
executeSmoltCmd - Execute the smolt command to read or submit data
List of Global Variables
moduleTitle - Module title to use - will be selected and set in the client
Return packages needed to be installed and removed during Autoinstallation to insure module has all needed software installed.
Return value
map - with 2 lists.
Dump the system-profile settings to a single map (For use by autoinstallation.)
Return value
map - Dumped settings (later acceptable by Import ())
Get all system-profile settings from the first parameter (For use by autoinstallation.)
Function parameters
map settings
Return value
boolean - True on success
Mark as modified, for Autoyast.
Function parameters
boolean value
Return value
void
Handle TFTP Requests
List of Global Variables
Send a get request
Function parameters
string server
string remote
string local
Return value
boolean - true on success
Expert Partitioner
Arvin Schnell <aschnell@suse.de>
The DumbTab widget must have id `tab. The ids of the items of the DumbTab
widget must be made of symbols.
List of Global Functions
Init - When calling this function the DumbTab widget must already exist.
List of Global Variables
Routines for Table/Popup interface
List of Global Functions
CreateTableDescr - Get the map with the table widget
DisableTable - Disable whole table
EnableTable - Enable whole table (except buttons that should be grayed according to currently selected table row
TableHandle - Handle the event that happened on the table
TableHandleWrapper - Wrapper for TableHandle using CWM::GetProcessedWidget () for getting widget description map
TableInit - Initialize the displayed table
TableInitWrapper - Wrapper for TableInit using CWM::GetProcessedWidget () for getting widget description map
askForNewOption - Displaye popup for option to edit choosing
deleteTableItem - Delete an item from the table Just a wrapper for module-specific function
id2key - Get option key from the option id global only because of testsuites
key2descr - Get option description map from the key global only because of testsuites
singleOptionEditPopup - Display and handle the popup for option
tableEntryChanged - Realize if table entry was changed
updateButtons - Enable or disable the Delete and up/down buttons
updateOptionMap - Update the option description map in order to contain handlers of all needed functions global only because of testsuites
List of Global Variables
Get the map with the table widget
Function parameters
map<string,any> attrib
map<string,any> widget_descr
Return value
map<string,any> - table widget
Enable whole table (except buttons that should be grayed according to currently selected table row
Function parameters
map<string, any> descr
Return value
void
Handle the event that happened on the table
Function parameters
map<string, any> descr
string key
map event_descr
Return value
symbol - modified event if needed
Wrapper for TableHandle using CWM::GetProcessedWidget () for getting widget description map
Function parameters
string key
map event_descr
Return value
symbol - return value for wizard sequencer or nil
Initialize the displayed table
Function parameters
map<string, any> descr
string key
Return value
void
Wrapper for TableInit using CWM::GetProcessedWidget () for getting widget description map
Function parameters
string key
Return value
void
Displaye popup for option to edit choosing
Function parameters
list possible
boolean editable
map<string,any> descr
Return value
string - option identifies, nil if canceled
Delete an item from the table Just a wrapper for module-specific function
Function parameters
any opt_id
map<string, any> descr
Return value
boolean - true if was really deleted
Get option key from the option id global only because of testsuites
Function parameters
map<string, any> descr
any opt_id
Return value
string - option key
Get option description map from the key global only because of testsuites
Function parameters
map<string, any> descr
string opt_key
Return value
map<string, any> - option description map
Display and handle the popup for option
Function parameters
map<string,any> option
Return value
symbol - `_tp_ok or `_tp_cancel
Realize if table entry was changed
Function parameters
any opt_id
map<string, any> opt_descr
Return value
boolean - true if was changed
Enable or disable the Delete and up/down buttons
Function parameters
map<string,any> descr
map<string,any> opt_descr
Return value
void
List of Global Functions
Abort - Abort function
AutoPackages - Return packages needed to be installed and removed during Autoinstallation to insure module has all needed software installed.
Export - Dump the taotie settings to a single map (For use by autoinstallation.)
Import - Get all taotie settings from the first parameter (For use by autoinstallation.)
Modified - Prototypes
Modified - Data was modified?
Overview - Create an overview table with all configured cards
Summary - Create a textual summary and a list of unconfigured cards
List of Global Variables
modified - Data was modified?
write_only - Write only, used during autoinstallation. Don't run services and SuSEconfig, it's all done at one place.
Return packages needed to be installed and removed during Autoinstallation to insure module has all needed software installed.
Return value
map - with 2 lists.
Dump the taotie settings to a single map (For use by autoinstallation.)
Return value
map - Dumped settings (later acceptable by Import ())
Get all taotie settings from the first parameter (For use by autoinstallation.)
Function parameters
map settings
Return value
boolean - True on success
Main testsuite module
List of Global Variables
Dump value to the testsuite output (keyword: Dump)
Function parameters
any output
Return value
void
Dump file contents to the testsuite output (keyword: File)
Function parameters
string filename
Return value
void
Function parameters
list<any> INPUT
any DEFAULT
Return value
list - of various SCR return values
Data for configuration of TftpServer, input and output functions.
List of Global Functions
AutoPackages - Return needed packages and packages to be removed during autoinstallation.
Export - Dump the tftp-server settings to a single map (For use by autoinstallation.)
ForeignServersError - Return error string to be used in WriteOnly (for autoinst) or before the edit dialog.
GetModified - Returns true if the settings were modified
Import - Get all tftp-server settings from the first parameter (For use by autoinstallation.)
ParseServerArgs - Extract the directory and other arguments. global to make testing easier
Read - Read all tftp-server settings
Set - Set module data, without validity checking
SetModified - Function sets an internal variable indicating that any settings were modified to "true". Used for autoinst cloning.
Summary -
Write - Write all tftp-server settings
WriteOnly - Write all tftp-server settings without actually (re)starting the service
List of Global Variables
directory - Image directory, last argument of in.tftpd
foreign_servers - Detect who is serving tftp: Inetd may be running, it is the default. But it is ok unless it is serving tftp. So we detect who is serving tftp and warn if it is not xinetd or in.tftpd. If nonempty, the user is notified and the module gives up.
other_args - Other arguments to in.tftpd, ie. not including -s or /dir
required_packages - Required packages for operation
start - Start tftpd via xinetd?
Return needed packages and packages to be removed during autoinstallation.
Return value
map - of lists.
Dump the tftp-server settings to a single map (For use by autoinstallation.)
Return value
map - Dumped settings (later acceptable by Import ())
Return error string to be used in WriteOnly (for autoinst) or before the edit dialog.
Return value
string - error string
Returns true if the settings were modified
Return value
boolean - settings were modified
Get all tftp-server settings from the first parameter (For use by autoinstallation.)
Function parameters
map settings
Return value
boolean - True on success
Extract the directory and other arguments. global to make testing easier
Function parameters
string server_args
Return value
void
Set module data, without validity checking
Function parameters
map settings
Return value
void
Function sets an internal variable indicating that any settings were modified to "true". Used for autoinst cloning.
Return value
void
Detect who is serving tftp: Inetd may be running, it is the default. But it is ok unless it is serving tftp. So we detect who is serving tftp and warn if it is not xinetd or in.tftpd. If nonempty, the user is notified and the module gives up.
Timezone related stuff
List of Global Functions
Export - AutoYaST interface function: Return the Timezone configuration as a map.
GetCountryForTimezone - Return the country part of language code for given timezone
GetDateTime - GetDateTime()
GetDateTimeMap - Return current date and time in the map
GetLanguageForTimezone - Return the language code for given timezone (by reverse searching the "language -> timezone" map)
GetTimezoneCountry - Return translated country name of given timezone
GetTimezoneForLanguage - GetTimezoneForLanguage()
Import - AutoYaST interface function: Get the Timezone configuration from a map.
MakeProposal - Return proposal list of strings.
Modified - was anything modified?
PopVal - restore the original data from internal map
ProposeLocaltime - Return true if localtime should be proposed as default Based on current hardware configuration: Win partitions present or 32bit Mac
PushVal - save the initial data
Read - Read timezone settings from sysconfig
Region - Return list of regions for timezone selection list
ResetZonemap - Clear the internal map with timezones, so the timezone data could be retranslated next time when they are needed
Save - Save()
Selection - Selection()
Set - Set()
SetTime - Set the new time and date given by user
SetTimezoneForLanguage - Set the timezone for the given system language.
Summary - AutoYaST interface function: Return the summary of Timezone configuration as a map.
SystemTime2HWClock - Set the Hardware Clock to the current System Time.
Timezone - Timezone()
UpdateTimezone - Convert the duplicated timezone to the only one supported Temporary solution - a result of discussion of bug #47472
get_zonemap - get_zonemap()
List of Global Variables
modified - if anyuthing was modified (currently for auto client only)
windows_partition - If there is windows partition, assume that local time is used
AutoYaST interface function: Return the Timezone configuration as a map.
Return value
map - with the settings
Return the country part of language code for given timezone
Function parameters
string tz
Return value
string
GetDateTime()
Function parameters
boolean real_time
boolean locale_format
Return value
string - The string output.
Return the language code for given timezone (by reverse searching the "language -> timezone" map)
Function parameters
string tz
Return value
string
Return translated country name of given timezone
Function parameters
string zone
Return value
string
GetTimezoneForLanguage()
Function parameters
string sys_language
string default_timezone
Return value
string - The timezone for this language, e.g. "US/Eastern" or the default value if nothing found.
See also:
-
AutoYaST interface function: Get the Timezone configuration from a map.
Function parameters
map settings
Return value
boolean - success
Return proposal list of strings.
Function parameters
boolean force_reset
boolean language_changed
Return value
list<string> - user readable description. If force_reset is true reset the module to the timezone stored in default_timezone.
Return true if localtime should be proposed as default Based on current hardware configuration: Win partitions present or 32bit Mac
Return value
boolean
Clear the internal map with timezones, so the timezone data could be retranslated next time when they are needed
Return value
void
Selection()
Function parameters
integer num
Return value
list - map for timezones 'timezone_id' is used internally in Set and Probe functions. 'timezone_name' is a user-readable string. Uses Language::language for translation.
See also:
Set()
Set()
Function parameters
string zone
boolean really
Return value
integer - the number of the region that contains the timezone
Set the new time and date given by user
Function parameters
string year
string month
string day
string hour
string minute
string second
Return value
void
Set the timezone for the given system language.
Function parameters
string sys_language
Return value
void - the number of the region that contains the timezone
AutoYaST interface function: Return the summary of Timezone configuration as a map.
Return value
string - summary string (html)
Convert the duplicated timezone to the only one supported Temporary solution - a result of discussion of bug #47472
Function parameters
string tmz
Return value
string
Expert Partitioner
Arvin Schnell <aschnell@suse.de>
The Tree widget must have id `tree. The ids of the items of the Tree
widget must be made of symbols or strings.
List of Global Functions
List of Global Variables
Handle user input by either switching the panel or delegating the input to the selected panel.
Function parameters
symbol widget
Return value
void
Initialises internal data and calls the create function of the selected panel.
Function parameters
map<any, map> d
Return value
void
Data for configuration of tv, input and output functions.
List of Global Functions
CardAddCurrent - Add the <B>current_card</B> to the <B>cards</B>. Try to fill holes after removes.
CardGet - Get <B>index</B>th card.
CardIndexUniqKey - Return card index
CardRemove - Remove <B>index</B>th card. Does not touch <B>current_card</B>. (In fact, we just replace the card on the position of 'index' with nil.)
CardReplaceWithCurrent - Replace <B>index</B>th card with the <B>current_card</B>.
CardsAsItemMap - Creates the content of the "configured card" Table in OverviewDialog()
CardsAsItems - Creates the content of the "configured card" Table in OverviewDialog()
CardsDBVendorGetCards - Create a list of cards of the selected vendor.
CardsDBVendorsAsItems - Create a list of items for the "Vendors:" SelectionBox in the ManualDialog() screen.
CardsUniqueKeys - Creates a list of unique keys of cards that are already installed.
Detect - Scan for the TV cards.
DetectedCardGet - Get <B>index</B>th card.
DetectedCardsAsItems - List of the TV cards acceptable by the Selection Box widget in the DetectedDialog(). The already installed cards are filtered out.
Export - Dump the tv settings to a single map (For use by autoinstallation.)
GetIRCModule - Decides which LIRC module can be used accoring to current TV card
GetKernelModuleInfo - Return description of one kernel module
GetTuner - Returns the tuner map according to its ID
GetTvCard - Grab the TV card from the database
Import - Get all TV settings from the first parameter (For use by autoinstallation.)
InitializeStationsConfig - Initialize stations configuration (read global config etc.)
InstalledCardsSummary - Returns a list with the overview of the installed cards. It can be used in Summary::DevicesList().
IsDirty - If the configuration was changed by the user, this will return true.
LoadIRCModulesDescription - Load the desription of irc kernel modules (modinfo)
ModuleParametersAsItems - List of the parameters for the selected kernel module acceptable by the Table widget in the ManualDetailsDialog().
ModulesAsItems - List of the kernel modules for radio cards acceptable by the Combo Box widget in the ManualDetailsDialog().
Propose - Create a configuration automagically.
Read - Read all TV card settings from the SCR
ReadCardsDatabase - Read the database of the TV cards.
ReadIRC - Read IRC settings
ReadKernelModules - Get a list of the available v4l kernel modules and store it to <B>kernel_modules</B> map.
ReadSettings - Fill the map of all tv settings from the SCR.
ReadStationsConfig - Read the whole contents of xawtvrc file and return it as a map
ReadTunersDatabase - Read the database of the tuners.
ReadUserSettings - Read the state of "not_ask" variable (if the TV/radio application presence should be checked again next time)
Summary - Build a textual summary that can be used e.g. in inst_hw_config () or something similar.
TunersDBAsItems - List of tuners for TV cards acceptable by the SelectionBox widget.
TunersDBHasTunersFor - Are there any tuners for the <B>kernel_module</B>?
TunersDBSelectTuner - Return the <B>number</B>th tuner.
Write - Update the SCR according to tv settings
WriteIRC - Write IRC settings
WriteStationsConfig - Write to /etc/X11/xawtvrc
tv_tmp_start - Load the modules for TV suport now, use current (not yet saved) options It calls something like 'modprobe -C /dev/null bttv card=2 tuner=23'
List of Global Variables
cards_database - Database of the TV cards for the manual configuration. It is a list of maps with vendors, and each of the vendor contains a list of cards with the kernel module and its parameters. It is read in ReadDialog()
channels_config - Configuration of TV stations (contents of /etc/X11/xawtvrc file)
current_card - The card which is currently being configured. It will become an entry in the "cards" list.
current_card_no - The number of card which is currently being configured. It has its meaning only when editing the entry.
irc_config - configuration file for IR control
irc_modified - Is IRC modified?
irc_module - kerenel module used for lirc
irc_modules - Map of lirc modules, together with their description (from modinfo)
irc_modules_list - Kernel modules for LIRC
kernel_modules - Map of available TV kernel modules and their parameters.
not_ask - If YaST should check the presence of TV/radio application
proposal_valid - Becomes true, when the module is initialized for proposal.
remotes - Paths to config files of various remote controls
stations_modified - Were TV stations modified?
use_irc - Is IRC used?
used_modprobe_conf - This is true, if tv data were read from /etc/modprobe.conf On write, they shoud be removed and written only to /etc/modprobe.d/tv
Add the <B>current_card</B> to the <B>cards</B>. Try to fill holes after removes.
Return value
integer - Index of the added card.
Get <B>index</B>th card.
Function parameters
integer index
Return value
any - The 'index'th card or nil
Return card index
Function parameters
string uniq
Return value
integer - index or nil if ID was not found
Remove <B>index</B>th card. Does not touch <B>current_card</B>. (In fact, we just replace the card on the position of 'index' with nil.)
Function parameters
integer index
Return value
boolean - Returns true if the card was erased.
Replace <B>index</B>th card with the <B>current_card</B>.
Function parameters
integer index
Return value
boolean - Returns true if successfully replaced.
Creates the content of the "configured card" Table in OverviewDialog()
Return value
list<map<string,any> > - List of `item()s
Creates the content of the "configured card" Table in OverviewDialog()
Return value
list - List of `item()s
Create a list of cards of the selected vendor.
Function parameters
map autodetected
integer sel_vendor
Return value
list - List of cards of the selected vendor.
Create a list of items for the "Vendors:" SelectionBox in the ManualDialog() screen.
Function parameters
map autodetected
map parameters
string mod
Return value
list - List of list of `item()s and number of the vendor to preselect
Creates a list of unique keys of cards that are already installed.
Return value
list - List of the unque keys.
Scan for the TV cards.
Return value
boolean - Return false if the module should be terminated.
Get <B>index</B>th card.
Function parameters
integer index
Return value
map - The 'index'th card or nil
List of the TV cards acceptable by the Selection Box widget in the DetectedDialog(). The already installed cards are filtered out.
Return value
list - List of TV cards including Other (not detected) with `id(-1))
Dump the tv settings to a single map (For use by autoinstallation.)
Return value
map - Dumped settings (later acceptable by Import ())
Decides which LIRC module can be used accoring to current TV card
Return value
string - module name
Return description of one kernel module
Function parameters
string modname
Return value
map
Returns the tuner map according to its ID
Function parameters
string kernel_name
string tuner_id
Return value
map - Tuner
Grab the TV card from the database
Function parameters
string card_model
string modname
Return value
map - card map
Get all TV settings from the first parameter (For use by autoinstallation.)
Function parameters
map settings
Return value
boolean - True on success
Initialize stations configuration (read global config etc.)
Return value
boolean
Returns a list with the overview of the installed cards. It can be used in Summary::DevicesList().
Return value
list - Description of the installed cards
If the configuration was changed by the user, this will return true.
Return value
boolean - Has the configuration changed?
Load the desription of irc kernel modules (modinfo)
Return value
void
List of the parameters for the selected kernel module acceptable by the Table widget in the ManualDetailsDialog().
Function parameters
map modules
string selected_module
map parameters
Return value
list - List of `item()s.
List of the kernel modules for radio cards acceptable by the Combo Box widget in the ManualDetailsDialog().
Function parameters
map modules
string selected_module
Return value
list - List of `item()s
Read all TV card settings from the SCR
Function parameters
block<boolean> abort
Return value
boolean - True on success
Read the database of the TV cards.
Return value
boolean - Was the read successful?
Get a list of the available v4l kernel modules and store it to <B>kernel_modules</B> map.
Return value
boolean - Returns <B>true</B>.
Fill the map of all tv settings from the SCR.
Return value
boolean - Was the reading succesfull?
Read the whole contents of xawtvrc file and return it as a map
Function parameters
path pth
Return value
map
Read the database of the tuners.
Return value
boolean - Was the read successful?
Read the state of "not_ask" variable (if the TV/radio application presence should be checked again next time)
Return value
boolean - not_ask value
Build a textual summary that can be used e.g. in inst_hw_config () or something similar.
Return value
string - Summary of the configuration.
List of tuners for TV cards acceptable by the SelectionBox widget.
Function parameters
string kernel_module
map selected_tuner
Return value
list - List of `item()s.
Are there any tuners for the <B>kernel_module</B>?
Function parameters
string kernel_module
Return value
boolean - Are there available tuners for it?
Return the <B>number</B>th tuner.
Function parameters
string kernel_module
integer number
Return value
map - Tuner.
Update the SCR according to tv settings
Function parameters
block<boolean> abort
Return value
boolean - True on success
Database of the TV cards for the manual configuration. It is a list of maps with vendors, and each of the vendor contains a list of cards with the kernel module and its parameters. It is read in ReadDialog()
The card which is currently being configured. It will become an entry in the "cards" list.
The number of card which is currently being configured. It has its meaning only when editing the entry.
Type repository for validation of user-defined types
List of Global Functions
TypeRepository - Constructor, defines the known types.
enum_validator - Generic enumerated type validator.
is_a - Validate, that the given value is of given type.
regex_validator - Generic regular expression validator.
List of Global Variables
Generic enumerated type validator.
Function parameters
list values
string value
Return value
boolean - true if successful
Validate, that the given value is of given type.
Function parameters
any value
string type
Return value
boolean - true, if the value can be considered to be of a given type
Manipulate and Parse URLs
List of Global Functions
Build - Build URL from tokens as parsed with Parse
Check - Check URL
EscapeString - Escape reserved characters in string used as a part of URL (e.g. '%' => '%25', '@' => '%40'...)
FormatURL - Format URL - truncate the middle part of the directory to fit to the requested lenght.
HidePassword - Hide password in an URL - replaces the password in the URL by 'PASSWORD' string. If there is no password in the URL the original URL is returned. It should be used when an URL is logged to y2log or when it is displayed to user.
HidePasswordToken - Hide password token in parsed URL (by URL::Parse()) - the password is replaced by 'PASSWORD' string. Similar to HidePassword() but uses a parsed URL as the input.
MakeMapFromParams - Reads list of HTTP params and returns them as map. (Useful also for cd:/, dvd:/, nfs:/ ... params) Neither keys nor values are HTML-unescaped, see UnEscapeString().
MakeParamsFromMap - Returns string made of HTTP params. It's a reverse function to MakeMapFromParams(). Neither keys nor values are HTML-escaped, use EscapeString() if needed.
Parse - Tokenize URL
UnEscapeString - Escape reserved characters in string used as a part of URL (e.g. '%25' => '%', '%40' => '@'...)
List of Global Variables
transform_map_filename - Transform map used for (un)escaping characters in file location part of an URL. It doesn't contain '%' because this character must be used in a particular order (the first or the last) during processing
transform_map_passwd - Transform map used for (un)escaping characters in username/password part of an URL. It doesn't contain '%' because this character must be used in a particular order (the first or the last) during processing
transform_map_query - Transform map used for (un)escaping characters in query part of a URL. It doesn't contain '%' because this character must be used in a particular order (the first or the last) during processing
Build URL from tokens as parsed with Parse
Function parameters
map tokens
Return value
string - url, empty string if invalid data is used to build the url.
See also:
RFC 2396 (updated by RFC 2732)
also perl-URI: URI(3)
Check URL
Function parameters
string url
Return value
boolean - true if correct
See also:
RFC 2396 (updated by RFC 2732)
also perl-URI: URI(3)
Escape reserved characters in string used as a part of URL (e.g. '%' => '%25', '@' => '%40'...)
Function parameters
string in
map<string,string> transform
Return value
string - escaped string
Example 141.
URL::EscapeString ("http://some.nice.url/:with:/$p#ci&l/ch@rs/", URL::transform_map_passwd)
-> http%3a%2f%2fsome.nice.url%2f%3awith%3a%2f%24p#ci%26l%2fch%40rs%2fFormat URL - truncate the middle part of the directory to fit to the requested lenght.
Function parameters
map tokens
integer len
Return value
string - Truncated URL
Example 142.
FormatURL("http://download.opensuse.org/very/log/path/which/will/be/truncated/target_file", 45)
-> "http://download.opensuse.org/.../target_file"
FormatURL("http://download.opensuse.org/very/log/path/which/will/be/truncated/target_file", 60)
-> "http://download.opensuse.org/very/.../be/truncated/target_file"
See also:
Parse should be used to convert URL string to a map (tokens parameter)
Hide password in an URL - replaces the password in the URL by 'PASSWORD' string. If there is no password in the URL the original URL is returned. It should be used when an URL is logged to y2log or when it is displayed to user.
Function parameters
string url
Return value
string - new URL with 'PASSWORD' password or unmodified URL if there is no password
Hide password token in parsed URL (by URL::Parse()) - the password is replaced by 'PASSWORD' string. Similar to HidePassword() but uses a parsed URL as the input.
Function parameters
map tokens
Return value
map - map with replaced password
Reads list of HTTP params and returns them as map. (Useful also for cd:/, dvd:/, nfs:/ ... params) Neither keys nor values are HTML-unescaped, see UnEscapeString().
Function parameters
string params
Return value
map <string, string> - params
Example 143.
MakeMapFromParams ("device=sda3&login=aaa&password=bbb") -> $[
"device" : "sda3",
"login" : "aaa",
"password" : "bbb"
]Returns string made of HTTP params. It's a reverse function to MakeMapFromParams(). Neither keys nor values are HTML-escaped, use EscapeString() if needed.
Function parameters
map <string, string> params_map
Return value
string
Example 144.
MakeMapFromParams ($[
"param1" : "a",
"param2" : "b",
"param3" : "c",
]) -> "param1=a¶m2=b¶m3=c"See also:
MakeMapFromParams
Tokenize URL
Function parameters
string url
Return value
map - URL split to tokens
Example 145.
Parse("http://name:pass@www.suse.cz:80/path/index.html?question#part") ->
$[
"scheme" : "http",
"host" : "www.suse.cz"
"port" : "80",
"path" : /path/index.html",
"user" : "name",
"pass" : "pass",
"query" : "question",
"fragment": "part"
]Escape reserved characters in string used as a part of URL (e.g. '%25' => '%', '%40' => '@'...)
Function parameters
string in
map<string,string> transform
Return value
string - unescaped string
Example 146.
URL::UnEscapeString ("http%3a%2f%2fsome.nice.url%2f%3awith%3a%2f%24p#ci%26l%2fch%40rs%2f", URL::transform_map_passwd)
-> http://some.nice.url/:with:/$p#ci&l/ch@rs/Transform map used for (un)escaping characters in file location part of an URL. It doesn't contain '%' because this character must be used in a particular order (the first or the last) during processing
Transform map used for (un)escaping characters in username/password part of an URL. It doesn't contain '%' because this character must be used in a particular order (the first or the last) during processing
Anas Nashif <nashif@suse.de>
Arvin Schnell <arvin@suse.de>
Lukas Ocilka <locilka@suse.cz>
Purpose: Update module
List of Global Functions
Detach -
DropObsoletePackages - Drops packages defined in control file (string) software->dropped_packages
GetBaseSelections - Get all available base selections sorted in reverse order (highest ordered bases selection comes first).
GetProductName - Read product name and version for the old and new release. Fill Installation::installedVersion and Installation::updateVersion.
InitUpdate - Set initial values for variables that user can't change. They are defined in the control file.
IsProductSupportedForUpgrade - Returns whether the installed product is supported for upgrade. (Functionality for FATE #301844).
OnlyUpdateInstalled - Returns whether upgrade process should only update installed packages or also install new packages. True means - do not upgrade, only update packages. (Functionality for FATE #301844).
ProductsCompatible - Check if installed product and product to upgrade to are compatible
ProposeSelection - Propose a selection for the update and save it's name in Update::selected_selection.
Reset -
SilentlyDowngradePackages - Returns whether upgrade process should silently downgrade packages if needed. 'true' means that packages might be downgraded, 'nil' is returned when the feature is not supported in the control file.
List of Global Variables
Drops packages defined in control file (string) software->dropped_packages
Return value
void
See also:
bnc #300540
Get all available base selections sorted in reverse order (highest ordered bases selection comes first).
Return value
list<string>
Read product name and version for the old and new release. Fill Installation::installedVersion and Installation::updateVersion.
Return value
boolean - success
Set initial values for variables that user can't change. They are defined in the control file.
Return value
void
Returns whether the installed product is supported for upgrade. (Functionality for FATE #301844).
Return value
boolean
Returns whether upgrade process should only update installed packages or also install new packages. True means - do not upgrade, only update packages. (Functionality for FATE #301844).
Return value
boolean
Check if installed product and product to upgrade to are compatible
Return value
boolean - true if update is possible
Propose a selection for the update and save it's name in Update::selected_selection.
Return value
void
Returns whether upgrade process should silently downgrade packages if needed. 'true' means that packages might be downgraded, 'nil' is returned when the feature is not supported in the control file.
Return value
boolean
List of Global Functions
GetBooleanValue - Retrieves the specified value and casts to a boolean.
GetIntegerValue - Retrieves the specified value and casts to an integer.
GetStringValue - Retrieves the specified value and casts to a String.
GetValue - Retrieves the specified value.
SetValue - Writes a key value pair for specified section.
List of Global Variables
Retrieves the specified value and casts to a boolean.
Function parameters
string section
string key
Return value
boolean
Retrieves the specified value and casts to an integer.
Function parameters
string section
string key
Return value
integer
Retrieves the specified value and casts to a String.
Function parameters
string section
string key
Return value
string
Retrieves the specified value.
Function parameters
string section
string key
Return value
any - The value of this key.
UI-related routines to be run from perl modules (Users.pm etc.)
List of Global Functions
GetPasswdErrorMessage - Error messages for errors detected during reading via .passwd agent
ReadNISConfigurationType - If we can ask and are a NIS server, ask which set of users to administer and set UserWriteStack accordingly.
RecodeUTF - recode the string from "environment encoding" to UTF-8
SystemUserName - Return the translated name for system user
List of Global Variables
Error messages for errors detected during reading via .passwd agent
Function parameters
integer errno
string more
Return value
string - error message
If we can ask and are a NIS server, ask which set of users to administer and set UserWriteStack accordingly.
Function parameters
string basedir
Return value
string - directory
recode the string from "environment encoding" to UTF-8
Function parameters
string text
Return value
string
Useful tool for viewing any variable contents.
List of Global Functions
BrowseTree - Shows tree with contents of variable.
BrowseTreeHelper - Creates tree with contents of variable. This function creates the tree items and returns them as term. This offers using the generated output in your behavior, such as data-structure browser with editor. Heavy recursion...
DebugBrowse - Write contents of variable to log file.
DebugBrowseHelper - Write contents of variable to log file. This function does the job. Heavy recursion...
List of Global Variables
Shows tree with contents of variable.
Function parameters
any variable
Return value
void
Example 147.
map a = $[
"first" : 35,
"second" : [ 1, 2, 3, 4, 5],
"third" : $[ "a" : 15, `b: `VBox () ]
];
ValueBrowser::BrowseTree (a);
Creates tree with contents of variable. This function creates the tree items and returns them as term. This offers using the generated output in your behavior, such as data-structure browser with editor. Heavy recursion...
Function parameters
any variable
string indent
Return value
term
Write contents of variable to log file.
Function parameters
any variable
Return value
void
provide vendor/driver update disk functions
List of Global Functions
DriverUpdate1 - DriverUpdate copy /update/* to target:/tmp/update/ !! can only be called in inst_finish !!
List of Global Variables
yast2 package version
List of Global Functions
List of Global Variables
yast2 - Version of the yast2 package
YaST API to api.opensuse-community.org
List of Global Functions
GetBaseSearchURL - Returns base search URL
MatchesCurrentArchitecture - Returns whether the current architecture matches the list of architectures got as a parameter. The current architecture is backward compatible, so also dependencies are taken into account.
PrepareOneClickInstallDescription - Writes XML configuration file for OnleClickInstall client.
SearchForPackages - Searches for packages using Webpin XML API.
SetBaseSearchURL - Sets base search URL WARNING: Use this only if you know what you are doing!
List of Global Variables
Returns whether the current architecture matches the list of architectures got as a parameter. The current architecture is backward compatible, so also dependencies are taken into account.
Function parameters
list <string> archs_to_check
Return value
boolean - whether they match the current architecture
Example 148.
// current architecture is "i386" MatchesCurrentArchitecture (["noarch", "ppc", "i386"]) -> true MatchesCurrentArchitecture (["noarch"]) -> true MatchesCurrentArchitecture (["x86_64"]) -> false MatchesCurrentArchitecture (["ppc"]) -> false
Writes XML configuration file for OnleClickInstall client.
Function parameters
list <map> packages_to_install
string save_to_file
Return value
boolean - if successful
See also:
SearchForPackages() for the format of <map> package_to_install
Searches for packages using Webpin XML API.
Function parameters
string search_for
string distribution
map <string, boolean> search_in
Return value
list <map>
Example 149.
SearchForPackages (
"desktop",
nil,
$[
"name" : true,
"description" : true,
"contents" : false,
]
)
->
[
...
$[
"archs":[
"ppc"
],
"checksum":"e0cbdbf03ce47dfd5c5f885b86706ddfa023d8dc",
"distro":"openSUSE_110",
"name":"xfce4-desktop",
"priority":"5",
"repoURL":"http://download.opensuse.org/distribution/11.0/repo/oss/suse",
"summary":"Desktop manager for the Xfce Desktop Environment",
"version":"4.4.2"
],
...
]Stefan Hundhammer <sh@suse.de>
Provides the wizard dialog (common screen for all YaST2 installation
modules) and functions to set the contents, to replace and restore
special widgets.
List of Global Functions
AbortAcceptButtonBox - Returns a button box with buttons "Abort", "Accept"
AbortApplyFinishButtonBox - Returns a button box with buttons "Abort", "Apply", "Finish"
AbortInstallationAcceptButtonBox - Returns a button box with buttons "Abort Installation", "Accept"
AcceptDialog - Returns a standard wizard dialog with buttons "Cancel", "Accept"
AddMenu - Add Menu
AddMenuEntry - Add Menu Entry
AddSubMenu - Add Sub Menu
AddTreeItem - Add Tree Item to tree enabled Wizard
BackAbortInstallationNextButtonBox - Returns a button box with buttons "Back", "Abort Installation", "Next"
BackAbortNextButtonBox - Returns a button box with buttons "Back", "Abort", "Next"
BackNextButtonBox - Returns a button box with buttons "Back", "Next"
CancelAcceptButtonBox - Returns a button box with buttons "Cancel", "Accept"
CancelOKButtonBox - Returns a button box with buttons "Cancel", "OK"
ClearContents - Clear the wizard contents.
ClearTitleIcon - Clear the wizard 'title' icon, i.e. replace it with nothing
CloseDialog - Close a wizard dialog.
CreateDialog - Create and open a typical installation wizard dialog.
CreateMenu - Create the menu in the dialog
CreateTree - Create the tree in the dialog, replaces helpspace with new tree widget
CreateTreeDialog - Create and open a Tree wizard dialog.
DeleteMenus - Delete Menu items
DeleteTreeItems - Delete Tree items
DisableAbortButton - Disable the wizard's "Abort" button.
DisableBackButton - Disable the wizard's "Back" button.
DisableCancelButton - Disable the wizard's "Cancel" button.
DisableNextButton - Disable the wizard's "Next" (or "Accept") button.
EnableAbortButton - Enable the wizard's "Abort" button.
EnableBackButton - Enable the wizard's "Back" button.
EnableCancelButton - Enable the wizard's "Cancel" button.
EnableNextButton - Enable the wizard's "Next" (or "Accept") button.
GenericDialog - Create a Generic Dialog
GenericTreeDialog - Create a Generic Tree Dialog
HideAbortButton - Hide the Wizard's "Abort" button. Restore it later with RestoreAbortButton():
HideBackButton - Hide the Wizard's "Back" button. Restore it later with RestoreBackButton():
HideNextButton - Hide the Wizard's "Next" button. Restore it later with RestoreNextButton():
HideReleaseNotesButton - Hide the "Release Notes" button, if there is any
IsWizardDialog - Check if the topmost dialog is a wizard dialog (i.e. has a widget with `id(`WizardDialog) )
NextBackDialog - Returns a standard wizard dialog with buttons "Next", "Back", "Abort".
OKDialog - Returns a standard wizard dialog with buttons "Cancel", "OK"
OpenAbortApplyFinishDialog - Open a dialog with "Accept", "Cancel" and set the keyboard focus to "Accept".
OpenAcceptAbortStepsDialog - Open a dialog with "Accept", "Cancel" that will also accept workflow steps.
OpenAcceptDialog - Open a dialog with "Accept", "Cancel" and set the keyboard focus to "Accept".
OpenAcceptStepsDialog - Open a dialog with "Accept", "Cancel" that will also accept workflow steps.
OpenCustomDialog - Open a wizard dialog with simple layout
OpenDialog - Open any wizard dialog.
OpenNextBackDialog - Open a dialog with buttons "Next", "Back", "Abort" and set the keyboard focus to "Next".
OpenNextBackStepsDialog - Open a dialog with "Back", "Next", "Abort" that will also accept workflow steps.
OpenOKDialog - Open a dialog with "OK", "Cancel" and set the keyboard focus to "OK".
OpenTreeNextBackDialog - Open a Tree dialog with buttons "Next", "Back", "Abort" and set the keyboard focus to "Next".
QueryTreeItem - Query Tree Item
ReplaceCustomHelp - Replace the help widget for dialogs opened with Wizard::OpenCustomDialog().
ReplaceHelp - Replace the wizard help subwindow with a custom widget.
RestoreAbortButton - Restore the wizard 'abort' button.
RestoreBackButton - Restore the wizard 'back' button.
RestoreHelp - Restore the wizard help subwindow.
RestoreNextButton - Restore the wizard 'next' button.
RestoreScreenShotName - Restore the screenshot name.
RetranslateButtons - Retranslate the wizard buttons.
SelectTreeItem - Select Tree item
SetAbortButton - Set the dialog's "Abort" button with a new label and a new ID
SetBackButton - Set the dialog's "Back" button with a new label and a new ID
SetContents - Set the contents of a wizard dialog
SetContentsButtons - Set contents and Buttons of wizard dialog
SetContentsFocus - Set the contents of a wizard dialog and define if to move focus to next button
SetDesktopIcon - Sets the icon specified in a .desktop file got as parameter. Desktop file is placed in a special directory (/usr/share/applications/YaST2). Parameter file is realative to that directory without ".desktop" suffix. Warning: There are no desktop files in inst-sys. Use "SetTitleIcon" instead.
SetDesktopTitle - Sets the window title according to the name specified in a .desktop file got as parameter. Desktop file is placed in a special directory (/usr/share/applications/YaST2). Parameter file is realative to that directory without ".desktop" suffix.
SetDialogTitle - Sets the dialog title shown in the window manager's title bar.
SetFocusToBackButton - Set the keyboard focus to the wizard's "Back" (or "Cancel") button.
SetFocusToNextButton - Set the keyboard focus to the wizard's "Next" (or "Accept") button.
SetHelpText - Set a new help text.
SetNextButton - Set the dialog's "Next" button with a new label and a new ID
SetProductName - Set the product name for UI
SetScreenShotName - Set a name for the current dialog:
SetTitleIcon - Sets the wizard 'title' icon to the specified icon from the standard icon directory.
ShowHelp - Open a popup dialog that displays a help text (rich text format).
ShowReleaseNotesButton - Show a "Release Notes" button with the specified label and ID if there is a "steps" panel
TimeoutUserInput - Substitute for UI::TimeoutUserInput
UserInput - Substitute for UI::UserInput
WaitForEvent - Substitute for UI::WaitForEvent
List of Global Variables
Returns a button box with buttons "Abort", "Accept"
Return value
term - a widget tree
Returns a button box with buttons "Abort", "Apply", "Finish"
Return value
term - a widget tree
Returns a button box with buttons "Abort Installation", "Accept"
Return value
term - a widget tree
Returns a standard wizard dialog with buttons "Cancel", "Accept"
Return value
term - describing the dialog.
Add Menu
Function parameters
list<map> Menu
string title
string id
Return value
list<map> - Updated Menu Data
Add Menu Entry
Function parameters
list<map> Menu
string parent_id
string title
string id
Return value
list<map> - Updated Menu Data
Add Sub Menu
Function parameters
list<map> Menu
string parent_id
string title
string id
Return value
list<map> - Updated Menu Data
Add Tree Item to tree enabled Wizard
Function parameters
list<map> Tree
string parent
string title
string id
Return value
list<map> - Updated Tree Data
Returns a button box with buttons "Back", "Abort Installation", "Next"
Return value
term - a widget tree
Returns a button box with buttons "Back", "Abort", "Next"
Return value
term - a widget tree
Returns a button box with buttons "Back", "Next"
Return value
term - a widget tree
Returns a button box with buttons "Cancel", "Accept"
Return value
term - a widget tree
Returns a button box with buttons "Cancel", "OK"
Return value
term - a widget tree
Clear the wizard 'title' icon, i.e. replace it with nothing
Return value
void
See also:
SetTitleIcon
Create the tree in the dialog, replaces helpspace with new tree widget
Function parameters
list<map> Tree
string title
Return value
void
Disable the wizard's "Abort" button.
Return value
void
See also:
EnableAbortButton
Disable the wizard's "Back" button.
Return value
void
See also:
EnableBackButton
Disable the wizard's "Cancel" button.
Return value
void
See also:
EnableCancelButton
Disable the wizard's "Next" (or "Accept") button.
Return value
void
See also:
EnableNextButton
Enable the wizard's "Abort" button.
Return value
void
See also:
DisableAbortButton
Enable the wizard's "Back" button.
Return value
void
See also:
DisableBackButton
Enable the wizard's "Cancel" button.
Return value
void
See also:
DisableCancelButton
Enable the wizard's "Next" (or "Accept") button.
Return value
void
See also:
DisableNextButton
Create a Generic Dialog
Function parameters
term button_box
Return value
term - term describing the dialog.
Create a Generic Tree Dialog
Function parameters
term button_box
Return value
term - term describing the dialog.
Hide the Wizard's "Abort" button. Restore it later with RestoreAbortButton():
Return value
void
See also:
RestoreAbortButton
Hide the Wizard's "Back" button. Restore it later with RestoreBackButton():
Return value
void
See also:
RestoreBackButton
Hide the Wizard's "Next" button. Restore it later with RestoreNextButton():
Return value
void
See also:
RestoreNextButton
Check if the topmost dialog is a wizard dialog (i.e. has a widget with `id(`WizardDialog) )
Return value
boolean - True if topmost dialog is a wizard dialog, false otherwise
Returns a standard wizard dialog with buttons "Next", "Back", "Abort".
Return value
term - describing the dialog.
Returns a standard wizard dialog with buttons "Cancel", "OK"
Return value
term - describing the dialog.
Open a dialog with "Accept", "Cancel" and set the keyboard focus to "Accept".
Return value
void
Open a dialog with "Accept", "Cancel" that will also accept workflow steps.
Return value
void
Open a dialog with "Accept", "Cancel" and set the keyboard focus to "Accept".
Return value
void
Open a dialog with "Accept", "Cancel" that will also accept workflow steps.
Return value
void
Open a wizard dialog with simple layout
Function parameters
term help_space_contents
term button_box
Return value
void
See also:
CloseDialog
Open a dialog with buttons "Next", "Back", "Abort" and set the keyboard focus to "Next".
Return value
void
Open a dialog with "Back", "Next", "Abort" that will also accept workflow steps.
Return value
void
Open a dialog with "OK", "Cancel" and set the keyboard focus to "OK".
Return value
void
Open a Tree dialog with buttons "Next", "Back", "Abort" and set the keyboard focus to "Next".
Return value
void
Replace the help widget for dialogs opened with Wizard::OpenCustomDialog().
Function parameters
term contents
Return value
void
Replace the wizard help subwindow with a custom widget.
Function parameters
term contents
Return value
void
Restore the wizard 'abort' button.
Return value
void
See also:
HideAbortButton
Restore the wizard 'back' button.
Return value
void
See also:
HideBackButton
Restore the wizard help subwindow.
Function parameters
string help_text
Return value
void
Restore the wizard 'next' button.
Return value
void
See also:
HideNextButton
Set the dialog's "Abort" button with a new label and a new ID
Function parameters
any id
string label
Return value
void
Set the dialog's "Back" button with a new label and a new ID
Function parameters
any id
string label
Return value
void
Set the contents of a wizard dialog
Function parameters
string title
term contents
string help_text
boolean has_back
boolean has_next
Return value
void
Set contents and Buttons of wizard dialog
Function parameters
string title
term contents
string help_text
string back_label
string next_label
Return value
void
Set the contents of a wizard dialog and define if to move focus to next button
Function parameters
string title
term contents
string help_text
boolean has_back
boolean has_next
boolean set_focus
Return value
void
Sets the icon specified in a .desktop file got as parameter. Desktop file is placed in a special directory (/usr/share/applications/YaST2). Parameter file is realative to that directory without ".desktop" suffix. Warning: There are no desktop files in inst-sys. Use "SetTitleIcon" instead.
Function parameters
string file
Return value
boolean - true on success
Example 150.
// Opens /usr/share/applications/YaST2/lan.desktop
// Reads "Icon" entry from there
// Sets the icon.
SetDesktopIcon ("lan")Sets the window title according to the name specified in a .desktop file got as parameter. Desktop file is placed in a special directory (/usr/share/applications/YaST2). Parameter file is realative to that directory without ".desktop" suffix.
Function parameters
string file
Return value
boolean - true on success
Example 151.
// Opens /usr/share/applications/YaST2/lan.desktop
// Reads (localized) "name" entry from there
// Sets the window title.
SetDesktopTitle ("lan")Sets the dialog title shown in the window manager's title bar.
Function parameters
string titleText
Return value
void
Set the keyboard focus to the wizard's "Back" (or "Cancel") button.
Return value
void
Set the keyboard focus to the wizard's "Next" (or "Accept") button.
Return value
void
Set a new help text.
Function parameters
string help_text
Return value
void
Set the dialog's "Next" button with a new label and a new ID
Function parameters
any id
string label
Return value
void
Set a name for the current dialog:
Function parameters
string name
Return value
void
See also:
RestoreScreenShotName
Sets the wizard 'title' icon to the specified icon from the standard icon directory.
Function parameters
string icon_name
Return value
void
See also:
ClearTitleIcon
Open a popup dialog that displays a help text (rich text format).
Function parameters
string help_text
Return value
void
Show a "Release Notes" button with the specified label and ID if there is a "steps" panel
Function parameters
string label
string id
Return value
void
Substitute for UI::TimeoutUserInput
Function parameters
integer timeout_millisec
Return value
any
Routines for generic hardware summary dialog
List of Global Functions
CreateHWDialog - Create the Hardware Wizard dialog Draw the dialog
CreateRichTextDescription - Create rich text description of a device. It can be used for WizardHW::SetContents function for formatting richtext device descriptions
CreateWidget - Create CWM widtet for the hardware settings NOTE: The Init and Handle callbacks must be defined
RunHWDialog - Draw the dialog, handle all its events via callbacks
SelectedItem - Return the id of the currently selected item in the table
SetContents - Set the information about hardware
SetRichDescription - Set the rich text description.
SetSelectedItem - Set which item is to be selected
UnconfiguredDevice - Get propertly list of an unconfigured device. Should be used together with device name in CreateRichTextDescription() function.
UserInput - Wait for event from the event
WaitForEvent - Wait for event from the event
List of Global Variables
Create the Hardware Wizard dialog Draw the dialog
Function parameters
string title
string help
list<string> headers
list<list> actions
Return value
void
Create rich text description of a device. It can be used for WizardHW::SetContents function for formatting richtext device descriptions
Function parameters
string title
list<string> properties
Return value
string - rich text string
Create CWM widtet for the hardware settings NOTE: The Init and Handle callbacks must be defined
Function parameters
list<string> headers
list<list> actions
Return value
map<string,any> - a map a widget for CWM
Draw the dialog, handle all its events via callbacks
Function parameters
map settings
Return value
symbol - for wizard sequencer
Return the id of the currently selected item in the table
Return value
string - id of the selected item
Set the information about hardware
Function parameters
list<map<string,any> > items
Return value
void
Set the rich text description.
Function parameters
string descr
Return value
void
Set which item is to be selected
Function parameters
string selected
Return value
void
Get propertly list of an unconfigured device. Should be used together with device name in CreateRichTextDescription() function.
Return value
list<string> - a list of strings
Wait for event from the event
Return value
map<string,any> - a map with keys: "event" : any = event as returned from UI::UserInoput () "selected" : string = ID of the selected item in the list box
Wizard dialogs for hardware configuration
Jan Holesovsky <kendy@suse.cz>
@deprecated This module is deprecated and will be removed soon. Use WizardHW instead.
List of Global Functions
ConfiguredContent - Create the contents of screen with configured items.
DetectedContent - Create the content of the screen with the detected devices.
SizeAtLeast - Encloses the content into VBoxes and HBoxes
SpacingAround - Encloses the content into VBoxes and HBoxes with the appropriate spacings around it.
List of Global Variables
Create the contents of screen with configured items.
Function parameters
term table_header
list table_contents
term above_table
term below_table
term below_buttons
term buttons
Return value
term - Content for the SetWizardContent[Buttons]() <B>UI elements ids:</B><table> <tr><td>Table</td><td>`table</td></tr> <tr><td>Button add</td><td>`add_button</td></tr> <tr><td>Button edit</td><td>`edit_button</td></tr> <tr><td>Button delete</td><td>`delete_button</td></tr> </table>
Create the content of the screen with the detected devices.
Function parameters
string frame_label
list detected
boolean has_restart
string already_conf
Return value
term - Content for the SetWizardContent[Buttons]()
Encloses the content into VBoxes and HBoxes
Function parameters
term content
float xsize
float ysize
Return value
term - Contents sized at least <B>xsize</B> x <B>ysize</B>.
Provides API for configuring workflows
Lukas Ocilka <locilka@suse.cz>
Provides API for managing and configuring installation and
configuration workflow.
Module was created as a solution for
FATE #129: Framework for pattern based Installation/Deployment
Module unifies Add-Ons and Patterns modifying the workflow.
List of Global Functions
AddWorkflow - Stores new workflow (if such workflow exists) into the Worflow Store.
CleanWorkflowsDirectory - Removes all xml and ycp files from directory where
DumpCurrentSettings - Returns the current settings used by WorkflowManager. This function is just for debugging purpose.
GetAdditionalFinishSteps - Returns list of additional inst_finish steps requested by additional workflows.
GetAllUsedControlFiles - Returns list of control-file names currently used
HaveAdditionalWorkflows - Returns whether some additional control files are currently in use.
MergeWorkflows - Function uses the Base Workflow as the initial one and merges all added workflow into that workflow.
PrepareProposals - Check all proposals, split those ones which have multiple modes or architectures or stages into multiple proposals.
PrepareSystemProposals - Check all proposals, split those ones which have multiple modes or architectures or stages into multiple proposals. Works with base product proposals.
PrepareSystemWorkflows - Check all workflows, split those ones which have multiple modes or architectures or stages into multiple worlflows. Works with base product workflows.
PrepareWorkflows - Check all workflows, split those ones which have multiple modes or architectures or stages into multiple workflows
RedrawWizardSteps - Redraws workflow steps. Function must be called when steps (or help for steps) are active. It doesn't work in case of active another dialog.
RemoveWorkflow - Removes workflow (if such workflow exists) from the Worflow Store. Alose removes the cached file but in the installation.
ResetWorkflow - Resets the Workflow (and proposals) to use the base workflow. It must be stored. Clears also all additional workflows.
SetAllUsedControlFiles - Sets list of control-file names to be used. ATTENTION: this is dangerous and should be used in rare cases only!
SetBaseWorkflow - Stores the current ProductControl settings as the initial settings. These settings are: workflows, proposals, inst_finish, and clone_modules.
SomeWorkflowsWereChanged - Returns whether some additional control files were added or removed from the last time MergeWorkflows() was called.
List of Global Variables
additional_finish_steps_before_chroot - Additional inst_finish settings defined by additional control files. They are always empty at the begining.
Stores new workflow (if such workflow exists) into the Worflow Store.
Function parameters
symbol type
integer src_id
string name
Return value
boolean - whether successful (true also in case of no workflow file)
Removes all xml and ycp files from directory where
Return value
void
Returns the current settings used by WorkflowManager. This function is just for debugging purpose.
Return value
map <string, any> - of current settings
[ "workflows" : ... "proposals" : ... "inst_finish" : ... "clone_modules" : ... "unmerged_changes" : ... ];
Returns list of additional inst_finish steps requested by additional workflows.
Function parameters
string which_steps
Return value
list <string> - steps to be called ...see which_steps parameter
Returns list of control-file names currently used
Return value
list <string> - files
Returns whether some additional control files are currently in use.
Return value
boolean - some additional control files are in use.
Function uses the Base Workflow as the initial one and merges all added workflow into that workflow.
Return value
boolean - if successful
Check all proposals, split those ones which have multiple modes or architectures or stages into multiple proposals.
Function parameters
list <map> proposals
Return value
list <map> - updated proposals
Input: [ $["label":"Example", "name":"example","proposal_modules":["one","two"],"stage":"initial,firstboot"] ] Output: [ $["label":"Example", "name":"example","proposal_modules":["one","two"],"stage":"initial"] $["label":"Example", "name":"example","proposal_modules":["one","two"],"stage":"firstboot"] ]
Check all proposals, split those ones which have multiple modes or architectures or stages into multiple proposals. Works with base product proposals.
Return value
void
Check all workflows, split those ones which have multiple modes or architectures or stages into multiple worlflows. Works with base product workflows.
Return value
void
Check all workflows, split those ones which have multiple modes or architectures or stages into multiple workflows
Function parameters
list <map> workflows
Return value
list <map> - updated workflows
Redraws workflow steps. Function must be called when steps (or help for steps) are active. It doesn't work in case of active another dialog.
Return value
boolean
Removes workflow (if such workflow exists) from the Worflow Store. Alose removes the cached file but in the installation.
Function parameters
symbol type
integer src_id
string name
Return value
boolean - whether successful (true also in case of no workflow file)
Resets the Workflow (and proposals) to use the base workflow. It must be stored. Clears also all additional workflows.
Return value
void
Sets list of control-file names to be used. ATTENTION: this is dangerous and should be used in rare cases only!
Function parameters
list <string> new_list
Return value
void
See also:
GetAllUsedControlFiles()
Stores the current ProductControl settings as the initial settings. These settings are: workflows, proposals, inst_finish, and clone_modules.
Function parameters
boolean force
Return value
void
XML routines
List of Global Functions
XMLError - The error string from the xml parser. It should be used when the agent did not return content. A reset happens before a new XML parsing starts.
XMLToYCPFile - Read XML file into YCP
XMLToYCPString - Read XML string into YCP
YCPToXMLFile - YCPToXMLFile() Write YCP data into formated XML file
xmlCreateDoc - define a new doc type with custom settings, if not defined, global settings will be used.
List of Global Variables
The error string from the xml parser. It should be used when the agent did not return content. A reset happens before a new XML parsing starts.
Return value
string - parser error
Read XML file into YCP
Function parameters
string xmlFile
Return value
map<string, any> - Map with YCP data
Read XML string into YCP
Function parameters
string xmlString
Return value
map<string, any> - Map with YCP data
YCPToXMLFile() Write YCP data into formated XML file
Function parameters
symbol docType
map contents
string outputPath
Return value
boolean - true on sucess
Differences between multiple X versions
List of Global Functions
Path - Provide a path
binPath - Provide path to bin directory of X11
fontPath - Provide path to font directory of X11
includePath - Provide path to include directory of X11
infoPath - Provide path to info directory of X11
lib64Path - Provide path to lib64 directory of X11
libPath - Provide path to lib directory of X11
manPath - Provide path to man directory of X11
sharePath - Provide path to share directory of X11
List of Global Variables
Provide a path
Function parameters
string id
Return value
string - required path, nil if not defined
Provide path to bin directory of X11
Return value
string - path to /usr/X11R6/bin, resp. /usr/bin
Provide path to font directory of X11
Return value
string - path to /usr/X11R6/font, resp. /usr/font
Provide path to include directory of X11
Return value
string - path to /usr/X11R6/include, resp. /usr/include
Provide path to info directory of X11
Return value
string - path to /usr/X11R6/info, resp. /usr/info
Provide path to lib64 directory of X11
Return value
string - path to /usr/X11R6/lib64, resp. /usr/lib64
Provide path to lib directory of X11
Return value
string - path to /usr/X11R6/lib, resp. /usr/lib
Provide path to man directory of X11
Return value
string - path to /usr/X11R6/man, resp. /usr/man
Xpram settings, input and output functions
List of Global Functions
Read - Read all xpram settings
ReadSysconfig - Read xpram settings from /etc/sysconfig/xpram
Write - Write all xpram settings
List of Global Variables
force - Should xpram be really started?
fstype - Filesystem used for the XpRAM
modified - Data was modified?
mountpoint - mountpoint used for xpram
start - Should xpram be started?
Read xpram settings from /etc/sysconfig/xpram
Return value
boolean - true when file exists
Read data from desktop files
List of Global Functions
Deps - Simple dependency resolving
SetDesktopIcon - Set Desktop Icon
Y2ModuleConfig - Y2ModuleConfig () Constructor
getResource - Get resource name
getResourceData - Get resource data
List of Global Variables
MenuTreeData - MenuTreeData
Get resource name
Function parameters
string default_resource
Return value
string - resource as defined in desktop file
Controller settings, input and output functions
List of Global Functions
Abort - Abort function
ActivateDisk - Activate a disk
AutoPackages - Return packages needed to be installed and removed during Autoinstallation to insure module has all needed software installed.
Available - Is this kind of disk controller available?
DeactivateDisk - Activate a disk
Export - Dump the controller settings to a single map (For use by autoinstallation.)
GetControllers - Get available zfcp controllers
HexNumSize - Update the size of hexa number via adding leading zeros
Import - Get all controller settings from the first parameter (For use by autoinstallation.)
IsAvailable - Check if ZFCP subsystem is available
Modified - Prototypes
Modified - Data was modified?
ProbeDisks - Get available disks
Read - Read all controller settings
Summary - Create a textual summary and a list of unconfigured cards
Write - Write all controller settings
List of Global Variables
modified - Data was modified?
write_only - Write only, used during autoinstallation. Don't run services and SuSEconfig, it's all done at one place.
Activate a disk
Function parameters
string channel
string wwpn
string lun
Return value
void
Return packages needed to be installed and removed during Autoinstallation to insure module has all needed software installed.
Return value
map - with 2 lists.
Activate a disk
Function parameters
string channel
string wwpn
string lun
Return value
void
Dump the controller settings to a single map (For use by autoinstallation.)
Return value
map - Dumped settings (later acceptable by Import ())
Get available zfcp controllers
Return value
list<map<string,any> > - of availabel Controllers
Update the size of hexa number via adding leading zeros
Function parameters
string hex
integer digits
Return value
string - hex string with specified length
Get all controller settings from the first parameter (For use by autoinstallation.)
Function parameters
map settings
Return value
boolean - True on success
Check if ZFCP subsystem is available
Return value
boolean - whether the ZFCP-System is availble at all
Create a textual summary and a list of unconfigured cards
Return value
list<string> - summary of the current configuration