Part of class ready code checkin
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@5143 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
This commit is contained in:
parent
5946bda777
commit
eaaca754af
@ -1188,14 +1188,16 @@ sub network_reset {
|
||||
#####################################
|
||||
my @eth_ip = split /,/,$current_all_ip;
|
||||
my $i;
|
||||
my $matched = 0;
|
||||
for( $i=0; $i < scalar(@eth_ip); $i++)
|
||||
{
|
||||
if (@eth_ip[$i] eq $current_ip)
|
||||
{
|
||||
$matched = 1;
|
||||
last;
|
||||
}
|
||||
}
|
||||
if ($i >= scalar(@eth_ip))
|
||||
if ( !$matched )
|
||||
{
|
||||
# What's happen?
|
||||
return ( [RC_ERROR,"No appropriate IP addresses to be updated. This could be a internal bug of xCAT."]);
|
||||
|
@ -165,7 +165,6 @@ sub connect {
|
||||
# Set-Cookie: asm_session=3038839768778613290
|
||||
#
|
||||
##################################
|
||||
|
||||
if ( $res->as_string =~ /Set-Cookie: asm_session=(\d+)/ ) {
|
||||
##############################
|
||||
# Successful logon....
|
||||
@ -1597,7 +1596,6 @@ sub netcfg
|
||||
my $form = undef;
|
||||
|
||||
my $res = get_netcfg( $exp, $request, $id, \$interfaces, \$form);
|
||||
|
||||
return $res if ( $res->[0] == RC_ERROR);
|
||||
|
||||
my $output = "";
|
||||
@ -1674,8 +1672,31 @@ sub get_netcfg
|
||||
if ( !defined( $$form )) {
|
||||
return( [RC_ERROR,"'Network Configuration' form not found"] );
|
||||
}
|
||||
}
|
||||
} else {
|
||||
my $data = $$form->click('submit');
|
||||
$res = $ua->request( $data);
|
||||
$$form = HTML::Form->parse( $res->content, $res->base );
|
||||
if ( !defined( $$form )) {
|
||||
return( [RC_ERROR,"'Network Configuration' form not found' form not found"] );
|
||||
}
|
||||
if ( $$form->find_input('ip', 'radio', 1))
|
||||
{
|
||||
my $ipv4Radio = $$form->find_input('ip', 'radio', 1);
|
||||
if (!$ipv4Radio)
|
||||
{
|
||||
print "Cannot find IPv4 option\n";
|
||||
exit;
|
||||
}
|
||||
#$ipv4Radio->check();
|
||||
|
||||
my $data = $$form->click('submit');
|
||||
$res = $ua->request( $data);
|
||||
$$form = HTML::Form->parse( $res->content, $res->base );
|
||||
if ( !defined( $$form )) {
|
||||
return( [RC_ERROR,"'Network Configuration' form not found"] );
|
||||
}
|
||||
}
|
||||
}
|
||||
#######################################
|
||||
# Parse the form to get the inc input
|
||||
#######################################
|
||||
|
@ -1508,7 +1508,7 @@ sub sshcmds_on_hmc
|
||||
################################
|
||||
# Get userid and password
|
||||
################################
|
||||
my @cred = ($target_dev->{'username'},$target_dev->{'password'});
|
||||
my @cred = ($user, $password);
|
||||
$request{$individual_ip}{cred} = \@cred;
|
||||
|
||||
@exp = xCAT::PPCcli::connect( \%request, 'hmc', $individual_ip);
|
||||
|
Loading…
x
Reference in New Issue
Block a user