本文整理汇总了Python中src.util.logger.logger.debug函数的典型用法代码示例。如果您正苦于以下问题:Python debug函数的具体用法?Python debug怎么用?Python debug使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了debug函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: test_Pharos_Reload_208
def test_Pharos_Reload_208():
pharos.deploy(conf)
dns = { 'qd':[{'qd_qname':'img01.taobaocdn.com.danuoyi.tbcache.com'}]}
check = { 'ancount': 1, 'an_rdata': [(ip1, 1)], 'total_rdata': 10}
DNS.do_dns(dns, check, 10)
logger.debug(elog)
pharos.cleanDB()
pharos.initPharos()
conf['wideip']= {'wideip1': {'url':'img02.taobaocdn.com.danuoyi.tbcache.com', 'pool': ['WT_BJ_Pool']}}
cmd = 'ls -lt /home/admin/pharos/logs/error*.log --time-style=full-iso | sed -n "1p" | awk "{print $7}"'
pharos.parse(conf)
pharos.write2DB()
output1 = system_util.exe_cmd_via_ssh(dnsip, cmd)
system_util.exe_cmd_via_ssh(dnsip, '/usr/bin/mysql -uroot -pwelcome < /home/admin/pharos/conf/callProcedure.sql')
output2 = system_util.exe_cmd_via_ssh(dnsip,'/home/admin/pharos/bin/ctrl-pharos reload')
time.sleep(2)
output3 = system_util.exe_cmd_via_ssh(dnsip, cmd)
assert output1 == output3
dns = { 'qd':[{'qd_qname':'img01.taobaocdn.com.danuoyi.tbcache.com'}]}
check = { 'rcode': 3 }
DNS.do_dns(dns, check, 10)
dns = { 'qd':[{'qd_qname':'img02.taobaocdn.com.danuoyi.tbcache.com'}]}
check = { 'ancount': 1, 'an_rdata': [(ip1, 1)], 'total_rdata': 10}
DNS.do_dns(dns, check, 10)
logger.debug(elog)
示例2: test_tcheck_3host_1uri_07
def test_tcheck_3host_1uri_07():
conf['tcheck'] = {'master': 'master','slave':['slave1', 'slave2', 'slave3']}
conf['vs']={'vs1': {'vs_ip': '10.235.160.66', 'host_name':'vkvm160066.sqa.cm6; vkvm160066.sqa.cm6; vkvm160066.sqa.cm6;', 'HC_type':1, 'url': '/11;'}}
tcheck.deploy(conf)
tcheck.check_db([('vs1', 0)])
logger.debug("# Test # test stopped and success!!!")
示例3: test_Pharos_Start_Stop_207
def test_Pharos_Start_Stop_207():
for i in range(50):
pharos.restartPharos()
dns = { 'qd':[{'qd_qname':'img01.taobaocdn.com.danuoyi.tbcache.com'}]}
check = { 'ancount': 1, 'an_rdata': [(ip1, 1)], 'total_rdata': 10}
DNS.do_dns(dns, check, 10)
logger.debug(elog)
示例4: stop_vs
def stop_vs(vss):
for vs in vss:
ip = vs_conf[vs]['vs_ip']
if vs_conf[vs]['HC_type'] == 0:
logger.debug('# Test # stop vs(tcp check): ('+ vs + ': ' + ip + '), ')
elif vs_conf[vs]['HC_type'] == 1:
logger.debug('# Test # stop vs(http check): ('+ vs + ': ' + ip + '), ')
stop_nginx([ip])
示例5: test_Pool_Limit_NoEqual_VS_339
def test_Pool_Limit_NoEqual_VS_339():
conf['pool'] = {'WT_BJ_Poo1': {'rr_ldns_limit':3, 'vs': [('vs1', 1), ('vs2', 2), ('vs3', 3)]}}
conf['region']={'WT_BJ_Region': {'range':[(laddr, laddr)], 'pool': [('WT_BJ_Poo1', 100)]}}
conf['wideip']={'wideip1': {'pool': ['WT_BJ_Poo1']}}
check = { 'an_rdata': [(ip1, 0.3), (ip2, 0.33), (ip3, 0.36)], 'ancount': '1|2|3'}
pharos.deploy(conf)
DNS.do_dns(dns, check, 1000)
logger.debug(elog)
示例6: test_ExpectedVSCountMoreThanActualVSCount_326
def test_ExpectedVSCountMoreThanActualVSCount_326():
conf['pool'] = {'WT_BJ_Pool': {'rr_ldns_limit':100, 'vs': [('vs1', 10)]}}
conf['region']={'WT_BJ_Region':{'range':[(laddr, laddr)], 'pool': [('WT_BJ_Pool', 100)]}}
conf['wideip']={'wideip1': {'pool': ['WT_BJ_Pool']}}
check = { 'an_rdata': [(ip1, 1)], 'ancount': 1, 'total_rdata': 20}
pharos.deploy(conf)
DNS.do_dns(dns, check, 20)
logger.debug(elog)
示例7: setup
def setup():
if DNS['Has_Setup'] == True:
return True
logger.debug("Test setup (check DB running, install pharos)")
checkDBRunning([DNS['DNS_HOST']])
installPharos()
DNS['Has_Setup'] = True
return True
示例8: test_Pharos_ErrorLog_Absolute_Path_204
def test_Pharos_ErrorLog_Absolute_Path_204():
pharos.copyfile('config/pharos/pharos_error_absolute.conf', '/home/admin/pharos/conf/pharos.conf')
pharos.stopPharos()
system_util.exe_cmd_via_ssh(dnsip,'rm -rf /home/admin/pharos/logs/error*')
pharos.startPharos()
time.sleep(2)
output = system_util.exe_cmd_via_ssh(dnsip,'ls -h /home/admin/pharos/logs/error.log')
assert (output == ['/home/admin/pharos/logs/error.log'])
logger.debug(elog)
示例9: test_Pharos_Port_Set_65535_210
def test_Pharos_Port_Set_65535_210():
pharos.deploy(conf)
pharos.copyfile('config/pharos/pharos_port65535.conf', '/home/admin/pharos/conf/pharos.conf')
pharos.restartPharos()
time.sleep(5)
dns = { 'DNS_PORT':65535, 'qd':[{'qd_qname':'img01.taobaocdn.com.danuoyi.tbcache.com'}]}
check = { 'ancount': 1, 'an_rdata': [(ip1, 1)], 'total_rdata': 10 }
DNS.do_dns(dns, check, 10)
logger.debug(elog)
示例10: test_3tcheck_1vs_1slavedown_03
def test_3tcheck_1vs_1slavedown_03():
conf['tcheck'] = {'master': 'master','slave' :['slave1', 'slave2', 'slave3']}
conf['vs'] = {'vs1': {'vs_ip': '10.235.160.66', 'host_name':'vkvm160066.sqa.cm6'}}
tcheck.deploy(conf)
tcheck.stop_tcheck(['slave1'])
tcheck.stop_vs(['vs1'])
tcheck.check_db([('vs1', 0)])
logger.debug("# Test # test stopped and success!!!")
示例11: restart_all_vs
def restart_all_vs():
ips_vs = []
log_in = '#Deploy# Start vs '
for vs in vs_conf:
ips_vs.append(vs_conf[vs]['vs_ip'])
log_in += '(' + vs +': ' + vs_conf[vs]['vs_ip'] + '), '
stop_nginx(ips_vs)
start_nginx(ips_vs)
logger.debug(log_in)
示例12: test_Wideip_NotFound_ReturnEmpty_320
def test_Wideip_NotFound_ReturnEmpty_320():
conf['pool'] = {'WT_BJ_Pool': {'rr_ldns_limit':1, 'vs': [('vs1', 10), ('vs2', 20), ('vs3', 50)]}}
conf['region']={'WT_BJ_Region': {'range':[(laddr, laddr)], 'pool': [('WT_BJ_Pool', 100)]}}
conf['wideip']={'wideip1': {'pool': ['WT_BJ_Pool']}}
dns = {'qd':[{'qd_qname':'img01.taobaocdn.com'}] }
check = { 'ancount': 0, 'qdcount':1, 'rcode':5}
pharos.deploy(conf)
DNS.do_dns(dns, check, 10)
logger.debug(elog)
示例13: test_Pool_Limit_Equalto_VS_Same_Pri_338
def test_Pool_Limit_Equalto_VS_Same_Pri_338():
conf['pool'] = {'WT_BJ_Poo1': {'rr_ldns_limit':3, 'vs': [('vs1', 1), ('vs2', 1), ('vs3', 1)]}}
conf['region']={'WT_BJ_Region': {'range':[(laddr, laddr)], 'pool': [('WT_BJ_Poo1', 100)]}}
conf['wideip']={'wideip1': {'pool': ['WT_BJ_Poo1']}}
check = { 'an_rdata': [(ip1, 0.33), (ip2, 0.33), (ip3, 0.33)], 'ancount': 3, 'total_rdata': 3}
pharos.deploy(conf)
for i in range(0,10):
DNS.do_dns(dns, check, 1)
logger.debug(elog)
示例14: test_CompleRegion_NotMatched_304
def test_CompleRegion_NotMatched_304():
conf['pool'] = {'WT_BJ_Pool': {'rr_ldns_limit': 1,'vs': [('vs1', 10)]},
'!WT_BJ_Pool': {'rr_ldns_limit': 1,'vs': [('vs2', 10)]}}
conf['region']={'WT_BJ_Region': {'range':[(laddr, laddr)], 'pool': [('WT_BJ_Pool', 100)]},
'!WT_BJ_Region': {'complename': ('WT_BJ_Region', '!WT_BJ_Region'), 'pool': [('!WT_BJ_Pool', 100)]},}
conf['wideip']={'wideip1': {'pool': ['WT_BJ_Pool', '!WT_BJ_Pool']}}
check = { 'an_rdata': [(ip1, 1)], 'ancount': 1, 'total_rdata': 100}
pharos.deploy(conf)
DNS.do_dns(dns, check, 100)
logger.debug("# Test # Test finished and result check successful...\n")
示例15: test_3tcheck_1vs_masterdown_01
def test_3tcheck_1vs_masterdown_01():
conf['vs'] = {'vs1': {'vs_ip': '10.235.160.66', 'host_name':'vkvm160066.sqa.cm6'}}
tcheck.deploy(conf)
tcheck.stop_tcheck(['master'])
tcheck.stop_vs(['vs1'])
tcheck.sleep(90)
tcheck.check_db([('vs1', 1)])
logger.debug("# Test # test stopped and success!!!")