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

nsoffer at redhat.com nsoffer at redhat.com
Tue Oct 27 22:50:53 UTC 2015


Nir Soffer has posted comments on this change.

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


Patch Set 2:

(1 comment)

https://gerrit.ovirt.org/#/c/47738/2/tests/fake-virt-v2v.py
File tests/fake-virt-v2v.py:

Line 26: parser.add_option('--os', dest='outputStorage',
Line 27:                   help='Output directory for the images')
Line 28: parser.add_option('--machine-readable', dest='machineReadable',
Line 29:                   help='Set the terminal output to be readable')
Line 30: 
> I don't think optparse support this non-standard argument style. Maybe argp
Turns out that argparse supports this style:
 >>> import argparse
 >>> p = argparse.ArgumentParser()
 >>> p.add_argument("-ic")
 _StoreAction(option_strings=['-ic'], dest='ic', nargs=None, const=None,  default=None, type=None, choices=None, help=None, metavar=None)
 >>> p.parse_args(["-ic", "value"])
 Namespace(ic='value')
Line 31: (opt, args) = parser.parse_args()
Line 32: 
Line 33: 
Line 34: def write_output(msg):


-- 
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: 2
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