From b831595b70f02b52946fefeecf12327a0d2a04e7 Mon Sep 17 00:00:00 2001 From: Victor Hu Date: Mon, 20 Mar 2017 13:12:16 -0400 Subject: [PATCH] Add the same handled commands from ipmi.pm and a generic clause that will print Unsupported --- xCAT-server/lib/xcat/plugins/openbmc.pm | 23 ++++++++++++++++------- 1 file changed, 16 insertions(+), 7 deletions(-) diff --git a/xCAT-server/lib/xcat/plugins/openbmc.pm b/xCAT-server/lib/xcat/plugins/openbmc.pm index 2f346e45c..4d611aff0 100644 --- a/xCAT-server/lib/xcat/plugins/openbmc.pm +++ b/xCAT-server/lib/xcat/plugins/openbmc.pm @@ -50,6 +50,17 @@ sub handled_commands { rpower => 'nodehm:mgt', rinv => 'nodehm:mgt', getopenbmccons => 'nodehm:cons', + rsetboot => 'nodehm:mgt', + rspconfig => 'nodehm:mgt', + rvitals => 'nodehm:mgt', + rflash => 'nodehm:mgt', + reventlog => 'nodehm:mgt', + rspreset => 'nodehm:mgt', + rbeacon => 'nodehm:mgt', + renergy => 'nodehm:mgt', + rscan => 'nodehm:mgt', + ripmi => 'ipmi', + getrvidparms => 'nodehm:mgt', }; } @@ -284,8 +295,7 @@ sub parse_args { # # disable function until fully tested # - $check = unsupported($callback); - if (ref($check) eq "ARRAY") { return $check; } + $check = unsupported($callback); if (ref($check) eq "ARRAY") { return $check; } if (!defined($extrargs)) { return ([ 1, "No option specified for rpower" ]); @@ -293,19 +303,18 @@ sub parse_args { unless ($subcommand =~ /^on$|^off$|^reset$|^boot$|^status$|^stat$|^state$/) { return ([ 1, "$subcommand is not supported for rpower" ]); } - } - - if ($command eq "rinv") { + } elsif ($command eq "rinv") { # # disable function until fully tested # - $check = unsupported($callback); - if (ref($check) eq "ARRAY") { return $check; } + $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" ]); } + } else { + return ([ 1, "Command is not supported." ]); } return;