Change in vdsm[master]: v2v: add fake virt-v2v process for testing without virt-v2v

fromani at redhat.com fromani at redhat.com
Mon Oct 26 14:44:16 UTC 2015


Francesco Romani has posted comments on this change.

Change subject: v2v: add fake virt-v2v process for testing without virt-v2v
......................................................................


Patch Set 1: Code-Review-1

(3 comments)

very nice first step, but we should have much less invasive changes in our v2v code. -1 for visibility.

https://gerrit.ovirt.org/#/c/47738/1/tests/Makefile.am
File tests/Makefile.am:

Line 195: dist_vdsmtests_PYTHON = \
Line 196: 	$(test_modules) \
Line 197: 	apiData.py \
Line 198: 	hookValidation.py \
Line 199: 	fakeVirtV2V.py \
I'd use something like fake-virt-v2v, to closely mimic the original virt-v2v. But it is mostly appearance.
Line 200: 	monkeypatch.py \
Line 201: 	nettestlib.py \
Line 202: 	storagefakelib.py \
Line 203: 	storagetestlib.py \


https://gerrit.ovirt.org/#/c/47738/1/tests/fakeVirtV2V.py
File tests/fakeVirtV2V.py:

Line 3: import sys
Line 4: 
Line 5: if len(sys.argv) != 2:
Line 6:     print ('usage: %s <target dir>\n' % sys.argv[0])
Line 7:     sys.exit(1)
is this the same option/format the real virt-v2v expects?
Line 8: 
Line 9: 
Line 10: target_dir = sys.argv[1]
Line 11: 


https://gerrit.ovirt.org/#/c/47738/1/tests/v2vTests.py
File tests/v2vTests.py:

Line 243:         return 0
Line 244: 
Line 245:     def create_command(self):
Line 246:         return [os.path.join(os.path.abspath('.'), 'fakeVirtV2V.py'),
Line 247:                 '/tmp/images']
we should just override the path of the command to spawn.
I'd like to see the very same command line of the real virt-v2v being used.
Line 248: 
Line 249:     def execution_environments(self):
Line 250:         return {}
Line 251: 


-- 
To view, visit https://gerrit.ovirt.org/47738
To unsubscribe, visit https://gerrit.ovirt.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: If062a1136921af19a2ffcb4d147611bbc9cf5464
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Shahar Havivi <shavivi at redhat.com>
Gerrit-Reviewer: Francesco Romani <fromani at redhat.com>
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Nir Soffer <nsoffer 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