Francesco Romani has posted comments on this change. Change subject: vm: floppy: remove special 'readonly' handling ......................................................................
Patch Set 3: (1 comment) http://gerrit.ovirt.org/#/c/26937/3/vdsm/virt/vm.py File vdsm/virt/vm.py: Line 1326: targetAttrs['bus'] = self.iface Line 1327: diskelem.appendChildWithArgs('target', **targetAttrs) Line 1328: Line 1329: if self.extSharedState == DRIVE_SHARED_TYPE.SHARED: Line 1330: diskelem.appendChildWithArgs('shareable') > Would you replace this with I agree with the intent of your comment, but I'm not sure the inner if you suggested is 100% correct because this way if engine sends readonly=False, VDSM will add the readonly flag anyway, so the value from engine seems meaningless. Would'nt be better if we use if self.device == 'floppy' and not hasattr(self, 'readonly'): # floppies are used only internally for sysprep, so # they are readonly unless explicitely statet otherwise diskelem.appendChildWithArgs('readonly') else: # current code: we follow Engine's will Line 1331: if hasattr(self, 'readonly') and utils.tobool(self.readonly): Line 1332: diskelem.appendChildWithArgs('readonly') Line 1333: if hasattr(self, 'serial'): Line 1334: diskelem.appendChildWithArgs('serial', text=self.serial) -- To view, visit http://gerrit.ovirt.org/26937 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ie9183104d3739f2d4a99712e7851fc3172b82621 Gerrit-PatchSet: 3 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Francesco Romani <[email protected]> Gerrit-Reviewer: Dan Kenigsberg <[email protected]> Gerrit-Reviewer: Francesco Romani <[email protected]> Gerrit-Reviewer: Michal Skrivanek <[email protected]> Gerrit-Reviewer: Vinzenz Feenstra <[email protected]> Gerrit-Reviewer: [email protected] Gerrit-Reviewer: oVirt Jenkins CI Server Gerrit-HasComments: Yes _______________________________________________ vdsm-patches mailing list [email protected] https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches
