From 84fc75b4965ca3a1808342da1da4a7066c8cbf7e Mon Sep 17 00:00:00 2001 From: jbjohnso Date: Wed, 7 Jul 2010 19:32:04 +0000 Subject: [PATCH] -Speed up cluster view retrieval for cases with multiple clusters git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@6670 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- xCAT-server/lib/xcat/plugins/esx.pm | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/xCAT-server/lib/xcat/plugins/esx.pm b/xCAT-server/lib/xcat/plugins/esx.pm index 2f73c979e..5ab660dcb 100644 --- a/xCAT-server/lib/xcat/plugins/esx.pm +++ b/xCAT-server/lib/xcat/plugins/esx.pm @@ -830,12 +830,15 @@ sub get_clusterview { if ($args{properties}) { $subargs{properties}=$args{properties}; } - foreach (@{$args{conn}->find_entity_views(%subargs)}) { - if ($_->name eq "$clustname") { - return $_; - last; - } - } + $subargs{filter}={name=>$clustname}; + my $view = $args{conn}->find_entity_view(%subargs); + return $view; + #foreach (@{$args{conn}->find_entity_views(%subargs)}) { + # if ($_->name eq "$clustname") { + # return $_; + # last; + # } + #} } sub get_hostview {