mirror of
https://github.com/valitydev/salt.git
synced 2024-11-07 00:55:19 +00:00
Fix port arguments
This commit is contained in:
parent
7756d7af5e
commit
9c330fe492
@ -86070,7 +86070,7 @@ with an extra period in the file, similar to this:
|
||||
.UNINDENT
|
||||
.INDENT 0.0
|
||||
.TP
|
||||
.B salt.modules.ddns.add_host(zone, name, ttl, ip, nameserver=\(aq127.0.0.1\(aq, replace=True, timeout=5, **kwargs, port=53)
|
||||
.B salt.modules.ddns.add_host(zone, name, ttl, ip, nameserver=\(aq127.0.0.1\(aq, replace=True, timeout=5, port=53, **kwargs)
|
||||
Add, replace, or update the A and PTR (reverse) records for a host.
|
||||
.sp
|
||||
CLI Example:
|
||||
@ -86087,7 +86087,7 @@ salt ns1 ddns.add_host example.com host1 60 10.1.1.1
|
||||
.UNINDENT
|
||||
.INDENT 0.0
|
||||
.TP
|
||||
.B salt.modules.ddns.delete(zone, name, rdtype=None, data=None, nameserver=\(aq127.0.0.1\(aq, timeout=5, **kwargs, port=53)
|
||||
.B salt.modules.ddns.delete(zone, name, rdtype=None, data=None, nameserver=\(aq127.0.0.1\(aq, timeout=5, port=53, **kwargs)
|
||||
Delete a DNS record.
|
||||
.sp
|
||||
CLI Example:
|
||||
@ -86104,7 +86104,7 @@ salt ns1 ddns.delete example.com host1 A
|
||||
.UNINDENT
|
||||
.INDENT 0.0
|
||||
.TP
|
||||
.B salt.modules.ddns.delete_host(zone, name, nameserver=\(aq127.0.0.1\(aq, timeout=5, **kwargs, port=53)
|
||||
.B salt.modules.ddns.delete_host(zone, name, nameserver=\(aq127.0.0.1\(aq, timeout=5, port=53, **kwargs)
|
||||
Delete the forward and reverse records for a host.
|
||||
.sp
|
||||
Returns true if any records are deleted.
|
||||
@ -86123,7 +86123,7 @@ salt ns1 ddns.delete_host example.com host1
|
||||
.UNINDENT
|
||||
.INDENT 0.0
|
||||
.TP
|
||||
.B salt.modules.ddns.update(zone, name, ttl, rdtype, data, nameserver=\(aq127.0.0.1\(aq, timeout=5, replace=False, **kwargs, port=53)
|
||||
.B salt.modules.ddns.update(zone, name, ttl, rdtype, data, nameserver=\(aq127.0.0.1\(aq, timeout=5, replace=False, port=53, **kwargs)
|
||||
Add, replace, or update a DNS record.
|
||||
nameserver must be an IP address and the minion running this module
|
||||
must have update privileges on that server.
|
||||
|
@ -76,7 +76,7 @@ def _get_keyring(keyfile):
|
||||
|
||||
|
||||
def add_host(zone, name, ttl, ip, nameserver='127.0.0.1', replace=True,
|
||||
timeout=5, **kwargs, port=53):
|
||||
timeout=5, port=53, **kwargs):
|
||||
'''
|
||||
Add, replace, or update the A and PTR (reverse) records for a host.
|
||||
|
||||
@ -86,8 +86,8 @@ def add_host(zone, name, ttl, ip, nameserver='127.0.0.1', replace=True,
|
||||
|
||||
salt ns1 ddns.add_host example.com host1 60 10.1.1.1
|
||||
'''
|
||||
res = update(zone, name, ttl, 'A', ip, nameserver, timeout, replace,
|
||||
**kwargs, port)
|
||||
res = update(zone, name, ttl, 'A', ip, nameserver, timeout, replace, port,
|
||||
**kwargs)
|
||||
if res is False:
|
||||
return False
|
||||
|
||||
@ -102,14 +102,14 @@ def add_host(zone, name, ttl, ip, nameserver='127.0.0.1', replace=True,
|
||||
zone = '{0}.{1}'.format('.'.join(parts), 'in-addr.arpa.')
|
||||
name = '.'.join(popped)
|
||||
ptr = update(zone, name, ttl, 'PTR', fqdn, nameserver, timeout,
|
||||
replace, **kwargs, port)
|
||||
replace, port, **kwargs)
|
||||
if ptr:
|
||||
return True
|
||||
return res
|
||||
|
||||
|
||||
def delete_host(zone, name, nameserver='127.0.0.1', timeout=5, **kwargs,
|
||||
port=53):
|
||||
def delete_host(zone, name, nameserver='127.0.0.1', timeout=5, port=53,
|
||||
**kwargs):
|
||||
'''
|
||||
Delete the forward and reverse records for a host.
|
||||
|
||||
@ -129,8 +129,8 @@ def delete_host(zone, name, nameserver='127.0.0.1', timeout=5, **kwargs,
|
||||
except IndexError:
|
||||
ips = []
|
||||
|
||||
res = delete(zone, name, nameserver=nameserver, timeout=timeout, **kwargs,
|
||||
port=port)
|
||||
res = delete(zone, name, nameserver=nameserver, timeout=timeout, port=port,
|
||||
**kwargs)
|
||||
|
||||
fqdn = fqdn + '.'
|
||||
for ip in ips:
|
||||
@ -144,14 +144,14 @@ def delete_host(zone, name, nameserver='127.0.0.1', timeout=5, **kwargs,
|
||||
zone = '{0}.{1}'.format('.'.join(parts), 'in-addr.arpa.')
|
||||
name = '.'.join(popped)
|
||||
ptr = delete(zone, name, 'PTR', fqdn, nameserver=nameserver,
|
||||
timeout=timeout, **kwargs, port=port)
|
||||
timeout=timeout, port=port, **kwargs)
|
||||
if ptr:
|
||||
res = True
|
||||
return res
|
||||
|
||||
|
||||
def update(zone, name, ttl, rdtype, data, nameserver='127.0.0.1', timeout=5,
|
||||
replace=False, **kwargs, port=53):
|
||||
replace=False, port=53, **kwargs):
|
||||
'''
|
||||
Add, replace, or update a DNS record.
|
||||
nameserver must be an IP address and the minion running this module
|
||||
@ -198,7 +198,7 @@ def update(zone, name, ttl, rdtype, data, nameserver='127.0.0.1', timeout=5,
|
||||
|
||||
|
||||
def delete(zone, name, rdtype=None, data=None, nameserver='127.0.0.1',
|
||||
timeout=5, **kwargs, port=53):
|
||||
timeout=5, port=53, **kwargs):
|
||||
'''
|
||||
Delete a DNS record.
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user