本文整理匯總了Python中isp.nsmUtil.NsmUtil.printStatusHeadLine2方法的典型用法代碼示例。如果您正苦於以下問題:Python NsmUtil.printStatusHeadLine2方法的具體用法?Python NsmUtil.printStatusHeadLine2怎麽用?Python NsmUtil.printStatusHeadLine2使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類isp.nsmUtil.NsmUtil
的用法示例。
在下文中一共展示了NsmUtil.printStatusHeadLine2方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。
示例1: verifyCreate
# 需要導入模塊: from isp.nsmUtil import NsmUtil [as 別名]
# 或者: from isp.nsmUtil.NsmUtil import printStatusHeadLine2 [as 別名]
def verifyCreate(self):
if self.mySubClassName != 'Pod' and self.isOffLine and self.createTaskXml: self.logger.info(Util.prettfyXmlByString(self.createTaskXml))
NsmUtil.printHeadLine2('START: create response verification: parameters from request body')
status = True
for key, value in self.requestParams.items():
keyItems = key.split('.')
pattern = None
if key.endswith('.ipv4.start'):
pattern = '<ipv4Start>' + value + '</ipv4Start>'
elif key.endswith('.ipv4.end'):
pattern = '<ipv4End>' + value + '</ipv4End>'
elif key.endswith('.ipv4') or key.endswith('.mask') or key.endswith('.protocol') or key.endswith('.start') or key.endswith('.end') or key.endswith('.ASNumber') or key.endswith('.uid') or key == 'name' or key == 'description':
pattern = '<' + keyItems[-1] + '>' + value + '</' + keyItems[-1] + '>'
elif key.endswith('.netmask'):
pattern = '<integer>' + value + '</integer>'
elif key.startswith('serverfarm.probe.') or key == 'lb.algorithm':
pattern = '<string>' + value + '</string>'
elif key.endswith('redirect.port'):
pattern = '<redirectPort>' + value + '</redirectPort>'
if pattern:
if self.createTaskXml.find(pattern) < 0:
status = False
NsmUtil.printStatusHeadLine2('Failed: pattern not found: ' + pattern)
else:
NsmUtil.printStatusHeadLine2('Passed: pattern found: ' + pattern)
NsmUtil.printHeadLine2('END: create response verification: parameters from request body')
return status
示例2: verifyUpdate
# 需要導入模塊: from isp.nsmUtil import NsmUtil [as 別名]
# 或者: from isp.nsmUtil.NsmUtil import printStatusHeadLine2 [as 別名]
def verifyUpdate(self, updateVerificationPatternList, storage):
if self.mySubClassName != 'Pod' and self.isOffLine and self.updateTaskXml: self.logger.info(Util.prettfyXmlByString(self.updateTaskXml))
NsmUtil.printHeadLine2('START: update response verification: parameters from request body')
status = True
for pattern in updateVerificationPatternList:
if self.updateTaskXml.find(pattern) < 0:
status = False
NsmUtil.printStatusHeadLine2('Failed: pattern not found: ' + pattern)
else:
NsmUtil.printStatusHeadLine2('Passed: pattern found: ' + pattern)
NsmUtil.printHeadLine2('END: update response verification: parameters from request body')
return status
示例3: verifyParamemtersExist
# 需要導入模塊: from isp.nsmUtil import NsmUtil [as 別名]
# 或者: from isp.nsmUtil.NsmUtil import printStatusHeadLine2 [as 別名]
def verifyParamemtersExist(self, params, responseXml):
NsmUtil.printHeadLine2('START: response verification: paramemters exist in response verification')
#if self.mySubClassName != 'Pod': self.logger.info(responseXml)
status = True
for param in params:
if responseXml.find(param) < 0:
status = False
NsmUtil.printStatusHeadLine2('Failed: pattern not found: ' + param)
else:
NsmUtil.printStatusHeadLine2('Passed: pattern found: ' + param)
NsmUtil.printHeadLine2('END: response verification: paramemters exist in response verification')
return status