summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--source4/scripting/python/samba/netcmd/vampire.py6
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)