From 8ece9f098db655bdce7683235a4d80a35ce5963a Mon Sep 17 00:00:00 2001 From: jbjohnso Date: Thu, 9 Jun 2011 15:05:44 +0000 Subject: [PATCH] Allow reventlog -f clear for forcing blade clear git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@9771 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- xCAT-server/lib/xcat/plugins/blade.pm | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/xCAT-server/lib/xcat/plugins/blade.pm b/xCAT-server/lib/xcat/plugins/blade.pm index c174ddca6..2d21f5112 100644 --- a/xCAT-server/lib/xcat/plugins/blade.pm +++ b/xCAT-server/lib/xcat/plugins/blade.pm @@ -328,7 +328,12 @@ sub walkelog { sub eventlog { #Tried various optimizations, but MM seems not to do bulk-request #TODO: retrieval of non blade events, what should be syntax? #TODO: try retrieving 5 at a time, then 1 at a time when that stops working - my $cmd=shift; + @ARGV=@_; + my $force; + GetOptions( + "f" => \$force, + ); + my $cmd=shift @ARGV; my $data; my @output; my $oid = $eventlogoid; @@ -392,7 +397,7 @@ sub eventlog { #Tried various optimizations, but MM seems not to do bulk-request return (0,@output); } if ($cmd eq "clear") { - unless (isallchassis) { + unless ($force or isallchassis) { return (1,"Cannot clear eventlogs except for entire chassis"); } if ($didchassis) { return 0, "eventlog cleared" }