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',
|
2009-05-20 09:04:19 +00:00
|
|
|
rspconfig => 'nodehm:mgt',
|
2009-12-02 09:38:51 +00:00
|
|
|
mkhwconn => 'nodehm:mgt',
|
|
|
|
rmhwconn => 'nodehm:mgt',
|
|
|
|
lshwconn => 'nodehm:mgt',
|
|
|
|
renergy => 'nodehm:mgt' ,
|
|
|
|
rinv => 'nodehm:mgt',
|
2010-01-07 06:00:53 +00:00
|
|
|
rflash => 'nodehm:mgt',
|
|
|
|
getmacs => 'nodehm:mgt',
|
2010-01-18 06:14:05 +00:00
|
|
|
rnetboot => 'nodehm:mgt',
|
2010-12-13 05:56:39 +00:00
|
|
|
rbootseq => 'nodehm:mgt',
|
2010-05-12 08:21:22 +00:00
|
|
|
rvitals => 'nodehm:mgt',
|
2010-11-25 03:41:36 +00:00
|
|
|
mkvm => 'nodehm:mgt',
|
|
|
|
lsvm => 'nodehm:mgt',
|
2010-05-12 08:21:22 +00:00
|
|
|
rscan => 'nodehm:mgt'
|
2009-12-02 09:38:51 +00:00
|
|
|
|
2007-11-16 19:42:46 +00:00
|
|
|
};
|
|
|
|
}
|
|
|
|
|
|
|
|
##########################################################################
|
2008-04-16 16:45:14 +00:00
|
|
|
# Pre-process request from xCat daemon
|
2007-11-16 19:42:46 +00:00
|
|
|
##########################################################################
|
2008-04-16 16:45:14 +00:00
|
|
|
sub preprocess_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)
|
|
|
|
#
|
2008-06-02 17:29:52 +00:00
|
|
|
# Net::HTTPS, which is used by LWP::Protocol::https::Socket,
|
2008-01-15 15:29:42 +00:00
|
|
|
# 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-06-02 17:29:52 +00:00
|
|
|
# So we should invalidate IO::Socket::SSL here and
|
|
|
|
# load Net::SSL.
|
2008-01-15 15:29:42 +00:00
|
|
|
#######################################################
|
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-06-02 17:29:52 +00:00
|
|
|
$callback->( {errorcode=>1,data=>[$@]} );
|
2008-01-15 15:29:42 +00:00
|
|
|
return(1);
|
|
|
|
}
|
2008-04-16 16:45:14 +00:00
|
|
|
xCAT::PPC::preprocess_request(__PACKAGE__,@_);
|
|
|
|
}
|
|
|
|
|
|
|
|
##########################################################################
|
|
|
|
# Process request from xCat daemon
|
|
|
|
##########################################################################
|
|
|
|
sub process_request {
|
2007-11-16 19:42:46 +00:00
|
|
|
xCAT::PPC::process_request(__PACKAGE__,@_);
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1;
|