mirror of
https://github.com/xcat2/xcat-core.git
synced 2025-05-22 03:32:04 +00:00
Merge pull request #6840 from peterwywong/experimental
Remove experimental warnings of using given-when and smartmatch.
This commit is contained in:
commit
1dba795326
@ -102,7 +102,8 @@ sub run_cmd_in_perl {
|
||||
# List of commands currently not supported in Python
|
||||
my @unsupported_in_python_commands = ('rflash', 'getopenbmccons');
|
||||
|
||||
if ($command ~~ @unsupported_in_python_commands) {
|
||||
my @temp = grep ({$command =~ $_ } @unsupported_in_python_commands);
|
||||
if ( $command eq $temp[0]) {
|
||||
# Command currently not supported in Python
|
||||
if ($support_obmc and uc($support_obmc) eq 'YES') {
|
||||
return (0, ''); # Go Python: unsuppored command, but XCAT_OPENBMC_DEVEL=YES overrides
|
||||
|
@ -3571,25 +3571,23 @@ sub lsvm {
|
||||
if (exists $domain_info->{"state"}) {
|
||||
my $state = $domain_info->{"state"};
|
||||
my $state_string;
|
||||
given($state) {
|
||||
when ($state == &Sys::Virt::Domain::STATE_NOSTATE)
|
||||
{$state_string = "The domain is active, but is not running / blocked (eg idle)";}
|
||||
when ($state == &Sys::Virt::Domain::STATE_RUNNING)
|
||||
{$state_string = "The domain is active and running";}
|
||||
when ($state == &Sys::Virt::Domain::STATE_BLOCKED)
|
||||
{$state_string = "The domain is active, but execution is blocked";}
|
||||
when ($state == &Sys::Virt::Domain::STATE_PAUSED)
|
||||
{$state_string = "The domain is active, but execution has been paused";}
|
||||
when ($state == &Sys::Virt::Domain::STATE_SHUTDOWN)
|
||||
{$state_string = "The domain is active, but in the shutdown phase";}
|
||||
when ($state == &Sys::Virt::Domain::STATE_SHUTOFF)
|
||||
{$state_string = "The domain is inactive, and shut down";}
|
||||
when ($state == &Sys::Virt::Domain::STATE_CRUSHED)
|
||||
{$state_string = "The domain is inactive, and crashed";}
|
||||
when ($state == &Sys::Virt::Domain::STATE_PMSUSPENDED)
|
||||
{$state_string = "The domain is active, but in power management suspend state";}
|
||||
default {$state_string = "Unknown"};
|
||||
}
|
||||
if ($state == &Sys::Virt::Domain::STATE_NOSTATE)
|
||||
{$state_string = "The domain is active, but is not running / blocked (eg idle)";}
|
||||
elsif ($state == &Sys::Virt::Domain::STATE_RUNNING)
|
||||
{$state_string = "The domain is active and running";}
|
||||
elsif ($state == &Sys::Virt::Domain::STATE_BLOCKED)
|
||||
{$state_string = "The domain is active, but execution is blocked";}
|
||||
elsif ($state == &Sys::Virt::Domain::STATE_PAUSED)
|
||||
{$state_string = "The domain is active, but execution has been paused";}
|
||||
elsif ($state == &Sys::Virt::Domain::STATE_SHUTDOWN)
|
||||
{$state_string = "The domain is active, but in the shutdown phase";}
|
||||
elsif ($state == &Sys::Virt::Domain::STATE_SHUTOFF)
|
||||
{$state_string = "The domain is inactive, and shut down";}
|
||||
elsif ($state == &Sys::Virt::Domain::STATE_CRUSHED)
|
||||
{$state_string = "The domain is inactive, and crashed";}
|
||||
elsif ($state == &Sys::Virt::Domain::STATE_PMSUSPENDED)
|
||||
{$state_string = "The domain is active, but in power management suspend state";}
|
||||
else {$state_string = "Unknown"};
|
||||
push @vms, "State :" . $domain_info->{"state"} . " ($state_string)";
|
||||
}
|
||||
# The following block of code copied from rscan command processng for disks
|
||||
|
@ -1255,7 +1255,8 @@ sub parse_args {
|
||||
my $option_s;
|
||||
GetOptions( 's' => \$option_s );
|
||||
return ([ 1, "The -s option is not supported for OpenBMC." ]) if ($option_s);
|
||||
if ( "resolved=" ~~ @ARGV) {
|
||||
my @temp = grep ({"resolved" =~ $_ } @ARGV);
|
||||
if ( "resolved=" eq $temp[0]) {
|
||||
return ([ 1, "$usage_errormsg $reventlog_no_id_resolved_errormsg" ]);
|
||||
}
|
||||
return ([ 1, "Only one option is supported at the same time for $command" ]);
|
||||
|
Loading…
x
Reference in New Issue
Block a user