mirror of
https://github.com/virt-manager/virt-manager.git
synced 2025-03-10 12:58:27 +03:00
Fix some device add/remove reorg fallout.
This commit is contained in:
parent
3c587e9dda
commit
aa5c82ff46
src/virtManager
@ -555,7 +555,7 @@ class vmmAddHardware(gobject.GObject):
|
||||
def add_storage(self):
|
||||
used = []
|
||||
for d in self.vm.get_disk_devices():
|
||||
used.append(d[3])
|
||||
used.append(d[2])
|
||||
|
||||
try:
|
||||
self._dev.generate_target(used)
|
||||
|
@ -218,7 +218,7 @@ class vmmDomain(gobject.GObject):
|
||||
tx = 0
|
||||
for netdev in self.get_network_devices():
|
||||
try:
|
||||
io = self.vm.interfaceStats(netdev[2])
|
||||
io = self.vm.interfaceStats(netdev[4])
|
||||
if io:
|
||||
rx += io[0]
|
||||
tx += io[4]
|
||||
@ -234,7 +234,7 @@ class vmmDomain(gobject.GObject):
|
||||
wr = 0
|
||||
for disk in self.get_disk_devices():
|
||||
try:
|
||||
io = self.vm.blockStats(disk[3])
|
||||
io = self.vm.blockStats(disk[2])
|
||||
if io:
|
||||
rd += io[1]
|
||||
wr += io[3]
|
||||
|
Loading…
x
Reference in New Issue
Block a user