NAME
GRID::Cluster::Result - The object managing the result of a GRID::Cluster remote command execution
DESCRIPTION
The result of a call to a remote command, for example using methods copyandmake
or chdir
of GRID::Cluster, is a reference to a GRID::Cluster::Result object. This kind of object is responsible for obtaining the results for each machine that is part of a GRID::Cluster
object.
These results allow to identify which machines has finished the execution of a remote command satisfactorily, and in which ones a failure has occurred.
A GRID::Cluster::Result
object contains, mainly, a hash with keys the names of the different machines and values the corresponding GRID::Machine::Result objects.
METHODS
The Constructor new
Syntax:
my $r = GRID::Cluster::Result->new();
It builds a new result object. No parameters are required.
The method add
Syntax:
$r->add(
host_name => $_,
machine_result => $machine_result
);
This method adds a GRID::Machine::Result
object to an existing GRID::Cluster::Result
object. The parameters are:
host_name
: A string containing the name of a machine.machine_result
: A reference to aGRID::Machine::Result
object.
The method result
This method returns a reference to a list of trues or falses, depending on there were / weren't errors during the execution of a remote command in every machine.
The method allfirstok
This method returns true if all the values of the list returned by the method result
are true. Moreover, this method is used to overload the operator bool.
The method str
This method returns the string made of concatenating stdout, stderr and errmsg of every machine. The resulting string of calling this method looks like:
host1:
host2: file not found
host3:
Furthermore, this method is used to overload the Perl operator q(""). Thus, wherever a GRID::Cluster::Result
object is used on a scalar string context the method str
will be called.
SEE ALSO
Man pages of
ssh
,ssh-key-gen
,ssh_config
,scp
,ssh-agent
,ssh-add
,sshd
AUTHORS
Eduardo Segredo Gonzalez <esegredo@ull.es> and Casiano Rodriguez Leon <casiano@ull.es>
AKNOWLEDGEMENTS
This work has been supported by the EC (FEDER) and the Spanish Ministry of Science and Innovation inside the 'Plan Nacional de I+D+i' with the contract number TIN2008-06491-C04-02.
Also, it has been supported by the Canary Government project number PI2007/015.
The work of Eduardo Segredo was funded by grant FPU-AP2009-0457.
COPYRIGHT AND LICENSE
Copyright (C) 2010 by Casiano Rodriguez Leon and Eduardo Segredo Gonzalez. All rights reserved.
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.12.2 or, at your option, any later version of Perl 5 you may have available.
This program 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.