2 Replies Latest reply on Jul 9, 2012 1:07 PM by lamw

    createTime not returning?

    mcescalante Novice

      I am trying to return createTime (the time a snapshot was taken) for each virtual machine.

       

      I've tried traversing the tree just like every other metric, but it won't return it.

       

      Currently, I have this loop.

       

      foreach my $vm_view (@$vm_views) {

              my $snapshot = $vm_view->snapshot;
              print Dumper($snapshot);
              if (defined $snapshot) {
                      my $snap_time = $snapshot->rootSnapshotList;
                      print @$snap_time;
              print Dumper($snap_time);
              }
      }

       

      The Dumper for $snapshot returns me rootSnapshotList, which has createTime inside it.

      The Dumper for $snap_time returns me the same thing, but without 'rootSnapshotList'.

       

      If I add ->createTime to the line my $snap_time... it just says cannot call method on unblessed reference... the dumper says bless.

       

      Not really sure what other info is relevant, PLEASE HELP!