This commit is contained in:
Colin Gagnaire 2019-02-06 11:12:07 +01:00
commit 0376c3bf94
1 changed files with 5 additions and 1 deletions

View File

@ -125,9 +125,13 @@ sub run {
$response->{data}->{$vm_id}->{'config.annotation'} ne '') {
$prefix_msg .= ' [' . $options{custom}->strip_cr(value => $response->{data}->{$vm_id}->{'config.annotation'}) . ']';
}
my $suffix_msg = '';
if (defined($_->{description}) && $_->{description} ne '') {
$suffix_msg = ' [' . $options{custom}->strip_cr(value => $_->{description}) . ']';
}
if (!$self->{output}->is_status(value => $exit, compare => 'ok', litteral => 1)) {
$vm_errors{$exit}->{$vm_name} = 1;
$self->{output}->output_add(long_msg => "$prefix_msg snapshot create time: " . $_->{create_time});
$self->{output}->output_add(long_msg => "$prefix_msg snapshot create time: " . $_->{create_time} . $suffix_msg);
}
}
}