summaryrefslogtreecommitdiffstats
path: root/nova/virt
diff options
context:
space:
mode:
authorMauro S. M. Rodrigues <maurosr@linux.vnet.ibm.com>2012-10-10 19:43:46 -0400
committerMauro S. M. Rodrigues <maurosr@linux.vnet.ibm.com>2012-10-22 07:12:24 -0400
commitad2d4c379c5d424bde1832b664f36aa29432d64f (patch)
treed76c02f84009d6c42298b37ee62b09967206e361 /nova/virt
parent8cb329b2a03f1d04f13c38244477e53ca4a321f0 (diff)
Add meaningful server diagnostic information to fake hypervisor
Previously the fake hypervisor didn't returned a fake information similar to the real output so this patch add this sample fake information. Also removed a duplicated check on the tests Change-Id: Iab72a867e6e2606beb15db17701375f3c8f61a79
Diffstat (limited to 'nova/virt')
-rw-r--r--nova/virt/fake.py17
1 files changed, 16 insertions, 1 deletions
diff --git a/nova/virt/fake.py b/nova/virt/fake.py
index 6134019b2..0996988cd 100644
--- a/nova/virt/fake.py
+++ b/nova/virt/fake.py
@@ -184,7 +184,22 @@ class FakeDriver(driver.ComputeDriver):
'cpu_time': 0}
def get_diagnostics(self, instance_name):
- return 'FAKE_DIAGNOSTICS'
+ return {'cpu0_time': 17300000000,
+ 'memory': 524288,
+ 'vda_errors': -1,
+ 'vda_read': 262144,
+ 'vda_read_req': 112,
+ 'vda_write': 5778432,
+ 'vda_write_req': 488,
+ 'vnet1_rx': 2070139,
+ 'vnet1_rx_drop': 0,
+ 'vnet1_rx_errors': 0,
+ 'vnet1_rx_packets': 26701,
+ 'vnet1_tx': 140208,
+ 'vnet1_tx_drop': 0,
+ 'vnet1_tx_errors': 0,
+ 'vnet1_tx_packets': 662,
+ }
def get_all_bw_counters(self, instances):
"""Return bandwidth usage counters for each interface on each