new()new() expects a hash ref as a parameter. The hash can contain (for the moment) only the cfgFile (the
configuration file). All other hash keys are ignored.
SimbaURL
Returns the url with simba website
VERSION
Returns a string with simba version
MirrorsNo($fields)
returns the number of the mirrors from the database. The mirrors can be filtered using the $fields
parameter (as documented in SQL::Abstract - where)
Mirrors($fields)
returns a array of RoPkg::Simba::Mirror initialized objects. The mirrors can be filtered using the
$fields parameter (as documented in SQL::Abstract - where)
CommandsNo($fields)
returns the number of commands from the database. The commands can be filtered using the $fields
parameter (as documented in SQL::Abstract - where)
Commands
returns a array of RoPkg::Simba::Command initialized objects. The commands can be filtered using the
$fields parameter (as documented in SQL::Abstract - where)
ExcludeNo
returns the number of excludes from the database. The excludes can be filtered using the $fields
parameter (as documented in SQL::Abstract - where)
Excludes
returns a array of RoPkg::Simba::Excludes initialized objects. The excludes can be filtered using the
$fields parameter (as documented in SQL::Abstract - where)
LoadMirror($fields)
load a mirror (and the related objects: command and exclude list) from the database and return a list of
3 objects:
the mirror object (RoPkg::Simba::Mirror)
the command object (RoPkg::Simba::Command)
the excludes object (RoPkg::Simba::Excludes)
Ex:
my ($mirror, $command, $excludes);
($mirror, $command, $excludes) = $simba->LoadMirror({ Name => 'debian'});
The mirrors can be filtered using the $fields parameter (as documented in SQL::Abstract - where). This
method also checks if all necesary values are defined and well formed; for example checks if the command
file name really exists.
Run($fields)
The most used method by simba. This method loads the mirror from the database, the command and the
exclude list, builds the command line (with respect to username and password if necesary), signals mirror
in progress, executes the command, parses the sync raw log and updates the database. Also, the afterSync
handler callback is registered to this method. The mirrors can be filtered using the $fields parameter
(as documented in SQL::Abstract - where).
RunCallbacks($cbName,@mirrors)
call the plugin methods for $cbName callback name.
CheckDB()
Checks if database has at least one mirror and one command defined.
dbh()
returns the database handler used by Simba
dbo()
returns the instance of RoPkg::DB object, used by Simba
dbo_method()
returns the method used by Simba's dbo() object to access the mirrors database.