From 16b974144323faae504b578cf1d8d43b8803bf68 Mon Sep 17 00:00:00 2001 From: lissav Date: Tue, 7 Jul 2009 17:10:27 +0000 Subject: [PATCH] Use abbreviate_noderange routine to put out noderanges instead of lists of nodes, in final report git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@3722 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- perl-xCAT/xCAT/SINV.pm | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/perl-xCAT/xCAT/SINV.pm b/perl-xCAT/xCAT/SINV.pm index 19674d741..e7a4fc584 100644 --- a/perl-xCAT/xCAT/SINV.pm +++ b/perl-xCAT/xCAT/SINV.pm @@ -19,6 +19,7 @@ package xCAT::SINV; use strict; use xCAT::MsgUtils; use xCAT::NodeRange; +use xCAT::NodeRange qw/noderange abbreviate_noderange/; use xCAT::Utils; use Fcntl qw(:flock); use Getopt::Long; @@ -1124,6 +1125,7 @@ sub diffoutput return @info; } + #------------------------------------------------------------------------------ =head3 writereport @@ -1181,10 +1183,16 @@ sub writereport $nodelist .= ','; } } + chop $nodelist; + # convert to noderanges if possible + my $nodearray; + $nodearray->{0} = \@nodearray; + my $newnodelist = abbreviate_noderange($nodearray->{0}); if ($ignorefirsttemplate ne "YES") { # report first template - $rsp->{data}->[0] = "$nodelist\n"; + $rsp->{data}->[0] = "$newnodelist\n"; + if ($::OUTPUT_FILE_HANDLE) { print $::OUTPUT_FILE_HANDLE $rsp->{data}->[0]; @@ -1472,7 +1480,7 @@ sub storeresults close(XCOLL); close FILE; - system("/bin/rm $newtempfile"); + #system("/bin/rm $newtempfile"); # capture errors #