Replace tabs with spaces
This commit is contained in:
parent
a5e831ec21
commit
8384311517
|
@ -25,10 +25,7 @@ __VERSION__ = '0.1'
|
|||
|
||||
|
||||
def _parser():
|
||||
parser = argparse.ArgumentParser(
|
||||
#prog='foo',
|
||||
#description='do some awesome foo',
|
||||
)
|
||||
parser = argparse.ArgumentParser()
|
||||
|
||||
parser.add_argument("--pdns-host", default="127.0.0.1", help="PDNS host")
|
||||
parser.add_argument("--pdns-port", default=8081, help="PDNS port")
|
||||
|
@ -38,6 +35,7 @@ def _parser():
|
|||
|
||||
return parser
|
||||
|
||||
|
||||
def mergeDomains(zoneData, pdnsData):
|
||||
rrAdd = []
|
||||
rrData = pdnsData['rrsets']
|
||||
|
@ -80,6 +78,7 @@ def removeOldDomains(zoneData, pdnsData):
|
|||
|
||||
return rrDel
|
||||
|
||||
|
||||
def handleNameserver(ns, servers, usedNameservers, domains):
|
||||
servers.append(ns.name)
|
||||
|
||||
|
@ -121,6 +120,7 @@ def getDomainsFromQueryset(qs, zone, glueRecords, usedNameservers, v4reverse=Fal
|
|||
no = startNo + i
|
||||
zone.append(("%d.%s" % (no, baseZone), "CNAME", ["%d.%s" % (no, revZone)]))
|
||||
|
||||
|
||||
def mergeDomainsWithPdns(s, args, zone, zoneData, protectedRecords=[]):
|
||||
url = "http://%s:%s/api/v1/servers/localhost/zones/%s" % (args.pdns_host, args.pdns_port, zone,)
|
||||
pdnsData = s.get(url).json()
|
||||
|
@ -198,6 +198,5 @@ def main():
|
|||
mergeDomainsWithPdns(s, args, "3.2.7.c.3.a.d.f.ip6.arpa.", rzone6)
|
||||
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
main()
|
||||
|
|
Loading…
Reference in New Issue