mirror of
https://github.com/YunoHost/moulinette.git
synced 2024-09-03 20:06:31 +02:00
fixes
This commit is contained in:
parent
e34f6e0b4f
commit
d30ef19b80
2 changed files with 31 additions and 20 deletions
|
@ -6,6 +6,7 @@ import ldap
|
|||
import ldap.modlist as modlist
|
||||
import re
|
||||
import getpass
|
||||
sys.path.append('./') # Local temporary hack
|
||||
|
||||
|
||||
def colorize(astr, color):
|
||||
|
@ -59,7 +60,7 @@ def str_to_func(astr):
|
|||
|
||||
try:
|
||||
func = getattr(mod, function)
|
||||
except NameError:
|
||||
except AttributeError:
|
||||
raise YunoHostError(168, _('Function is not defined'))
|
||||
else:
|
||||
return func
|
||||
|
|
48
yunohost
48
yunohost
|
@ -33,33 +33,43 @@ gettext.install('YunoHost')
|
|||
|
||||
from yunohost import YunoHostError, str_to_func, colorize
|
||||
|
||||
|
||||
"""
|
||||
Category/actions dictionnary
|
||||
|
||||
Usage:
|
||||
Add your "'action' : 'help'" to a category of this dictionnary,
|
||||
and make sure the file yunohost_my-category.py exists in ./lib
|
||||
|
||||
Then create the function called category_action(args).
|
||||
|
||||
You can add some arguments with the function parse_args() below.
|
||||
|
||||
Example:
|
||||
'add' : 'Add user' refers to :
|
||||
user_add(args) function in lib/yunohost_user.py
|
||||
|
||||
"""
|
||||
action_dict = {
|
||||
"""
|
||||
Category/actions dictionnary
|
||||
|
||||
Usage:
|
||||
Add your "'action' : 'help'" to a category of this dictionnary,
|
||||
and make sure the file yunohost_my-category.py exists in ./lib
|
||||
|
||||
Then create the function called category_action(args).
|
||||
|
||||
You can add some arguments with the function parse_args() below.
|
||||
|
||||
Example:
|
||||
'add' : 'Add user' refers to :
|
||||
user_add(args) function in lib/yunohost_user.py
|
||||
|
||||
"""
|
||||
'user' : {
|
||||
'user' : {
|
||||
'help' : 'Manage users',
|
||||
'actions' : {
|
||||
'list' : 'List users',
|
||||
'add' : 'Add user'
|
||||
'add' : 'Create user',
|
||||
#'update' : 'Update user informations',
|
||||
#'delete' : 'Delete user',
|
||||
#'info' : 'Show user informations'
|
||||
}
|
||||
},
|
||||
'domain' : {
|
||||
'help' : 'Manage domains',
|
||||
'actions' : {}
|
||||
'actions' : {
|
||||
#'list' : 'List domains',
|
||||
#'add' : 'Add domain',
|
||||
#'remove' : 'Remove domain',
|
||||
#'info' : 'Show domain informations',
|
||||
#'renewcert' : 'Renew certificate for a domain'
|
||||
}
|
||||
},
|
||||
'app' : {
|
||||
'help' : 'Manage apps',
|
||||
|
|
Loading…
Add table
Reference in a new issue