Dan Kenigsberg has submitted this change and it was merged. Change subject: vm: Unify checks for vdsm image ......................................................................
vm: Unify checks for vdsm image When testing if dict or vm.Drive object are vdsm image, we have to do an ugly type check, and then invoke either vm.Drive.isVdsmImage, or vm.isVdsmImage, which use different logic. Having vm.Drive.isVdsmImage looks, at first glance, as an improvement, but since we handle both dicts and drive objects, this only complicates the code. The different logic creates confusion and leads to pointless discussions if some key is needed or not in certain context. This patch unifies these checks; both vm.Drive and dict have now similar interface so isVdsmImage can handle both, and we use the same logic. Change-Id: Iaa109a19aeec56f09ed2e6d64dee636c7779d426 Signed-off-by: Nir Soffer <[email protected]> Reviewed-on: http://gerrit.ovirt.org/22370 Reviewed-by: Michal Skrivanek <[email protected]> Reviewed-by: Francesco Romani <[email protected]> Reviewed-by: Sergey Gotliv <[email protected]> Reviewed-by: Allon Mureinik <[email protected]> Reviewed-by: Federico Simoncelli <[email protected]> --- M vdsm/vm.py 1 file changed, 16 insertions(+), 9 deletions(-) Approvals: Nir Soffer: Verified Federico Simoncelli: Looks good to me, approved Sergey Gotliv: Looks good to me, but someone else must approve Allon Mureinik: Looks good to me, but someone else must approve Francesco Romani: Looks good to me, but someone else must approve Michal Skrivanek: Looks good to me, but someone else must approve -- To view, visit http://gerrit.ovirt.org/22370 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: Iaa109a19aeec56f09ed2e6d64dee636c7779d426 Gerrit-PatchSet: 5 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Nir Soffer <[email protected]> Gerrit-Reviewer: Allon Mureinik <[email protected]> Gerrit-Reviewer: Ayal Baron <[email protected]> Gerrit-Reviewer: Dan Kenigsberg <[email protected]> Gerrit-Reviewer: Eduardo <[email protected]> Gerrit-Reviewer: Federico Simoncelli <[email protected]> Gerrit-Reviewer: Francesco Romani <[email protected]> Gerrit-Reviewer: Michal Skrivanek <[email protected]> Gerrit-Reviewer: Nir Soffer <[email protected]> Gerrit-Reviewer: Sergey Gotliv <[email protected]> Gerrit-Reviewer: Vinzenz Feenstra <[email protected]> Gerrit-Reviewer: oVirt Jenkins CI Server _______________________________________________ vdsm-patches mailing list [email protected] https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches
