samba-tool: Add samba-tool processes subcommand
[obnox/samba/samba-obnox.git] / source4 / scripting / python / samba / netcmd / main.py
index 61bbcf16e2aeea3b3f8c309016471145572d1564..5f78823588084bf5a331f268add36b4c9f400a69 100644 (file)
@@ -1,5 +1,3 @@
-#!/usr/bin/env python
-
 # Unix SMB/CIFS implementation.
 # Copyright (C) Jelmer Vernooij <jelmer@samba.org> 2011
 #
@@ -19,6 +17,8 @@
 
 """The main samba-tool command implementation."""
 
+from samba import getopt as options
+
 from samba.netcmd import SuperCommand
 from samba.netcmd.dbcheck import cmd_dbcheck
 from samba.netcmd.delegation import cmd_delegation
@@ -32,16 +32,22 @@ from samba.netcmd.group import cmd_group
 from samba.netcmd.ldapcmp import cmd_ldapcmp
 from samba.netcmd.ntacl import cmd_ntacl
 from samba.netcmd.rodc import cmd_rodc
+from samba.netcmd.sites import cmd_sites
 from samba.netcmd.spn import cmd_spn
 from samba.netcmd.testparm import cmd_testparm
 from samba.netcmd.time import cmd_time
 from samba.netcmd.user import cmd_user
 from samba.netcmd.vampire import cmd_vampire
+from samba.netcmd.processes import cmd_processes
 
 
 class cmd_sambatool(SuperCommand):
     """Main samba administration tool."""
 
+    takes_optiongroups = {
+        "versionopts": options.VersionOptions,
+        }
+
     subcommands = {}
     subcommands["dbcheck"] =  cmd_dbcheck()
     subcommands["delegation"] = cmd_delegation()
@@ -55,8 +61,10 @@ class cmd_sambatool(SuperCommand):
     subcommands["ldapcmp"] = cmd_ldapcmp()
     subcommands["ntacl"] = cmd_ntacl()
     subcommands["rodc"] = cmd_rodc()
+    subcommands["sites"] = cmd_sites()
     subcommands["spn"] = cmd_spn()
     subcommands["testparm"] =  cmd_testparm()
     subcommands["time"] = cmd_time()
     subcommands["user"] = cmd_user()
     subcommands["vampire"] = cmd_vampire()
+    subcommands["processes"] = cmd_processes()