VirtualMailManager/cli/subcommands.py
branchv0.7.x
changeset 681 4cab983479db
parent 679 b6ef80a8daa2
child 685 c6024bc1de0f
equal deleted inserted replaced
680:5365af94a8ec 681:4cab983479db
   226                 _print_list(info[5], _('catch-all destinations'))
   226                 _print_list(info[5], _('catch-all destinations'))
   227 
   227 
   228 
   228 
   229 def domain_quota(ctx):
   229 def domain_quota(ctx):
   230     """update the quota limit of the specified domain"""
   230     """update the quota limit of the specified domain"""
   231     force = 'force' if ctx.args.force else None
       
   232     ctx.hdlr.domain_quotalimit(ctx.args.fqdn.lower(), ctx.args.storage,
   231     ctx.hdlr.domain_quotalimit(ctx.args.fqdn.lower(), ctx.args.storage,
   233                                ctx.args.messages, force)
   232                                ctx.args.messages, ctx.args.force)
   234 
   233 
   235 
   234 
   236 def domain_services(ctx):
   235 def domain_services(ctx):
   237     """allow all named service and block the uncredited."""
   236     """allow all named service and block the uncredited."""
   238     force = 'force' if ctx.args.force else None
       
   239     services = ctx.args.services if ctx.args.services else []
   237     services = ctx.args.services if ctx.args.services else []
   240     ctx.hdlr.domain_services(ctx.args.fqdn.lower(), force, *services)
   238     ctx.hdlr.domain_services(ctx.args.fqdn.lower(), ctx.args.force, *services)
   241 
   239 
   242 
   240 
   243 def domain_transport(ctx):
   241 def domain_transport(ctx):
   244     """update the transport of the specified domain"""
   242     """update the transport of the specified domain"""
   245     force = 'force' if ctx.args.force else None
       
   246     ctx.hdlr.domain_transport(ctx.args.fqdn.lower(),
   243     ctx.hdlr.domain_transport(ctx.args.fqdn.lower(),
   247                               ctx.args.transport.lower(), force)
   244                               ctx.args.transport.lower(), ctx.args.force)
   248 
   245 
   249 
   246 
   250 def domain_note(ctx):
   247 def domain_note(ctx):
   251     """update the note of the given domain"""
   248     """update the note of the given domain"""
   252     ctx.hdlr.domain_note(ctx.args.fqdn.lower(), ctx.args.note)
   249     ctx.hdlr.domain_note(ctx.args.fqdn.lower(), ctx.args.note)