Eduardo has posted comments on this change. Change subject: Refactor StoragePool.getPoolParams() ......................................................................
Patch Set 2: (3 comments) .................................................... Commit Message Line 3: AuthorDate: 2013-09-13 12:40:03 +0300 Line 4: Commit: Eduardo Warszawski <ewars...@redhat.com> Line 5: CommitDate: 2013-09-15 15:05:25 +0300 Line 6: Line 7: Refactor StoragePool.getPoolParams() Because is ugly, error prone and is needed for the HE project. Line 8: Line 9: Change-Id: Ibbeaaaf67a39f3ca8b27252fc631a91f266d1adc .................................................... File vdsm/storage/hsm.py Line 379: # exist under pool link as well (for hsm tasks) Line 380: self.taskMng.loadDumpedTasks(self.tasksDir) Line 381: self.taskMng.recoverDumpedTasks() Line 382: Line 383: poolDirs = os.listdir(self._poolsTmpDir) line ~113 _poolsTmpDir = config.get('irs', 'pools_data_dir') It is a class attribute Line 384: for spUUID in poolDirs: Line 385: poolPath = os.path.join(self.storage_repository, spUUID) Line 386: poolParamFile = os.path.join(self._poolsTmpDir, spUUID) Line 387: if os.path.exists(poolPath): Line 400: self.log.error("Connection to SP %s failed", Line 401: spUUID, exc_info=True) Line 402: else: Line 403: # TODO Once we support simultaneous connection to Line 404: # multiple pools, remove following line (break) You can try: _connectStoragePool(), but break can not raise. Therefore it is separated. The whole loop is redundant since support for multiple pools will not be added. Line 405: break Line 406: Line 407: storageRefreshThread = threading.Thread(target=storageRefresh, Line 408: name="storageRefresh") -- To view, visit http://gerrit.ovirt.org/19232 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ibbeaaaf67a39f3ca8b27252fc631a91f266d1adc Gerrit-PatchSet: 2 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Eduardo <ewars...@redhat.com> Gerrit-Reviewer: Ayal Baron <aba...@redhat.com> Gerrit-Reviewer: Dan Kenigsberg <dan...@redhat.com> Gerrit-Reviewer: Eduardo <ewars...@redhat.com> Gerrit-Reviewer: Elad Ben Aharon <eladba1...@gmail.com> Gerrit-Reviewer: Gadi Ickowicz <gicko...@redhat.com> Gerrit-Reviewer: Meital Bourvine <mbour...@redhat.com> Gerrit-Reviewer: Yeela Kaplan <ykap...@redhat.com> Gerrit-Reviewer: oVirt Jenkins CI Server Gerrit-HasComments: Yes _______________________________________________ vdsm-patches mailing list vdsm-patches@lists.fedorahosted.org https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches