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