moulinette/action_map.yml

504 lines
14 KiB
YAML
Raw Normal View History

2012-10-22 20:52:15 +02:00
##########################################################################
# Category/actions/arguments file
#
#
# Except for general_arguments, this file contains 3 levels
# as in this sample command line:
#
# yunohost monitor info --cpu --ram
# ^ ^ ^ ^
# (script) | category | action | parameters
#
#
2012-10-22 21:09:42 +02:00
# Above example will lead to the function 'monitor_info(args)'
# in the file 'yunohost_monitor.py' with 'cpu' and 'ram'
# stored in an 'args' dictionnary.
2012-10-22 20:52:15 +02:00
#
# Usage:
# You can add a category at the first level, action at the second one,
# and arguments at the third one.
# If a connexion is needed for the action, don't forget to add it to
# the action parameters (ldap, repo, dns or firewall).
#
# Documentation:
# You can see all arguments settings at the argparse documentation:
# http://docs.python.org/dev/library/argparse.html
# #argparse.ArgumentParser.add_argument
#
2012-10-22 21:09:42 +02:00
# Don't forget to turn argument yaml style (setting: value)
2012-10-22 20:52:15 +02:00
#
##########################################################################
#############################
# General args #
#############################
2012-10-22 21:09:42 +02:00
general_arguments:
-v:
full: --version
help: Display YunoHost version
action: version
version: YunoHost 2.0 beta1
2012-10-22 20:52:15 +02:00
#############################
# User #
#############################
2012-10-22 21:09:42 +02:00
user:
category_help: Manage users
actions:
2012-10-22 20:52:15 +02:00
### user_list()
2012-10-22 21:09:42 +02:00
list:
action_help: List users
connections:
- ldap
arguments:
--fields:
help: fields to fetch
nargs: "+"
-f:
full: --filter
help: LDAP filter used to search
-l:
full: --limit
help: Maximum number of user fetched
-o:
full: --offset
help: Starting number for user fetching
2012-10-22 20:52:15 +02:00
### user_create()
2012-10-22 21:09:42 +02:00
create:
action_help: Create user
connections:
- ldap
arguments:
-u:
full: --username
help: Must be unique
-f:
full: --firstname
-l:
full: --lastname
-m:
full: --mail
help: Main mail address must be unique
-p:
full: --password
2012-10-22 20:52:15 +02:00
### user_delete()
2012-10-22 21:09:42 +02:00
delete:
action_help: Delete user
connections:
- ldap
arguments:
users:
help: Username of users to delete
2012-10-29 17:47:37 +01:00
nargs: "*"
--purge:
action: store_true
2012-10-22 20:52:15 +02:00
### user_update()
2012-10-22 21:09:42 +02:00
update:
action_help: Update user informations
connections:
- ldap
arguments:
user:
help: Username of user to update
-f:
full: --firstname
-l:
full: --lastname
-m:
full: --mail
2012-10-29 15:43:43 +01:00
-p:
2012-10-22 21:09:42 +02:00
full: --change-password
help: New password to set
metavar: PASSWORD
--add-mailforward:
help: Mailforward addresses to add
nargs: "+"
metavar: MAIL
--remove-mailforward:
help: Mailforward addresses to remove
nargs: "+"
metavar: MAIL
2012-10-29 15:43:43 +01:00
--add-mailalias:
2012-10-22 21:09:42 +02:00
help: Mail aliases to add
nargs: "+"
metavar: MAIL
2012-10-29 15:43:43 +01:00
--remove-mailalias:
2012-10-22 21:09:42 +02:00
help: Mail aliases to remove
nargs: "+"
metavar: MAIL
2012-10-22 20:52:15 +02:00
### user_info()
2012-10-22 21:09:42 +02:00
info:
action_help: Get user informations
connections:
- ldap
arguments:
-u:
full: --user
2012-10-22 21:09:42 +02:00
-m:
full: --mail
2012-10-22 20:52:15 +02:00
#############################
# Domain #
#############################
2012-10-22 21:09:42 +02:00
domain:
category_help: Manage domains
actions:
2012-10-22 20:52:15 +02:00
### domain_list()
2012-10-22 21:09:42 +02:00
list:
action_help: List domains
connections:
- ldap
arguments:
-f:
full: --filter
help: LDAP filter used to search
-l:
full: --limit
help: Maximum number of domain fetched
-o:
full: --offset
help: Starting number for domain fetching
2012-10-22 20:52:15 +02:00
### domain_add()
2012-10-22 21:09:42 +02:00
add:
action_help: Create a custom domain
connections:
- ldap
arguments:
domain:
help: Domain name to add
2012-10-29 17:38:05 +01:00
nargs: '*'
2012-10-22 20:52:15 +02:00
### domain_remove()
2012-10-22 21:09:42 +02:00
remove:
action_help: Delete domains
connections:
- ldap
arguments:
domain:
help: Domain(s) to delete
2012-10-29 17:47:37 +01:00
nargs: "*"
2012-10-22 20:52:15 +02:00
### domain_info()
2012-10-22 21:09:42 +02:00
info:
action_help: Get domain informations
connections:
- ldap
arguments:
domain:
help: ""
2012-10-22 20:52:15 +02:00
### domain_renewcert()
2012-10-22 21:09:42 +02:00
renewcert:
action_help: Renew domain certificate
arguments:
domain:
help: ""
2012-10-22 20:52:15 +02:00
#############################
# App #
#############################
2012-10-22 21:09:42 +02:00
app:
category_help: Manage apps
actions:
2012-10-22 20:52:15 +02:00
### app_list()
2012-10-22 21:09:42 +02:00
list:
action_help: List apps
connections:
- ldap
arguments:
--fields:
help: fields to fetch
nargs: "+"
-f:
full: --filter
help: LDAP filter used to search
-l:
full: --limit
help: Maximum number of app fetched
-o:
full: --offset
help: Starting number for app fetching
2012-10-22 20:52:15 +02:00
### app_install() TODO: Write help
2012-10-22 21:09:42 +02:00
install:
action_help: Install apps
connections:
- ldap
- dns
arguments:
app:
nargs: "+"
-d:
full: --domain
-p:
full: --path
-l:
full: --label
--public:
action: store_true
--protected:
action: store_true
2012-10-22 20:52:15 +02:00
### app_remove() TODO: Write help
2012-10-22 21:09:42 +02:00
remove:
action_help: Remove app
connections:
- ldap
- dns
arguments:
app:
help: App(s) to delete
nargs: "+"
2012-10-22 20:52:15 +02:00
### app_upgrade()
2012-10-22 21:09:42 +02:00
upgrade:
action_help: Upgrade app
connections:
- ldap
arguments:
app:
help: App(s) to upgrade (default all)
nargs: "*"
2012-10-22 20:52:15 +02:00
### app_info() TODO: Write help
2012-10-22 21:09:42 +02:00
info:
action_help: Get app informations
connections:
- ldap
arguments:
app:
help: ""
2012-10-22 20:52:15 +02:00
### app_addaccess() TODO: Write help
2012-10-22 21:09:42 +02:00
addaccess:
action_help: Grant access right to users (everyone by default)
connections:
- ldap
arguments:
app:
nargs: "+"
-u:
full: --user
nargs: "+"
2012-10-22 20:52:15 +02:00
### app_removeaccess() TODO: Write help
2012-10-22 21:09:42 +02:00
removeaccess:
action_help: Revoke access right to users (everyone by default)
connections:
- ldap
arguments:
app:
nargs: "+"
-u:
full: --user
nargs: "+"
2012-10-22 20:52:15 +02:00
#############################
# Repository #
#############################
2012-10-22 21:09:42 +02:00
repo:
category_help: Manage app repositories
actions:
2012-10-22 20:52:15 +02:00
### repo_list()
2012-10-22 21:09:42 +02:00
list:
action_help: List repositories
connections:
- repo
arguments:
-f:
full: --filter
help: LDAP filter used to search
-l:
full: --limit
help: Maximum number of repository fetched
-o:
full: --offset
help: Starting number for repository fetching
2012-10-22 20:52:15 +02:00
### repo_add()
2012-10-22 21:09:42 +02:00
add:
action_help: Add app repository
connections:
- repo
arguments:
url:
help: URL of the repository
-n:
full: --name
help: Unique name of the repository
2012-10-22 20:52:15 +02:00
### repo_remove()
2012-10-22 21:09:42 +02:00
remove:
action_help: Remove repository
connections:
- repo
arguments:
repo:
help: Name or URL of the repository
2012-10-22 20:52:15 +02:00
### repo_update()
2012-10-22 21:09:42 +02:00
update:
action_help: Update app list from the repositories
connections:
- repo
2012-10-22 20:52:15 +02:00
#############################
# Monitor #
#############################
2012-10-22 21:09:42 +02:00
monitor:
category_help: Monitoring functions
actions:
2012-10-22 20:52:15 +02:00
### monitor_info()
2012-10-22 21:09:42 +02:00
info:
action_help: Check System
arguments:
-m:
full: --memory
help: Check Memory
action: store_true
-c:
full: --cpu
help: Check CPU
action: store_true
-d:
full: --disk
help: Check Disk
action: store_true
-i:
full: --ifconfig
help: Show Ip and MAC Adress
2012-10-22 21:09:42 +02:00
action: store_true
-u:
full: --uptime
help: Show Uptime
action: store_true
-p:
full: --public
help: Show IP public
action: store_true
2012-10-28 15:55:35 +01:00
process:
action_help: Check Process
arguments:
-e:
full: --enable
help: Enable process
metavar: PROCESS
2012-10-28 15:55:35 +01:00
-d:
full: --disable
help: Disable process
metavar: PROCESS
2012-10-28 15:55:35 +01:00
--start:
help: Start process
metavar: PROCESS
2012-10-28 15:55:35 +01:00
--stop:
help: Stop process
metavar: PROCESS
2012-10-28 15:55:35 +01:00
-c:
full: --check
help: Check process
metavar: PORT
2012-10-28 15:55:35 +01:00
-i:
full: --info
help: Process info
2012-10-22 21:09:42 +02:00
action: store_true
2012-10-28 15:55:35 +01:00
2012-10-22 20:52:15 +02:00
#############################
# Firewall #
#############################
2012-10-22 21:09:42 +02:00
firewall:
category_help: Manage firewall rules
actions:
2012-10-22 20:52:15 +02:00
### firewall_list()
2012-10-22 21:09:42 +02:00
list:
action_help: List all firewall rules
connections:
- firewall
2012-10-22 20:52:15 +02:00
### firewall_allow()
2012-10-22 21:09:42 +02:00
allow:
action_help: Allow connection port/protocol
connections:
- firewall
arguments:
port:
help: Port to open
protocol:
help: Protocol associated with port
choices:
- UDP
- TCP
- Both
name:
help: Reference name of the rule
2012-10-22 20:52:15 +02:00
### firewall_disallow()
2012-10-22 21:09:42 +02:00
disallow:
action_help: Disallow connection
connections:
- firewall
arguments:
name:
help: Reference name of the rule to delete
2012-10-22 20:52:15 +02:00
#############################
# Tools #
#############################
2012-10-22 21:09:42 +02:00
tools:
category_help: Specific tools
actions:
2012-10-22 20:52:15 +02:00
2012-10-26 15:26:50 +02:00
### tools_ldapinit()
ldapinit:
action_help: YunoHost LDAP initialization
2012-10-22 21:09:42 +02:00
connections:
- ldap
2012-10-29 18:03:38 +01:00
arguments:
-d:
full: --domain
help: YunoHost main domain
2012-10-26 15:26:50 +02:00
2012-10-27 17:06:43 +02:00
### tools_adminpw()
adminpw:
action_help: Change admin password
arguments:
-o:
full: --old-password
-n:
full: --new-password
### tools_maindomain()
maindomain:
action_help: Main domain change tool
arguments:
-o:
full: --old-domain
-n:
full: --new-domain
2012-10-26 15:26:50 +02:00
### tools_postinstall()
postinstall:
action_help: YunoHost post-install
arguments:
-d:
full: --domain
help: YunoHost main domain
-p:
full: --password
help: YunoHost admin password