Martin Polednik has posted comments on this change.
Change subject: virt: drop domain_event_to_string function ......................................................................
Patch Set 1: Code-Review-1
(1 comment)
-1 to avoid string constants in code
https://gerrit.ovirt.org/#/c/40432/1/vdsm/virt/vm.py File vdsm/virt/vm.py:
Line 4063: Line 4064: def _onLibvirtLifecycleEvent(self, event, detail, opaque): Line 4065: self.log.debug('event %s detail %s opaque %s', Line 4066: libvirt_helpers.DOMAIN_EVENT_TO_STRING.get( Line 4067: event, "Unknown"), Extra: add UNKNOWN_EVENT to libvirt_helpers and use that. Line 4068: detail, opaque) Line 4069: if event == libvirt.VIR_DOMAIN_EVENT_STOPPED: Line 4070: if (detail == libvirt.VIR_DOMAIN_EVENT_STOPPED_MIGRATED and Line 4071: self.lastStatus == vmstatus.MIGRATION_SOURCE):