270. Sysconfig

Data for configuration of sysconfig, input and output functions.

270.1. Authors

  • Ladislav Slezak <lslezak@suse.cz>

270.2. Summary of Module Globals

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

    270.3. Global Functions

    270.3.1. Export

    Dump the sysconfig settings to a single map (For use by autoinstallation.)

    Return value

    • list - Dumped settings (later acceptable by Import ())

    270.3.2. 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

    270.3.3. Modified

    Data was modified?

    Return value

    • boolean - true if modified

    270.3.4. Read

    Read all sysconfig variables

    Return value

    • boolean - true on success

    270.3.5. RegisterAgents

    Register .syseditor path (use INI agent in multiple file mode)

    Return value

    • void

    270.3.6. Search

    Search in syscnfig files for value

    Function parameters

    • map params

    • boolean show_progress

    Return value

    • list<string> - List of found variables (IDs)

    270.3.7. Set

    Set all sysconfig settings from the list (For use by autoinstallation.)

    Function parameters

    • list<map> settings

    Return value

    • void

    270.3.8. Summary

    Create a textual summary

    Return value

    • string - summary of the current configuration

    270.3.9. Write

    Write all sysconfig settings

    Return value

    • boolean - true on success

    270.3.10. get_all

    Get list of all variables

    Return value

    • list<string> - List of variable identifications

    270.3.11. get_all_names

    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

    270.3.12. get_description

    Get description of selected variable

    Function parameters

    • string varid

    Return value

    • map<string, any> - Description map

    270.3.13. get_file_from_id

    Get file name where is variable located from variable identification

    Function parameters

    • string id

    Return value

    • string - File name

    270.3.14. get_location_from_id

    Get variable location in tree widget from variable identification

    Function parameters

    • string id

    Return value

    • string - Variable location

    270.3.15. get_metadata

    Get metadata lines from input string

    Function parameters

    • string input

    Return value

    • list<string> - Metadata lines in list

    270.3.16. get_modified

    Get list of modified variables

    Return value

    • list<string> - List of modified variables

    270.3.17. get_name_from_id

    Get variable name from variable identification or empty string if input is invalid

    Function parameters

    • string id

    Return value

    • string - Variable name

    Example 137. 

     get_name_from_id("var$file") -> "var"


    270.3.18. get_only_comment

    Get comment without metadata

    Function parameters

    • string input

    Return value

    • string - Comment used as variable description

    270.3.19. modified

    Return modification status of variable

    Function parameters

    • string varid

    Return value

    • boolean - True if variable was modified

    270.3.20. parse_metadata

    Parse metadata from comment

    Function parameters

    • string comment

    Return value

    • map<string, string> - parsed metadata

    270.3.21. remove_whitespaces

    Remove white spaces at beginning or at the end of string

    Function parameters

    • string input

    Return value

    • string - String without white spaces

    270.3.22. set_value

    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)

    270.4. Global Variables

    270.5. Module Requirements

    270.5.1. Module Imports

    • Directory
    • IP
    • Label
    • Mode
    • Progress
    • Report
    • Service
    • String
    • Summary

    270.5.2. Module Includes