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