From f15a387209aaf881efaaa3d577ecca8cb35dc4f3 Mon Sep 17 00:00:00 2001 From: nott Date: Tue, 15 Apr 2008 16:48:53 +0000 Subject: [PATCH] Change defls() so it doesn't get complete definitions when only a list is requested. git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@1063 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- .../lib/xcat/plugins/DBobjectdefs.pm | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/xCAT-server-2.0/lib/xcat/plugins/DBobjectdefs.pm b/xCAT-server-2.0/lib/xcat/plugins/DBobjectdefs.pm index 19d3561ae..38c66cf70 100644 --- a/xCAT-server-2.0/lib/xcat/plugins/DBobjectdefs.pm +++ b/xCAT-server-2.0/lib/xcat/plugins/DBobjectdefs.pm @@ -1942,6 +1942,24 @@ sub defls $long++; } + + # which attrs do we want? + # this is a temp hack to help scaling when you only + # want a list of nodes - needs to be fully implemented + if ($::opt_l || $::opt_w) { + # if long or -w then get all the attrs + $::ATTRLIST="all"; + } elsif ($::opt_i) { + # is -i then just get the ones in the list + $::ATTRLIST=$::opt_i; + } elsif ( @::noderange || $::opt_o) { + # if they gave a list of objects then they must want more + # than the object names! + $::ATTRLIST="all"; + } else { + # otherwise just get a list of object names + $::ATTRLIST="none"; + } # # put together a hash with the list of objects and the associated types