+ enhance hyperv mode
This commit is contained in:
parent
40a835e133
commit
a503a4bedf
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue