Change in vdsm[master]: cleanup: drop several unused local variables
asegurap at redhat.com
asegurap at redhat.com
Fri Oct 25 10:39:13 UTC 2013
Antoni Segura Puimedon has posted comments on this change.
Change subject: cleanup: drop several unused local variables
......................................................................
Patch Set 1:
(8 comments)
Thanks a lot for the fast review Dan!
....................................................
File tests/functional/networkTests.py
Line 376: NET_VLANS = [(NETWORK_NAME + str(index), str(index))
Line 377: for index in range(VLAN_COUNT)]
Line 378: with dummyIf(1) as nics:
Line 379: firstVlan, firstVlanId = NET_VLANS[0]
Line 380: _ = self.vdsm_net.addNetwork(firstVlan, vlan=firstVlanId,
Done
Line 381: bond=BONDING_NAME,
Line 382: nics=nics, opts=opts)
Line 383: with nonChangingOperstate(BONDING_NAME):
Line 384: for netVlan, vlanId in NET_VLANS[1:]:
....................................................
File tests/functional/virtTests.py
Line 82:
Line 83: def _genInitramfs():
Line 84: fd, path = tempfile.mkstemp()
Line 85: cmd = [_mkinitrd.cmd, "-f", path, _kernelVer]
Line 86: _ = execCmd(cmd, sudo=False)
Done
Line 87: os.chmod(path, 0o644)
Line 88: return path
Line 89:
Line 90:
....................................................
File tests/miscTests.py
Line 431: dstFd, dstPath = tempfile.mkstemp()
Line 432: os.chmod(dstPath, 0o666)
Line 433:
Line 434: #Copy
Line 435: _ = misc.ddWatchCopy(srcPath, dstPath, None, len(data))
Done
Line 436:
Line 437: #Get copied data
Line 438: readData = open(dstPath).read()
Line 439:
....................................................
File tests/vmTests.py
Line 389: # Negative flow, unsupported value
Line 390: driveInput.update({'shared': 'UNKNOWN-VALUE'})
Line 391:
Line 392: with self.assertRaises(ValueError):
Line 393: _ = vm.Drive({}, self.log, **driveInput)
Done
Line 394:
Line 395: def testDriveXML(self):
Line 396: SERIAL = '54-a672-23e5b495a9ea'
Line 397: devConfs = [
....................................................
File vdsm/storage/hsm.py
Line 1860:
Line 1861: self.log.info("spUUID=%s master=%s", spUUID, masterDom)
Line 1862:
Line 1863: try:
Line 1864: _ = self.getPool(spUUID)
Done
Line 1865: except se.StoragePoolUnknown:
Line 1866: pool = sp.StoragePool(spUUID, self.domainMonitor, self.taskMng)
Line 1867: else:
Line 1868: raise se.StoragePoolConnected(spUUID)
....................................................
File vdsm/storage/iscsi.py
Line 428: else:
Line 429: time.sleep(1)
Line 430: else:
Line 431: log.warning("Still waiting for scsi scan of hbas: %s",
Line 432: tuple(hba for _ in processes))
Done
Line 433:
Line 434:
Line 435: def devIsiSCSI(dev):
Line 436: hostdir = os.path.realpath(os.path.join("/sys/block", dev,
....................................................
File vdsm/storage/resourceManager.py
Line 925: req = self.requests[fullName]
Line 926: return req.wait(timeout)
Line 927:
Line 928: # req not found - check that it is not granted
Line 929: for _ in self.resources:
I have to say that in these modules I found more weird stuff that I didn't dare touch. I'll move them to a separate patch.
Line 930: return True
Line 931:
Line 932: # Note that there is a risk of another thread that is racing with us
Line 933: # and releases this resource - but this should be synced above us
....................................................
File vdsm/vm.py
Line 3057: try:
Line 3058: self._dom.attachDevice(nicXml)
Line 3059: except libvirt.libvirtError as e:
Line 3060: self.log.error("Hotplug failed", exc_info=True)
Line 3061: _ = hooks.after_nic_hotplug_fail(
Done
Line 3062: nicXml, self.conf, params=customProps)
Line 3063: if e.get_error_code() == libvirt.VIR_ERR_NO_DOMAIN:
Line 3064: return errCode['noVM']
Line 3065: return {'status': {'code': errCode['hotplugNic']['status']['code'],
--
To view, visit http://gerrit.ovirt.org/20535
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: Ib81c292f900154819e8852c21ae389c323034999
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Antoni Segura Puimedon <asegurap at redhat.com>
Gerrit-Reviewer: Antoni Segura Puimedon <asegurap at redhat.com>
Gerrit-Reviewer: Dan Kenigsberg <danken at redhat.com>
Gerrit-Reviewer: Yaniv Bronhaim <ybronhei at redhat.com>
Gerrit-Reviewer: oVirt Jenkins CI Server
Gerrit-HasComments: Yes
More information about the vdsm-patches
mailing list