summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--source4/scripting/python/samba/netcmd/domain.py19
1 files changed, 13 insertions, 6 deletions
diff --git a/source4/scripting/python/samba/netcmd/domain.py b/source4/scripting/python/samba/netcmd/domain.py
index 664db18f5b..1f2c7de957 100644
--- a/source4/scripting/python/samba/netcmd/domain.py
+++ b/source4/scripting/python/samba/netcmd/domain.py
@@ -93,6 +93,7 @@ class cmd_domain_export_keytab(Command):
net = Net(None, lp)
net.export_keytab(keytab=keytab, principal=principal)
+
class cmd_domain_info(Command):
"""Print basic info about a domain and the DC passed as parameter"""
@@ -101,6 +102,12 @@ class cmd_domain_info(Command):
takes_options = [
]
+ takes_optiongroups = {
+ "sambaopts": options.SambaOptions,
+ "credopts": options.CredentialsOptions,
+ "versionopts": options.VersionOptions,
+ }
+
takes_args = ["address"]
def run(self, address, credopts=None, sambaopts=None, versionopts=None):
@@ -118,7 +125,6 @@ class cmd_domain_info(Command):
raise CommandError("Invalid IP address '" + address + "'!")
-
class cmd_domain_join(Command):
"""Joins domain as either member or backup domain controller"""
@@ -202,6 +208,11 @@ class cmd_domain_demote(Command):
Option("--targetdir", help="where provision is stored", type=str),
]
+ takes_optiongroups = {
+ "sambaopts": options.SambaOptions,
+ "credopts": options.CredentialsOptions,
+ "versionopts": options.VersionOptions,
+ }
def run(self, sambaopts=None, credopts=None,
versionopts=None, server=None, targetdir=None):
@@ -244,9 +255,6 @@ class cmd_domain_demote(Command):
print "Using %s as partner server for the demotion" % server
(drsuapiBind, drsuapi_handle, supportedExtensions) = drsuapi_connect(server, lp, creds)
-
-
-
print "Desactivating inbound replication"
nmsg = ldb.Message()
@@ -422,7 +430,6 @@ class cmd_domain_demote(Command):
self.outf.write("Demote successfull\n")
-
class cmd_domain_level(Command):
"""Raises domain and forest function levels"""
@@ -837,7 +844,7 @@ class cmd_domain_samba3upgrade(Command):
if not os.path.exists(smbconf):
raise CommandError("File %s does not exist" % smbconf)
-
+
if testparm and not os.path.exists(testparm):
raise CommandError("Testparm utility %s does not exist" % testparm)