change datastore return state name

This commit is contained in:
garnier-quentin 2019-02-04 08:47:27 +01:00
parent 8f7fcf0166
commit 5e642ab5be
5 changed files with 5 additions and 5 deletions

View File

@ -66,7 +66,7 @@ sub run {
my $data = {};
foreach my $entity_view (@$result) {
my $entity_value = $entity_view->{mo_ref}->{value};
$data->{$entity_value} = { name => $entity_view->{'summary.name'}, state => $entity_view->{'summary.accessible'} };
$data->{$entity_value} = { name => $entity_view->{'summary.name'}, accessible => $entity_view->{'summary.accessible'} };
next if (centreon::vmware::common::is_accessible(accessible => $entity_view->{'summary.accessible'}) == 0);
my %vm_states = (poweredon => 0, poweredoff => 0, suspended => 0);

View File

@ -71,7 +71,7 @@ sub run {
foreach my $entity_view (@$result) {
my $entity_value = $entity_view->{mo_ref}->{value};
$data->{$entity_value} = { name => $entity_view->{'summary.name'}, state => $entity_view->{'summary.accessible'} };
$data->{$entity_value} = { name => $entity_view->{'summary.name'}, accessible => $entity_view->{'summary.accessible'} };
next if (centreon::vmware::common::is_accessible(accessible => $entity_view->{'summary.accessible'}) == 0);
# in KBps

View File

@ -64,7 +64,7 @@ sub run {
my %datastore_lun = ();
my $ds_checked = 0;
foreach (@$result) {
$data->{$_->{'summary.name'}} = { name => $_->{'summary.name'}, state => $_->{'summary.accessible'} };
$data->{$_->{'summary.name'}} = { name => $_->{'summary.name'}, accessible => $_->{'summary.accessible'} };
next if (centreon::vmware::common::is_accessible(accessible => $_->{'summary.accessible'}) == 0);
if ($_->info->isa('VmfsDatastoreInfo')) {

View File

@ -59,7 +59,7 @@ sub run {
my $entity_value = $entity_view->{mo_ref}->{value};
$data->{$entity_value} = {
name => $entity_view->{'summary.name'},
state => $entity_view->{'summary.accessible'},
accessible => $entity_view->{'summary.accessible'},
error_message => '',
snapshost => [],
};

View File

@ -59,7 +59,7 @@ sub run {
foreach my $entity_view (@$result) {
my $entity_value = $entity_view->{mo_ref}->{value};
$data->{$entity_value} = { name => $entity_view->summary->name, state => $entity_view->summary->accessible };
$data->{$entity_value} = { name => $entity_view->summary->name, accessible => $entity_view->summary->accessible };
next if (centreon::vmware::common::is_accessible(accessible => $entity_view->summary->accessible) == 0);
# capacity 0...