Change in vdsm[master]: vdsm-tool: Add command name to args for command

danken at redhat.com danken at redhat.com
Wed May 21 10:43:51 UTC 2014


Dan Kenigsberg has submitted this change and it was merged.

Change subject: vdsm-tool: Add command name to args for command
......................................................................


vdsm-tool: Add command name to args for command

Each command now receives its own copy of 'sys.argv'-like argument list,
starting with command name and all its arguments.

Added exception each command can throw in case wrong params were passed.
Exception handler for this exception prints the doc string for the
command.

Some command functions were split because they're called both from vdsm
code and vdsm-tool code, so the vdsm-tool expose goes to a wrapper
function first and ensures the parameters are there, then passes to the
actual function.

Change-Id: I831bde947f451805e086e25f1c0b9943b17e7bd8
Signed-off-by: Dima Kuznetsov <dkuznets at redhat.com>
Reviewed-on: http://gerrit.ovirt.org/26575
Reviewed-by: Antoni Segura Puimedon <asegurap at redhat.com>
Reviewed-by: Yaniv Bronhaim <ybronhei at redhat.com>
Reviewed-by: Dan Kenigsberg <danken at redhat.com>
---
M lib/vdsm/tool/__init__.py
M lib/vdsm/tool/configurator.py
M lib/vdsm/tool/dummybr.py
M lib/vdsm/tool/load_needed_modules.py.in
M lib/vdsm/tool/nwfilter.py
M lib/vdsm/tool/passwd.py
M lib/vdsm/tool/restore_nets.py
M lib/vdsm/tool/seboolsetup.py
M lib/vdsm/tool/service.py
M lib/vdsm/tool/transient.py
M lib/vdsm/tool/unified_persistence.py
M lib/vdsm/tool/upgrade_300_networks.py
M lib/vdsm/tool/validate_ovirt_certs.py.in
M lib/vdsm/tool/vdsm-id.py
M vdsm-tool/vdsm-tool
15 files changed, 201 insertions(+), 53 deletions(-)

Approvals:
  Yaniv Bronhaim: Looks good to me, but someone else must approve
  Antoni Segura Puimedon: Looks good to me, but someone else must approve
  Dima Kuznetsov: Verified
  Dan Kenigsberg: Looks good to me, approved



-- 
To view, visit http://gerrit.ovirt.org/26575
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I831bde947f451805e086e25f1c0b9943b17e7bd8
Gerrit-PatchSet: 8
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Dima Kuznetsov <dkuznets at redhat.com>
Gerrit-Reviewer: Antoni Segura Puimedon <asegurap at redhat.com>
Gerrit-Reviewer: Dan Kenigsberg <danken at redhat.com>
Gerrit-Reviewer: Dima Kuznetsov <dkuznets at redhat.com>
Gerrit-Reviewer: Douglas Schilling Landgraf <dougsland at redhat.com>
Gerrit-Reviewer: Nir Soffer <nsoffer at redhat.com>
Gerrit-Reviewer: Yaniv Bronhaim <ybronhei at redhat.com>
Gerrit-Reviewer: Yaniv Eylon <yaniv.eylon at gmail.com>
Gerrit-Reviewer: automation at ovirt.org
Gerrit-Reviewer: mooli tayer <mtayer at redhat.com>
Gerrit-Reviewer: oVirt Jenkins CI Server


More information about the vdsm-patches mailing list