@utils.arg('domain', metavar='<domain>', help=_('DNS domain.'))
@utils.arg('--ip', metavar='<ip>', help=_('IP address.'), default=None)
@utils.arg('--name', metavar='<name>', help=_('DNS name.'), default=None)
@deprecated_network
def do_dns_list(cs, args):
 if (not (args.ip or args.name)):
  raise exceptions.CommandError(_('You must specify either --ip or --name'))
 if args.name:
  entry = cs.dns_entries.get(args.domain, args.name)
  _print_dns_list([entry])
 else:
  entries = cs.dns_entries.get_for_ip(args.domain, ip=args.ip)
  _print_dns_list(entries)

@ utils . arg ( 'domain' , metavar = '<domain>' , help = _ ( 'DNS domain.' ) ) @ utils . arg ( '--ip' , metavar = '<ip>' , help = _ ( 'IP address.' ) , default = None ) @ utils . arg ( '--name' , metavar = '<name>' , help = _ ( 'DNS name.' ) , default = None ) @ deprecated_network def do_dns_list ( cs , args ) : if ( not ( args . ip or args . name ) ) : raise exceptions . CommandError ( _ ( 'You must specify either --ip or --name' ) ) if args . name : entry = cs . dns_entries . get ( args . domain , args . name ) _print_dns_list ( [ entry ] ) else : entries = cs . dns_entries . get_for_ip ( args . domain , ip = args . ip ) _print_dns_list ( entries )
list current dns entries for domain and ip or domain and name .