From b045fe79f0813cfd9b208ba91eda6903d3eb6096 Mon Sep 17 00:00:00 2001 From: Victor Hu Date: Mon, 20 Mar 2017 12:18:03 -0400 Subject: [PATCH] Move the unsupported call to each command support to control what is supported and unsupported at a finer level --- xCAT-server/lib/xcat/plugins/openbmc.pm | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/xCAT-server/lib/xcat/plugins/openbmc.pm b/xCAT-server/lib/xcat/plugins/openbmc.pm index 95e332bd8..2f346e45c 100644 --- a/xCAT-server/lib/xcat/plugins/openbmc.pm +++ b/xCAT-server/lib/xcat/plugins/openbmc.pm @@ -273,11 +273,7 @@ sub process_request { sub parse_args { my $command = shift; my $extrargs = shift; - - my $check = unsupported($callback); - if (ref($check) eq "ARRAY") { - return $check; - } + my $check = undef; if (scalar(@ARGV) > 1) { return ([ 1, "Only one option is supported at the same time" ]); @@ -285,6 +281,12 @@ sub parse_args { my $subcommand = $ARGV[0]; if ($command eq "rpower") { + # + # disable function until fully tested + # + $check = unsupported($callback); + if (ref($check) eq "ARRAY") { return $check; } + if (!defined($extrargs)) { return ([ 1, "No option specified for rpower" ]); } @@ -294,6 +296,13 @@ sub parse_args { } if ($command eq "rinv") { + # + # disable function until fully tested + # + $check = unsupported($callback); + if (ref($check) eq "ARRAY") { return $check; } + + unless ($subcommand =~ /^cpu$|^dimm$|^bios$|^all$/) { return ([ 1, "Only 'cpu','dimm', 'bios','all' are supported currently" ]); }