本文整理汇总了Python中dnstest.test.Test.xfr_diff方法的典型用法代码示例。如果您正苦于以下问题:Python Test.xfr_diff方法的具体用法?Python Test.xfr_diff怎么用?Python Test.xfr_diff使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类dnstest.test.Test
的用法示例。
在下文中一共展示了Test.xfr_diff方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: range
# 需要导入模块: from dnstest.test import Test [as 别名]
# 或者: from dnstest.test.Test import xfr_diff [as 别名]
slave = t.server("bind")
zones = t.zone_rnd(5, records=50) + t.zone("wild.") + \
t.zone("cname-loop.") + t.zone("records.")
t.link(zones, master, slave, ixfr=True)
t.start()
# Wait for AXFR to slave server.
serials_init = master.zones_wait(zones)
slave.zones_wait(zones)
serials_prev = serials_init
for i in range(4):
# Update zone files on master.
for zone in zones:
master.update_zonefile(zone, random=True)
master.reload()
t.sleep(5)
# Wait for IXFR to slave.
serials = master.zones_wait(zones, serials_prev)
slave.zones_wait(zones, serials_prev)
serials_prev = serials
# Compare IXFR between servers.
t.xfr_diff(master, slave, zones, serials_init)
t.end()
示例2: Test
# 需要导入模块: from dnstest.test import Test [as 别名]
# 或者: from dnstest.test.Test import xfr_diff [as 别名]
#!/usr/bin/env python3
'''Test for AXFR from Knot to Bind'''
from dnstest.test import Test
t = Test()
master = t.server("knot")
slave = t.server("bind")
zones = t.zone_rnd(10) + t.zone(".") + t.zone("wild.") + \
t.zone("cname-loop.") + t.zone("records.")
t.link(zones, master, slave)
t.start()
master.zones_wait(zones)
slave.zones_wait(zones)
t.xfr_diff(master, slave, zones)
t.end()
示例3: Test
# 需要导入模块: from dnstest.test import Test [as 别名]
# 或者: from dnstest.test.Test import xfr_diff [as 别名]
#!/usr/bin/env python3
'''Test for loading of NSEC records with upper-case letters in rdata.'''
from dnstest.test import Test
t = Test()
knot = t.server("knot")
bind = t.server("bind")
zone = t.zone("rdatacase.", "rdatacase.zone.signed", storage=".")
t.link(zone, knot)
t.link(zone, bind)
t.start()
knot.zones_wait(zone)
bind.zones_wait(zone)
t.xfr_diff(knot, bind, zone)
t.end()
示例4:
# 需要导入模块: from dnstest.test import Test [as 别名]
# 或者: from dnstest.test.Test import xfr_diff [as 别名]
t.link(zones, master, slave)
t.link(zones, reference)
t.start()
# Wait for servers.
master.zones_wait(zones)
slave.zones_wait(zones)
reference.zones_wait(zones)
# Dump zones on slave.
slave.flush()
# Compare master with reference server
t.xfr_diff(reference, master, zones)
# Compare slave with reference server
t.xfr_diff(reference, slave, zones)
# Stop master.
master.stop()
# Reload dumped zone files.
slave.stop()
slave.start()
# Compare reloaded slave with reference server
slave.zones_wait(zones)
t.xfr_diff(reference, slave, zones)
示例5: Test
# 需要导入模块: from dnstest.test import Test [as 别名]
# 或者: from dnstest.test.Test import xfr_diff [as 别名]
#!/usr/bin/env python3
'''Test for IXFR query over UDP'''
from dnstest.test import Test
t = Test()
knot = t.server("knot")
bind = t.server("bind")
zone = t.zone("example.com.")
t.link(zone, knot)
t.link(zone, bind)
t.start()
# Wait for zone and get serial.
serial = bind.zones_wait(zone)
knot.zone_wait(zone)
# Query IXFR over UDP and compare responses.
t.xfr_diff(knot, bind, zone, serial, udp=True)
t.end()