本文整理汇总了Python中dnstest.test.Test.check_axfr_style_ixfr方法的典型用法代码示例。如果您正苦于以下问题:Python Test.check_axfr_style_ixfr方法的具体用法?Python Test.check_axfr_style_ixfr怎么用?Python Test.check_axfr_style_ixfr使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类dnstest.test.Test
的用法示例。
在下文中一共展示了Test.check_axfr_style_ixfr方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: change
# 需要导入模块: from dnstest.test import Test [as 别名]
# 或者: from dnstest.test.Test import check_axfr_style_ixfr [as 别名]
slave = t.server("knot")
zone = t.zone("xfr", storage=".")
t.link(zone, master, slave)
t.start()
serial = master.zone_wait(zone)
# update zone with small change
master.update_zonefile(zone, version=1)
master.reload()
master.zone_wait(zone, serial)
# check that master properly sends AXFR-style IXFR
t.check_axfr_style_ixfr(master, "xfr", serial)
serial = slave.zone_wait(zone, serial)
t.xfr_diff(master, slave, zone)
# update zone with large change (3 messages worth)
filename = master.data_dir + zone[0].name + "zone.2"
f = open(filename, "w")
f.write(zone[0].name + " IN SOA . . 3 100 100 100 100\n")
f.write(zone[0].name + " IN NS smth\n")
f.write("smth IN A 1.2.3.4\n")
for i in range(2000):
f.write("test" + str(i) + " TXT " + "test" * 16 + "\n")
f.close()
master.update_zonefile(zone, version=2)