本文整理匯總了Python中isp.nsmUtil.NsmUtil.saveUid方法的典型用法代碼示例。如果您正苦於以下問題:Python NsmUtil.saveUid方法的具體用法?Python NsmUtil.saveUid怎麽用?Python NsmUtil.saveUid使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類isp.nsmUtil.NsmUtil
的用法示例。
在下文中一共展示了NsmUtil.saveUid方法的4個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。
示例1: start2
# 需要導入模塊: from isp.nsmUtil import NsmUtil [as 別名]
# 或者: from isp.nsmUtil.NsmUtil import saveUid [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 saveUid [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 saveUid [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 saveUid [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')