From Dan Kenigsberg danken@redhat.com:
Dan Kenigsberg has submitted this change and it was merged.
Change subject: vm: Log device __repr__ instead of name ......................................................................
vm: Log device __repr__ instead of name
When waiting for device removal, we assume that the device has a name, but lease devices do not have a name. Replace name with the device __repr__ implementation, providing more useful info, and supporting any device.
Implement __repr__ for Drive and Interface devices so we get useful log when waiting for removal of these devices. Other devices will have the default __repr__ ("<ClassName object at 0x123456789>").
Here are example __repr__ output:
<Drive name=hda, type=file, path=/block_path at 0x7f1a62934bb0> <Interface name=, type=bridge, mac=macAddr at 0x7f1a6214a850>
Change-Id: I666e13cf3c58c980e4291b7903220a7551e10f85 Bug-Url: https://bugzilla.redhat.com/1408825 Signed-off-by: Nir Soffer nsoffer@redhat.com --- M lib/vdsm/virt/vmdevices/network.py M lib/vdsm/virt/vmdevices/storage.py M vdsm/virt/vm.py 3 files changed, 15 insertions(+), 3 deletions(-)
Approvals: Nir Soffer: Verified; Passed CI tests Dan Kenigsberg: Looks good to me, approved
Objections: Jenkins CI: Failed CI tests
vdsm-patches@lists.fedorahosted.org