5ffeef0ec26ec0b6fa0565a4bfd7ad4ffdb26fa7
[obnox/samba/samba-obnox.git] / source4 / scripting / python / samba / netcmd / main.py
1 # Unix SMB/CIFS implementation.
2 # Copyright (C) Jelmer Vernooij <jelmer@samba.org> 2011
3 #
4 # This program is free software; you can redistribute it and/or modify
5 # it under the terms of the GNU General Public License as published by
6 # the Free Software Foundation; either version 3 of the License, or
7 # (at your option) any later version.
8 #
9 # This program is distributed in the hope that it will be useful,
10 # but WITHOUT ANY WARRANTY; without even the implied warranty of
11 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12 # GNU General Public License for more details.
13 #
14 # You should have received a copy of the GNU General Public License
15 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
16 #
17
18 """The main samba-tool command implementation."""
19
20 from samba.netcmd import SuperCommand
21 from samba.netcmd.dbcheck import cmd_dbcheck
22 from samba.netcmd.delegation import cmd_delegation
23 from samba.netcmd.dns import cmd_dns
24 from samba.netcmd.domain import cmd_domain
25 from samba.netcmd.drs import cmd_drs
26 from samba.netcmd.dsacl import cmd_dsacl
27 from samba.netcmd.fsmo import cmd_fsmo
28 from samba.netcmd.gpo import cmd_gpo
29 from samba.netcmd.group import cmd_group
30 from samba.netcmd.ldapcmp import cmd_ldapcmp
31 from samba.netcmd.ntacl import cmd_ntacl
32 from samba.netcmd.rodc import cmd_rodc
33 from samba.netcmd.sites import cmd_sites
34 from samba.netcmd.spn import cmd_spn
35 from samba.netcmd.testparm import cmd_testparm
36 from samba.netcmd.time import cmd_time
37 from samba.netcmd.user import cmd_user
38 from samba.netcmd.vampire import cmd_vampire
39
40
41 class cmd_sambatool(SuperCommand):
42     """Main samba administration tool."""
43
44     subcommands = {}
45     subcommands["dbcheck"] =  cmd_dbcheck()
46     subcommands["delegation"] = cmd_delegation()
47     subcommands["dns"] = cmd_dns()
48     subcommands["domain"] = cmd_domain()
49     subcommands["drs"] = cmd_drs()
50     subcommands["dsacl"] = cmd_dsacl()
51     subcommands["fsmo"] = cmd_fsmo()
52     subcommands["gpo"] = cmd_gpo()
53     subcommands["group"] = cmd_group()
54     subcommands["ldapcmp"] = cmd_ldapcmp()
55     subcommands["ntacl"] = cmd_ntacl()
56     subcommands["rodc"] = cmd_rodc()
57     subcommands["sites"] = cmd_sites()
58     subcommands["spn"] = cmd_spn()
59     subcommands["testparm"] =  cmd_testparm()
60     subcommands["time"] = cmd_time()
61     subcommands["user"] = cmd_user()
62     subcommands["vampire"] = cmd_vampire()