s4 net: Add spn module to list/add/remove spn on objects
[mat/samba.git] / source4 / scripting / python / samba / netcmd / __init__.py
index 8164bbbe8165fa51a7871679860df14a3e930bc1..08ddcefe910adb2aa63e914880f5bfc4bcb2e9ea 100644 (file)
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/env python
 
 # Unix SMB/CIFS implementation.
 # Copyright (C) Jelmer Vernooij <jelmer@samba.org> 2009
@@ -54,6 +54,8 @@ class Command(object):
 
     synopsis = property(_get_synopsis)
 
+    outf = sys.stdout
+
     takes_args = []
     takes_options = []
     takes_optiongroups = {}
@@ -79,7 +81,8 @@ class Command(object):
         kwargs = dict(opts.__dict__)
         for option_group in parser.option_groups:
             for option in option_group.option_list:
-                del kwargs[option.dest]
+                if option.dest is not None:
+                    del kwargs[option.dest]
         kwargs.update(optiongroups)
         min_args = 0
         max_args = 0
@@ -155,3 +158,9 @@ from samba.netcmd.user import cmd_user
 commands["user"] = cmd_user()
 from samba.netcmd.vampire import cmd_vampire
 commands["vampire"] = cmd_vampire()
+from samba.netcmd.machinepw import cmd_machinepw
+commands["machinepw"] = cmd_machinepw()
+from samba.netcmd.spn import cmd_spn
+commands["spn"] = cmd_spn()
+from samba.netcmd.group import cmd_group
+commands["group"] = cmd_group()