VirtualMailManager/cli/subcommands.py
branchv0.6.x
changeset 406 58e23bd7c97f
parent 403 a4f5d4cd886d
child 408 f6e55b27fe07
equal deleted inserted replaced
405:da80de422b3c 406:58e23bd7c97f
   623         _(u'is free software and comes with ABSOLUTELY NO WARRANTY.')))
   623         _(u'is free software and comes with ABSOLUTELY NO WARRANTY.')))
   624 
   624 
   625 cmd = Command
   625 cmd = Command
   626 cmd_map = {  # {{{
   626 cmd_map = {  # {{{
   627     # Account commands
   627     # Account commands
   628     'getuser': cmd('getuser', 'gu', get_user, 'uid',
   628     'getuser': cmd('getuser', 'gu', get_user, _(u'uid'),
   629                    _(u'get the address of the user with the given UID')),
   629                    _(u'get the address of the user with the given UID')),
   630     'useradd': cmd('useradd', 'ua', user_add, 'address [password]',
   630     'useradd': cmd('useradd', 'ua', user_add, _(u'address [password]'),
   631                    _(u'create a new e-mail user with the given address')),
   631                    _(u'create a new e-mail user with the given address')),
   632     'userdelete': cmd('userdelete', 'ud', user_delete, 'address [force]',
   632     'userdelete': cmd('userdelete', 'ud', user_delete, _(u'address [force]'),
   633                       _(u'delete the specified user')),
   633                       _(u'delete the specified user')),
   634     'userdisable': cmd('userdisable', 'u0', user_disable,
   634     'userdisable': cmd('userdisable', 'u0', user_disable,
   635                        'address [service ...]',
   635                        _(u'address [service ...]'),
   636                        _(u'deactivate all/the given service(s) for a user')),
   636                        _(u'deactivate all/the given service(s) for a user')),
   637     'userenable': cmd('userenable', 'u1', user_enable, 'address [service ...]',
   637     'userenable': cmd('userenable', 'u1', user_enable,
       
   638                       _(u'address [service ...]'),
   638                       _(u'activate all or the given service(s) for a user')),
   639                       _(u'activate all or the given service(s) for a user')),
   639     'userinfo': cmd('userinfo', 'ui', user_info, 'address [details]',
   640     'userinfo': cmd('userinfo', 'ui', user_info, _(u'address [details]'),
   640                     _(u'display information about the given address')),
   641                     _(u'display information about the given address')),
   641     'username': cmd('username', 'un', user_name, 'address name',
   642     'username': cmd('username', 'un', user_name, _(u'address name'),
   642                     _(u'set or update the real name for an address')),
   643                     _(u'set or update the real name for an address')),
   643     'userpassword': cmd('userpassword', 'up', user_password,
   644     'userpassword': cmd('userpassword', 'up', user_password,
   644                         'address [password]',
   645                         _(u'address [password]'),
   645                         _(u'update the password for the given address')),
   646                         _(u'update the password for the given address')),
   646     'userquota': cmd('userquota', 'uq', user_quota,
   647     'userquota': cmd('userquota', 'uq', user_quota,
   647                      'address storage [messages]',
   648                      _(u'address storage [messages]'),
   648                      _(u'update the quota limit for the given address')),
   649                      _(u'update the quota limit for the given address')),
   649     'usertransport': cmd('usertransport', 'ut', user_transport,
   650     'usertransport': cmd('usertransport', 'ut', user_transport,
   650                          'address transport',
   651                          _(u'address transport'),
   651                          _(u'update the transport of the given address')),
   652                          _(u'update the transport of the given address')),
   652     # Alias commands
   653     # Alias commands
   653     'aliasadd': cmd('aliasadd', 'aa', alias_add, 'address destination ...',
   654     'aliasadd': cmd('aliasadd', 'aa', alias_add, _(u'address destination ...'),
   654                     _(u'create a new alias e-mail address')),
   655                     _(u'create a new alias e-mail address with one or more '
       
   656                       u'destinations')),
   655     'aliasdelete': cmd('aliasdelete', 'ad', alias_delete,
   657     'aliasdelete': cmd('aliasdelete', 'ad', alias_delete,
   656                        'address [destination]',
   658                        _(u'address [destination]'),
   657                        _(u'delete the specified alias e-mail address or one '
   659                        _(u'delete the specified alias e-mail address or one '
   658                          u'of its destinations')),
   660                          u'of its destinations')),
   659     'aliasinfo': cmd('aliasinfo', 'ai', alias_info, 'address',
   661     'aliasinfo': cmd('aliasinfo', 'ai', alias_info, _(u'address'),
   660                      _(u'show the destination(s) of the specified alias')),
   662                      _(u'show the destination(s) of the specified alias')),
   661     # AliasDomain commands
   663     # AliasDomain commands
   662     'aliasdomainadd': cmd('aliasdomainadd', 'ada', aliasdomain_add,
   664     'aliasdomainadd': cmd('aliasdomainadd', 'ada', aliasdomain_add,
   663                           'fqdn destination',
   665                           _(u'fqdn destination'),
   664                           _(u'create a new alias for an existing domain')),
   666                           _(u'create a new alias for an existing domain')),
   665     'aliasdomaindelete': cmd('aliasdomaindelete', 'add', aliasdomain_delete,
   667     'aliasdomaindelete': cmd('aliasdomaindelete', 'add', aliasdomain_delete,
   666                              'fqdn', _(u'delete the specified alias domain')),
   668                              _(u'fqdn'),
   667     'aliasdomaininfo': cmd('aliasdomaininfo', 'adi', aliasdomain_info, 'fqdn',
   669                              _(u'delete the specified alias domain')),
       
   670     'aliasdomaininfo': cmd('aliasdomaininfo', 'adi', aliasdomain_info,
       
   671                          _(u'fqdn'),
   668                          _(u'show the destination of the given alias domain')),
   672                          _(u'show the destination of the given alias domain')),
   669     'aliasdomainswitch': cmd('aliasdomainswitch', 'ads', aliasdomain_switch,
   673     'aliasdomainswitch': cmd('aliasdomainswitch', 'ads', aliasdomain_switch,
   670                              'fqdn destination',
   674                        _(u'fqdn destination'),
   671                        _(u'assign the given alias domain to an other domain')),
   675                        _(u'assign the given alias domain to an other domain')),
   672     # Domain commands
   676     # Domain commands
   673     'domainadd': cmd('domainadd', 'da', domain_add, 'fqdn [transport]',
   677     'domainadd': cmd('domainadd', 'da', domain_add, _(u'fqdn [transport]'),
   674                      _(u'create a new domain')),
   678                      _(u'create a new domain')),
   675     'domaindelete': cmd('domaindelete', 'dd', domain_delete, 'fqdn [force]',
   679     'domaindelete': cmd('domaindelete', 'dd', domain_delete,
       
   680                       _(u'fqdn [force]'),
   676                       _(u'delete the given domain and all its alias domains')),
   681                       _(u'delete the given domain and all its alias domains')),
   677     'domaininfo': cmd('domaininfo', 'di', domain_info, 'fqdn [details]',
   682     'domaininfo': cmd('domaininfo', 'di', domain_info, _(u'fqdn [details]'),
   678                       _(u'display information about the given domain')),
   683                       _(u'display information about the given domain')),
   679     'domainquota': cmd('domainquota', 'dq', domain_quota,
   684     'domainquota': cmd('domainquota', 'dq', domain_quota,
   680                        'fqdn storage [messages] [force]',
   685                        _(u'fqdn storage [messages] [force]'),
   681                        _(u'update the quota limit of the specified domain')),
   686                        _(u'update the quota limit of the specified domain')),
   682     'domaintransport': cmd('domaintransport', 'dt', domain_transport,
   687     'domaintransport': cmd('domaintransport', 'dt', domain_transport,
   683                            'fqdn transport [force]',
   688                            _(u'fqdn transport [force]'),
   684                            _(u'update the transport of the specified domain')),
   689                            _(u'update the transport of the specified domain')),
   685     'listdomains': cmd('listdomains', 'ld', list_domains, '[pattern]',
   690     'listdomains': cmd('listdomains', 'ld', list_domains, _(u'[pattern]'),
   686                        _(u'list all domains / search domains by pattern')),
   691                        _(u'list all domains / search domains by pattern')),
   687     # Relocated commands
   692     # Relocated commands
   688     'relocatedadd': cmd('relocatedadd', 'ra', relocated_add,
   693     'relocatedadd': cmd('relocatedadd', 'ra', relocated_add,
   689                         'address newaddress',
   694                         _(u'address newaddress'),
   690                         _(u'create a new record for a relocated user')),
   695                         _(u'create a new record for a relocated user')),
   691     'relocateddelete': cmd('relocateddelete', 'rd', relocated_delete,
   696     'relocateddelete': cmd('relocateddelete', 'rd', relocated_delete,
   692                            'address',
   697                            _(u'address'),
   693                            _(u'delete the record of the relocated user')),
   698                            _(u'delete the record of the relocated user')),
   694     'relocatedinfo': cmd('relocatedinfo', 'ri', relocated_info, 'address',
   699     'relocatedinfo': cmd('relocatedinfo', 'ri', relocated_info, _('address'),
   695                          _(u'print information about a relocated user')),
   700                          _(u'print information about a relocated user')),
   696     # cli commands
   701     # cli commands
   697     'configget': cmd('configget', 'cg', config_get, 'option',
   702     'configget': cmd('configget', 'cg', config_get, _(u'option'),
   698                      _('show the actual value of the configuration option')),
   703                      _('show the actual value of the configuration option')),
   699     'configset': cmd('configset', 'cs', config_set, 'option value',
   704     'configset': cmd('configset', 'cs', config_set, _('option value'),
   700                       _('set a new value for the configuration option')),
   705                       _('set a new value for the configuration option')),
   701     'configure': cmd('configure', 'cf', configure, '[section]',
   706     'configure': cmd('configure', 'cf', configure, _(u'[section]'),
   702                      _(u'start interactive configuration modus')),
   707                      _(u'start interactive configuration modus')),
   703     'help': cmd('help', 'h', help_, '[subcommand]',
   708     'help': cmd('help', 'h', help_, _(u'[subcommand]'),
   704                 _(u'show a help overview or help for the given subcommand')),
   709                 _(u'show a help overview or help for the given subcommand')),
   705     'version': cmd('version', 'v', version, '',
   710     'version': cmd('version', 'v', version, '',
   706                    _(u'show version and copyright information')),
   711                    _(u'show version and copyright information')),
   707 }  # }}}
   712 }  # }}}
   708 
   713