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


Python Util.getLogger方法代码示例

本文整理汇总了Python中lib.Util.getLogger方法的典型用法代码示例。如果您正苦于以下问题:Python Util.getLogger方法的具体用法?Python Util.getLogger怎么用?Python Util.getLogger使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在lib.Util的用法示例。


在下文中一共展示了Util.getLogger方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: __init__

# 需要导入模块: from lib import Util [as 别名]
# 或者: from lib.Util import getLogger [as 别名]
 def __init__(self, taskXml):
     '''
     Constructor
     '''
     self.logger = Util.getLogger(self.__class__.__name__)
     self._loopCount = 10
     self.taskXml = taskXml
开发者ID:huhe56,项目名称:nsm-rest-api,代码行数:9,代码来源:task.py

示例2: __init__

# 需要导入模块: from lib import Util [as 别名]
# 或者: from lib.Util import getLogger [as 别名]
 def __init__(self, catalog, name=None, description=None, requestFileName='default-private-edge-zone.xml', requestParams=None):
     self.logger = Util.getLogger(self.__class__.__name__)
     Element.__init__(self)
     Element.setCatalogMatchParameter(self, PrivateEdgeZone._catalogServiceOfferingType, PrivateEdgeZone._catalogServiceOfferingName, PrivateEdgeZone._catalogLinkTitle)
     Element.setCreateParameter(self, name, description, requestFileName, requestParams)        
     Element.parseCatalog(self, catalog)
     
开发者ID:huhe56,项目名称:nsm-rest-api,代码行数:8,代码来源:privateEdgeZone.py

示例3: __init__

# 需要导入模块: from lib import Util [as 别名]
# 或者: from lib.Util import getLogger [as 别名]
 def __init__(self):
     self._logger = Util.getLogger(self.__class__.__name__)
     self._topName = 'My Default Top'
     self._thisObject = None
     self._dataStore = {}
     self._uidList = []
     self._resultList = []
     self._totalTestCase = 0
开发者ID:huhe56,项目名称:nsm-rest-api,代码行数:10,代码来源:test-devkit.py

示例4: __init__

# 需要导入模块: from lib import Util [as 别名]
# 或者: from lib.Util import getLogger [as 别名]
 def __init__(self):
     '''
     Constructor
     '''
     self.logger = Util.getLogger(self.__class__.__name__)
     
     self.mySubClassName = self.__class__.__name__
     self.logger.info('')
     self.logger.info('')
     self.logger.info('======================>>>>>> class name: ' + self.mySubClassName + ' <<<<<<<======================')
     self.logger.info('')
     self.logger.info('')
     
     self.getCatalogUrl = ''
     
     # for matching catalog
     self.catalogServiceOfferingType = ''
     self.catalogServiceOfferingName = ''
     self.catalogLinkTitle = ''
     
     # get from parent catalog for this child creation
     self.catalogUid = ''
     self.catalogName = ''
     self.catalogDescription = ''
     self.catalogVersion = ''
     self.catalogSelfUrl = ''
     self.catalogCreateUrl = ''
     
     self.createUid = ''
     self.createName = ''
     self.createDescription = ''
             
     self.createTaskXml = None
     self.getDetailUrl = ''
     self.detailXml = ''
     self.catalogXml = ''
     
     self.deleteUrl = ''
     self.deleteTaskXml = ''
     
     self.updateUrl = ''
     self.updateTaskXml = ''
     
     self.requestBodyFileName = ''
     self.requestBodyFilePath = ''
     self.requestParams = {}
     
     # get from detail
     self.uid = ''
     
     self.pod = None
     
     # debug switch, online by default
     self.isOffLine = False
开发者ID:huhe56,项目名称:nsm-rest-api,代码行数:56,代码来源:element.py

示例5: __init__

# 需要导入模块: from lib import Util [as 别名]
# 或者: from lib.Util import getLogger [as 别名]
    def __init__(self):
        self._logger = Util.getLogger(self.__class__.__name__)
        self._topName = 'My Default Top'
        self._thisObject = None
        self._dataStore = {}
        self._uidList = []
        self._resultList = []
        self._totalTestCase = 0
        self._metaPropertyTestCases = {}

        self._internetEdgeZoneLayer3VlanReservedIpAddressList = None
        self._securedInternetEdgeZoneLayer3VlanReservedIpAddressList = None
开发者ID:huhe56,项目名称:nsm-rest-api,代码行数:14,代码来源:test.py

示例6: __init__

