From 6bbc7da43b25d848f1b048a1a4dcb2c920f38520 Mon Sep 17 00:00:00 2001 From: scresto Date: Mon, 7 Jul 2025 14:27:07 +0200 Subject: [PATCH] CTOR-880: New Pack(storage::hp::alletra::restapi) (#5658) --- src/storage/hp/alletra/restapi/mode/diskstatus.pm | 15 ++++++--------- .../hp/alletra/restapi/mode/volumestatus.pm | 7 ++++++- 2 files changed, 12 insertions(+), 10 deletions(-) diff --git a/src/storage/hp/alletra/restapi/mode/diskstatus.pm b/src/storage/hp/alletra/restapi/mode/diskstatus.pm index 2f7124b50..f0fd857fd 100644 --- a/src/storage/hp/alletra/restapi/mode/diskstatus.pm +++ b/src/storage/hp/alletra/restapi/mode/diskstatus.pm @@ -216,7 +216,12 @@ sub manage_selection { manufacturer => $disk->{manufacturer}, model => $disk->{model}, serial => $disk->{serialNumber} - }; + } + } + + if (scalar(keys %{$self->{disks}}) <= 0) { + $self->{output}->add_option_msg(short_msg => "No disk found."); + $self->{output}->option_exit(); } } @@ -329,14 +334,6 @@ Threshold. Threshold. -=item B<--warning-status> - -Threshold. - -=item B<--critical-status> - -Threshold. - =back =cut diff --git a/src/storage/hp/alletra/restapi/mode/volumestatus.pm b/src/storage/hp/alletra/restapi/mode/volumestatus.pm index 04e9ca801..062b4e419 100644 --- a/src/storage/hp/alletra/restapi/mode/volumestatus.pm +++ b/src/storage/hp/alletra/restapi/mode/volumestatus.pm @@ -214,7 +214,12 @@ sub manage_selection { provisioning_type => defined($provisioning_type{$volume->{provisioningType}}) ? $provisioning_type{$volume->{provisioningType}} : 'NOT_DOCUMENTED', readonly => $volume->{readOnly} - }; + } + } + + if (scalar(keys %{$self->{volumes}}) <= 0) { + $self->{output}->add_option_msg(short_msg => "No volume found."); + $self->{output}->option_exit(); } }