From 7539f6559e252cedc40cc26efabfe5fe4ff75e65 Mon Sep 17 00:00:00 2001 From: jbjohnso Date: Wed, 7 Jul 2010 19:26:55 +0000 Subject: [PATCH] -Speed up detection of vcenter attach requirements git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@6669 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- xCAT-server/lib/xcat/plugins/esx.pm | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/xCAT-server/lib/xcat/plugins/esx.pm b/xCAT-server/lib/xcat/plugins/esx.pm index 78c1a28c8..2f73c979e 100644 --- a/xCAT-server/lib/xcat/plugins/esx.pm +++ b/xCAT-server/lib/xcat/plugins/esx.pm @@ -873,14 +873,15 @@ sub get_hostview { $subargs{filter}={'name' =~ qr/localhost(?:\.|\z)/}; $view = $args{conn}->find_entity_view(%subargs); if ($view) { return $view; } + return undef; #rest of function should be obsoleted, going to run with that assumption for 2.5 at least $subargs{filter}={'name' =~ qr/.*/}; - foreach (@{$args{conn}->find_entity_views(%subargs)}) { - my $view = $_; - if ($_->name =~ /$host(?:\.|\z)/ or $_->name =~ /localhost(?:\.|\z)/ or grep { $view->name =~ /$_(?:\.|\z)/ } @matchvalues) { - return $view; - last; - } - } +# foreach (@{$args{conn}->find_entity_views(%subargs)}) { +# my $view = $_; +# if ($_->name =~ /$host(?:\.|\z)/ or $_->name =~ /localhost(?:\.|\z)/ or grep { $view->name =~ /$_(?:\.|\z)/ } @matchvalues) { +# return $view; +# last; +# } +# } } sub enable_vmotion { #TODO: vmware 3.x semantics too? this is 4.0...