Alon Bar-Lev has posted comments on this change.

Change subject: ovirt-live: migrate ovirt live plugin to otopi
......................................................................


Patch Set 3: (9 inline comments)

....................................................
File 
fedora/oVirtLiveFiles/root/usr/share/ovirt-engine/setup/plugins/ovirt-engine-setup/olive/core.py
Line 23: import os
Line 24: import shutil
Line 25: import glob
Line 26: import gettext
Line 27: _ = lambda m: gettext.dgettext(message=m, domain='ovirt-engine-setup')
Kinda taken from[1]

But if this is preferred we need to modify it at otopi, ovirt-host-deploy, 
ovirt-engine single commit cleanup.

[1] http://docs.python.org/2/library/gettext.html
Line 28: 
Line 29: 
Line 30: from otopi import util
Line 31: from otopi import plugin


Line 143:                              ISO_DOMAIN_SD_UUID],
Line 144:             "images", "11111111-1111-1111-1111-111111111111")
Line 145:         for filename in fileList:
Line 146:             shutil.move(filename, targetPath)
Line 147:             filename = os.path.join(targetPath, filename)
Almost... you also need: util.getuid() and util.getgid()
Line 148:             os.chown(
Line 149:                 filename, self.environment[osetupcons.
Line 150:                                            
ConfigEnv.DEFAULT_SYSTEM_USER_VDSM],
Line 151:                 
self.environment[osetupcons.ConfigEnv.DEFAULT_SYSTEM_GROUP_KVM]


Line 146:             shutil.move(filename, targetPath)
Line 147:             filename = os.path.join(targetPath, filename)
Line 148:             os.chown(
Line 149:                 filename, self.environment[osetupcons.
Line 150:                                            
ConfigEnv.DEFAULT_SYSTEM_USER_VDSM],
alignment please
Line 151:                 
self.environment[osetupcons.ConfigEnv.DEFAULT_SYSTEM_GROUP_KVM]
Line 152:             )
Line 153: 
Line 154:     @plugin.event(


Line 165: 
Line 166:         engine_api = self._ovirtsdk_api.API(
Line 167:             url='https://{fqdn}:{port}/api'.format(
Line 168:                 fqdn=self.environment[osetupcons.ConfigEnv.FQDN],
Line 169:                 port=self.environment[osetupcons.ConfigEnv.
alignment please:

 port=xxxx[
     dddd
 ],
Line 170:                                       DEFAULT_NETWORK_HTTPS_PORT],
Line 171:             ),
Line 172:             username='{user}@{domain}'.format(
Line 173:                 user=osetupcons.Const.USER_ADMIN,


Line 184:         # Defins OS param for the boot option
Line 185:         os = params.OperatingSystem(
Line 186:             type_='unassigned',
Line 187:             boot=[params.Boot(dev='cdrom'),
Line 188:                   params.Boot(dev='hd')])
same
Line 189: 
Line 190:         # Create VM
Line 191:         engine_api.vms.add(
Line 192:             params.VM(name='local_vm',


Line 192:             params.VM(name='local_vm',
Line 193:                       memory='1024MB',
Line 194:                       os=os, 
cluster=engine_api.clusters.get('local_cluster'),
Line 195:                       template=engine_api.templates.get('Blank')))
Line 196: 
again, you can create same statement... but please first align properly.
Line 197:         # Create NIC
Line 198:         engine_api.vms.get(
Line 199:             'local_vm').nics.add(
Line 200:             params.NIC(name='eth0',


....................................................
File 
fedora/oVirtLiveFiles/root/usr/share/ovirt-engine/setup/plugins/ovirt-engine-setup/olive/oliveconst.py
Line 1: #!/bin/python
please drop the shbang

BTW: it is wrong, as python is at /usr/bin...

please move this olivecons into ovirt_engine_setup at pythonlib near 
constants.py
Line 2: 
Line 3: #OVIRT LIVE
Line 4: 
Line 5: 


Line 1: #!/bin/python
Line 2: 
Line 3: #OVIRT LIVE
please remove comment
Line 4: 
Line 5: 
Line 6: @util.export
Line 7: class Stages(object):


Line 48: @util.export
Line 49: @util.codegen
Line 50: class OVIRTLIVEConst(object):
Line 51:     MINIMUM_SPACE_STORAGEDOMAIN_MB = 10240
Line 52: 
two spaces


-- 
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: 3
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: Ofer Schreiber <oschr...@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

Reply via email to