513 def domain_info(self, domainname, details=None): |
513 def domain_info(self, domainname, details=None): |
514 """Wrapper around Domain.get_info(), Domain.get_accounts(), |
514 """Wrapper around Domain.get_info(), Domain.get_accounts(), |
515 Domain.get_aliase_names(), Domain.get_aliases() and |
515 Domain.get_aliase_names(), Domain.get_aliases() and |
516 Domain.get_relocated.""" |
516 Domain.get_relocated.""" |
517 if details not in [None, 'accounts', 'aliasdomains', 'aliases', 'full', |
517 if details not in [None, 'accounts', 'aliasdomains', 'aliases', 'full', |
518 'relocated']: |
518 'relocated', 'catchall']: |
519 raise VMMError(_(u"Invalid argument: '%s'") % details, |
519 raise VMMError(_(u"Invalid argument: '%s'") % details, |
520 INVALID_ARGUMENT) |
520 INVALID_ARGUMENT) |
521 dom = self._get_domain(domainname) |
521 dom = self._get_domain(domainname) |
522 dominfo = dom.get_info() |
522 dominfo = dom.get_info() |
523 if dominfo['domain name'].startswith('xn--'): |
523 if dominfo['domain name'].startswith('xn--'): |
531 return (dominfo, dom.get_aliase_names()) |
531 return (dominfo, dom.get_aliase_names()) |
532 elif details == 'aliases': |
532 elif details == 'aliases': |
533 return (dominfo, dom.get_aliases()) |
533 return (dominfo, dom.get_aliases()) |
534 elif details == 'relocated': |
534 elif details == 'relocated': |
535 return(dominfo, dom.get_relocated()) |
535 return(dominfo, dom.get_relocated()) |
|
536 elif details == 'catchall': |
|
537 return(dominfo, dom.get_catchall()) |
536 else: |
538 else: |
537 return (dominfo, dom.get_aliase_names(), dom.get_accounts(), |
539 return (dominfo, dom.get_aliase_names(), dom.get_accounts(), |
538 dom.get_aliases(), dom.get_relocated()) |
540 dom.get_aliases(), dom.get_relocated(), dom.get_catchall()) |
539 |
541 |
540 def aliasdomain_add(self, aliasname, domainname): |
542 def aliasdomain_add(self, aliasname, domainname): |
541 """Adds an alias domain to the domain. |
543 """Adds an alias domain to the domain. |
542 |
544 |
543 Arguments: |
545 Arguments: |