当前位置: 首页>>代码示例>>Python>>正文


Python Test.xfr_diff方法代码示例

本文整理汇总了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()
开发者ID:dnstap,项目名称:knot,代码行数:32,代码来源:test.py

示例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()
开发者ID:dnstap,项目名称:knot,代码行数:24,代码来源:test.py

示例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()
开发者ID:dnstap,项目名称:knot,代码行数:24,代码来源:test.py

示例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)
开发者ID:gitter-badger,项目名称:knot,代码行数:31,代码来源:test.py

示例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()
开发者ID:dnstap,项目名称:knot,代码行数:27,代码来源:test.py


注:本文中的dnstest.test.Test.xfr_diff方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。