Hans De Goede has uploaded a new change for review.
Change subject: libvirtvm.py: Refactor device xml generation ......................................................................
libvirtvm.py: Refactor device xml generation
To remove a lot of code duplication and making adding new device types easier.
Change-Id: Ic2e1c5a2d0998af38fa80d53975b0e528b9257a6 Signed-off-by: Hans de Goede hdegoede@redhat.com --- M vdsm/libvirtvm.py 1 file changed, 48 insertions(+), 68 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/32/4132/1 -- To view, visit http://gerrit.ovirt.org/4132 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange Gerrit-Change-Id: Ic2e1c5a2d0998af38fa80d53975b0e528b9257a6 Gerrit-PatchSet: 1 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Hans De Goede hdegoede@redhat.com
Dan Kenigsberg has posted comments on this change.
Change subject: libvirtvm.py: Refactor device xml generation ......................................................................
Patch Set 1: I would prefer that you didn't submit this
(2 inline comments)
thanks a lot for this cleanup! two minor comments, though.
.................................................... File vdsm/libvirtvm.py Line 827: def createXmlElem(self, elemType, type, attributes = []): style: no space around this equal op.
Line 1030: type = 'block' "type" is a python builtin, please find another name.
-- To view, visit http://gerrit.ovirt.org/4132 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: Ic2e1c5a2d0998af38fa80d53975b0e528b9257a6 Gerrit-PatchSet: 1 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Hans De Goede hdegoede@redhat.com Gerrit-Reviewer: Dan Kenigsberg danken@redhat.com
Igor Lvovsky has posted comments on this change.
Change subject: libvirtvm.py: Refactor device xml generation ......................................................................
Patch Set 1: Looks good to me, but someone else must approve
-- To view, visit http://gerrit.ovirt.org/4132 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: Ic2e1c5a2d0998af38fa80d53975b0e528b9257a6 Gerrit-PatchSet: 1 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Hans De Goede hdegoede@redhat.com Gerrit-Reviewer: Dan Kenigsberg danken@redhat.com Gerrit-Reviewer: Gal Hammer ghammer@redhat.com Gerrit-Reviewer: Igor Lvovsky ilvovsky@redhat.com
Hans De Goede has posted comments on this change.
Change subject: libvirtvm.py: Refactor device xml generation ......................................................................
Patch Set 1: (2 inline comments)
.................................................... File vdsm/libvirtvm.py Line 827: def createXmlElem(self, elemType, type, attributes = []): Done
Line 1030: type = 'block' Done
-- To view, visit http://gerrit.ovirt.org/4132 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: Ic2e1c5a2d0998af38fa80d53975b0e528b9257a6 Gerrit-PatchSet: 1 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Hans De Goede hdegoede@redhat.com Gerrit-Reviewer: Dan Kenigsberg danken@redhat.com Gerrit-Reviewer: Gal Hammer ghammer@redhat.com Gerrit-Reviewer: Hans De Goede hdegoede@redhat.com Gerrit-Reviewer: Igor Lvovsky ilvovsky@redhat.com
Gal Hammer has posted comments on this change.
Change subject: libvirtvm.py: Refactor device xml generation ......................................................................
Patch Set 2: Looks good to me, but someone else must approve
(1 inline comment)
Looks okay, other than a minor comment.
.................................................... File vdsm/libvirtvm.py Line 838: if not hasattr(self, attrName): nit: I would prefer to see a "if hasattr" condition rather than a "continue".
-- To view, visit http://gerrit.ovirt.org/4132 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: Ic2e1c5a2d0998af38fa80d53975b0e528b9257a6 Gerrit-PatchSet: 2 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Hans De Goede hdegoede@redhat.com Gerrit-Reviewer: Dan Kenigsberg danken@redhat.com Gerrit-Reviewer: Gal Hammer ghammer@redhat.com Gerrit-Reviewer: Hans De Goede hdegoede@redhat.com Gerrit-Reviewer: Igor Lvovsky ilvovsky@redhat.com
Hans De Goede has posted comments on this change.
Change subject: libvirtvm.py: Refactor device xml generation ......................................................................
Patch Set 2: Verified
(1 inline comment)
Tested and works for me.
.................................................... File vdsm/libvirtvm.py Line 838: if not hasattr(self, attrName): OTOH I prefer these kind of checks to use a continue mode of operation, so as to avoid deep indentation levels.
-- To view, visit http://gerrit.ovirt.org/4132 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: Ic2e1c5a2d0998af38fa80d53975b0e528b9257a6 Gerrit-PatchSet: 2 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Hans De Goede hdegoede@redhat.com Gerrit-Reviewer: Dan Kenigsberg danken@redhat.com Gerrit-Reviewer: Gal Hammer ghammer@redhat.com Gerrit-Reviewer: Hans De Goede hdegoede@redhat.com Gerrit-Reviewer: Igor Lvovsky ilvovsky@redhat.com
Igor Lvovsky has posted comments on this change.
Change subject: libvirtvm.py: Refactor device xml generation ......................................................................
Patch Set 2: Looks good to me, but someone else must approve
-- To view, visit http://gerrit.ovirt.org/4132 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: Ic2e1c5a2d0998af38fa80d53975b0e528b9257a6 Gerrit-PatchSet: 2 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Hans De Goede hdegoede@redhat.com Gerrit-Reviewer: Dan Kenigsberg danken@redhat.com Gerrit-Reviewer: Gal Hammer ghammer@redhat.com Gerrit-Reviewer: Hans De Goede hdegoede@redhat.com Gerrit-Reviewer: Igor Lvovsky ilvovsky@redhat.com
Igor Lvovsky has posted comments on this change.
Change subject: libvirtvm.py: Refactor device xml generation ......................................................................
Patch Set 3: Looks good to me, but someone else must approve
-- To view, visit http://gerrit.ovirt.org/4132 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: Ic2e1c5a2d0998af38fa80d53975b0e528b9257a6 Gerrit-PatchSet: 3 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Hans De Goede hdegoede@redhat.com Gerrit-Reviewer: Dan Kenigsberg danken@redhat.com Gerrit-Reviewer: Gal Hammer ghammer@redhat.com Gerrit-Reviewer: Hans De Goede hdegoede@redhat.com Gerrit-Reviewer: Igor Lvovsky ilvovsky@redhat.com
Gal Hammer has posted comments on this change.
Change subject: libvirtvm.py: Refactor device xml generation ......................................................................
Patch Set 3: Looks good to me, but someone else must approve
-- To view, visit http://gerrit.ovirt.org/4132 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: Ic2e1c5a2d0998af38fa80d53975b0e528b9257a6 Gerrit-PatchSet: 3 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Hans De Goede hdegoede@redhat.com Gerrit-Reviewer: Dan Kenigsberg danken@redhat.com Gerrit-Reviewer: Gal Hammer ghammer@redhat.com Gerrit-Reviewer: Hans De Goede hdegoede@redhat.com Gerrit-Reviewer: Igor Lvovsky ilvovsky@redhat.com
Dan Kenigsberg has posted comments on this change.
Change subject: libvirtvm.py: Refactor device xml generation ......................................................................
Patch Set 3: Verified; Looks good to me, approved
-- To view, visit http://gerrit.ovirt.org/4132 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: Ic2e1c5a2d0998af38fa80d53975b0e528b9257a6 Gerrit-PatchSet: 3 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Hans De Goede hdegoede@redhat.com Gerrit-Reviewer: Dan Kenigsberg danken@redhat.com Gerrit-Reviewer: Gal Hammer ghammer@redhat.com Gerrit-Reviewer: Hans De Goede hdegoede@redhat.com Gerrit-Reviewer: Igor Lvovsky ilvovsky@redhat.com
Dan Kenigsberg has submitted this change and it was merged.
Change subject: libvirtvm.py: Refactor device xml generation ......................................................................
libvirtvm.py: Refactor device xml generation
To remove a lot of code duplication and making adding new device types easier.
Change-Id: Ic2e1c5a2d0998af38fa80d53975b0e528b9257a6 Signed-off-by: Hans de Goede hdegoede@redhat.com --- M vdsm/libvirtvm.py 1 file changed, 49 insertions(+), 69 deletions(-)
Approvals: Gal Hammer: Looks good to me, but someone else must approve Dan Kenigsberg: Verified; Looks good to me, approved Igor Lvovsky: Looks good to me, but someone else must approve
-- To view, visit http://gerrit.ovirt.org/4132 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: merged Gerrit-Change-Id: Ic2e1c5a2d0998af38fa80d53975b0e528b9257a6 Gerrit-PatchSet: 3 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Hans De Goede hdegoede@redhat.com Gerrit-Reviewer: Dan Kenigsberg danken@redhat.com Gerrit-Reviewer: Gal Hammer ghammer@redhat.com Gerrit-Reviewer: Hans De Goede hdegoede@redhat.com Gerrit-Reviewer: Igor Lvovsky ilvovsky@redhat.com
vdsm-patches@lists.fedorahosted.org