本文整理汇总了Python中isp.nsmUtil.NsmUtil.saveResult方法的典型用法代码示例。如果您正苦于以下问题:Python NsmUtil.saveResult方法的具体用法?Python NsmUtil.saveResult怎么用?Python NsmUtil.saveResult使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类isp.nsmUtil.NsmUtil
的用法示例。
在下文中一共展示了NsmUtil.saveResult方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: start2
# 需要导入模块: from isp.nsmUtil import NsmUtil [as 别名]
# 或者: from isp.nsmUtil.NsmUtil import saveResult [as 别名]
def start2():
test = TestSimple()
test.start()
NsmUtil.saveUid(test._uidList)
NsmUtil.saveResult(test._resultList)
NsmUtil.printHeadLine2('total test case: ' + str(test._totalTestCase))
NsmUtil.printHeadLine1('test completed')
示例2: start1
# 需要导入模块: from isp.nsmUtil import NsmUtil [as 别名]
# 或者: from isp.nsmUtil.NsmUtil import saveResult [as 别名]
def start1():
test = TestSimple()
try:
test.start()
except:
test._logger.error('!!!!!!!!!!!!! something is wrong !!!!!!!!!!!!!')
errorType = sys.exc_info()[0]
errorValue = sys.exc_info()[1]
errorTraceBack = traceback.extract_tb(sys.exc_info()[2])
test._logger.error('Error Type: ' + str(errorType))
test._logger.error('Error Value: ' + str(errorValue))
test._logger.error('Traceback: ')
for oneStack in errorTraceBack:
test._logger.error(oneStack)
NsmUtil.saveUid(test._uidList)
NsmUtil.saveResult(test._resultList)
NsmUtil.printHeadLine2('total test case: ' + str(test._totalTestCase))
NsmUtil.printHeadLine1('test completed')
if (not Define._DummyAgent and TestSimple.__online1 and TestSimple.__online2 and TestSimple.__online3 and TestSimple.__online4 and TestSimple.__online5):
time.sleep(300)
if Define._SaveNSMLog:
Reset.saveNSMLog()
if Define._CopyCreateRunningConfig:
Reset.copyCreateRunningConfig()
if Define._DeviceVerification:
perl = '/usr/local/ActivePerl-5.16/bin/perl'
dirNSMPerl = '/Users/huhe/Install/workspace/NSM-NBAPI-Perl'
dirDeviceVerification = dirNSMPerl + '/device-verification'
cmdPerlNSM = dirDeviceVerification + '/NSM.pl'
cmdPerlParse = dirDeviceVerification + '/Parse.pl'
cmdPerlProcess = dirDeviceVerification + '/Process.pl'
p = subprocess.Popen(perl + ' ' + cmdPerlNSM, shell=True, stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
for line in p.stdout.readlines(): print line
retval = p.wait()
p = subprocess.Popen(perl + ' ' + cmdPerlParse, shell=True, stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
for line in p.stdout.readlines(): print line
retval = p.wait()
p = subprocess.Popen(perl + ' ' + cmdPerlProcess, shell=True, stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
for line in p.stdout.readlines(): print line
retval = p.wait()
示例3: start1
# 需要导入模块: from isp.nsmUtil import NsmUtil [as 别名]
# 或者: from isp.nsmUtil.NsmUtil import saveResult [as 别名]
def start1():
test = TestAll()
try:
test.start()
except:
test._logger.error('!!!!!!!!!!!!! something is wrong !!!!!!!!!!!!!')
errorType = sys.exc_info()[0]
errorValue = sys.exc_info()[1]
errorTraceBack = traceback.extract_tb(sys.exc_info()[2])
test._logger.error('Error Type: ' + str(errorType))
test._logger.error('Error Value: ' + str(errorValue))
test._logger.error('Traceback: ')
for oneStack in errorTraceBack:
test._logger.error(oneStack)
NsmUtil.saveUid(test._uidList)
NsmUtil.saveResult(test._resultList)
NsmUtil.printHeadLine2('total test case: ' + str(test._totalTestCase))
NsmUtil.printHeadLine1('test completed')
示例4: str
# 需要导入模块: from isp.nsmUtil import NsmUtil [as 别名]
# 或者: from isp.nsmUtil.NsmUtil import saveResult [as 别名]
catalog = securedPrivateEdgeZone.getCatalog()
privateEdgeZoneLayer3Vlan = test.run(catalog, 'test-secured-private-edge-zone-layer3-vlan.json', online4)
catalog = tenant.getCatalog()
privateFirewallService1 = test.run(catalog, 'test-private-firewall-service-between-secured-and-unsecured-zone.json', True)
catalog = tenant.getCatalog()
privateFirewallService2 = test.run(catalog, 'test-private-firewall-service-between-secured-and-external-network.json', True)
except:
test._logger.error('!!!!!!!!!!!!! something is wrong !!!!!!!!!!!!!')
errorType = sys.exc_info()[0]
errorValue = sys.exc_info()[1]
errorTraceBack = traceback.extract_tb(sys.exc_info()[2])
test._logger.error('Error Type: ' + str(errorType))
test._logger.error('Error Value: ' + str(errorValue))
test._logger.error('Traceback: ')
for oneStack in errorTraceBack:
test._logger.error(oneStack)
NsmUtil.saveUid(test._uidList)
NsmUtil.saveResult(test._resultList)
NsmUtil.printHeadLine2('total test case: ' + str(test._totalTestCase))
NsmUtil.printHeadLine1('test completed')