# 需要导入模块: from lib import Util [as 别名]
# 或者: from lib.Util import getLogger [as 别名]
 def __init__(self, ipAddressPoolUid, name, parentName, category):
     self.logger = Util.getLogger(self.__class__.__name__)
     
     self.logger.info('')
     self.logger.info('')
     self.logger.info('======================>>>>>> class name: ' + self.__class__.__name__ + ' <<<<<<<======================')
     self.logger.info('')
     self.logger.info('')
     
     self.isOffLine = False
     
     self.ipAddressPoolUid = ipAddressPoolUid
     self.parentName = parentName
     self.category = category
     
     self.createName = name
     self.catalogXml = None
     self.relLinkDictionary = {}
开发者ID:huhe56,项目名称:nsm-rest-api,代码行数:20,代码来源:ipAddressPool.py

示例7: __init__

# 需要导入模块: from lib import Util [as 别名]
# 或者: from lib.Util import getLogger [as 别名]
 def __init__(self, host, usr, pwd, cmdFileName):
     
     self._subClassName = self.__class__.__name__
     self._logger = Util.getLogger(self._subClassName)
             
     self._cmdFileName = cmdFileName
     self._cmdFilePath = self._cmdFilePath = Define._PathDeviceCmd + '/' + self._cmdFileName
     
     self._cmdMap = Util.getJsonData(self._cmdFilePath)
     
     self._host = host
     self._usr  = usr
     self._pwd  = pwd
     
     if host in DeviceDefine._ACESMandVSSMap.keys():
         host = DeviceDefine._ACESMandVSSMap[host]
         '''
         also need to find VSS usr/pwd in the future
         '''
     
     self._expect = Expect(self._logger, host, usr, pwd)
     
     self._output = None
开发者ID:huhe56,项目名称:nsm-rest-api,代码行数:25,代码来源:deviceElement.py

示例8: Top

# 需要导入模块: from lib import Util [as 别名]
# 或者: from lib.Util import getLogger [as 别名]
from isp.externalConnection import ExternalConnection
from isp.securedInternetEdgeZone import SecuredInternetEdgeZone
from isp.firewallService import FirewallService
from isp.privateEdgeZone import PrivateEdgeZone
from isp.layer3PrivateAccessVlan import Layer3PrivateAccessVlan
from isp.privateMplsConnection import PrivateMplsConnection
from isp.securedPrivateEdgeZone import SecuredPrivateEdgeZone
from isp.ipAddressPool import IpAddressPool
from isp.ipReservation import IpReservation


if __name__ == '__main__':
    
    NsmUtil.mkPresetDir()
    
    logger = Util.getLogger(__file__)
    descriptionPrefix = 'This is the description of '
    
    name = 'My Default NSM V1'
    myNsmV1 = NsmV1(None, name)
    myNsmV1.setOffLine()
    myNsmV1.create('001')
    myNsmV1Catalog = myNsmV1.getCatalog('201')
    myNsmV1ProviderList = myNsmV1.getProviderList('301')
    
    name = 'My Default Top'
    myTop = Top(myNsmV1Catalog, name)
    myTop.setOffLine()
    myTop.create('001')
    myTopCatalog = myTop.getCatalog('201')
    
开发者ID:huhe56,项目名称:nsm-rest-api,代码行数:32,代码来源:delete-tenant-all.py

示例9: __init__

# 需要导入模块: from lib import Util [as 别名]
# 或者: from lib.Util import getLogger [as 别名]
 def __init__(self):
     self._logger = Util.getLogger(self.__class__.__name__)
     Test.__init__(self)
开发者ID:huhe56,项目名称:nsm-rest-api,代码行数:5,代码来源:test-simple-update.py

示例10: __init__

# 需要导入模块: from lib import Util [as 别名]
# 或者: from lib.Util import getLogger [as 别名]
 def __init__(self, catalog, name=None, description=None, requestFileName='default-tenant-network-container.xml', requestParams=None):
     self.logger = Util.getLogger(self.__class__.__name__)
     Element.__init__(self)
     Element.setCatalogMatchParameter(self, TenantNetworkContainer._catalogServiceOfferingType, TenantNetworkContainer._catalogServiceOfferingName, TenantNetworkContainer._catalogLinkTitle)
     Element.setCreateParameter(self, name, description, requestFileName, requestParams)        
     Element.parseCatalog(self, catalog)
开发者ID:huhe56,项目名称:nsm-rest-api,代码行数:8,代码来源:tenantNetworkContainer.py

示例11: Expect

