fix and remove debug

This commit is contained in:
garnier-quentin 2019-02-04 15:07:20 +01:00
parent 8b1c27b659
commit 7eb7e05b0a
2 changed files with 1 additions and 3 deletions

View File

@ -83,7 +83,7 @@ sub run {
foreach my $dev (@{$entity_view->{'config.hardware.device'}}) {
if (ref($dev) =~ /$self->{device}/) {
if ($dev->connectable->connected == 1) {
if (defined($dev->connectable) && $dev->connectable->connected == 1) {
$data->{$entity_value}->{total_device_connected}++;
}
}

View File

@ -92,8 +92,6 @@ sub run {
# Disk
if (defined($self->{check_disk_limit})) {
use Data::Dumper;
print Data::Dumper::Dumper($entity_view->{'config.hardware.device'});
foreach my $device (@{$entity_view->{'config.hardware.device'}}) {
if ($device->isa('VirtualDisk')) {
if (defined($device->storageIOAllocation->limit) && $device->storageIOAllocation->limit != -1) {