2
0
mirror of https://github.com/xcat2/xcat-core.git synced 2025-05-22 11:42:05 +00:00

Display Perl/Python for OpenBMC commands with -V

This commit is contained in:
Mark Gurevich 2018-03-13 11:15:18 -04:00
parent b6241689b9
commit 549ee35a49
2 changed files with 8 additions and 2 deletions

View File

@ -908,6 +908,9 @@ sub process_request {
my $rst = parse_command_status($command, \@exargs);
return if ($rst);
if ($::VERBOSE) {
xCAT::SvrUtils::sendmsg("Running command in Perl", $callback);
}
if ($request->{command}->[0] ne "getopenbmccons") {
$cookie_jar = HTTP::Cookies->new({});
$async = HTTP::Async->new(

View File

@ -47,6 +47,7 @@ my $reventlog_no_id_resolved_errormsg = "Provide a comma separated list of IDs t
my %node_info = ();
my $callback;
$::VERBOSE = 0;
#-------------------------------------------------------
@ -92,6 +93,9 @@ sub preprocess_request {
return;
}
if ($::VERBOSE) {
xCAT::SvrUtils::sendmsg("Running command in Python", $callback);
}
my $sn = xCAT::ServiceNodeUtils->get_ServiceNode($noderange, "xcat", "MN");
foreach my $snkey (keys %$sn) {
my $reqcopy = {%$request};
@ -157,9 +161,8 @@ sub parse_args {
my $noderange = shift;
my $subcommand = undef;
my $verbose;
unless (GetOptions(
'V|verbose' => \$verbose,
'V|verbose' => \$::VERBOSE,
)) {
return ([ 1, "Error parsing arguments." ]);
}