summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAmitay Isaacs <amitay@gmail.com>2011-10-21 11:27:28 +1100
committerAndrew Tridgell <tridge@samba.org>2011-11-02 15:26:54 +1100
commit9abfaa3bbb45f5217b326d41aca1b68a49ca12ea (patch)
tree5e89359ee0bf4178d833e8eeb0f3f2c14f31d364
parent66121dc89677b4b6e91f8b4cac893d709ab63544 (diff)
downloadsamba-9abfaa3bbb45f5217b326d41aca1b68a49ca12ea.tar.gz
samba-9abfaa3bbb45f5217b326d41aca1b68a49ca12ea.tar.bz2
samba-9abfaa3bbb45f5217b326d41aca1b68a49ca12ea.zip
samba-tool: Improve the description of dns subcommands.
Signed-off-by: Andrew Tridgell <tridge@samba.org>
-rw-r--r--source4/scripting/python/samba/netcmd/dns.py20
1 files changed, 15 insertions, 5 deletions
diff --git a/source4/scripting/python/samba/netcmd/dns.py b/source4/scripting/python/samba/netcmd/dns.py
index 0ee4a6f06d..ddeefe6f8f 100644
--- a/source4/scripting/python/samba/netcmd/dns.py
+++ b/source4/scripting/python/samba/netcmd/dns.py
@@ -140,6 +140,8 @@ def dns_type_flag(rec_type):
rtype = rec_type.upper()
if rtype == 'A':
record_type = dnsp.DNS_TYPE_A
+ elif rtype == 'AAAA':
+ record_type = dnsp.DNS_TYPE_AAAA
elif rtype == 'NS':
record_type = dnsp.DNS_TYPE_NS
elif rtype == 'CNAME':
@@ -493,7 +495,8 @@ class cmd_serverinfo(Command):
takes_args = [ 'server' ]
takes_options = [
- Option('--client-version', help='Client Version', default='longhorn',
+ Option('--client-version', help='Client Version',
+ default='longhorn', metavar='w2k|dotnet|longhorn',
choices=['w2k','dotnet','longhorn'], dest='cli_ver'),
]
@@ -520,7 +523,8 @@ class cmd_zoneinfo(Command):
takes_args = [ 'server', 'zone' ]
takes_options = [
- Option('--client-version', help='Client Version', default='longhorn',
+ Option('--client-version', help='Client Version',
+ default='longhorn', metavar='w2k|dotnet|longhorn',
choices=['w2k','dotnet','longhorn'], dest='cli_ver'),
]
@@ -547,7 +551,8 @@ class cmd_zonelist(Command):
takes_args = [ 'server' ]
takes_options = [
- Option('--client-version', help='Client Version', default='longhorn',
+ Option('--client-version', help='Client Version',
+ default='longhorn', metavar='w2k|dotnet|longhorn',
choices=['w2k','dotnet','longhorn'], dest='cli_ver'),
Option('--primary', help='List primary zones (default)',
action='store_true', dest='primary'),
@@ -614,9 +619,9 @@ class cmd_zonelist(Command):
class cmd_query(Command):
- """Query a name"""
+ """Query a name."""
- synopsis = '%prog <server> <zone> <name> <type> [options]'
+ synopsis = '%prog <server> <zone> <name> <A|AAAA|CNAME|MX|NS|SOA|SRV|ALL> [options]'
takes_args = [ 'server', 'zone', 'name', 'rtype' ]
@@ -661,6 +666,11 @@ class cmd_query(Command):
if select_flags == 0:
select_flags = dnsserver.DNS_RPC_VIEW_AUTHORITY_DATA
+ if select_flags == dnsserver.DNS_RPC_VIEW_ADDITIONAL_DATA:
+ self.outf.write('Specify either --authority or --root along with --additional.\n')
+ self.outf.write('Assuming --authority.\n')
+ select_flags |= dnsserver.DNS_RPC_VIEW_AUTHORITY_DATA
+
self.lp = sambaopts.get_loadparm()
self.creds = credopts.get_credentials(self.lp)
dns_conn = dns_connect(server, self.lp, self.creds)