adjust the argument of rmvm according to the requirement.
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@4868 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
This commit is contained in:
parent
1b0b2eb2aa
commit
fcb1fc8913
@ -379,7 +379,7 @@ sub rmvm_parse_args {
|
||||
$Getopt::Long::ignorecase = 0;
|
||||
Getopt::Long::Configure( "bundling" );
|
||||
|
||||
if ( !GetOptions( \%opt, qw(V|verbose) )) {
|
||||
if ( !GetOptions( \%opt, qw(V|verbose service) )) {
|
||||
return( usage() );
|
||||
}
|
||||
####################################
|
||||
@ -669,27 +669,33 @@ sub remove {
|
||||
my $lparinfo = shift(@lpars);
|
||||
my ($name,$id) = split /,/, $lparinfo;
|
||||
my $mtms = @$d[2];
|
||||
my $service_lparid = xCAT::PPCcli::lssyscfg(
|
||||
$exp,
|
||||
"fsp",
|
||||
$mtms,
|
||||
"service_lpar_id" );
|
||||
my $Rc = shift(@$service_lparid);
|
||||
|
||||
#####################################################
|
||||
# Change the CEC's state to standby and set it's service lpar id to none
|
||||
#####################################################
|
||||
if ( $Rc == SUCCESS ) {
|
||||
my $cfgdata = @$service_lparid[0];
|
||||
if ( ($id == $cfgdata) && ($cfgdata !~ /none/) ) {
|
||||
$cfgdata = "service_lpar_id=none";
|
||||
my $result = xCAT::PPCcli::chsyscfg( $exp, "sys", $d, $cfgdata );
|
||||
$Rc = shift(@$result);
|
||||
if ( $Rc != SUCCESS ) {
|
||||
return( [[$lpar, @$service_lparid[0], $Rc]] );
|
||||
}
|
||||
}
|
||||
}
|
||||
if ($opt->{service}) {
|
||||
###############################################
|
||||
# begin to retrieve the CEC's service lpar id
|
||||
###############################################
|
||||
my $service_lparid = xCAT::PPCcli::lssyscfg(
|
||||
$exp,
|
||||
"fsp",
|
||||
$mtms,
|
||||
"service_lpar_id" );
|
||||
my $Rc = shift(@$service_lparid);
|
||||
|
||||
#####################################################
|
||||
# Change the CEC's state to standby and set it's service lpar id to none
|
||||
#####################################################
|
||||
if ( $Rc == SUCCESS ) {
|
||||
my $cfgdata = @$service_lparid[0];
|
||||
if ( ($id == $cfgdata) && ($cfgdata !~ /none/) ) {
|
||||
$cfgdata = "service_lpar_id=none";
|
||||
my $result = xCAT::PPCcli::chsyscfg( $exp, "sys", $d, $cfgdata );
|
||||
$Rc = shift(@$result);
|
||||
if ( $Rc != SUCCESS ) {
|
||||
return( [[$lpar, @$service_lparid[0], $Rc]] );
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
################################
|
||||
# id profile mtms hcp type frame
|
||||
|
@ -139,7 +139,7 @@ my %usage = (
|
||||
chvm [-h|--help|-v|--version]
|
||||
chvm <noderange> <attr>=<val> [<attr>=<val>...]",
|
||||
"rmvm" =>
|
||||
"Usage: rmvm <noderange> [-V|--verbose]
|
||||
"Usage: rmvm <noderange> [--service][-V|--verbose]
|
||||
rmvm [-h|--help|-v|--version]",
|
||||
"lsslp" =>
|
||||
"Usage: lsslp [-h|--help|-v|--version]
|
||||
|
Loading…
Reference in New Issue
Block a user