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


Python NsmUtil.saveUid方法代码示例

本文整理汇总了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')
开发者ID:huhe56,项目名称:nsm-rest-api,代码行数:9,代码来源:test-simple-update.py

示例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()
开发者ID:huhe56,项目名称:nsm-rest-api,代码行数:49,代码来源:test-simple.py

示例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')
开发者ID:huhe56,项目名称:nsm-rest-api,代码行数:21,代码来源:test-all.py

示例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')
 
 
开发者ID:huhe56,项目名称:nsm-rest-api,代码行数:31,代码来源:test-devkit.py


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