title: pysphere PerformanceManager fails to get statistics of datastores
body: <p>I'm trying to get statistics of vsphere datastores.</p>
  
  <p>While I'm able to get statistics of hosts, it fails with datastores:</p>
  
  <pre><code>from pysphere import VIServer 
  
  server = VIServer() 
  server.connect(HOST, USER, PASSWORD) 
  
  pm = server.get_performance_manager() 
  
  # querying hosts - works:
  entities = server.get_hosts()  # returns {entity: name}
  counters = pm.get_entity_counters(entities.keys()[0])  # returns {name: id}
  statistics = pm.get_entity_statistic(entities.keys()[0], counters.values()[:1])
  
  # querying datastores - doesn't work:
  entities = server.get_datastores()  # returns {entity: name}
  counters = pm.get_entity_counters(entities.keys()[0])  # returns {name: id}
  statistics = pm.get_entity_statistic(entities.keys()[0], counters.values()[:1])
  </code></pre>
  
  <p>The last line raises the following error:</p>
  
  <pre><code>AttributeError                            Traceback (most recent call last)
  &lt;ipython-input-122-dbbb39ef8a75&gt; in &lt;module&gt;()
  ----&gt; 1 statistics = pm.get_entity_statistic(entities.keys()[0], counters.values()[:1])
  
  .../python2.7/site-packages/pysphere/vi_performance_manager.pyc in get_entity_statistic(self, entity, counters, interval, composite)
      183 
      184             instance_name = str(stat.Id.Instance)
  --&gt; 185             stat_value = str(stat.Value[0])
      186             date_now = datetime.datetime.utcnow()
      187             statistics.append(EntityStatistics(entity, stat.Id.CounterId, cname,
  
  .../python2.7/site-packages/pysphere/ZSI/generate/pyclass.pyc in get(self)
      146         if not callable(what):
      147             def get(self):
  --&gt; 148                 return getattr(self, what.aname)
      149 
      150             if what.maxOccurs &gt; 1:
  
  AttributeError: 'DynamicData_Holder' object has no attribute '_value'
  </code></pre>
  
  <p>It seems the pysphere repository has been inactive for around 3 years now, and I couldn't find discussions mentioning this specific issue except for this:
  <a href="https://groups.google.com/forum/#!topic/pysphere/LQaF661msoQ" rel="nofollow">https://groups.google.com/forum/#!topic/pysphere/LQaF661msoQ</a></p>
  
  <p>Unfortunately this solution doesn't cover the desired statistics but only simple stats of the current moment.</p>
  
  <p>I also found a similar error reported, but it wasn't really addressed as far as I understand:
  <a href="https://github.com/itnihao/pysphere/issues/60" rel="nofollow">https://github.com/itnihao/pysphere/issues/60</a></p>
  
  <p>Any help would be greatly appreciated.</p>