From 42c4b59c51943b9c30d4e83e24f4789b49c6ab98 Mon Sep 17 00:00:00 2001 From: nott Date: Tue, 15 Apr 2008 16:52:17 +0000 Subject: [PATCH] In getobjdefs() don't bother looking up the whole definition if only a list of objects is requested. git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@1064 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- perl-xCAT-2.0/xCAT/DBobjUtils.pm | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/perl-xCAT-2.0/xCAT/DBobjUtils.pm b/perl-xCAT-2.0/xCAT/DBobjUtils.pm index 19607b975..1c4c76621 100644 --- a/perl-xCAT-2.0/xCAT/DBobjUtils.pm +++ b/perl-xCAT-2.0/xCAT/DBobjUtils.pm @@ -154,6 +154,16 @@ sub getobjdefs %typehash = %$hash_ref; @::foundTableList = (); + + if ($::ATTRLIST eq "none") { + # just return the list of obj names + foreach my $objname (sort (keys %typehash)) + { + my $type = $typehash{$objname}; + $objhash{$objname}{'objtype'} = $type; + } + return %objhash; + } foreach my $objname (sort (keys %typehash)) {