本文整理汇总了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
示例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)
示例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
示例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
示例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
示例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 = {}
示例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
示例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')
示例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)
示例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)
示例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)
示例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)
示例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())
示例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)
示例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)