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