Change in vdsm[master]: virt: reformat code
fromani at redhat.com
fromani at redhat.com
Fri Apr 8 15:27:55 UTC 2016
Francesco Romani has uploaded a new change for review.
Change subject: virt: reformat code
......................................................................
virt: reformat code
Silly reformatting patch to make the code easier to change:
now updates to dicts() require minimal change (+1/-1 line patch)
Change-Id: I8b247c2f31f1a1494846b161a2d33c5672e09168
Signed-off-by: Francesco Romani <fromani at redhat.com>
---
M vdsm/virt/vm.py
M vdsm/virt/vmdevices/graphics.py
2 files changed, 8 insertions(+), 4 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/78/55878/1
diff --git a/vdsm/virt/vm.py b/vdsm/virt/vm.py
index bba4054..0f94106 100644
--- a/vdsm/virt/vm.py
+++ b/vdsm/virt/vm.py
@@ -564,7 +564,8 @@
'spice'
if self.conf['display'] in ('qxl', 'qxlnc')
else 'vnc'),
- 'specParams': vmdevices.graphics.makeSpecParams(self.conf)}]
+ 'specParams': vmdevices.graphics.makeSpecParams(self.conf)
+ }]
def getConfSound(self):
"""
@@ -1480,11 +1481,13 @@
'type': dev.device,
'port': dev.port,
'tlsPort': dev.tlsPort,
- 'ipAddress': dev.specParams.get('displayIp', '0')}
+ 'ipAddress': dev.specParams.get('displayIp', '0'),
+ }
stats = {
'displayInfo': [getInfo(dev)
- for dev in self._devices[hwclass.GRAPHICS]]}
+ for dev in self._devices[hwclass.GRAPHICS]],
+ }
if 'display' in self.conf:
stats['displayType'] = self.conf['display']
stats['displayPort'] = self.conf['displayPort']
diff --git a/vdsm/virt/vmdevices/graphics.py b/vdsm/virt/vmdevices/graphics.py
index 4bc6d85..7bd4e92 100644
--- a/vdsm/virt/vmdevices/graphics.py
+++ b/vdsm/virt/vmdevices/graphics.py
@@ -41,7 +41,8 @@
'displayNetwork': 'displayNetwork',
'spiceSecureChannels': 'spiceSecureChannels',
'copyPasteEnable': 'copyPasteEnable',
- 'fileTransferEnable': 'fileTransferEnable'}
+ 'fileTransferEnable': 'fileTransferEnable',
+}
class Graphics(Base):
--
To view, visit https://gerrit.ovirt.org/55878
To unsubscribe, visit https://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I8b247c2f31f1a1494846b161a2d33c5672e09168
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Francesco Romani <fromani at redhat.com>
More information about the vdsm-patches
mailing list