VirtualMailManager/VirtualMailManager.py
changeset 45 9e66138aad0b
parent 44 c9ab6900ede9
child 47 191d5a5adc4a
equal deleted inserted replaced
44:c9ab6900ede9 45:9e66138aad0b
   503             return (dominfo, dom.getAliaseNames(), dom.getAccounts(),
   503             return (dominfo, dom.getAliaseNames(), dom.getAccounts(),
   504                     dom.getAliases())
   504                     dom.getAliases())
   505         else:
   505         else:
   506             raise VMMDomainException(("%s: '%s'" % (_('Invalid argument'),
   506             raise VMMDomainException(("%s: '%s'" % (_('Invalid argument'),
   507                 detailed),  ERR.INVALID_OPTION))
   507                 detailed),  ERR.INVALID_OPTION))
       
   508 
       
   509     def domain_alias_add(self, aliasname, domainname):
       
   510         """Adds an alias name to the domain.
       
   511         
       
   512         Keyword arguments:
       
   513         aliasname -- the alias name of the domain (str)
       
   514         domainname -- name of the target domain (str)
       
   515         """
       
   516         dom = self.__getDomain(domainname)
       
   517         aliasname = self.__chkDomainname(aliasname)
       
   518         dom.saveAlias(aliasname)
       
   519 
       
   520     def domain_alias_delete(self, aliasname):
       
   521         """Deletes the specified alias name.
       
   522         
       
   523         Keyword arguments:
       
   524         aliasname -- the alias name of the domain (str)
       
   525         """
       
   526         from Domain import deleteAlias
       
   527         aliasname = self.__chkDomainname(aliasname)
       
   528         self.__dbConnect()
       
   529         deleteAlias(self.__dbh, aliasname)
   508 
   530 
   509     def domain_list(self, pattern=None):
   531     def domain_list(self, pattern=None):
   510         from Domain import search
   532         from Domain import search
   511         like = False
   533         like = False
   512         if pattern is not None:
   534         if pattern is not None: