David Caro has posted comments on this change. Change subject: ovirt-live: migrate ovirt live plugin to otopi ......................................................................
Patch Set 2: (4 inline comments) .................................................... File fedora/oVirtLiveFiles/root/usr/share/ovirt-engine/setup/plugins/ovirt-engine-setup/olive/core.py Line 1: # No shebang? Or encoding? Line 2: # ovirt-engine-setup -- ovirt engine setup Line 3: # Copyright (C) 2013 Red Hat, Inc. Line 4: # Line 5: # Licensed under the Apache License, Version 2.0 (the "License"); Line 29: Line 30: from otopi import util Line 31: from otopi import plugin Line 32: from otopi import filetransaction Line 33: from otopi import constants as otopicons You can use something like this instead: from otopi import ( module1, module2 as m2, ) Line 34: Line 35: import oliveconst Line 36: Line 37: from ovirt_engine_setup import constants as osetupcons Line 111: type='data') Line 112: Line 113: engine_api.storagedomains.add(sdParams) Line 114: Line 115: engine_api.datacenters.get(self.environment[oliveconst.ConfigEnv.DEFAULT_LOCAL_DATA_CENTER]).storagedomains.add(engine_api.self.environment[oliveconst.ConfigEnv.DEFAULT_ISO_NAME]) You can also use intermediate variables to improve readibility Line 116: Line 117: @plugin.event( Line 118: stage=plugin.Stages.CLOSEUP, Line 119: condition=lambda self: self._enabled, Line 121: before=[ Line 122: oliveconst.Stages.OL_CREATE_VM, Line 123: ], Line 124: ) Line 125: extra line Line 126: def _copyiso(self): Line 127: self.logger.debug('Copying Iso Files') Line 128: isoPattern = "/home/oVirtuser/oVirtLiveFiles/iso/*.iso" Line 129: fileList = glob.glob(isoPattern) -- To view, visit http://gerrit.ovirt.org/17518 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I703f64dc1183a6fe176d9d0352f93de381d906bb Gerrit-PatchSet: 2 Gerrit-Project: ovirt-live Gerrit-Branch: master Gerrit-Owner: Ohad Basan <oba...@redhat.com> Gerrit-Reviewer: Alex Lourie <alou...@redhat.com> Gerrit-Reviewer: Alon Bar-Lev <alo...@redhat.com> Gerrit-Reviewer: David Caro <dcaro...@redhat.com> Gerrit-Reviewer: Eyal Edri <ee...@redhat.com> Gerrit-Reviewer: Itamar Heim <ih...@redhat.com> Gerrit-Reviewer: Moran Goldboim <mgold...@redhat.com> Gerrit-Reviewer: Ohad Basan <oba...@redhat.com> Gerrit-Reviewer: Sandro Bonazzola <sbona...@redhat.com> Gerrit-Reviewer: Yedidyah Bar David <d...@redhat.com> _______________________________________________ Engine-patches mailing list Engine-patches@ovirt.org http://lists.ovirt.org/mailman/listinfo/engine-patches