From 8c5701d9ab223ec2805abc4c5ee2a6c0df47a65f Mon Sep 17 00:00:00 2001 From: Mark Gurevich Date: Wed, 28 Mar 2018 14:36:58 -0400 Subject: [PATCH] OpenBMC reventlog flag verification --- xCAT-server/lib/perl/xCAT/OPENBMC.pm | 2 +- xCAT-server/lib/xcat/plugins/openbmc2.pm | 7 ++++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/xCAT-server/lib/perl/xCAT/OPENBMC.pm b/xCAT-server/lib/perl/xCAT/OPENBMC.pm index a3c1a78be..1429626e9 100644 --- a/xCAT-server/lib/perl/xCAT/OPENBMC.pm +++ b/xCAT-server/lib/perl/xCAT/OPENBMC.pm @@ -255,7 +255,7 @@ sub run_cmd_in_perl { } # List of commands currently not supported in Python - my @unsupported_in_python_commands = ('rflash', 'rspconfig', 'reventlog', 'getopenbmccons'); + my @unsupported_in_python_commands = ('rflash', 'rspconfig', 'getopenbmccons'); if ($command ~~ @unsupported_in_python_commands) { # Command currently not supported in Python diff --git a/xCAT-server/lib/xcat/plugins/openbmc2.pm b/xCAT-server/lib/xcat/plugins/openbmc2.pm index 3fccbcf26..ce5c73f93 100644 --- a/xCAT-server/lib/xcat/plugins/openbmc2.pm +++ b/xCAT-server/lib/xcat/plugins/openbmc2.pm @@ -364,7 +364,12 @@ sub parse_args { } } elsif ($command eq "reventlog") { $subcommand = "all" if (!defined($ARGV[0])); - if ($subcommand =~ /^resolved=(.*)/) { + if (scalar(@ARGV) >= 2) { + if ($ARGV[1] =~ /^-s$/) { + return ([ 1, "The -s option is not supported for OpenBMC." ]); + } + return ([ 1, "Only one option is supported at the same time for $command" ]); + } elsif ($subcommand =~ /^resolved=(.*)/) { my $value = $1; if (not $value) { return ([ 1, "$usage_errormsg $reventlog_no_id_resolved_errormsg" ]);