-Fix lsvm on an empty hypervisor

git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@6394 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
This commit is contained in:
jbjohnso 2010-06-08 18:19:48 +00:00
parent 3ce61e6f42
commit 2cad6a42d2

View File

@ -1426,8 +1426,12 @@ sub lsvm {
my $hyp = $args{hyp};
$hyphash{$hyp}->{hostview} = get_hostview(hypname=>$hyp,conn=>$hyphash{$hyp}->{conn}); #,properties=>['config','configManager']);
use Data::Dumper;
my @vms = @{$hyphash{$hyp}->{hostview}->vm};
foreach (@vms) {
if ($hyphash{$hyp}->{hostview}->vm) {
my $vms = $hyphash{$hyp}->{hostview}->vm;
unless ($vms) {
return;
}
foreach (@$vms) {
my $vmv = $hyphash{$hyp}->{conn}->get_view(mo_ref=>$_);
sendmsg($vmv->name,$hyp);
}