diff options
author | Andrew Tridgell <tridge@samba.org> | 2010-11-05 14:16:49 +1100 |
---|---|---|
committer | Andrew Tridgell <tridge@samba.org> | 2010-11-06 14:36:26 +1100 |
commit | 724599de635608f13e0f2d500a59b8830ceede84 (patch) | |
tree | 4a484c60f9605791bd0fcb5ed6b169093669578a /source4/scripting/python | |
parent | 097be4b10175c3b2f039f7406aac1d21bb7824b3 (diff) | |
download | samba-724599de635608f13e0f2d500a59b8830ceede84.tar.gz samba-724599de635608f13e0f2d500a59b8830ceede84.tar.bz2 samba-724599de635608f13e0f2d500a59b8830ceede84.zip |
samba-tool: deprecate samba-tool vampire command
Diffstat (limited to 'source4/scripting/python')
-rw-r--r-- | source4/scripting/python/samba/netcmd/vampire.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/source4/scripting/python/samba/netcmd/vampire.py b/source4/scripting/python/samba/netcmd/vampire.py index a1cd4fa35b..509aa8aacd 100644 --- a/source4/scripting/python/samba/netcmd/vampire.py +++ b/source4/scripting/python/samba/netcmd/vampire.py @@ -26,6 +26,7 @@ from samba.netcmd import ( Command, Option, SuperCommand, + CommandError ) class cmd_vampire(Command): @@ -40,11 +41,14 @@ class cmd_vampire(Command): takes_options = [ Option("--target-dir", help="Target directory.", type=str), + Option("--force", help="force run", action='store_true', default=False), ] takes_args = ["domain"] - def run(self, domain, target_dir=None, credopts=None, sambaopts=None, versionopts=None): + def run(self, domain, target_dir=None, credopts=None, sambaopts=None, versionopts=None, force=False): + if not force: + raise CommandError("samba-tool vampire is deprecated, please use samba-tool join. Use --force to override") lp = sambaopts.get_loadparm() creds = credopts.get_credentials(lp) net = Net(creds, lp, server=credopts.ipaddress) |