summaryrefslogtreecommitdiff
path: root/source4/scripting
diff options
context:
space:
mode:
authorAmitay Isaacs <amitay@gmail.com>2012-02-07 17:30:22 +1100
committerAmitay Isaacs <amitay@samba.org>2012-02-08 02:27:28 +0100
commitf8ef24083193ee2dade7884178f583ecb204684c (patch)
treef0faa95247f37e8d459e18b0c28fc3626d51ec73 /source4/scripting
parent8613bc7ea1bbeec7c5b2c511fe7e601eea10c41e (diff)
downloadsamba-f8ef24083193ee2dade7884178f583ecb204684c.tar.gz
samba-f8ef24083193ee2dade7884178f583ecb204684c.tar.bz2
samba-f8ef24083193ee2dade7884178f583ecb204684c.zip
samba-tool sites: Re-add support for option groups
Autobuild-User: Amitay Isaacs <amitay@samba.org> Autobuild-Date: Wed Feb 8 02:27:28 CET 2012 on sn-devel-104
Diffstat (limited to 'source4/scripting')
-rw-r--r--source4/scripting/python/samba/netcmd/sites.py13
1 files changed, 13 insertions, 0 deletions
diff --git a/source4/scripting/python/samba/netcmd/sites.py b/source4/scripting/python/samba/netcmd/sites.py
index f5223db5f8..5cbc09c105 100644
--- a/source4/scripting/python/samba/netcmd/sites.py
+++ b/source4/scripting/python/samba/netcmd/sites.py
@@ -24,6 +24,7 @@
import os
from samba import sites
from samba.samdb import SamDB
+import samba.getopt as options
from samba.auth import system_session
from samba.netcmd import (
Command,
@@ -39,6 +40,12 @@ class cmd_sites_create(Command):
takes_args = ["sitename"]
+ takes_optiongroups = {
+ "sambaopts": options.SambaOptions,
+ "versionopts": options.VersionOptions,
+ "credopts": options.CredentialsOptions,
+ }
+
def run(self, sitename, sambaopts=None, credopts=None, versionopts=None):
lp = sambaopts.get_loadparm()
creds = credopts.get_credentials(lp, fallback_machine=True)
@@ -66,6 +73,12 @@ class cmd_sites_delete(Command):
takes_args = ["sitename"]
+ takes_optiongroups = {
+ "sambaopts": options.SambaOptions,
+ "versionopts": options.VersionOptions,
+ "credopts": options.CredentialsOptions,
+ }
+
def run(self, sitename, sambaopts=None, credopts=None, versionopts=None):
lp = sambaopts.get_loadparm()
creds = credopts.get_credentials(lp, fallback_machine=True)