Dan Kenigsberg has uploaded a new change for review. Change subject: pep8: silence remaining errors ......................................................................
pep8: silence remaining errors Change-Id: Ic24b1a871d6f4cff448d2bb39b88014a9810c9c3 Signed-off-by: Dan Kenigsberg <[email protected]> --- M client/vdsClient.py M tests/functional/dhcp.py M tests/miscTests.py M tests/outOfProcessTests.py M tests/persistentDictTests.py M tests/remoteFileHandlerTests.py M tests/utilsTests.py M vdsm/dmidecodeUtil.py 8 files changed, 79 insertions(+), 75 deletions(-) git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/57/26457/1 diff --git a/client/vdsClient.py b/client/vdsClient.py index b324eb1..9764ea5 100644 --- a/client/vdsClient.py +++ b/client/vdsClient.py @@ -1888,16 +1888,16 @@ 'all bootable devices' )), 'hotunplugNic': (serv.hotunplugNic, - ('<vmId> <nicspec>', - 'Hotunplug NIC from existing VM', - 'nicspec parameters list: r=required, o=optional', - 'r device: bridge|sriov|vnlink|bridgeless.', - 'r network: network name', - 'r macAddr: mac address', - 'r nicModel: pv|rtl8139|e1000', - 'o bootOrder: <int> - global boot order across ' - 'all bootable devices' - )), + ('<vmId> <nicspec>', + 'Hotunplug NIC from existing VM', + 'nicspec parameters list: r=required, o=optional', + 'r device: bridge|sriov|vnlink|bridgeless.', + 'r network: network name', + 'r macAddr: mac address', + 'r nicModel: pv|rtl8139|e1000', + 'o bootOrder: <int> - global boot order across ' + 'all bootable devices' + )), 'hotplugDisk': (serv.hotplugDisk, ('<vmId> <drivespec>', 'Hotplug disk to existing VM', @@ -1917,23 +1917,24 @@ 'o optional: True|False' )), 'hotunplugDisk': (serv.hotunplugDisk, - ('<vmId> <drivespec >', - 'Hotunplug disk from existing VM', - 'drivespec parameters list: r=required, o=optional', - 'r iface:<ide|virtio> - Unique identification of ' - 'the existing VM.', - 'r index:<int> - disk index unique per interface ' - 'virtio|ide', - 'r [pool:UUID,domain:UUID,image:UUID,volume:UUID]|' - '[GUID:guid]|[UUID:uuid]', - 'r format: cow|raw', - 'r readonly: True|False - default is False', - 'r propagateErrors: off|on - default is off', - 'o bootOrder: <int> - global boot order across ' - 'all bootable devices', - 'o shared: exclusive|shared|none', - 'o optional: True|False' - )), + ('<vmId> <drivespec >', + 'Hotunplug disk from existing VM', + 'drivespec parameters list: r=required, o=optional', + 'r iface:<ide|virtio> - Unique identification of ' + 'the existing VM.', + 'r index:<int> - disk index unique per interface ' + 'virtio|ide', + 'r ' + '[pool:UUID,domain:UUID,image:UUID,volume:UUID]|' + '[GUID:guid]|[UUID:uuid]', + 'r format: cow|raw', + 'r readonly: True|False - default is False', + 'r propagateErrors: off|on - default is off', + 'o bootOrder: <int> - global boot order across ' + 'all bootable devices', + 'o shared: exclusive|shared|none', + 'o optional: True|False' + )), 'changeCD': (serv.do_changeCD, ('<vmId> <fileName|drivespec>', 'Changes the iso image of the cdrom' @@ -2020,13 +2021,13 @@ 'Get hardware info of the VDS' )), 'getVdsStats': (serv.do_getVdsStats, - ('', - 'Get Statistics info on the VDS' - )), + ('', + 'Get Statistics info on the VDS' + )), 'getVmStats': (serv.do_getVmStats, - ('<vmId>', - 'Get Statistics info on the VM' - )), + ('<vmId>', + 'Get Statistics info on the VM' + )), 'getAllVmStats': (serv.do_getAllVmStats, ('', 'Get Statistics info for all existing VMs' @@ -2093,13 +2094,13 @@ 'Validate that we can connect to a storage server' )), 'disconnectStorageServer': (serv.disconnectStorageServer, - ('<server type> <spUUID> <conList (id=...,' - 'connection=server:/export_path,' - 'portal=...,port=...,iqn=...,user=...,' - 'password=...[,initiatorName=...])>', - 'Disconnect from a storage low level ' - 'entity (server)' - )), + ('<server type> <spUUID> <conList (id=...,' + 'connection=server:/export_path,' + 'portal=...,port=...,iqn=...,user=...,' + 'password=...[,initiatorName=...])>', + 'Disconnect from a storage low level ' + 'entity (server)' + )), 'spmStart': (serv.spmStart, ('<spUUID> <prevID> <prevLVER> <recoveryMode> ' '<scsiFencing> <maxHostID> <version>', @@ -2495,23 +2496,24 @@ 'Remove a network (and parts thereof) from this vds.' )), 'editNetwork': (serv.do_editNetwork, - ('oldBridge=<bridge> newBridge=<bridge> [vlan=<number>]' - ' [bond=<bond>] nics=nic[,nic]', - 'Replace a network with a new one.' - )), + ('oldBridge=<bridge> newBridge=<bridge> ' + '[vlan=<number>] ' + '[bond=<bond>] nics=nic[,nic]', + 'Replace a network with a new one.' + )), 'setSafeNetworkConfig': (serv.do_setSafeNetworkConfig, ('', 'declare current network configuration as ' '"safe"' )), 'fenceNode': (serv.do_fenceNode, - ('<addr> <port> <agent> <user> <passwd> <action> ' - '[<secure> [<options>]] \n\t<action> is one of ' - '(status, on, off, reboot),\n\t<agent> is one of ' - '(rsa, ilo, ipmilan, drac5, etc)\n\t<secure> ' - '(true|false) may be passed to some agents', - 'send a fencing command to a remote node' - )), + ('<addr> <port> <agent> <user> <passwd> <action> ' + '[<secure> [<options>]] \n\t<action> is one of ' + '(status, on, off, reboot),\n\t<agent> is one of ' + '(rsa, ilo, ipmilan, drac5, etc)\n\t<secure> ' + '(true|false) may be passed to some agents', + 'send a fencing command to a remote node' + )), 'repoStats': (serv.repoStats, ('', 'Get the health status of the monitored domains' diff --git a/tests/functional/dhcp.py b/tests/functional/dhcp.py index f245a74..abed8c8 100644 --- a/tests/functional/dhcp.py +++ b/tests/functional/dhcp.py @@ -47,11 +47,12 @@ # -O 6 don't reply with any DNS servers either # -d do not daemonize and log to stderr # -p 0 disable all the dnsmasq dns functionality - self.proc = execCmd([_DNSMASQ_BINARY.cmd, '--dhcp-authoritative', - '-p', '0', '--dhcp-range=' + dhcpRangeFrom + ',' + - dhcpRangeTo + ',2m', '--dhcp-option=3', '-O', '6', - '-i', interface, '-I', 'lo', '-d', - '--bind-interfaces'], sync=False) + self.proc = execCmd([ + _DNSMASQ_BINARY.cmd, '--dhcp-authoritative', + '-p', '0', '--dhcp-range=' + dhcpRangeFrom + ',' + + dhcpRangeTo + ',2m', '--dhcp-option=3', '-O', '6', + '-i', interface, '-I', 'lo', '-d', + '--bind-interfaces'], sync=False) sleep(_START_CHECK_TIMEOUT) if self.proc.returncode: raise DhcpError('Failed to start dnsmasq DHCP server.' + diff --git a/tests/miscTests.py b/tests/miscTests.py index a563d02..ca00ec7 100644 --- a/tests/miscTests.py +++ b/tests/miscTests.py @@ -141,7 +141,7 @@ woman who claims she can make flowers grow just by planting seeds in soil and watering them. Until then, wait very quietly in your seats please. Goodnight.""" - # (C) BBC - A Bit of Fry and Laury + # (C) BBC - A Bit of Fry and Laury data = data.split() self.assertEquals(list(misc.tmap(dummy, data)), data) @@ -286,7 +286,7 @@ Are there lords in such a small domain? The Doctor: And where do you function? Striker: Eternity. The endless wastes of eternity. """ - # (C) BBC - Doctor Who + # (C) BBC - Doctor Who p = utils.execCmd([EXT_CAT], sync=False) self.log.info("Writing data to std out") p.stdin.write(data) @@ -300,7 +300,7 @@ Peri: When was that? The Doctor: ...I don't remember. I'm pretty sure it wasn't the future. """ - # (C) BBC - Doctor Who + # (C) BBC - Doctor Who halfPoint = len(data) / 2 p = utils.execCmd([EXT_CAT], sync=False) self.log.info("Writing data to std out") @@ -329,7 +329,7 @@ would end everything. Yes! I would do it! That power would set me up above the gods! And through the Daleks, I shall have that power! """ - # (C) BBC - Doctor Who + # (C) BBC - Doctor Who data = data * ((4096 / len(data)) * 2) self.assertTrue(data > 4096) @@ -376,7 +376,7 @@ data = '- "What\'re quantum mechanics?"' + \ '- "I don\'t know. People who repair quantums, I suppose."' - # (C) Terry Pratchet - Small Gods + # (C) Terry Pratchet - Small Gods # Make sure the length is appropriate if (len(data) % 512) == 0: @@ -469,7 +469,8 @@ "problem with the start of things." + \ "They wonder how the snowplough driver gets to work, or " + \ "how the makers of dictionaries look up the spelling of words." - # (C) Terry Pratchet - Small Gods + # (C) Terry Pratchet - Small Gods + # Makes sure we round up to a complete block size data *= 512 diff --git a/tests/outOfProcessTests.py b/tests/outOfProcessTests.py index 61a08cf..87906ec 100644 --- a/tests/outOfProcessTests.py +++ b/tests/outOfProcessTests.py @@ -32,7 +32,7 @@ data = """Censorship always defeats it own purpose, for it creates in the end the kind of society that is incapable of exercising real discretion.""" - # Henry Steele Commager + # Henry Steele Commager self.assertEquals(self.pool.echo(data), data) diff --git a/tests/persistentDictTests.py b/tests/persistentDictTests.py index c223d67..4077efb 100644 --- a/tests/persistentDictTests.py +++ b/tests/persistentDictTests.py @@ -26,7 +26,7 @@ def writelines(self, lines): raise RuntimeError("You might have a very minor case of " "serious brain damage") - # (C) Valve - Portal 2 + # (C) Valve - Portal 2 def readlines(self): data = """Edward Tattsyrup: The time has come to find him a mate! @@ -34,7 +34,7 @@ Edward Tattsyrup: [grabs an animal trap] Leave it to me, Tubbs! I...have a way with women!""" - # (C) BBC - The League of Gentlemen + # (C) BBC - The League of Gentlemen lines = data.splitlines() return dict(zip([str(i) for i in range(len(lines))], lines)) @@ -58,7 +58,7 @@ def testFailedWrite(self): data = "Scotty had a will of her own, which was always " + \ "dangerous in a woman." - # (C) Philip K. Dick - The Three Stigmata of Palmer Eldritch + # (C) Philip K. Dick - The Three Stigmata of Palmer Eldritch pd = persistentDict.PersistentDict(DummyFailWriter()) self.assertRaises(RuntimeError, pd.__setitem__, "4", data) @@ -70,7 +70,7 @@ raise SpecialError("Take the Kama Sutra. How many people " "died from the Kama Sutra, as opposed " "to the Bible? Who wins?") - # (C) Frank Zappa + # (C) Frank Zappa except RuntimeError: return diff --git a/tests/remoteFileHandlerTests.py b/tests/remoteFileHandlerTests.py index c7ed21b..e019049 100644 --- a/tests/remoteFileHandlerTests.py +++ b/tests/remoteFileHandlerTests.py @@ -38,7 +38,7 @@ You know? I break through all boundaries. If I see a boundary, I eat a boundary. And wash it down with a cup of hot steaming rules. Eh?.""" - # (C) BBC - The Mighty Boosh + # (C) BBC - The Mighty Boosh self.assertEquals(self.pool.callCrabRPCFunction(5, "echo", data), data) diff --git a/tests/utilsTests.py b/tests/utilsTests.py index b2920a2..731a8f3 100644 --- a/tests/utilsTests.py +++ b/tests/utilsTests.py @@ -49,7 +49,7 @@ raise RuntimeError("If at first you don't succeed, try, try again." "Then quit. There's no point in being a damn" "fool about it.") - # W. C. Fields + # W. C. Fields self.assertRaises(RuntimeError, utils.retry, foo, tries=(limit + 10), sleep=0, stopCallback=stopCallback) diff --git a/vdsm/dmidecodeUtil.py b/vdsm/dmidecodeUtil.py index eb8d834..54fbadb 100644 --- a/vdsm/dmidecodeUtil.py +++ b/vdsm/dmidecodeUtil.py @@ -90,10 +90,10 @@ ================== {memory} """.format( - system=formatData(d['system']), - bios=formatData(d['bios']), - cache=formatData(d['cache']), - processor=formatData(d['processor']), - chassis=formatData(d['chassis']), - memory=formatData(d['memory'])) + system=formatData(d['system']), + bios=formatData(d['bios']), + cache=formatData(d['cache']), + processor=formatData(d['processor']), + chassis=formatData(d['chassis']), + memory=formatData(d['memory'])) ) -- To view, visit http://gerrit.ovirt.org/26457 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ic24b1a871d6f4cff448d2bb39b88014a9810c9c3 Gerrit-PatchSet: 1 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Dan Kenigsberg <[email protected]> _______________________________________________ vdsm-patches mailing list [email protected] https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches
