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
This commit is contained in:
lissav 2009-01-14 19:46:13 +00:00
parent f69ee3624e
commit 03a4bd8cd0
2 changed files with 8 additions and 8 deletions

View File

@ -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}) {

View File

@ -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.
{