summaryrefslogtreecommitdiff
path: root/source4
diff options
context:
space:
mode:
authorAmitay Isaacs <amitay@gmail.com>2012-02-07 17:27:18 +1100
committerAmitay Isaacs <amitay@gmail.com>2012-02-08 10:49:48 +1100
commit8613bc7ea1bbeec7c5b2c511fe7e601eea10c41e (patch)
tree13b2d93c0083fa1e17dae33ab574a727e92494d7 /source4
parent502186fe0ce4378e7eaf52bf33c38210cd0146cf (diff)
downloadsamba-8613bc7ea1bbeec7c5b2c511fe7e601eea10c41e.tar.gz
samba-8613bc7ea1bbeec7c5b2c511fe7e601eea10c41e.tar.bz2
samba-8613bc7ea1bbeec7c5b2c511fe7e601eea10c41e.zip
samba-tool dns: Re-add support for option groups
Diffstat (limited to 'source4')
-rw-r--r--source4/scripting/python/samba/netcmd/dns.py60
1 files changed, 60 insertions, 0 deletions
diff --git a/source4/scripting/python/samba/netcmd/dns.py b/source4/scripting/python/samba/netcmd/dns.py
index 2ab4129331..6d07db4d85 100644
--- a/source4/scripting/python/samba/netcmd/dns.py
+++ b/source4/scripting/python/samba/netcmd/dns.py
@@ -513,6 +513,12 @@ class cmd_serverinfo(Command):
takes_args = [ 'server' ]
+ takes_optiongroups = {
+ "sambaopts": options.SambaOptions,
+ "versionopts": options.VersionOptions,
+ "credopts": options.CredentialsOptions,
+ }
+
takes_options = [
Option('--client-version', help='Client Version',
default='longhorn', metavar='w2k|dotnet|longhorn',
@@ -541,6 +547,12 @@ class cmd_zoneinfo(Command):
takes_args = [ 'server', 'zone' ]
+ takes_optiongroups = {
+ "sambaopts": options.SambaOptions,
+ "versionopts": options.VersionOptions,
+ "credopts": options.CredentialsOptions,
+ }
+
takes_options = [
Option('--client-version', help='Client Version',
default='longhorn', metavar='w2k|dotnet|longhorn',
@@ -569,6 +581,12 @@ class cmd_zonelist(Command):
takes_args = [ 'server' ]
+ takes_optiongroups = {
+ "sambaopts": options.SambaOptions,
+ "versionopts": options.VersionOptions,
+ "credopts": options.CredentialsOptions,
+ }
+
takes_options = [
Option('--client-version', help='Client Version',
default='longhorn', metavar='w2k|dotnet|longhorn',
@@ -644,6 +662,12 @@ class cmd_zonecreate(Command):
takes_args = [ 'server', 'zone' ]
+ takes_optiongroups = {
+ "sambaopts": options.SambaOptions,
+ "versionopts": options.VersionOptions,
+ "credopts": options.CredentialsOptions,
+ }
+
takes_options = [
Option('--client-version', help='Client Version',
default='longhorn', metavar='w2k|dotnet|longhorn',
@@ -702,6 +726,12 @@ class cmd_zonedelete(Command):
takes_args = [ 'server', 'zone' ]
+ takes_optiongroups = {
+ "sambaopts": options.SambaOptions,
+ "versionopts": options.VersionOptions,
+ "credopts": options.CredentialsOptions,
+ }
+
def run(self, server, zone, sambaopts=None, credopts=None, versionopts=None):
self.lp = sambaopts.get_loadparm()
@@ -727,6 +757,12 @@ class cmd_query(Command):
takes_args = [ 'server', 'zone', 'name', 'rtype' ]
+ takes_optiongroups = {
+ "sambaopts": options.SambaOptions,
+ "versionopts": options.VersionOptions,
+ "credopts": options.CredentialsOptions,
+ }
+
takes_options = [
Option('--authority', help='Search authoritative records (default)',
action='store_true', dest='authority'),
@@ -797,6 +833,12 @@ class cmd_roothints(Command):
takes_args = [ 'server', 'name?' ]
+ takes_optiongroups = {
+ "sambaopts": options.SambaOptions,
+ "versionopts": options.VersionOptions,
+ "credopts": options.CredentialsOptions,
+ }
+
def run(self, server, name='.', sambaopts=None, credopts=None, versionopts=None):
record_type = dnsp.DNS_TYPE_NS
select_flags = (dnsserver.DNS_RPC_VIEW_ROOT_HINT_DATA |
@@ -826,6 +868,12 @@ class cmd_add_record(Command):
takes_args = [ 'server', 'zone', 'name', 'rtype', 'data' ]
+ takes_optiongroups = {
+ "sambaopts": options.SambaOptions,
+ "versionopts": options.VersionOptions,
+ "credopts": options.CredentialsOptions,
+ }
+
def run(self, server, zone, name, rtype, data, sambaopts=None, credopts=None, versionopts=None):
record_type = dns_type_flag(rtype)
@@ -871,6 +919,12 @@ class cmd_update_record(Command):
takes_args = [ 'server', 'zone', 'name', 'rtype', 'olddata', 'newdata' ]
+ takes_optiongroups = {
+ "sambaopts": options.SambaOptions,
+ "versionopts": options.VersionOptions,
+ "credopts": options.CredentialsOptions,
+ }
+
def run(self, server, zone, name, rtype, olddata, newdata,
sambaopts=None, credopts=None, versionopts=None):
@@ -925,6 +979,12 @@ class cmd_delete_record(Command):
takes_args = [ 'server', 'zone', 'name', 'rtype', 'data' ]
+ takes_optiongroups = {
+ "sambaopts": options.SambaOptions,
+ "versionopts": options.VersionOptions,
+ "credopts": options.CredentialsOptions,
+ }
+
def run(self, server, zone, name, rtype, data, sambaopts=None, credopts=None, versionopts=None):
record_type = dns_type_flag(rtype)