291: Temporarily reverted Rob's changes in public.py and plugins/examples.py

This commit is contained in:
Jason Gerard DeRose
2008-09-13 00:22:01 +00:00
parent 0e60036bb4
commit 5a1abcdf4f
2 changed files with 2 additions and 9 deletions
+1 -8
View File
@@ -24,8 +24,7 @@ Some example plugins.
from ipalib import public
from ipalib import api
from ipalib import servercore
import ldap
# Hypothetical functional commands (not associated with any object):
class krbtest(public.Command):
@@ -40,11 +39,8 @@ api.register(discover)
# Register some methods for the 'user' object:
class user_add(public.Method):
'Add a new user.'
def execute(self, **kw):
return 1
api.register(user_add)
class user_del(public.Method):
'Delete an existing user.'
api.register(user_del)
@@ -55,9 +51,6 @@ api.register(user_mod)
class user_find(public.Method):
'Search the users.'
def execute(self, **kw):
result = servercore.get_sub_entry(servercore.basedn, "uid=%s" % kw['uid'], ["*"])
return result
api.register(user_find)
+1 -1
View File
@@ -338,7 +338,7 @@ class Command(plugable.Plugin):
kw = self.normalize(**kw)
kw.update(self.get_default(**kw))
self.validate(**kw)
return self.execute(**kw)
self.execute(**kw)
def smart_option_order(self):
def get_key(option):