domain: Fix memory stats for shutoff VM (bz 1215453)

memory doesn't have a separate input/output stats, so we shouldn't use
the in_out_vector_helper. This resulted in shutoff VMs appearing to still
use memory in the manager window.
This commit is contained in:
Cole Robinson 2015-05-04 15:50:01 -04:00
parent feb9c7e9b2
commit 848123e6c8

View File

@ -1699,8 +1699,10 @@ class vmmDomain(vmmLibvirtObject):
cpudata = cpudata[0:limit]
return cpudata
def memory_usage_vector_limit(self, limit):
return self.in_out_vector_limit(self.stats_memory_vector(),
limit)
data = self.stats_memory_vector()
if len(data) > limit:
data = data[0:limit]
return data
def network_traffic_vector_limit(self, limit, ceil=None):
return self.in_out_vector_limit(self.network_traffic_vector(ceil),
limit)