From 03a4bd8cd05cea0ee4f2d01fb6e03f7714e2d3a5 Mon Sep 17 00:00:00 2001 From: lissav Date: Wed, 14 Jan 2009 19:46:13 +0000 Subject: [PATCH] fix usage of getAllEntries, adding a flag for all and default only entries that are not disabled git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@2604 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- xCAT-server/lib/xcat/plugins/monctrlcmds.pm | 14 +++++++------- xCAT-server/lib/xcat/plugins/tabutils.pm | 2 +- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/xCAT-server/lib/xcat/plugins/monctrlcmds.pm b/xCAT-server/lib/xcat/plugins/monctrlcmds.pm index 68bfd49d7..91798a364 100644 --- a/xCAT-server/lib/xcat/plugins/monctrlcmds.pm +++ b/xCAT-server/lib/xcat/plugins/monctrlcmds.pm @@ -318,7 +318,7 @@ sub preprocess_monstart my $table=xCAT::Table->new("monitoring", -create => 1,-autocommit => 1); if ($table) { my $found=0; - my $tmp1=$table->getAllEntries(); + my $tmp1=$table->getAllEntries("all"); if (defined($tmp1) && (@$tmp1 > 0)) { foreach(@$tmp1) { if ($pname eq $_->{name}) { @@ -503,7 +503,7 @@ sub preprocess_monstop my $table=xCAT::Table->new("monitoring", -create => 1,-autocommit => 1); if ($table) { my $found=0; - my $tmp1=$table->getAllEntries(); + my $tmp1=$table->getAllEntries("all"); if (defined($tmp1) && (@$tmp1 > 0)) { foreach(@$tmp1) { if ($pname eq $_->{name}) { @@ -662,7 +662,7 @@ sub monls { #get the list from the table my $table=xCAT::Table->new("monitoring", -create =>1); if ($table) { - my $tmp1=$table->getAllEntries(); + my $tmp1=$table->getAllEntries("all"); if (defined($tmp1) && (@$tmp1 > 0)) { foreach(@$tmp1) { my $pname=$_->{name}; @@ -883,7 +883,7 @@ sub monadd { } my $table=xCAT::Table->new("monitoring", -create =>1); if ($table) { - my $tmp1=$table->getAllEntries(); + my $tmp1=$table->getAllEntries("all"); if (defined($tmp1) && (@$tmp1 > 0)) { foreach(@$tmp1) { my $name=$_->{name}; @@ -1082,7 +1082,7 @@ sub monrm { my $found=0; my $table=xCAT::Table->new("monitoring", -create =>1); if ($table) { - my $tmp1=$table->getAllEntries(); + my $tmp1=$table->getAllEntries("all"); if (defined($tmp1) && (@$tmp1 > 0)) { foreach(@$tmp1) { if ($pname eq $_->{name}) { @@ -1299,7 +1299,7 @@ sub preprocess_moncfg my $table=xCAT::Table->new("monitoring", -create => 1,-autocommit => 1); if ($table) { my $found=0; - my $tmp1=$table->getAllEntries(); + my $tmp1=$table->getAllEntries("all"); if (defined($tmp1) && (@$tmp1 > 0)) { foreach(@$tmp1) { if ($pname eq $_->{name}) { @@ -1477,7 +1477,7 @@ sub preprocess_mondecfg my $table=xCAT::Table->new("monitoring", -create => 1,-autocommit => 1); if ($table) { my $found=0; - my $tmp1=$table->getAllEntries(); + my $tmp1=$table->getAllEntries("all"); if (defined($tmp1) && (@$tmp1 > 0)) { foreach(@$tmp1) { if ($pname eq $_->{name}) { diff --git a/xCAT-server/lib/xcat/plugins/tabutils.pm b/xCAT-server/lib/xcat/plugins/tabutils.pm index 3a5e69e3b..35df020db 100644 --- a/xCAT-server/lib/xcat/plugins/tabutils.pm +++ b/xCAT-server/lib/xcat/plugins/tabutils.pm @@ -469,7 +469,7 @@ sub tabdump return 1; } - my $recs = $tabh->getAllEntries(); + my $recs = $tabh->getAllEntries("all"); my $rec; unless (@$recs) # table exists, but is empty. Show header. {