mirror of
https://github.com/samba-team/samba.git
synced 2025-07-14 12:59:07 +03:00
samba-tool: moved takes_optiongroups definition to Command base class
The option groups should be defined at the Command base class level as they are in common across all samba-tool commands. Major move advantages: 1. more OOP approach 2. enforcing consistency across commands 3. avoiding the need of declaring for every new command Signed-off-by: Andrew Tridgell <tridge@samba.org>
This commit is contained in:
committed by
Andrew Tridgell
parent
1dfcb019d2
commit
f6fa868489
@ -3,6 +3,7 @@
|
||||
# Vampire
|
||||
#
|
||||
# Copyright Jelmer Vernooij 2010 <jelmer@samba.org>
|
||||
# Copyright Giampaolo Lauria 2011 <lauria2@yahoo.com>
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
@ -33,12 +34,6 @@ class cmd_vampire(Command):
|
||||
"""Join and synchronise a remote AD domain to the local server [server connection needed]"""
|
||||
synopsis = "%prog vampire [options] <domain>"
|
||||
|
||||
takes_optiongroups = {
|
||||
"sambaopts": options.SambaOptions,
|
||||
"credopts": options.CredentialsOptions,
|
||||
"versionopts": options.VersionOptions,
|
||||
}
|
||||
|
||||
takes_options = [
|
||||
Option("--target-dir", help="Target directory.", type=str),
|
||||
Option("--force", help="force run", action='store_true', default=False),
|
||||
|
Reference in New Issue
Block a user