changed hpoa packaging to be compliant with xCAT practices
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@5209 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
This commit is contained in:
parent
cba42170fe
commit
53b99b7514
@ -44,7 +44,6 @@ Includes xCAT::Table, xCAT::NodeRange, among others.
|
||||
rm -rf $RPM_BUILD_ROOT
|
||||
|
||||
mkdir -p $RPM_BUILD_ROOT/%{prefix}/lib/perl/xCAT/data
|
||||
mkdir -p $RPM_BUILD_ROOT/%{prefix}/lib/include/
|
||||
mkdir -p $RPM_BUILD_ROOT/%{prefix}/share/doc/packages/perl-xCAT
|
||||
mkdir -p $RPM_BUILD_ROOT/%{prefix}/share/man/man5
|
||||
mkdir -p $RPM_BUILD_ROOT/%{prefix}/share/doc/man5
|
||||
@ -56,13 +55,11 @@ cp -r xCAT/* $RPM_BUILD_ROOT/%{prefix}/lib/perl/xCAT/
|
||||
chmod 644 $RPM_BUILD_ROOT/%{prefix}/lib/perl/xCAT/*
|
||||
chmod 755 $RPM_BUILD_ROOT/%{prefix}/lib/perl/xCAT/data
|
||||
chmod 644 $RPM_BUILD_ROOT/%{prefix}/lib/perl/xCAT/data/*
|
||||
cp -r include/* $RPM_BUILD_ROOT/%{prefix}/lib/include/
|
||||
chmod 644 $RPM_BUILD_ROOT/%{prefix}/lib/include/*
|
||||
|
||||
|
||||
# For now, don't ship these plugins - to avoid AIX dependency error.
|
||||
%ifnos linux
|
||||
rm $RPM_BUILD_ROOT/%{prefix}/lib/include/hpoa.pm
|
||||
rm $RPM_BUILD_ROOT/%{prefix}/lib/perl/xCAT/hpoa.pm
|
||||
%endif
|
||||
|
||||
cp LICENSE.html $RPM_BUILD_ROOT/%{prefix}/share/doc/packages/perl-xCAT
|
||||
|
@ -10,7 +10,7 @@
|
||||
## For example:
|
||||
## hpoa->new(oaAddress => '16.129.49.209');
|
||||
|
||||
package hpoa;
|
||||
package xCAT::hpoa;
|
||||
|
||||
use strict;
|
||||
|
||||
@ -122,14 +122,14 @@ sub call {
|
||||
|
||||
# Make sure we're using the correct version of SOAP, but
|
||||
# don't mess up packages that use a different version.
|
||||
my $version = hpoa->soapversion();
|
||||
hpoa->soapversion('1.2');
|
||||
my $version = xCAT::hpoa->soapversion();
|
||||
xCAT::hpoa->soapversion('1.2');
|
||||
|
||||
# Call the method and put the response in $r
|
||||
my $r = $self->SUPER::call($method, @soapargs);
|
||||
|
||||
# Reset the SOAP version
|
||||
hpoa->soapversion($version);
|
||||
xCAT::hpoa->soapversion($version);
|
||||
|
||||
# If this was the login method and it was successful, then extract
|
||||
# the session key and remember it for subsequent calls.
|
@ -12,7 +12,6 @@ BEGIN
|
||||
$::XCATROOT = $ENV{'XCATROOT'} ? $ENV{'XCATROOT'} : '/opt/xcat';
|
||||
}
|
||||
use lib "$::XCATROOT/lib/perl";
|
||||
use lib "$::XCATROOT/lib/include";
|
||||
|
||||
use strict;
|
||||
use xCAT::Table;
|
||||
@ -28,7 +27,7 @@ use Net::SSLeay qw(die_now die_if_ssl_error);
|
||||
use Data::Dumper;
|
||||
use POSIX "WNOHANG";
|
||||
use Getopt::Long;
|
||||
use hpoa;
|
||||
use xCAT::hpoa;
|
||||
|
||||
sub handled_commands {
|
||||
return {
|
||||
@ -151,7 +150,7 @@ sub oaLogin {
|
||||
}
|
||||
|
||||
|
||||
$hpoa = hpoa->new('oaAddress' => $oaName);
|
||||
$hpoa = xCAT::hpoa->new('oaAddress' => $oaName);
|
||||
my $loginResponse = $hpoa->userLogIn('username' => $username, 'password' => $password);
|
||||
if($loginResponse->fault) {
|
||||
$errHash = $loginResponse->fault;
|
||||
|
Loading…
Reference in New Issue
Block a user