Dima Kuznetsov has posted comments on this change.
Change subject: vdsm-tool: Change upgrade mechanism
......................................................................
Patch Set 3:
(3 comments)
http://gerrit.ovirt.org/#/c/27193/3//COMMIT_MSG
Commit Message:
Line 10: to only run once. It has flags to override, but being a function
Line 11: decorator, it did not have any direct access to command line arguments
Line 12: and did access via sys.argv[2:].
Line 13:
Line 14: There is a patch that will be sent that will add flags to vdsm-tool and
Done
Line 15: will break upgrade and its argument parsing. I'm proposing to change the
Line 16: upgrade from being a decorated function, to a function that operates on
Line 17: an upgrade object (interface documented in apply_upgrade docstring) and
Line 18: the command line arguments.
Line 18: the command line arguments.
Line 19:
Line 20: This also allows to have a single argument parser for both
Line 21: general upgrade flags and specific per-upgrade flags (no current
Line 22: upgrades define flags but we might want this in future).
worth to mention the extendArgument func that needs to be declared
Added a mention.
It doesn't need to be declared, but can, as the message states, the full documentation
of the interface is available at the docstring.
Line 23:
Line 24: Change-Id: I6e1d28570dedfeff9fe60624b1db72d8cadf136a
http://gerrit.ovirt.org/#/c/27193/3/tests/toolTests.py
File tests/toolTests.py:
Line 195: def run(self, ns, args):
Line 196: self.lst[0] += 1
Line 197: self.ns = ns
Line 198: self.args = args
Line 199: return 0
do you test where the output goes? ^
please explain
Line 200:
Line 201: class BadUpgraduratorTM(object):
Line 202: name = 'bad'
Line 203:
--
To view, visit
http://gerrit.ovirt.org/27193
To unsubscribe, visit
http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: I6e1d28570dedfeff9fe60624b1db72d8cadf136a
Gerrit-PatchSet: 3
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Dima Kuznetsov <dkuznets(a)redhat.com>
Gerrit-Reviewer: Antoni Segura Puimedon <asegurap(a)redhat.com>
Gerrit-Reviewer: Assaf Muller <amuller(a)redhat.com>
Gerrit-Reviewer: Dan Kenigsberg <danken(a)redhat.com>
Gerrit-Reviewer: Dima Kuznetsov <dkuznets(a)redhat.com>
Gerrit-Reviewer: Saggi Mizrahi <smizrahi(a)redhat.com>
Gerrit-Reviewer: Yaniv Bronhaim <ybronhei(a)redhat.com>
Gerrit-Reviewer: automation(a)ovirt.org
Gerrit-Reviewer: oVirt Jenkins CI Server
Gerrit-HasComments: Yes