+ enhance hyperv mode

This commit is contained in:
garnier-quentin 2017-05-10 15:43:07 +02:00
parent 40a835e133
commit a503a4bedf
2 changed files with 10 additions and 0 deletions

View File

@ -175,6 +175,11 @@ sub manage_selection {
$self->{vm}->{$id} = { display => $name, vm => $name, status => $status, state => $state, is_clustered => $is_clustered };
$id++;
}
if (scalar(keys %{$self->{vm}}) <= 0) {
$self->{output}->add_option_msg(short_msg => "No virtual machine found.");
$self->{output}->option_exit();
}
}
1;

View File

@ -191,6 +191,11 @@ sub manage_selection {
$self->{vm}->{$id} = { display => $values{vm}, vm => $values{vm}, status => $values{status}, hostgroup => $values{hostgroup} };
$id++;
}
if (scalar(keys %{$self->{vm}}) <= 0) {
$self->{output}->add_option_msg(short_msg => "No virtual machine found.");
$self->{output}->option_exit();
}
}
1;