2007-11-16 19:42:46 +00:00
|
|
|
# IBM(c) 2007 EPL license http://www.eclipse.org/legal/epl-v10.html
|
|
|
|
|
|
|
|
package xCAT_plugin::fsp;
|
|
|
|
use strict;
|
|
|
|
use xCAT::PPC;
|
|
|
|
|
|
|
|
|
|
|
|
##########################################################################
|
|
|
|
# Command handler method from tables
|
|
|
|
##########################################################################
|
|
|
|
sub handled_commands {
|
|
|
|
return {
|
|
|
|
rpower => 'nodehm:power,mgt',
|
|
|
|
reventlog => 'nodehm:mgt',
|
2008-04-01 14:55:03 +00:00
|
|
|
rspconfig => 'nodehm:mgt'
|
2007-11-16 19:42:46 +00:00
|
|
|
};
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
##########################################################################
|
|
|
|
# Process request from xCat daemon
|
|
|
|
##########################################################################
|
|
|
|
sub process_request {
|
2008-01-15 15:29:42 +00:00
|
|
|
|
|
|
|
#######################################################
|
|
|
|
# IO::Socket::SSL apparently does not work with LWP.pm
|
|
|
|
# When used, POST/GETs return immediately with:
|
|
|
|
# 500 Can't connect to <nodename>:443 (Timeout)
|
|
|
|
#
|
|
|
|
# Net::HTTPS, used by LWP::Protocol::https::Socket,
|
|
|
|
# uses either IO::Socket::SSL or Net::SSL. It chooses
|
|
|
|
# by looking to see if $IO::Socket::SSL::VERSION
|
|
|
|
# is defined (i.e. the module's already loaded) and
|
|
|
|
# uses that if so. If not, it first tries Net::SSL,
|
|
|
|
# then IO::Socket::SSL only if that cannot be loaded.
|
|
|
|
#######################################################
|
2008-01-17 16:58:07 +00:00
|
|
|
$IO::Socket::SSL::VERSION = undef;
|
2008-01-15 15:29:42 +00:00
|
|
|
eval { require Net::SSL };
|
|
|
|
if ( $@ ) {
|
|
|
|
my $callback = $_[1];
|
2008-02-18 20:35:32 +00:00
|
|
|
my %output;
|
|
|
|
|
|
|
|
$output{errorcode} = 1;
|
|
|
|
$output{data} = [$@];
|
|
|
|
$callback->( \%output );
|
2008-01-15 15:29:42 +00:00
|
|
|
return(1);
|
|
|
|
}
|
2007-11-16 19:42:46 +00:00
|
|
|
xCAT::PPC::process_request(__PACKAGE__,@_);
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1;
|