Nir Soffer has uploaded a new change for review.

Change subject: virt: Improve spacing
......................................................................

virt: Improve spacing

Separting logic blocks make it easier to to understand the flow.

Change-Id: I94b751112db67398891820035a9ec06abed59c3b
Signed-off-by: Nir Soffer <[email protected]>
---
M vdsm/virt/vmdevices/storage.py
1 file changed, 6 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/67/40067/1

diff --git a/vdsm/virt/vmdevices/storage.py b/vdsm/virt/vmdevices/storage.py
index 799f66c..af1ddd2 100644
--- a/vdsm/virt/vmdevices/storage.py
+++ b/vdsm/virt/vmdevices/storage.py
@@ -333,14 +333,17 @@
 
         if self.extSharedState == DRIVE_SHARED_TYPE.SHARED:
             diskelem.appendChildWithArgs('shareable')
+
         if hasattr(self, 'readonly') and utils.tobool(self.readonly):
             diskelem.appendChildWithArgs('readonly')
         elif self.device == 'floppy' and not hasattr(self, 'readonly'):
             # floppies are used only internally for sysprep, so
             # they are readonly unless explicitely stated otherwise
             diskelem.appendChildWithArgs('readonly')
+
         if hasattr(self, 'serial'):
             diskelem.appendChildWithArgs('serial', text=self.serial)
+
         if hasattr(self, 'bootOrder'):
             diskelem.appendChildWithArgs('boot', order=self.bootOrder)
 
@@ -380,10 +383,12 @@
     def _getDriverXML(self):
         driver = vmxml.Element('driver')
         driverAttrs = {'name': 'qemu'}
+
         if self.blockDev:
             driverAttrs['io'] = 'native'
         else:
             driverAttrs['io'] = 'threads'
+
         if self.format == 'cow':
             driverAttrs['type'] = 'qcow2'
         elif self.format:
@@ -396,6 +401,7 @@
             driverAttrs['error_policy'] = 'enospace'
         else:
             driverAttrs['error_policy'] = 'stop'
+
         driver.setAttrs(**driverAttrs)
         return driver
 


-- 
To view, visit https://gerrit.ovirt.org/40067
To unsubscribe, visit https://gerrit.ovirt.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I94b751112db67398891820035a9ec06abed59c3b
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Nir Soffer <[email protected]>
_______________________________________________
vdsm-patches mailing list
[email protected]
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches

Reply via email to