# 需要导入模块: from lib import Util [as 别名]
# 或者: from lib.Util import getLogger [as 别名]
'''
Created on Oct 19, 2012

@author: huhe
'''
import time
from device.main.myClosure import MyClosure
from device.main.myExpect import Expect
from lib import Util

if __name__ == '__main__':
    logger = Util.getLogger('sample1.py')
    expect = Expect(logger, 'od-c3-asr-a', 'admin', 'cisco123')
    expect.expectIt('#')
    expect.sendIt('terminal length 0')
    i = expect.expectIt('#')
    expect.sendIt('show run')
    i = expect.expectIt('#')
    expect.sendIt('show run')
    i = expect.expectRegex('ntp source GigabitEthernet0')
    strbuffer = expect.printGetMatch()
    print 'i = ' + str(i)
    
    
开发者ID:huhe56,项目名称:nsm-rest-api,代码行数:24,代码来源:sample1.py

示例12: __init__

# 需要导入模块: from lib import Util [as 别名]
# 或者: from lib.Util import getLogger [as 别名]
 def __init__(self, catalog, name=None, description=None, requestFileName='default-layer3-explicit-subnet.xml', requestParams=None):
     self.logger = Util.getLogger(self.__class__.__name__)
     Element.__init__(self)
     Element.setCatalogMatchParameter(self, Layer3ExplicitSubnet._catalogServiceOfferingType, Layer3ExplicitSubnet._catalogServiceOfferingName, Layer3ExplicitSubnet._catalogLinkTitle)
     Element.setCreateParameter(self, name, description, requestFileName, requestParams)        
     Element.parseCatalog(self, catalog)
开发者ID:huhe56,项目名称:nsm-rest-api,代码行数:8,代码来源:layer3ExplicitSubnet.py

示例13: doGet

# 需要导入模块: from lib import Util [as 别名]
# 或者: from lib.Util import getLogger [as 别名]
@author: huhe
'''

import jarray, os
from java.security import Security
from java.io import DataOutputStream
from java.io import ByteArrayOutputStream
from java.net import URL
from javax.net.ssl import HttpsURLConnection;

from lib import Util
import MySSLProvider
import MyHostnameVerifier

logger = Util.getLogger(Util.getFileNameWithoutSuffix(__file__))

def doGet(url, credential):
    httpMethod = "GET"
    return doService(httpMethod, url, credential)

def doPost(url, credential, requestBody=None):
    httpMethod = "POST"
    return doService(httpMethod, url, credential, requestBody)

def doService(httpMethod, url, credential, requestBody=None):
    
    Security.addProvider(MySSLProvider())
    Security.setProperty("ssl.TrustManagerFactory.algorithm", "TrustAllCertificates")
    HttpsURLConnection.setDefaultHostnameVerifier(MyHostnameVerifier())
    
开发者ID:huhe56,项目名称:nsm-rest-api,代码行数:31,代码来源:HttpUtil.py

示例14: __init__

# 需要导入模块: from lib import Util [as 别名]
# 或者: from lib.Util import getLogger [as 别名]
 def __init__(self, catalog, name=None, description=None, requestFileName='default-load-balancer-service.xml', requestParams=None):
     self.logger = Util.getLogger(self.__class__.__name__)
     Element.__init__(self)
     Element.setCatalogMatchParameter(self, LoadBalancerService._catalogServiceOfferingType, LoadBalancerService._catalogServiceOfferingName, LoadBalancerService._catalogLinkTitle)
     Element.setCreateParameter(self, name, description, requestFileName, requestParams)        
     Element.parseCatalog(self, catalog)     
开发者ID:huhe56,项目名称:nsm-rest-api,代码行数:8,代码来源:loadBalancerService.py

示例15: __init__

# 需要导入模块: from lib import Util [as 别名]
# 或者: from lib.Util import getLogger [as 别名]
 def __init__(self, catalog, name=None, description=None, requestFileName='default-external-connection.xml', requestParams=None):
     self.logger = Util.getLogger(self.__class__.__name__)
     Element.__init__(self)
     Element.setCatalogMatchParameter(self, ExternalConnection._catalogServiceOfferingType, ExternalConnection._catalogServiceOfferingName, ExternalConnection._catalogLinkTitle)
     Element.setCreateParameter(self, name, description, requestFileName, requestParams)        
     Element.parseCatalog(self, catalog)
开发者ID:huhe56,项目名称:nsm-rest-api,代码行数:8,代码来源:externalConnection.py


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