enh hp storeonce cluster usage (#1237)

This commit is contained in:
Colin Gagnaire 2018-11-23 15:49:25 +01:00 committed by GitHub
parent d12b8b8bb8
commit 382489c288
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 2 deletions

View File

@ -229,12 +229,15 @@ sub manage_selection {
$self->{output}->output_add(long_msg => "skipping '" . $entry->{properties}->{applianceName} . "': no matching filter.", debug => 1);
next;
}
my $total = (defined($entry->{properties}->{capacity})) ? $entry->{properties}->{capacity} * 1024 * 1024 * 1024 : $entry->{properties}->{localCapacityBytes};
my $used = $total - (defined($entry->{properties}->{freeSpace})) ? $entry->{properties}->{freeSpace} * 1024 * 1024 * 1024 : $entry->{properties}->{localFreeBytes};
$self->{cluster}->{$entry->{properties}->{serialNumber}} = {
display => $entry->{properties}->{applianceName},
health => $mapping_health_level{$entry->{properties}->{healthLevel}},
total => $entry->{properties}->{capacity} * 1024 * 1024 * 1024, # GB
used => ($entry->{properties}->{capacity} - $entry->{properties}->{freeSpace}) * 1024 * 1024 * 1024, # GB
total => $total,
used => $used,
dedup => $entry->{properties}->{dedupeRatio} };
}
}