Evolution #3993
Modifier la façon de récupérer les datastores avec listdatastore git-svn-id: http://svn.merethis.net/centreon-esxd/trunk@17 a5eaa968-4c79-4d68-970d-af6011b5b055
This commit is contained in:
parent
bfb5688ddb
commit
1d139af98d
|
@ -28,7 +28,7 @@ sub datastoreusage_compute_args {
|
|||
|
||||
sub datastoreusage_do {
|
||||
my ($ds, $warn, $crit) = @_;
|
||||
my %filters = ('summary.name' => $ds);
|
||||
my %filters = ('name' => $ds);
|
||||
my @properties = ('summary');
|
||||
|
||||
my $result = get_entities_host('Datastore', \%filters, \@properties);
|
||||
|
|
|
@ -9,22 +9,9 @@ sub listdatastore_compute_args {
|
|||
sub listdatastore_do {
|
||||
my ($ds, $warn, $crit) = @_;
|
||||
my %filters = ();
|
||||
my @properties = ('datastore');
|
||||
my @properties = ('summary');
|
||||
|
||||
my $result = get_entities_host('Datacenter', \%filters, \@properties);
|
||||
if (!defined($result)) {
|
||||
return ;
|
||||
}
|
||||
|
||||
my @ds_array = ();
|
||||
foreach my $entity_view (@$result) {
|
||||
if (defined $entity_view->datastore) {
|
||||
@ds_array = (@ds_array, @{$entity_view->datastore});
|
||||
}
|
||||
}
|
||||
|
||||
@properties = ('summary');
|
||||
$result = get_views(\@ds_array, \@properties);
|
||||
my $result = get_entities_host('Datastore', \%filters, \@properties);
|
||||
if (!defined($result)) {
|
||||
return ;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue