Change in vdsm[master]: v2v: Import VM from OVA file
shavivi at redhat.com
shavivi at redhat.com
Mon Aug 3 13:22:53 UTC 2015
Shahar Havivi has posted comments on this change.
Change subject: v2v: Import VM from OVA file
......................................................................
Patch Set 4:
(4 comments)
https://gerrit.ovirt.org/#/c/43367/4/vdsm/rpc/vdsmapi-schema.json
File vdsm/rpc/vdsmapi-schema.json:
Line 3967: 'data': {'ova_path': 'str'},
Line 3968: 'returns': ['ExternalVmInfo']}
Line 3969:
Line 3970: ##
Line 3971: # @Host.convertOva:
> same comment as https://gerrit.ovirt.org/#/c/43271/4/vdsm/rpc/vdsmapi-schem
Done
Line 3972: #
Line 3973: # Convert VM from external file (OVA) to data domain
Line 3974: #
Line 3975: # @ova_path: actual path to the ova file
https://gerrit.ovirt.org/#/c/43367/4/vdsm/v2v.py
File vdsm/v2v.py:
Line 171: def convert_ova(ova_path, vminfo, job_id, irs):
Line 172: job = ImportVm.from_ova(ova_path, vminfo, job_id, irs)
Line 173: job.start()
Line 174: _add_job(job_id, job)
Line 175: return {'status': doneCode}
> what about using
Done
Line 176:
Line 177:
Line 178: def get_ova_info(ova_path):
Line 179: ns = {'ovf': _OVF_NS, 'rasd': _RASD_NS}
Line 293: @contextmanager
Line 294: def password_file(job_id, file_name, password):
Line 295: if file_name is None:
Line 296: yield
Line 297: return
> return is unneeded here.
I will do something like that
Line 298: fd = os.open(file_name, os.O_WRONLY | os.O_CREAT, 0o600)
Line 299: try:
Line 300: os.write(fd, password.value)
Line 301: finally:
Line 479: get_storage_domain_path(self._prepared_volumes[0]['path']),
Line 480: self._vminfo['vmName']])
Line 481: return cmd
Line 482:
Line 483: def _from_ova_command(self):
> maybe?
I want to reserve the _command and the name looks good to me
Line 484: cmd = [_VIRT_V2V.cmd,
Line 485: '-i', 'ova', self._ova_path,
Line 486: '-o', 'vdsm',
Line 487: '-of', self._get_disk_format(),
--
To view, visit https://gerrit.ovirt.org/43367
To unsubscribe, visit https://gerrit.ovirt.org/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: I0e440748ecc503f4d61e8f4f61bb0c7387589354
Gerrit-PatchSet: 4
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Shahar Havivi <shavivi at redhat.com>
Gerrit-Reviewer: Arik Hadas <ahadas at redhat.com>
Gerrit-Reviewer: Dan Kenigsberg <danken at redhat.com>
Gerrit-Reviewer: Francesco Romani <fromani at redhat.com>
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Michal Skrivanek <mskrivan at redhat.com>
Gerrit-Reviewer: Shahar Havivi <shavivi at redhat.com>
Gerrit-Reviewer: automation at ovirt.org
Gerrit-HasComments: Yes
More information about the vdsm-patches
mailing list