content
stringlengths
7
1.05M
# This function checks if the number(num) # is a prime number or not # and It is the most fastest, the most optimised and the shortest function I have created so far # At first if number is greater than 1, # and it is not devided by 2 and it is not to itself either, # Then it devide this number to all prime numbers untill that number (num) # and if remains a 0 for any of the devides, so it is devidable so it is not a prime number. def is_prime(num): return all(num % i for i in range(3, int(num ** 0.5)+1, 2)) if num > 1 and num % 2 != 0 else True if num == 2 else False
#!/usr/bin/python # -*- coding: utf-8 -*- # 3. Программа, которая считывает длины катетов прямоугольного треугольника и вычисляет длину его гипотенузы number1 = int(input('Введите длину первого катета: ')) number2 = int(input('Введите длину второго катета: ')) hypotenuse = (number1 ** 2 + number2 ** 2) ** 0.5 print('Длина гипотенузы: {}'.format(hypotenuse))
#!/usr/bin/env python3 def permurarion(s, start): if not s or start<0: return if start == len(s) -1: print("".join(s)) else: i = start while i < len(s): s[i], s[start] = s[start], s[i] permurarion(s, start+1) s[i], s[start] = s[start], s[i] i += 1 def permulation_trans(s): strr = list(s) permurarion(strr, 0) if __name__ == '__main__': permulation_trans('ab')
""" Given a complete binary tree, count the number of nodes. Definition of a complete binary tree from Wikipedia: In a complete binary tree every level, except possibly the last, is completely filled, and all nodes in the last level are as far left as possible. It can have between 1 and 2h nodes inclusive at the last level h. """ # Definition for a binary tree node. # class TreeNode: # def __init__(self, x): # self.val = x # self.left = None # self.right = None class Solution: # @param {TreeNode} root # @return {integer} def countNodes(self, root): # base case if root == None: return 0 # max height from left height_left = 0 left = root while left: height_left += 1 left = left.left # max hight from right height_right = 0 right = root while right: height_right += 1 right = right.right # check if root holding a perfect tree ... (2^h - 1) nodes if height_left == height_right: return pow(2, height_left) - 1 # not perfect tree case return 1 + self.countNodes(root.left) + self.countNodes(root.right)
##Patterns: E1128 def test(): return None ##Err: E1128 no_value_returned = test()
def parse_mecab(block): res = [] for line in block.split('\n'): if line == '': return res (surface, attr) = line.split('\t') attr = attr.split(',') lineDict = { 'surface': surface, 'base': attr[6], 'pos': attr[0], 'pos1': attr[1] } res.append(lineDict) def extract_base(block): res = list(filter(lambda x: x['pos'] == '動詞', block)) res = [r['base'] for r in res] return res filename = 'ch04/neko.txt.mecab' with open(filename, mode='rt', encoding='utf-8') as f: blocks = f.read().split('EOS\n') blocks = list(filter(lambda x: x != '', blocks)) blocks = [parse_mecab(block) for block in blocks] ans = [extract_base(block) for block in blocks] print(ans[5])
# Class decorator alternative to mixins def LoggedMapping(cls): cls_getitem = cls.__getitem__ cls_setitem = cls.__setitem__ cls_delitem = cls.__delitem__ def __getitem__(self, key): print('Getting %s' % key) return cls_getitem(self, key) def __setitem__(self, key, value): print('Setting %s = %r' % (key, value)) return cls_setitem(self, key, value) def __delitem__(self, key): print('Deleting %s' % key) return cls_delitem(self, key) cls.__getitem__ = __getitem__ cls.__setitem__ = __setitem__ cls.__delitem__ = __delitem__ return cls @LoggedMapping class LoggedDict(dict): pass d = LoggedDict() d['x'] = 23 print(d['x']) del d['x']
t = int(input) while t: i = int(input()) print(sum([(-1 ** i) / (2 * i + 1) for i in range(i)])) t -= 1
# # PySNMP MIB module Finisher-MIB (http://snmplabs.com/pysmi) # ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/Finisher-MIB # Produced by pysmi-0.3.4 at Mon Apr 29 19:03:08 2019 # On host DAVWANG4-M-1475 platform Darwin version 18.5.0 by user davwang4 # Using Python version 3.7.3 (default, Mar 27 2019, 09:23:15) # ObjectIdentifier, Integer, OctetString = mibBuilder.importSymbols("ASN1", "ObjectIdentifier", "Integer", "OctetString") NamedValues, = mibBuilder.importSymbols("ASN1-ENUMERATION", "NamedValues") ConstraintsIntersection, ValueRangeConstraint, ConstraintsUnion, ValueSizeConstraint, SingleValueConstraint = mibBuilder.importSymbols("ASN1-REFINEMENT", "ConstraintsIntersection", "ValueRangeConstraint", "ConstraintsUnion", "ValueSizeConstraint", "SingleValueConstraint") hrDeviceIndex, = mibBuilder.importSymbols("HOST-RESOURCES-MIB", "hrDeviceIndex") PrtMarkerSuppliesTypeTC, PrtMarkerSuppliesClassTC, PrtMediaUnitTC, PrtCapacityUnitTC, prtMIBConformance, PresentOnOff, PrtSubUnitStatusTC, PrtMarkerSuppliesSupplyUnitTC, printmib, PrtInputTypeTC = mibBuilder.importSymbols("Printer-MIB", "PrtMarkerSuppliesTypeTC", "PrtMarkerSuppliesClassTC", "PrtMediaUnitTC", "PrtCapacityUnitTC", "prtMIBConformance", "PresentOnOff", "PrtSubUnitStatusTC", "PrtMarkerSuppliesSupplyUnitTC", "printmib", "PrtInputTypeTC") ObjectGroup, ModuleCompliance, NotificationGroup = mibBuilder.importSymbols("SNMPv2-CONF", "ObjectGroup", "ModuleCompliance", "NotificationGroup") Bits, ObjectIdentity, ModuleIdentity, experimental, TimeTicks, Counter32, Gauge32, Unsigned32, IpAddress, MibIdentifier, Integer32, mib_2, NotificationType, MibScalar, MibTable, MibTableRow, MibTableColumn, Counter64, iso = mibBuilder.importSymbols("SNMPv2-SMI", "Bits", "ObjectIdentity", "ModuleIdentity", "experimental", "TimeTicks", "Counter32", "Gauge32", "Unsigned32", "IpAddress", "MibIdentifier", "Integer32", "mib-2", "NotificationType", "MibScalar", "MibTable", "MibTableRow", "MibTableColumn", "Counter64", "iso") DisplayString, TextualConvention = mibBuilder.importSymbols("SNMPv2-TC", "DisplayString", "TextualConvention") finisherMIB = ModuleIdentity((1, 3, 6, 1, 3, 64)) if mibBuilder.loadTexts: finisherMIB.setLastUpdated('9810090000Z') if mibBuilder.loadTexts: finisherMIB.setOrganization('IETF Printer MIB Working Group') class FinDeviceTypeTC(TextualConvention, Integer32): status = 'current' subtypeSpec = Integer32.subtypeSpec + ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17)) namedValues = NamedValues(("other", 1), ("unknown", 2), ("stitcher", 3), ("folder", 4), ("binder", 5), ("trimmer", 6), ("dieCutter", 7), ("puncher", 8), ("perforater", 9), ("slitter", 10), ("separationCutter", 11), ("imprinter", 12), ("wrapper", 13), ("bander", 14), ("makeEnvelope", 15), ("stacker", 16), ("sheetRotator", 17)) class FinAttributeTypeTC(TextualConvention, Integer32): status = 'current' subtypeSpec = Integer32.subtypeSpec + ConstraintsUnion(SingleValueConstraint(1, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 30, 31, 40, 50, 80, 81, 82, 83, 100, 130, 160, 161, 162)) namedValues = NamedValues(("other", 1), ("deviceName", 3), ("deviceVendorName", 4), ("deviceModel", 5), ("deviceVersion", 6), ("deviceSerialNumber", 7), ("maximumSheets", 8), ("finProcessOffsetUnits", 9), ("finReferenceEdge", 10), ("finAxisOffset", 11), ("finJogEdge", 12), ("finHeadLocation", 13), ("finOperationRestrictions", 14), ("finNumberOfPositions", 15), ("namedConfiguration", 16), ("finMediaTypeRestriction", 17), ("finPrinterInputTraySupported", 18), ("finPreviousFinishingOperation", 19), ("finNextFinishingOperation", 20), ("stitchingType", 30), ("stitchingDirection", 31), ("foldingType", 40), ("bindingType", 50), ("punchHoleType", 80), ("punchHoleSizeLongDim", 81), ("punchHoleSizeShortDim", 82), ("punchPattern", 83), ("slittingType", 100), ("wrappingType", 130), ("stackOutputType", 160), ("stackOffset", 161), ("stackRotation", 162)) class FinEdgeTC(TextualConvention, Integer32): status = 'current' subtypeSpec = Integer32.subtypeSpec + ConstraintsUnion(SingleValueConstraint(3, 4, 5, 6)) namedValues = NamedValues(("topEdge", 3), ("bottomEdge", 4), ("leftEdge", 5), ("rightEdge", 6)) class FinStitchingTypeTC(TextualConvention, Integer32): status = 'current' subtypeSpec = Integer32.subtypeSpec + ConstraintsUnion(SingleValueConstraint(1, 2, 4, 5, 6, 7, 8, 9, 10)) namedValues = NamedValues(("other", 1), ("unknown", 2), ("stapleTopLeft", 4), ("stapleBottomLeft", 5), ("stapleTopRight", 6), ("stapleBottomRight", 7), ("saddleStitch", 8), ("edgeStitch", 9), ("stapleDual", 10)) class StitchingDirTypeTC(TextualConvention, Integer32): status = 'current' subtypeSpec = Integer32.subtypeSpec + ConstraintsUnion(SingleValueConstraint(2, 3, 4)) namedValues = NamedValues(("unknown", 2), ("topDown", 3), ("bottomUp", 4)) class StitchingAngleTypeTC(TextualConvention, Integer32): status = 'current' subtypeSpec = Integer32.subtypeSpec + ConstraintsUnion(SingleValueConstraint(2, 3, 4, 5)) namedValues = NamedValues(("unknown", 2), ("horizontal", 3), ("vertical", 4), ("slanted", 5)) class FinFoldingTypeTC(TextualConvention, Integer32): status = 'current' subtypeSpec = Integer32.subtypeSpec + ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4, 5)) namedValues = NamedValues(("other", 1), ("unknown", 2), ("zFold", 3), ("halfFold", 4), ("letterFold", 5)) class FinBindingTypeTC(TextualConvention, Integer32): status = 'current' subtypeSpec = Integer32.subtypeSpec + ConstraintsUnion(SingleValueConstraint(1, 2, 4, 5, 6, 7, 8, 9, 10, 11)) namedValues = NamedValues(("other", 1), ("unknown", 2), ("tape", 4), ("plastic", 5), ("velo", 6), ("perfect", 7), ("spiral", 8), ("adhesive", 9), ("comb", 10), ("padding", 11)) class FinPunchHoleTypeTC(TextualConvention, Integer32): status = 'current' subtypeSpec = Integer32.subtypeSpec + ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4, 5, 6, 7)) namedValues = NamedValues(("other", 1), ("unknown", 2), ("round", 3), ("oblong", 4), ("square", 5), ("rectangular", 6), ("star", 7)) class FinPunchPatternTC(TextualConvention, Integer32): status = 'current' subtypeSpec = Integer32.subtypeSpec + ConstraintsUnion(SingleValueConstraint(1, 2, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18)) namedValues = NamedValues(("other", 1), ("unknown", 2), ("twoHoleUSTop", 4), ("threeHoleUS", 5), ("twoHoleDIN", 6), ("fourHoleDIN", 7), ("twentyTwoHoleUS", 8), ("nineteenHoleUS", 9), ("twoHoleMetric", 10), ("swedish4Hole", 11), ("twoHoleUSSide", 12), ("fiveHoleUS", 13), ("sevenHoleUS", 14), ("mixed7H4S", 15), ("norweg6Hole", 16), ("metric26Hole", 17), ("metric30Hole", 18)) class FinSlittingTypeTC(TextualConvention, Integer32): status = 'current' subtypeSpec = Integer32.subtypeSpec + ConstraintsUnion(SingleValueConstraint(1, 2, 4, 5)) namedValues = NamedValues(("other", 1), ("unknown", 2), ("slitAndSeparate", 4), ("slitAndMerge", 5)) class FinWrappingTypeTC(TextualConvention, Integer32): status = 'current' subtypeSpec = Integer32.subtypeSpec + ConstraintsUnion(SingleValueConstraint(1, 2, 4, 5)) namedValues = NamedValues(("other", 1), ("unknown", 2), ("shrinkWrap", 4), ("paperWrap", 5)) class FinStackOutputTypeTC(TextualConvention, Integer32): status = 'current' subtypeSpec = Integer32.subtypeSpec + ConstraintsUnion(SingleValueConstraint(1, 2, 4, 5, 6)) namedValues = NamedValues(("other", 1), ("unknown", 2), ("straight", 4), ("offset", 5), ("crissCross", 6)) finDevice = MibIdentifier((1, 3, 6, 1, 2, 1, 43, 30)) finDeviceTable = MibTable((1, 3, 6, 1, 2, 1, 43, 30, 1), ) if mibBuilder.loadTexts: finDeviceTable.setStatus('current') finDeviceEntry = MibTableRow((1, 3, 6, 1, 2, 1, 43, 30, 1, 1), ).setIndexNames((0, "HOST-RESOURCES-MIB", "hrDeviceIndex"), (0, "Finisher-MIB", "finDeviceIndex")) if mibBuilder.loadTexts: finDeviceEntry.setStatus('current') finDeviceIndex = MibTableColumn((1, 3, 6, 1, 2, 1, 43, 30, 1, 1, 1), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 65535))) if mibBuilder.loadTexts: finDeviceIndex.setStatus('current') finDeviceType = MibTableColumn((1, 3, 6, 1, 2, 1, 43, 30, 1, 1, 2), FinDeviceTypeTC()).setMaxAccess("readonly") if mibBuilder.loadTexts: finDeviceType.setStatus('current') finDevicePresentOnOff = MibTableColumn((1, 3, 6, 1, 2, 1, 43, 30, 1, 1, 3), PresentOnOff().clone('notPresent')).setMaxAccess("readwrite") if mibBuilder.loadTexts: finDevicePresentOnOff.setStatus('current') finDeviceCapacityUnit = MibTableColumn((1, 3, 6, 1, 2, 1, 43, 30, 1, 1, 4), PrtCapacityUnitTC()).setMaxAccess("readonly") if mibBuilder.loadTexts: finDeviceCapacityUnit.setStatus('current') finDeviceMaxCapacity = MibTableColumn((1, 3, 6, 1, 2, 1, 43, 30, 1, 1, 5), Integer32().subtype(subtypeSpec=ValueRangeConstraint(-2, 2147483647)).clone(-2)).setMaxAccess("readwrite") if mibBuilder.loadTexts: finDeviceMaxCapacity.setStatus('current') finDeviceCurrentCapacity = MibTableColumn((1, 3, 6, 1, 2, 1, 43, 30, 1, 1, 6), Integer32().subtype(subtypeSpec=ValueRangeConstraint(-2, 2147483647)).clone(-2)).setMaxAccess("readwrite") if mibBuilder.loadTexts: finDeviceCurrentCapacity.setStatus('current') finDeviceAssociatedMediaPaths = MibTableColumn((1, 3, 6, 1, 2, 1, 43, 30, 1, 1, 7), OctetString()).setMaxAccess("readonly") if mibBuilder.loadTexts: finDeviceAssociatedMediaPaths.setStatus('current') finDeviceAssociatedOutputs = MibTableColumn((1, 3, 6, 1, 2, 1, 43, 30, 1, 1, 8), OctetString()).setMaxAccess("readonly") if mibBuilder.loadTexts: finDeviceAssociatedOutputs.setStatus('current') finDeviceStatus = MibTableColumn((1, 3, 6, 1, 2, 1, 43, 30, 1, 1, 9), PrtSubUnitStatusTC().clone(5)).setMaxAccess("readonly") if mibBuilder.loadTexts: finDeviceStatus.setStatus('current') finDeviceDescription = MibTableColumn((1, 3, 6, 1, 2, 1, 43, 30, 1, 1, 10), OctetString().subtype(subtypeSpec=ValueSizeConstraint(0, 255))).setMaxAccess("readonly") if mibBuilder.loadTexts: finDeviceDescription.setStatus('current') finSupply = MibIdentifier((1, 3, 6, 1, 2, 1, 43, 31)) finSupplyTable = MibTable((1, 3, 6, 1, 2, 1, 43, 31, 1), ) if mibBuilder.loadTexts: finSupplyTable.setStatus('current') finSupplyEntry = MibTableRow((1, 3, 6, 1, 2, 1, 43, 31, 1, 1), ).setIndexNames((0, "HOST-RESOURCES-MIB", "hrDeviceIndex"), (0, "Finisher-MIB", "finSupplyIndex")) if mibBuilder.loadTexts: finSupplyEntry.setStatus('current') finSupplyIndex = MibTableColumn((1, 3, 6, 1, 2, 1, 43, 31, 1, 1, 1), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 65535))) if mibBuilder.loadTexts: finSupplyIndex.setStatus('current') finSupplyDeviceIndex = MibTableColumn((1, 3, 6, 1, 2, 1, 43, 31, 1, 1, 2), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 65535))).setMaxAccess("readonly") if mibBuilder.loadTexts: finSupplyDeviceIndex.setStatus('current') finSupplyClass = MibTableColumn((1, 3, 6, 1, 2, 1, 43, 31, 1, 1, 3), PrtMarkerSuppliesClassTC()).setMaxAccess("readonly") if mibBuilder.loadTexts: finSupplyClass.setStatus('current') finSupplyType = MibTableColumn((1, 3, 6, 1, 2, 1, 43, 31, 1, 1, 4), PrtMarkerSuppliesTypeTC()).setMaxAccess("readonly") if mibBuilder.loadTexts: finSupplyType.setStatus('current') finSupplyDescription = MibTableColumn((1, 3, 6, 1, 2, 1, 43, 31, 1, 1, 5), OctetString().subtype(subtypeSpec=ValueSizeConstraint(0, 255))).setMaxAccess("readonly") if mibBuilder.loadTexts: finSupplyDescription.setStatus('current') finSupplyUnit = MibTableColumn((1, 3, 6, 1, 2, 1, 43, 31, 1, 1, 6), PrtMarkerSuppliesSupplyUnitTC()).setMaxAccess("readonly") if mibBuilder.loadTexts: finSupplyUnit.setStatus('current') finSupplyMaxCapacity = MibTableColumn((1, 3, 6, 1, 2, 1, 43, 31, 1, 1, 7), Integer32().subtype(subtypeSpec=ValueRangeConstraint(-2, 2147483647)).clone(-2)).setMaxAccess("readwrite") if mibBuilder.loadTexts: finSupplyMaxCapacity.setStatus('current') finSupplyCurrentLevel = MibTableColumn((1, 3, 6, 1, 2, 1, 43, 31, 1, 1, 8), Integer32().clone(-2)).setMaxAccess("readwrite") if mibBuilder.loadTexts: finSupplyCurrentLevel.setStatus('current') finSupplyColorName = MibTableColumn((1, 3, 6, 1, 2, 1, 43, 31, 1, 1, 9), OctetString().subtype(subtypeSpec=ValueSizeConstraint(0, 63))).setMaxAccess("readonly") if mibBuilder.loadTexts: finSupplyColorName.setStatus('current') finSupplyMediaInput = MibIdentifier((1, 3, 6, 1, 2, 1, 43, 32)) finSupplyMediaInputTable = MibTable((1, 3, 6, 1, 2, 1, 43, 32, 1), ) if mibBuilder.loadTexts: finSupplyMediaInputTable.setStatus('current') finSupplyMediaInputEntry = MibTableRow((1, 3, 6, 1, 2, 1, 43, 32, 1, 1), ).setIndexNames((0, "HOST-RESOURCES-MIB", "hrDeviceIndex"), (0, "Finisher-MIB", "finSupplyMediaInputIndex")) if mibBuilder.loadTexts: finSupplyMediaInputEntry.setStatus('current') finSupplyMediaInputIndex = MibTableColumn((1, 3, 6, 1, 2, 1, 43, 32, 1, 1, 1), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 65535))) if mibBuilder.loadTexts: finSupplyMediaInputIndex.setStatus('current') finSupplyMediaInputDeviceIndex = MibTableColumn((1, 3, 6, 1, 2, 1, 43, 32, 1, 1, 2), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 65535))).setMaxAccess("readonly") if mibBuilder.loadTexts: finSupplyMediaInputDeviceIndex.setStatus('current') finSupplyMediaInputSupplyIndex = MibTableColumn((1, 3, 6, 1, 2, 1, 43, 32, 1, 1, 3), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 65535))).setMaxAccess("readonly") if mibBuilder.loadTexts: finSupplyMediaInputSupplyIndex.setStatus('current') finSupplyMediaInputType = MibTableColumn((1, 3, 6, 1, 2, 1, 43, 32, 1, 1, 4), PrtInputTypeTC()).setMaxAccess("readonly") if mibBuilder.loadTexts: finSupplyMediaInputType.setStatus('current') finSupplyMediaInputDimUnit = MibTableColumn((1, 3, 6, 1, 2, 1, 43, 32, 1, 1, 5), PrtMediaUnitTC()).setMaxAccess("readonly") if mibBuilder.loadTexts: finSupplyMediaInputDimUnit.setStatus('current') finSupplyMediaInputMediaDimFeedDir = MibTableColumn((1, 3, 6, 1, 2, 1, 43, 32, 1, 1, 6), Integer32().subtype(subtypeSpec=ValueRangeConstraint(-2, 2147483647))).setMaxAccess("readwrite") if mibBuilder.loadTexts: finSupplyMediaInputMediaDimFeedDir.setStatus('current') finSupplyMediaInputMediaDimXFeedDir = MibTableColumn((1, 3, 6, 1, 2, 1, 43, 32, 1, 1, 7), Integer32().subtype(subtypeSpec=ValueRangeConstraint(-2, 2147483647))).setMaxAccess("readwrite") if mibBuilder.loadTexts: finSupplyMediaInputMediaDimXFeedDir.setStatus('current') finSupplyMediaInputStatus = MibTableColumn((1, 3, 6, 1, 2, 1, 43, 32, 1, 1, 8), PrtSubUnitStatusTC().clone(5)).setMaxAccess("readonly") if mibBuilder.loadTexts: finSupplyMediaInputStatus.setStatus('current') finSupplyMediaInputMediaName = MibTableColumn((1, 3, 6, 1, 2, 1, 43, 32, 1, 1, 9), OctetString().subtype(subtypeSpec=ValueSizeConstraint(0, 63))).setMaxAccess("readwrite") if mibBuilder.loadTexts: finSupplyMediaInputMediaName.setStatus('current') finSupplyMediaInputName = MibTableColumn((1, 3, 6, 1, 2, 1, 43, 32, 1, 1, 10), OctetString().subtype(subtypeSpec=ValueSizeConstraint(0, 63))).setMaxAccess("readwrite") if mibBuilder.loadTexts: finSupplyMediaInputName.setStatus('current') finSupplyMediaInputDescription = MibTableColumn((1, 3, 6, 1, 2, 1, 43, 32, 1, 1, 11), OctetString().subtype(subtypeSpec=ValueSizeConstraint(0, 255))).setMaxAccess("readonly") if mibBuilder.loadTexts: finSupplyMediaInputDescription.setStatus('current') finSupplyMediaInputSecurity = MibTableColumn((1, 3, 6, 1, 2, 1, 43, 32, 1, 1, 12), PresentOnOff()).setMaxAccess("readwrite") if mibBuilder.loadTexts: finSupplyMediaInputSecurity.setStatus('current') finSupplyMediaInputMediaWeight = MibTableColumn((1, 3, 6, 1, 2, 1, 43, 32, 1, 1, 13), Integer32()).setMaxAccess("readwrite") if mibBuilder.loadTexts: finSupplyMediaInputMediaWeight.setStatus('current') finSupplyMediaInputMediaThickness = MibTableColumn((1, 3, 6, 1, 2, 1, 43, 32, 1, 1, 14), Integer32().subtype(subtypeSpec=ValueRangeConstraint(-2, 2147483647))).setMaxAccess("readwrite") if mibBuilder.loadTexts: finSupplyMediaInputMediaThickness.setStatus('current') finSupplyMediaInputMediaType = MibTableColumn((1, 3, 6, 1, 2, 1, 43, 32, 1, 1, 15), OctetString().subtype(subtypeSpec=ValueSizeConstraint(0, 63))).setMaxAccess("readwrite") if mibBuilder.loadTexts: finSupplyMediaInputMediaType.setStatus('current') finDeviceAttribute = MibIdentifier((1, 3, 6, 1, 2, 1, 43, 33)) finDeviceAttributeTable = MibTable((1, 3, 6, 1, 2, 1, 43, 33, 1), ) if mibBuilder.loadTexts: finDeviceAttributeTable.setStatus('current') finDeviceAttributeEntry = MibTableRow((1, 3, 6, 1, 2, 1, 43, 33, 1, 1), ).setIndexNames((0, "HOST-RESOURCES-MIB", "hrDeviceIndex"), (0, "Finisher-MIB", "finDeviceIndex"), (0, "Finisher-MIB", "finDeviceAttributeTypeIndex"), (0, "Finisher-MIB", "finDeviceAttributeInstanceIndex")) if mibBuilder.loadTexts: finDeviceAttributeEntry.setStatus('current') finDeviceAttributeTypeIndex = MibTableColumn((1, 3, 6, 1, 2, 1, 43, 33, 1, 1, 1), FinAttributeTypeTC()) if mibBuilder.loadTexts: finDeviceAttributeTypeIndex.setStatus('current') finDeviceAttributeInstanceIndex = MibTableColumn((1, 3, 6, 1, 2, 1, 43, 33, 1, 1, 2), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 65535))) if mibBuilder.loadTexts: finDeviceAttributeInstanceIndex.setStatus('current') finDeviceAttributeValueAsInteger = MibTableColumn((1, 3, 6, 1, 2, 1, 43, 33, 1, 1, 3), Integer32().subtype(subtypeSpec=ValueRangeConstraint(-2, 2147483647)).clone(-2)).setMaxAccess("readwrite") if mibBuilder.loadTexts: finDeviceAttributeValueAsInteger.setStatus('current') finDeviceAttributeValueAsOctets = MibTableColumn((1, 3, 6, 1, 2, 1, 43, 33, 1, 1, 4), OctetString().subtype(subtypeSpec=ValueSizeConstraint(0, 63)).clone(hexValue="")).setMaxAccess("readwrite") if mibBuilder.loadTexts: finDeviceAttributeValueAsOctets.setStatus('current') finMIBCompliance = ModuleCompliance((1, 3, 6, 1, 2, 1, 43, 2, 3)).setObjects(("Finisher-MIB", "finDeviceGroup"), ("Finisher-MIB", "finSupplyGroup"), ("Finisher-MIB", "finDeviceAttributeGroup")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): finMIBCompliance = finMIBCompliance.setStatus('current') finMIBGroups = MibIdentifier((1, 3, 6, 1, 2, 1, 43, 2, 4)) finDeviceGroup = ObjectGroup((1, 3, 6, 1, 2, 1, 43, 2, 4, 1)).setObjects(("Finisher-MIB", "finDeviceType"), ("Finisher-MIB", "finDevicePresentOnOff"), ("Finisher-MIB", "finDeviceCapacityUnit"), ("Finisher-MIB", "finDeviceMaxCapacity"), ("Finisher-MIB", "finDeviceCurrentCapacity"), ("Finisher-MIB", "finDeviceAssociatedMediaPaths"), ("Finisher-MIB", "finDeviceAssociatedOutputs"), ("Finisher-MIB", "finDeviceStatus"), ("Finisher-MIB", "finDeviceDescription")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): finDeviceGroup = finDeviceGroup.setStatus('current') finSupplyGroup = ObjectGroup((1, 3, 6, 1, 2, 1, 43, 2, 4, 2)).setObjects(("Finisher-MIB", "finSupplyDeviceIndex"), ("Finisher-MIB", "finSupplyClass"), ("Finisher-MIB", "finSupplyType"), ("Finisher-MIB", "finSupplyDescription"), ("Finisher-MIB", "finSupplyUnit"), ("Finisher-MIB", "finSupplyMaxCapacity"), ("Finisher-MIB", "finSupplyCurrentLevel"), ("Finisher-MIB", "finSupplyColorName")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): finSupplyGroup = finSupplyGroup.setStatus('current') finSupplyMediaInputGroup = ObjectGroup((1, 3, 6, 1, 2, 1, 43, 2, 4, 3)).setObjects(("Finisher-MIB", "finSupplyMediaInputDeviceIndex"), ("Finisher-MIB", "finSupplyMediaInputSupplyIndex"), ("Finisher-MIB", "finSupplyMediaInputType"), ("Finisher-MIB", "finSupplyMediaInputDimUnit"), ("Finisher-MIB", "finSupplyMediaInputMediaDimFeedDir"), ("Finisher-MIB", "finSupplyMediaInputMediaDimXFeedDir"), ("Finisher-MIB", "finSupplyMediaInputStatus"), ("Finisher-MIB", "finSupplyMediaInputMediaName"), ("Finisher-MIB", "finSupplyMediaInputName"), ("Finisher-MIB", "finSupplyMediaInputDescription"), ("Finisher-MIB", "finSupplyMediaInputSecurity"), ("Finisher-MIB", "finSupplyMediaInputMediaWeight"), ("Finisher-MIB", "finSupplyMediaInputMediaThickness"), ("Finisher-MIB", "finSupplyMediaInputMediaType")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): finSupplyMediaInputGroup = finSupplyMediaInputGroup.setStatus('current') finDeviceAttributeGroup = ObjectGroup((1, 3, 6, 1, 2, 1, 43, 2, 4, 4)).setObjects(("Finisher-MIB", "finDeviceAttributeValueAsInteger"), ("Finisher-MIB", "finDeviceAttributeValueAsOctets")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): finDeviceAttributeGroup = finDeviceAttributeGroup.setStatus('current') mibBuilder.exportSymbols("Finisher-MIB", PYSNMP_MODULE_ID=finisherMIB, finSupplyMediaInputMediaType=finSupplyMediaInputMediaType, finSupplyMediaInputName=finSupplyMediaInputName, finDeviceAttributeTypeIndex=finDeviceAttributeTypeIndex, finSupplyGroup=finSupplyGroup, finDeviceTable=finDeviceTable, finSupplyDeviceIndex=finSupplyDeviceIndex, finDeviceType=finDeviceType, finSupplyMediaInput=finSupplyMediaInput, finSupplyMediaInputMediaDimFeedDir=finSupplyMediaInputMediaDimFeedDir, FinStackOutputTypeTC=FinStackOutputTypeTC, FinEdgeTC=FinEdgeTC, finSupplyMediaInputMediaDimXFeedDir=finSupplyMediaInputMediaDimXFeedDir, finSupplyMediaInputMediaName=finSupplyMediaInputMediaName, finDeviceAttributeValueAsOctets=finDeviceAttributeValueAsOctets, finSupplyEntry=finSupplyEntry, finDeviceStatus=finDeviceStatus, finDeviceAttributeValueAsInteger=finDeviceAttributeValueAsInteger, FinDeviceTypeTC=FinDeviceTypeTC, FinFoldingTypeTC=FinFoldingTypeTC, finDeviceAssociatedOutputs=finDeviceAssociatedOutputs, FinPunchPatternTC=FinPunchPatternTC, finSupplyCurrentLevel=finSupplyCurrentLevel, finSupplyMediaInputTable=finSupplyMediaInputTable, finSupplyMediaInputMediaThickness=finSupplyMediaInputMediaThickness, finDeviceMaxCapacity=finDeviceMaxCapacity, finDeviceAttributeTable=finDeviceAttributeTable, finDeviceGroup=finDeviceGroup, finSupplyMediaInputDimUnit=finSupplyMediaInputDimUnit, finSupplyMediaInputIndex=finSupplyMediaInputIndex, finSupplyMediaInputEntry=finSupplyMediaInputEntry, finSupplyMediaInputSecurity=finSupplyMediaInputSecurity, FinBindingTypeTC=FinBindingTypeTC, StitchingDirTypeTC=StitchingDirTypeTC, finDeviceCurrentCapacity=finDeviceCurrentCapacity, finDeviceAssociatedMediaPaths=finDeviceAssociatedMediaPaths, finSupplyIndex=finSupplyIndex, finSupplyType=finSupplyType, finSupplyMaxCapacity=finSupplyMaxCapacity, FinStitchingTypeTC=FinStitchingTypeTC, finDeviceDescription=finDeviceDescription, finSupplyMediaInputDeviceIndex=finSupplyMediaInputDeviceIndex, FinPunchHoleTypeTC=FinPunchHoleTypeTC, finisherMIB=finisherMIB, finSupplyColorName=finSupplyColorName, finMIBGroups=finMIBGroups, finSupplyMediaInputGroup=finSupplyMediaInputGroup, finSupplyMediaInputType=finSupplyMediaInputType, finDeviceAttributeGroup=finDeviceAttributeGroup, finSupplyMediaInputSupplyIndex=finSupplyMediaInputSupplyIndex, finSupplyClass=finSupplyClass, FinWrappingTypeTC=FinWrappingTypeTC, finMIBCompliance=finMIBCompliance, finSupplyTable=finSupplyTable, finDeviceEntry=finDeviceEntry, finDevicePresentOnOff=finDevicePresentOnOff, finSupplyMediaInputDescription=finSupplyMediaInputDescription, finDeviceCapacityUnit=finDeviceCapacityUnit, finSupplyUnit=finSupplyUnit, finSupplyMediaInputStatus=finSupplyMediaInputStatus, finDeviceAttribute=finDeviceAttribute, finDevice=finDevice, FinAttributeTypeTC=FinAttributeTypeTC, StitchingAngleTypeTC=StitchingAngleTypeTC, finSupply=finSupply, finSupplyDescription=finSupplyDescription, finSupplyMediaInputMediaWeight=finSupplyMediaInputMediaWeight, finDeviceAttributeEntry=finDeviceAttributeEntry, FinSlittingTypeTC=FinSlittingTypeTC, finDeviceIndex=finDeviceIndex, finDeviceAttributeInstanceIndex=finDeviceAttributeInstanceIndex)
#!/usr/bin/env python3 N = int(input().strip()) arr = [int(i) for i in input().strip().split()] sorted_arr = sorted(arr) diff_arr = [sorted_arr[i + 1] - sorted_arr[i] for i in range(0, N - 1)] min_diff = min(diff_arr) idx = [i for i in range(len(diff_arr)) if diff_arr[i] == min_diff] for i in idx: print(sorted_arr[i], sorted_arr[i + 1], end=' ') print()
expected_output = { "pod": { 1: { "node": { 1: { "name": "msl-ifav205-ifc1", "node": 1, "pod": 1, "role": "controller", "version": "5.1(2e)" }, 101: { "name": "msl-ifav205-leaf1", "node": 101, "pod": 1, "role": "leaf", "version": "n9000-15.1(2e)" }, 201: { "name": "msl-ifav205-spine1", "node": 201, "pod": 1, "role": "spine", "version": "n9000-15.1(2e)" }, 202: { "name": "msl-ifav205-spine2", "node": 202, "pod": 1, "role": "spine", "version": "n9000-14.2(2e)" } } } } }
# # Copyright (c) 2017 Digital Shadows Ltd. # # Licensed under Apache 2.0 (https://www.apache.org/licenses/LICENSE-2.0.txt) # __version__ = '1.1.0'
# Вам нужно реализовать функцию rotate, которая должна принимать список в качестве аргумента и делать над ним следующее # преобразование (список нужно изменять "на месте"!): последний элемент списка должен быть перемещён в начало списка # (см. пример ниже). Если функция получает пустой список, то изменять его она не должна. def rotate(foo): foo.insert(0, foo.pop(-1)) if foo else None l = [1, 2, 3] rotate(l) print(l)
test = open('test.txt', 'r') arr = [] for group in test: arr.append(int(group.split()[0])) # Correct Answers: # - Part 1: 10884537 # - Part 2: 1261309 # ======= Part 1 ======= def part1(): for i in range(25, len(arr)): sum = False for j in range(i - 25, i): if arr[i] - arr[j] in arr[i - 25 : i] and arr[i] - arr[j] != arr[j]: sum = True break if not sum: return arr[i] # ======= Part 2 ======= index = arr.index(part1()) for i in range(len(arr[ : index])): total = 0 lastNum = 0 for j in arr[i : index]: if total == arr[index]: break total += j lastNum = arr.index(j) if total == arr[index]: sortedNums = sorted(arr[i : lastNum + 1]) print('Part 1:', part1()) print('Part 2:', sortedNums[0] + sortedNums[len(sortedNums) - 1]) break
#!/usr/bin/python3 # -*-coding:utf-8-*- __author__ = "Bannings" class Solution: def detectCapitalUse(self, word: str) -> bool: isupper = word[-1].isupper() for i in range(len(word) - 2, -1, -1): if word[i].isupper() != isupper and (isupper or i != 0): return False return True if __name__ == '__main__': assert Solution().detectCapitalUse("mL") == False assert Solution().detectCapitalUse("word") == True assert Solution().detectCapitalUse("Word") == True assert Solution().detectCapitalUse("woRd") == False
# -*- coding: utf-8 -*- """ :author: David Siroky (siroky@dasir.cz) "license: MIT License (see LICENSE.txt or U{http://www.opensource.org/licenses/mit-license.php}) """ VERSION = "1.6" PROTOCOL_VERSION = 1
shapenet_30afd2ef2ed30238aa3d0a2f00b54836 = dict(filename= "30afd2ef2ed30238aa3d0a2f00b54836.png" , basic= "dining", subordinate= "dining_00" , subset="A", cluster= 1, object_num= 0, pose= 35, url= "https://s3.amazonaws.com/shapenet-graphical-conventions/30afd2ef2ed30238aa3d0a2f00b54836.png",width= 256, height= 256); shapenet_30dc9d9cfbc01e19950c1f85d919ebc2 = dict(filename= "30dc9d9cfbc01e19950c1f85d919ebc2.png" , basic= "dining", subordinate= "dining_01" , subset="A", cluster= 1, object_num= 1, pose= 35, url= "https://s3.amazonaws.com/shapenet-graphical-conventions/30dc9d9cfbc01e19950c1f85d919ebc2.png",width= 256, height= 256); shapenet_4c1777173111f2e380a88936375f2ef4 = dict(filename= "4c1777173111f2e380a88936375f2ef4.png" , basic= "dining", subordinate= "dining_02" , subset="B", cluster= 1, object_num= 2, pose= 35, url= "https://s3.amazonaws.com/shapenet-graphical-conventions/4c1777173111f2e380a88936375f2ef4.png",width= 256, height= 256); shapenet_3466b6ecd040e252c215f685ba622927 = dict(filename= "3466b6ecd040e252c215f685ba622927.png" , basic= "dining", subordinate= "dining_03" , subset="B", cluster= 1, object_num= 3, pose= 35, url= "https://s3.amazonaws.com/shapenet-graphical-conventions/3466b6ecd040e252c215f685ba622927.png",width= 256, height= 256); shapenet_38f87e02e850d3bd1d5ccc40b510e4bd = dict(filename= "38f87e02e850d3bd1d5ccc40b510e4bd.png" , basic= "dining", subordinate= "dining_04" , subset="B", cluster= 1, object_num= 4, pose= 35, url= "https://s3.amazonaws.com/shapenet-graphical-conventions/38f87e02e850d3bd1d5ccc40b510e4bd.png",width= 256, height= 256); shapenet_3cf6db91f872d26c222659d33fd79709 = dict(filename= "3cf6db91f872d26c222659d33fd79709.png" , basic= "dining", subordinate= "dining_05" , subset="B", cluster= 1, object_num= 5, pose= 35, url= "https://s3.amazonaws.com/shapenet-graphical-conventions/3cf6db91f872d26c222659d33fd79709.png",width= 256, height= 256); shapenet_3d7ebe5de86294b3f6bcd046624c43c9 = dict(filename= "3d7ebe5de86294b3f6bcd046624c43c9.png" , basic= "dining", subordinate= "dining_06" , subset="A", cluster= 1, object_num= 6, pose= 35, url= "https://s3.amazonaws.com/shapenet-graphical-conventions/3d7ebe5de86294b3f6bcd046624c43c9.png",width= 256, height= 256); shapenet_56262eebe592b085d319c38340319ae4 = dict(filename= "56262eebe592b085d319c38340319ae4.png" , basic= "dining", subordinate= "dining_07" , subset="A", cluster= 1, object_num= 7, pose= 35, url= "https://s3.amazonaws.com/shapenet-graphical-conventions/56262eebe592b085d319c38340319ae4.png",width= 256, height= 256); shapenet_1d1641362ad5a34ac3bd24f986301745 = dict(filename= "1d1641362ad5a34ac3bd24f986301745.png" , basic= "waiting", subordinate= "waiting_00" , subset="A", cluster= 3, object_num= 0, pose= 35, url= "https://s3.amazonaws.com/shapenet-graphical-conventions/1d1641362ad5a34ac3bd24f986301745.png",width= 256, height= 256); shapenet_1da9942b2ab7082b2ba1fdc12ecb5c9e = dict(filename= "1da9942b2ab7082b2ba1fdc12ecb5c9e.png" , basic= "waiting", subordinate= "waiting_01" , subset="A", cluster= 3, object_num= 1, pose= 35, url= "https://s3.amazonaws.com/shapenet-graphical-conventions/1da9942b2ab7082b2ba1fdc12ecb5c9e.png",width= 256, height= 256); shapenet_2448d9aeda5bb9b0f4b6538438a0b930 = dict(filename= "2448d9aeda5bb9b0f4b6538438a0b930.png" , basic= "waiting", subordinate= "waiting_02" , subset="B", cluster= 3, object_num= 2, pose= 35, url= "https://s3.amazonaws.com/shapenet-graphical-conventions/2448d9aeda5bb9b0f4b6538438a0b930.png",width= 256, height= 256); shapenet_23b0da45f23e5fb4f4b6538438a0b930 = dict(filename= "23b0da45f23e5fb4f4b6538438a0b930.png" , basic= "waiting", subordinate= "waiting_03" , subset="B", cluster= 3, object_num= 3, pose= 35, url= "https://s3.amazonaws.com/shapenet-graphical-conventions/23b0da45f23e5fb4f4b6538438a0b930.png",width= 256, height= 256); shapenet_2b5953c986dd08f2f91663a74ccd2338 = dict(filename= "2b5953c986dd08f2f91663a74ccd2338.png" , basic= "waiting", subordinate= "waiting_04" , subset="B", cluster= 3, object_num= 4, pose= 35, url= "https://s3.amazonaws.com/shapenet-graphical-conventions/2b5953c986dd08f2f91663a74ccd2338.png",width= 256, height= 256); shapenet_2e291f35746e94fa62762c7262e78952 = dict(filename= "2e291f35746e94fa62762c7262e78952.png" , basic= "waiting", subordinate= "waiting_05" , subset="B", cluster= 3, object_num= 5, pose= 35, url= "https://s3.amazonaws.com/shapenet-graphical-conventions/2e291f35746e94fa62762c7262e78952.png",width= 256, height= 256); shapenet_2eaab78d6e4c4f2d7b0c85d2effc7e09 = dict(filename= "2eaab78d6e4c4f2d7b0c85d2effc7e09.png" , basic= "waiting", subordinate= "waiting_06" , subset="A", cluster= 3, object_num= 6, pose= 35, url= "https://s3.amazonaws.com/shapenet-graphical-conventions/2eaab78d6e4c4f2d7b0c85d2effc7e09.png",width= 256, height= 256); shapenet_309674bdec2d24d7597976c675750537 = dict(filename= "309674bdec2d24d7597976c675750537.png" , basic= "waiting", subordinate= "waiting_07" , subset="A", cluster= 3, object_num= 7, pose= 35, url= "https://s3.amazonaws.com/shapenet-graphical-conventions/309674bdec2d24d7597976c675750537.png",width= 256, height= 256);
IN_PREDICTION="../predictionsULMFiT_200_noLM.csv" IN_GOLD="../data/sentiment2/tgt-test.txt" # pred-sentiment.txt Accuracy: 0.9025 # pred-sentiment-trans.txt 0.9008333333333334 # ../pred-sentiment2.txt" 0.9462672372800761 # ../pred-sentiment2-gru.txt 0.948644793152639 # ../pred-sentiment2-large.txt" 0.9481692819781264 # pred-sentiment2-gru-small.txt 0.9498335710889206 #pred-sentiment-trans.txt 0.14621968616262482 # pred-sentiment2-gru-smallest.txt 0.9465049928673324 #Accuracy = 0.9954033919797115 #tp = 4175 tn = 8385 fp = 27 fn = 31 #precision = 0.9935744883388863 recall = 0.9926295767950547 f = 0.9932593180015861 #with new data # ../pred-sentiment2-gru.txt Accuracy: 0.9353304802662863 # Accuracy: 0.8487874465049928 #predictionsULMFiT2.csv Accuracy: 0.9931050879695673 #predictionsULMFiT2-noTL Accuracy: 0.990489776509748 # predictionsULMFiT_200.csv Accuracy: 0.76 # ../predictionsULMFiT_200_noTL.csvAccuracy: 0.71 # "../predictionsULMFiT_200_noLM.csv" 0.73 - ale przy eval musialem podac model wiec moze jednak byl def accuracy(gold, predictions): correct = 0 if len(predictions)<len(gold): gold = gold[:len(predictions)] all = len(gold) for g, p in zip(gold, predictions): if g == p: correct += 1 return (correct / all) def read_file(path): lines =[] with open(path) as f: lines = f.read().splitlines() return lines if __name__ == "__main__": gold = read_file(IN_GOLD) preds = read_file(IN_PREDICTION) print("Accuracy: "+str(accuracy(gold,preds)))
# Copyright 2020 The Google Earth Engine Community Authors # # Licensed under the Apache License, Version 2.0 (the "License") # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. """Google Earth Engine Developer's Guide examples for 'Images - Gradients'.""" # [START earthengine__images12__gradients] # Load a Landsat 8 image and select the panchromatic band. image = ee.Image('LANDSAT/LC08/C01/T1/LC08_044034_20140318').select('B8') # Compute the image gradient in the X and Y directions. xy_grad = image.gradient() # Compute the magnitude of the gradient. gradient = xy_grad.select('x').pow(2).add(xy_grad.select('y').pow(2)).sqrt() # Compute the direction of the gradient. direction = xy_grad.select('y').atan2(xy_grad.select('x')) # Define a map centered on San Francisco Bay. map_1 = folium.Map(location=[37.7295, -122.054], zoom_start=10) # Add the image layers to the map and display it. map_1.add_ee_layer( direction, {'min': -2, 'max': 2, 'format': 'png'}, 'direction') map_1.add_ee_layer( gradient, {'min': -7, 'max': 7, 'format': 'png'}, 'gradient') display(map_1.add_child(folium.LayerControl())) # [END earthengine__images12__gradients]
class Footers(object): def __init__(self, footers: dict, document): # TODO self._footers = footers self._document = document
def log_error(e): """ It is always a good idea to log errors. This function just prints them, but you can make it do anything. """ print(e)
# La secuencia de Fibonacci es una función matemática que se define recursivamente. # En el año 1202, el matemático italiano Leonardo de Pisa, también conocido como Fibonacci, # encontró una fórmula para cuantificar el crecimiento que ciertas poblaciones experimentan. # Imagina que una pareja de conejos nace, un macho y una hembra, y luego son liberados. # Imagina, también, que los conejos se pueden reproducir hasta la edad de un mes y que tienen un periodo de gestación también de un mes. # Por último imagina que estos conejos nunca mueren y que la hembra siempre es capaz de producir una nueva pareja (un macho y una hembra). # ¿Cuántos conejos existirán al final de seis meses? def fibonacci(n): if n == 0 or n == 1: return 1 return fibonacci(n - 1) + fibonacci(n - 2) n = int(input('Ingrese un cantidad de meses')) print(f'{fibonacci(n)} Conejos al final de {n} meses')
# Input: A list / array with integers. For example: # [3, 4, 1, 2, 9] # Returns: # Nothing. However, this function will print out # a pair of numbers that adds up to 10. For example, # 1, 9. If no such pair is found, it should print # "There is no pair that adds up to 10.". def pair10(given_list): numbers_seen = {} for item in given_list: if (10 - item) in numbers_seen: return [(10-item), item] else: numbers_seen[item] = 1 if __name__ == "__main__": print(""" Which pair adds up to 10? (Should print 1, 9) [3, 4, 1, 2, 9] """) result = pair10([3, 4, 1, 2, 9]) print(result) print(""" Which pair adds up to 10? (Should print -20, 30) [-11, -20, 2, 4, 30] """) result = pair10([-11, -20, 2, 4, 30]) print(result) print(""" Which pair adds up to 10? (Should print 1, 9 or 2, 8) [1, 2, 9, 8] """) result = pair10([1, 2, 9, 8]) print(result) print(""" Which pair adds up to 10? (Should print 1, 9) [1, 1, 1, 2, 3, 9] """) result = pair10([1, 1, 1, 2, 3, 9]) print(result) print(""" Which pair adds up to 10? (Should print "There is no pair that adds up to 10.") [1, 1, 1, 2, 3, 4, 5] """) result = pair10([1, 1, 1, 2, 3, 4, 5]) print(result)
# 62. Unique Paths class Solution: def uniquePaths(self, m: int, n: int) -> int: paths = [[(0 if k > 0 and i > 0 else 1) for i in range(m)] for k in range(n)] for col in range(1, m): for row in range(1, n): if row > 0: paths[row][col] += paths[row - 1][col] if col > 0: paths[row][col] += paths[row][col - 1] return paths[-1][-1]
# Finite State Expression Parser Function # Authored by Vishnuprasadh def parser(fa, fa_dict): fa_dict.update({"start": ""}) fa_dict.update({"final": []}) fa_dict.update({"transitions": {}}) start = final = False # Keeps track of start and final states init_tracker = -1 # Keeps track of the beginning of an element string end_tracker = -1 # Keeps track of the end of an element string state = "" key = "" for i, x in enumerate(fa): if x == "<": continue elif x == ">": break elif x == "#": start = True init_tracker = i+1 elif x == "*": final = True elif x == "(": end_tracker = i state = fa[init_tracker:end_tracker] end_tracker = -1 init_tracker = i+1 if start: fa_dict["start"] = state start = False if final: state = state.replace("*","") fa_dict["final"].append(state) final = False fa_dict["transitions"].update({state: {}}) elif x == ")": state = "" init_tracker = i+1 elif x == "[": end_tracker = i key = fa[init_tracker:end_tracker] init_tracker = i + 1 end_tracker = -1 fa_dict["transitions"][state].update({key: []}) elif x == "]": end_tracker = i temp = fa[init_tracker:end_tracker] end_tracker = -1 fa_dict["transitions"][state][key].append(temp) init_tracker = i+1 elif x == ",": end_tracker = i temp = fa[init_tracker:end_tracker] end_tracker = -1 fa_dict["transitions"][state][key].append(temp) init_tracker = i+1 else: continue return fa_dict
""" Allergies exercise """ class Allergies: """ Class to get all allergies from a score """ def __init__(self, score): """ Calculate list of allergies from score using dynamic programming """ self.dct = { 1: "eggs", 2: "peanuts", 4: "shellfish", 8: "strawberries", 16: "tomatoes", 32: "chocolate", 64: "pollen", 128: "cats" } dp_array = [([], 0) for i in range(score + 1)] dp_array[0] = ([], - 1) for i in range(score): power = dp_array[i][1] + 1 while i + 2 ** power <= score: if power <= 7: dp_array[i + 2 ** power] = (dp_array[i][0] + [self.dct[2 ** power]], power) else: dp_array[i + 2 ** power] = dp_array[i] power += 1 self.allergies = dp_array[score][0] def allergic_to(self, item): """ Check if a score contains an allergies """ return item in self.lst @property def lst(self): """ List all allergies """ values = {} for key, value in self.dct.items(): values[value] = key return self.allergies
# CHALLENGE: https://www.hackerrank.com/challenges/30-2d-arrays def build_arr(): arr = [] for arr_i in range(6): arr_t = [int(arr_temp) for arr_temp in input().strip().split(' ')] arr.append(arr_t) return arr def is_square_arr(arr): for e in arr: if len(e) != len(arr): raise ValueError('Input is not a n * n 2d array') return True def calc_hourglass_sums(arr): sums = [] if is_square_arr(arr): n = len(arr) for i in range(0, n - 2): for j in range(0, n - 2): hourglass_sum = sum(arr[i][j:j+3]) + sum(arr[i+2][j:j+3]) + arr[i+1][j+1] sums.append(hourglass_sum) return sums arr = build_arr() sums = calc_hourglass_sums(arr) print(max(sums))
class Solution: def twoSum(self, nums, target): ''' # leetcode problem: https://leetcode.com/problems/two-sum/ Method-1: Bruteforce time compx: O(n^2) space compx: O(1) def twoSum(self, nums, targer): """TODO: Docstring for bruteForceTwoSum. :function: twoSum() :returns: List of index """ for i in range(len(nums)): for j in range(i+1, len(nums), 1): if nums[i] + nums[j] == target: return [i, j] Method-2: time conplex: O(n) -> in worst case we have to visit all the element from the list. space compx: O(n) approach would be 1. create empty dict to keep track of visited numbers. 2. loop through all the elements from the list and get the index and item 3. check if target - curent-numner present in dict 4. if yes then simply return the stored index and current index. 5. if not then store the current value and index to the dict. ''' visited = {} for idx, num in enumerate(nums): if target - num in visited: return [visited.get(target - num), idx] visited[num] = idx if __name__ == "__main__": sol = Solution() print(sol.twoSum([2, 7, 11, 15], 9))
''' Задача «Удаление символа» Условие Дана строка. Удалите из этой строки все символы @. ''' s = input() # s = '@W@E@E@E@R' # s.replace('W', ' ') # применение функции разобрать! # s1 = s.replace('@', '') # применение функции разобрать! print(s.replace('@', '')) # print(s1)
#Copyright ReportLab Europe Ltd. 2000-2006 #see license.txt for license details __version__=''' $Id: boxstuff.py 2960 2006-08-23 21:41:33Z andy $ ''' def anchorAdjustXY(anchor,x,y,width,height): if anchor not in ('sw','s','se'): if anchor in ('e','c','w'): y -= height/2. else: y -= height if anchor not in ('nw','w','sw'): if anchor in ('n','c','s'): x -= width/2. else: x -= width return x,y def aspectRatioFix(preserve,anchor,x,y,width,height,imWidth,imHeight): scale = 1.0 if width is None: width = imWidth if height is None: height = imHeight if width<0: width = -width x -= width if height<0: height = -height y -= height if preserve: imWidth = abs(imWidth) imHeight = abs(imHeight) scale = min(width/float(imWidth),height/float(imHeight)) owidth = width oheight = height width = scale*imWidth-1e-8 height = scale*imHeight-1e-8 if anchor not in ('n','c','s'): dx = 0.5*(owidth-width) if anchor in ('ne','e','se'): x -= dx else: x += dx if anchor not in ('e','c','w'): dy = 0.5*(oheight-height) if anchor in ('nw','n','ne'): y -= dy else: y += dy return x,y, width, height, scale
""" This Module populate or provide the starting material for running the SELECTA workflow. Information from the process_selection table as well as the SELECTA propertie.txt files are consumed here. """ __author__ = 'Nima Pakseresht, Blaise Alako' class selection: """ This Class Initialise the SELECTA workflow from entries in the process_selection table """ def __init__(self, selection_id, datahub, tax_id, study_accession, run_accession, pipeline_name, analysis_id, public, selection_to_attribute_end, analyst_webin_id, process_type, continuity): self.selection_id = selection_id self.datahub = datahub self.tax_id = tax_id self.study_accession = study_accession self.run_accession = run_accession self.pipeline_name = pipeline_name self.analysis_id = analysis_id self.public = public self.analyst_webin_id = analyst_webin_id self.process_type = process_type self.continuity = continuity self.selection_to_attribute_end = selection_to_attribute_end class properties: """ This Class populate SELECTA properties.txt configuration file """ def __init__(self, property_file): with open(property_file) as f: lines = f.readlines() #print('~' * 50) #print(type(lines)) #print('~' * 50) workdir_provided = False workdir_input_provided = False archivedir_provided = False dbuser_provided = False dbpassword_provided = False dbhost_provided = False dbname_provided = False dbport_provided = False lsf_provided = False rmem_provided = False lmem_provided = False selecta_version_provided = False dtu_cge_databases_provided = False dtu_cge_version_provided= False pipeline_version_provided =False emc_slim_program_provided = False emc_slim_property_file_provided = False emc_slim_version_provided = False uantwerp_bacpipe_program_provided = False uantwerp_bacpipe_version_provided = False uantwerp_bacpipe_dep_provided = False rivm_jovian_base_provided = False rivm_jovian_version_provided = False rivm_jovian_profile_provided = False prokka_program_provided = False prokka_program_version_provided = False analysis_submission_mode_provided = False analysis_submission_action_provided = False analysis_submission_url_dev_provided = False analysis_submission_url_prod_provided = False max_core_job_provided = False nproc_provided = False cgetools_provided = False bgroup_provided = False for l in lines: pair = l.strip().split(":",1) if pair[0].lower() == 'workdir': self.workdir = pair[1] workdir_provided = True elif pair[0].lower() == 'max_core_job': self.max_core_job = int(pair[1]) max_core_job_provided = True elif pair[0].lower() == 'workdir_input': self.workdir_input = pair[1] workdir_input_provided = True elif pair[0].lower() == 'archivedir': self.archivedir = pair[1] archivedir_provided = True elif pair[0].lower() == 'dbuser': self.dbuser = pair[1] dbuser_provided = True elif pair[0].lower() == 'dbpassword': self.dbpassword = pair[1] dbpassword_provided = True elif pair[0].lower() == 'dbhost': self.dbhost = pair[1] dbhost_provided = True elif pair[0].lower() == 'dbname': self.dbname = pair[1] dbname_provided = True elif pair[0].lower() == 'dbport': self.dbport = int(pair[1]) dbport_provided = True elif pair[0].lower() == 'nproc': self.nproc = int(pair[1]) nproc_provided = True elif pair[0].lower() == 'lsf': if pair[1].lower() == 'yes': self.lsf = True elif pair[1].lower() =='no': self.lsf = False lsf_provided = True elif pair[0].lower() == 'rmem': self.rmem= pair[1] rmem_provided = True elif pair[0].lower() =='lmem': self.lmem=pair[1] lmem_provided = True elif pair[0].lower() =='bgroup': self.bgroup = pair[1] bgroup_provided = True elif pair[0].lower() =='seqmachine': self.seq_machine = pair[1] seq_machine_provided = True elif pair[0].lower() == 'emc_slim_program': self.emc_slim_program = pair[1] emc_slim_program_provided = True elif pair[0].lower() == 'emc_slim_property_file': self.emc_slim_property_file = pair[1] emc_slim_property_file_provided = True elif pair[0].lower() == 'dtu_cge_databases': self.dtu_cge_databases = pair[1] dtu_cge_databases_provided = True elif pair[0].lower() == 'dtu_cge_version': self.dtu_cge_version = pair[1] dtu_cge_version_provided = True elif pair[0].lower() == 'emc_slim_version': self.emc_slim_version = pair[1] emc_slim_version_provided = True elif pair[0].lower() == 'selecta_version': self.selecta_version = pair[1] selecta_version_provided = True elif pair[0].lower() == 'cgetools': self.cgetools = pair[1] cgetools_provided = True #UAntwerp_BACPIPE_PROGRAM elif pair[0].lower() == 'uantwerp_bacpipe_program': self.uantwerp_bacpipe_program = pair[1] uantwerp_bacpipe_program_provided = True elif pair[0].lower() == 'uantwerp_bacpipe_version': self.uantwerp_bacpipe_version = pair[1] uantwerp_bacpipe_version_provided = True elif pair[0].lower() == 'uantwerp_bacpipe_dep': self.uantwerp_bacpipe_dep = pair[1] uantwerp_bacpipe_dep_provided = True elif pair[0].lower() =='rivm_jovian_base': self.rivm_jovian_base = pair[1] rivm_jovian_base_provided = True elif pair[0].lower() == 'rivm_jovian_version': self.rivm_jovian_version = pair[1] rivm_jovian_version_provided = True elif pair[0].lower() == 'rivm_jovian_profile': self.rivm_jovian_profile = pair[1] rivm_jovian_profile_provided = True elif pair[0].lower() == 'prokka_program': self.prokka_program = pair[1] prokka_program_provided = True elif pair[0].lower() == 'prokka_program_version': self.prokka_program_version = pair[1] prokka_program_version_provided = True elif pair[0].lower() == 'analysis_submission_mode': self.analysis_submission_mode = pair[1] analysis_submission_mode_provided = True elif pair[0].lower() == 'analysis_submission_action': self.analysis_submission_action = pair[1] analysis_submission_action_provided = True elif pair[0].lower() == 'analysis_submission_url_dev': self.analysis_submission_url_dev = pair[1] analysis_submission_url_dev_provided = True elif pair[0].lower() == 'analysis_submission_url_prod': self.analysis_submission_url_prod = pair[1] analysis_submission_url_prod_provided = True if not workdir_provided: self.workdir = '' if not max_core_job_provided: self.max_core_job = 10 if not workdir_input_provided: self.workdir_input = '' if not archivedir_provided: self.archivedir = '' if not dbuser_provided: self.dbuser_provided = '' if not dbpassword_provided: self.dbpassword_provided = '' if not dbhost_provided: self.dbhost = '' if not dbname_provided: self.dbname = '' if not dbport_provided: self.dbport = 3306 if not nproc_provided: self.nproc = 10 if not lsf_provided: self.lsf = '' if not seq_machine_provided: self.seq_machine = '' if not rmem_provided: self.rmem='' if not lmem_provided: self.lmem='' if not bgroup_provided: self.bgroup='' if not emc_slim_program_provided: self.emc_slim_program = '' if not emc_slim_property_file_provided: self.emc_slim_property_file = '' if not analysis_submission_mode_provided: self.analysis_submission_mode = '' if not dtu_cge_databases_provided: self.dtu_cge_databases = '' if not dtu_cge_version_provided: self.dtu_cge_version = '' if not selecta_version_provided: self.selecta_version = '' if not emc_slim_version_provided: self.emc_slim_version = '' if not dtu_cge_version_provided: self.dtu_cge_version ='' if not rivm_jovian_base_provided: self.rivm_jovian_base = '' if not rivm_jovian_version_provided: self.rivm_jovian_version = '' if not rivm_jovian_profile_provided: self.rivm_jovian_profile = '' if not uantwerp_bacpipe_program_provided: self.uantwerp_bacpipe_program = '' if not uantwerp_bacpipe_version_provided: self.uantwerp_bacpipe_version = '' if not prokka_program_provided: self.prokka_program = '' if not prokka_program_version_provided: self.prokka_program_version = '' if not cgetools_provided: self.cgetools ='' if not analysis_submission_action_provided: self.analysis_submission_action = '' if not analysis_submission_url_dev_provided: self.analysis_submission_url_dev = '' if not analysis_submission_url_prod_provided: self.analysis_submission_url_prod = ''
companions = int(input()) days = int(input()) coins = 0 for day in range(1, days + 1): if day % 15 == 0: companions += 5 if day % 10 == 0: companions -= 2 if day % 5 == 0: coins += (companions * 20) if day % 3 == 0: coins -= (companions * 2) if day % 3 == 0: coins -= (companions * 3) coins += 50 - (companions * 2) companions_coins = int(coins // companions) print(f"{companions} companions received {companions_coins} coins each.")
dia=input('dia=') mes=input('mes=') ano=input('ano') print('Você nasceu no dia', dia, 'de', mes,'de', ano,'. Correto?') print('Você nasceu no dia {}'.format(dia),'de {}'.format(mes),'de {}'.format(ano),'. Correto?')
# # PySNMP MIB module ZXTM-MIB (http://snmplabs.com/pysmi) # ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/ZXTM-MIB # Produced by pysmi-0.3.4 at Wed May 1 15:48:51 2019 # On host DAVWANG4-M-1475 platform Darwin version 18.5.0 by user davwang4 # Using Python version 3.7.3 (default, Mar 27 2019, 09:23:15) # OctetString, Integer, ObjectIdentifier = mibBuilder.importSymbols("ASN1", "OctetString", "Integer", "ObjectIdentifier") NamedValues, = mibBuilder.importSymbols("ASN1-ENUMERATION", "NamedValues") SingleValueConstraint, ConstraintsUnion, ConstraintsIntersection, ValueSizeConstraint, ValueRangeConstraint = mibBuilder.importSymbols("ASN1-REFINEMENT", "SingleValueConstraint", "ConstraintsUnion", "ConstraintsIntersection", "ValueSizeConstraint", "ValueRangeConstraint") InetAddressType, InetAddress = mibBuilder.importSymbols("INET-ADDRESS-MIB", "InetAddressType", "InetAddress") NotificationGroup, ModuleCompliance = mibBuilder.importSymbols("SNMPv2-CONF", "NotificationGroup", "ModuleCompliance") Bits, ObjectIdentity, ModuleIdentity, Integer32, Counter64, enterprises, Unsigned32, NotificationType, IpAddress, Gauge32, TimeTicks, NotificationType, MibIdentifier, iso, MibScalar, MibTable, MibTableRow, MibTableColumn, Counter32 = mibBuilder.importSymbols("SNMPv2-SMI", "Bits", "ObjectIdentity", "ModuleIdentity", "Integer32", "Counter64", "enterprises", "Unsigned32", "NotificationType", "IpAddress", "Gauge32", "TimeTicks", "NotificationType", "MibIdentifier", "iso", "MibScalar", "MibTable", "MibTableRow", "MibTableColumn", "Counter32") TextualConvention, DisplayString = mibBuilder.importSymbols("SNMPv2-TC", "TextualConvention", "DisplayString") zeus = MibIdentifier((1, 3, 6, 1, 4, 1, 7146)) products = MibIdentifier((1, 3, 6, 1, 4, 1, 7146, 1)) zxtm = MibIdentifier((1, 3, 6, 1, 4, 1, 7146, 1, 2)) globals = MibIdentifier((1, 3, 6, 1, 4, 1, 7146, 1, 2, 1)) virtualservers = MibIdentifier((1, 3, 6, 1, 4, 1, 7146, 1, 2, 2)) pools = MibIdentifier((1, 3, 6, 1, 4, 1, 7146, 1, 2, 3)) nodes = MibIdentifier((1, 3, 6, 1, 4, 1, 7146, 1, 2, 4)) serviceprotection = MibIdentifier((1, 3, 6, 1, 4, 1, 7146, 1, 2, 5)) trafficips = MibIdentifier((1, 3, 6, 1, 4, 1, 7146, 1, 2, 6)) servicelevelmonitoring = MibIdentifier((1, 3, 6, 1, 4, 1, 7146, 1, 2, 7)) pernodeservicelevelmon = MibIdentifier((1, 3, 6, 1, 4, 1, 7146, 1, 2, 8)) bandwidthmgt = MibIdentifier((1, 3, 6, 1, 4, 1, 7146, 1, 2, 9)) connratelimit = MibIdentifier((1, 3, 6, 1, 4, 1, 7146, 1, 2, 10)) extra = MibIdentifier((1, 3, 6, 1, 4, 1, 7146, 1, 2, 11)) netinterfaces = MibIdentifier((1, 3, 6, 1, 4, 1, 7146, 1, 2, 12)) events = MibIdentifier((1, 3, 6, 1, 4, 1, 7146, 1, 2, 13)) actions = MibIdentifier((1, 3, 6, 1, 4, 1, 7146, 1, 2, 14)) zxtmtraps = MibIdentifier((1, 3, 6, 1, 4, 1, 7146, 1, 2, 15)) persistence = MibIdentifier((1, 3, 6, 1, 4, 1, 7146, 1, 2, 16)) cache = MibIdentifier((1, 3, 6, 1, 4, 1, 7146, 1, 2, 17)) webcache = MibIdentifier((1, 3, 6, 1, 4, 1, 7146, 1, 2, 17, 1)) sslcache = MibIdentifier((1, 3, 6, 1, 4, 1, 7146, 1, 2, 17, 2)) aspsessioncache = MibIdentifier((1, 3, 6, 1, 4, 1, 7146, 1, 2, 17, 3)) ipsessioncache = MibIdentifier((1, 3, 6, 1, 4, 1, 7146, 1, 2, 17, 4)) j2eesessioncache = MibIdentifier((1, 3, 6, 1, 4, 1, 7146, 1, 2, 17, 5)) unisessioncache = MibIdentifier((1, 3, 6, 1, 4, 1, 7146, 1, 2, 17, 6)) sslsessioncache = MibIdentifier((1, 3, 6, 1, 4, 1, 7146, 1, 2, 17, 7)) rules = MibIdentifier((1, 3, 6, 1, 4, 1, 7146, 1, 2, 18)) monitors = MibIdentifier((1, 3, 6, 1, 4, 1, 7146, 1, 2, 19)) licensekeys = MibIdentifier((1, 3, 6, 1, 4, 1, 7146, 1, 2, 20)) zxtms = MibIdentifier((1, 3, 6, 1, 4, 1, 7146, 1, 2, 21)) trapobjects = MibIdentifier((1, 3, 6, 1, 4, 1, 7146, 1, 2, 22)) cloudcredentials = MibIdentifier((1, 3, 6, 1, 4, 1, 7146, 1, 2, 23)) glbservices = MibIdentifier((1, 3, 6, 1, 4, 1, 7146, 1, 2, 24)) perlocationservices = MibIdentifier((1, 3, 6, 1, 4, 1, 7146, 1, 2, 25)) locations = MibIdentifier((1, 3, 6, 1, 4, 1, 7146, 1, 2, 26)) listenips = MibIdentifier((1, 3, 6, 1, 4, 1, 7146, 1, 2, 27)) authenticators = MibIdentifier((1, 3, 6, 1, 4, 1, 7146, 1, 2, 28)) version = MibScalar((1, 3, 6, 1, 4, 1, 7146, 1, 2, 1, 1), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 255))).setMaxAccess("readonly") if mibBuilder.loadTexts: version.setStatus('mandatory') if mibBuilder.loadTexts: version.setDescription('The Zeus Traffic Manager version.') numberChildProcesses = MibScalar((1, 3, 6, 1, 4, 1, 7146, 1, 2, 1, 2), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: numberChildProcesses.setStatus('mandatory') if mibBuilder.loadTexts: numberChildProcesses.setDescription('The number of traffic manager child processes.') upTime = MibScalar((1, 3, 6, 1, 4, 1, 7146, 1, 2, 1, 3), TimeTicks()).setMaxAccess("readonly") if mibBuilder.loadTexts: upTime.setStatus('mandatory') if mibBuilder.loadTexts: upTime.setDescription('The time (in hundredths of a second) that Zeus software has been operational for (this value will wrap if it has been running for more than 497 days).') timeLastConfigUpdate = MibScalar((1, 3, 6, 1, 4, 1, 7146, 1, 2, 1, 4), TimeTicks()).setMaxAccess("readonly") if mibBuilder.loadTexts: timeLastConfigUpdate.setStatus('mandatory') if mibBuilder.loadTexts: timeLastConfigUpdate.setDescription('The time (in hundredths of a second) since the configuration of traffic manager was updated (this value will wrap if no configuration changes are made for 497 days).') totalBytesInLo = MibScalar((1, 3, 6, 1, 4, 1, 7146, 1, 2, 1, 5), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: totalBytesInLo.setStatus('mandatory') if mibBuilder.loadTexts: totalBytesInLo.setDescription('Bytes received by the traffic manager from clients ( low 32bits ).') totalBytesInHi = MibScalar((1, 3, 6, 1, 4, 1, 7146, 1, 2, 1, 6), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: totalBytesInHi.setStatus('mandatory') if mibBuilder.loadTexts: totalBytesInHi.setDescription('Bytes received by the traffic manager from clients ( high 32bits ).') totalBytesOutLo = MibScalar((1, 3, 6, 1, 4, 1, 7146, 1, 2, 1, 7), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: totalBytesOutLo.setStatus('mandatory') if mibBuilder.loadTexts: totalBytesOutLo.setDescription('Bytes sent by the traffic manager to clients ( low 32bits ).') totalBytesOutHi = MibScalar((1, 3, 6, 1, 4, 1, 7146, 1, 2, 1, 8), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: totalBytesOutHi.setStatus('mandatory') if mibBuilder.loadTexts: totalBytesOutHi.setDescription('Bytes sent by the traffic manager to clients ( high 32bits ).') totalCurrentConn = MibScalar((1, 3, 6, 1, 4, 1, 7146, 1, 2, 1, 9), Gauge32()).setMaxAccess("readonly") if mibBuilder.loadTexts: totalCurrentConn.setStatus('mandatory') if mibBuilder.loadTexts: totalCurrentConn.setDescription('Number of TCP connections currently established.') totalConn = MibScalar((1, 3, 6, 1, 4, 1, 7146, 1, 2, 1, 10), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: totalConn.setStatus('mandatory') if mibBuilder.loadTexts: totalConn.setDescription('Total number of TCP connections received.') totalRequests = MibScalar((1, 3, 6, 1, 4, 1, 7146, 1, 2, 1, 127), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: totalRequests.setStatus('mandatory') if mibBuilder.loadTexts: totalRequests.setDescription('Total number of TCP requests recieved.') totalTransactions = MibScalar((1, 3, 6, 1, 4, 1, 7146, 1, 2, 1, 128), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: totalTransactions.setStatus('mandatory') if mibBuilder.loadTexts: totalTransactions.setDescription('Total number of TCP requests being processed, after applying TPS limits.') numberDNSARequests = MibScalar((1, 3, 6, 1, 4, 1, 7146, 1, 2, 1, 11), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: numberDNSARequests.setStatus('mandatory') if mibBuilder.loadTexts: numberDNSARequests.setDescription('Requests for DNS A records (hostname->IP address) made by the traffic manager.') numberDNSACacheHits = MibScalar((1, 3, 6, 1, 4, 1, 7146, 1, 2, 1, 12), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: numberDNSACacheHits.setStatus('mandatory') if mibBuilder.loadTexts: numberDNSACacheHits.setDescription("Requests for DNS A records resolved from the traffic manager's local cache.") numberDNSPTRRequests = MibScalar((1, 3, 6, 1, 4, 1, 7146, 1, 2, 1, 13), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: numberDNSPTRRequests.setStatus('mandatory') if mibBuilder.loadTexts: numberDNSPTRRequests.setDescription('Requests for DNS PTR records (IP address->hostname) made by the traffic manager.') numberDNSPTRCacheHits = MibScalar((1, 3, 6, 1, 4, 1, 7146, 1, 2, 1, 14), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: numberDNSPTRCacheHits.setStatus('mandatory') if mibBuilder.loadTexts: numberDNSPTRCacheHits.setDescription("Requests for DNS PTR records resolved from the traffic manager's local cache.") numberSNMPUnauthorisedRequests = MibScalar((1, 3, 6, 1, 4, 1, 7146, 1, 2, 1, 15), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: numberSNMPUnauthorisedRequests.setStatus('mandatory') if mibBuilder.loadTexts: numberSNMPUnauthorisedRequests.setDescription('SNMP requests dropped due to access restrictions.') numberSNMPBadRequests = MibScalar((1, 3, 6, 1, 4, 1, 7146, 1, 2, 1, 16), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: numberSNMPBadRequests.setStatus('mandatory') if mibBuilder.loadTexts: numberSNMPBadRequests.setDescription('Malformed SNMP requests received.') numberSNMPGetRequests = MibScalar((1, 3, 6, 1, 4, 1, 7146, 1, 2, 1, 17), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: numberSNMPGetRequests.setStatus('mandatory') if mibBuilder.loadTexts: numberSNMPGetRequests.setDescription('SNMP GetRequests received.') numberSNMPGetNextRequests = MibScalar((1, 3, 6, 1, 4, 1, 7146, 1, 2, 1, 18), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: numberSNMPGetNextRequests.setStatus('mandatory') if mibBuilder.loadTexts: numberSNMPGetNextRequests.setDescription('SNMP GetNextRequests received.') sslCipherEncrypts = MibScalar((1, 3, 6, 1, 4, 1, 7146, 1, 2, 1, 19), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: sslCipherEncrypts.setStatus('mandatory') if mibBuilder.loadTexts: sslCipherEncrypts.setDescription('Bytes encrypted with a symmetric cipher.') sslCipherDecrypts = MibScalar((1, 3, 6, 1, 4, 1, 7146, 1, 2, 1, 20), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: sslCipherDecrypts.setStatus('mandatory') if mibBuilder.loadTexts: sslCipherDecrypts.setDescription('Bytes decrypted with a symmetric cipher.') sslCipherRC4Encrypts = MibScalar((1, 3, 6, 1, 4, 1, 7146, 1, 2, 1, 21), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: sslCipherRC4Encrypts.setStatus('mandatory') if mibBuilder.loadTexts: sslCipherRC4Encrypts.setDescription('Bytes encrypted with RC4.') sslCipherRC4Decrypts = MibScalar((1, 3, 6, 1, 4, 1, 7146, 1, 2, 1, 22), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: sslCipherRC4Decrypts.setStatus('mandatory') if mibBuilder.loadTexts: sslCipherRC4Decrypts.setDescription('Bytes decrypted with RC4.') sslCipherDESEncrypts = MibScalar((1, 3, 6, 1, 4, 1, 7146, 1, 2, 1, 23), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: sslCipherDESEncrypts.setStatus('mandatory') if mibBuilder.loadTexts: sslCipherDESEncrypts.setDescription('Bytes encrypted with DES.') sslCipherDESDecrypts = MibScalar((1, 3, 6, 1, 4, 1, 7146, 1, 2, 1, 24), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: sslCipherDESDecrypts.setStatus('mandatory') if mibBuilder.loadTexts: sslCipherDESDecrypts.setDescription('Bytes decrypted with DES.') sslCipher3DESEncrypts = MibScalar((1, 3, 6, 1, 4, 1, 7146, 1, 2, 1, 25), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: sslCipher3DESEncrypts.setStatus('mandatory') if mibBuilder.loadTexts: sslCipher3DESEncrypts.setDescription('Bytes encrypted with 3DES.') sslCipher3DESDecrypts = MibScalar((1, 3, 6, 1, 4, 1, 7146, 1, 2, 1, 26), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: sslCipher3DESDecrypts.setStatus('mandatory') if mibBuilder.loadTexts: sslCipher3DESDecrypts.setDescription('Bytes decrypted with 3DES.') sslCipherAESEncrypts = MibScalar((1, 3, 6, 1, 4, 1, 7146, 1, 2, 1, 27), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: sslCipherAESEncrypts.setStatus('mandatory') if mibBuilder.loadTexts: sslCipherAESEncrypts.setDescription('Bytes encrypted with AES.') sslCipherAESDecrypts = MibScalar((1, 3, 6, 1, 4, 1, 7146, 1, 2, 1, 28), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: sslCipherAESDecrypts.setStatus('mandatory') if mibBuilder.loadTexts: sslCipherAESDecrypts.setDescription('Bytes decrypted with AES.') sslCipherRSAEncrypts = MibScalar((1, 3, 6, 1, 4, 1, 7146, 1, 2, 1, 29), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: sslCipherRSAEncrypts.setStatus('mandatory') if mibBuilder.loadTexts: sslCipherRSAEncrypts.setDescription('Number of RSA encrypts.') sslCipherRSADecrypts = MibScalar((1, 3, 6, 1, 4, 1, 7146, 1, 2, 1, 30), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: sslCipherRSADecrypts.setStatus('mandatory') if mibBuilder.loadTexts: sslCipherRSADecrypts.setDescription('Number of RSA decrypts.') sslCipherRSADecryptsExternal = MibScalar((1, 3, 6, 1, 4, 1, 7146, 1, 2, 1, 31), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: sslCipherRSADecryptsExternal.setStatus('mandatory') if mibBuilder.loadTexts: sslCipherRSADecryptsExternal.setDescription('Number of external RSA decrypts.') sslHandshakeSSLv2 = MibScalar((1, 3, 6, 1, 4, 1, 7146, 1, 2, 1, 32), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: sslHandshakeSSLv2.setStatus('mandatory') if mibBuilder.loadTexts: sslHandshakeSSLv2.setDescription('Number of SSLv2 handshakes.') sslHandshakeSSLv3 = MibScalar((1, 3, 6, 1, 4, 1, 7146, 1, 2, 1, 33), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: sslHandshakeSSLv3.setStatus('mandatory') if mibBuilder.loadTexts: sslHandshakeSSLv3.setDescription('Number of SSLv3 handshakes.') sslHandshakeTLSv1 = MibScalar((1, 3, 6, 1, 4, 1, 7146, 1, 2, 1, 34), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: sslHandshakeTLSv1.setStatus('mandatory') if mibBuilder.loadTexts: sslHandshakeTLSv1.setDescription('Number of TLSv1.0 handshakes.') sslClientCertNotSent = MibScalar((1, 3, 6, 1, 4, 1, 7146, 1, 2, 1, 35), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: sslClientCertNotSent.setStatus('mandatory') if mibBuilder.loadTexts: sslClientCertNotSent.setDescription('Number of times a client certificate was required but not supplied.') sslClientCertInvalid = MibScalar((1, 3, 6, 1, 4, 1, 7146, 1, 2, 1, 36), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: sslClientCertInvalid.setStatus('mandatory') if mibBuilder.loadTexts: sslClientCertInvalid.setDescription('Number of times a client certificate was invalid.') sslClientCertExpired = MibScalar((1, 3, 6, 1, 4, 1, 7146, 1, 2, 1, 37), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: sslClientCertExpired.setStatus('mandatory') if mibBuilder.loadTexts: sslClientCertExpired.setDescription('Number of times a client certificate has expired.') sslClientCertRevoked = MibScalar((1, 3, 6, 1, 4, 1, 7146, 1, 2, 1, 38), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: sslClientCertRevoked.setStatus('mandatory') if mibBuilder.loadTexts: sslClientCertRevoked.setDescription('Number of times a client certificate was revoked.') sslSessionIDMemCacheHit = MibScalar((1, 3, 6, 1, 4, 1, 7146, 1, 2, 1, 39), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: sslSessionIDMemCacheHit.setStatus('mandatory') if mibBuilder.loadTexts: sslSessionIDMemCacheHit.setDescription('Number of times the SSL session id was found in the cache and reused.') sslSessionIDMemCacheMiss = MibScalar((1, 3, 6, 1, 4, 1, 7146, 1, 2, 1, 40), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: sslSessionIDMemCacheMiss.setStatus('mandatory') if mibBuilder.loadTexts: sslSessionIDMemCacheMiss.setDescription('Number of times the SSL session id was not found in the cache.') sslSessionIDDiskCacheHit = MibScalar((1, 3, 6, 1, 4, 1, 7146, 1, 2, 1, 41), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: sslSessionIDDiskCacheHit.setStatus('deprecated') if mibBuilder.loadTexts: sslSessionIDDiskCacheHit.setDescription('Number of times the SSL session id was found in the disk cache and reused (deprecated, will always return 0).') sslSessionIDDiskCacheMiss = MibScalar((1, 3, 6, 1, 4, 1, 7146, 1, 2, 1, 42), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: sslSessionIDDiskCacheMiss.setStatus('deprecated') if mibBuilder.loadTexts: sslSessionIDDiskCacheMiss.setDescription('Number of times the SSL session id was not found in the disk cache (deprecated, will always return 0).') sslHandshakeTLSv11 = MibScalar((1, 3, 6, 1, 4, 1, 7146, 1, 2, 1, 43), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: sslHandshakeTLSv11.setStatus('mandatory') if mibBuilder.loadTexts: sslHandshakeTLSv11.setDescription('Number of TLSv1.1 handshakes.') sslConnections = MibScalar((1, 3, 6, 1, 4, 1, 7146, 1, 2, 1, 44), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: sslConnections.setStatus('mandatory') if mibBuilder.loadTexts: sslConnections.setDescription('Number of SSL connections negotiated.') sslCipherRSAEncryptsExternal = MibScalar((1, 3, 6, 1, 4, 1, 7146, 1, 2, 1, 57), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: sslCipherRSAEncryptsExternal.setStatus('mandatory') if mibBuilder.loadTexts: sslCipherRSAEncryptsExternal.setDescription('Number of external RSA encrypts.') sysCPUIdlePercent = MibScalar((1, 3, 6, 1, 4, 1, 7146, 1, 2, 1, 45), Gauge32()).setMaxAccess("readonly") if mibBuilder.loadTexts: sysCPUIdlePercent.setStatus('mandatory') if mibBuilder.loadTexts: sysCPUIdlePercent.setDescription('Percentage of time that the CPUs are idle.') sysCPUBusyPercent = MibScalar((1, 3, 6, 1, 4, 1, 7146, 1, 2, 1, 46), Gauge32()).setMaxAccess("readonly") if mibBuilder.loadTexts: sysCPUBusyPercent.setStatus('mandatory') if mibBuilder.loadTexts: sysCPUBusyPercent.setDescription('Percentage of time that the CPUs are busy.') sysCPUUserBusyPercent = MibScalar((1, 3, 6, 1, 4, 1, 7146, 1, 2, 1, 47), Gauge32()).setMaxAccess("readonly") if mibBuilder.loadTexts: sysCPUUserBusyPercent.setStatus('mandatory') if mibBuilder.loadTexts: sysCPUUserBusyPercent.setDescription('Percentage of time that the CPUs are busy running user-space code.') sysCPUSystemBusyPercent = MibScalar((1, 3, 6, 1, 4, 1, 7146, 1, 2, 1, 48), Gauge32()).setMaxAccess("readonly") if mibBuilder.loadTexts: sysCPUSystemBusyPercent.setStatus('mandatory') if mibBuilder.loadTexts: sysCPUSystemBusyPercent.setDescription('Percentage of time that the CPUs are busy running system code.') sysFDsFree = MibScalar((1, 3, 6, 1, 4, 1, 7146, 1, 2, 1, 49), Gauge32()).setMaxAccess("readonly") if mibBuilder.loadTexts: sysFDsFree.setStatus('mandatory') if mibBuilder.loadTexts: sysFDsFree.setDescription('Number of free file descriptors.') sysMemTotal = MibScalar((1, 3, 6, 1, 4, 1, 7146, 1, 2, 1, 50), Gauge32()).setMaxAccess("readonly") if mibBuilder.loadTexts: sysMemTotal.setStatus('mandatory') if mibBuilder.loadTexts: sysMemTotal.setDescription('Total memory (MBytes).') sysMemFree = MibScalar((1, 3, 6, 1, 4, 1, 7146, 1, 2, 1, 51), Gauge32()).setMaxAccess("readonly") if mibBuilder.loadTexts: sysMemFree.setStatus('mandatory') if mibBuilder.loadTexts: sysMemFree.setDescription('Free memory (MBytes).') sysMemInUse = MibScalar((1, 3, 6, 1, 4, 1, 7146, 1, 2, 1, 52), Gauge32()).setMaxAccess("readonly") if mibBuilder.loadTexts: sysMemInUse.setStatus('mandatory') if mibBuilder.loadTexts: sysMemInUse.setDescription('Memory used (MBytes).') sysMemBuffered = MibScalar((1, 3, 6, 1, 4, 1, 7146, 1, 2, 1, 53), Gauge32()).setMaxAccess("readonly") if mibBuilder.loadTexts: sysMemBuffered.setStatus('mandatory') if mibBuilder.loadTexts: sysMemBuffered.setDescription('Buffer memory (MBytes).') sysMemSwapped = MibScalar((1, 3, 6, 1, 4, 1, 7146, 1, 2, 1, 54), Gauge32()).setMaxAccess("readonly") if mibBuilder.loadTexts: sysMemSwapped.setStatus('mandatory') if mibBuilder.loadTexts: sysMemSwapped.setDescription('Amount of swap space in use (MBytes).') sysMemSwapTotal = MibScalar((1, 3, 6, 1, 4, 1, 7146, 1, 2, 1, 55), Gauge32()).setMaxAccess("readonly") if mibBuilder.loadTexts: sysMemSwapTotal.setStatus('mandatory') if mibBuilder.loadTexts: sysMemSwapTotal.setDescription('Total swap space (MBytes).') numIdleConnections = MibScalar((1, 3, 6, 1, 4, 1, 7146, 1, 2, 1, 56), Gauge32()).setMaxAccess("readonly") if mibBuilder.loadTexts: numIdleConnections.setStatus('mandatory') if mibBuilder.loadTexts: numIdleConnections.setDescription('Total number of idle HTTP connections to all nodes (used for future HTTP requests).') dataEntries = MibScalar((1, 3, 6, 1, 4, 1, 7146, 1, 2, 1, 58), Gauge32()).setMaxAccess("readonly") if mibBuilder.loadTexts: dataEntries.setStatus('mandatory') if mibBuilder.loadTexts: dataEntries.setDescription('Number of entries in the TrafficScript data.get()/set() storage.') dataMemoryUsage = MibScalar((1, 3, 6, 1, 4, 1, 7146, 1, 2, 1, 59), Gauge32()).setMaxAccess("readonly") if mibBuilder.loadTexts: dataMemoryUsage.setStatus('mandatory') if mibBuilder.loadTexts: dataMemoryUsage.setDescription('Number of bytes used in the TrafficScript data.get()/set() storage.') eventsSeen = MibScalar((1, 3, 6, 1, 4, 1, 7146, 1, 2, 1, 60), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: eventsSeen.setStatus('mandatory') if mibBuilder.loadTexts: eventsSeen.setDescription("Events seen by the traffic Manager's event handling process.") totalDNSResponses = MibScalar((1, 3, 6, 1, 4, 1, 7146, 1, 2, 1, 61), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: totalDNSResponses.setStatus('mandatory') if mibBuilder.loadTexts: totalDNSResponses.setDescription('Total number of DNS response packets handled.') totalBadDNSPackets = MibScalar((1, 3, 6, 1, 4, 1, 7146, 1, 2, 1, 62), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: totalBadDNSPackets.setStatus('mandatory') if mibBuilder.loadTexts: totalBadDNSPackets.setDescription('Total number of malformed DNS response packets encountered from the backend servers.') totalBackendServerErrors = MibScalar((1, 3, 6, 1, 4, 1, 7146, 1, 2, 1, 63), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: totalBackendServerErrors.setStatus('mandatory') if mibBuilder.loadTexts: totalBackendServerErrors.setDescription('Total errors returned from the backend servers.') virtualserverNumber = MibScalar((1, 3, 6, 1, 4, 1, 7146, 1, 2, 2, 1), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: virtualserverNumber.setStatus('mandatory') if mibBuilder.loadTexts: virtualserverNumber.setDescription('The number of virtual servers.') virtualserverTable = MibTable((1, 3, 6, 1, 4, 1, 7146, 1, 2, 2, 2), ) if mibBuilder.loadTexts: virtualserverTable.setStatus('mandatory') if mibBuilder.loadTexts: virtualserverTable.setDescription('This table gives information and statistics for the virtual servers the traffic manager is hosting.') virtualserverEntry = MibTableRow((1, 3, 6, 1, 4, 1, 7146, 1, 2, 2, 2, 1), ).setIndexNames((0, "ZXTM-MIB", "virtualserverName")) if mibBuilder.loadTexts: virtualserverEntry.setStatus('mandatory') if mibBuilder.loadTexts: virtualserverEntry.setDescription('This defines a row in the virtual servers table.') virtualserverName = MibTableColumn((1, 3, 6, 1, 4, 1, 7146, 1, 2, 2, 2, 1, 1), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 255))).setMaxAccess("readonly") if mibBuilder.loadTexts: virtualserverName.setStatus('mandatory') if mibBuilder.loadTexts: virtualserverName.setDescription('The name of the virtual server.') virtualserverPort = MibTableColumn((1, 3, 6, 1, 4, 1, 7146, 1, 2, 2, 2, 1, 2), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 65535))).setMaxAccess("readonly") if mibBuilder.loadTexts: virtualserverPort.setStatus('mandatory') if mibBuilder.loadTexts: virtualserverPort.setDescription('The port the virtual server listens on.') virtualserverProtocol = MibTableColumn((1, 3, 6, 1, 4, 1, 7146, 1, 2, 2, 2, 1, 3), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23))).clone(namedValues=NamedValues(("http", 1), ("https", 2), ("ftp", 3), ("imaps", 4), ("imapv2", 5), ("imapv3", 6), ("imapv4", 7), ("pop3", 8), ("pop3s", 9), ("smtp", 10), ("ldap", 11), ("ldaps", 12), ("telnet", 13), ("sslforwarding", 14), ("udpstreaming", 15), ("udp", 16), ("dns", 17), ("genericserverfirst", 18), ("genericclientfirst", 19), ("dnstcp", 20), ("sipudp", 21), ("siptcp", 22), ("rtsp", 23)))).setMaxAccess("readonly") if mibBuilder.loadTexts: virtualserverProtocol.setStatus('mandatory') if mibBuilder.loadTexts: virtualserverProtocol.setDescription('The protocol the virtual server is operating.') virtualserverDefaultTrafficPool = MibTableColumn((1, 3, 6, 1, 4, 1, 7146, 1, 2, 2, 2, 1, 4), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 255))).setMaxAccess("readonly") if mibBuilder.loadTexts: virtualserverDefaultTrafficPool.setStatus('mandatory') if mibBuilder.loadTexts: virtualserverDefaultTrafficPool.setDescription("The virtual server's default pool.") virtualserverBytesInLo = MibTableColumn((1, 3, 6, 1, 4, 1, 7146, 1, 2, 2, 2, 1, 5), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: virtualserverBytesInLo.setStatus('mandatory') if mibBuilder.loadTexts: virtualserverBytesInLo.setDescription('Bytes received by this virtual server from clients ( low 32bits ).') virtualserverBytesInHi = MibTableColumn((1, 3, 6, 1, 4, 1, 7146, 1, 2, 2, 2, 1, 6), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: virtualserverBytesInHi.setStatus('mandatory') if mibBuilder.loadTexts: virtualserverBytesInHi.setDescription('Bytes received by this virtual server from clients ( high 32bits ).') virtualserverBytesOutLo = MibTableColumn((1, 3, 6, 1, 4, 1, 7146, 1, 2, 2, 2, 1, 7), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: virtualserverBytesOutLo.setStatus('mandatory') if mibBuilder.loadTexts: virtualserverBytesOutLo.setDescription('Bytes sent by this virtual server to clients ( low 32bits ).') virtualserverBytesOutHi = MibTableColumn((1, 3, 6, 1, 4, 1, 7146, 1, 2, 2, 2, 1, 8), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: virtualserverBytesOutHi.setStatus('mandatory') if mibBuilder.loadTexts: virtualserverBytesOutHi.setDescription('Bytes sent by this virtual server to clients ( high 32bits ).') virtualserverCurrentConn = MibTableColumn((1, 3, 6, 1, 4, 1, 7146, 1, 2, 2, 2, 1, 9), Gauge32()).setMaxAccess("readonly") if mibBuilder.loadTexts: virtualserverCurrentConn.setStatus('mandatory') if mibBuilder.loadTexts: virtualserverCurrentConn.setDescription('TCP connections currently established to this virtual server.') virtualserverMaxConn = MibTableColumn((1, 3, 6, 1, 4, 1, 7146, 1, 2, 2, 2, 1, 10), Gauge32()).setMaxAccess("readonly") if mibBuilder.loadTexts: virtualserverMaxConn.setStatus('mandatory') if mibBuilder.loadTexts: virtualserverMaxConn.setDescription('Maximum number of simultaneous TCP connections this virtual server has processed at any one time.') virtualserverTotalConn = MibTableColumn((1, 3, 6, 1, 4, 1, 7146, 1, 2, 2, 2, 1, 11), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: virtualserverTotalConn.setStatus('mandatory') if mibBuilder.loadTexts: virtualserverTotalConn.setDescription('Requests received by this virtual server.') virtualserverDiscard = MibTableColumn((1, 3, 6, 1, 4, 1, 7146, 1, 2, 2, 2, 1, 12), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: virtualserverDiscard.setStatus('mandatory') if mibBuilder.loadTexts: virtualserverDiscard.setDescription('Connections discarded by this virtual server.') virtualserverDirectReplies = MibTableColumn((1, 3, 6, 1, 4, 1, 7146, 1, 2, 2, 2, 1, 13), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: virtualserverDirectReplies.setStatus('mandatory') if mibBuilder.loadTexts: virtualserverDirectReplies.setDescription('Direct replies from this virtual server, without forwarding to a node.') virtualserverConnectTimedOut = MibTableColumn((1, 3, 6, 1, 4, 1, 7146, 1, 2, 2, 2, 1, 14), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: virtualserverConnectTimedOut.setStatus('mandatory') if mibBuilder.loadTexts: virtualserverConnectTimedOut.setDescription("Connections closed by this virtual server because the 'connect_timeout' interval was exceeded.") virtualserverDataTimedOut = MibTableColumn((1, 3, 6, 1, 4, 1, 7146, 1, 2, 2, 2, 1, 15), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: virtualserverDataTimedOut.setStatus('mandatory') if mibBuilder.loadTexts: virtualserverDataTimedOut.setDescription("Connections closed by this virtual server because the 'timeout' interval was exceeded.") virtualserverKeepaliveTimedOut = MibTableColumn((1, 3, 6, 1, 4, 1, 7146, 1, 2, 2, 2, 1, 16), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: virtualserverKeepaliveTimedOut.setStatus('mandatory') if mibBuilder.loadTexts: virtualserverKeepaliveTimedOut.setDescription("Connections closed by this virtual server because the 'keepalive_timeout' interval was exceeded.") virtualserverUdpTimedOut = MibTableColumn((1, 3, 6, 1, 4, 1, 7146, 1, 2, 2, 2, 1, 17), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: virtualserverUdpTimedOut.setStatus('mandatory') if mibBuilder.loadTexts: virtualserverUdpTimedOut.setDescription("Connections closed by this virtual server because the 'udp_timeout' interval was exceeded.") virtualserverTotalDgram = MibTableColumn((1, 3, 6, 1, 4, 1, 7146, 1, 2, 2, 2, 1, 18), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: virtualserverTotalDgram.setStatus('mandatory') if mibBuilder.loadTexts: virtualserverTotalDgram.setDescription('UDP datagrams processed by this virtual server.') virtualserverGzip = MibTableColumn((1, 3, 6, 1, 4, 1, 7146, 1, 2, 2, 2, 1, 19), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: virtualserverGzip.setStatus('mandatory') if mibBuilder.loadTexts: virtualserverGzip.setDescription('Responses which have been compressed by content compression.') virtualserverGzipBytesSavedLo = MibTableColumn((1, 3, 6, 1, 4, 1, 7146, 1, 2, 2, 2, 1, 20), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: virtualserverGzipBytesSavedLo.setStatus('mandatory') if mibBuilder.loadTexts: virtualserverGzipBytesSavedLo.setDescription('Bytes of network traffic saved by content compression ( low 32bits ).') virtualserverGzipBytesSavedHi = MibTableColumn((1, 3, 6, 1, 4, 1, 7146, 1, 2, 2, 2, 1, 21), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: virtualserverGzipBytesSavedHi.setStatus('mandatory') if mibBuilder.loadTexts: virtualserverGzipBytesSavedHi.setDescription('Bytes of network traffic saved by content compression ( high 32bits ).') virtualserverHttpRewriteLocation = MibTableColumn((1, 3, 6, 1, 4, 1, 7146, 1, 2, 2, 2, 1, 22), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: virtualserverHttpRewriteLocation.setStatus('mandatory') if mibBuilder.loadTexts: virtualserverHttpRewriteLocation.setDescription('HTTP Location headers, supplied by a node, that have been rewritten.') virtualserverHttpRewriteCookie = MibTableColumn((1, 3, 6, 1, 4, 1, 7146, 1, 2, 2, 2, 1, 23), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: virtualserverHttpRewriteCookie.setStatus('mandatory') if mibBuilder.loadTexts: virtualserverHttpRewriteCookie.setDescription('HTTP Set-Cookie headers, supplied by a node, that have been rewritten.') virtualserverHttpCacheHits = MibTableColumn((1, 3, 6, 1, 4, 1, 7146, 1, 2, 2, 2, 1, 24), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: virtualserverHttpCacheHits.setStatus('mandatory') if mibBuilder.loadTexts: virtualserverHttpCacheHits.setDescription('HTTP responses sent directly from the web cache by this virtual server.') virtualserverHttpCacheLookups = MibTableColumn((1, 3, 6, 1, 4, 1, 7146, 1, 2, 2, 2, 1, 25), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: virtualserverHttpCacheLookups.setStatus('mandatory') if mibBuilder.loadTexts: virtualserverHttpCacheLookups.setDescription('HTTP requests that are looked up in the web cache by this virtual server.') virtualserverHttpCacheHitRate = MibTableColumn((1, 3, 6, 1, 4, 1, 7146, 1, 2, 2, 2, 1, 26), Gauge32()).setMaxAccess("readonly") if mibBuilder.loadTexts: virtualserverHttpCacheHitRate.setStatus('mandatory') if mibBuilder.loadTexts: virtualserverHttpCacheHitRate.setDescription('Percentage hit rate of the web cache for this virtual server.') virtualserverSIPTotalCalls = MibTableColumn((1, 3, 6, 1, 4, 1, 7146, 1, 2, 2, 2, 1, 27), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: virtualserverSIPTotalCalls.setStatus('mandatory') if mibBuilder.loadTexts: virtualserverSIPTotalCalls.setDescription('Total number of SIP INVITE requests seen by this virtual server.') virtualserverSIPRejectedRequests = MibTableColumn((1, 3, 6, 1, 4, 1, 7146, 1, 2, 2, 2, 1, 28), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: virtualserverSIPRejectedRequests.setStatus('mandatory') if mibBuilder.loadTexts: virtualserverSIPRejectedRequests.setDescription('Number of SIP requests rejected due to them exceeding the maximum amount of memory allocated to the connection.') virtualserverConnectionErrors = MibTableColumn((1, 3, 6, 1, 4, 1, 7146, 1, 2, 2, 2, 1, 29), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: virtualserverConnectionErrors.setStatus('mandatory') if mibBuilder.loadTexts: virtualserverConnectionErrors.setDescription('Number of transaction or protocol errors in this virtual server.') virtualserverConnectionFailures = MibTableColumn((1, 3, 6, 1, 4, 1, 7146, 1, 2, 2, 2, 1, 30), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: virtualserverConnectionFailures.setStatus('mandatory') if mibBuilder.loadTexts: virtualserverConnectionFailures.setDescription('Number of connection failures in this virtual server.') poolNumber = MibScalar((1, 3, 6, 1, 4, 1, 7146, 1, 2, 3, 1), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 65535))).setMaxAccess("readonly") if mibBuilder.loadTexts: poolNumber.setStatus('mandatory') if mibBuilder.loadTexts: poolNumber.setDescription('The number of pools on this system.') poolTable = MibTable((1, 3, 6, 1, 4, 1, 7146, 1, 2, 3, 2), ) if mibBuilder.loadTexts: poolTable.setStatus('mandatory') if mibBuilder.loadTexts: poolTable.setDescription('This table provides information and statistics for pools.') poolEntry = MibTableRow((1, 3, 6, 1, 4, 1, 7146, 1, 2, 3, 2, 1), ).setIndexNames((0, "ZXTM-MIB", "poolName")) if mibBuilder.loadTexts: poolEntry.setStatus('mandatory') if mibBuilder.loadTexts: poolEntry.setDescription('This defines a row in the pools table.') poolName = MibTableColumn((1, 3, 6, 1, 4, 1, 7146, 1, 2, 3, 2, 1, 1), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 255))).setMaxAccess("readonly") if mibBuilder.loadTexts: poolName.setStatus('mandatory') if mibBuilder.loadTexts: poolName.setDescription('The name of the pool.') poolAlgorithm = MibTableColumn((1, 3, 6, 1, 4, 1, 7146, 1, 2, 3, 2, 1, 2), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4, 5, 6, 7))).clone(namedValues=NamedValues(("roundrobin", 1), ("weightedRoundRobin", 2), ("perceptive", 3), ("leastConnections", 4), ("fastestResponseTime", 5), ("random", 6), ("weightedLeastConnections", 7)))).setMaxAccess("readonly") if mibBuilder.loadTexts: poolAlgorithm.setStatus('mandatory') if mibBuilder.loadTexts: poolAlgorithm.setDescription('The load-balancing algorithm the pool uses.') poolNodes = MibTableColumn((1, 3, 6, 1, 4, 1, 7146, 1, 2, 3, 2, 1, 3), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: poolNodes.setStatus('mandatory') if mibBuilder.loadTexts: poolNodes.setDescription('The number of nodes registered with this pool.') poolDraining = MibTableColumn((1, 3, 6, 1, 4, 1, 7146, 1, 2, 3, 2, 1, 4), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: poolDraining.setStatus('mandatory') if mibBuilder.loadTexts: poolDraining.setDescription('The number of nodes in this pool which are draining.') poolFailPool = MibTableColumn((1, 3, 6, 1, 4, 1, 7146, 1, 2, 3, 2, 1, 5), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 255))).setMaxAccess("readonly") if mibBuilder.loadTexts: poolFailPool.setStatus('mandatory') if mibBuilder.loadTexts: poolFailPool.setDescription("The name of this pool's failure pool.") poolBytesInLo = MibTableColumn((1, 3, 6, 1, 4, 1, 7146, 1, 2, 3, 2, 1, 6), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: poolBytesInLo.setStatus('mandatory') if mibBuilder.loadTexts: poolBytesInLo.setDescription('Bytes received by this pool from nodes ( low 32bits ).') poolBytesInHi = MibTableColumn((1, 3, 6, 1, 4, 1, 7146, 1, 2, 3, 2, 1, 7), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: poolBytesInHi.setStatus('mandatory') if mibBuilder.loadTexts: poolBytesInHi.setDescription('Bytes received by this pool from nodes ( high 32bits ).') poolBytesOutLo = MibTableColumn((1, 3, 6, 1, 4, 1, 7146, 1, 2, 3, 2, 1, 8), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: poolBytesOutLo.setStatus('mandatory') if mibBuilder.loadTexts: poolBytesOutLo.setDescription('Bytes sent by this pool to nodes ( low 32bits ).') poolBytesOutHi = MibTableColumn((1, 3, 6, 1, 4, 1, 7146, 1, 2, 3, 2, 1, 9), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: poolBytesOutHi.setStatus('mandatory') if mibBuilder.loadTexts: poolBytesOutHi.setDescription('Bytes sent by this pool to nodes ( high 32bits ).') poolTotalConn = MibTableColumn((1, 3, 6, 1, 4, 1, 7146, 1, 2, 3, 2, 1, 10), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: poolTotalConn.setStatus('mandatory') if mibBuilder.loadTexts: poolTotalConn.setDescription('Requests sent to this pool.') poolPersistence = MibTableColumn((1, 3, 6, 1, 4, 1, 7146, 1, 2, 3, 2, 1, 11), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4, 5, 6, 7))).clone(namedValues=NamedValues(("none", 1), ("ip", 2), ("rule", 3), ("transparent", 4), ("applicationCookie", 5), ("xZeusBackend", 6), ("ssl", 7)))).setMaxAccess("readonly") if mibBuilder.loadTexts: poolPersistence.setStatus('mandatory') if mibBuilder.loadTexts: poolPersistence.setDescription('The session persistence method this pool uses') poolSessionMigrated = MibTableColumn((1, 3, 6, 1, 4, 1, 7146, 1, 2, 3, 2, 1, 12), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: poolSessionMigrated.setStatus('mandatory') if mibBuilder.loadTexts: poolSessionMigrated.setDescription('Sessions migrated to a new node because the desired node was unavailable.') poolDisabled = MibTableColumn((1, 3, 6, 1, 4, 1, 7146, 1, 2, 3, 2, 1, 13), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: poolDisabled.setStatus('mandatory') if mibBuilder.loadTexts: poolDisabled.setDescription('The number of nodes in this pool that are disabled.') poolState = MibTableColumn((1, 3, 6, 1, 4, 1, 7146, 1, 2, 3, 2, 1, 14), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4, 5))).clone(namedValues=NamedValues(("active", 1), ("disabled", 2), ("draining", 3), ("unused", 4), ("unknown", 5)))).setMaxAccess("readonly") if mibBuilder.loadTexts: poolState.setStatus('mandatory') if mibBuilder.loadTexts: poolState.setDescription('The state of this pool.') poolConnsQueued = MibTableColumn((1, 3, 6, 1, 4, 1, 7146, 1, 2, 3, 2, 1, 17), Gauge32()).setMaxAccess("readonly") if mibBuilder.loadTexts: poolConnsQueued.setStatus('mandatory') if mibBuilder.loadTexts: poolConnsQueued.setDescription('Total connections currently queued to this pool.') poolQueueTimeouts = MibTableColumn((1, 3, 6, 1, 4, 1, 7146, 1, 2, 3, 2, 1, 18), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: poolQueueTimeouts.setStatus('mandatory') if mibBuilder.loadTexts: poolQueueTimeouts.setDescription('Total connections that timed-out while queued.') poolMinQueueTime = MibTableColumn((1, 3, 6, 1, 4, 1, 7146, 1, 2, 3, 2, 1, 19), Gauge32()).setMaxAccess("readonly") if mibBuilder.loadTexts: poolMinQueueTime.setStatus('mandatory') if mibBuilder.loadTexts: poolMinQueueTime.setDescription('Minimum time a connection was queued for, over the last second.') poolMaxQueueTime = MibTableColumn((1, 3, 6, 1, 4, 1, 7146, 1, 2, 3, 2, 1, 20), Gauge32()).setMaxAccess("readonly") if mibBuilder.loadTexts: poolMaxQueueTime.setStatus('mandatory') if mibBuilder.loadTexts: poolMaxQueueTime.setDescription('Maximum time a connection was queued for, over the last second.') poolMeanQueueTime = MibTableColumn((1, 3, 6, 1, 4, 1, 7146, 1, 2, 3, 2, 1, 21), Gauge32()).setMaxAccess("readonly") if mibBuilder.loadTexts: poolMeanQueueTime.setStatus('mandatory') if mibBuilder.loadTexts: poolMeanQueueTime.setDescription('Mean time a connection was queued for, over the last second.') nodeNumber = MibScalar((1, 3, 6, 1, 4, 1, 7146, 1, 2, 4, 1), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 65535))).setMaxAccess("readonly") if mibBuilder.loadTexts: nodeNumber.setStatus('obsolete') if mibBuilder.loadTexts: nodeNumber.setDescription('The number of IPv4 nodes on this system.') nodeTable = MibTable((1, 3, 6, 1, 4, 1, 7146, 1, 2, 4, 2), ) if mibBuilder.loadTexts: nodeTable.setStatus('obsolete') if mibBuilder.loadTexts: nodeTable.setDescription('This table defines all the information for a particular IPv4 node.') nodeEntry = MibTableRow((1, 3, 6, 1, 4, 1, 7146, 1, 2, 4, 2, 1), ).setIndexNames((0, "ZXTM-MIB", "nodeIPAddress"), (0, "ZXTM-MIB", "nodePort")) if mibBuilder.loadTexts: nodeEntry.setStatus('obsolete') if mibBuilder.loadTexts: nodeEntry.setDescription('This defines a row in the IPv4 nodes table.') nodeIPAddress = MibTableColumn((1, 3, 6, 1, 4, 1, 7146, 1, 2, 4, 2, 1, 1), IpAddress()).setMaxAccess("readonly") if mibBuilder.loadTexts: nodeIPAddress.setStatus('obsolete') if mibBuilder.loadTexts: nodeIPAddress.setDescription('The IPv4 address of this node.') nodePort = MibTableColumn((1, 3, 6, 1, 4, 1, 7146, 1, 2, 4, 2, 1, 2), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 65535))).setMaxAccess("readonly") if mibBuilder.loadTexts: nodePort.setStatus('obsolete') if mibBuilder.loadTexts: nodePort.setDescription('The port this node listens on.') nodeHostName = MibTableColumn((1, 3, 6, 1, 4, 1, 7146, 1, 2, 4, 2, 1, 3), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 255))).setMaxAccess("readonly") if mibBuilder.loadTexts: nodeHostName.setStatus('obsolete') if mibBuilder.loadTexts: nodeHostName.setDescription('The resolved name for this node.') nodeState = MibTableColumn((1, 3, 6, 1, 4, 1, 7146, 1, 2, 4, 2, 1, 4), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3))).clone(namedValues=NamedValues(("alive", 1), ("dead", 2), ("unknown", 3)))).setMaxAccess("readonly") if mibBuilder.loadTexts: nodeState.setStatus('obsolete') if mibBuilder.loadTexts: nodeState.setDescription('The state of this node.') nodeBytesToNodeLo = MibTableColumn((1, 3, 6, 1, 4, 1, 7146, 1, 2, 4, 2, 1, 5), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: nodeBytesToNodeLo.setStatus('obsolete') if mibBuilder.loadTexts: nodeBytesToNodeLo.setDescription('Bytes sent to this node ( low 32bits ).') nodeBytesToNodeHi = MibTableColumn((1, 3, 6, 1, 4, 1, 7146, 1, 2, 4, 2, 1, 6), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: nodeBytesToNodeHi.setStatus('obsolete') if mibBuilder.loadTexts: nodeBytesToNodeHi.setDescription('Bytes sent to this node ( high 32bits ).') nodeBytesFromNodeLo = MibTableColumn((1, 3, 6, 1, 4, 1, 7146, 1, 2, 4, 2, 1, 7), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: nodeBytesFromNodeLo.setStatus('obsolete') if mibBuilder.loadTexts: nodeBytesFromNodeLo.setDescription('Bytes received from this node ( low 32bits ).') nodeBytesFromNodeHi = MibTableColumn((1, 3, 6, 1, 4, 1, 7146, 1, 2, 4, 2, 1, 8), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: nodeBytesFromNodeHi.setStatus('obsolete') if mibBuilder.loadTexts: nodeBytesFromNodeHi.setDescription('Bytes received from this node ( high 32bits ).') nodeCurrentRequests = MibTableColumn((1, 3, 6, 1, 4, 1, 7146, 1, 2, 4, 2, 1, 9), Gauge32()).setMaxAccess("readonly") if mibBuilder.loadTexts: nodeCurrentRequests.setStatus('obsolete') if mibBuilder.loadTexts: nodeCurrentRequests.setDescription('Connections currently established to this node.') nodeTotalConn = MibTableColumn((1, 3, 6, 1, 4, 1, 7146, 1, 2, 4, 2, 1, 10), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: nodeTotalConn.setStatus('obsolete') if mibBuilder.loadTexts: nodeTotalConn.setDescription('Requests sent to this node.') nodePooledConn = MibTableColumn((1, 3, 6, 1, 4, 1, 7146, 1, 2, 4, 2, 1, 11), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: nodePooledConn.setStatus('obsolete') if mibBuilder.loadTexts: nodePooledConn.setDescription('Requests that reused an existing pooled/keepalive connection rather than creating a new TCP connection.') nodeFailures = MibTableColumn((1, 3, 6, 1, 4, 1, 7146, 1, 2, 4, 2, 1, 12), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: nodeFailures.setStatus('obsolete') if mibBuilder.loadTexts: nodeFailures.setDescription('Failures of this node.') nodeNewConn = MibTableColumn((1, 3, 6, 1, 4, 1, 7146, 1, 2, 4, 2, 1, 13), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: nodeNewConn.setStatus('obsolete') if mibBuilder.loadTexts: nodeNewConn.setDescription('Requests that created a new connection to this node.') nodeErrors = MibTableColumn((1, 3, 6, 1, 4, 1, 7146, 1, 2, 4, 2, 1, 14), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: nodeErrors.setStatus('obsolete') if mibBuilder.loadTexts: nodeErrors.setDescription('Number of timeouts, connection problems and other errors for this node.') nodeResponseMin = MibTableColumn((1, 3, 6, 1, 4, 1, 7146, 1, 2, 4, 2, 1, 15), Gauge32()).setMaxAccess("readonly") if mibBuilder.loadTexts: nodeResponseMin.setStatus('obsolete') if mibBuilder.loadTexts: nodeResponseMin.setDescription('Minimum response time (ms) in the last second for this node.') nodeResponseMax = MibTableColumn((1, 3, 6, 1, 4, 1, 7146, 1, 2, 4, 2, 1, 16), Gauge32()).setMaxAccess("readonly") if mibBuilder.loadTexts: nodeResponseMax.setStatus('obsolete') if mibBuilder.loadTexts: nodeResponseMax.setDescription('Maximum response time (ms) in the last second for this node.') nodeResponseMean = MibTableColumn((1, 3, 6, 1, 4, 1, 7146, 1, 2, 4, 2, 1, 17), Gauge32()).setMaxAccess("readonly") if mibBuilder.loadTexts: nodeResponseMean.setStatus('obsolete') if mibBuilder.loadTexts: nodeResponseMean.setDescription('Mean response time (ms) in the last second for this node.') nodeNumberInet46 = MibScalar((1, 3, 6, 1, 4, 1, 7146, 1, 2, 4, 3), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 65535))).setMaxAccess("readonly") if mibBuilder.loadTexts: nodeNumberInet46.setStatus('mandatory') if mibBuilder.loadTexts: nodeNumberInet46.setDescription('The number of nodes on this system (includes IPv4 and IPv6 nodes).') nodeCurrentConn = MibTableColumn((1, 3, 6, 1, 4, 1, 7146, 1, 2, 4, 2, 1, 18), Gauge32()).setMaxAccess("readonly") if mibBuilder.loadTexts: nodeCurrentConn.setStatus('obsolete') if mibBuilder.loadTexts: nodeCurrentConn.setDescription('Requests currently established to this node. ( does not include idle keepalives ).') nodeInet46Table = MibTable((1, 3, 6, 1, 4, 1, 7146, 1, 2, 4, 4), ) if mibBuilder.loadTexts: nodeInet46Table.setStatus('mandatory') if mibBuilder.loadTexts: nodeInet46Table.setDescription('This table defines all the information for a particular node (includes IPv4 and IPv6 addresses).') nodeInet46Entry = MibTableRow((1, 3, 6, 1, 4, 1, 7146, 1, 2, 4, 4, 1), ).setIndexNames((0, "ZXTM-MIB", "nodeInet46AddressType"), (0, "ZXTM-MIB", "nodeInet46Address"), (0, "ZXTM-MIB", "nodeInet46Port")) if mibBuilder.loadTexts: nodeInet46Entry.setStatus('mandatory') if mibBuilder.loadTexts: nodeInet46Entry.setDescription('This defines a row in the nodes table (includes IPv4 and IPv6 addresses).') nodeInet46AddressType = MibTableColumn((1, 3, 6, 1, 4, 1, 7146, 1, 2, 4, 4, 1, 1), InetAddressType()).setMaxAccess("readonly") if mibBuilder.loadTexts: nodeInet46AddressType.setStatus('mandatory') if mibBuilder.loadTexts: nodeInet46AddressType.setDescription('The IP address type of this node.') nodeInet46Address = MibTableColumn((1, 3, 6, 1, 4, 1, 7146, 1, 2, 4, 4, 1, 2), InetAddress().subtype(subtypeSpec=ValueSizeConstraint(1, 64))).setMaxAccess("readonly") if mibBuilder.loadTexts: nodeInet46Address.setStatus('mandatory') if mibBuilder.loadTexts: nodeInet46Address.setDescription('The IPv4 or IPv6 address of this node.') nodeInet46Port = MibTableColumn((1, 3, 6, 1, 4, 1, 7146, 1, 2, 4, 4, 1, 3), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 65535))).setMaxAccess("readonly") if mibBuilder.loadTexts: nodeInet46Port.setStatus('mandatory') if mibBuilder.loadTexts: nodeInet46Port.setDescription('The port this node listens on.') nodeInet46HostName = MibTableColumn((1, 3, 6, 1, 4, 1, 7146, 1, 2, 4, 4, 1, 4), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 255))).setMaxAccess("readonly") if mibBuilder.loadTexts: nodeInet46HostName.setStatus('mandatory') if mibBuilder.loadTexts: nodeInet46HostName.setDescription('The resolved name for this node.') nodeInet46State = MibTableColumn((1, 3, 6, 1, 4, 1, 7146, 1, 2, 4, 4, 1, 5), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3))).clone(namedValues=NamedValues(("alive", 1), ("dead", 2), ("unknown", 3)))).setMaxAccess("readonly") if mibBuilder.loadTexts: nodeInet46State.setStatus('mandatory') if mibBuilder.loadTexts: nodeInet46State.setDescription('The state of this node.') nodeInet46BytesToNodeLo = MibTableColumn((1, 3, 6, 1, 4, 1, 7146, 1, 2, 4, 4, 1, 6), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: nodeInet46BytesToNodeLo.setStatus('mandatory') if mibBuilder.loadTexts: nodeInet46BytesToNodeLo.setDescription('Bytes sent to this node ( low 32bits ).') nodeInet46BytesToNodeHi = MibTableColumn((1, 3, 6, 1, 4, 1, 7146, 1, 2, 4, 4, 1, 7), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: nodeInet46BytesToNodeHi.setStatus('mandatory') if mibBuilder.loadTexts: nodeInet46BytesToNodeHi.setDescription('Bytes sent to this node ( high 32bits ).') nodeInet46BytesFromNodeLo = MibTableColumn((1, 3, 6, 1, 4, 1, 7146, 1, 2, 4, 4, 1, 8), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: nodeInet46BytesFromNodeLo.setStatus('mandatory') if mibBuilder.loadTexts: nodeInet46BytesFromNodeLo.setDescription('Bytes received from this node ( low 32bits ).') nodeInet46BytesFromNodeHi = MibTableColumn((1, 3, 6, 1, 4, 1, 7146, 1, 2, 4, 4, 1, 9), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: nodeInet46BytesFromNodeHi.setStatus('mandatory') if mibBuilder.loadTexts: nodeInet46BytesFromNodeHi.setDescription('Bytes received from this node ( high 32bits ).') nodeInet46CurrentRequests = MibTableColumn((1, 3, 6, 1, 4, 1, 7146, 1, 2, 4, 4, 1, 10), Gauge32()).setMaxAccess("readonly") if mibBuilder.loadTexts: nodeInet46CurrentRequests.setStatus('mandatory') if mibBuilder.loadTexts: nodeInet46CurrentRequests.setDescription('Active connections established to this node, does not include idle connections.') nodeInet46TotalConn = MibTableColumn((1, 3, 6, 1, 4, 1, 7146, 1, 2, 4, 4, 1, 11), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: nodeInet46TotalConn.setStatus('mandatory') if mibBuilder.loadTexts: nodeInet46TotalConn.setDescription('Requests sent to this node.') nodeInet46PooledConn = MibTableColumn((1, 3, 6, 1, 4, 1, 7146, 1, 2, 4, 4, 1, 12), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: nodeInet46PooledConn.setStatus('mandatory') if mibBuilder.loadTexts: nodeInet46PooledConn.setDescription('Requests that reused an existing pooled/keepalive connection rather than creating a new TCP connection.') nodeInet46Failures = MibTableColumn((1, 3, 6, 1, 4, 1, 7146, 1, 2, 4, 4, 1, 13), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: nodeInet46Failures.setStatus('mandatory') if mibBuilder.loadTexts: nodeInet46Failures.setDescription('Failures of this node.') nodeInet46NewConn = MibTableColumn((1, 3, 6, 1, 4, 1, 7146, 1, 2, 4, 4, 1, 14), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: nodeInet46NewConn.setStatus('mandatory') if mibBuilder.loadTexts: nodeInet46NewConn.setDescription('Requests that created a new connection to this node.') nodeInet46Errors = MibTableColumn((1, 3, 6, 1, 4, 1, 7146, 1, 2, 4, 4, 1, 15), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: nodeInet46Errors.setStatus('mandatory') if mibBuilder.loadTexts: nodeInet46Errors.setDescription('Number of timeouts, connection problems and other errors for this node.') nodeInet46ResponseMin = MibTableColumn((1, 3, 6, 1, 4, 1, 7146, 1, 2, 4, 4, 1, 16), Gauge32()).setMaxAccess("readonly") if mibBuilder.loadTexts: nodeInet46ResponseMin.setStatus('mandatory') if mibBuilder.loadTexts: nodeInet46ResponseMin.setDescription('Minimum response time (ms) in the last second for this node.') nodeInet46ResponseMax = MibTableColumn((1, 3, 6, 1, 4, 1, 7146, 1, 2, 4, 4, 1, 17), Gauge32()).setMaxAccess("readonly") if mibBuilder.loadTexts: nodeInet46ResponseMax.setStatus('mandatory') if mibBuilder.loadTexts: nodeInet46ResponseMax.setDescription('Maximum response time (ms) in the last second for this node.') nodeInet46ResponseMean = MibTableColumn((1, 3, 6, 1, 4, 1, 7146, 1, 2, 4, 4, 1, 18), Gauge32()).setMaxAccess("readonly") if mibBuilder.loadTexts: nodeInet46ResponseMean.setStatus('mandatory') if mibBuilder.loadTexts: nodeInet46ResponseMean.setDescription('Mean response time (ms) in the last second for this node.') nodeInet46IdleConns = MibTableColumn((1, 3, 6, 1, 4, 1, 7146, 1, 2, 4, 4, 1, 19), Gauge32()).setMaxAccess("readonly") if mibBuilder.loadTexts: nodeInet46IdleConns.setStatus('mandatory') if mibBuilder.loadTexts: nodeInet46IdleConns.setDescription('Number of idle HTTP connections to this node.') nodeInet46CurrentConn = MibTableColumn((1, 3, 6, 1, 4, 1, 7146, 1, 2, 4, 4, 1, 20), Gauge32()).setMaxAccess("readonly") if mibBuilder.loadTexts: nodeInet46CurrentConn.setStatus('mandatory') if mibBuilder.loadTexts: nodeInet46CurrentConn.setDescription('Current connections established to this node, includes idle connections.') perPoolNodeNumber = MibScalar((1, 3, 6, 1, 4, 1, 7146, 1, 2, 4, 5), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 65535))).setMaxAccess("readonly") if mibBuilder.loadTexts: perPoolNodeNumber.setStatus('mandatory') if mibBuilder.loadTexts: perPoolNodeNumber.setDescription('The number of nodes on this system.') perPoolNodeTable = MibTable((1, 3, 6, 1, 4, 1, 7146, 1, 2, 4, 6), ) if mibBuilder.loadTexts: perPoolNodeTable.setStatus('mandatory') if mibBuilder.loadTexts: perPoolNodeTable.setDescription('This table defines all the information for a particular node in a pool.') perPoolNodeEntry = MibTableRow((1, 3, 6, 1, 4, 1, 7146, 1, 2, 4, 6, 1), ).setIndexNames((0, "ZXTM-MIB", "perPoolNodePoolName"), (0, "ZXTM-MIB", "perPoolNodeNodeAddressType"), (0, "ZXTM-MIB", "perPoolNodeNodeAddress"), (0, "ZXTM-MIB", "perPoolNodeNodePort")) if mibBuilder.loadTexts: perPoolNodeEntry.setStatus('mandatory') if mibBuilder.loadTexts: perPoolNodeEntry.setDescription('This defines a row in the perPoolNodes table.') perPoolNodePoolName = MibTableColumn((1, 3, 6, 1, 4, 1, 7146, 1, 2, 4, 6, 1, 1), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 255))).setMaxAccess("readonly") if mibBuilder.loadTexts: perPoolNodePoolName.setStatus('mandatory') if mibBuilder.loadTexts: perPoolNodePoolName.setDescription('The name of the pool that this node belongs to.') perPoolNodeNodeAddressType = MibTableColumn((1, 3, 6, 1, 4, 1, 7146, 1, 2, 4, 6, 1, 2), InetAddressType()).setMaxAccess("readonly") if mibBuilder.loadTexts: perPoolNodeNodeAddressType.setStatus('mandatory') if mibBuilder.loadTexts: perPoolNodeNodeAddressType.setDescription('The IP address type of this node.') perPoolNodeNodeAddress = MibTableColumn((1, 3, 6, 1, 4, 1, 7146, 1, 2, 4, 6, 1, 3), InetAddress().subtype(subtypeSpec=ValueSizeConstraint(1, 64))).setMaxAccess("readonly") if mibBuilder.loadTexts: perPoolNodeNodeAddress.setStatus('mandatory') if mibBuilder.loadTexts: perPoolNodeNodeAddress.setDescription('The IPv4 or IPv6 address of this node.') perPoolNodeNodePort = MibTableColumn((1, 3, 6, 1, 4, 1, 7146, 1, 2, 4, 6, 1, 4), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 65535))).setMaxAccess("readonly") if mibBuilder.loadTexts: perPoolNodeNodePort.setStatus('mandatory') if mibBuilder.loadTexts: perPoolNodeNodePort.setDescription('The port that this node listens on.') perPoolNodeNodeHostName = MibTableColumn((1, 3, 6, 1, 4, 1, 7146, 1, 2, 4, 6, 1, 5), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 255))).setMaxAccess("readonly") if mibBuilder.loadTexts: perPoolNodeNodeHostName.setStatus('mandatory') if mibBuilder.loadTexts: perPoolNodeNodeHostName.setDescription('The name for this node provided in the configuration.') perPoolNodeState = MibTableColumn((1, 3, 6, 1, 4, 1, 7146, 1, 2, 4, 6, 1, 6), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4))).clone(namedValues=NamedValues(("alive", 1), ("dead", 2), ("unknown", 3), ("draining", 4)))).setMaxAccess("readonly") if mibBuilder.loadTexts: perPoolNodeState.setStatus('mandatory') if mibBuilder.loadTexts: perPoolNodeState.setDescription('The state of this node.') perPoolNodeBytesToNodeLo = MibTableColumn((1, 3, 6, 1, 4, 1, 7146, 1, 2, 4, 6, 1, 7), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: perPoolNodeBytesToNodeLo.setStatus('mandatory') if mibBuilder.loadTexts: perPoolNodeBytesToNodeLo.setDescription('Bytes sent to this node ( low 32bits ).') perPoolNodeBytesToNodeHi = MibTableColumn((1, 3, 6, 1, 4, 1, 7146, 1, 2, 4, 6, 1, 8), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: perPoolNodeBytesToNodeHi.setStatus('mandatory') if mibBuilder.loadTexts: perPoolNodeBytesToNodeHi.setDescription('Bytes sent to this node ( high 32bits ).') perPoolNodeBytesFromNodeLo = MibTableColumn((1, 3, 6, 1, 4, 1, 7146, 1, 2, 4, 6, 1, 9), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: perPoolNodeBytesFromNodeLo.setStatus('mandatory') if mibBuilder.loadTexts: perPoolNodeBytesFromNodeLo.setDescription('Bytes received from this node ( low 32bits ).') perPoolNodeBytesFromNodeHi = MibTableColumn((1, 3, 6, 1, 4, 1, 7146, 1, 2, 4, 6, 1, 10), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: perPoolNodeBytesFromNodeHi.setStatus('mandatory') if mibBuilder.loadTexts: perPoolNodeBytesFromNodeHi.setDescription('Bytes received from this node ( high 32bits ).') perPoolNodeCurrentRequests = MibTableColumn((1, 3, 6, 1, 4, 1, 7146, 1, 2, 4, 6, 1, 11), Gauge32()).setMaxAccess("readonly") if mibBuilder.loadTexts: perPoolNodeCurrentRequests.setStatus('mandatory') if mibBuilder.loadTexts: perPoolNodeCurrentRequests.setDescription('Active connections established to this node, does not include idle connections.') perPoolNodeTotalConn = MibTableColumn((1, 3, 6, 1, 4, 1, 7146, 1, 2, 4, 6, 1, 12), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: perPoolNodeTotalConn.setStatus('mandatory') if mibBuilder.loadTexts: perPoolNodeTotalConn.setDescription('Requests sent to this node.') perPoolNodePooledConn = MibTableColumn((1, 3, 6, 1, 4, 1, 7146, 1, 2, 4, 6, 1, 13), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: perPoolNodePooledConn.setStatus('mandatory') if mibBuilder.loadTexts: perPoolNodePooledConn.setDescription('Requests that reused an existing pooled/keepalive connection rather than creating a new TCP connection.') perPoolNodeFailures = MibTableColumn((1, 3, 6, 1, 4, 1, 7146, 1, 2, 4, 6, 1, 14), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: perPoolNodeFailures.setStatus('mandatory') if mibBuilder.loadTexts: perPoolNodeFailures.setDescription('Failures of this node.') perPoolNodeNewConn = MibTableColumn((1, 3, 6, 1, 4, 1, 7146, 1, 2, 4, 6, 1, 15), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: perPoolNodeNewConn.setStatus('mandatory') if mibBuilder.loadTexts: perPoolNodeNewConn.setDescription('Requests that created a new connection to this node.') perPoolNodeErrors = MibTableColumn((1, 3, 6, 1, 4, 1, 7146, 1, 2, 4, 6, 1, 16), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: perPoolNodeErrors.setStatus('mandatory') if mibBuilder.loadTexts: perPoolNodeErrors.setDescription('Number of timeouts, connection problems and other errors for this node.') perPoolNodeResponseMin = MibTableColumn((1, 3, 6, 1, 4, 1, 7146, 1, 2, 4, 6, 1, 17), Gauge32()).setMaxAccess("readonly") if mibBuilder.loadTexts: perPoolNodeResponseMin.setStatus('mandatory') if mibBuilder.loadTexts: perPoolNodeResponseMin.setDescription('Minimum response time (ms) in the last second for this node.') perPoolNodeResponseMax = MibTableColumn((1, 3, 6, 1, 4, 1, 7146, 1, 2, 4, 6, 1, 18), Gauge32()).setMaxAccess("readonly") if mibBuilder.loadTexts: perPoolNodeResponseMax.setStatus('mandatory') if mibBuilder.loadTexts: perPoolNodeResponseMax.setDescription('Maximum response time (ms) in the last second for this node.') perPoolNodeResponseMean = MibTableColumn((1, 3, 6, 1, 4, 1, 7146, 1, 2, 4, 6, 1, 19), Gauge32()).setMaxAccess("readonly") if mibBuilder.loadTexts: perPoolNodeResponseMean.setStatus('mandatory') if mibBuilder.loadTexts: perPoolNodeResponseMean.setDescription('Mean response time (ms) in the last second for this node.') perPoolNodeIdleConns = MibTableColumn((1, 3, 6, 1, 4, 1, 7146, 1, 2, 4, 6, 1, 20), Gauge32()).setMaxAccess("readonly") if mibBuilder.loadTexts: perPoolNodeIdleConns.setStatus('mandatory') if mibBuilder.loadTexts: perPoolNodeIdleConns.setDescription('Number of idle HTTP connections to this node.') perPoolNodeCurrentConn = MibTableColumn((1, 3, 6, 1, 4, 1, 7146, 1, 2, 4, 6, 1, 21), Gauge32()).setMaxAccess("readonly") if mibBuilder.loadTexts: perPoolNodeCurrentConn.setStatus('mandatory') if mibBuilder.loadTexts: perPoolNodeCurrentConn.setDescription('Current connections established to a node, includes idle connections.') trafficIPNumber = MibScalar((1, 3, 6, 1, 4, 1, 7146, 1, 2, 6, 1), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: trafficIPNumber.setStatus('obsolete') if mibBuilder.loadTexts: trafficIPNumber.setDescription('The number of traffic IPv4 addresses on this system.') trafficIPNumberRaised = MibScalar((1, 3, 6, 1, 4, 1, 7146, 1, 2, 6, 2), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: trafficIPNumberRaised.setStatus('obsolete') if mibBuilder.loadTexts: trafficIPNumberRaised.setDescription('The number of traffic IPv4 addresses currently raised on this system.') trafficIPTable = MibTable((1, 3, 6, 1, 4, 1, 7146, 1, 2, 6, 3), ) if mibBuilder.loadTexts: trafficIPTable.setStatus('obsolete') if mibBuilder.loadTexts: trafficIPTable.setDescription('This table details the traffic IPv4 addresses that are hosted by this traffic manager cluster.') trafficIPEntry = MibTableRow((1, 3, 6, 1, 4, 1, 7146, 1, 2, 6, 3, 1), ).setIndexNames((0, "ZXTM-MIB", "trafficIPAddress")) if mibBuilder.loadTexts: trafficIPEntry.setStatus('obsolete') if mibBuilder.loadTexts: trafficIPEntry.setDescription('This defines a row in the IPv4 traffic IP table.') trafficIPAddress = MibTableColumn((1, 3, 6, 1, 4, 1, 7146, 1, 2, 6, 3, 1, 1), IpAddress()).setMaxAccess("readonly") if mibBuilder.loadTexts: trafficIPAddress.setStatus('obsolete') if mibBuilder.loadTexts: trafficIPAddress.setDescription('This is a traffic IP address.') trafficIPState = MibTableColumn((1, 3, 6, 1, 4, 1, 7146, 1, 2, 6, 3, 1, 2), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("raised", 1), ("lowered", 2)))).setMaxAccess("readonly") if mibBuilder.loadTexts: trafficIPState.setStatus('obsolete') if mibBuilder.loadTexts: trafficIPState.setDescription('Whether this traffic IP address is currently being hosted by this traffic manager.') trafficIPTime = MibTableColumn((1, 3, 6, 1, 4, 1, 7146, 1, 2, 6, 3, 1, 3), TimeTicks()).setMaxAccess("readonly") if mibBuilder.loadTexts: trafficIPTime.setStatus('obsolete') if mibBuilder.loadTexts: trafficIPTime.setDescription("The time (in hundredths of a second) since trafficIPState last changed (this value will wrap if the state hasn't changed for 497 days).") trafficIPGatewayPingRequests = MibScalar((1, 3, 6, 1, 4, 1, 7146, 1, 2, 6, 4), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: trafficIPGatewayPingRequests.setStatus('mandatory') if mibBuilder.loadTexts: trafficIPGatewayPingRequests.setDescription('Number of ping requests sent to the gateway machine.') trafficIPGatewayPingResponses = MibScalar((1, 3, 6, 1, 4, 1, 7146, 1, 2, 6, 5), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: trafficIPGatewayPingResponses.setStatus('mandatory') if mibBuilder.loadTexts: trafficIPGatewayPingResponses.setDescription('Number of ping responses received from the gateway machine.') trafficIPNodePingRequests = MibScalar((1, 3, 6, 1, 4, 1, 7146, 1, 2, 6, 6), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: trafficIPNodePingRequests.setStatus('mandatory') if mibBuilder.loadTexts: trafficIPNodePingRequests.setDescription('Number of ping requests sent to the backend nodes.') trafficIPNodePingResponses = MibScalar((1, 3, 6, 1, 4, 1, 7146, 1, 2, 6, 7), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: trafficIPNodePingResponses.setStatus('mandatory') if mibBuilder.loadTexts: trafficIPNodePingResponses.setDescription('Number of ping responses received from the backend nodes.') trafficIPPingResponseErrors = MibScalar((1, 3, 6, 1, 4, 1, 7146, 1, 2, 6, 8), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: trafficIPPingResponseErrors.setStatus('mandatory') if mibBuilder.loadTexts: trafficIPPingResponseErrors.setDescription('Number of ping response errors.') trafficIPARPMessage = MibScalar((1, 3, 6, 1, 4, 1, 7146, 1, 2, 6, 9), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: trafficIPARPMessage.setStatus('mandatory') if mibBuilder.loadTexts: trafficIPARPMessage.setDescription('Number of ARP messages sent for raised Traffic IP Addresses.') trafficIPNumberInet46 = MibScalar((1, 3, 6, 1, 4, 1, 7146, 1, 2, 6, 10), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: trafficIPNumberInet46.setStatus('mandatory') if mibBuilder.loadTexts: trafficIPNumberInet46.setDescription('The number of traffic IP addresses on this system (includes IPv4 and IPv6 addresses).') trafficIPNumberRaisedInet46 = MibScalar((1, 3, 6, 1, 4, 1, 7146, 1, 2, 6, 11), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: trafficIPNumberRaisedInet46.setStatus('mandatory') if mibBuilder.loadTexts: trafficIPNumberRaisedInet46.setDescription('The number of traffic IP addresses currently raised on this system (includes IPv4 and IPv6 addresses).') trafficIPInet46Table = MibTable((1, 3, 6, 1, 4, 1, 7146, 1, 2, 6, 12), ) if mibBuilder.loadTexts: trafficIPInet46Table.setStatus('mandatory') if mibBuilder.loadTexts: trafficIPInet46Table.setDescription('This table details the traffic IP addresses that are hosted by this traffic manager cluster (includes IPv4 and IPv6 addresses).') trafficIPInet46Entry = MibTableRow((1, 3, 6, 1, 4, 1, 7146, 1, 2, 6, 12, 1), ).setIndexNames((0, "ZXTM-MIB", "trafficIPInet46AddressType"), (0, "ZXTM-MIB", "trafficIPInet46Address")) if mibBuilder.loadTexts: trafficIPInet46Entry.setStatus('mandatory') if mibBuilder.loadTexts: trafficIPInet46Entry.setDescription('This defines a row in the traffic IP table.') trafficIPInet46AddressType = MibTableColumn((1, 3, 6, 1, 4, 1, 7146, 1, 2, 6, 12, 1, 1), InetAddressType()).setMaxAccess("readonly") if mibBuilder.loadTexts: trafficIPInet46AddressType.setStatus('mandatory') if mibBuilder.loadTexts: trafficIPInet46AddressType.setDescription('The traffic IP address type.') trafficIPInet46Address = MibTableColumn((1, 3, 6, 1, 4, 1, 7146, 1, 2, 6, 12, 1, 2), InetAddress().subtype(subtypeSpec=ValueSizeConstraint(1, 64))).setMaxAccess("readonly") if mibBuilder.loadTexts: trafficIPInet46Address.setStatus('mandatory') if mibBuilder.loadTexts: trafficIPInet46Address.setDescription('This is a traffic IP address.') trafficIPInet46State = MibTableColumn((1, 3, 6, 1, 4, 1, 7146, 1, 2, 6, 12, 1, 3), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("raised", 1), ("lowered", 2)))).setMaxAccess("readonly") if mibBuilder.loadTexts: trafficIPInet46State.setStatus('mandatory') if mibBuilder.loadTexts: trafficIPInet46State.setDescription('Whether this traffic IP address is currently being hosted by this traffic manager.') trafficIPInet46Time = MibTableColumn((1, 3, 6, 1, 4, 1, 7146, 1, 2, 6, 12, 1, 4), TimeTicks()).setMaxAccess("readonly") if mibBuilder.loadTexts: trafficIPInet46Time.setStatus('mandatory') if mibBuilder.loadTexts: trafficIPInet46Time.setDescription("The time (in hundredths of a second) since trafficIPState last changed (this value will wrap if the state hasn't changed for 497 days).") serviceProtNumber = MibScalar((1, 3, 6, 1, 4, 1, 7146, 1, 2, 5, 1), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: serviceProtNumber.setStatus('mandatory') if mibBuilder.loadTexts: serviceProtNumber.setDescription('The number of service protection classes defined.') serviceProtTable = MibTable((1, 3, 6, 1, 4, 1, 7146, 1, 2, 5, 2), ) if mibBuilder.loadTexts: serviceProtTable.setStatus('mandatory') if mibBuilder.loadTexts: serviceProtTable.setDescription('This table provides information and statistics for service protection classes.') serviceProtEntry = MibTableRow((1, 3, 6, 1, 4, 1, 7146, 1, 2, 5, 2, 1), ).setIndexNames((0, "ZXTM-MIB", "serviceProtName")) if mibBuilder.loadTexts: serviceProtEntry.setStatus('mandatory') if mibBuilder.loadTexts: serviceProtEntry.setDescription('This defines a row in the service protection table.') serviceProtName = MibTableColumn((1, 3, 6, 1, 4, 1, 7146, 1, 2, 5, 2, 1, 1), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 255))).setMaxAccess("readonly") if mibBuilder.loadTexts: serviceProtName.setStatus('mandatory') if mibBuilder.loadTexts: serviceProtName.setDescription('The name of the service protection class.') serviceProtTotalRefusal = MibTableColumn((1, 3, 6, 1, 4, 1, 7146, 1, 2, 5, 2, 1, 2), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: serviceProtTotalRefusal.setStatus('mandatory') if mibBuilder.loadTexts: serviceProtTotalRefusal.setDescription('Connections refused by this service protection class.') serviceProtLastRefusalTime = MibTableColumn((1, 3, 6, 1, 4, 1, 7146, 1, 2, 5, 2, 1, 3), TimeTicks()).setMaxAccess("readonly") if mibBuilder.loadTexts: serviceProtLastRefusalTime.setStatus('mandatory') if mibBuilder.loadTexts: serviceProtLastRefusalTime.setDescription('The time (in hundredths of a second) since this service protection class last refused a connection (this value will wrap if no connections are refused in more than 497 days).') serviceProtRefusalIP = MibTableColumn((1, 3, 6, 1, 4, 1, 7146, 1, 2, 5, 2, 1, 4), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: serviceProtRefusalIP.setStatus('mandatory') if mibBuilder.loadTexts: serviceProtRefusalIP.setDescription('Connections refused by this service protection class because the source IP address was banned.') serviceProtRefusalConc1IP = MibTableColumn((1, 3, 6, 1, 4, 1, 7146, 1, 2, 5, 2, 1, 5), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: serviceProtRefusalConc1IP.setStatus('mandatory') if mibBuilder.loadTexts: serviceProtRefusalConc1IP.setDescription('Connections refused by this service protection class because the source IP address issued too many concurrent connections.') serviceProtRefusalConc10IP = MibTableColumn((1, 3, 6, 1, 4, 1, 7146, 1, 2, 5, 2, 1, 6), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: serviceProtRefusalConc10IP.setStatus('mandatory') if mibBuilder.loadTexts: serviceProtRefusalConc10IP.setDescription('Connections refused by this service protection class because the top 10 source IP addresses issued too many concurrent connections.') serviceProtRefusalConnRate = MibTableColumn((1, 3, 6, 1, 4, 1, 7146, 1, 2, 5, 2, 1, 7), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: serviceProtRefusalConnRate.setStatus('mandatory') if mibBuilder.loadTexts: serviceProtRefusalConnRate.setDescription('Connections refused by this service protection class because the source IP address issued too many connections within 60 seconds.') serviceProtRefusalRFC2396 = MibTableColumn((1, 3, 6, 1, 4, 1, 7146, 1, 2, 5, 2, 1, 8), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: serviceProtRefusalRFC2396.setStatus('mandatory') if mibBuilder.loadTexts: serviceProtRefusalRFC2396.setDescription('Connections refused by this service protection class because the HTTP request was not RFC 2396 compliant.') serviceProtRefusalSize = MibTableColumn((1, 3, 6, 1, 4, 1, 7146, 1, 2, 5, 2, 1, 9), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: serviceProtRefusalSize.setStatus('mandatory') if mibBuilder.loadTexts: serviceProtRefusalSize.setDescription('Connections refused by this service protection class because the request was larger than the defined limits allowed.') serviceProtRefusalBinary = MibTableColumn((1, 3, 6, 1, 4, 1, 7146, 1, 2, 5, 2, 1, 10), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: serviceProtRefusalBinary.setStatus('mandatory') if mibBuilder.loadTexts: serviceProtRefusalBinary.setDescription('Connections refused by this service protection class because the request contained disallowed binary content.') serviceLevelNumber = MibScalar((1, 3, 6, 1, 4, 1, 7146, 1, 2, 7, 1), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: serviceLevelNumber.setStatus('mandatory') if mibBuilder.loadTexts: serviceLevelNumber.setDescription('The number of SLM classes defined.') serviceLevelTable = MibTable((1, 3, 6, 1, 4, 1, 7146, 1, 2, 7, 2), ) if mibBuilder.loadTexts: serviceLevelTable.setStatus('mandatory') if mibBuilder.loadTexts: serviceLevelTable.setDescription('This table provides information and statistics for SLM classes.') serviceLevelEntry = MibTableRow((1, 3, 6, 1, 4, 1, 7146, 1, 2, 7, 2, 1), ).setIndexNames((0, "ZXTM-MIB", "serviceLevelName")) if mibBuilder.loadTexts: serviceLevelEntry.setStatus('mandatory') if mibBuilder.loadTexts: serviceLevelEntry.setDescription('This defines a row in the SLM table.') serviceLevelName = MibTableColumn((1, 3, 6, 1, 4, 1, 7146, 1, 2, 7, 2, 1, 1), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 255))).setMaxAccess("readonly") if mibBuilder.loadTexts: serviceLevelName.setStatus('mandatory') if mibBuilder.loadTexts: serviceLevelName.setDescription('The name of the SLM class.') serviceLevelTotalConn = MibTableColumn((1, 3, 6, 1, 4, 1, 7146, 1, 2, 7, 2, 1, 2), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: serviceLevelTotalConn.setStatus('mandatory') if mibBuilder.loadTexts: serviceLevelTotalConn.setDescription('Requests handled by this SLM class.') serviceLevelTotalNonConf = MibTableColumn((1, 3, 6, 1, 4, 1, 7146, 1, 2, 7, 2, 1, 3), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: serviceLevelTotalNonConf.setStatus('mandatory') if mibBuilder.loadTexts: serviceLevelTotalNonConf.setDescription('Non-conforming requests handled by this SLM class.') serviceLevelResponseMin = MibTableColumn((1, 3, 6, 1, 4, 1, 7146, 1, 2, 7, 2, 1, 4), Gauge32()).setMaxAccess("readonly") if mibBuilder.loadTexts: serviceLevelResponseMin.setStatus('mandatory') if mibBuilder.loadTexts: serviceLevelResponseMin.setDescription('Minimum response time (ms) in the last second for this SLM class.') serviceLevelResponseMax = MibTableColumn((1, 3, 6, 1, 4, 1, 7146, 1, 2, 7, 2, 1, 5), Gauge32()).setMaxAccess("readonly") if mibBuilder.loadTexts: serviceLevelResponseMax.setStatus('mandatory') if mibBuilder.loadTexts: serviceLevelResponseMax.setDescription('Maximum response time (ms) in the last second for this SLM class.') serviceLevelResponseMean = MibTableColumn((1, 3, 6, 1, 4, 1, 7146, 1, 2, 7, 2, 1, 6), Gauge32()).setMaxAccess("readonly") if mibBuilder.loadTexts: serviceLevelResponseMean.setStatus('mandatory') if mibBuilder.loadTexts: serviceLevelResponseMean.setDescription('Mean response time (ms) in the last second for this SLM class.') serviceLevelIsOK = MibTableColumn((1, 3, 6, 1, 4, 1, 7146, 1, 2, 7, 2, 1, 7), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("notok", 1), ("ok", 2)))).setMaxAccess("readonly") if mibBuilder.loadTexts: serviceLevelIsOK.setStatus('mandatory') if mibBuilder.loadTexts: serviceLevelIsOK.setDescription('Indicates if this SLM class is currently conforming.') serviceLevelConforming = MibTableColumn((1, 3, 6, 1, 4, 1, 7146, 1, 2, 7, 2, 1, 8), Gauge32()).setMaxAccess("readonly") if mibBuilder.loadTexts: serviceLevelConforming.setStatus('mandatory') if mibBuilder.loadTexts: serviceLevelConforming.setDescription('Percentage of requests associated with this SLM class that are conforming') serviceLevelCurrentConns = MibTableColumn((1, 3, 6, 1, 4, 1, 7146, 1, 2, 7, 2, 1, 9), Gauge32()).setMaxAccess("readonly") if mibBuilder.loadTexts: serviceLevelCurrentConns.setStatus('mandatory') if mibBuilder.loadTexts: serviceLevelCurrentConns.setDescription('The number of connections currently associated with this SLM class.') perNodeServiceLevelTable = MibTable((1, 3, 6, 1, 4, 1, 7146, 1, 2, 8, 1), ) if mibBuilder.loadTexts: perNodeServiceLevelTable.setStatus('obsolete') if mibBuilder.loadTexts: perNodeServiceLevelTable.setDescription('This table provides information and statistics for SLM classes on a per node basis (IPv4 nodes only).') perNodeServiceLevelEntry = MibTableRow((1, 3, 6, 1, 4, 1, 7146, 1, 2, 8, 1, 1), ).setIndexNames((0, "ZXTM-MIB", "perNodeServiceLevelSLMName"), (0, "ZXTM-MIB", "perNodeServiceLevelNodeIPAddr"), (0, "ZXTM-MIB", "perNodeServiceLevelNodePort")) if mibBuilder.loadTexts: perNodeServiceLevelEntry.setStatus('obsolete') if mibBuilder.loadTexts: perNodeServiceLevelEntry.setDescription('This defines a row in the per-node SLM table (IPv4 nodes only).') perNodeServiceLevelSLMName = MibTableColumn((1, 3, 6, 1, 4, 1, 7146, 1, 2, 8, 1, 1, 1), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 255))).setMaxAccess("readonly") if mibBuilder.loadTexts: perNodeServiceLevelSLMName.setStatus('obsolete') if mibBuilder.loadTexts: perNodeServiceLevelSLMName.setDescription('The name of the SLM class.') perNodeServiceLevelNodeIPAddr = MibTableColumn((1, 3, 6, 1, 4, 1, 7146, 1, 2, 8, 1, 1, 2), IpAddress()).setMaxAccess("readonly") if mibBuilder.loadTexts: perNodeServiceLevelNodeIPAddr.setStatus('obsolete') if mibBuilder.loadTexts: perNodeServiceLevelNodeIPAddr.setDescription('The IP address of this node.') perNodeServiceLevelNodePort = MibTableColumn((1, 3, 6, 1, 4, 1, 7146, 1, 2, 8, 1, 1, 3), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 65535))).setMaxAccess("readonly") if mibBuilder.loadTexts: perNodeServiceLevelNodePort.setStatus('obsolete') if mibBuilder.loadTexts: perNodeServiceLevelNodePort.setDescription('The port number of this node.') perNodeServiceLevelTotalConn = MibTableColumn((1, 3, 6, 1, 4, 1, 7146, 1, 2, 8, 1, 1, 4), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: perNodeServiceLevelTotalConn.setStatus('obsolete') if mibBuilder.loadTexts: perNodeServiceLevelTotalConn.setDescription('Requests handled by this SLM class to this node.') perNodeServiceLevelTotalNonConf = MibTableColumn((1, 3, 6, 1, 4, 1, 7146, 1, 2, 8, 1, 1, 5), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: perNodeServiceLevelTotalNonConf.setStatus('obsolete') if mibBuilder.loadTexts: perNodeServiceLevelTotalNonConf.setDescription('Non-conforming requests handled by this SLM class to this node.') perNodeServiceLevelResponseMin = MibTableColumn((1, 3, 6, 1, 4, 1, 7146, 1, 2, 8, 1, 1, 6), Gauge32()).setMaxAccess("readonly") if mibBuilder.loadTexts: perNodeServiceLevelResponseMin.setStatus('obsolete') if mibBuilder.loadTexts: perNodeServiceLevelResponseMin.setDescription('Minimum response time (ms) in the last second for this SLM class to this node.') perNodeServiceLevelResponseMax = MibTableColumn((1, 3, 6, 1, 4, 1, 7146, 1, 2, 8, 1, 1, 7), Gauge32()).setMaxAccess("readonly") if mibBuilder.loadTexts: perNodeServiceLevelResponseMax.setStatus('obsolete') if mibBuilder.loadTexts: perNodeServiceLevelResponseMax.setDescription('Maximum response time (ms) in the last second for this SLM class to this node.') perNodeServiceLevelResponseMean = MibTableColumn((1, 3, 6, 1, 4, 1, 7146, 1, 2, 8, 1, 1, 8), Gauge32()).setMaxAccess("readonly") if mibBuilder.loadTexts: perNodeServiceLevelResponseMean.setStatus('obsolete') if mibBuilder.loadTexts: perNodeServiceLevelResponseMean.setDescription('Mean response time (ms) in the last second for this SLM class to this node.') perNodeServiceLevelInet46Table = MibTable((1, 3, 6, 1, 4, 1, 7146, 1, 2, 8, 2), ) if mibBuilder.loadTexts: perNodeServiceLevelInet46Table.setStatus('mandatory') if mibBuilder.loadTexts: perNodeServiceLevelInet46Table.setDescription('This table provides information and statistics for SLM classes on a per node basis (includes IPv4 and IPv6 nodes).') perNodeServiceLevelInet46Entry = MibTableRow((1, 3, 6, 1, 4, 1, 7146, 1, 2, 8, 2, 1), ).setIndexNames((0, "ZXTM-MIB", "perNodeServiceLevelInet46SLMName"), (0, "ZXTM-MIB", "perNodeServiceLevelInet46NodeAddressType"), (0, "ZXTM-MIB", "perNodeServiceLevelInet46NodeAddress"), (0, "ZXTM-MIB", "perNodeServiceLevelInet46NodePort")) if mibBuilder.loadTexts: perNodeServiceLevelInet46Entry.setStatus('mandatory') if mibBuilder.loadTexts: perNodeServiceLevelInet46Entry.setDescription('This defines a row in the per-node SLM table (includes IPv4 and IPv6 nodes).') perNodeServiceLevelInet46SLMName = MibTableColumn((1, 3, 6, 1, 4, 1, 7146, 1, 2, 8, 2, 1, 1), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 255))).setMaxAccess("readonly") if mibBuilder.loadTexts: perNodeServiceLevelInet46SLMName.setStatus('mandatory') if mibBuilder.loadTexts: perNodeServiceLevelInet46SLMName.setDescription('The name of the SLM class.') perNodeServiceLevelInet46NodeAddressType = MibTableColumn((1, 3, 6, 1, 4, 1, 7146, 1, 2, 8, 2, 1, 2), InetAddressType()).setMaxAccess("readonly") if mibBuilder.loadTexts: perNodeServiceLevelInet46NodeAddressType.setStatus('mandatory') if mibBuilder.loadTexts: perNodeServiceLevelInet46NodeAddressType.setDescription('The type of IP address of this node.') perNodeServiceLevelInet46NodeAddress = MibTableColumn((1, 3, 6, 1, 4, 1, 7146, 1, 2, 8, 2, 1, 3), InetAddress().subtype(subtypeSpec=ValueSizeConstraint(1, 64))).setMaxAccess("readonly") if mibBuilder.loadTexts: perNodeServiceLevelInet46NodeAddress.setStatus('mandatory') if mibBuilder.loadTexts: perNodeServiceLevelInet46NodeAddress.setDescription('The IP address of this node.') perNodeServiceLevelInet46NodePort = MibTableColumn((1, 3, 6, 1, 4, 1, 7146, 1, 2, 8, 2, 1, 4), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 65535))).setMaxAccess("readonly") if mibBuilder.loadTexts: perNodeServiceLevelInet46NodePort.setStatus('mandatory') if mibBuilder.loadTexts: perNodeServiceLevelInet46NodePort.setDescription('The port number of this node.') perNodeServiceLevelInet46TotalConn = MibTableColumn((1, 3, 6, 1, 4, 1, 7146, 1, 2, 8, 2, 1, 5), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: perNodeServiceLevelInet46TotalConn.setStatus('mandatory') if mibBuilder.loadTexts: perNodeServiceLevelInet46TotalConn.setDescription('Requests handled by this SLM class to this node.') perNodeServiceLevelInet46TotalNonConf = MibTableColumn((1, 3, 6, 1, 4, 1, 7146, 1, 2, 8, 2, 1, 6), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: perNodeServiceLevelInet46TotalNonConf.setStatus('mandatory') if mibBuilder.loadTexts: perNodeServiceLevelInet46TotalNonConf.setDescription('Non-conforming requests handled by this SLM class to this node.') perNodeServiceLevelInet46ResponseMin = MibTableColumn((1, 3, 6, 1, 4, 1, 7146, 1, 2, 8, 2, 1, 7), Gauge32()).setMaxAccess("readonly") if mibBuilder.loadTexts: perNodeServiceLevelInet46ResponseMin.setStatus('mandatory') if mibBuilder.loadTexts: perNodeServiceLevelInet46ResponseMin.setDescription('Minimum response time (ms) in the last second for this SLM class to this node.') perNodeServiceLevelInet46ResponseMax = MibTableColumn((1, 3, 6, 1, 4, 1, 7146, 1, 2, 8, 2, 1, 8), Gauge32()).setMaxAccess("readonly") if mibBuilder.loadTexts: perNodeServiceLevelInet46ResponseMax.setStatus('mandatory') if mibBuilder.loadTexts: perNodeServiceLevelInet46ResponseMax.setDescription('Maximum response time (ms) in the last second for this SLM class to this node.') perNodeServiceLevelInet46ResponseMean = MibTableColumn((1, 3, 6, 1, 4, 1, 7146, 1, 2, 8, 2, 1, 9), Gauge32()).setMaxAccess("readonly") if mibBuilder.loadTexts: perNodeServiceLevelInet46ResponseMean.setStatus('mandatory') if mibBuilder.loadTexts: perNodeServiceLevelInet46ResponseMean.setDescription('Mean response time (ms) in the last second for this SLM class to this node.') bandwidthClassNumber = MibScalar((1, 3, 6, 1, 4, 1, 7146, 1, 2, 9, 1), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: bandwidthClassNumber.setStatus('mandatory') if mibBuilder.loadTexts: bandwidthClassNumber.setDescription('The number of bandwidth classes defined.') bandwidthClassTable = MibTable((1, 3, 6, 1, 4, 1, 7146, 1, 2, 9, 2), ) if mibBuilder.loadTexts: bandwidthClassTable.setStatus('mandatory') if mibBuilder.loadTexts: bandwidthClassTable.setDescription('This table provides information and statistics for bandwidth classes.') bandwidthClassEntry = MibTableRow((1, 3, 6, 1, 4, 1, 7146, 1, 2, 9, 2, 1), ).setIndexNames((0, "ZXTM-MIB", "bandwidthClassName")) if mibBuilder.loadTexts: bandwidthClassEntry.setStatus('mandatory') if mibBuilder.loadTexts: bandwidthClassEntry.setDescription('This defines a row in the bandwidth class.') bandwidthClassName = MibTableColumn((1, 3, 6, 1, 4, 1, 7146, 1, 2, 9, 2, 1, 1), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 255))).setMaxAccess("readonly") if mibBuilder.loadTexts: bandwidthClassName.setStatus('mandatory') if mibBuilder.loadTexts: bandwidthClassName.setDescription('The name of the bandwidth class.') bandwidthClassMaximum = MibTableColumn((1, 3, 6, 1, 4, 1, 7146, 1, 2, 9, 2, 1, 2), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: bandwidthClassMaximum.setStatus('mandatory') if mibBuilder.loadTexts: bandwidthClassMaximum.setDescription('Maximum bandwidth class limit (kbits/s).') bandwidthClassGuarantee = MibTableColumn((1, 3, 6, 1, 4, 1, 7146, 1, 2, 9, 2, 1, 3), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: bandwidthClassGuarantee.setStatus('mandatory') if mibBuilder.loadTexts: bandwidthClassGuarantee.setDescription('Guaranteed bandwidth class limit (kbits/s). Currently unused.') bandwidthClassBytesOutLo = MibTableColumn((1, 3, 6, 1, 4, 1, 7146, 1, 2, 9, 2, 1, 4), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: bandwidthClassBytesOutLo.setStatus('mandatory') if mibBuilder.loadTexts: bandwidthClassBytesOutLo.setDescription('Bytes output by connections assigned to this bandwidth class ( low 32bits ).') bandwidthClassBytesOutHi = MibTableColumn((1, 3, 6, 1, 4, 1, 7146, 1, 2, 9, 2, 1, 5), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: bandwidthClassBytesOutHi.setStatus('mandatory') if mibBuilder.loadTexts: bandwidthClassBytesOutHi.setDescription('Bytes output by connections assigned to this bandwidth class ( high 32bits ).') rateClassNumber = MibScalar((1, 3, 6, 1, 4, 1, 7146, 1, 2, 10, 1), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: rateClassNumber.setStatus('mandatory') if mibBuilder.loadTexts: rateClassNumber.setDescription('The number of rate classes defined.') rateClassTable = MibTable((1, 3, 6, 1, 4, 1, 7146, 1, 2, 10, 2), ) if mibBuilder.loadTexts: rateClassTable.setStatus('mandatory') if mibBuilder.loadTexts: rateClassTable.setDescription('This table provides information and statistics for rate classes.') rateClassEntry = MibTableRow((1, 3, 6, 1, 4, 1, 7146, 1, 2, 10, 2, 1), ).setIndexNames((0, "ZXTM-MIB", "rateClassName")) if mibBuilder.loadTexts: rateClassEntry.setStatus('mandatory') if mibBuilder.loadTexts: rateClassEntry.setDescription('This defines a row in the rate class info.') rateClassName = MibTableColumn((1, 3, 6, 1, 4, 1, 7146, 1, 2, 10, 2, 1, 1), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 255))).setMaxAccess("readonly") if mibBuilder.loadTexts: rateClassName.setStatus('mandatory') if mibBuilder.loadTexts: rateClassName.setDescription('The name of the rate class.') rateClassMaxRatePerMin = MibTableColumn((1, 3, 6, 1, 4, 1, 7146, 1, 2, 10, 2, 1, 2), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: rateClassMaxRatePerMin.setStatus('mandatory') if mibBuilder.loadTexts: rateClassMaxRatePerMin.setDescription('The maximum rate that requests may pass through this rate class (requests/min).') rateClassMaxRatePerSec = MibTableColumn((1, 3, 6, 1, 4, 1, 7146, 1, 2, 10, 2, 1, 3), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: rateClassMaxRatePerSec.setStatus('mandatory') if mibBuilder.loadTexts: rateClassMaxRatePerSec.setDescription('The maximum rate that requests may pass through this rate class (requests/sec).') rateClassQueueLength = MibTableColumn((1, 3, 6, 1, 4, 1, 7146, 1, 2, 10, 2, 1, 4), Gauge32()).setMaxAccess("readonly") if mibBuilder.loadTexts: rateClassQueueLength.setStatus('mandatory') if mibBuilder.loadTexts: rateClassQueueLength.setDescription('The current number of requests queued by this rate class.') rateClassCurrentRate = MibTableColumn((1, 3, 6, 1, 4, 1, 7146, 1, 2, 10, 2, 1, 5), Gauge32()).setMaxAccess("readonly") if mibBuilder.loadTexts: rateClassCurrentRate.setStatus('mandatory') if mibBuilder.loadTexts: rateClassCurrentRate.setDescription('The average rate that requests are passing through this rate class.') rateClassDropped = MibTableColumn((1, 3, 6, 1, 4, 1, 7146, 1, 2, 10, 2, 1, 6), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: rateClassDropped.setStatus('mandatory') if mibBuilder.loadTexts: rateClassDropped.setDescription('Requests dropped from this rate class without being processed (e.g. timeouts).') rateClassConnsEntered = MibTableColumn((1, 3, 6, 1, 4, 1, 7146, 1, 2, 10, 2, 1, 7), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: rateClassConnsEntered.setStatus('mandatory') if mibBuilder.loadTexts: rateClassConnsEntered.setDescription('Connections that have entered the rate class and have been queued.') rateClassConnsLeft = MibTableColumn((1, 3, 6, 1, 4, 1, 7146, 1, 2, 10, 2, 1, 8), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: rateClassConnsLeft.setStatus('mandatory') if mibBuilder.loadTexts: rateClassConnsLeft.setDescription('Connections that have left the rate class.') userCounterNumber = MibScalar((1, 3, 6, 1, 4, 1, 7146, 1, 2, 11, 1), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: userCounterNumber.setStatus('mandatory') if mibBuilder.loadTexts: userCounterNumber.setDescription('The number of user defined counters.') userCounterTable = MibTable((1, 3, 6, 1, 4, 1, 7146, 1, 2, 11, 2), ) if mibBuilder.loadTexts: userCounterTable.setStatus('mandatory') if mibBuilder.loadTexts: userCounterTable.setDescription('This table holds the values for user defined counters.') userCounterEntry = MibTableRow((1, 3, 6, 1, 4, 1, 7146, 1, 2, 11, 2, 1), ).setIndexNames((0, "ZXTM-MIB", "userCounterName")) if mibBuilder.loadTexts: userCounterEntry.setStatus('mandatory') if mibBuilder.loadTexts: userCounterEntry.setDescription('This defines a row in the user counters table.') userCounterName = MibTableColumn((1, 3, 6, 1, 4, 1, 7146, 1, 2, 11, 2, 1, 1), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 255))).setMaxAccess("readonly") if mibBuilder.loadTexts: userCounterName.setStatus('mandatory') if mibBuilder.loadTexts: userCounterName.setDescription('The name of the user counter.') userCounterValue = MibTableColumn((1, 3, 6, 1, 4, 1, 7146, 1, 2, 11, 2, 1, 2), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: userCounterValue.setStatus('mandatory') if mibBuilder.loadTexts: userCounterValue.setDescription('The value of the user counter.') interfaceNumber = MibScalar((1, 3, 6, 1, 4, 1, 7146, 1, 2, 12, 1), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: interfaceNumber.setStatus('mandatory') if mibBuilder.loadTexts: interfaceNumber.setDescription('The number of network interfaces.') interfaceTable = MibTable((1, 3, 6, 1, 4, 1, 7146, 1, 2, 12, 2), ) if mibBuilder.loadTexts: interfaceTable.setStatus('mandatory') if mibBuilder.loadTexts: interfaceTable.setDescription('This table gives statistics for the network interfaces on this system.') interfaceEntry = MibTableRow((1, 3, 6, 1, 4, 1, 7146, 1, 2, 12, 2, 1), ).setIndexNames((0, "ZXTM-MIB", "interfaceName")) if mibBuilder.loadTexts: interfaceEntry.setStatus('mandatory') if mibBuilder.loadTexts: interfaceEntry.setDescription('This defines a row in the network interfaces table.') interfaceName = MibTableColumn((1, 3, 6, 1, 4, 1, 7146, 1, 2, 12, 2, 1, 1), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 255))).setMaxAccess("readonly") if mibBuilder.loadTexts: interfaceName.setStatus('mandatory') if mibBuilder.loadTexts: interfaceName.setDescription('The name of the network interface.') interfaceRxPackets = MibTableColumn((1, 3, 6, 1, 4, 1, 7146, 1, 2, 12, 2, 1, 2), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: interfaceRxPackets.setStatus('mandatory') if mibBuilder.loadTexts: interfaceRxPackets.setDescription('The number of packets received by this interface.') interfaceTxPackets = MibTableColumn((1, 3, 6, 1, 4, 1, 7146, 1, 2, 12, 2, 1, 3), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: interfaceTxPackets.setStatus('mandatory') if mibBuilder.loadTexts: interfaceTxPackets.setDescription('The number of packets transmitted by this interface.') interfaceRxErrors = MibTableColumn((1, 3, 6, 1, 4, 1, 7146, 1, 2, 12, 2, 1, 4), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: interfaceRxErrors.setStatus('mandatory') if mibBuilder.loadTexts: interfaceRxErrors.setDescription('The number of receive errors reported by this interface.') interfaceTxErrors = MibTableColumn((1, 3, 6, 1, 4, 1, 7146, 1, 2, 12, 2, 1, 5), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: interfaceTxErrors.setStatus('mandatory') if mibBuilder.loadTexts: interfaceTxErrors.setDescription('The number of transmit errors reported by this interface.') interfaceCollisions = MibTableColumn((1, 3, 6, 1, 4, 1, 7146, 1, 2, 12, 2, 1, 6), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: interfaceCollisions.setStatus('mandatory') if mibBuilder.loadTexts: interfaceCollisions.setDescription('The number of collisions reported by this interface.') interfaceRxBytesLo = MibTableColumn((1, 3, 6, 1, 4, 1, 7146, 1, 2, 12, 2, 1, 7), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: interfaceRxBytesLo.setStatus('mandatory') if mibBuilder.loadTexts: interfaceRxBytesLo.setDescription('Bytes received by this interface ( low 32bits ).') interfaceRxBytesHi = MibTableColumn((1, 3, 6, 1, 4, 1, 7146, 1, 2, 12, 2, 1, 8), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: interfaceRxBytesHi.setStatus('mandatory') if mibBuilder.loadTexts: interfaceRxBytesHi.setDescription('Bytes received by this interface ( high 32bits ).') interfaceTxBytesLo = MibTableColumn((1, 3, 6, 1, 4, 1, 7146, 1, 2, 12, 2, 1, 9), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: interfaceTxBytesLo.setStatus('mandatory') if mibBuilder.loadTexts: interfaceTxBytesLo.setDescription('Bytes transmitted by this interface ( low 32bits ).') interfaceTxBytesHi = MibTableColumn((1, 3, 6, 1, 4, 1, 7146, 1, 2, 12, 2, 1, 10), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: interfaceTxBytesHi.setStatus('mandatory') if mibBuilder.loadTexts: interfaceTxBytesHi.setDescription('Bytes transmitted by this interface ( high 32bits ).') webCacheHitsLo = MibScalar((1, 3, 6, 1, 4, 1, 7146, 1, 2, 17, 1, 1), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: webCacheHitsLo.setStatus('mandatory') if mibBuilder.loadTexts: webCacheHitsLo.setDescription('Number of times a page has been successfully found in the web cache (low 32 bits).') webCacheHitsHi = MibScalar((1, 3, 6, 1, 4, 1, 7146, 1, 2, 17, 1, 2), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: webCacheHitsHi.setStatus('mandatory') if mibBuilder.loadTexts: webCacheHitsHi.setDescription('Number of times a page has been successfully found in the web cache (high 32 bits).') webCacheMissesLo = MibScalar((1, 3, 6, 1, 4, 1, 7146, 1, 2, 17, 1, 3), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: webCacheMissesLo.setStatus('mandatory') if mibBuilder.loadTexts: webCacheMissesLo.setDescription('Number of times a page has not been found in the web cache (low 32 bits).') webCacheMissesHi = MibScalar((1, 3, 6, 1, 4, 1, 7146, 1, 2, 17, 1, 4), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: webCacheMissesHi.setStatus('mandatory') if mibBuilder.loadTexts: webCacheMissesHi.setDescription('Number of times a page has not been found in the web cache (high 32 bits).') webCacheLookupsLo = MibScalar((1, 3, 6, 1, 4, 1, 7146, 1, 2, 17, 1, 5), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: webCacheLookupsLo.setStatus('mandatory') if mibBuilder.loadTexts: webCacheLookupsLo.setDescription('Number of times a page has been looked up in the web cache (low 32 bits).') webCacheLookupsHi = MibScalar((1, 3, 6, 1, 4, 1, 7146, 1, 2, 17, 1, 6), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: webCacheLookupsHi.setStatus('mandatory') if mibBuilder.loadTexts: webCacheLookupsHi.setDescription('Number of times a page has been looked up in the web cache (high 32 bits).') webCacheMemUsed = MibScalar((1, 3, 6, 1, 4, 1, 7146, 1, 2, 17, 1, 7), Gauge32()).setMaxAccess("readonly") if mibBuilder.loadTexts: webCacheMemUsed.setStatus('mandatory') if mibBuilder.loadTexts: webCacheMemUsed.setDescription('Total memory used by the web cache in kilobytes.') webCacheMemMaximum = MibScalar((1, 3, 6, 1, 4, 1, 7146, 1, 2, 17, 1, 8), Gauge32()).setMaxAccess("readonly") if mibBuilder.loadTexts: webCacheMemMaximum.setStatus('mandatory') if mibBuilder.loadTexts: webCacheMemMaximum.setDescription('The maximum amount of memory the web cache can use in kilobytes.') webCacheHitRate = MibScalar((1, 3, 6, 1, 4, 1, 7146, 1, 2, 17, 1, 9), Gauge32()).setMaxAccess("readonly") if mibBuilder.loadTexts: webCacheHitRate.setStatus('mandatory') if mibBuilder.loadTexts: webCacheHitRate.setDescription('The percentage of web cache lookups that succeeded.') webCacheEntries = MibScalar((1, 3, 6, 1, 4, 1, 7146, 1, 2, 17, 1, 10), Gauge32()).setMaxAccess("readonly") if mibBuilder.loadTexts: webCacheEntries.setStatus('mandatory') if mibBuilder.loadTexts: webCacheEntries.setDescription('The number of items in the web cache.') webCacheMaxEntries = MibScalar((1, 3, 6, 1, 4, 1, 7146, 1, 2, 17, 1, 11), Gauge32()).setMaxAccess("readonly") if mibBuilder.loadTexts: webCacheMaxEntries.setStatus('mandatory') if mibBuilder.loadTexts: webCacheMaxEntries.setDescription('The maximum number of items in the web cache.') webCacheOldest = MibScalar((1, 3, 6, 1, 4, 1, 7146, 1, 2, 17, 1, 12), Gauge32()).setMaxAccess("readonly") if mibBuilder.loadTexts: webCacheOldest.setStatus('mandatory') if mibBuilder.loadTexts: webCacheOldest.setDescription('The age of the oldest item in the web cache (in seconds).') sslCacheHits = MibScalar((1, 3, 6, 1, 4, 1, 7146, 1, 2, 17, 2, 1), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: sslCacheHits.setStatus('mandatory') if mibBuilder.loadTexts: sslCacheHits.setDescription('Number of times a SSL entry has been successfully found in the server cache.') sslCacheMisses = MibScalar((1, 3, 6, 1, 4, 1, 7146, 1, 2, 17, 2, 2), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: sslCacheMisses.setStatus('mandatory') if mibBuilder.loadTexts: sslCacheMisses.setDescription('Number of times a SSL entry has not been available in the server cache.') sslCacheLookups = MibScalar((1, 3, 6, 1, 4, 1, 7146, 1, 2, 17, 2, 3), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: sslCacheLookups.setStatus('mandatory') if mibBuilder.loadTexts: sslCacheLookups.setDescription('Number of times a SSL entry has been looked up in the server cache.') sslCacheHitRate = MibScalar((1, 3, 6, 1, 4, 1, 7146, 1, 2, 17, 2, 4), Gauge32()).setMaxAccess("readonly") if mibBuilder.loadTexts: sslCacheHitRate.setStatus('mandatory') if mibBuilder.loadTexts: sslCacheHitRate.setDescription('The percentage of SSL server cache lookups that succeeded.') sslCacheEntries = MibScalar((1, 3, 6, 1, 4, 1, 7146, 1, 2, 17, 2, 5), Gauge32()).setMaxAccess("readonly") if mibBuilder.loadTexts: sslCacheEntries.setStatus('mandatory') if mibBuilder.loadTexts: sslCacheEntries.setDescription('The total number of SSL sessions stored in the server cache.') sslCacheEntriesMax = MibScalar((1, 3, 6, 1, 4, 1, 7146, 1, 2, 17, 2, 6), Gauge32()).setMaxAccess("readonly") if mibBuilder.loadTexts: sslCacheEntriesMax.setStatus('mandatory') if mibBuilder.loadTexts: sslCacheEntriesMax.setDescription('The maximum number of SSL entries in the server cache.') sslCacheOldest = MibScalar((1, 3, 6, 1, 4, 1, 7146, 1, 2, 17, 2, 7), Gauge32()).setMaxAccess("readonly") if mibBuilder.loadTexts: sslCacheOldest.setStatus('mandatory') if mibBuilder.loadTexts: sslCacheOldest.setDescription('The age of the oldest SSL session in the server cache (in seconds).') aspSessionCacheHits = MibScalar((1, 3, 6, 1, 4, 1, 7146, 1, 2, 17, 3, 1), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: aspSessionCacheHits.setStatus('mandatory') if mibBuilder.loadTexts: aspSessionCacheHits.setDescription('Number of times a ASP session entry has been successfully found in the cache.') aspSessionCacheMisses = MibScalar((1, 3, 6, 1, 4, 1, 7146, 1, 2, 17, 3, 2), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: aspSessionCacheMisses.setStatus('mandatory') if mibBuilder.loadTexts: aspSessionCacheMisses.setDescription('Number of times a ASP session entry has not been available in the cache.') aspSessionCacheLookups = MibScalar((1, 3, 6, 1, 4, 1, 7146, 1, 2, 17, 3, 3), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: aspSessionCacheLookups.setStatus('mandatory') if mibBuilder.loadTexts: aspSessionCacheLookups.setDescription('Number of times a ASP session entry has been looked up in the cache.') aspSessionCacheHitRate = MibScalar((1, 3, 6, 1, 4, 1, 7146, 1, 2, 17, 3, 4), Gauge32()).setMaxAccess("readonly") if mibBuilder.loadTexts: aspSessionCacheHitRate.setStatus('mandatory') if mibBuilder.loadTexts: aspSessionCacheHitRate.setDescription('The percentage of ASP session lookups that succeeded.') aspSessionCacheEntries = MibScalar((1, 3, 6, 1, 4, 1, 7146, 1, 2, 17, 3, 5), Gauge32()).setMaxAccess("readonly") if mibBuilder.loadTexts: aspSessionCacheEntries.setStatus('mandatory') if mibBuilder.loadTexts: aspSessionCacheEntries.setDescription('The total number of ASP sessions stored in the cache.') aspSessionCacheEntriesMax = MibScalar((1, 3, 6, 1, 4, 1, 7146, 1, 2, 17, 3, 6), Gauge32()).setMaxAccess("readonly") if mibBuilder.loadTexts: aspSessionCacheEntriesMax.setStatus('mandatory') if mibBuilder.loadTexts: aspSessionCacheEntriesMax.setDescription('The maximum number of ASP sessions in the cache.') aspSessionCacheOldest = MibScalar((1, 3, 6, 1, 4, 1, 7146, 1, 2, 17, 3, 7), Gauge32()).setMaxAccess("readonly") if mibBuilder.loadTexts: aspSessionCacheOldest.setStatus('mandatory') if mibBuilder.loadTexts: aspSessionCacheOldest.setDescription('The age of the oldest ASP session in the cache (in seconds).') ipSessionCacheHits = MibScalar((1, 3, 6, 1, 4, 1, 7146, 1, 2, 17, 4, 1), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: ipSessionCacheHits.setStatus('mandatory') if mibBuilder.loadTexts: ipSessionCacheHits.setDescription('Number of times a IP session entry has been successfully found in the cache.') ipSessionCacheMisses = MibScalar((1, 3, 6, 1, 4, 1, 7146, 1, 2, 17, 4, 2), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: ipSessionCacheMisses.setStatus('mandatory') if mibBuilder.loadTexts: ipSessionCacheMisses.setDescription('Number of times a IP session entry has not been available in the cache.') ipSessionCacheLookups = MibScalar((1, 3, 6, 1, 4, 1, 7146, 1, 2, 17, 4, 3), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: ipSessionCacheLookups.setStatus('mandatory') if mibBuilder.loadTexts: ipSessionCacheLookups.setDescription('Number of times a IP session entry has been looked up in the cache.') ipSessionCacheHitRate = MibScalar((1, 3, 6, 1, 4, 1, 7146, 1, 2, 17, 4, 4), Gauge32()).setMaxAccess("readonly") if mibBuilder.loadTexts: ipSessionCacheHitRate.setStatus('mandatory') if mibBuilder.loadTexts: ipSessionCacheHitRate.setDescription('The percentage of IP session lookups that succeeded.') ipSessionCacheEntries = MibScalar((1, 3, 6, 1, 4, 1, 7146, 1, 2, 17, 4, 5), Gauge32()).setMaxAccess("readonly") if mibBuilder.loadTexts: ipSessionCacheEntries.setStatus('mandatory') if mibBuilder.loadTexts: ipSessionCacheEntries.setDescription('The total number of IP sessions stored in the cache.') ipSessionCacheEntriesMax = MibScalar((1, 3, 6, 1, 4, 1, 7146, 1, 2, 17, 4, 6), Gauge32()).setMaxAccess("readonly") if mibBuilder.loadTexts: ipSessionCacheEntriesMax.setStatus('mandatory') if mibBuilder.loadTexts: ipSessionCacheEntriesMax.setDescription('The maximum number of IP sessions in the cache.') ipSessionCacheOldest = MibScalar((1, 3, 6, 1, 4, 1, 7146, 1, 2, 17, 4, 7), Gauge32()).setMaxAccess("readonly") if mibBuilder.loadTexts: ipSessionCacheOldest.setStatus('mandatory') if mibBuilder.loadTexts: ipSessionCacheOldest.setDescription('The age of the oldest IP session in the cache (in seconds).') j2eeSessionCacheHits = MibScalar((1, 3, 6, 1, 4, 1, 7146, 1, 2, 17, 5, 1), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: j2eeSessionCacheHits.setStatus('mandatory') if mibBuilder.loadTexts: j2eeSessionCacheHits.setDescription('Number of times a J2EE session entry has been successfully found in the cache.') j2eeSessionCacheMisses = MibScalar((1, 3, 6, 1, 4, 1, 7146, 1, 2, 17, 5, 2), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: j2eeSessionCacheMisses.setStatus('mandatory') if mibBuilder.loadTexts: j2eeSessionCacheMisses.setDescription('Number of times a J2EE session entry has not been available in the cache.') j2eeSessionCacheLookups = MibScalar((1, 3, 6, 1, 4, 1, 7146, 1, 2, 17, 5, 3), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: j2eeSessionCacheLookups.setStatus('mandatory') if mibBuilder.loadTexts: j2eeSessionCacheLookups.setDescription('Number of times a J2EE session entry has been looked up in the cache.') j2eeSessionCacheHitRate = MibScalar((1, 3, 6, 1, 4, 1, 7146, 1, 2, 17, 5, 4), Gauge32()).setMaxAccess("readonly") if mibBuilder.loadTexts: j2eeSessionCacheHitRate.setStatus('mandatory') if mibBuilder.loadTexts: j2eeSessionCacheHitRate.setDescription('The percentage of J2EE session lookups that succeeded.') j2eeSessionCacheEntries = MibScalar((1, 3, 6, 1, 4, 1, 7146, 1, 2, 17, 5, 5), Gauge32()).setMaxAccess("readonly") if mibBuilder.loadTexts: j2eeSessionCacheEntries.setStatus('mandatory') if mibBuilder.loadTexts: j2eeSessionCacheEntries.setDescription('The total number of J2EE sessions stored in the cache.') j2eeSessionCacheEntriesMax = MibScalar((1, 3, 6, 1, 4, 1, 7146, 1, 2, 17, 5, 6), Gauge32()).setMaxAccess("readonly") if mibBuilder.loadTexts: j2eeSessionCacheEntriesMax.setStatus('mandatory') if mibBuilder.loadTexts: j2eeSessionCacheEntriesMax.setDescription('The maximum number of J2EE sessions in the cache.') j2eeSessionCacheOldest = MibScalar((1, 3, 6, 1, 4, 1, 7146, 1, 2, 17, 5, 7), Gauge32()).setMaxAccess("readonly") if mibBuilder.loadTexts: j2eeSessionCacheOldest.setStatus('mandatory') if mibBuilder.loadTexts: j2eeSessionCacheOldest.setDescription('The age of the oldest J2EE session in the cache (in seconds).') uniSessionCacheHits = MibScalar((1, 3, 6, 1, 4, 1, 7146, 1, 2, 17, 6, 1), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: uniSessionCacheHits.setStatus('mandatory') if mibBuilder.loadTexts: uniSessionCacheHits.setDescription('Number of times a universal session entry has been successfully found in the cache.') uniSessionCacheMisses = MibScalar((1, 3, 6, 1, 4, 1, 7146, 1, 2, 17, 6, 2), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: uniSessionCacheMisses.setStatus('mandatory') if mibBuilder.loadTexts: uniSessionCacheMisses.setDescription('Number of times a universal session entry has not been available in the cache.') uniSessionCacheLookups = MibScalar((1, 3, 6, 1, 4, 1, 7146, 1, 2, 17, 6, 3), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: uniSessionCacheLookups.setStatus('mandatory') if mibBuilder.loadTexts: uniSessionCacheLookups.setDescription('Number of times a universal session entry has been looked up in the cache.') uniSessionCacheHitRate = MibScalar((1, 3, 6, 1, 4, 1, 7146, 1, 2, 17, 6, 4), Gauge32()).setMaxAccess("readonly") if mibBuilder.loadTexts: uniSessionCacheHitRate.setStatus('mandatory') if mibBuilder.loadTexts: uniSessionCacheHitRate.setDescription('The percentage of universal session lookups that succeeded.') uniSessionCacheEntries = MibScalar((1, 3, 6, 1, 4, 1, 7146, 1, 2, 17, 6, 5), Gauge32()).setMaxAccess("readonly") if mibBuilder.loadTexts: uniSessionCacheEntries.setStatus('mandatory') if mibBuilder.loadTexts: uniSessionCacheEntries.setDescription('The total number of universal sessions stored in the cache.') uniSessionCacheEntriesMax = MibScalar((1, 3, 6, 1, 4, 1, 7146, 1, 2, 17, 6, 6), Gauge32()).setMaxAccess("readonly") if mibBuilder.loadTexts: uniSessionCacheEntriesMax.setStatus('mandatory') if mibBuilder.loadTexts: uniSessionCacheEntriesMax.setDescription('The maximum number of universal sessions in the cache.') uniSessionCacheOldest = MibScalar((1, 3, 6, 1, 4, 1, 7146, 1, 2, 17, 6, 7), Gauge32()).setMaxAccess("readonly") if mibBuilder.loadTexts: uniSessionCacheOldest.setStatus('mandatory') if mibBuilder.loadTexts: uniSessionCacheOldest.setDescription('The age of the oldest universal session in the cache (in seconds).') sslSessionCacheHits = MibScalar((1, 3, 6, 1, 4, 1, 7146, 1, 2, 17, 7, 1), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: sslSessionCacheHits.setStatus('mandatory') if mibBuilder.loadTexts: sslSessionCacheHits.setDescription('Number of times a SSL session persistence entry has been successfully found in the cache.') sslSessionCacheMisses = MibScalar((1, 3, 6, 1, 4, 1, 7146, 1, 2, 17, 7, 2), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: sslSessionCacheMisses.setStatus('mandatory') if mibBuilder.loadTexts: sslSessionCacheMisses.setDescription('Number of times a SSL session persistence entry has not been available in the cache.') sslSessionCacheLookups = MibScalar((1, 3, 6, 1, 4, 1, 7146, 1, 2, 17, 7, 3), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: sslSessionCacheLookups.setStatus('mandatory') if mibBuilder.loadTexts: sslSessionCacheLookups.setDescription('Number of times a SSL session persistence entry has been looked up in the cache.') sslSessionCacheHitRate = MibScalar((1, 3, 6, 1, 4, 1, 7146, 1, 2, 17, 7, 4), Gauge32()).setMaxAccess("readonly") if mibBuilder.loadTexts: sslSessionCacheHitRate.setStatus('mandatory') if mibBuilder.loadTexts: sslSessionCacheHitRate.setDescription('The percentage of SSL session persistence lookups that succeeded.') sslSessionCacheEntries = MibScalar((1, 3, 6, 1, 4, 1, 7146, 1, 2, 17, 7, 5), Gauge32()).setMaxAccess("readonly") if mibBuilder.loadTexts: sslSessionCacheEntries.setStatus('mandatory') if mibBuilder.loadTexts: sslSessionCacheEntries.setDescription('The total number of SSL session persistence entries stored in the cache.') sslSessionCacheEntriesMax = MibScalar((1, 3, 6, 1, 4, 1, 7146, 1, 2, 17, 7, 6), Gauge32()).setMaxAccess("readonly") if mibBuilder.loadTexts: sslSessionCacheEntriesMax.setStatus('mandatory') if mibBuilder.loadTexts: sslSessionCacheEntriesMax.setDescription('The maximum number of SSL session persistence entries in the cache.') sslSessionCacheOldest = MibScalar((1, 3, 6, 1, 4, 1, 7146, 1, 2, 17, 7, 7), Gauge32()).setMaxAccess("readonly") if mibBuilder.loadTexts: sslSessionCacheOldest.setStatus('mandatory') if mibBuilder.loadTexts: sslSessionCacheOldest.setDescription('The age of the oldest SSL session in the cache (in seconds).') ruleNumber = MibScalar((1, 3, 6, 1, 4, 1, 7146, 1, 2, 18, 1), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: ruleNumber.setStatus('mandatory') if mibBuilder.loadTexts: ruleNumber.setDescription('The number of TrafficScript rules.') ruleTable = MibTable((1, 3, 6, 1, 4, 1, 7146, 1, 2, 18, 2), ) if mibBuilder.loadTexts: ruleTable.setStatus('mandatory') if mibBuilder.loadTexts: ruleTable.setDescription('This table provides information and statistics for TrafficScript rules.') ruleEntry = MibTableRow((1, 3, 6, 1, 4, 1, 7146, 1, 2, 18, 2, 1), ).setIndexNames((0, "ZXTM-MIB", "ruleName")) if mibBuilder.loadTexts: ruleEntry.setStatus('mandatory') if mibBuilder.loadTexts: ruleEntry.setDescription('This defines a row in the rules table.') ruleName = MibTableColumn((1, 3, 6, 1, 4, 1, 7146, 1, 2, 18, 2, 1, 1), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 255))).setMaxAccess("readonly") if mibBuilder.loadTexts: ruleName.setStatus('mandatory') if mibBuilder.loadTexts: ruleName.setDescription('The name of the TrafficScript rule.') ruleExecutions = MibTableColumn((1, 3, 6, 1, 4, 1, 7146, 1, 2, 18, 2, 1, 2), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: ruleExecutions.setStatus('mandatory') if mibBuilder.loadTexts: ruleExecutions.setDescription('Number of times this TrafficScript rule has been executed.') ruleAborts = MibTableColumn((1, 3, 6, 1, 4, 1, 7146, 1, 2, 18, 2, 1, 3), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: ruleAborts.setStatus('mandatory') if mibBuilder.loadTexts: ruleAborts.setDescription('Number of times this TrafficScript rule has aborted.') ruleResponds = MibTableColumn((1, 3, 6, 1, 4, 1, 7146, 1, 2, 18, 2, 1, 4), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: ruleResponds.setStatus('mandatory') if mibBuilder.loadTexts: ruleResponds.setDescription('Number of times this TrafficScript rule has responded directly to the client.') rulePoolSelect = MibTableColumn((1, 3, 6, 1, 4, 1, 7146, 1, 2, 18, 2, 1, 5), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: rulePoolSelect.setStatus('mandatory') if mibBuilder.loadTexts: rulePoolSelect.setDescription('Number of times this TrafficScript rule has selected a pool to use.') ruleRetries = MibTableColumn((1, 3, 6, 1, 4, 1, 7146, 1, 2, 18, 2, 1, 6), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: ruleRetries.setStatus('mandatory') if mibBuilder.loadTexts: ruleRetries.setDescription('Number of times this TrafficScript rule has forced the request to be retried.') ruleDiscards = MibTableColumn((1, 3, 6, 1, 4, 1, 7146, 1, 2, 18, 2, 1, 7), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: ruleDiscards.setStatus('mandatory') if mibBuilder.loadTexts: ruleDiscards.setDescription('Number of times this TrafficScript rule has discarded the connection.') monitorNumber = MibScalar((1, 3, 6, 1, 4, 1, 7146, 1, 2, 19, 1), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: monitorNumber.setStatus('mandatory') if mibBuilder.loadTexts: monitorNumber.setDescription('The number of Monitors.') monitorTable = MibTable((1, 3, 6, 1, 4, 1, 7146, 1, 2, 19, 2), ) if mibBuilder.loadTexts: monitorTable.setStatus('mandatory') if mibBuilder.loadTexts: monitorTable.setDescription('This table provides information and statistics on Monitors.') monitorEntry = MibTableRow((1, 3, 6, 1, 4, 1, 7146, 1, 2, 19, 2, 1), ).setIndexNames((0, "ZXTM-MIB", "monitorName")) if mibBuilder.loadTexts: monitorEntry.setStatus('mandatory') if mibBuilder.loadTexts: monitorEntry.setDescription('This defines a row in the monitors table.') monitorName = MibTableColumn((1, 3, 6, 1, 4, 1, 7146, 1, 2, 19, 2, 1, 1), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 255))).setMaxAccess("readonly") if mibBuilder.loadTexts: monitorName.setStatus('mandatory') if mibBuilder.loadTexts: monitorName.setDescription('The name of the monitor.') licensekeyNumber = MibScalar((1, 3, 6, 1, 4, 1, 7146, 1, 2, 20, 1), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: licensekeyNumber.setStatus('mandatory') if mibBuilder.loadTexts: licensekeyNumber.setDescription('The number of License keys.') licensekeyTable = MibTable((1, 3, 6, 1, 4, 1, 7146, 1, 2, 20, 2), ) if mibBuilder.loadTexts: licensekeyTable.setStatus('mandatory') if mibBuilder.loadTexts: licensekeyTable.setDescription('This table provides information and statistics on License Keys.') licensekeyEntry = MibTableRow((1, 3, 6, 1, 4, 1, 7146, 1, 2, 20, 2, 1), ).setIndexNames((0, "ZXTM-MIB", "licensekeyName")) if mibBuilder.loadTexts: licensekeyEntry.setStatus('mandatory') if mibBuilder.loadTexts: licensekeyEntry.setDescription('This defines a row in the license keys table.') licensekeyName = MibTableColumn((1, 3, 6, 1, 4, 1, 7146, 1, 2, 20, 2, 1, 1), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 255))).setMaxAccess("readonly") if mibBuilder.loadTexts: licensekeyName.setStatus('mandatory') if mibBuilder.loadTexts: licensekeyName.setDescription('The name of the License Key.') zxtmNumber = MibScalar((1, 3, 6, 1, 4, 1, 7146, 1, 2, 21, 1), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: zxtmNumber.setStatus('mandatory') if mibBuilder.loadTexts: zxtmNumber.setDescription('The number of traffic managers in the cluster.') zxtmTable = MibTable((1, 3, 6, 1, 4, 1, 7146, 1, 2, 21, 2), ) if mibBuilder.loadTexts: zxtmTable.setStatus('mandatory') if mibBuilder.loadTexts: zxtmTable.setDescription('This table provides information and statistics on traffic managers.') zxtmEntry = MibTableRow((1, 3, 6, 1, 4, 1, 7146, 1, 2, 21, 2, 1), ).setIndexNames((0, "ZXTM-MIB", "zxtmName")) if mibBuilder.loadTexts: zxtmEntry.setStatus('mandatory') if mibBuilder.loadTexts: zxtmEntry.setDescription('This defines a row in the traffic managers table.') zxtmName = MibTableColumn((1, 3, 6, 1, 4, 1, 7146, 1, 2, 21, 2, 1, 1), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 255))).setMaxAccess("readonly") if mibBuilder.loadTexts: zxtmName.setStatus('mandatory') if mibBuilder.loadTexts: zxtmName.setDescription('The name of the traffic manager.') glbServiceNumber = MibScalar((1, 3, 6, 1, 4, 1, 7146, 1, 2, 24, 1), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 65535))).setMaxAccess("readonly") if mibBuilder.loadTexts: glbServiceNumber.setStatus('mandatory') if mibBuilder.loadTexts: glbServiceNumber.setDescription('The number of GLB Services on this system.') glbServiceTable = MibTable((1, 3, 6, 1, 4, 1, 7146, 1, 2, 24, 2), ) if mibBuilder.loadTexts: glbServiceTable.setStatus('mandatory') if mibBuilder.loadTexts: glbServiceTable.setDescription('This table provides information and statistics for GLB Services.') glbServiceEntry = MibTableRow((1, 3, 6, 1, 4, 1, 7146, 1, 2, 24, 2, 1), ).setIndexNames((0, "ZXTM-MIB", "glbServiceName")) if mibBuilder.loadTexts: glbServiceEntry.setStatus('mandatory') if mibBuilder.loadTexts: glbServiceEntry.setDescription('This defines a row in the GLB Services table.') glbServiceName = MibTableColumn((1, 3, 6, 1, 4, 1, 7146, 1, 2, 24, 2, 1, 1), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 255))).setMaxAccess("readonly") if mibBuilder.loadTexts: glbServiceName.setStatus('mandatory') if mibBuilder.loadTexts: glbServiceName.setDescription('The name of the GLB Service.') glbServiceResponses = MibTableColumn((1, 3, 6, 1, 4, 1, 7146, 1, 2, 24, 2, 1, 2), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: glbServiceResponses.setStatus('mandatory') if mibBuilder.loadTexts: glbServiceResponses.setDescription('Number of A records this GLB Service has altered.') glbServiceUnmodified = MibTableColumn((1, 3, 6, 1, 4, 1, 7146, 1, 2, 24, 2, 1, 3), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: glbServiceUnmodified.setStatus('mandatory') if mibBuilder.loadTexts: glbServiceUnmodified.setDescription('Number of A records this GLB Service has passed through unmodified.') glbServiceDiscarded = MibTableColumn((1, 3, 6, 1, 4, 1, 7146, 1, 2, 24, 2, 1, 4), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: glbServiceDiscarded.setStatus('mandatory') if mibBuilder.loadTexts: glbServiceDiscarded.setDescription('Number of A records this GLB Service has discarded.') perLocationServiceTable = MibTable((1, 3, 6, 1, 4, 1, 7146, 1, 2, 25, 1), ) if mibBuilder.loadTexts: perLocationServiceTable.setStatus('mandatory') if mibBuilder.loadTexts: perLocationServiceTable.setDescription('This table provides information and statistics for GLB Services on a per location basis.') perLocationServiceEntry = MibTableRow((1, 3, 6, 1, 4, 1, 7146, 1, 2, 25, 1, 1), ).setIndexNames((0, "ZXTM-MIB", "perLocationServiceLocationName"), (0, "ZXTM-MIB", "perLocationServiceName")) if mibBuilder.loadTexts: perLocationServiceEntry.setStatus('mandatory') if mibBuilder.loadTexts: perLocationServiceEntry.setDescription('This defines a row in the per-location table.') perLocationServiceLocationName = MibTableColumn((1, 3, 6, 1, 4, 1, 7146, 1, 2, 25, 1, 1, 1), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 255))).setMaxAccess("readonly") if mibBuilder.loadTexts: perLocationServiceLocationName.setStatus('mandatory') if mibBuilder.loadTexts: perLocationServiceLocationName.setDescription('The name of the location.') perLocationServiceLocationCode = MibTableColumn((1, 3, 6, 1, 4, 1, 7146, 1, 2, 25, 1, 1, 2), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 255))).setMaxAccess("readonly") if mibBuilder.loadTexts: perLocationServiceLocationCode.setStatus('mandatory') if mibBuilder.loadTexts: perLocationServiceLocationCode.setDescription('The code for the location.') perLocationServiceName = MibTableColumn((1, 3, 6, 1, 4, 1, 7146, 1, 2, 25, 1, 1, 3), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 255))).setMaxAccess("readonly") if mibBuilder.loadTexts: perLocationServiceName.setStatus('mandatory') if mibBuilder.loadTexts: perLocationServiceName.setDescription('The name of the GLB Service.') perLocationServiceDraining = MibTableColumn((1, 3, 6, 1, 4, 1, 7146, 1, 2, 25, 1, 1, 4), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("draining", 1), ("active", 2)))).setMaxAccess("readonly") if mibBuilder.loadTexts: perLocationServiceDraining.setStatus('mandatory') if mibBuilder.loadTexts: perLocationServiceDraining.setDescription('The draining state of this location for this GLB Service.') perLocationServiceState = MibTableColumn((1, 3, 6, 1, 4, 1, 7146, 1, 2, 25, 1, 1, 5), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("alive", 1), ("dead", 2)))).setMaxAccess("readonly") if mibBuilder.loadTexts: perLocationServiceState.setStatus('mandatory') if mibBuilder.loadTexts: perLocationServiceState.setDescription('The state of this location for this GLB Service.') perLocationServiceFrontendState = MibTableColumn((1, 3, 6, 1, 4, 1, 7146, 1, 2, 25, 1, 1, 6), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("alive", 1), ("dead", 2)))).setMaxAccess("readonly") if mibBuilder.loadTexts: perLocationServiceFrontendState.setStatus('mandatory') if mibBuilder.loadTexts: perLocationServiceFrontendState.setDescription('The frontend state of this location for this GLB Service.') perLocationServiceMonitorState = MibTableColumn((1, 3, 6, 1, 4, 1, 7146, 1, 2, 25, 1, 1, 7), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("alive", 1), ("dead", 2)))).setMaxAccess("readonly") if mibBuilder.loadTexts: perLocationServiceMonitorState.setStatus('mandatory') if mibBuilder.loadTexts: perLocationServiceMonitorState.setDescription('The monitor state of this location for this GLB Service.') perLocationServiceLoad = MibTableColumn((1, 3, 6, 1, 4, 1, 7146, 1, 2, 25, 1, 1, 8), Gauge32()).setMaxAccess("readonly") if mibBuilder.loadTexts: perLocationServiceLoad.setStatus('mandatory') if mibBuilder.loadTexts: perLocationServiceLoad.setDescription('The load metric for this location for this GLB Service.') perLocationServiceResponses = MibTableColumn((1, 3, 6, 1, 4, 1, 7146, 1, 2, 25, 1, 1, 9), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: perLocationServiceResponses.setStatus('mandatory') if mibBuilder.loadTexts: perLocationServiceResponses.setDescription('Number of A records that have been altered to point to this location for this GLB Service.') locationTable = MibTable((1, 3, 6, 1, 4, 1, 7146, 1, 2, 26, 1), ) if mibBuilder.loadTexts: locationTable.setStatus('mandatory') if mibBuilder.loadTexts: locationTable.setDescription('This table provides information and statistics for GLB Services on a per location basis.') locationEntry = MibTableRow((1, 3, 6, 1, 4, 1, 7146, 1, 2, 26, 1, 1), ).setIndexNames((0, "ZXTM-MIB", "locationName")) if mibBuilder.loadTexts: locationEntry.setStatus('mandatory') if mibBuilder.loadTexts: locationEntry.setDescription('This defines a row in the per-location table.') locationName = MibTableColumn((1, 3, 6, 1, 4, 1, 7146, 1, 2, 26, 1, 1, 1), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 255))).setMaxAccess("readonly") if mibBuilder.loadTexts: locationName.setStatus('mandatory') if mibBuilder.loadTexts: locationName.setDescription('The name of the location.') locationCode = MibTableColumn((1, 3, 6, 1, 4, 1, 7146, 1, 2, 26, 1, 1, 2), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 255))).setMaxAccess("readonly") if mibBuilder.loadTexts: locationCode.setStatus('mandatory') if mibBuilder.loadTexts: locationCode.setDescription('The code for the location.') locationLoad = MibTableColumn((1, 3, 6, 1, 4, 1, 7146, 1, 2, 26, 1, 1, 3), Gauge32()).setMaxAccess("readonly") if mibBuilder.loadTexts: locationLoad.setStatus('mandatory') if mibBuilder.loadTexts: locationLoad.setDescription('The mean load metric for this location.') locationResponses = MibTableColumn((1, 3, 6, 1, 4, 1, 7146, 1, 2, 26, 1, 1, 4), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: locationResponses.setStatus('mandatory') if mibBuilder.loadTexts: locationResponses.setDescription('Number of A records that have been altered to point to this location.') eventNumber = MibScalar((1, 3, 6, 1, 4, 1, 7146, 1, 2, 13, 1), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: eventNumber.setStatus('mandatory') if mibBuilder.loadTexts: eventNumber.setDescription('The number of event configurations.') eventTable = MibTable((1, 3, 6, 1, 4, 1, 7146, 1, 2, 13, 2), ) if mibBuilder.loadTexts: eventTable.setStatus('mandatory') if mibBuilder.loadTexts: eventTable.setDescription('This table gives information on the event configurations in the traffic manager.') eventEntry = MibTableRow((1, 3, 6, 1, 4, 1, 7146, 1, 2, 13, 2, 1), ).setIndexNames((0, "ZXTM-MIB", "eventName")) if mibBuilder.loadTexts: eventEntry.setStatus('mandatory') if mibBuilder.loadTexts: eventEntry.setDescription('This defines a row in the events table.') eventName = MibTableColumn((1, 3, 6, 1, 4, 1, 7146, 1, 2, 13, 2, 1, 1), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 255))).setMaxAccess("readonly") if mibBuilder.loadTexts: eventName.setStatus('mandatory') if mibBuilder.loadTexts: eventName.setDescription('The name of the event configuration.') eventsMatched = MibTableColumn((1, 3, 6, 1, 4, 1, 7146, 1, 2, 13, 2, 1, 2), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: eventsMatched.setStatus('mandatory') if mibBuilder.loadTexts: eventsMatched.setDescription('Number of times this event configuration has matched.') actionNumber = MibScalar((1, 3, 6, 1, 4, 1, 7146, 1, 2, 14, 1), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: actionNumber.setStatus('mandatory') if mibBuilder.loadTexts: actionNumber.setDescription('The number of actions configured in the traffic manager.') actionTable = MibTable((1, 3, 6, 1, 4, 1, 7146, 1, 2, 14, 2), ) if mibBuilder.loadTexts: actionTable.setStatus('mandatory') if mibBuilder.loadTexts: actionTable.setDescription('This table gives information on the action configurations in the traffic manager.') actionEntry = MibTableRow((1, 3, 6, 1, 4, 1, 7146, 1, 2, 14, 2, 1), ).setIndexNames((0, "ZXTM-MIB", "actionName")) if mibBuilder.loadTexts: actionEntry.setStatus('mandatory') if mibBuilder.loadTexts: actionEntry.setDescription('This defines a row in the actions table.') actionName = MibTableColumn((1, 3, 6, 1, 4, 1, 7146, 1, 2, 14, 2, 1, 1), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 255))).setMaxAccess("readonly") if mibBuilder.loadTexts: actionName.setStatus('mandatory') if mibBuilder.loadTexts: actionName.setDescription('The name of the action.') actionsProcessed = MibTableColumn((1, 3, 6, 1, 4, 1, 7146, 1, 2, 14, 2, 1, 2), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: actionsProcessed.setStatus('mandatory') if mibBuilder.loadTexts: actionsProcessed.setDescription('Number of times this action has been processed.') fullLogLine = MibScalar((1, 3, 6, 1, 4, 1, 7146, 1, 2, 22, 1), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 255))).setMaxAccess("readonly") if mibBuilder.loadTexts: fullLogLine.setStatus('mandatory') if mibBuilder.loadTexts: fullLogLine.setDescription('The full log line of an event (for traps).') confName = MibScalar((1, 3, 6, 1, 4, 1, 7146, 1, 2, 22, 2), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 255))).setMaxAccess("readonly") if mibBuilder.loadTexts: confName.setStatus('mandatory') if mibBuilder.loadTexts: confName.setDescription('The name of the configuration file affected (for traps).') customEventName = MibScalar((1, 3, 6, 1, 4, 1, 7146, 1, 2, 22, 3), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 255))).setMaxAccess("readonly") if mibBuilder.loadTexts: customEventName.setStatus('mandatory') if mibBuilder.loadTexts: customEventName.setDescription('The name of the Custom Event (for traps).') testaction = NotificationType((1, 3, 6, 1, 4, 1, 7146, 1, 2, 15) + (0,1)).setObjects(("ZXTM-MIB", "fullLogLine"), ("ZXTM-MIB", "actionName")) if mibBuilder.loadTexts: testaction.setDescription('Testing configuration for an action (emitted when testing an action in the UI)') running = NotificationType((1, 3, 6, 1, 4, 1, 7146, 1, 2, 15) + (0,2)).setObjects(("ZXTM-MIB", "fullLogLine")) if mibBuilder.loadTexts: running.setDescription('Software is running') fewfreefds = NotificationType((1, 3, 6, 1, 4, 1, 7146, 1, 2, 15) + (0,3)).setObjects(("ZXTM-MIB", "fullLogLine")) if mibBuilder.loadTexts: fewfreefds.setDescription('Running out of free file descriptors') restartrequired = NotificationType((1, 3, 6, 1, 4, 1, 7146, 1, 2, 15) + (0,4)).setObjects(("ZXTM-MIB", "fullLogLine")) if mibBuilder.loadTexts: restartrequired.setDescription('Software must be restarted to apply configuration changes') timemovedback = NotificationType((1, 3, 6, 1, 4, 1, 7146, 1, 2, 15) + (0,5)).setObjects(("ZXTM-MIB", "fullLogLine")) if mibBuilder.loadTexts: timemovedback.setDescription('Time has been moved back') sslfail = NotificationType((1, 3, 6, 1, 4, 1, 7146, 1, 2, 15) + (0,6)).setObjects(("ZXTM-MIB", "fullLogLine")) if mibBuilder.loadTexts: sslfail.setDescription('One or more SSL connections from clients failed recently') hardware = NotificationType((1, 3, 6, 1, 4, 1, 7146, 1, 2, 15) + (0,7)).setObjects(("ZXTM-MIB", "fullLogLine")) if mibBuilder.loadTexts: hardware.setDescription('Appliance hardware notification') zxtmswerror = NotificationType((1, 3, 6, 1, 4, 1, 7146, 1, 2, 15) + (0,8)).setObjects(("ZXTM-MIB", "fullLogLine")) if mibBuilder.loadTexts: zxtmswerror.setDescription('Zeus Traffic Manager software problem') customevent = NotificationType((1, 3, 6, 1, 4, 1, 7146, 1, 2, 15) + (0,9)).setObjects(("ZXTM-MIB", "fullLogLine"), ("ZXTM-MIB", "customEventName")) if mibBuilder.loadTexts: customevent.setDescription("A custom event was emitted using the TrafficScript 'event.emit()' function") versionmismatch = NotificationType((1, 3, 6, 1, 4, 1, 7146, 1, 2, 15) + (0,10)).setObjects(("ZXTM-MIB", "fullLogLine")) if mibBuilder.loadTexts: versionmismatch.setDescription('Configuration update refused: traffic manager version mismatch') autherror = NotificationType((1, 3, 6, 1, 4, 1, 7146, 1, 2, 15) + (0,114)).setObjects(("ZXTM-MIB", "fullLogLine")) if mibBuilder.loadTexts: autherror.setDescription('An error occurred during user authentication') machineok = NotificationType((1, 3, 6, 1, 4, 1, 7146, 1, 2, 15) + (0,11)).setObjects(("ZXTM-MIB", "fullLogLine"), ("ZXTM-MIB", "zxtmName")) if mibBuilder.loadTexts: machineok.setDescription('Remote machine is now working') machinetimeout = NotificationType((1, 3, 6, 1, 4, 1, 7146, 1, 2, 15) + (0,12)).setObjects(("ZXTM-MIB", "fullLogLine"), ("ZXTM-MIB", "zxtmName")) if mibBuilder.loadTexts: machinetimeout.setDescription('Remote machine has timed out and been marked as failed') machinefail = NotificationType((1, 3, 6, 1, 4, 1, 7146, 1, 2, 15) + (0,13)).setObjects(("ZXTM-MIB", "fullLogLine"), ("ZXTM-MIB", "zxtmName")) if mibBuilder.loadTexts: machinefail.setDescription('Remote machine has failed') allmachinesok = NotificationType((1, 3, 6, 1, 4, 1, 7146, 1, 2, 15) + (0,14)).setObjects(("ZXTM-MIB", "fullLogLine")) if mibBuilder.loadTexts: allmachinesok.setDescription('All machines are working') flipperbackendsworking = NotificationType((1, 3, 6, 1, 4, 1, 7146, 1, 2, 15) + (0,15)).setObjects(("ZXTM-MIB", "fullLogLine")) if mibBuilder.loadTexts: flipperbackendsworking.setDescription('Back-end nodes are now working') flipperfrontendsworking = NotificationType((1, 3, 6, 1, 4, 1, 7146, 1, 2, 15) + (0,16)).setObjects(("ZXTM-MIB", "fullLogLine")) if mibBuilder.loadTexts: flipperfrontendsworking.setDescription('Frontend machines are now working') pingbackendfail = NotificationType((1, 3, 6, 1, 4, 1, 7146, 1, 2, 15) + (0,17)).setObjects(("ZXTM-MIB", "fullLogLine")) if mibBuilder.loadTexts: pingbackendfail.setDescription('Failed to ping back-end nodes') pingfrontendfail = NotificationType((1, 3, 6, 1, 4, 1, 7146, 1, 2, 15) + (0,18)).setObjects(("ZXTM-MIB", "fullLogLine")) if mibBuilder.loadTexts: pingfrontendfail.setDescription('Failed to ping any of the machines used to check the front-end connectivity') pinggwfail = NotificationType((1, 3, 6, 1, 4, 1, 7146, 1, 2, 15) + (0,19)).setObjects(("ZXTM-MIB", "fullLogLine")) if mibBuilder.loadTexts: pinggwfail.setDescription('Failed to ping default gateway') statebaddata = NotificationType((1, 3, 6, 1, 4, 1, 7146, 1, 2, 15) + (0,20)).setObjects(("ZXTM-MIB", "fullLogLine")) if mibBuilder.loadTexts: statebaddata.setDescription('Received an invalid response from another cluster member') stateconnfail = NotificationType((1, 3, 6, 1, 4, 1, 7146, 1, 2, 15) + (0,21)).setObjects(("ZXTM-MIB", "fullLogLine")) if mibBuilder.loadTexts: stateconnfail.setDescription('Failed to connect to another cluster member for state sharing') stateok = NotificationType((1, 3, 6, 1, 4, 1, 7146, 1, 2, 15) + (0,22)).setObjects(("ZXTM-MIB", "fullLogLine")) if mibBuilder.loadTexts: stateok.setDescription('Successfully connected to another cluster member for state sharing') statereadfail = NotificationType((1, 3, 6, 1, 4, 1, 7146, 1, 2, 15) + (0,23)).setObjects(("ZXTM-MIB", "fullLogLine")) if mibBuilder.loadTexts: statereadfail.setDescription('Reading state data from another cluster member failed') statetimeout = NotificationType((1, 3, 6, 1, 4, 1, 7146, 1, 2, 15) + (0,24)).setObjects(("ZXTM-MIB", "fullLogLine")) if mibBuilder.loadTexts: statetimeout.setDescription('Timeout while sending state data to another cluster member') stateunexpected = NotificationType((1, 3, 6, 1, 4, 1, 7146, 1, 2, 15) + (0,25)).setObjects(("ZXTM-MIB", "fullLogLine")) if mibBuilder.loadTexts: stateunexpected.setDescription('Received unexpected state data from another cluster member') statewritefail = NotificationType((1, 3, 6, 1, 4, 1, 7146, 1, 2, 15) + (0,26)).setObjects(("ZXTM-MIB", "fullLogLine")) if mibBuilder.loadTexts: statewritefail.setDescription('Writing state data to another cluster member failed') activatealldead = NotificationType((1, 3, 6, 1, 4, 1, 7146, 1, 2, 15) + (0,107)).setObjects(("ZXTM-MIB", "fullLogLine")) if mibBuilder.loadTexts: activatealldead.setDescription('Activating this machine automatically because it is the only working machine in its Traffic IP Groups') machinerecovered = NotificationType((1, 3, 6, 1, 4, 1, 7146, 1, 2, 15) + (0,108)).setObjects(("ZXTM-MIB", "fullLogLine")) if mibBuilder.loadTexts: machinerecovered.setDescription('Remote machine has recovered and can raise Traffic IP addresses') flipperrecovered = NotificationType((1, 3, 6, 1, 4, 1, 7146, 1, 2, 15) + (0,109)).setObjects(("ZXTM-MIB", "fullLogLine")) if mibBuilder.loadTexts: flipperrecovered.setDescription('Machine is ready to raise Traffic IP addresses') activatedautomatically = NotificationType((1, 3, 6, 1, 4, 1, 7146, 1, 2, 15) + (0,110)).setObjects(("ZXTM-MIB", "fullLogLine")) if mibBuilder.loadTexts: activatedautomatically.setDescription('Machine has recovered and been activated automatically because it would cause no service disruption') zclustermoderr = NotificationType((1, 3, 6, 1, 4, 1, 7146, 1, 2, 15) + (0,111)).setObjects(("ZXTM-MIB", "fullLogLine")) if mibBuilder.loadTexts: zclustermoderr.setDescription('An error occurred when using the zcluster Multi-Hosted IP kernel module') ec2flipperraiselocalworking = NotificationType((1, 3, 6, 1, 4, 1, 7146, 1, 2, 15) + (0,112)).setObjects(("ZXTM-MIB", "fullLogLine")) if mibBuilder.loadTexts: ec2flipperraiselocalworking.setDescription('Moving EC2 Elastic IP Address; local machine is working') ec2flipperraiseothersdead = NotificationType((1, 3, 6, 1, 4, 1, 7146, 1, 2, 15) + (0,113)).setObjects(("ZXTM-MIB", "fullLogLine")) if mibBuilder.loadTexts: ec2flipperraiseothersdead.setDescription('Moving EC2 Elastic IP Address; other machines have failed') ec2iperr = NotificationType((1, 3, 6, 1, 4, 1, 7146, 1, 2, 15) + (0,130)).setObjects(("ZXTM-MIB", "fullLogLine")) if mibBuilder.loadTexts: ec2iperr.setDescription('Problem occurred when managing an Elastic IP address') dropec2ipwarn = NotificationType((1, 3, 6, 1, 4, 1, 7146, 1, 2, 15) + (0,131)).setObjects(("ZXTM-MIB", "fullLogLine")) if mibBuilder.loadTexts: dropec2ipwarn.setDescription('Removing EC2 Elastic IP Address from all machines; it is no longer a part of any Traffic IP Groups') ec2nopublicip = NotificationType((1, 3, 6, 1, 4, 1, 7146, 1, 2, 15) + (0,132)).setObjects(("ZXTM-MIB", "fullLogLine")) if mibBuilder.loadTexts: ec2nopublicip.setDescription('Cannot raise Elastic IP on this machine until EC2 provides it with a public IP address') multihostload = NotificationType((1, 3, 6, 1, 4, 1, 7146, 1, 2, 15) + (0,133)).setObjects(("ZXTM-MIB", "fullLogLine")) if mibBuilder.loadTexts: multihostload.setDescription('The amount of load handled by the local machine destined for this Traffic IP has changed') sslhwfail = NotificationType((1, 3, 6, 1, 4, 1, 7146, 1, 2, 15) + (0,27)).setObjects(("ZXTM-MIB", "fullLogLine")) if mibBuilder.loadTexts: sslhwfail.setDescription('SSL hardware support failed') sslhwrestart = NotificationType((1, 3, 6, 1, 4, 1, 7146, 1, 2, 15) + (0,28)).setObjects(("ZXTM-MIB", "fullLogLine")) if mibBuilder.loadTexts: sslhwrestart.setDescription('SSL hardware support restarted') sslhwstart = NotificationType((1, 3, 6, 1, 4, 1, 7146, 1, 2, 15) + (0,29)).setObjects(("ZXTM-MIB", "fullLogLine")) if mibBuilder.loadTexts: sslhwstart.setDescription('SSL hardware support started') confdel = NotificationType((1, 3, 6, 1, 4, 1, 7146, 1, 2, 15) + (0,30)).setObjects(("ZXTM-MIB", "fullLogLine"), ("ZXTM-MIB", "confName")) if mibBuilder.loadTexts: confdel.setDescription('Configuration file deleted') confmod = NotificationType((1, 3, 6, 1, 4, 1, 7146, 1, 2, 15) + (0,31)).setObjects(("ZXTM-MIB", "fullLogLine"), ("ZXTM-MIB", "confName")) if mibBuilder.loadTexts: confmod.setDescription('Configuration file modified') confadd = NotificationType((1, 3, 6, 1, 4, 1, 7146, 1, 2, 15) + (0,32)).setObjects(("ZXTM-MIB", "fullLogLine"), ("ZXTM-MIB", "confName")) if mibBuilder.loadTexts: confadd.setDescription('Configuration file added') confok = NotificationType((1, 3, 6, 1, 4, 1, 7146, 1, 2, 15) + (0,33)).setObjects(("ZXTM-MIB", "fullLogLine"), ("ZXTM-MIB", "confName")) if mibBuilder.loadTexts: confok.setDescription('Configuration file now OK') confreptimeout = NotificationType((1, 3, 6, 1, 4, 1, 7146, 1, 2, 15) + (0,178)).setObjects(("ZXTM-MIB", "fullLogLine")) if mibBuilder.loadTexts: confreptimeout.setDescription('Replication of configuration has timed out') confrepfailed = NotificationType((1, 3, 6, 1, 4, 1, 7146, 1, 2, 15) + (0,179)).setObjects(("ZXTM-MIB", "fullLogLine")) if mibBuilder.loadTexts: confrepfailed.setDescription('Replication of configuration has failed') javadied = NotificationType((1, 3, 6, 1, 4, 1, 7146, 1, 2, 15) + (0,34)).setObjects(("ZXTM-MIB", "fullLogLine")) if mibBuilder.loadTexts: javadied.setDescription('Java runner died') javastop = NotificationType((1, 3, 6, 1, 4, 1, 7146, 1, 2, 15) + (0,35)).setObjects(("ZXTM-MIB", "fullLogLine")) if mibBuilder.loadTexts: javastop.setDescription('Java support has stopped') javastartfail = NotificationType((1, 3, 6, 1, 4, 1, 7146, 1, 2, 15) + (0,36)).setObjects(("ZXTM-MIB", "fullLogLine")) if mibBuilder.loadTexts: javastartfail.setDescription('Java runner failed to start') javaterminatefail = NotificationType((1, 3, 6, 1, 4, 1, 7146, 1, 2, 15) + (0,37)).setObjects(("ZXTM-MIB", "fullLogLine")) if mibBuilder.loadTexts: javaterminatefail.setDescription('Java runner failed to terminate') javanotfound = NotificationType((1, 3, 6, 1, 4, 1, 7146, 1, 2, 15) + (0,38)).setObjects(("ZXTM-MIB", "fullLogLine")) if mibBuilder.loadTexts: javanotfound.setDescription('Cannot start Java runner, program not found') javastarted = NotificationType((1, 3, 6, 1, 4, 1, 7146, 1, 2, 15) + (0,39)).setObjects(("ZXTM-MIB", "fullLogLine")) if mibBuilder.loadTexts: javastarted.setDescription('Java runner started') servleterror = NotificationType((1, 3, 6, 1, 4, 1, 7146, 1, 2, 15) + (0,40)).setObjects(("ZXTM-MIB", "fullLogLine")) if mibBuilder.loadTexts: servleterror.setDescription('Servlet encountered an error') monitorfail = NotificationType((1, 3, 6, 1, 4, 1, 7146, 1, 2, 15) + (0,41)).setObjects(("ZXTM-MIB", "fullLogLine"), ("ZXTM-MIB", "monitorName")) if mibBuilder.loadTexts: monitorfail.setDescription('Monitor has detected a failure') monitorok = NotificationType((1, 3, 6, 1, 4, 1, 7146, 1, 2, 15) + (0,42)).setObjects(("ZXTM-MIB", "fullLogLine"), ("ZXTM-MIB", "monitorName")) if mibBuilder.loadTexts: monitorok.setDescription('Monitor is working') rulexmlerr = NotificationType((1, 3, 6, 1, 4, 1, 7146, 1, 2, 15) + (0,43)).setObjects(("ZXTM-MIB", "fullLogLine"), ("ZXTM-MIB", "ruleName")) if mibBuilder.loadTexts: rulexmlerr.setDescription('Rule encountered an XML error') pooluseunknown = NotificationType((1, 3, 6, 1, 4, 1, 7146, 1, 2, 15) + (0,44)).setObjects(("ZXTM-MIB", "fullLogLine"), ("ZXTM-MIB", "ruleName")) if mibBuilder.loadTexts: pooluseunknown.setDescription('Rule selected an unknown pool') ruleabort = NotificationType((1, 3, 6, 1, 4, 1, 7146, 1, 2, 15) + (0,45)).setObjects(("ZXTM-MIB", "fullLogLine"), ("ZXTM-MIB", "ruleName")) if mibBuilder.loadTexts: ruleabort.setDescription('Rule aborted during execution') rulebufferlarge = NotificationType((1, 3, 6, 1, 4, 1, 7146, 1, 2, 15) + (0,46)).setObjects(("ZXTM-MIB", "fullLogLine"), ("ZXTM-MIB", "ruleName")) if mibBuilder.loadTexts: rulebufferlarge.setDescription('Rule has buffered more data than expected') rulebodycomperror = NotificationType((1, 3, 6, 1, 4, 1, 7146, 1, 2, 15) + (0,47)).setObjects(("ZXTM-MIB", "fullLogLine"), ("ZXTM-MIB", "ruleName")) if mibBuilder.loadTexts: rulebodycomperror.setDescription('Rule encountered invalid data while uncompressing response') forwardproxybadhost = NotificationType((1, 3, 6, 1, 4, 1, 7146, 1, 2, 15) + (0,48)).setObjects(("ZXTM-MIB", "fullLogLine"), ("ZXTM-MIB", "ruleName")) if mibBuilder.loadTexts: forwardproxybadhost.setDescription('Rule selected an unresolvable host') invalidemit = NotificationType((1, 3, 6, 1, 4, 1, 7146, 1, 2, 15) + (0,49)).setObjects(("ZXTM-MIB", "fullLogLine"), ("ZXTM-MIB", "ruleName")) if mibBuilder.loadTexts: invalidemit.setDescription('Rule used event.emit() with an invalid custom event') rulenopersistence = NotificationType((1, 3, 6, 1, 4, 1, 7146, 1, 2, 15) + (0,50)).setObjects(("ZXTM-MIB", "fullLogLine"), ("ZXTM-MIB", "ruleName")) if mibBuilder.loadTexts: rulenopersistence.setDescription('Rule selected an unknown session persistence class') rulelogmsginfo = NotificationType((1, 3, 6, 1, 4, 1, 7146, 1, 2, 15) + (0,51)).setObjects(("ZXTM-MIB", "fullLogLine"), ("ZXTM-MIB", "ruleName")) if mibBuilder.loadTexts: rulelogmsginfo.setDescription('Rule logged an info message using log.info') rulelogmsgwarn = NotificationType((1, 3, 6, 1, 4, 1, 7146, 1, 2, 15) + (0,52)).setObjects(("ZXTM-MIB", "fullLogLine"), ("ZXTM-MIB", "ruleName")) if mibBuilder.loadTexts: rulelogmsgwarn.setDescription('Rule logged a warning message using log.warn') rulelogmsgserious = NotificationType((1, 3, 6, 1, 4, 1, 7146, 1, 2, 15) + (0,53)).setObjects(("ZXTM-MIB", "fullLogLine"), ("ZXTM-MIB", "ruleName")) if mibBuilder.loadTexts: rulelogmsgserious.setDescription('Rule logged an error message using log.error') norate = NotificationType((1, 3, 6, 1, 4, 1, 7146, 1, 2, 15) + (0,54)).setObjects(("ZXTM-MIB", "fullLogLine"), ("ZXTM-MIB", "ruleName")) if mibBuilder.loadTexts: norate.setDescription('Rule selected an unknown rate shaping class') poolactivenodesunknown = NotificationType((1, 3, 6, 1, 4, 1, 7146, 1, 2, 15) + (0,55)).setObjects(("ZXTM-MIB", "fullLogLine"), ("ZXTM-MIB", "ruleName")) if mibBuilder.loadTexts: poolactivenodesunknown.setDescription('Rule references an unknown pool via pool.activenodes') datastorefull = NotificationType((1, 3, 6, 1, 4, 1, 7146, 1, 2, 15) + (0,56)).setObjects(("ZXTM-MIB", "fullLogLine")) if mibBuilder.loadTexts: datastorefull.setDescription('data.set() has run out of space') rulestreamerrortoomuch = NotificationType((1, 3, 6, 1, 4, 1, 7146, 1, 2, 15) + (0,210)).setObjects(("ZXTM-MIB", "fullLogLine"), ("ZXTM-MIB", "ruleName")) if mibBuilder.loadTexts: rulestreamerrortoomuch.setDescription('Rule supplied too much data in HTTP stream') rulestreamerrornotenough = NotificationType((1, 3, 6, 1, 4, 1, 7146, 1, 2, 15) + (0,211)).setObjects(("ZXTM-MIB", "fullLogLine"), ("ZXTM-MIB", "ruleName")) if mibBuilder.loadTexts: rulestreamerrornotenough.setDescription('Rule did not supply enough data in HTTP stream') rulestreamerrorprocessfailure = NotificationType((1, 3, 6, 1, 4, 1, 7146, 1, 2, 15) + (0,212)).setObjects(("ZXTM-MIB", "fullLogLine"), ("ZXTM-MIB", "ruleName")) if mibBuilder.loadTexts: rulestreamerrorprocessfailure.setDescription('Data supplied to HTTP stream could not be processed') rulestreamerrornotstarted = NotificationType((1, 3, 6, 1, 4, 1, 7146, 1, 2, 15) + (0,213)).setObjects(("ZXTM-MIB", "fullLogLine"), ("ZXTM-MIB", "ruleName")) if mibBuilder.loadTexts: rulestreamerrornotstarted.setDescription('Attempt to stream data or finish a stream before streaming had been initialized') rulestreamerrornotfinished = NotificationType((1, 3, 6, 1, 4, 1, 7146, 1, 2, 15) + (0,214)).setObjects(("ZXTM-MIB", "fullLogLine"), ("ZXTM-MIB", "ruleName")) if mibBuilder.loadTexts: rulestreamerrornotfinished.setDescription('Attempt to initialize HTTP stream before previous stream had finished') rulestreamerrorinternal = NotificationType((1, 3, 6, 1, 4, 1, 7146, 1, 2, 15) + (0,215)).setObjects(("ZXTM-MIB", "fullLogLine"), ("ZXTM-MIB", "ruleName")) if mibBuilder.loadTexts: rulestreamerrorinternal.setDescription('Internal error while processing HTTP stream') rulestreamerrorgetresponse = NotificationType((1, 3, 6, 1, 4, 1, 7146, 1, 2, 15) + (0,216)).setObjects(("ZXTM-MIB", "fullLogLine"), ("ZXTM-MIB", "ruleName")) if mibBuilder.loadTexts: rulestreamerrorgetresponse.setDescription('Attempt to use http.getResponse or http.getResponseBody after http.stream.startResponse') rulesinvalidrequestbody = NotificationType((1, 3, 6, 1, 4, 1, 7146, 1, 2, 15) + (0,217)).setObjects(("ZXTM-MIB", "fullLogLine"), ("ZXTM-MIB", "ruleName"), ("ZXTM-MIB", "virtualserverName")) if mibBuilder.loadTexts: rulesinvalidrequestbody.setDescription('Client sent invalid HTTP request body') serviceruleabort = NotificationType((1, 3, 6, 1, 4, 1, 7146, 1, 2, 15) + (0,218)).setObjects(("ZXTM-MIB", "fullLogLine"), ("ZXTM-MIB", "glbServiceName"), ("ZXTM-MIB", "ruleName")) if mibBuilder.loadTexts: serviceruleabort.setDescription('GLB service rule aborted during execution') servicerulelocunknown = NotificationType((1, 3, 6, 1, 4, 1, 7146, 1, 2, 15) + (0,219)).setObjects(("ZXTM-MIB", "fullLogLine"), ("ZXTM-MIB", "glbServiceName"), ("ZXTM-MIB", "ruleName")) if mibBuilder.loadTexts: servicerulelocunknown.setDescription('GLB service rule specified an unknown location') servicerulelocnotconfigured = NotificationType((1, 3, 6, 1, 4, 1, 7146, 1, 2, 15) + (0,220)).setObjects(("ZXTM-MIB", "fullLogLine"), ("ZXTM-MIB", "glbServiceName"), ("ZXTM-MIB", "ruleName")) if mibBuilder.loadTexts: servicerulelocnotconfigured.setDescription('GLB service rule specified a location that is not configured for the service') servicerulelocdead = NotificationType((1, 3, 6, 1, 4, 1, 7146, 1, 2, 15) + (0,221)).setObjects(("ZXTM-MIB", "fullLogLine"), ("ZXTM-MIB", "glbServiceName"), ("ZXTM-MIB", "ruleName")) if mibBuilder.loadTexts: servicerulelocdead.setDescription('GLB service rule specified a location that has either failed or been marked as draining in the service configuration') expired = NotificationType((1, 3, 6, 1, 4, 1, 7146, 1, 2, 15) + (0,57)).setObjects(("ZXTM-MIB", "fullLogLine"), ("ZXTM-MIB", "licensekeyName")) if mibBuilder.loadTexts: expired.setDescription('License key has expired') licensecorrupt = NotificationType((1, 3, 6, 1, 4, 1, 7146, 1, 2, 15) + (0,58)).setObjects(("ZXTM-MIB", "fullLogLine"), ("ZXTM-MIB", "licensekeyName")) if mibBuilder.loadTexts: licensecorrupt.setDescription('License key is corrupt') expiresoon = NotificationType((1, 3, 6, 1, 4, 1, 7146, 1, 2, 15) + (0,59)).setObjects(("ZXTM-MIB", "fullLogLine"), ("ZXTM-MIB", "licensekeyName")) if mibBuilder.loadTexts: expiresoon.setDescription('License key expires within 7 days') usinglicense = NotificationType((1, 3, 6, 1, 4, 1, 7146, 1, 2, 15) + (0,60)).setObjects(("ZXTM-MIB", "fullLogLine"), ("ZXTM-MIB", "licensekeyName")) if mibBuilder.loadTexts: usinglicense.setDescription('Using license key') licenseclustertoobig = NotificationType((1, 3, 6, 1, 4, 1, 7146, 1, 2, 15) + (0,61)).setObjects(("ZXTM-MIB", "fullLogLine")) if mibBuilder.loadTexts: licenseclustertoobig.setDescription('Cluster size exceeds license key limit') unlicensed = NotificationType((1, 3, 6, 1, 4, 1, 7146, 1, 2, 15) + (0,62)).setObjects(("ZXTM-MIB", "fullLogLine")) if mibBuilder.loadTexts: unlicensed.setDescription('Started without a license') usingdevlicense = NotificationType((1, 3, 6, 1, 4, 1, 7146, 1, 2, 15) + (0,63)).setObjects(("ZXTM-MIB", "fullLogLine")) if mibBuilder.loadTexts: usingdevlicense.setDescription('Using a development license') morememallowed = NotificationType((1, 3, 6, 1, 4, 1, 7146, 1, 2, 15) + (0,124)).setObjects(("ZXTM-MIB", "fullLogLine")) if mibBuilder.loadTexts: morememallowed.setDescription('License allows more memory for caching') lessmemallowed = NotificationType((1, 3, 6, 1, 4, 1, 7146, 1, 2, 15) + (0,125)).setObjects(("ZXTM-MIB", "fullLogLine")) if mibBuilder.loadTexts: lessmemallowed.setDescription('License allows less memory for caching') cachesizereduced = NotificationType((1, 3, 6, 1, 4, 1, 7146, 1, 2, 15) + (0,123)).setObjects(("ZXTM-MIB", "fullLogLine")) if mibBuilder.loadTexts: cachesizereduced.setDescription('Configured cache size exceeds license limit, only using amount allowed by license') tpslimited = NotificationType((1, 3, 6, 1, 4, 1, 7146, 1, 2, 15) + (0,134)).setObjects(("ZXTM-MIB", "fullLogLine")) if mibBuilder.loadTexts: tpslimited.setDescription('License key transactions-per-second limit has been hit') ssltpslimited = NotificationType((1, 3, 6, 1, 4, 1, 7146, 1, 2, 15) + (0,135)).setObjects(("ZXTM-MIB", "fullLogLine")) if mibBuilder.loadTexts: ssltpslimited.setDescription('License key SSL transactions-per-second limit has been hit') bwlimited = NotificationType((1, 3, 6, 1, 4, 1, 7146, 1, 2, 15) + (0,136)).setObjects(("ZXTM-MIB", "fullLogLine")) if mibBuilder.loadTexts: bwlimited.setDescription('License key bandwidth limit has been hit') licensetoomanylocations = NotificationType((1, 3, 6, 1, 4, 1, 7146, 1, 2, 15) + (0,137)).setObjects(("ZXTM-MIB", "fullLogLine")) if mibBuilder.loadTexts: licensetoomanylocations.setDescription('A location has been disabled because you have exceeded the licence limit') autoscalinglicenseerror = NotificationType((1, 3, 6, 1, 4, 1, 7146, 1, 2, 15) + (0,175)).setObjects(("ZXTM-MIB", "fullLogLine")) if mibBuilder.loadTexts: autoscalinglicenseerror.setDescription('Autoscaling not permitted by licence key') autoscalinglicenseenabled = NotificationType((1, 3, 6, 1, 4, 1, 7146, 1, 2, 15) + (0,176)).setObjects(("ZXTM-MIB", "fullLogLine")) if mibBuilder.loadTexts: autoscalinglicenseenabled.setDescription('Autoscaling support has been enabled') autoscalinglicensedisabled = NotificationType((1, 3, 6, 1, 4, 1, 7146, 1, 2, 15) + (0,177)).setObjects(("ZXTM-MIB", "fullLogLine")) if mibBuilder.loadTexts: autoscalinglicensedisabled.setDescription('Autoscaling support has been disabled') analyticslicenseenabled = NotificationType((1, 3, 6, 1, 4, 1, 7146, 1, 2, 15) + (0,180)).setObjects(("ZXTM-MIB", "fullLogLine")) if mibBuilder.loadTexts: analyticslicenseenabled.setDescription('Realtime Analytics support has been enabled') analyticslicensedisabled = NotificationType((1, 3, 6, 1, 4, 1, 7146, 1, 2, 15) + (0,181)).setObjects(("ZXTM-MIB", "fullLogLine")) if mibBuilder.loadTexts: analyticslicensedisabled.setDescription('Realtime Analytics support has been disabled') poolnonodes = NotificationType((1, 3, 6, 1, 4, 1, 7146, 1, 2, 15) + (0,64)).setObjects(("ZXTM-MIB", "fullLogLine"), ("ZXTM-MIB", "poolName")) if mibBuilder.loadTexts: poolnonodes.setDescription('Pool configuration contains no valid backend nodes') poolok = NotificationType((1, 3, 6, 1, 4, 1, 7146, 1, 2, 15) + (0,65)).setObjects(("ZXTM-MIB", "fullLogLine"), ("ZXTM-MIB", "poolName")) if mibBuilder.loadTexts: poolok.setDescription('Pool now has working nodes') pooldied = NotificationType((1, 3, 6, 1, 4, 1, 7146, 1, 2, 15) + (0,66)).setObjects(("ZXTM-MIB", "fullLogLine"), ("ZXTM-MIB", "poolName")) if mibBuilder.loadTexts: pooldied.setDescription('Pool has no back-end nodes responding') noderesolvefailure = NotificationType((1, 3, 6, 1, 4, 1, 7146, 1, 2, 15) + (0,67)).setObjects(("ZXTM-MIB", "fullLogLine"), ("ZXTM-MIB", "poolName")) if mibBuilder.loadTexts: noderesolvefailure.setDescription('Failed to resolve node address') noderesolvemultiple = NotificationType((1, 3, 6, 1, 4, 1, 7146, 1, 2, 15) + (0,68)).setObjects(("ZXTM-MIB", "fullLogLine"), ("ZXTM-MIB", "poolName")) if mibBuilder.loadTexts: noderesolvemultiple.setDescription('Node resolves to multiple IP addresses') nodeworking = NotificationType((1, 3, 6, 1, 4, 1, 7146, 1, 2, 15) + (0,69)).setObjects(("ZXTM-MIB", "fullLogLine"), ("ZXTM-MIB", "perPoolNodePoolName"), ("ZXTM-MIB", "perPoolNodeNodeAddressType"), ("ZXTM-MIB", "perPoolNodeNodeAddress"), ("ZXTM-MIB", "perPoolNodeNodePort")) if mibBuilder.loadTexts: nodeworking.setDescription('Node is working again') nostarttls = NotificationType((1, 3, 6, 1, 4, 1, 7146, 1, 2, 15) + (0,70)).setObjects(("ZXTM-MIB", "fullLogLine"), ("ZXTM-MIB", "perPoolNodePoolName"), ("ZXTM-MIB", "perPoolNodeNodeAddressType"), ("ZXTM-MIB", "perPoolNodeNodeAddress"), ("ZXTM-MIB", "perPoolNodeNodePort")) if mibBuilder.loadTexts: nostarttls.setDescription("Node doesn't provide STARTTLS support") nodefail = NotificationType((1, 3, 6, 1, 4, 1, 7146, 1, 2, 15) + (0,71)).setObjects(("ZXTM-MIB", "fullLogLine"), ("ZXTM-MIB", "perPoolNodePoolName"), ("ZXTM-MIB", "perPoolNodeNodeAddressType"), ("ZXTM-MIB", "perPoolNodeNodeAddress"), ("ZXTM-MIB", "perPoolNodeNodePort")) if mibBuilder.loadTexts: nodefail.setDescription('Node has failed') starttlsinvalid = NotificationType((1, 3, 6, 1, 4, 1, 7146, 1, 2, 15) + (0,72)).setObjects(("ZXTM-MIB", "fullLogLine"), ("ZXTM-MIB", "perPoolNodePoolName"), ("ZXTM-MIB", "perPoolNodeNodeAddressType"), ("ZXTM-MIB", "perPoolNodeNodeAddress"), ("ZXTM-MIB", "perPoolNodeNodePort")) if mibBuilder.loadTexts: starttlsinvalid.setDescription('Node returned invalid STARTTLS response') ehloinvalid = NotificationType((1, 3, 6, 1, 4, 1, 7146, 1, 2, 15) + (0,73)).setObjects(("ZXTM-MIB", "fullLogLine"), ("ZXTM-MIB", "perPoolNodePoolName"), ("ZXTM-MIB", "perPoolNodeNodeAddressType"), ("ZXTM-MIB", "perPoolNodeNodeAddress"), ("ZXTM-MIB", "perPoolNodeNodePort")) if mibBuilder.loadTexts: ehloinvalid.setDescription('Node returned invalid EHLO response') usedcredsdeleted = NotificationType((1, 3, 6, 1, 4, 1, 7146, 1, 2, 15) + (0,126)).setObjects(("ZXTM-MIB", "fullLogLine"), ("ZXTM-MIB", "cloudcredentialsName")) if mibBuilder.loadTexts: usedcredsdeleted.setDescription('A Cloud Credentials object has been deleted but it was still in use') autoscalestatusupdateerror = NotificationType((1, 3, 6, 1, 4, 1, 7146, 1, 2, 15) + (0,129)).setObjects(("ZXTM-MIB", "fullLogLine"), ("ZXTM-MIB", "cloudcredentialsName")) if mibBuilder.loadTexts: autoscalestatusupdateerror.setDescription('An API call made by the autoscaler process has reported an error') autoscaleresponseparseerror = NotificationType((1, 3, 6, 1, 4, 1, 7146, 1, 2, 15) + (0,159)).setObjects(("ZXTM-MIB", "fullLogLine"), ("ZXTM-MIB", "cloudcredentialsName")) if mibBuilder.loadTexts: autoscaleresponseparseerror.setDescription('An API call made by the autoscaler process has returned a response that could not be parsed') autoscalingchangeprocessfailure = NotificationType((1, 3, 6, 1, 4, 1, 7146, 1, 2, 15) + (0,182)).setObjects(("ZXTM-MIB", "fullLogLine"), ("ZXTM-MIB", "poolName")) if mibBuilder.loadTexts: autoscalingchangeprocessfailure.setDescription('An API process that should have created or destroyed a node has failed to produce the expected result') autoscalewrongimageid = NotificationType((1, 3, 6, 1, 4, 1, 7146, 1, 2, 15) + (0,183)).setObjects(("ZXTM-MIB", "fullLogLine"), ("ZXTM-MIB", "poolName")) if mibBuilder.loadTexts: autoscalewrongimageid.setDescription('A node created by the autoscaler has the wrong imageid') autoscalewrongname = NotificationType((1, 3, 6, 1, 4, 1, 7146, 1, 2, 15) + (0,184)).setObjects(("ZXTM-MIB", "fullLogLine"), ("ZXTM-MIB", "poolName")) if mibBuilder.loadTexts: autoscalewrongname.setDescription('A node created by the autoscaler has a non-matching name') autoscalewrongsizeid = NotificationType((1, 3, 6, 1, 4, 1, 7146, 1, 2, 15) + (0,185)).setObjects(("ZXTM-MIB", "fullLogLine"), ("ZXTM-MIB", "poolName")) if mibBuilder.loadTexts: autoscalewrongsizeid.setDescription('A node created by the autoscaler has the wrong sizeid') apistatusprocesshanging = NotificationType((1, 3, 6, 1, 4, 1, 7146, 1, 2, 15) + (0,127)).setObjects(("ZXTM-MIB", "fullLogLine"), ("ZXTM-MIB", "cloudcredentialsName")) if mibBuilder.loadTexts: apistatusprocesshanging.setDescription('A cloud API process querying changes to cloud instances is hanging') autonodedestructioncomplete = NotificationType((1, 3, 6, 1, 4, 1, 7146, 1, 2, 15) + (0,138)).setObjects(("ZXTM-MIB", "fullLogLine"), ("ZXTM-MIB", "poolName")) if mibBuilder.loadTexts: autonodedestructioncomplete.setDescription('The destruction of a node in an autoscaled pool is now complete') autonodeexisted = NotificationType((1, 3, 6, 1, 4, 1, 7146, 1, 2, 15) + (0,139)).setObjects(("ZXTM-MIB", "fullLogLine"), ("ZXTM-MIB", "poolName")) if mibBuilder.loadTexts: autonodeexisted.setDescription("IP address of newly created instance already existed in pool's node list") autoscaledpooltoosmall = NotificationType((1, 3, 6, 1, 4, 1, 7146, 1, 2, 15) + (0,140)).setObjects(("ZXTM-MIB", "fullLogLine"), ("ZXTM-MIB", "poolName")) if mibBuilder.loadTexts: autoscaledpooltoosmall.setDescription('Minimum size undercut - growing') autoscaleinvalidargforcreatenode = NotificationType((1, 3, 6, 1, 4, 1, 7146, 1, 2, 15) + (0,141)).setObjects(("ZXTM-MIB", "fullLogLine"), ("ZXTM-MIB", "poolName")) if mibBuilder.loadTexts: autoscaleinvalidargforcreatenode.setDescription("The 'imageid' was empty when attempting to create a node in an autoscaled pool") autonodedisappeared = NotificationType((1, 3, 6, 1, 4, 1, 7146, 1, 2, 15) + (0,142)).setObjects(("ZXTM-MIB", "fullLogLine"), ("ZXTM-MIB", "poolName")) if mibBuilder.loadTexts: autonodedisappeared.setDescription('A node in an autoscaled pool has disappeared from the cloud') autoscaledpoolrefractory = NotificationType((1, 3, 6, 1, 4, 1, 7146, 1, 2, 15) + (0,143)).setObjects(("ZXTM-MIB", "fullLogLine"), ("ZXTM-MIB", "poolName")) if mibBuilder.loadTexts: autoscaledpoolrefractory.setDescription('An autoscaled pool is now refractory') cannotshrinkemptypool = NotificationType((1, 3, 6, 1, 4, 1, 7146, 1, 2, 15) + (0,144)).setObjects(("ZXTM-MIB", "fullLogLine"), ("ZXTM-MIB", "poolName")) if mibBuilder.loadTexts: cannotshrinkemptypool.setDescription('Attempt to scale down a pool that only had pending nodes or none at all') autoscalinghysteresiscantgrow = NotificationType((1, 3, 6, 1, 4, 1, 7146, 1, 2, 15) + (0,145)).setObjects(("ZXTM-MIB", "fullLogLine"), ("ZXTM-MIB", "poolName")) if mibBuilder.loadTexts: autoscalinghysteresiscantgrow.setDescription('An autoscaled pool is waiting to grow') autonodecreationcomplete = NotificationType((1, 3, 6, 1, 4, 1, 7146, 1, 2, 15) + (0,146)).setObjects(("ZXTM-MIB", "fullLogLine"), ("ZXTM-MIB", "poolName")) if mibBuilder.loadTexts: autonodecreationcomplete.setDescription('The creation of a new node requested by an autoscaled pool is now complete') autonodestatuschange = NotificationType((1, 3, 6, 1, 4, 1, 7146, 1, 2, 15) + (0,147)).setObjects(("ZXTM-MIB", "fullLogLine"), ("ZXTM-MIB", "poolName")) if mibBuilder.loadTexts: autonodestatuschange.setDescription('The status of a node in an autoscaled pool has changed') autoscalinghysteresiscantshrink = NotificationType((1, 3, 6, 1, 4, 1, 7146, 1, 2, 15) + (0,148)).setObjects(("ZXTM-MIB", "fullLogLine"), ("ZXTM-MIB", "poolName")) if mibBuilder.loadTexts: autoscalinghysteresiscantshrink.setDescription('An autoscaled pool is waiting to shrink') autoscalingpoolstatechange = NotificationType((1, 3, 6, 1, 4, 1, 7146, 1, 2, 15) + (0,149)).setObjects(("ZXTM-MIB", "fullLogLine"), ("ZXTM-MIB", "poolName")) if mibBuilder.loadTexts: autoscalingpoolstatechange.setDescription("An autoscaled pool's state has changed") autonodedestroyed = NotificationType((1, 3, 6, 1, 4, 1, 7146, 1, 2, 15) + (0,128)).setObjects(("ZXTM-MIB", "fullLogLine"), ("ZXTM-MIB", "poolName")) if mibBuilder.loadTexts: autonodedestroyed.setDescription('A cloud API call to destroy a node has been started') autonodecreationstarted = NotificationType((1, 3, 6, 1, 4, 1, 7146, 1, 2, 15) + (0,165)).setObjects(("ZXTM-MIB", "fullLogLine"), ("ZXTM-MIB", "poolName")) if mibBuilder.loadTexts: autonodecreationstarted.setDescription('Creation of new node instigated') autoscaleinvalidargfordeletenode = NotificationType((1, 3, 6, 1, 4, 1, 7146, 1, 2, 15) + (0,166)).setObjects(("ZXTM-MIB", "fullLogLine"), ("ZXTM-MIB", "poolName")) if mibBuilder.loadTexts: autoscaleinvalidargfordeletenode.setDescription("'unique id' was empty when attempting to destroy a node in an autoscaled pool") autoscalinghitroof = NotificationType((1, 3, 6, 1, 4, 1, 7146, 1, 2, 15) + (0,167)).setObjects(("ZXTM-MIB", "fullLogLine"), ("ZXTM-MIB", "poolName")) if mibBuilder.loadTexts: autoscalinghitroof.setDescription('Maximum size reached by autoscaled pool, cannot grow further') autoscalinghitfloor = NotificationType((1, 3, 6, 1, 4, 1, 7146, 1, 2, 15) + (0,168)).setObjects(("ZXTM-MIB", "fullLogLine"), ("ZXTM-MIB", "poolName")) if mibBuilder.loadTexts: autoscalinghitfloor.setDescription('Minimum size reached, cannot shrink further') apichangeprocesshanging = NotificationType((1, 3, 6, 1, 4, 1, 7146, 1, 2, 15) + (0,169)).setObjects(("ZXTM-MIB", "fullLogLine"), ("ZXTM-MIB", "poolName")) if mibBuilder.loadTexts: apichangeprocesshanging.setDescription('API change process still running after refractory period is over') autoscaledpooltoobig = NotificationType((1, 3, 6, 1, 4, 1, 7146, 1, 2, 15) + (0,170)).setObjects(("ZXTM-MIB", "fullLogLine"), ("ZXTM-MIB", "poolName")) if mibBuilder.loadTexts: autoscaledpooltoobig.setDescription('Over maximum size - shrinking') autoscalingprocesstimedout = NotificationType((1, 3, 6, 1, 4, 1, 7146, 1, 2, 15) + (0,171)).setObjects(("ZXTM-MIB", "fullLogLine"), ("ZXTM-MIB", "cloudcredentialsName")) if mibBuilder.loadTexts: autoscalingprocesstimedout.setDescription('A cloud API process has timed out') autoscalingdisabled = NotificationType((1, 3, 6, 1, 4, 1, 7146, 1, 2, 15) + (0,172)).setObjects(("ZXTM-MIB", "fullLogLine"), ("ZXTM-MIB", "poolName")) if mibBuilder.loadTexts: autoscalingdisabled.setDescription('Autoscaling for a pool has been disabled due to errors communicating with the cloud API') autoscalednodecontested = NotificationType((1, 3, 6, 1, 4, 1, 7146, 1, 2, 15) + (0,163)).setObjects(("ZXTM-MIB", "fullLogLine"), ("ZXTM-MIB", "poolName")) if mibBuilder.loadTexts: autoscalednodecontested.setDescription('Two pools are trying to use the same instance') autoscalepoolconfupdate = NotificationType((1, 3, 6, 1, 4, 1, 7146, 1, 2, 15) + (0,164)).setObjects(("ZXTM-MIB", "fullLogLine"), ("ZXTM-MIB", "poolName")) if mibBuilder.loadTexts: autoscalepoolconfupdate.setDescription('A pool config file has been updated by the autoscaler process') autoscalingresuscitatepool = NotificationType((1, 3, 6, 1, 4, 1, 7146, 1, 2, 15) + (0,188)).setObjects(("ZXTM-MIB", "fullLogLine"), ("ZXTM-MIB", "poolName")) if mibBuilder.loadTexts: autoscalingresuscitatepool.setDescription('An autoscaled pool has failed completely') flipperraiselocalworking = NotificationType((1, 3, 6, 1, 4, 1, 7146, 1, 2, 15) + (0,74)).setObjects(("ZXTM-MIB", "fullLogLine"), ("ZXTM-MIB", "trafficIPInet46AddressType"), ("ZXTM-MIB", "trafficIPInet46Address")) if mibBuilder.loadTexts: flipperraiselocalworking.setDescription('Raising Traffic IP Address; local machine is working') flipperraiseothersdead = NotificationType((1, 3, 6, 1, 4, 1, 7146, 1, 2, 15) + (0,75)).setObjects(("ZXTM-MIB", "fullLogLine"), ("ZXTM-MIB", "trafficIPInet46AddressType"), ("ZXTM-MIB", "trafficIPInet46Address")) if mibBuilder.loadTexts: flipperraiseothersdead.setDescription('Raising Traffic IP Address; other machines have failed') flipperraiseosdrop = NotificationType((1, 3, 6, 1, 4, 1, 7146, 1, 2, 15) + (0,76)).setObjects(("ZXTM-MIB", "fullLogLine"), ("ZXTM-MIB", "trafficIPInet46AddressType"), ("ZXTM-MIB", "trafficIPInet46Address")) if mibBuilder.loadTexts: flipperraiseosdrop.setDescription('Raising Traffic IP Address; Operating System had dropped this IP address') dropipinfo = NotificationType((1, 3, 6, 1, 4, 1, 7146, 1, 2, 15) + (0,77)).setObjects(("ZXTM-MIB", "fullLogLine"), ("ZXTM-MIB", "trafficIPInet46AddressType"), ("ZXTM-MIB", "trafficIPInet46Address")) if mibBuilder.loadTexts: dropipinfo.setDescription('Dropping Traffic IP Address due to a configuration change or traffic manager recovery') dropipwarn = NotificationType((1, 3, 6, 1, 4, 1, 7146, 1, 2, 15) + (0,78)).setObjects(("ZXTM-MIB", "fullLogLine"), ("ZXTM-MIB", "trafficIPInet46AddressType"), ("ZXTM-MIB", "trafficIPInet46Address")) if mibBuilder.loadTexts: dropipwarn.setDescription('Dropping Traffic IP Address due to an error') flipperdadreraise = NotificationType((1, 3, 6, 1, 4, 1, 7146, 1, 2, 15) + (0,79)).setObjects(("ZXTM-MIB", "fullLogLine"), ("ZXTM-MIB", "trafficIPInet46AddressType"), ("ZXTM-MIB", "trafficIPInet46Address")) if mibBuilder.loadTexts: flipperdadreraise.setDescription('Re-raising Traffic IP Address; Operating system did not fully raise the address') flipperipexists = NotificationType((1, 3, 6, 1, 4, 1, 7146, 1, 2, 15) + (0,80)).setObjects(("ZXTM-MIB", "fullLogLine"), ("ZXTM-MIB", "trafficIPInet46AddressType"), ("ZXTM-MIB", "trafficIPInet46Address")) if mibBuilder.loadTexts: flipperipexists.setDescription('Failed to raise Traffic IP Address; the address exists elsewhere on your network and cannot be raised') triggersummary = NotificationType((1, 3, 6, 1, 4, 1, 7146, 1, 2, 15) + (0,81)).setObjects(("ZXTM-MIB", "fullLogLine"), ("ZXTM-MIB", "serviceProtName")) if mibBuilder.loadTexts: triggersummary.setDescription('Summary of recent service protection events') slmclasslimitexceeded = NotificationType((1, 3, 6, 1, 4, 1, 7146, 1, 2, 15) + (0,82)).setObjects(("ZXTM-MIB", "fullLogLine")) if mibBuilder.loadTexts: slmclasslimitexceeded.setDescription('SLM shared memory limit exceeded') slmrecoveredwarn = NotificationType((1, 3, 6, 1, 4, 1, 7146, 1, 2, 15) + (0,83)).setObjects(("ZXTM-MIB", "fullLogLine"), ("ZXTM-MIB", "serviceLevelName")) if mibBuilder.loadTexts: slmrecoveredwarn.setDescription('SLM has recovered') slmrecoveredserious = NotificationType((1, 3, 6, 1, 4, 1, 7146, 1, 2, 15) + (0,84)).setObjects(("ZXTM-MIB", "fullLogLine"), ("ZXTM-MIB", "serviceLevelName")) if mibBuilder.loadTexts: slmrecoveredserious.setDescription('SLM has risen above the serious threshold') slmfallenbelowwarn = NotificationType((1, 3, 6, 1, 4, 1, 7146, 1, 2, 15) + (0,85)).setObjects(("ZXTM-MIB", "fullLogLine"), ("ZXTM-MIB", "serviceLevelName")) if mibBuilder.loadTexts: slmfallenbelowwarn.setDescription('SLM has fallen below warning threshold') slmfallenbelowserious = NotificationType((1, 3, 6, 1, 4, 1, 7146, 1, 2, 15) + (0,86)).setObjects(("ZXTM-MIB", "fullLogLine"), ("ZXTM-MIB", "serviceLevelName")) if mibBuilder.loadTexts: slmfallenbelowserious.setDescription('SLM has fallen below serious threshold') vscrloutofdate = NotificationType((1, 3, 6, 1, 4, 1, 7146, 1, 2, 15) + (0,87)).setObjects(("ZXTM-MIB", "fullLogLine")) if mibBuilder.loadTexts: vscrloutofdate.setDescription('CRL for a Certificate Authority is out of date') vsstart = NotificationType((1, 3, 6, 1, 4, 1, 7146, 1, 2, 15) + (0,88)).setObjects(("ZXTM-MIB", "fullLogLine"), ("ZXTM-MIB", "virtualserverName")) if mibBuilder.loadTexts: vsstart.setDescription('Virtual server started') vsstop = NotificationType((1, 3, 6, 1, 4, 1, 7146, 1, 2, 15) + (0,89)).setObjects(("ZXTM-MIB", "fullLogLine"), ("ZXTM-MIB", "virtualserverName")) if mibBuilder.loadTexts: vsstop.setDescription('Virtual server stopped') privkeyok = NotificationType((1, 3, 6, 1, 4, 1, 7146, 1, 2, 15) + (0,90)).setObjects(("ZXTM-MIB", "fullLogLine"), ("ZXTM-MIB", "virtualserverName")) if mibBuilder.loadTexts: privkeyok.setDescription('Private key now OK (hardware available)') ssldrop = NotificationType((1, 3, 6, 1, 4, 1, 7146, 1, 2, 15) + (0,91)).setObjects(("ZXTM-MIB", "fullLogLine"), ("ZXTM-MIB", "virtualserverName")) if mibBuilder.loadTexts: ssldrop.setDescription('Request(s) received while SSL configuration invalid, connection closed') vslogwritefail = NotificationType((1, 3, 6, 1, 4, 1, 7146, 1, 2, 15) + (0,92)).setObjects(("ZXTM-MIB", "fullLogLine"), ("ZXTM-MIB", "virtualserverName")) if mibBuilder.loadTexts: vslogwritefail.setDescription('Failed to write log file for virtual server') vssslcertexpired = NotificationType((1, 3, 6, 1, 4, 1, 7146, 1, 2, 15) + (0,93)).setObjects(("ZXTM-MIB", "fullLogLine"), ("ZXTM-MIB", "virtualserverName")) if mibBuilder.loadTexts: vssslcertexpired.setDescription('Public SSL certificate expired') vssslcerttoexpire = NotificationType((1, 3, 6, 1, 4, 1, 7146, 1, 2, 15) + (0,94)).setObjects(("ZXTM-MIB", "fullLogLine"), ("ZXTM-MIB", "virtualserverName")) if mibBuilder.loadTexts: vssslcerttoexpire.setDescription('Public SSL certificate will expire within seven days') vscacertexpired = NotificationType((1, 3, 6, 1, 4, 1, 7146, 1, 2, 15) + (0,95)).setObjects(("ZXTM-MIB", "fullLogLine"), ("ZXTM-MIB", "virtualserverName")) if mibBuilder.loadTexts: vscacertexpired.setDescription('Certificate Authority certificate expired') vscacerttoexpire = NotificationType((1, 3, 6, 1, 4, 1, 7146, 1, 2, 15) + (0,96)).setObjects(("ZXTM-MIB", "fullLogLine"), ("ZXTM-MIB", "virtualserverName")) if mibBuilder.loadTexts: vscacerttoexpire.setDescription('Certificate Authority certificate will expire within seven days') glbmissingips = NotificationType((1, 3, 6, 1, 4, 1, 7146, 1, 2, 15) + (0,150)).setObjects(("ZXTM-MIB", "fullLogLine")) if mibBuilder.loadTexts: glbmissingips.setDescription('A DNS Query returned IP addresses that are not configured in any location') glbdeadlocmissingips = NotificationType((1, 3, 6, 1, 4, 1, 7146, 1, 2, 15) + (0,158)).setObjects(("ZXTM-MIB", "fullLogLine")) if mibBuilder.loadTexts: glbdeadlocmissingips.setDescription('A DNS Query returned IP addresses that are not configured for any location that is currently alive') glbnolocations = NotificationType((1, 3, 6, 1, 4, 1, 7146, 1, 2, 15) + (0,151)).setObjects(("ZXTM-MIB", "fullLogLine")) if mibBuilder.loadTexts: glbnolocations.setDescription('No valid location could be chosen for Global Load Balancing') locationmonitorok = NotificationType((1, 3, 6, 1, 4, 1, 7146, 1, 2, 15) + (0,152)).setObjects(("ZXTM-MIB", "fullLogLine"), ("ZXTM-MIB", "locationName"), ("ZXTM-MIB", "glbServiceName")) if mibBuilder.loadTexts: locationmonitorok.setDescription('A monitor has indicated this location is now working') locationmonitorfail = NotificationType((1, 3, 6, 1, 4, 1, 7146, 1, 2, 15) + (0,153)).setObjects(("ZXTM-MIB", "fullLogLine"), ("ZXTM-MIB", "locationName"), ("ZXTM-MIB", "glbServiceName")) if mibBuilder.loadTexts: locationmonitorfail.setDescription('A monitor has detected a failure in this location') locationok = NotificationType((1, 3, 6, 1, 4, 1, 7146, 1, 2, 15) + (0,154)).setObjects(("ZXTM-MIB", "fullLogLine"), ("ZXTM-MIB", "locationName"), ("ZXTM-MIB", "glbServiceName")) if mibBuilder.loadTexts: locationok.setDescription('Location is now working for GLB Service') locationfail = NotificationType((1, 3, 6, 1, 4, 1, 7146, 1, 2, 15) + (0,155)).setObjects(("ZXTM-MIB", "fullLogLine"), ("ZXTM-MIB", "locationName"), ("ZXTM-MIB", "glbServiceName")) if mibBuilder.loadTexts: locationfail.setDescription('Location has failed for GLB Service') locationsoapok = NotificationType((1, 3, 6, 1, 4, 1, 7146, 1, 2, 15) + (0,156)).setObjects(("ZXTM-MIB", "fullLogLine"), ("ZXTM-MIB", "locationName"), ("ZXTM-MIB", "glbServiceName")) if mibBuilder.loadTexts: locationsoapok.setDescription('An external SOAP agent indicates this location is now working') locationsoapfail = NotificationType((1, 3, 6, 1, 4, 1, 7146, 1, 2, 15) + (0,157)).setObjects(("ZXTM-MIB", "fullLogLine"), ("ZXTM-MIB", "locationName"), ("ZXTM-MIB", "glbServiceName")) if mibBuilder.loadTexts: locationsoapfail.setDescription('An external SOAP agent has detected a failure in this location') glbnewmaster = NotificationType((1, 3, 6, 1, 4, 1, 7146, 1, 2, 15) + (0,160)).setObjects(("ZXTM-MIB", "fullLogLine"), ("ZXTM-MIB", "locationName"), ("ZXTM-MIB", "glbServiceName")) if mibBuilder.loadTexts: glbnewmaster.setDescription('A location has been set as master for a GLB service') glblogwritefail = NotificationType((1, 3, 6, 1, 4, 1, 7146, 1, 2, 15) + (0,161)).setObjects(("ZXTM-MIB", "fullLogLine"), ("ZXTM-MIB", "glbServiceName")) if mibBuilder.loadTexts: glblogwritefail.setDescription('Failed to write log file for GLB service') glbfailalter = NotificationType((1, 3, 6, 1, 4, 1, 7146, 1, 2, 15) + (0,162)).setObjects(("ZXTM-MIB", "fullLogLine"), ("ZXTM-MIB", "glbServiceName")) if mibBuilder.loadTexts: glbfailalter.setDescription('Failed to alter DNS packet for global load balancing') glbservicedied = NotificationType((1, 3, 6, 1, 4, 1, 7146, 1, 2, 15) + (0,190)).setObjects(("ZXTM-MIB", "fullLogLine"), ("ZXTM-MIB", "glbServiceName")) if mibBuilder.loadTexts: glbservicedied.setDescription('GLB Service has no working locations') glbserviceok = NotificationType((1, 3, 6, 1, 4, 1, 7146, 1, 2, 15) + (0,191)).setObjects(("ZXTM-MIB", "fullLogLine"), ("ZXTM-MIB", "glbServiceName")) if mibBuilder.loadTexts: glbserviceok.setDescription('GLB Service has recovered') locmovemachine = NotificationType((1, 3, 6, 1, 4, 1, 7146, 1, 2, 15) + (0,173)).setObjects(("ZXTM-MIB", "fullLogLine"), ("ZXTM-MIB", "locationName"), ("ZXTM-MIB", "zxtmName")) if mibBuilder.loadTexts: locmovemachine.setDescription('Machine now in location') locempty = NotificationType((1, 3, 6, 1, 4, 1, 7146, 1, 2, 15) + (0,174)).setObjects(("ZXTM-MIB", "fullLogLine"), ("ZXTM-MIB", "locationName")) if mibBuilder.loadTexts: locempty.setDescription('Location no longer contains any machines') maxclientbufferdrop = NotificationType((1, 3, 6, 1, 4, 1, 7146, 1, 2, 15) + (0,97)).setObjects(("ZXTM-MIB", "fullLogLine")) if mibBuilder.loadTexts: maxclientbufferdrop.setDescription('Dropped connection, request exceeded max_client_buffer limit') respcompfail = NotificationType((1, 3, 6, 1, 4, 1, 7146, 1, 2, 15) + (0,98)).setObjects(("ZXTM-MIB", "fullLogLine")) if mibBuilder.loadTexts: respcompfail.setDescription('Error compressing HTTP response') responsetoolarge = NotificationType((1, 3, 6, 1, 4, 1, 7146, 1, 2, 15) + (0,99)).setObjects(("ZXTM-MIB", "fullLogLine")) if mibBuilder.loadTexts: responsetoolarge.setDescription('Response headers from webserver too large') sipstreamnoports = NotificationType((1, 3, 6, 1, 4, 1, 7146, 1, 2, 15) + (0,100)).setObjects(("ZXTM-MIB", "fullLogLine")) if mibBuilder.loadTexts: sipstreamnoports.setDescription('No suitable ports available for streaming data connection') rtspstreamnoports = NotificationType((1, 3, 6, 1, 4, 1, 7146, 1, 2, 15) + (0,101)).setObjects(("ZXTM-MIB", "fullLogLine")) if mibBuilder.loadTexts: rtspstreamnoports.setDescription('No suitable ports available for streaming data connection') geodataloadfail = NotificationType((1, 3, 6, 1, 4, 1, 7146, 1, 2, 15) + (0,102)).setObjects(("ZXTM-MIB", "fullLogLine")) if mibBuilder.loadTexts: geodataloadfail.setDescription('Failed to load geolocation data') poolpersistencemismatch = NotificationType((1, 3, 6, 1, 4, 1, 7146, 1, 2, 15) + (0,103)).setObjects(("ZXTM-MIB", "fullLogLine")) if mibBuilder.loadTexts: poolpersistencemismatch.setDescription("Pool uses a session persistence class that does not work with this virtual server's protocol") connerror = NotificationType((1, 3, 6, 1, 4, 1, 7146, 1, 2, 15) + (0,104)).setObjects(("ZXTM-MIB", "fullLogLine"), ("ZXTM-MIB", "virtualserverName")) if mibBuilder.loadTexts: connerror.setDescription('A protocol error has occurred') connfail = NotificationType((1, 3, 6, 1, 4, 1, 7146, 1, 2, 15) + (0,105)).setObjects(("ZXTM-MIB", "fullLogLine"), ("ZXTM-MIB", "virtualserverName")) if mibBuilder.loadTexts: connfail.setDescription('A socket connection failure has occurred') badcontentlen = NotificationType((1, 3, 6, 1, 4, 1, 7146, 1, 2, 15) + (0,106)).setObjects(("ZXTM-MIB", "fullLogLine"), ("ZXTM-MIB", "poolName")) if mibBuilder.loadTexts: badcontentlen.setDescription('HTTP response contained an invalid Content-Length header') logfiledeleted = NotificationType((1, 3, 6, 1, 4, 1, 7146, 1, 2, 15) + (0,115)).setObjects(("ZXTM-MIB", "fullLogLine"), ("ZXTM-MIB", "virtualserverName")) if mibBuilder.loadTexts: logfiledeleted.setDescription('A virtual server request log file was deleted (Zeus Appliances only)') license_graceperiodexpired = NotificationType((1, 3, 6, 1, 4, 1, 7146, 1, 2, 15) + (0,116)).setLabel("license-graceperiodexpired").setObjects(("ZXTM-MIB", "fullLogLine"), ("ZXTM-MIB", "licensekeyName")) if mibBuilder.loadTexts: license_graceperiodexpired.setDescription('Unable to authorize license key') license_authorized = NotificationType((1, 3, 6, 1, 4, 1, 7146, 1, 2, 15) + (0,117)).setLabel("license-authorized").setObjects(("ZXTM-MIB", "fullLogLine"), ("ZXTM-MIB", "licensekeyName")) if mibBuilder.loadTexts: license_authorized.setDescription('License key authorized') license_rejected_authorized = NotificationType((1, 3, 6, 1, 4, 1, 7146, 1, 2, 15) + (0,118)).setLabel("license-rejected-authorized").setObjects(("ZXTM-MIB", "fullLogLine"), ("ZXTM-MIB", "licensekeyName")) if mibBuilder.loadTexts: license_rejected_authorized.setDescription('License server rejected license key; key remains authorized') license_rejected_unauthorized = NotificationType((1, 3, 6, 1, 4, 1, 7146, 1, 2, 15) + (0,119)).setLabel("license-rejected-unauthorized").setObjects(("ZXTM-MIB", "fullLogLine"), ("ZXTM-MIB", "licensekeyName")) if mibBuilder.loadTexts: license_rejected_unauthorized.setDescription('License server rejected license key; key is not authorized') license_timedout_authorized = NotificationType((1, 3, 6, 1, 4, 1, 7146, 1, 2, 15) + (0,120)).setLabel("license-timedout-authorized").setObjects(("ZXTM-MIB", "fullLogLine"), ("ZXTM-MIB", "licensekeyName")) if mibBuilder.loadTexts: license_timedout_authorized.setDescription('Unable to contact license server; license key remains authorized') license_timedout_unauthorized = NotificationType((1, 3, 6, 1, 4, 1, 7146, 1, 2, 15) + (0,121)).setLabel("license-timedout-unauthorized").setObjects(("ZXTM-MIB", "fullLogLine"), ("ZXTM-MIB", "licensekeyName")) if mibBuilder.loadTexts: license_timedout_unauthorized.setDescription('Unable to contact license server; license key is not authorized') license_unauthorized = NotificationType((1, 3, 6, 1, 4, 1, 7146, 1, 2, 15) + (0,122)).setLabel("license-unauthorized").setObjects(("ZXTM-MIB", "fullLogLine"), ("ZXTM-MIB", "licensekeyName")) if mibBuilder.loadTexts: license_unauthorized.setDescription('License key is not authorized') logdiskoverload = NotificationType((1, 3, 6, 1, 4, 1, 7146, 1, 2, 15) + (0,186)).setObjects(("ZXTM-MIB", "fullLogLine")) if mibBuilder.loadTexts: logdiskoverload.setDescription('Log disk partition usage has exceeded threshold') logdiskfull = NotificationType((1, 3, 6, 1, 4, 1, 7146, 1, 2, 15) + (0,187)).setObjects(("ZXTM-MIB", "fullLogLine")) if mibBuilder.loadTexts: logdiskfull.setDescription('Log disk partition full') cloudcredentialsClassNumber = MibScalar((1, 3, 6, 1, 4, 1, 7146, 1, 2, 23, 1), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: cloudcredentialsClassNumber.setStatus('mandatory') if mibBuilder.loadTexts: cloudcredentialsClassNumber.setDescription('The number of cloud credentials sets defined.') cloudcredentialsTable = MibTable((1, 3, 6, 1, 4, 1, 7146, 1, 2, 23, 2), ) if mibBuilder.loadTexts: cloudcredentialsTable.setStatus('mandatory') if mibBuilder.loadTexts: cloudcredentialsTable.setDescription('This table provides statistics for cloud credentials sets.') cloudcredentialsEntry = MibTableRow((1, 3, 6, 1, 4, 1, 7146, 1, 2, 23, 2, 1), ).setIndexNames((0, "ZXTM-MIB", "cloudcredentialsName")) if mibBuilder.loadTexts: cloudcredentialsEntry.setStatus('mandatory') if mibBuilder.loadTexts: cloudcredentialsEntry.setDescription('This defines a row in the cloud credentials table.') cloudcredentialsName = MibTableColumn((1, 3, 6, 1, 4, 1, 7146, 1, 2, 23, 2, 1, 1), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 255))).setMaxAccess("readonly") if mibBuilder.loadTexts: cloudcredentialsName.setStatus('mandatory') if mibBuilder.loadTexts: cloudcredentialsName.setDescription('The name of this set of cloud credentials.') cloudcredentialsStatusRequests = MibTableColumn((1, 3, 6, 1, 4, 1, 7146, 1, 2, 23, 2, 1, 2), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: cloudcredentialsStatusRequests.setStatus('mandatory') if mibBuilder.loadTexts: cloudcredentialsStatusRequests.setDescription('The number of status API requests made with this set of cloud credentials.') cloudcredentialsNodeCreations = MibTableColumn((1, 3, 6, 1, 4, 1, 7146, 1, 2, 23, 2, 1, 3), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: cloudcredentialsNodeCreations.setStatus('mandatory') if mibBuilder.loadTexts: cloudcredentialsNodeCreations.setDescription('The number of instance creation API requests made with this set of cloud credentials.') cloudcredentialsNodeDeletions = MibTableColumn((1, 3, 6, 1, 4, 1, 7146, 1, 2, 23, 2, 1, 4), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: cloudcredentialsNodeDeletions.setStatus('mandatory') if mibBuilder.loadTexts: cloudcredentialsNodeDeletions.setDescription('The number of instance destruction API requests made with this set of cloud credentials.') listenIPTable = MibTable((1, 3, 6, 1, 4, 1, 7146, 1, 2, 27, 2), ) if mibBuilder.loadTexts: listenIPTable.setStatus('mandatory') if mibBuilder.loadTexts: listenIPTable.setDescription('This table defines all the information for a particular listening IP (includes IPv4 and IPv6 addresses).') listenIPEntry = MibTableRow((1, 3, 6, 1, 4, 1, 7146, 1, 2, 27, 2, 1), ).setIndexNames((0, "ZXTM-MIB", "listenIPAddressType"), (0, "ZXTM-MIB", "listenIPAddress")) if mibBuilder.loadTexts: listenIPEntry.setStatus('mandatory') if mibBuilder.loadTexts: listenIPEntry.setDescription('This defines a row in the listenips table (includes IPv4 and IPv6 addresses).') listenIPAddressType = MibTableColumn((1, 3, 6, 1, 4, 1, 7146, 1, 2, 27, 2, 1, 1), InetAddressType()).setMaxAccess("readonly") if mibBuilder.loadTexts: listenIPAddressType.setStatus('mandatory') if mibBuilder.loadTexts: listenIPAddressType.setDescription('The IP address type of this listening IP.') listenIPAddress = MibTableColumn((1, 3, 6, 1, 4, 1, 7146, 1, 2, 27, 2, 1, 2), InetAddress().subtype(subtypeSpec=ValueSizeConstraint(1, 64))).setMaxAccess("readonly") if mibBuilder.loadTexts: listenIPAddress.setStatus('mandatory') if mibBuilder.loadTexts: listenIPAddress.setDescription('The IPv4 or IPv6 address of this listening IP.') listenIPBytesInLo = MibTableColumn((1, 3, 6, 1, 4, 1, 7146, 1, 2, 27, 2, 1, 3), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: listenIPBytesInLo.setStatus('mandatory') if mibBuilder.loadTexts: listenIPBytesInLo.setDescription('Bytes sent to this listening IP ( low 32bits ).') listenIPBytesInHi = MibTableColumn((1, 3, 6, 1, 4, 1, 7146, 1, 2, 27, 2, 1, 4), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: listenIPBytesInHi.setStatus('mandatory') if mibBuilder.loadTexts: listenIPBytesInHi.setDescription('Bytes sent to this listening IP ( high 32bits ).') listenIPBytesOutLo = MibTableColumn((1, 3, 6, 1, 4, 1, 7146, 1, 2, 27, 2, 1, 5), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: listenIPBytesOutLo.setStatus('mandatory') if mibBuilder.loadTexts: listenIPBytesOutLo.setDescription('Bytes sent from this listening IP ( low 32bits ).') listenIPBytesOutHi = MibTableColumn((1, 3, 6, 1, 4, 1, 7146, 1, 2, 27, 2, 1, 6), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: listenIPBytesOutHi.setStatus('mandatory') if mibBuilder.loadTexts: listenIPBytesOutHi.setDescription('Bytes sent from this listening IP ( high 32bits ).') listenIPCurrentConn = MibTableColumn((1, 3, 6, 1, 4, 1, 7146, 1, 2, 27, 2, 1, 7), Gauge32()).setMaxAccess("readonly") if mibBuilder.loadTexts: listenIPCurrentConn.setStatus('mandatory') if mibBuilder.loadTexts: listenIPCurrentConn.setDescription('TCP connections currently established to this listening IP.') listenIPTotalConn = MibTableColumn((1, 3, 6, 1, 4, 1, 7146, 1, 2, 27, 2, 1, 8), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: listenIPTotalConn.setStatus('mandatory') if mibBuilder.loadTexts: listenIPTotalConn.setDescription('Requests sent to this listening IP.') listenIPMaxConn = MibTableColumn((1, 3, 6, 1, 4, 1, 7146, 1, 2, 27, 2, 1, 9), Gauge32()).setMaxAccess("readonly") if mibBuilder.loadTexts: listenIPMaxConn.setStatus('mandatory') if mibBuilder.loadTexts: listenIPMaxConn.setDescription('Maximum number of simultaneous TCP connections this listening IP has processed at any one time.') authenticatorNumber = MibScalar((1, 3, 6, 1, 4, 1, 7146, 1, 2, 28, 1), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: authenticatorNumber.setStatus('mandatory') if mibBuilder.loadTexts: authenticatorNumber.setDescription('The number of Authenticators.') authenticatorTable = MibTable((1, 3, 6, 1, 4, 1, 7146, 1, 2, 28, 2), ) if mibBuilder.loadTexts: authenticatorTable.setStatus('mandatory') if mibBuilder.loadTexts: authenticatorTable.setDescription('This table provides information and statistics for Authenticators.') authenticatorEntry = MibTableRow((1, 3, 6, 1, 4, 1, 7146, 1, 2, 28, 2, 1), ).setIndexNames((0, "ZXTM-MIB", "authenticatorName")) if mibBuilder.loadTexts: authenticatorEntry.setStatus('mandatory') if mibBuilder.loadTexts: authenticatorEntry.setDescription('This defines a row in the authenticators table.') authenticatorName = MibTableColumn((1, 3, 6, 1, 4, 1, 7146, 1, 2, 28, 2, 1, 1), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 255))).setMaxAccess("readonly") if mibBuilder.loadTexts: authenticatorName.setStatus('mandatory') if mibBuilder.loadTexts: authenticatorName.setDescription('The name of the Authenticator.') authenticatorRequests = MibTableColumn((1, 3, 6, 1, 4, 1, 7146, 1, 2, 28, 2, 1, 2), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: authenticatorRequests.setStatus('mandatory') if mibBuilder.loadTexts: authenticatorRequests.setDescription('Number of times this Authenticator has been asked to authenticate.') authenticatorPasses = MibTableColumn((1, 3, 6, 1, 4, 1, 7146, 1, 2, 28, 2, 1, 3), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: authenticatorPasses.setStatus('mandatory') if mibBuilder.loadTexts: authenticatorPasses.setDescription('Number of times this Authenticator has successfully authenticated.') authenticatorFails = MibTableColumn((1, 3, 6, 1, 4, 1, 7146, 1, 2, 28, 2, 1, 4), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: authenticatorFails.setStatus('mandatory') if mibBuilder.loadTexts: authenticatorFails.setDescription('Number of times this Authenticator has failed to authenticate.') authenticatorErrors = MibTableColumn((1, 3, 6, 1, 4, 1, 7146, 1, 2, 28, 2, 1, 5), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: authenticatorErrors.setStatus('mandatory') if mibBuilder.loadTexts: authenticatorErrors.setDescription('Number of connection errors that have occured when trying to connect to an authentication server.') mibBuilder.exportSymbols("ZXTM-MIB", nodeFailures=nodeFailures, trafficIPEntry=trafficIPEntry, perPoolNodeBytesFromNodeHi=perPoolNodeBytesFromNodeHi, statebaddata=statebaddata, customevent=customevent, license_timedout_unauthorized=license_timedout_unauthorized, trafficIPInet46AddressType=trafficIPInet46AddressType, perNodeServiceLevelInet46NodeAddress=perNodeServiceLevelInet46NodeAddress, license_timedout_authorized=license_timedout_authorized, perLocationServiceLocationCode=perLocationServiceLocationCode, testaction=testaction, sslCipherDecrypts=sslCipherDecrypts, autonodeexisted=autonodeexisted, flipperraiseothersdead=flipperraiseothersdead, virtualserverConnectionFailures=virtualserverConnectionFailures, monitorName=monitorName, rulestreamerrornotfinished=rulestreamerrornotfinished, poolBytesOutLo=poolBytesOutLo, rateClassCurrentRate=rateClassCurrentRate, hardware=hardware, licenseclustertoobig=licenseclustertoobig, virtualserverMaxConn=virtualserverMaxConn, ruleAborts=ruleAborts, poolBytesInLo=poolBytesInLo, poolName=poolName, glbnolocations=glbnolocations, slmfallenbelowwarn=slmfallenbelowwarn, virtualserverConnectTimedOut=virtualserverConnectTimedOut, nodeNumberInet46=nodeNumberInet46, poolNodes=poolNodes, autoscaleinvalidargforcreatenode=autoscaleinvalidargforcreatenode, poolNumber=poolNumber, trafficIPInet46State=trafficIPInet46State, stateconnfail=stateconnfail, bandwidthClassGuarantee=bandwidthClassGuarantee, cloudcredentialsName=cloudcredentialsName, perPoolNodeIdleConns=perPoolNodeIdleConns, sslSessionIDDiskCacheHit=sslSessionIDDiskCacheHit, perPoolNodeBytesFromNodeLo=perPoolNodeBytesFromNodeLo, perLocationServiceLocationName=perLocationServiceLocationName, cloudcredentials=cloudcredentials, running=running, perPoolNodeCurrentRequests=perPoolNodeCurrentRequests, listenIPEntry=listenIPEntry, perNodeServiceLevelInet46SLMName=perNodeServiceLevelInet46SLMName, authenticatorEntry=authenticatorEntry, poolConnsQueued=poolConnsQueued, nodeInet46HostName=nodeInet46HostName, sslConnections=sslConnections, autoscalinglicenseenabled=autoscalinglicenseenabled, uniSessionCacheOldest=uniSessionCacheOldest, nodeBytesToNodeLo=nodeBytesToNodeLo, totalBytesInLo=totalBytesInLo, rateClassQueueLength=rateClassQueueLength, perNodeServiceLevelInet46Table=perNodeServiceLevelInet46Table, ipSessionCacheLookups=ipSessionCacheLookups, sslCipherDESDecrypts=sslCipherDESDecrypts, perPoolNodeTotalConn=perPoolNodeTotalConn, trafficIPTime=trafficIPTime, authenticatorName=authenticatorName, rateClassEntry=rateClassEntry, triggersummary=triggersummary, j2eeSessionCacheHitRate=j2eeSessionCacheHitRate, rateClassNumber=rateClassNumber, locationLoad=locationLoad, rulestreamerrornotstarted=rulestreamerrornotstarted, pernodeservicelevelmon=pernodeservicelevelmon, poolTotalConn=poolTotalConn, nodeInet46Table=nodeInet46Table, virtualservers=virtualservers, j2eeSessionCacheMisses=j2eeSessionCacheMisses, rulenopersistence=rulenopersistence, perPoolNodeResponseMean=perPoolNodeResponseMean, machinetimeout=machinetimeout, perPoolNodePooledConn=perPoolNodePooledConn, sslSessionCacheEntriesMax=sslSessionCacheEntriesMax, nodeInet46Entry=nodeInet46Entry, customEventName=customEventName, sslSessionCacheMisses=sslSessionCacheMisses, sysMemBuffered=sysMemBuffered, license_rejected_authorized=license_rejected_authorized, sysMemTotal=sysMemTotal, confrepfailed=confrepfailed, events=events, sslCipherRC4Decrypts=sslCipherRC4Decrypts, cloudcredentialsEntry=cloudcredentialsEntry, timeLastConfigUpdate=timeLastConfigUpdate, webCacheMissesHi=webCacheMissesHi, autoscalewrongimageid=autoscalewrongimageid, nodeInet46TotalConn=nodeInet46TotalConn, bandwidthClassBytesOutLo=bandwidthClassBytesOutLo, badcontentlen=badcontentlen, rateClassName=rateClassName, poolnonodes=poolnonodes, perLocationServiceLoad=perLocationServiceLoad, trafficIPARPMessage=trafficIPARPMessage, perNodeServiceLevelNodePort=perNodeServiceLevelNodePort, tpslimited=tpslimited, rulestreamerrornotenough=rulestreamerrornotenough, nodeworking=nodeworking, glbnewmaster=glbnewmaster, nodeInet46State=nodeInet46State, monitorfail=monitorfail, perNodeServiceLevelResponseMax=perNodeServiceLevelResponseMax, perLocationServiceName=perLocationServiceName, authenticators=authenticators, virtualserverPort=virtualserverPort, aspSessionCacheHits=aspSessionCacheHits, autonodedisappeared=autonodedisappeared, sslhwstart=sslhwstart, interfaceTxBytesHi=interfaceTxBytesHi, webCacheMaxEntries=webCacheMaxEntries, sslCipher3DESEncrypts=sslCipher3DESEncrypts, sslCacheOldest=sslCacheOldest, sslCacheHits=sslCacheHits, rulebodycomperror=rulebodycomperror, sslCipher3DESDecrypts=sslCipher3DESDecrypts, nodeInet46BytesToNodeHi=nodeInet46BytesToNodeHi, totalBytesOutHi=totalBytesOutHi, poolMaxQueueTime=poolMaxQueueTime, ruleEntry=ruleEntry, rulestreamerrorinternal=rulestreamerrorinternal, serviceProtRefusalRFC2396=serviceProtRefusalRFC2396, sysMemSwapped=sysMemSwapped, license_authorized=license_authorized, zxtmTable=zxtmTable, serviceProtTable=serviceProtTable, ipSessionCacheEntries=ipSessionCacheEntries, sslhwrestart=sslhwrestart, rateClassTable=rateClassTable, numberDNSACacheHits=numberDNSACacheHits, eventsMatched=eventsMatched, licensekeyName=licensekeyName, bandwidthClassBytesOutHi=bandwidthClassBytesOutHi, licensekeys=licensekeys, noderesolvefailure=noderesolvefailure, virtualserverHttpCacheHitRate=virtualserverHttpCacheHitRate, autoscalepoolconfupdate=autoscalepoolconfupdate, vssslcerttoexpire=vssslcerttoexpire, autoscalewrongname=autoscalewrongname, listenIPTable=listenIPTable, ehloinvalid=ehloinvalid, perNodeServiceLevelInet46NodeAddressType=perNodeServiceLevelInet46NodeAddressType, aspSessionCacheHitRate=aspSessionCacheHitRate, sslSessionCacheHits=sslSessionCacheHits, virtualserverDataTimedOut=virtualserverDataTimedOut, javastartfail=javastartfail, locationsoapfail=locationsoapfail, license_graceperiodexpired=license_graceperiodexpired, javaterminatefail=javaterminatefail, serviceLevelEntry=serviceLevelEntry, nodeInet46ResponseMax=nodeInet46ResponseMax, serviceProtRefusalConc10IP=serviceProtRefusalConc10IP, monitorTable=monitorTable, autonodedestructioncomplete=autonodedestructioncomplete, sslHandshakeSSLv2=sslHandshakeSSLv2, webCacheLookupsLo=webCacheLookupsLo, cloudcredentialsStatusRequests=cloudcredentialsStatusRequests, interfaceEntry=interfaceEntry, webCacheHitsHi=webCacheHitsHi, sslCipherRSAEncryptsExternal=sslCipherRSAEncryptsExternal, autoscalinghitroof=autoscalinghitroof, nodeInet46IdleConns=nodeInet46IdleConns, virtualserverBytesInHi=virtualserverBytesInHi, perNodeServiceLevelTotalNonConf=perNodeServiceLevelTotalNonConf, uniSessionCacheEntries=uniSessionCacheEntries, cloudcredentialsNodeDeletions=cloudcredentialsNodeDeletions, serviceLevelResponseMean=serviceLevelResponseMean, perNodeServiceLevelInet46ResponseMean=perNodeServiceLevelInet46ResponseMean, usingdevlicense=usingdevlicense, pools=pools, ssldrop=ssldrop, pinggwfail=pinggwfail, sslSessionIDMemCacheMiss=sslSessionIDMemCacheMiss, nodeInet46CurrentRequests=nodeInet46CurrentRequests, sslClientCertInvalid=sslClientCertInvalid, trafficIPGatewayPingRequests=trafficIPGatewayPingRequests, rulelogmsgserious=rulelogmsgserious, rulexmlerr=rulexmlerr, logfiledeleted=logfiledeleted, cloudcredentialsClassNumber=cloudcredentialsClassNumber, aspSessionCacheMisses=aspSessionCacheMisses, connerror=connerror, sslSessionIDMemCacheHit=sslSessionIDMemCacheHit, eventTable=eventTable, numberSNMPBadRequests=numberSNMPBadRequests, autoscalingresuscitatepool=autoscalingresuscitatepool, rateClassConnsEntered=rateClassConnsEntered, sslSessionCacheLookups=sslSessionCacheLookups, pooluseunknown=pooluseunknown, norate=norate, autoscalingprocesstimedout=autoscalingprocesstimedout, flipperraiselocalworking=flipperraiselocalworking, nodeResponseMax=nodeResponseMax, autonodecreationstarted=autonodecreationstarted, actionTable=actionTable, vslogwritefail=vslogwritefail, poolSessionMigrated=poolSessionMigrated, nodeResponseMin=nodeResponseMin, serviceProtLastRefusalTime=serviceProtLastRefusalTime, confok=confok, totalBytesOutLo=totalBytesOutLo, sslCacheEntriesMax=sslCacheEntriesMax, serviceLevelName=serviceLevelName, perPoolNodeNodeAddressType=perPoolNodeNodeAddressType, cloudcredentialsTable=cloudcredentialsTable, javastop=javastop, trafficIPNumberRaisedInet46=trafficIPNumberRaisedInet46, restartrequired=restartrequired, glbServiceNumber=glbServiceNumber, numberChildProcesses=numberChildProcesses, totalCurrentConn=totalCurrentConn, j2eeSessionCacheEntriesMax=j2eeSessionCacheEntriesMax, aspSessionCacheEntries=aspSessionCacheEntries, nodeResponseMean=nodeResponseMean, trafficIPPingResponseErrors=trafficIPPingResponseErrors, serviceProtNumber=serviceProtNumber, autoscaledpoolrefractory=autoscaledpoolrefractory, sslCacheLookups=sslCacheLookups, version=version, aspSessionCacheOldest=aspSessionCacheOldest, perNodeServiceLevelNodeIPAddr=perNodeServiceLevelNodeIPAddr, locationName=locationName, zxtmswerror=zxtmswerror, allmachinesok=allmachinesok, responsetoolarge=responsetoolarge, bandwidthClassEntry=bandwidthClassEntry, rulelogmsgwarn=rulelogmsgwarn, perPoolNodeErrors=perPoolNodeErrors, poolEntry=poolEntry, perPoolNodeNodeHostName=perPoolNodeNodeHostName, javadied=javadied, webCacheEntries=webCacheEntries, listenIPBytesInHi=listenIPBytesInHi, authenticatorTable=authenticatorTable, numberSNMPUnauthorisedRequests=numberSNMPUnauthorisedRequests, rtspstreamnoports=rtspstreamnoports, virtualserverEntry=virtualserverEntry, virtualserverSIPTotalCalls=virtualserverSIPTotalCalls, poolPersistence=poolPersistence, autoscaledpooltoobig=autoscaledpooltoobig, trafficIPNodePingRequests=trafficIPNodePingRequests, virtualserverUdpTimedOut=virtualserverUdpTimedOut, perPoolNodeCurrentConn=perPoolNodeCurrentConn, glbserviceok=glbserviceok, licensetoomanylocations=licensetoomanylocations, nodeHostName=nodeHostName, virtualserverCurrentConn=virtualserverCurrentConn, nodeInet46Errors=nodeInet46Errors, pingfrontendfail=pingfrontendfail, sslCipherRSADecryptsExternal=sslCipherRSADecryptsExternal, activatedautomatically=activatedautomatically, nodes=nodes, noderesolvemultiple=noderesolvemultiple) mibBuilder.exportSymbols("ZXTM-MIB", poolFailPool=poolFailPool, licensekeyTable=licensekeyTable, flipperipexists=flipperipexists, autoscalednodecontested=autoscalednodecontested, servicerulelocnotconfigured=servicerulelocnotconfigured, serviceProtName=serviceProtName, ruleTable=ruleTable, apistatusprocesshanging=apistatusprocesshanging, bandwidthClassName=bandwidthClassName, autoscaledpooltoosmall=autoscaledpooltoosmall, rateClassMaxRatePerMin=rateClassMaxRatePerMin, authenticatorFails=authenticatorFails, autonodecreationcomplete=autonodecreationcomplete, ruleResponds=ruleResponds, slmfallenbelowserious=slmfallenbelowserious, ruleRetries=ruleRetries, sslClientCertNotSent=sslClientCertNotSent, perNodeServiceLevelInet46NodePort=perNodeServiceLevelInet46NodePort, autoscalingpoolstatechange=autoscalingpoolstatechange, nodeInet46ResponseMin=nodeInet46ResponseMin, rulestreamerrorgetresponse=rulestreamerrorgetresponse, totalConn=totalConn, virtualserverHttpRewriteCookie=virtualserverHttpRewriteCookie, glbServiceTable=glbServiceTable, usedcredsdeleted=usedcredsdeleted, totalBytesInHi=totalBytesInHi, sysCPUIdlePercent=sysCPUIdlePercent, sslHandshakeTLSv1=sslHandshakeTLSv1, statetimeout=statetimeout, perLocationServiceMonitorState=perLocationServiceMonitorState, aspSessionCacheLookups=aspSessionCacheLookups, monitorNumber=monitorNumber, nodeErrors=nodeErrors, sysCPUBusyPercent=sysCPUBusyPercent, slmclasslimitexceeded=slmclasslimitexceeded, autherror=autherror, geodataloadfail=geodataloadfail, sipstreamnoports=sipstreamnoports, license_rejected_unauthorized=license_rejected_unauthorized, interfaceTxBytesLo=interfaceTxBytesLo, webCacheMemMaximum=webCacheMemMaximum, nostarttls=nostarttls, stateok=stateok, serviceProtRefusalSize=serviceProtRefusalSize, totalBadDNSPackets=totalBadDNSPackets, serviceLevelConforming=serviceLevelConforming, nodePort=nodePort, perPoolNodeNewConn=perPoolNodeNewConn, poolactivenodesunknown=poolactivenodesunknown, sysMemFree=sysMemFree, trafficIPInet46Time=trafficIPInet46Time, virtualserverName=virtualserverName, actions=actions, nodeInet46Port=nodeInet46Port, listenIPAddressType=listenIPAddressType, autoscalinghysteresiscantgrow=autoscalinghysteresiscantgrow, nodeInet46PooledConn=nodeInet46PooledConn, sysMemSwapTotal=sysMemSwapTotal, licensecorrupt=licensecorrupt, pooldied=pooldied, flipperfrontendsworking=flipperfrontendsworking, locationok=locationok, datastorefull=datastorefull, perNodeServiceLevelTotalConn=perNodeServiceLevelTotalConn, actionName=actionName, sslCipherRSAEncrypts=sslCipherRSAEncrypts, nodeEntry=nodeEntry, virtualserverHttpRewriteLocation=virtualserverHttpRewriteLocation, poolok=poolok, virtualserverBytesInLo=virtualserverBytesInLo, virtualserverHttpCacheHits=virtualserverHttpCacheHits, dataEntries=dataEntries, numberSNMPGetNextRequests=numberSNMPGetNextRequests, nodefail=nodefail, confName=confName, interfaceCollisions=interfaceCollisions, javastarted=javastarted, zxtm=zxtm, zxtms=zxtms, trafficIPNodePingResponses=trafficIPNodePingResponses, sysFDsFree=sysFDsFree, ruleabort=ruleabort, userCounterValue=userCounterValue, trafficIPTable=trafficIPTable, nodeInet46NewConn=nodeInet46NewConn, ssltpslimited=ssltpslimited, zxtmName=zxtmName, unlicensed=unlicensed, locationResponses=locationResponses, zxtmNumber=zxtmNumber, monitorEntry=monitorEntry, flipperrecovered=flipperrecovered, sslSessionIDDiskCacheMiss=sslSessionIDDiskCacheMiss, rulestreamerrortoomuch=rulestreamerrortoomuch, bandwidthClassTable=bandwidthClassTable, webCacheLookupsHi=webCacheLookupsHi, ec2flipperraiseothersdead=ec2flipperraiseothersdead, locationmonitorok=locationmonitorok, cannotshrinkemptypool=cannotshrinkemptypool, serviceProtTotalRefusal=serviceProtTotalRefusal, numberSNMPGetRequests=numberSNMPGetRequests, glbServiceResponses=glbServiceResponses, rules=rules, numIdleConnections=numIdleConnections, locationTable=locationTable, webCacheOldest=webCacheOldest, autoscalinglicensedisabled=autoscalinglicensedisabled, servicerulelocunknown=servicerulelocunknown, poolMinQueueTime=poolMinQueueTime, serviceProtRefusalConnRate=serviceProtRefusalConnRate, autoscalinghysteresiscantshrink=autoscalinghysteresiscantshrink, perPoolNodeNodeAddress=perPoolNodeNodeAddress, glbServiceUnmodified=glbServiceUnmodified, trafficIPNumberRaised=trafficIPNumberRaised, autonodestatuschange=autonodestatuschange, webCacheMissesLo=webCacheMissesLo, listenIPAddress=listenIPAddress, sysCPUSystemBusyPercent=sysCPUSystemBusyPercent, totalTransactions=totalTransactions, monitors=monitors, serviceProtRefusalBinary=serviceProtRefusalBinary, virtualserverNumber=virtualserverNumber, locmovemachine=locmovemachine, actionNumber=actionNumber, serviceLevelTotalConn=serviceLevelTotalConn, virtualserverTotalConn=virtualserverTotalConn, virtualserverGzipBytesSavedHi=virtualserverGzipBytesSavedHi, poolDisabled=poolDisabled, slmrecoveredwarn=slmrecoveredwarn, connfail=connfail, flipperbackendsworking=flipperbackendsworking, poolMeanQueueTime=poolMeanQueueTime, numberDNSPTRRequests=numberDNSPTRRequests, serviceProtRefusalConc1IP=serviceProtRefusalConc1IP, bandwidthmgt=bandwidthmgt, aspsessioncache=aspsessioncache, webCacheMemUsed=webCacheMemUsed, perLocationServiceDraining=perLocationServiceDraining, nodeNumber=nodeNumber, nodeInet46AddressType=nodeInet46AddressType, virtualserverDiscard=virtualserverDiscard, serviceLevelNumber=serviceLevelNumber, nodeInet46Failures=nodeInet46Failures, serviceLevelCurrentConns=serviceLevelCurrentConns, poolDraining=poolDraining, serviceProtEntry=serviceProtEntry, zxtmEntry=zxtmEntry, virtualserverKeepaliveTimedOut=virtualserverKeepaliveTimedOut, autoscalingchangeprocessfailure=autoscalingchangeprocessfailure, perlocationservices=perlocationservices, userCounterNumber=userCounterNumber, machinefail=machinefail, eventNumber=eventNumber, perLocationServiceTable=perLocationServiceTable, timemovedback=timemovedback, javanotfound=javanotfound, forwardproxybadhost=forwardproxybadhost, trafficIPAddress=trafficIPAddress, maxclientbufferdrop=maxclientbufferdrop, uniSessionCacheHits=uniSessionCacheHits, logdiskfull=logdiskfull, dropipwarn=dropipwarn, sslCipherRC4Encrypts=sslCipherRC4Encrypts, serviceLevelResponseMax=serviceLevelResponseMax, licensekeyNumber=licensekeyNumber, ipSessionCacheHitRate=ipSessionCacheHitRate, bwlimited=bwlimited, extra=extra, serviceProtRefusalIP=serviceProtRefusalIP, nodeBytesToNodeHi=nodeBytesToNodeHi, poolTable=poolTable, authenticatorNumber=authenticatorNumber, listenips=listenips, sslCipherDESEncrypts=sslCipherDESEncrypts, cachesizereduced=cachesizereduced, ruleNumber=ruleNumber, interfaceRxErrors=interfaceRxErrors, virtualserverDirectReplies=virtualserverDirectReplies, upTime=upTime, j2eeSessionCacheHits=j2eeSessionCacheHits, userCounterTable=userCounterTable, locempty=locempty, flipperdadreraise=flipperdadreraise, interfaceRxBytesHi=interfaceRxBytesHi, fullLogLine=fullLogLine, rateClassConnsLeft=rateClassConnsLeft, vsstart=vsstart, sslCacheMisses=sslCacheMisses, logdiskoverload=logdiskoverload, uniSessionCacheHitRate=uniSessionCacheHitRate, sslSessionCacheEntries=sslSessionCacheEntries, nodePooledConn=nodePooledConn, virtualserverTable=virtualserverTable, trafficIPGatewayPingResponses=trafficIPGatewayPingResponses, glbdeadlocmissingips=glbdeadlocmissingips, perLocationServiceState=perLocationServiceState, stateunexpected=stateunexpected, autoscalewrongsizeid=autoscalewrongsizeid, poolBytesInHi=poolBytesInHi, perLocationServiceResponses=perLocationServiceResponses, eventEntry=eventEntry, glblogwritefail=glblogwritefail, poolQueueTimeouts=poolQueueTimeouts, perNodeServiceLevelEntry=perNodeServiceLevelEntry, zeus=zeus, perPoolNodeBytesToNodeLo=perPoolNodeBytesToNodeLo, nodeInet46Address=nodeInet46Address, interfaceTable=interfaceTable, sslCacheHitRate=sslCacheHitRate, machinerecovered=machinerecovered, sslhwfail=sslhwfail, zclustermoderr=zclustermoderr, rulePoolSelect=rulePoolSelect, perLocationServiceEntry=perLocationServiceEntry, vscacertexpired=vscacertexpired, interfaceRxBytesLo=interfaceRxBytesLo, ec2flipperraiselocalworking=ec2flipperraiselocalworking, ipSessionCacheEntriesMax=ipSessionCacheEntriesMax, locationEntry=locationEntry, statewritefail=statewritefail, respcompfail=respcompfail, numberDNSPTRCacheHits=numberDNSPTRCacheHits, locationmonitorfail=locationmonitorfail, perNodeServiceLevelInet46ResponseMin=perNodeServiceLevelInet46ResponseMin, autonodedestroyed=autonodedestroyed, eventsSeen=eventsSeen, sslCipherAESDecrypts=sslCipherAESDecrypts, glbServiceName=glbServiceName, serviceLevelResponseMin=serviceLevelResponseMin, uniSessionCacheMisses=uniSessionCacheMisses, nodeBytesFromNodeLo=nodeBytesFromNodeLo, sslHandshakeTLSv11=sslHandshakeTLSv11, rulebufferlarge=rulebufferlarge, slmrecoveredserious=slmrecoveredserious, pingbackendfail=pingbackendfail, ipsessioncache=ipsessioncache, virtualserverConnectionErrors=virtualserverConnectionErrors, perPoolNodeBytesToNodeHi=perPoolNodeBytesToNodeHi, actionEntry=actionEntry, locationfail=locationfail, autoscalingdisabled=autoscalingdisabled, ruleExecutions=ruleExecutions, serviceLevelTable=serviceLevelTable, ipSessionCacheHits=ipSessionCacheHits, virtualserverBytesOutHi=virtualserverBytesOutHi, poolAlgorithm=poolAlgorithm, perPoolNodeResponseMax=perPoolNodeResponseMax, glbmissingips=glbmissingips, j2eeSessionCacheEntries=j2eeSessionCacheEntries, netinterfaces=netinterfaces, aspSessionCacheEntriesMax=aspSessionCacheEntriesMax, uniSessionCacheLookups=uniSessionCacheLookups, glbServiceDiscarded=glbServiceDiscarded, vscrloutofdate=vscrloutofdate) mibBuilder.exportSymbols("ZXTM-MIB", perPoolNodeTable=perPoolNodeTable, interfaceNumber=interfaceNumber, analyticslicensedisabled=analyticslicensedisabled, expiresoon=expiresoon, j2eeSessionCacheOldest=j2eeSessionCacheOldest, listenIPTotalConn=listenIPTotalConn, virtualserverProtocol=virtualserverProtocol, webcache=webcache, sysMemInUse=sysMemInUse, interfaceTxPackets=interfaceTxPackets, trafficIPNumberInet46=trafficIPNumberInet46, numberDNSARequests=numberDNSARequests, vsstop=vsstop, cache=cache, dropipinfo=dropipinfo, uniSessionCacheEntriesMax=uniSessionCacheEntriesMax, zxtmtraps=zxtmtraps, trafficips=trafficips, virtualserverTotalDgram=virtualserverTotalDgram, listenIPMaxConn=listenIPMaxConn, invalidemit=invalidemit, listenIPBytesOutHi=listenIPBytesOutHi, virtualserverSIPRejectedRequests=virtualserverSIPRejectedRequests, nodeInet46BytesToNodeLo=nodeInet46BytesToNodeLo, ipSessionCacheOldest=ipSessionCacheOldest, locationCode=locationCode, interfaceTxErrors=interfaceTxErrors, lessmemallowed=lessmemallowed, perNodeServiceLevelResponseMean=perNodeServiceLevelResponseMean, glbServiceEntry=glbServiceEntry, serviceruleabort=serviceruleabort, sslCipherRSADecrypts=sslCipherRSADecrypts, serviceLevelTotalNonConf=serviceLevelTotalNonConf, perNodeServiceLevelInet46TotalNonConf=perNodeServiceLevelInet46TotalNonConf, servicerulelocdead=servicerulelocdead, rulestreamerrorprocessfailure=rulestreamerrorprocessfailure, products=products, autoscalinghitfloor=autoscalinghitfloor, license_unauthorized=license_unauthorized, monitorok=monitorok, userCounterName=userCounterName, servleterror=servleterror, unisessioncache=unisessioncache, nodeInet46BytesFromNodeLo=nodeInet46BytesFromNodeLo, starttlsinvalid=starttlsinvalid, confreptimeout=confreptimeout, totalBackendServerErrors=totalBackendServerErrors, sslcache=sslcache, j2eesessioncache=j2eesessioncache, perNodeServiceLevelInet46TotalConn=perNodeServiceLevelInet46TotalConn, confmod=confmod, autoscaleresponseparseerror=autoscaleresponseparseerror, sslClientCertRevoked=sslClientCertRevoked, glbservicedied=glbservicedied, nodeInet46BytesFromNodeHi=nodeInet46BytesFromNodeHi, autoscalestatusupdateerror=autoscalestatusupdateerror, glbfailalter=glbfailalter, nodeTable=nodeTable, trafficIPInet46Table=trafficIPInet46Table, virtualserverGzipBytesSavedLo=virtualserverGzipBytesSavedLo, sslCacheEntries=sslCacheEntries, autoscaleinvalidargfordeletenode=autoscaleinvalidargfordeletenode, perLocationServiceFrontendState=perLocationServiceFrontendState, glbservices=glbservices, confadd=confadd, authenticatorPasses=authenticatorPasses, poolBytesOutHi=poolBytesOutHi, poolpersistencemismatch=poolpersistencemismatch, fewfreefds=fewfreefds, sysCPUUserBusyPercent=sysCPUUserBusyPercent, perNodeServiceLevelTable=perNodeServiceLevelTable, virtualserverDefaultTrafficPool=virtualserverDefaultTrafficPool, cloudcredentialsNodeCreations=cloudcredentialsNodeCreations, autoscalinglicenseerror=autoscalinglicenseerror, perNodeServiceLevelInet46Entry=perNodeServiceLevelInet46Entry, flipperraiseosdrop=flipperraiseosdrop, privkeyok=privkeyok, ipSessionCacheMisses=ipSessionCacheMisses, ruleName=ruleName, machineok=machineok, ruleDiscards=ruleDiscards, versionmismatch=versionmismatch, webCacheHitsLo=webCacheHitsLo, userCounterEntry=userCounterEntry, nodeTotalConn=nodeTotalConn, nodeIPAddress=nodeIPAddress, j2eeSessionCacheLookups=j2eeSessionCacheLookups, virtualserverBytesOutLo=virtualserverBytesOutLo, globals=globals, vscacerttoexpire=vscacerttoexpire, actionsProcessed=actionsProcessed, nodeInet46ResponseMean=nodeInet46ResponseMean, activatealldead=activatealldead, trafficIPNumber=trafficIPNumber, sslCipherAESEncrypts=sslCipherAESEncrypts, nodeNewConn=nodeNewConn, bandwidthClassNumber=bandwidthClassNumber, sslHandshakeSSLv3=sslHandshakeSSLv3, rulelogmsginfo=rulelogmsginfo, interfaceName=interfaceName, morememallowed=morememallowed, sslfail=sslfail, poolState=poolState, perPoolNodeEntry=perPoolNodeEntry, apichangeprocesshanging=apichangeprocesshanging, ec2nopublicip=ec2nopublicip, listenIPBytesInLo=listenIPBytesInLo, serviceprotection=serviceprotection, dataMemoryUsage=dataMemoryUsage, connratelimit=connratelimit, rateClassMaxRatePerSec=rateClassMaxRatePerSec, interfaceRxPackets=interfaceRxPackets, perNodeServiceLevelInet46ResponseMax=perNodeServiceLevelInet46ResponseMax, analyticslicenseenabled=analyticslicenseenabled, listenIPBytesOutLo=listenIPBytesOutLo, perNodeServiceLevelResponseMin=perNodeServiceLevelResponseMin, trapobjects=trapobjects, perNodeServiceLevelSLMName=perNodeServiceLevelSLMName, rateClassDropped=rateClassDropped, vssslcertexpired=vssslcertexpired, sslClientCertExpired=sslClientCertExpired, virtualserverHttpCacheLookups=virtualserverHttpCacheLookups, trafficIPState=trafficIPState, dropec2ipwarn=dropec2ipwarn, perPoolNodePoolName=perPoolNodePoolName, trafficIPInet46Address=trafficIPInet46Address, eventName=eventName, usinglicense=usinglicense, perPoolNodeNumber=perPoolNodeNumber, persistence=persistence, trafficIPInet46Entry=trafficIPInet46Entry, nodeCurrentConn=nodeCurrentConn, listenIPCurrentConn=listenIPCurrentConn, licensekeyEntry=licensekeyEntry, locations=locations, virtualserverGzip=virtualserverGzip, perPoolNodeFailures=perPoolNodeFailures, sslSessionCacheOldest=sslSessionCacheOldest, sslCipherEncrypts=sslCipherEncrypts, totalRequests=totalRequests, statereadfail=statereadfail, confdel=confdel, locationsoapok=locationsoapok, authenticatorRequests=authenticatorRequests, serviceLevelIsOK=serviceLevelIsOK, servicelevelmonitoring=servicelevelmonitoring, sslsessioncache=sslsessioncache, perPoolNodeNodePort=perPoolNodeNodePort, nodeInet46CurrentConn=nodeInet46CurrentConn, nodeBytesFromNodeHi=nodeBytesFromNodeHi, expired=expired, multihostload=multihostload, ec2iperr=ec2iperr, sslSessionCacheHitRate=sslSessionCacheHitRate, authenticatorErrors=authenticatorErrors, webCacheHitRate=webCacheHitRate, perPoolNodeState=perPoolNodeState, nodeState=nodeState, nodeCurrentRequests=nodeCurrentRequests, rulesinvalidrequestbody=rulesinvalidrequestbody, perPoolNodeResponseMin=perPoolNodeResponseMin, bandwidthClassMaximum=bandwidthClassMaximum, totalDNSResponses=totalDNSResponses)
''' Takes raw radiosonde data file from NSGRA-2, removes data that's not required by the simulator, outputs _filtered version. This _filtered file is the file MAPLEAF expects when using radiosonde mean wind models ''' if __name__ == "__main__": # Adjust input (unfiltered) file location here filePath = "MAPLEAF/Examples/Wind/RadioSondeEdmonton.txt" with open(filePath, 'r') as file: lines = file.readlines() output = [] for line in lines: line = line.strip() isHeader = line[0] == '#' hasWindData = line[-5:] != "-9999" hasAltitude = line[16:21] != "-9999" if isHeader: output.append(line + "\n") elif hasWindData and hasAltitude: # Only keep required columns altitude = line[16:21] windSpeed = line[-11:] output.append("{} {}\n".format(altitude, windSpeed)) outputFilePath = filePath[:-4] + "_filtered.txt" with open(outputFilePath, 'w+') as file: file.writelines(output)
class FakeTimer: def __init__(self, time, function, args=None, kwargs=None): self._time = time self._function = function self._args = args if args is not None else [] self._kwargs = kwargs if kwargs is not None else {} self._canceled = False self._started = False self._passed = 0 def start(self): if self._started: raise RuntimeError("threads can only be started once") self._started = True self._passed = 0 def cancel(self): self._canceled = True def reset(self): self._passed = 0 if self._canceled: self._started = False self._canceled = False def pass_time(self, time): self._passed += time if not self._canceled and self._started and self._passed >= self._time: self._function(*self._args, **self._kwargs)
# Declare a variable of `name` with an input and a string of "Welcome to the Boba Shop! What is your name?". name = input("Welcome to the Boba Shop! What is your name?") # Check if `name` is not an empty string or equal to `None`. if name != "" or name == None: # If so, write a print with a string of "Hello" concatenated with the variable `name`. print(f"Hello {name}") # Then, declare a variable of `beverage` with an input and a string of "What kind of boba drink would you like?". beverage = input("What kind of boba drink would you like?") # Then, Declare a variable of `sweetness` with an input and a string of "How sweet do you want your drink: 0, 50, 100, or 200?". sweetness_level = input("How sweet do you want your drink: 0, 50, 100, or 200?") # If `sweetness` equals 50 print "half sweetened". if sweetness_level == 50: sweetness = "half sweetened" # Else if `sweetness` 100 print "normal sweet". elif sweetness == 100: sweetness = "normal sweet" # Else if `sweetness` 200 print "super sweet". elif sweetness == 200: sweetness = "super sweet" # Else print with a string of "non-sweet". else: sweetness = "non-sweet" # Then print the string of "Your order of " concatenated with the variable `beverage`, concatenated with " boba with a sweet level of ", concatenated with the variable `sweetness` print(f"Your order of {beverage} boba with a sweetness level of {sweetness}") # Else, print the string of "You didn't give us your name! Goodbye". else: print("You didn't give us your name! Goodbye")
# ************************************************************************* # # Copyright (c) 2021 Andrei Gramakov. All rights reserved. # # This file is licensed under the terms of the MIT license. # For a copy, see: https://opensource.org/licenses/MIT # # site: https://agramakov.me # e-mail: mail@agramakov.me # # ************************************************************************* CONCEPT_TO_COMMAND = "concept2commands_interpreter" EMOTIONCORE_DATADSC = "EmotionCoreDataDescriptor" EMOTIONCORE_WRITE = "EmotionCoreWrite" I2C = "i2c_server" SENSOR_DATA_TO_CONCEPT = "data2concept_interpreter"
class Solution: def solve(self, nums, k): mods = set() last = 0 psum = 0 for num in nums: psum += num if psum%k in mods: return True mods.add(last) last = psum%k return False
class FrameworkRichTextComposition(FrameworkTextComposition): """ Represents a composition related to text input. You can use this class to find the text position of the composition or the result string. """ CompositionEnd=property(lambda self: object(),lambda self,v: None,lambda self: None) """Gets the end position of the current composition text. Get: CompositionEnd(self: FrameworkRichTextComposition) -> TextPointer """ CompositionStart=property(lambda self: object(),lambda self,v: None,lambda self: None) """Gets the start position of the current composition text. Get: CompositionStart(self: FrameworkRichTextComposition) -> TextPointer """ ResultEnd=property(lambda self: object(),lambda self,v: None,lambda self: None) """Gets the end position of the result text of the text input. Get: ResultEnd(self: FrameworkRichTextComposition) -> TextPointer """ ResultStart=property(lambda self: object(),lambda self,v: None,lambda self: None) """Gets the start position of the result text of the text input. Get: ResultStart(self: FrameworkRichTextComposition) -> TextPointer """
# -*- coding: utf-8 -*- # # Copyright 2012-2015 Spotify AB # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # class TargetsException(Exception): """ Base class for generic package related exceptions. """ pass class FileSystemException(TargetsException): """ Base class for generic file system exceptions. """ pass class FileAlreadyExists(FileSystemException): """ Raised when a file system operation can't be performed because a directory exists but is required to not exist. """ pass class MissingParentDirectory(FileSystemException): """ Raised when a parent directory doesn't exist. (Imagine mkdir without -p) """ pass class NotADirectory(FileSystemException): """ Raised when a file system operation can't be performed because an expected directory is actually a file. """ pass class InvalidDeleteException(FileSystemException): pass class FileNotFoundException(FileSystemException): pass
def minimumAbsoluteDifference(arr): # Another way to define this problem is "find the pair of numbers with the smallest distance from each other". # Easiest to begin approaching this problem is to sort the data set. sorted_arr = list(sorted(arr)) pairs = zip(sorted_arr, sorted_arr[1:]) # The dataset now has the property arr[i] < arr[j] for all i < j. Thus the pair of numbers with the smallest distance have to next to each other. If there existed a element arr[a] where a != i + 1 which did have a smaller distance to arr[i] than arr[i + 1], then this would break the sorted propety. smallest_pair = min(pairs, key=lambda pair: abs(pair[0] - pair[1])) return abs(smallest_pair[0] - smallest_pair[1]) if __name__ == "__main__": with open("test_case.txt") as f: n = int(f.readline().strip()) arr = list(map(int, f.readline().rstrip().split())) assert len(arr) == n result = minimumAbsoluteDifference(arr) print("RESULT: ", result, "EXPECTED: 0")
def sqrt(x): i = 1 while i*i<=x: i*=2 y=0 while i>0: if(y+i)**2<=x: y+=i i//=2 return y t=100**100 print(sum( int(c) for c in str(sqrt(t*2))[:100] )) ans = sum( sum(int(c) for c in str(sqrt(i * t))[ : 100]) for i in range(1,101) if sqrt(i)**2 != i) print(str(ans))
class Animal: def __init__(self, name, color, age, gender): self.name = name self.color = color self.age = age self.gender = gender @classmethod def cry(cls): print('类方法: 叫') @classmethod def run(cls): print('类方法:跑') class Cat(Animal): def __init__(self, hair, *args, **kwargs): super().__init__(*args, **kwargs) self.hair = hair def catch(self): print('成员方法:捉老鼠') def cry(self): print('喵喵叫') def show(self): print(f'name:{self.name}, color:{self.color}, age:{self.age}, gender:{self.gender}, hair:{self.hair}') if __name__ == '__main__': cat = Cat(hair='短发', name='小黑', color='黑', age=1, gender='雄') cat.show()
class CoolError(Exception): def __init__(self, text, line, column): super().__init__(text) self.line = line self.column = column @property def error_type(self): return 'CoolError' @property def text(self): return self.args[0] def __str__(self): return f'({self.line}, {self.column}) - {self.error_type}: {self.text}' def __repr__(self): return str(self) class CompilerError(CoolError): 'Se reporta al presentar alguna anomalia con la entrada del compilador' UNKNOWN_FILE = 'The file "%s" does not exist' @property def error_type(self): return 'CompilerError' class LexicographicError(CoolError): 'Errores detectados por el lexer' UNKNOWN_TOKEN = 'ERROR "%s"' UNDETERMINATED_STRING = 'Undeterminated string constant' EOF_COMMENT = 'EOF in comment' EOF_STRING = 'EOF in string constant' NULL_STRING = 'String contains null character' @property def error_type(self): return 'LexicographicError' class SyntaticError(CoolError): 'Errores detectados en el cool_parser' ERROR = 'ERROR at or near "%s"' @property def error_type(self): return 'SyntacticError' class SemanticError(CoolError): 'Otros errores semanticos' SELF_IS_READONLY = 'Cannot assign to \'self\'.' SELF_IN_LET = '\'self\' cannot be bound in a \'let\' expression.' SELF_PARAM = "'self' cannot be the name of a formal parameter." SELF_ATTR = "'self' cannot be the name of an attribute." LOCAL_ALREADY_DEFINED = 'Variable "%s" is already defined in method "%s".' ARGUMENT_ERROR = 'Method %s called with wrong number of arguments.' REDEFINITION_ERROR = 'Redefinition of basic class %s' INHERIT_ERROR = 'Class %s cannot inherit class %s.' DUPLICATE_CASE_BRANCH = 'Duplicate branch %s in case statement.' TYPE_ALREADY_DEFINED = 'Classes may not be redefined.' ATTRIBUTE_ALREADY_DEFINED = 'Attribute "%s" is multiply defined in class.' ATTR_DEFINED_PARENT = 'Attribute %s is an attribute of an inherited class.' METHOD_ALREADY_DEFINED = 'Method "%s" is multiply defined.' CIRCULAR_DEPENDENCY = 'Class %s, or an ancestor of %s, is involved in an inheritance cycle.' WRONG_SIGNATURE_RETURN = 'In redefined method %s, return type %s is different from original return type %s.' WRONG_NUMBER_PARAM = 'Incompatible number of formal parameters in redefined method %s.' PARAMETER_MULTY_DEFINED = 'Formal parameter %s is multiply defined.' WRONG_SIGNATURE_PARAMETER = 'In redefined method %s, parameter type %s is different from original type %s.' @property def error_type(self): return 'SemanticError' class NamesError(SemanticError): 'Se reporta al referenciar a un identificador en un ambito en el que no es visible' VARIABLE_NOT_DEFINED = 'Undeclared identifier %s.' @property def error_type(self): return 'NameError' class TypesError(SemanticError): 'Se reporta al detectar un problema de tipos' INCOMPATIBLE_TYPES = 'Cannot convert "%s" into "%s".' ATTR_TYPE_ERROR = 'Inferred type %s of initialization of attribute %s does not conform to declared type %s.' ATTR_TYPE_UNDEFINED = 'Class %s of attribute %s is undefined.' BOPERATION_NOT_DEFINED = 'non-Int arguments: %s %s %s.' COMPARISON_ERROR = 'Illegal comparison with a basic type.' UOPERATION_NOT_DEFINED = 'Argument of \'%s\' has type %s instead of %s.' CLASS_CASE_BRANCH_UNDEFINED = 'Class %s of case branch is undefined.' PREDICATE_ERROR = 'Predicate of \'%s\' does not have type %s.' INCOSISTENT_ARG_TYPE = 'In call of method %s, type %s of parameter %s does not conform to declared type %s.' INCOMPATIBLE_TYPES_DISPATCH = 'Expression type %s does not conform to declared static dispatch type %s.' INHERIT_UNDEFINED = 'Class %s inherits from an undefined class %s.' UNCONFORMS_TYPE = 'Inferred type %s of initialization of %s does not conform to identifier\'s declared type %s.' UNDEFINED_TYPE_LET = 'Class %s of let-bound identifier %s is undefined.' LOOP_CONDITION_ERROR = 'Loop condition does not have type Bool.' RETURN_TYPE_ERROR = 'Inferred return type %s of method test does not conform to declared return type %s.' PARAMETER_UNDEFINED = 'Class %s of formal parameter %s is undefined.' RETURN_TYPE_UNDEFINED = 'Undefined return type %s in method %s.' NEW_UNDEFINED_CLASS = '\'new\' used with undefined class %s.' PARENT_ALREADY_DEFINED = 'Parent type is already set for "%s"' TYPE_NOT_DEFINED = 'Type "%s" is not defined.' @property def error_type(self): return 'TypeError' class AttributesError(SemanticError): 'Se reporta cuando un atributo o método se referencia pero no está definido' DISPATCH_UNDEFINED = 'Dispatch to undefined method %s.' METHOD_NOT_DEFINED = 'Method "%s" is not defined in "%s"' ATTRIBUTE_NOT_DEFINED = 'Attribute "%s" is not defined in %s' @property def error_type(self): return 'AttributeError'
candyCan = ["apple", "strawberry", "grape", "mango"] print(candyCan[1]) print(candyCan[-1]) print(candyCan[1:3])
class ListNode: def __init__(self, value, prev=None, next=None): self.value = value self.prev = prev self.next = next def insert_after(self, value): pass def insert_before(self, value): pass def delete(self): pass class DoublyLinkedList: def __init__(self, node=None): self.head = node self.tail = node def add_to_head(self, value): pass def remove_from_head(self): pass def add_to_tail(self, value): pass def remove_from_tail(self): pass def move_to_front(self, node): pass def move_to_end(self, node): pass def delete(self, node): pass
"""Class for converter models.""" class InverterModels: """ SwitcInverter class. Attributes: (): """ def ODE_model_single_phase_EMT(self,y,t,signals,grid,sim): """ODE model of inverter branch.""" self.ia,dummy = y # unpack current values of y Vdc = 100.0 #Get DC link voltage control_signal = self.control_signal_calc(signals,t) self.vta = self.vt_calc(Vdc,control_signal) self.va = self.va_calc(t,grid,sim.use_grid) dia = (1/self.Lf)*(-self.Rf*self.ia -self.va + self.vta) result = [dia,dummy] return np.array(result) def ODE_model_single_phase_dynamicphasor(self,y,t,signals,grid,sim): """Dynamic phasor.""" iaR,iaI = y # unpack current values of y Vdc = 100.0 #Get DC link voltage winv = 2*math.pi*60 self.ia = iaR + 1j*iaI self.vta = self.half_bridge_phasor(Vdc,1.0+1j*0.0) diaR = (1/self.Lf)*(-self.Rf*self.ia.real - self.Rload*self.ia.real + self.vta.real) + (winv)*self.ia.imag diaI = (1/self.Lf)*(-self.Rf*self.ia.imag - self.Rload*self.ia.imag + self.vta.imag) - (winv)*self.ia.real result = [diaR,diaI] return np.array(result) def single_phase_half_bridge_switching(self,Vdc,S1): """Simulates a bridge in inverter""" self.update_Vdc(Vdc) S11 = self.calc_primary(S1) S12 = self.calc_complimentary(S1) assert S11+S12 == 1, 'S11 and S12 switches cannot be both ON or OFF at the same time in ideal half bridge.' #print('S11:{},S12:{}'.format(S11,S12)) Van = (S11 - S12)*(self.Vdc/2) #print('Van:{}'.format(Van)) return Van def single_phase_full_bridge_switching(self,Vdc,S1,S2): """Simulates a bridge in inverter""" self.update_Vdc(Vdc) S11 = self.calc_primary(S1) S12 = self.calc_complimentary(S1) S21 = calc_primary(S2) S22 = calc_complimentary(S2) assert S11+S12 == 1, 'S11 and S12 switches cannot be both ON or OFF at the same time in full bridge.' assert S21+S22 == 1, 'S21 and S22 switches cannot be both ON or OFF at the same time in full bridge.' Van = (S11 - S12)*(self.Vdc/2) - (S21 - S22)*(self.Vdc/2) #print('Van:{}'.format(Van)) return Van def three_phase_full_bridge_switching(Vdc,S1,S2,S3): """Simulates a bridge in inverter""" S11 = calc_primary(S1) S12 = calc_complimentary(S1) S21 = calc_primary(S2) S22 = calc_complimentary(S2) S31 = calc_primary(S3) S32 = calc_complimentary(S3) assert S11+S12 == 1, 'S11 and S12 switches cannot be both ON or OFF at the same time in ideal half bridge.' assert S21+S22 == 1, 'S21 and S22 switches cannot be both ON or OFF at the same time in ideal half bridge.' assert S31+S32 == 1, 'S31 and S32 switches cannot be both ON or OFF at the same time in ideal half bridge.' print('S1:{},S2:{},S3:{}'.format(S11,S21,S31)) Vno = (self.Vdc/6)*(2*S11+2*S21+2*S31-3) Van = (self.Vdc/2)*(S11-S12)-Vno Vbn = (self.Vdc/2)*(S21-S22)-Vno Vcn = (self.Vdc/2)*(S31-S32)-Vno #Van = (2*S11 - S21 - S31)*(Vdc/3) #Vbn = (2*S21 - S11 - S31)*(Vdc/3) #Vcn = (2*S31 - S21 - S11)*(Vdc/3) print('Vno:{},Van+Vbn+Vcn:{}'.format(Vno,Van+Vbn+Vcn)) print('Van:{},Vbn:{},Vcn:{}'.format(Van,Vbn,Vcn)) print('Vab:{},Vbc:{},Vca:{}'.format(Van-Vbn,Vbn-Vcn,Vcn-Van)) return Van,Vbn,Vcn def single_phase_half_bridge_average(self,Vdc,m): """Simulates a bridge in inverter""" self.update_Vdc(Vdc) assert m>=-1 and m <= 1, 'duty cycle should be between 0 and 1.' Van = m*(self.Vdc/2) return Van def single_phase_full_bridge_average(self,Vdc,m): """Simulates a bridge in inverter""" self.update_Vdc(Vdc) assert m>=-1 and m <= 1, 'duty cycle should be between 0 and 1.' Van = m*(self.Vdc) return Van def single_phase_half_bridge_phasor(self,Vdc,m): """Simulates a bridge in inverter""" self.update_Vdc(Vdc) assert isinstance(m,complex), 'duty cycle should be complex phasor.' Van = m*(self.Vdc/2) return Van def single_phase_full_bridge_phasor(self,Vdc,m): """Simulates a bridge in inverter""" self.update_Vdc(Vdc) assert isinstance(m,complex), 'duty cycle should be complex phasor.' Van = m*(self.Vdc) return Van
def count(start=0, step=1): while True: yield start start += step def cycle(p): try: len(p) except TypeError: # len() is not defined for this type. Assume it is # a finite iterable so we must cache the elements. cache = [] for i in p: yield i cache.append(i) p = cache while p: yield from p def repeat(el, n=None): if n is None: while True: yield el else: for i in range(n): yield el def chain(*p): for i in p: yield from i def islice(p, start, stop=(), step=1): if stop == (): stop = start start = 0 # TODO: optimizing or breaking semantics? if start >= stop: return it = iter(p) for i in range(start): next(it) while True: yield next(it) for i in range(step - 1): next(it) start += step if start >= stop: return def tee(iterable, n=2): return [iter(iterable)] * n def starmap(function, iterable): for args in iterable: yield function(*args) def accumulate(iterable, func=lambda x, y: x + y): it = iter(iterable) try: acc = next(it) except StopIteration: return yield acc for element in it: acc = func(acc, element) yield acc
# 169. Majority Element # Given an array of size n, find the majority element. The majority element is the element that appears more than ⌊ n/2 ⌋ times. # You may assume that the array is non-empty and the majority element always exist in the array. class Solution(object): def majorityElement(self, nums): """ :type nums: List[int] :rtype: int """ total_count = len(nums)//2 for num in nums: count = sum(1 for elem in nums if elem == num) if count > total_count: return num
''' Assembling your data Here, three DataFrames have been pre-loaded: g1800s, g1900s, and g2000s. These contain the Gapminder life expectancy data for, respectively, the 19th century, the 20th century, and the 21st century. Your task in this exercise is to concatenate them into a single DataFrame called gapminder. This is a row-wise concatenation, similar to how you concatenated the monthly Uber datasets in Chapter 3. INSTRUCTIONS 100XP -Use pd.concat() to concatenate g1800s, g1900s, and g2000s into one DataFrame called gapminder. Make sure you pass DataFrames to pd.concat() in the form of a list. -Print the shape and the head of the concatenated DataFrame. ''' # Concatenate the DataFrames row-wise gapminder = pd.concat([g1800s, g1900s, g2000s]) # Print the shape of gapminder print(gapminder.shape) # Print the head of gapminder print(gapminder.head())
class MinStack(object): def __init__(self): """ initialize your data structure here. """ self.data = [] def push(self, x): """ :type x: int :rtype: void """ self.data.append(x) def pop(self): """ :rtype: void """ if len(self.data)>0: self.data.pop() def top(self): """ :rtype: int """ if len(self.data)>0: return self.data[-1] def getMin(self): """ :rtype: int """ if len(self.data)>0: return min(self.data) # enteries = [] # while len(self.data) > 0: # enteries.append(self.top()) # self.pop() # if len(enteries)>0: # ans = min(enteries) # else: # ans = None # for et in reversed(enteries): # self.push(et) # return ans
description = 'collimator setup' group = 'lowlevel' devices = dict( tof_io = device('nicos.devices.generic.ManualSwitch', description = 'ToF', states = [1, 2, 3], lowlevel = True, ), L = device('nicos.devices.generic.Switcher', description = 'Distance', moveable = 'tof_io', mapping = { 10: 1, 13: 2, 17: 3, }, unit = 'm', precision = 0, ), collimator_io = device('nicos.devices.generic.ManualSwitch', description = 'Collimator', states = [1, 2, 3, 4, 5, 6], lowlevel = True, ), pinhole = device('nicos.devices.generic.Switcher', description = 'Hole diameter', moveable = 'collimator_io', mapping = { 6.2: 1, 3: 2, 0.85: 3, 1.5: 4, 2.5: 5, }, unit = 'mm', precision = 0, ), collimator = device('nicos_mlz.antares.devices.collimator.CollimatorLoverD', description = 'Collimator ratio (L/D)', l = 'L', d = 'pinhole', unit = 'L/D', fmtstr = '%.2f', ), )
inf = 2**33 DEBUG = 0 def bellmanFord(graph, cost, loop, start): parent = [-1] * len(graph) cost[start] = 0 for i in range(len(graph) - 1): for u in range(len(graph)): for v, c in graph[u]: if (cost[u] + c < cost[v] and cost[u] != inf): parent[v] = u cost[v] = cost[u] + c if (DEBUG): print("parent", parent) for u in range(len(graph)): for v, c in graph[u]: if (cost[u] + c < cost[v] and cost[v] != inf): #loop[u], loop[v] = 1, 1 #loop[v] = 1 start, end, done = v, u, 0 loop[end] = 1 while (end != start and done < len(graph)): end = parent[end] loop[end] = 1 done += 1 loop[end] = 1 return(0) case = 1 while (True): try: line = list(map(int, input().split())) except: break junctions, costs = line[0], line[1:] if (junctions == 0): trash = input() trash = input() print("Set #", case, sep='') case += 1 continue graph = [[] for i in range(junctions)] roads = int(input()) for i in range(roads): u, v = map(int, input().split()) u, v = u - 1, v - 1 graph[u] += [[v, (costs[v] - costs[u])**3]] if (DEBUG): print(graph) cost, loop = [inf] * junctions, [0] * junctions bellmanFord(graph, cost, loop, 0) if (DEBUG): print(cost) if (DEBUG): print(loop) queries = int(input()) print("Set #", case, sep='') for i in range(queries): query = int(input()) query -= 1 if (cost[query] < 3 or loop[query] or cost[query] == inf): print("?") else: print(cost[query]) case += 1
def chop(t): del t[0], t[-1] return None def middle(t): return t[1:-1] letters = ['a', 'b', 'c', 'd', 'e'] print(middle(letters))
"""Build extension to generate j2cl-compatible protocol buffers. Usage: j2cl_proto: generates a j2cl-compatible java_library for an existing proto_library. Example usage: load("//java/com/google/protobuf/contrib/j2cl:j2cl_proto.bzl", "j2cl_proto_library") proto_library( name = "accessor", srcs = ["accessor.proto"], ) j2cl_proto_library( name = "accessor_j2cl_proto", dep = ":accessor", ) """ # Blessed by J2CL team. This is needed for J2CL provider and J2CL provider API is # only avaiable for proto. Other should never depend on J2CL internals. load( "@com_google_j2cl//build_defs/internal_do_not_use:j2cl_common.bzl", "J2CL_TOOLCHAIN_ATTRS", "J2clInfo", "j2cl_common", ) load( "//java/com/google/protobuf/contrib/immutablejs:immutable_js_proto_library.bzl", "ImmutableJspbInfo", "immutable_js_proto_library_aspect", ) load(":j2cl_proto_provider.bzl", "J2clProtoInfo") def _unarchived_jar_path(path): """Get the path of the unarchived directory. Args: path: The path to the archive file. Returns: The path to the directory that this file will expand to. """ if not path.endswith(".srcjar"): fail("Path %s doesn't end in \".srcjar\"" % path) return path[0:-7] def _j2cl_proto_library_aspect_impl(target, ctx): artifact_suffix = "-j2cl" srcs = target[ProtoInfo].direct_sources transitive_srcs = target[ProtoInfo].transitive_sources deps = [target[ImmutableJspbInfo].js] deps += [dep[J2clProtoInfo]._private_.j2cl_info for dep in ctx.rule.attr.deps] transitive_runfiles = [target[ImmutableJspbInfo]._private_.runfiles] transitive_runfiles += [dep[J2clProtoInfo]._private_.runfiles for dep in ctx.rule.attr.deps] jar_archive = None if srcs: jar_archive = ctx.actions.declare_file(ctx.label.name + artifact_suffix + ".srcjar") protoc_command_template = """ set -e -o pipefail rm -rf {dir} mkdir -p {dir} {protoc} --plugin=protoc-gen-j2cl_protobuf={protoc_plugin} \ --proto_path=. \ --proto_path={genfiles} \ --j2cl_protobuf_out={dir} \ {proto_sources} java_files=$(find {dir} -name '*.java') chmod -R 664 $java_files {java_format} -i $java_files {jar} -cf {jar_file} -C {dir} . """ protoc_command = protoc_command_template.format( dir = _unarchived_jar_path(jar_archive.path), protoc = ctx.executable._protocol_compiler.path, protoc_plugin = ctx.executable._protoc_gen_j2cl.path, genfiles = ctx.configuration.genfiles_dir.path, proto_sources = " ".join([s.path for s in srcs]), jar = ctx.executable._jar.path, jar_file = jar_archive.path, java_format = ctx.executable._google_java_formatter.path, ) resolved_tools, resolved_command, input_manifest = ctx.resolve_command( command = protoc_command, tools = [ ctx.attr._protocol_compiler, ctx.attr._protoc_gen_j2cl, ctx.attr._jar, ctx.attr._google_java_formatter, ], ) ctx.actions.run_shell( command = resolved_command, inputs = transitive_srcs, tools = resolved_tools, outputs = [jar_archive], input_manifests = input_manifest, progress_message = "Generating J2CL proto files", ) runtime_deps = [d[J2clInfo] for d in ctx.attr._j2cl_proto_implicit_deps] transitive_runfiles += [ d[DefaultInfo].default_runfiles.files for d in ctx.attr._j2cl_proto_implicit_deps ] j2cl_provider = j2cl_common.compile( ctx, srcs = [jar_archive], deps = deps + runtime_deps, artifact_suffix = artifact_suffix, ) else: # Considers deps as exports in no srcs case. j2cl_provider = j2cl_common.compile( ctx, exports = deps, artifact_suffix = artifact_suffix, ) js = j2cl_common.get_jsinfo_provider(j2cl_provider) return J2clProtoInfo( _private_ = struct( j2cl_info = j2cl_provider, srcjar = jar_archive, runfiles = depset(js.srcs, transitive = transitive_runfiles), ), js = js, ) _j2cl_proto_library_aspect = aspect( implementation = _j2cl_proto_library_aspect_impl, required_aspect_providers = [ImmutableJspbInfo], attr_aspects = ["deps"], provides = [J2clProtoInfo], attrs = dict(J2CL_TOOLCHAIN_ATTRS, **{ "_j2cl_proto_implicit_deps": attr.label_list( default = [ Label("//third_party:gwt-jsinterop-annotations-j2cl"), Label("//third_party:jsinterop-base-j2cl"), Label("//third_party:j2cl_proto_runtime"), ], ), "_protocol_compiler": attr.label( executable = True, cfg = "host", default = Label("//third_party:protocol_compiler"), ), "_protoc_gen_j2cl": attr.label( executable = True, cfg = "host", default = Label("//java/com/google/protobuf/contrib/j2cl/internal_do_not_use:J2CLProtobufCompiler"), ), "_jar": attr.label( executable = True, cfg = "host", default = Label("@bazel_tools//tools/jdk:jar"), ), "_google_java_formatter": attr.label( cfg = "host", executable = True, default = Label("//third_party:google_java_format"), allow_files = True, ), }), fragments = ["java", "js"], ) def _j2cl_proto_library_rule_impl(ctx): if len(ctx.attr.deps) != 1: fail("Only one deps entry allowed") j2cl_proto_info = ctx.attr.deps[0][J2clProtoInfo] output = [] srcjar = j2cl_proto_info._private_.srcjar if srcjar: output = ctx.actions.declare_directory(ctx.label.name + "_for_testing_do_not_use") ctx.actions.run_shell( inputs = [srcjar], outputs = [output], command = ( "mkdir -p %s && " % output.path + "%s x %s -d %s" % (ctx.executable._zip.path, srcjar.path, output.path) ), tools = [ctx.executable._zip], ) output = [output] # This is a workaround to b/35847804 to make sure the zip ends up in the runfiles. # We are doing this transitively since we need to workaround the issue for the files generated # by the aspect as well. runfiles = j2cl_proto_info._private_.runfiles return j2cl_common.create_js_lib_struct( j2cl_info = j2cl_proto_info._private_.j2cl_info, extra_providers = [ DefaultInfo(runfiles = ctx.runfiles(transitive_files = runfiles)), OutputGroupInfo(for_testing_do_not_use = output), ], ) # WARNING: # This rule should really be private since it intoduces a new proto runtime # to the repo and using this will cause diamond dependency problems. # Use regular j2cl_proto_library rule with the blaze flag # (--define j2cl_proto=interop). new_j2cl_proto_library = rule( implementation = _j2cl_proto_library_rule_impl, attrs = { "deps": attr.label_list( providers = [ProtoInfo], aspects = [immutable_js_proto_library_aspect, _j2cl_proto_library_aspect], ), "_zip": attr.label( cfg = "host", executable = True, default = Label("@bazel_tools//tools/zip:zipper"), ), }, fragments = ["js"], )
# Day 20: http://adventofcode.com/2016/day/20 inp = [(5, 8), (0, 2), (4, 7)] def allowed(blocked, n): rng, *blocked = sorted([*r] for r in blocked) for cur in blocked: if cur[0] > n: break elif cur[0] > rng[-1] + 1: yield from range(rng[-1] + 1, cur[0]) rng = cur else: rng[-1] = max(rng[-1], cur[-1]) yield from range(rng[-1] + 1, n + 1) if __name__ == '__main__': ips = list(allowed(inp, 9)) print('There are', len(ips), 'allowed IPs:') for i, x in enumerate(ips, start=1): print(f'{i}) {x}')
''' Given a string s consisting of some words separated by some number of spaces, return the length of the last word in the string. A word is a maximal substring consisting of non-space characters only. Example 1: Input: s = "Hello World" Output: 5 Explanation: The last word is "World" with length 5. Example 2: Input: s = " fly me to the moon " Output: 4 Explanation: The last word is "moon" with length 4. Example 3: Input: s = "luffy is still joyboy" Output: 6 Explanation: The last word is "joyboy" with length 6. Constraints: 1 <= s.length <= 104 s consists of only English letters and spaces ' '. There will be at least one word in s. ''' class Solution: def lengthOfLastWord(self, s: str) -> int: return len(list(s.strip().split(' '))[-1])
def problem_31(): "How many different ways can £2 be made using any number of 1p, 2p, 5p, 10p, 20p, 50p, £1 (100p), and £2 (200p) coins?" # Get the target value of the coin, as well as all possible coin values (in pence) target_value = 200 coin_values = [1, 2, 5, 10, 20, 50, 100, 200] polynomials_list = [] # For all coin values... for value in coin_values: # Generate a polynomial representing all values which can be made solely # by this coin, up to and including the target value polynomials_list.append( {k: 1 for k in range(0, target_value + 1, value)}) # Start with a polynomial, f, popped off the generated list f = polynomials_list.pop() # For each remaining polynomial expression... for expression in polynomials_list: polynomial_product = {} # For each exponent in the expression... for k in expression.keys(): # And for each exponent in f... for j in f.keys(): # Add the powers power = k + j # Multiply the coefficients coefficient = (expression[k] * f[j]) # If the power doesn't exist in the multiplied polynomial... if(power not in polynomial_product.keys()): # Set that exponent's product to 0 polynomial_product[power] = 0 # Add the calculated coefficient to the coefficient on the product polynomial_product[power] += coefficient # Set f to the polynomial product f = polynomial_product # Return the coefficient of x^200, which is how many ways 200p can be formed from the specified coin_values return f[200] if __name__ == "__main__": answer = problem_31() print(answer)
test = { 'name': 'q5_2', 'points': 1, 'suites': [ { 'cases': [ { 'code': '>>> # Hint: If you are getting 47 as your answer, you might be computing the biggest change rather than biggest decrease!;\n' '>>> biggest_decrease != 47\n' 'True', 'hidden': False, 'locked': False}, {'code': '>>> # Hint: biggest decrease is above 30, but not 47;\n>>> 30 <= biggest_decrease < 47\nTrue', 'hidden': False, 'locked': False}], 'scored': True, 'setup': '', 'teardown': '', 'type': 'doctest'}]}
def best_sum_tab(n, a): table = [None for i in range(n + 1)] table[0] = [] for i in range(n + 1): if table[i] is not None: for j in a: if (i + j) < len(table): temp = table[i] + [j] if table[i + j] is None: table[i + j] = temp elif len(temp) < len(table[i + j]): table[i + j] = temp return table[n] if __name__ == "__main__": print(best_sum_tab(7, [5, 3, 4, 7])) print(best_sum_tab(8, [2, 3, 5])) print(best_sum_tab(8, [1, 4, 5])) print(best_sum_tab(100, [1, 2, 5, 25]))
if opt.save_every > 0 and num_updates % opt.save_every == -1 % opt.save_every: valid_loss = self.eval(self.valid_data) valid_ppl = math.exp(min(valid_loss, 100)) print('Validation perplexity: %g' % valid_ppl) ep = float(epoch) - 1. + ((float(i) + 1.) / n_samples) self.save(ep, valid_ppl, batch_order=batch_order, iteration=i)
FEATURES = set( [ "five_prime_utr", "three_prime_utr", "CDS", "exon", "intron", "start_codon", "stop_codon", "ncRNA", ] ) NON_CODING_BIOTYPES = set( [ "Mt_rRNA", "Mt_tRNA", "miRNA", "misc_RNA", "rRNA", "scRNA", "snRNA", "snoRNA", "ribozyme", "sRNA", "scaRNA", "lncRNA", "ncRNA", "Mt_tRNA_pseudogene", "tRNA_pseudogene", "snoRNA_pseudogene", "snRNA_pseudogene", "scRNA_pseudogene", "rRNA_pseudogene", "misc_RNA_pseudogene", "miRNA_pseudogene", "non_coding", "known_ncrna ", "lincRNA ", "macro_lncRNA ", "3prime_overlapping_ncRNA", "vault_RNA", "vaultRNA", "bidirectional_promoter_lncRNA", ] )
# Runtime: 20 ms # Beats 100% of Python submissions class Solution(object): def checkRecord(self, s): """ :type s: str :rtype: bool """ if s.count("LLL") > 0: return False if s.count("A") > 2: return False return True # A more worked out solution is: # class Solution(object): # def checkRecord(self, s): # """ # :type s: str # :rtype: bool # """ # a_count = 0 # cons_p_count = 0 # for day in s: # if day == 'A': # a_count +=1 # if day == 'L': # cons_p_count += 1 # else: # cons_p_count = 0 # if a_count > 1: # return False # if cons_p_count > 2: # return False # return True
#Donald Hobson #A program to make big letters out of small ones #storeage of pattern to make large letters. largeLetter=[[" A ", " A A ", " AAA ", "A A", "A A",], ["BBBB ", "B B", "BBBBB", "B B", "BBBB "],[ " cccc", "c ", "c ", "c ", " cccc",],[ "DDDD ", "D D", "D D", "D D", "DDDD "],[ "EEEEE", "E ", "EEEE ", "E ", "EEEEE"],[ "FFFFF", "F ", "FFFF ", "F ", "F "],[ " GGG ", "G ", "G GG", "G G", " GGG "],[ "H H", "H H", "HHHHH", "H H", "H H"],[ "IIIII", " I ", " I ", " I ", "IIIII"],[ " JJJJ", " J ", " J ", " J ", "JJJ "],[ "K K", "K KK ", "KK ", "K KK ", "K K"],[ "L ", "L ", "L ", "L ", "LLLLL"],[ "M M", "MM MM", "M M M", "M M", "M M"],[ "N N", "NN N", "N N N", "N NN", "N N"],[ " OOO ", "O O", "O O", "O O", " OOO "],[ "PPPP ", "P P", "PPPP ", "P ", "P "],[ " QQ ", "Q Q ", "Q QQ ", "Q Q ", " QQ Q"],[ "RRRR ", "R R", "RRRR ", "R R ", "R R"],[ " SSSS", "S ", " SSS ", " S", "SSSS "],[ "TTTTT", " T ", " T ", " T ", " T "],[ "U U", "U U", "U U", "U U", " UUU "],[ "V V", "V V", " V V ", " V V ", " V "],[ "W W", "W W", "W W", "W W W", " W W "],[ "X X", " X X ", " X ", " X X ", "X X"],[ "Y Y", " Y Y ", " Y ", " Y ", " Y "],[ "ZZZZZ", " Z ", " Z ", " Z ", "ZZZZZ"]] # Outer loop, For repeating whle process while True: largeText=input("Large Text>").upper() while True: method=input("Calital \"C\" , Lowercase \"L\" or Subtext \"S\" >").upper() if method=="C"or method=="L": break if method=="S": subtext="" while len(subtext)==0: subtext=input("Subtext is >") positionInSubtext=0 subtextLength=len(subtext) break largeTextSections=[] print() while len(largeText)>19: largeTextSections.append(largeText[:19]) largeText=largeText[19:] if len(largeText)>0: largeTextSections.append(largeText) for section in largeTextSections: for i in range(5): string="" for line in section: if line==" ": string+=" "*5 else: if method=="S": for character in range (5): newstr=largeLetter[ord(line)-65][i] if largeLetter[ord(line)-65][i][character]==" ": string+=" " else: string+=subtext[positionInSubtext] positionInSubtext=(positionInSubtext+1)%subtextLength elif method=="L": string+=largeLetter[ord(line)-65][i].lower() else: string+=largeLetter[ord(line)-65][i] string+=" " print(string) print("\n") if input("Do you wish to exit \"Y\"/\"N\" >").upper() =="Y": break
EGAUGE_API_URLS = { 'stored' : 'http://%s.egaug.es/cgi-bin/egauge-show', 'instantaneous' : 'http://%s.egaug.es/cgi-bin/egauge', }
t = int(input()) for i in range(t): n=int(input()) l=0 h=100000 while l<=h: mid =(l+h)//2 r= (mid*(mid+1))//2 if r>n: h=mid - 1 else: ht=mid l=mid+1 print(ht)
""" Hello world application. Mostly just to test the Python setup on current computer. """ MESSSAGE = "Hello World" print(MESSSAGE)
class Solution: def singleNumber(self, nums: List[int]) -> List[int]: dict_val = {} result1 = [] result2 = [] for val in nums: dict_val[val] = dict_val.get(val, 0) + 1 if dict_val[val] > 1: result1.append(val) else: result2.append(val) return set(result2)-set(result1) class Solution: def singleNumber(self, nums: List[int]) -> List[int]: dict_val = {} result1 = [] result2 = [] for val in nums: dict_val[val] = dict_val.get(val, 0) + 1 return [k for k, v in sorted(dict_val.items(), key=lambda item: item[1])][:2]
# (c) 2012-2019, Ansible by Red Hat # # This file is part of Ansible Galaxy # # Ansible Galaxy is free software: you can redistribute it and/or modify # it under the terms of the Apache License as published by # the Apache Software Foundation, either version 2 of the License, or # (at your option) any later version. # # Ansible Galaxy is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # Apache License for more details. # # You should have received a copy of the Apache License # along with Galaxy. If not, see <http://www.apache.org/licenses/>. SURVEY_FIElDS = ( 'docs', 'ease_of_use', 'does_what_it_says', 'works_as_is', 'used_in_production', ) def calculate_survey_score(surveys): ''' :var surveys: queryset container all of the surveys for a collection or a repository ''' score = 0 answer_count = 0 survey_score = 0.0 for survey in surveys: for k in SURVEY_FIElDS: data = getattr(survey, k) if data is not None: answer_count += 1 survey_score += (data - 1) / 4 # Average and convert to 0-5 scale score = (survey_score / answer_count) * 5 return score
__author__ = 'arid6405' class SfcsmError(Exception): def __init__(self, status, message): self.status = status self.message = message def __str__(self): return "Error {}: {} ".format(self.status, self.message)
print(' - '*14) print('{:=^40}'.format('Banco Centavo Não')) print(' - '*14) saque = int(input('Qual valor você quer sacar? R$')) print('='*40) cel_50 = int(saque / 50) if cel_50 > 0: print(f'Total de {cel_50} cédulas de R$50') cel_20 = int((saque % 50) / 20) if cel_20 > 0: print(f'Total de {cel_20} cédulas de R$20') cel_10 = int(((saque % 50) % 20) / 10) if cel_10 > 0: print(f'Total de {cel_10} cédulas de R$10') moed_1 = int((((saque % 50) % 20) % 10) / 1) if moed_1 > 0: print(f'Total de {moed_1} moédas de R$1') print('='*40)
""" The core calculation, ``work_hours+hol_hours- 13*7.4``, translates as 'the total number of hours minus the number of mandatory leave days times by the number of hours in the average working day, which is :math:`\\frac{37}{5}=7.4`, which altogether gives the total number of hours available to be worked. Dividing this number by 37 gives the number of weeks in the year that can be worked, which is a key figure in working out space requirements. """ def definition(): """ Calculates the number of weeks actually workable, accounting for universal mandatory leave (bank holidays and efficiency days). """ sql = """ SELECT *, (work_hours+hol_hours- 13*7.4)/37 as open_weeks FROM staff_con_type_hours """ return sql
def decode(s): dec = dict() def dec_pos(x,e): for i in range(x+1): e=dec[e] return e for i in range(32,127): dec[encode(chr(i))] = chr(i) a='' for index,value in enumerate(s): a+=dec_pos(index,value) return a
print("---------- numero de discos ----------") def hanoi(n, source, helper, target): if n > 0: # move tower of size n - 1 to helper: hanoi(n - 1, source, target, helper) print(source, helper, target) # move disk from source peg to target peg if source: target.append(source.pop()) print(source, helper, target) # move tower of size n-1 from helper to target hanoi(n - 1, helper, source, target) print(source, helper, target) source = [5, 4, 3, 2, 1] target = [] helper = [] hanoi(len(source), source, helper, target) print(source, helper, target)
class Solution(object): def rangeBitwiseAnd(self, m, n): """ :type m: int :type n: int :rtype: int """ k = 0 while n != m: n >>= 1 m >>= 1 k += 1 return n << k
'''num=[2,5,9,1] num[2]=3 num.append(7) num.sort(reverse=True) num.insert(2, 0) #num.pop(2) if 4 in num: num.remove(4) else: print('Não achei o numero 4') print(num) print(f'tem {len(num)} elementos') print()''' valor=[] for cont in range(0,5): valor.append(int(input(f'Digite o valor {cont}: '))) for c,v in enumerate(valor): print(f'na posição {c} temos o {v}!!') #lista=[1,2,5,2,9,2,7,]
__author__ = 'schlitzer' __all__ = [ 'AdminError', 'AlreadyAuthenticatedError', 'AuthenticationError', 'BaseError', 'CredentialError', 'DuplicateResource', 'FlowError', 'InvalidBody', 'InvalidFields', 'InvalidName', 'InvalidPaginationLimit', 'InvalidParameterValue', 'InvalidSelectors', 'InvalidSortCriteria', 'InvalidUUID', 'ModelError', 'MongoConnError', 'PeerReceiverCredentialError', 'PermError', 'ResourceNotFound', 'ResourceInUse', 'SessionError', 'SessionCredentialError', 'StaticPathDisabledError', 'ValidationError' ] class BaseError(Exception): def __init__(self, status, code, msg): super().__init__() self.status = status self.msg = msg self.code = code self.err_rsp = {'errors': [{ "id": self.code, "details": self.msg, "title": self.msg }]} class AAError(BaseError): def __init__(self, status=403, code=1000, msg=None): super().__init__(status, code, msg) class ModelError(BaseError): def __init__(self, status=None, code=2000, msg=None): super().__init__(status, code, msg) class ValidationError(BaseError): def __init__(self, status=None, code=3000, msg=None): super().__init__(status, code, msg) class FeatureError(BaseError): def __init__(self, status=None, code=4000, msg=None): super().__init__(status, code, msg) class BackEndError(BaseError): def __init__(self, status=None, code=5000, msg=None): super().__init__(status, code, msg) class AuthenticationError(ModelError): def __init__(self): super().__init__( status=403, code=1001, msg="Invalid username or Password" ) class CredentialError(ModelError): def __init__(self): super().__init__( status=401, code=1002, msg="Invalid Credentials" ) class AlreadyAuthenticatedError(ModelError): def __init__(self): super().__init__( status=403, code=1003, msg="Already authenticated" ) class SessionError(ModelError): def __init__(self): super().__init__( status=403, code=1004, msg="Invalid or expired session" ) class PermError(ModelError): def __init__(self, msg): super().__init__( status=403, code=1005, msg=msg ) class SessionCredentialError(ModelError): def __init__(self): super().__init__( status=403, code=1006, msg="Neither valid Session or Credentials available" ) class AdminError(ModelError): def __init__(self): super().__init__( status=403, code=1007, msg="Root admin privilege needed for this resource" ) class PeerReceiverCredentialError(ModelError): def __init__(self): super().__init__( status=403, code=1008, msg="Receiver credentials needed for this resource" ) class ResourceNotFound(ModelError): def __init__(self, resource): super().__init__( status=404, code=2001, msg="Resource not found: {0}".format(resource) ) class DuplicateResource(ModelError): def __init__(self, resource): super().__init__( status=400, code=2002, msg="Duplicate Resource: {0}".format(resource) ) class InvalidBody(ValidationError): def __init__(self, err): super().__init__( status=400, code=3001, msg="Invalid post body: {0}".format(err) ) class InvalidFields(ValidationError): def __init__(self, err): super().__init__( status=400, code=3003, msg="Invalid field selection: {0}".format(err) ) class InvalidSelectors(ValidationError): def __init__(self, err): super().__init__( status=400, code=3004, msg="Invalid selection: {0}".format(err) ) class InvalidPaginationLimit(ValidationError): def __init__(self, err): super().__init__( status=400, code=3005, msg="Invalid pagination limit, has to be one of: {0}".format(err) ) class InvalidSortCriteria(ValidationError): def __init__(self, err): super().__init__( status=400, code=3006, msg="Invalid sort criteria: {0}".format(err) ) class InvalidParameterValue(ValidationError): def __init__(self, err): super().__init__( status=400, code=3007, msg="Invalid parameter value: {0}".format(err) ) class InvalidUUID(ValidationError): def __init__(self, err): super().__init__( status=400, code=3008, msg="Invalid uuid: {0}".format(err) ) class InvalidName(ValidationError): def __init__(self, err): super().__init__( status=400, code=3009, msg="Invalid Name: {0}".format(err) ) class ResourceInUse(ValidationError): def __init__(self, err): super().__init__( status=400, code=3010, msg="Resource is still used: {0}".format(err) ) class FlowError(ValidationError): def __init__(self, err): super().__init__( status=400, code=3011, msg="Flow Error: {0}".format(err) ) class StaticPathDisabledError(FeatureError): def __init__(self): super().__init__( status=400, code=4002, msg="Static path feature is disabled" ) class MongoConnError(BackEndError): def __init__(self, err): super().__init__( status=500, code=5001, msg="MongoDB connection error: {0}".format(err) ) class RedisConnError(BackEndError): def __init__(self, err): super().__init__( status=500, code=5002, msg="Redis connection error: {0}".format(err) )
class Solution: def twoSum(self, nums: [int], target: int) -> [int]: d = {int: int} for i in range(len(nums)): if target - nums[i] in d: return [d[target-nums[i]], i] else: d[nums[i]] = i return [] if __name__ == "__main__": solution = Solution() print(solution.twoSum([2, 7, 11, 15], 9))
# # PySNMP MIB module HH3C-VSI-MIB (http://snmplabs.com/pysmi) # ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/HH3C-VSI-MIB # Produced by pysmi-0.3.4 at Mon Apr 29 19:15:32 2019 # On host DAVWANG4-M-1475 platform Darwin version 18.5.0 by user davwang4 # Using Python version 3.7.3 (default, Mar 27 2019, 09:23:15) # OctetString, ObjectIdentifier, Integer = mibBuilder.importSymbols("ASN1", "OctetString", "ObjectIdentifier", "Integer") NamedValues, = mibBuilder.importSymbols("ASN1-ENUMERATION", "NamedValues") ConstraintsUnion, ConstraintsIntersection, ValueSizeConstraint, SingleValueConstraint, ValueRangeConstraint = mibBuilder.importSymbols("ASN1-REFINEMENT", "ConstraintsUnion", "ConstraintsIntersection", "ValueSizeConstraint", "SingleValueConstraint", "ValueRangeConstraint") hh3cCommon, = mibBuilder.importSymbols("HH3C-OID-MIB", "hh3cCommon") ModuleCompliance, NotificationGroup = mibBuilder.importSymbols("SNMPv2-CONF", "ModuleCompliance", "NotificationGroup") MibIdentifier, NotificationType, ObjectIdentity, Unsigned32, Bits, IpAddress, Counter64, iso, MibScalar, MibTable, MibTableRow, MibTableColumn, Counter32, Gauge32, ModuleIdentity, TimeTicks, Integer32 = mibBuilder.importSymbols("SNMPv2-SMI", "MibIdentifier", "NotificationType", "ObjectIdentity", "Unsigned32", "Bits", "IpAddress", "Counter64", "iso", "MibScalar", "MibTable", "MibTableRow", "MibTableColumn", "Counter32", "Gauge32", "ModuleIdentity", "TimeTicks", "Integer32") RowStatus, DisplayString, TextualConvention = mibBuilder.importSymbols("SNMPv2-TC", "RowStatus", "DisplayString", "TextualConvention") hh3cVsi = ModuleIdentity((1, 3, 6, 1, 4, 1, 25506, 2, 105)) hh3cVsi.setRevisions(('2009-08-08 10:00',)) if mibBuilder.loadTexts: hh3cVsi.setLastUpdated('200908081000Z') if mibBuilder.loadTexts: hh3cVsi.setOrganization('Hangzhou H3C Tech. Co., Ltd.') hh3cVsiObjects = MibIdentifier((1, 3, 6, 1, 4, 1, 25506, 2, 105, 1)) hh3cVsiScalarGroup = MibIdentifier((1, 3, 6, 1, 4, 1, 25506, 2, 105, 1, 1)) hh3cVsiNextAvailableVsiIndex = MibScalar((1, 3, 6, 1, 4, 1, 25506, 2, 105, 1, 1, 1), Unsigned32()).setMaxAccess("readonly") if mibBuilder.loadTexts: hh3cVsiNextAvailableVsiIndex.setStatus('current') hh3cVsiTable = MibTable((1, 3, 6, 1, 4, 1, 25506, 2, 105, 1, 2), ) if mibBuilder.loadTexts: hh3cVsiTable.setStatus('current') hh3cVsiEntry = MibTableRow((1, 3, 6, 1, 4, 1, 25506, 2, 105, 1, 2, 1), ).setIndexNames((0, "HH3C-VSI-MIB", "hh3cVsiIndex")) if mibBuilder.loadTexts: hh3cVsiEntry.setStatus('current') hh3cVsiIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 25506, 2, 105, 1, 2, 1, 1), Unsigned32()) if mibBuilder.loadTexts: hh3cVsiIndex.setStatus('current') hh3cVsiName = MibTableColumn((1, 3, 6, 1, 4, 1, 25506, 2, 105, 1, 2, 1, 2), OctetString().subtype(subtypeSpec=ValueSizeConstraint(1, 31))).setMaxAccess("readcreate") if mibBuilder.loadTexts: hh3cVsiName.setStatus('current') hh3cVsiMode = MibTableColumn((1, 3, 6, 1, 4, 1, 25506, 2, 105, 1, 2, 1, 3), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4, 5))).clone(namedValues=NamedValues(("martini", 1), ("minm", 2), ("martiniAndMinm", 3), ("kompella", 4), ("kompellaAndMinm", 5)))).setMaxAccess("readcreate") if mibBuilder.loadTexts: hh3cVsiMode.setStatus('current') hh3cMinmIsid = MibTableColumn((1, 3, 6, 1, 4, 1, 25506, 2, 105, 1, 2, 1, 4), Integer32()).setMaxAccess("readcreate") if mibBuilder.loadTexts: hh3cMinmIsid.setStatus('current') hh3cVsiId = MibTableColumn((1, 3, 6, 1, 4, 1, 25506, 2, 105, 1, 2, 1, 5), Unsigned32()).setMaxAccess("readcreate") if mibBuilder.loadTexts: hh3cVsiId.setStatus('current') hh3cVsiTransMode = MibTableColumn((1, 3, 6, 1, 4, 1, 25506, 2, 105, 1, 2, 1, 6), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("vlan", 1), ("ethernet", 2)))).setMaxAccess("readcreate") if mibBuilder.loadTexts: hh3cVsiTransMode.setStatus('current') hh3cVsiEnableHubSpoke = MibTableColumn((1, 3, 6, 1, 4, 1, 25506, 2, 105, 1, 2, 1, 7), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("disable", 1), ("enable", 2)))).setMaxAccess("readcreate") if mibBuilder.loadTexts: hh3cVsiEnableHubSpoke.setStatus('current') hh3cVsiAdminState = MibTableColumn((1, 3, 6, 1, 4, 1, 25506, 2, 105, 1, 2, 1, 8), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("adminUp", 1), ("adminDown", 2)))).setMaxAccess("readcreate") if mibBuilder.loadTexts: hh3cVsiAdminState.setStatus('current') hh3cVsiRowStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 25506, 2, 105, 1, 2, 1, 9), RowStatus()).setMaxAccess("readcreate") if mibBuilder.loadTexts: hh3cVsiRowStatus.setStatus('current') hh3cVsiXconnectTable = MibTable((1, 3, 6, 1, 4, 1, 25506, 2, 105, 1, 3), ) if mibBuilder.loadTexts: hh3cVsiXconnectTable.setStatus('current') hh3cVsiXconnectEntry = MibTableRow((1, 3, 6, 1, 4, 1, 25506, 2, 105, 1, 3, 1), ).setIndexNames((0, "HH3C-VSI-MIB", "hh3cVsiXconnectIfIndex"), (0, "HH3C-VSI-MIB", "hh3cVsiXconnectEvcSrvInstId")) if mibBuilder.loadTexts: hh3cVsiXconnectEntry.setStatus('current') hh3cVsiXconnectIfIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 25506, 2, 105, 1, 3, 1, 1), Unsigned32()) if mibBuilder.loadTexts: hh3cVsiXconnectIfIndex.setStatus('current') hh3cVsiXconnectEvcSrvInstId = MibTableColumn((1, 3, 6, 1, 4, 1, 25506, 2, 105, 1, 3, 1, 2), Unsigned32()) if mibBuilder.loadTexts: hh3cVsiXconnectEvcSrvInstId.setStatus('current') hh3cVsiXconnectVsiName = MibTableColumn((1, 3, 6, 1, 4, 1, 25506, 2, 105, 1, 3, 1, 3), OctetString().subtype(subtypeSpec=ValueSizeConstraint(1, 31))).setMaxAccess("readcreate") if mibBuilder.loadTexts: hh3cVsiXconnectVsiName.setStatus('current') hh3cVsiXconnectAccessMode = MibTableColumn((1, 3, 6, 1, 4, 1, 25506, 2, 105, 1, 3, 1, 4), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("vlan", 1), ("ethernet", 2)))).setMaxAccess("readcreate") if mibBuilder.loadTexts: hh3cVsiXconnectAccessMode.setStatus('current') hh3cVsiXconnectHubSpoke = MibTableColumn((1, 3, 6, 1, 4, 1, 25506, 2, 105, 1, 3, 1, 5), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3))).clone(namedValues=NamedValues(("none", 1), ("hub", 2), ("spoke", 3)))).setMaxAccess("readcreate") if mibBuilder.loadTexts: hh3cVsiXconnectHubSpoke.setStatus('current') hh3cVsiXconnectRowStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 25506, 2, 105, 1, 3, 1, 6), RowStatus()).setMaxAccess("readcreate") if mibBuilder.loadTexts: hh3cVsiXconnectRowStatus.setStatus('current') mibBuilder.exportSymbols("HH3C-VSI-MIB", hh3cVsiMode=hh3cVsiMode, hh3cMinmIsid=hh3cMinmIsid, hh3cVsi=hh3cVsi, hh3cVsiXconnectAccessMode=hh3cVsiXconnectAccessMode, hh3cVsiXconnectRowStatus=hh3cVsiXconnectRowStatus, hh3cVsiXconnectHubSpoke=hh3cVsiXconnectHubSpoke, hh3cVsiEntry=hh3cVsiEntry, hh3cVsiObjects=hh3cVsiObjects, hh3cVsiNextAvailableVsiIndex=hh3cVsiNextAvailableVsiIndex, hh3cVsiTransMode=hh3cVsiTransMode, hh3cVsiXconnectVsiName=hh3cVsiXconnectVsiName, hh3cVsiAdminState=hh3cVsiAdminState, hh3cVsiIndex=hh3cVsiIndex, hh3cVsiScalarGroup=hh3cVsiScalarGroup, hh3cVsiId=hh3cVsiId, hh3cVsiRowStatus=hh3cVsiRowStatus, PYSNMP_MODULE_ID=hh3cVsi, hh3cVsiName=hh3cVsiName, hh3cVsiEnableHubSpoke=hh3cVsiEnableHubSpoke, hh3cVsiTable=hh3cVsiTable, hh3cVsiXconnectEntry=hh3cVsiXconnectEntry, hh3cVsiXconnectEvcSrvInstId=hh3cVsiXconnectEvcSrvInstId, hh3cVsiXconnectIfIndex=hh3cVsiXconnectIfIndex, hh3cVsiXconnectTable=hh3cVsiXconnectTable)
class RemoveStoryboard(ControllableStoryboardAction): """ A trigger action that removes a System.Windows.Media.Animation.Storyboard. RemoveStoryboard() """
vals = [0,10,-30,173247,123,19892122] formats = ['%o','%020o', '%-20o', '%#o', '+%o', '+%#o'] for val in vals: for fmt in formats: print(fmt+":", fmt % val)
class RoutedCommand(object,ICommand): """ Defines a command that implements System.Windows.Input.ICommand and is routed through the element tree. RoutedCommand() RoutedCommand(name: str,ownerType: Type) RoutedCommand(name: str,ownerType: Type,inputGestures: InputGestureCollection) """ def CanExecute(self,parameter,target): """ CanExecute(self: RoutedCommand,parameter: object,target: IInputElement) -> bool Determines whether this System.Windows.Input.RoutedCommand can execute in its current state. parameter: A user defined data type. target: The command target. Returns: true if the command can execute on the current command target; otherwise,false. """ pass def Execute(self,parameter,target): """ Execute(self: RoutedCommand,parameter: object,target: IInputElement) Executes the System.Windows.Input.RoutedCommand on the current command target. parameter: User defined parameter to be passed to the handler. target: Element at which to begin looking for command handlers. """ pass def __init__(self,*args): """ x.__init__(...) initializes x; see x.__class__.__doc__ for signaturex.__init__(...) initializes x; see x.__class__.__doc__ for signaturex.__init__(...) initializes x; see x.__class__.__doc__ for signature """ pass @staticmethod def __new__(self,name=None,ownerType=None,inputGestures=None): """ __new__(cls: type) __new__(cls: type,name: str,ownerType: Type) __new__(cls: type,name: str,ownerType: Type,inputGestures: InputGestureCollection) """ pass def __repr__(self,*args): """ __repr__(self: object) -> str """ pass InputGestures=property(lambda self: object(),lambda self,v: None,lambda self: None) """Gets the collection of System.Windows.Input.InputGesture objects that are associated with this command. Get: InputGestures(self: RoutedCommand) -> InputGestureCollection """ Name=property(lambda self: object(),lambda self,v: None,lambda self: None) """Gets the name of the command. Get: Name(self: RoutedCommand) -> str """ OwnerType=property(lambda self: object(),lambda self,v: None,lambda self: None) """Gets the type that is registered with the command. Get: OwnerType(self: RoutedCommand) -> Type """ CanExecuteChanged=None
# File: gcloudcomputeengine_consts.py # # Copyright (c) 2021 Splunk Inc. # # Licensed under Apache 2.0 (https://www.apache.org/licenses/LICENSE-2.0.txt) # Define your constants here COMPUTE = 'compute' COMPUTE_VERSION = 'v1' # Error message handling constants ERR_CODE_MSG = "Error code unavailable" ERR_MSG_UNAVAILABLE = "Error message unavailable. Please check the asset configuration and|or action parameters" PARSE_ERR_MSG = "Unable to parse the error message. Please check the asset configuration and|or action parameters"
#!/usr/bin/env python3 def byterize(obj): objdict = obj.__dict__['fields'] def do_encode(dictio, key): if isinstance(dictio[key], str) and len(dictio[key]) > 0 and key not in ['SecondaryAddr']: dictio[key] = dictio[key].encode('latin-1') elif hasattr(dictio[key], '__dict__'): subdictio = dictio[key].__dict__['fields'] for subkey in subdictio: do_encode(subdictio, subkey) for field in objdict: do_encode(objdict, field) return obj def justify(astring, indent = 35, break_every = 100): str_indent = ('\n' + ' ' * indent) splitted = astring.split('\n') longests = [(n, s) for n, s in enumerate(splitted) if len(s) >= break_every] for longest in longests: lines = [] for i in range(0, len(longest[1]), break_every): lines.append(longest[1][i : i + break_every]) splitted[longest[0]] = str_indent.join(lines) if len(splitted) > 1: justy = str_indent.join(splitted) else: justy = str_indent + str_indent.join(splitted) return justy class ShellStyle(object): def style(self, s, style): return style + s + '\033[0m' def green(self, s): return self.style(s, '\033[92m') def blue(self, s): return self.style(s, '\033[94m') def yellow(self, s): return self.style(s, '\033[93m') def red(self, s): return self.style(s, '\033[91m') def magenta(self, s): return self.style(s, '\033[95m') def cyan(self, s): return self.style(s, '\033[96m') def white(self, s): return self.style(s, '\033[97m') def bold(self, s): return self.style(s, '\033[1m') def underline(self, s): return self.style(s, '\033[4m') def shell_message(nshell): shelldict = {0: ShellStyle().yellow("Client generating RPC Bind Request..."), 1: ShellStyle().yellow("Client sending RPC Bind Request...") + ShellStyle().red("\t\t\t\t===============>"), 2: ShellStyle().red("===============>\t\t") + ShellStyle().yellow("Server received RPC Bind Request !!!"), 3: ShellStyle().yellow("\t\t\t\tServer parsing RPC Bind Request..."), 4: ShellStyle().yellow("\t\t\t\tServer generating RPC Bind Response..."), 5: ShellStyle().red("<===============\t\t") + ShellStyle().yellow("Server sending RPC Bind Response..."), 6: ShellStyle().green("\t\t\t\tRPC Bind acknowledged !!!\n"), 7: ShellStyle().yellow("Client received RPC Bind Response !!!") + ShellStyle().red("\t\t\t\t<==============="), 8: ShellStyle().green("RPC Bind acknowledged !!!\n"), 9: ShellStyle().blue("Client generating Activation Request dictionary..."), 10: ShellStyle().blue("Client generating Activation Request data..."), 11: ShellStyle().blue("Client generating RPC Activation Request..."), 12: ShellStyle().blue("Client sending RPC Activation Request...") + ShellStyle().red("\t\t\t===============>"), 13: ShellStyle().red("===============>\t\t") + ShellStyle().blue("Server received RPC Activation Request !!!"), 14: ShellStyle().blue("\t\t\t\tServer parsing RPC Activation Request..."), 15: ShellStyle().blue("\t\t\t\tServer processing KMS Activation Request..."), 16: ShellStyle().blue("\t\t\t\tServer processing KMS Activation Response..."), 17: ShellStyle().blue("\t\t\t\tServer generating RPC Activation Response..."), 18: ShellStyle().red("<===============\t\t") + ShellStyle().blue("Server sending RPC Activation Response..."), 19: ShellStyle().green("\t\t\t\tServer responded, now in Stand by...\n"), 20: ShellStyle().blue("Client received Response !!!") + ShellStyle().red("\t\t\t\t\t<==============="), 21: ShellStyle().green("Activation Done !!!"), -1: ShellStyle().red("\t\t\t\t\t\t\t\tServer receiving"), -2: ShellStyle().red("Client sending"), -3: ShellStyle().red("Client receiving"), -4: ShellStyle().red("\t\t\t\t\t\t\t\tServer sending") } if isinstance(nshell, list): for n in nshell: print(shelldict[n]) else: print(shelldict[nshell])
"""Settings for the kytos/storehouse NApp.""" # Path to serialize the objects, this is relative to a venv, if a venv exists. CUSTOM_DESTINATION_PATH = "/var/tmp/kytos/storehouse"
class DaftException(Exception): def __init__(self, reason): self.reason = reason def __str__(self): return "Error: " + self.reason
class Solution: def transformArray(self, arr: List[int]) -> List[int]: na = arr[:] stable = False while not stable: stable = True for i in range(1, len(arr) - 1): if arr[i] < arr[i-1] and arr[i] < arr[i+1]: na[i] = arr[i] + 1 stable = False elif arr[i] > arr[i-1] and arr[i] > arr[i+1]: na[i] = arr[i] - 1 stable = False else: na[i] = arr[i] arr = na[:] return arr
try: p=8778 b=56434 #f = open("ab.txt") p = b/0 f = open("ab.txt") for line in f: print(line) except FileNotFoundError as e: print( e.filename) except Exception as e: print(e) except ZeroDivisionError as e: print(e) #except (FileNotFoundError , ZeroDivisionError): #print("file not found") #except ZeroDivisionError: #print("zero division error") #i = 0/0 #we made some changes
# *************************************************************************************** # *************************************************************************************** # # Name : errors.py # Author : Paul Robson (paul@robsons.org.uk) # Date : 9th December 2018 # Purpose : Error classes # # *************************************************************************************** # *************************************************************************************** # *************************************************************************************** # Compiler Error # *************************************************************************************** class CompilerException(Exception): def __init__(self,message): self.message = message def get(self): return "{0} ({1}:{2})".format(self.message,CompilerException.FILENAME,CompilerException.LINENUMBER) CompilerException.FILENAME = "test" CompilerException.LINENUMBER = 42 if __name__ == "__main__": ex = CompilerException("Division by 42 error") print(ex.get()) raise ex
"""Unit tests for image_uploader.bzl.""" load( "//skylark:integration_tests.bzl", "SutComponentInfo" ) load( ":image_uploader.bzl", "image_uploader_sut_component", ) load("//skylark:unittest.bzl", "asserts", "unittest") load("//skylark:toolchains.bzl", "toolchain_container_images") # image_uploader_sut_component_basic_test tests the image_uploader_sut_component # rule and makes sure that it converts correctly into an underlying # sut_component by examining the SutComponentInfo output of the rule. def _image_uploader_sut_component_basic_test_impl(ctx): env = unittest.begin(ctx) provider = ctx.attr.dep[SutComponentInfo] asserts.set_equals( env, depset([ "name: \"" + ctx.attr.rule_name + "_prepare\" " + "setups {" + "file: \"skylark/image_uploader/generate_image_name.sh\" " + "timeout_seconds: 3 " + "args: \"--registry\" args: \"" + ctx.attr.registry + "\" " + "args: \"--repository\" args: \"" + ctx.attr.repository + "\" " + "output_properties {key: \"image\"}" + "} " + "teardowns {" + "file: \"skylark/image_uploader/delete_image.sh\" " + "timeout_seconds: 60 " + "args: \"{image}\"" + "} " + "docker_image: \"" + toolchain_container_images()["rbe-integration-test"] + "\" " + "num_requested_ports: 0", "name: \"" + ctx.attr.rule_name + "\" " + "setups {" + "file: \"skylark/image_uploader/create_and_upload_image.sh\" " + "timeout_seconds: 600 " + "args: \"--base_image\" args: \"" + ctx.attr.base_image + "\" " + "args: \"--directory\" args: \"" + ctx.attr.directory + "\" " + "".join(["args: \"--file\" args: \"%s\" " % f for f in ctx.attr.files]) + "args: \"--new_image\" args: \"{prep#image}\" " + "output_properties {key: \"image\"}" + "} " + "docker_image: \"" + toolchain_container_images()["rbe-integration-test"] + "\" " + "sut_component_alias {" + "target: \"" + ctx.attr.rule_name + "_prepare\" " + "local_alias: \"prep\"" + "} " + "num_requested_ports: 1" ]), provider.sut_protos) asserts.set_equals( env, depset([ctx.file.prepare, ctx.file.setup]), provider.setups) asserts.set_equals( env, depset([ctx.file.teardown]), provider.teardowns) asserts.set_equals(env, depset(ctx.files.data), provider.data) unittest.end(env) image_uploader_sut_component_basic_test = unittest.make( _image_uploader_sut_component_basic_test_impl, attrs={"dep": attr.label(), "rule_name" : attr.string(), "prepare": attr.label(allow_single_file = True), "setup": attr.label(allow_single_file = True), "teardown": attr.label(allow_single_file = True), "base_image": attr.string(), "directory": attr.string(), "data": attr.label_list(allow_files = True), "files": attr.string_list(), "registry": attr.string(), "repository": attr.string()} ) def test_image_uploader_sut_component_basic(): """Generates a basic image_uploader_sut_component.""" base_image = "gcr.io/base_project/img" directory = "/path/to/dir/in/container/" registry = "gcr.io" repository = "new_project/prefix_of_new_image" image_uploader_sut_component( name = "image_uploader_sut_component_basic_subject", base_image = base_image, directory = directory, files = [ "testdata/file1.txt", "testdata/file2.txt", ], registry = registry, repository = repository ) image_uploader_sut_component_basic_test( name = "image_uploader_sut_component_basic", dep = "image_uploader_sut_component_basic_subject", rule_name = "//skylark/image_uploader:image_uploader_sut_component_basic_subject", prepare = "generate_image_name.sh", setup = "create_and_upload_image.sh", teardown = "delete_image.sh", base_image = base_image, directory = directory, data = [ "testdata/file1.txt", "testdata/file2.txt", ], files = [ "skylark/image_uploader/testdata/file1.txt", "skylark/image_uploader/testdata/file2.txt", ], registry = registry, repository = repository) def image_uploader_sut_component_test_suite(): test_image_uploader_sut_component_basic() native.test_suite( name = "image_uploader_sut_component_test", tests = [ "image_uploader_sut_component_basic", ], )
# coding: utf8 """ 题目链接: https://leetcode.com/problems/kth-smallest-element-in-a-bst/description. 题目描述: Given a binary search tree, write a function kthSmallest to find the kth smallest element in it. Note: You may assume k is always valid, 1 ≤ k ≤ BST's total elements. Follow up: What if the BST is modified (insert/delete operations) often and you need to find the kth smallest frequently? How would you optimize the kthSmallest routine? Credits: Special thanks to @ts for adding this problem and creating all test cases. """ # Definition for a binary tree node. class TreeNode(object): def __init__(self, x): self.val = x self.left = None self.right = None class NewTreeNode(object): def __init__(self, x): self.val = x # 新增字段: 记录当前节点的左右子树节点数 self.count = 1 self.left = None self.right = None class Solution(object): def kthSmallest(self, root, k): """ :type root: TreeNode :type k: int :rtype: int """ self.k = k # return self.binary_search_tree_inorder_recursive_optimization(root) # ans = [] # self.binary_search_tree_inorder_iterative(root, ans) # return ans[k - 1] # return self.binary_search_tree_inorder_iterative_optimization(root, k) # return self.binary_search_tree_conquer(root, k) root = self.reconstruct_tree(root) return self.binary_search_tree_conquer_optimization(root, k) # 返回完整的中序序列, 需要额外数组空间存储 def binary_search_tree_inorder_iterative(self, root, ans): stack = [] while root or stack: while root: stack.append(root) root = root.left if stack: root = stack.pop() ans.append(root.val) root = root.right # 计数, k时, 直接返回(递归) def binary_search_tree_inorder_recursive_optimization(self, root): if not root: return -1 val = self.binary_search_tree_inorder_recursive_optimization(root.left) if self.k == 0: return val self.k -= 1 if self.k == 0: return root.val return self.binary_search_tree_inorder_recursive_optimization(root.right) # 计数, k时, 直接返回(非递归) def binary_search_tree_inorder_iterative_optimization(self, root, k): stack = [] while root or stack: while root: stack.append(root) root = root.left if stack: root = stack.pop() k -= 1 if k == 0: return root.val root = root.right return -1 # 分治法: 计算左右子树节点数 def binary_search_tree_conquer(self, root, k): if not root: return -1 nodes_num = self.calc_nodes(root.left) if k <= nodes_num: return self.binary_search_tree_conquer(root.left, k) elif k > nodes_num + 1: return self.binary_search_tree_conquer(root.right, k - nodes_num - 1) return root.val def calc_nodes(self, root): if not root: return 0 return 1 + self.calc_nodes(root.left) + self.calc_nodes(root.right) # Follow up: 频繁修改节点, 频繁查找k小数值 # 在上述的分治法基础上, 进行优化 # 每次递归计算节点左右子树的节点数, 会造成不必要的开销 # 可以考虑, 修改TreeNode, 新增count字段, 记录当前节点的左右子树节点数 def binary_search_tree_conquer_optimization(self, root, k): if not root: return -1 if root.left: nodes_num = root.left.count if k <= nodes_num: return self.binary_search_tree_conquer_optimization(root.left, k) elif k > nodes_num + 1: return self.binary_search_tree_conquer_optimization(root.right, k - nodes_num - 1) return root.val else: if k == 1: return root.val return self.binary_search_tree_conquer_optimization(root.right, k - 1) def reconstruct_tree(self, root): if not root: return None left = self.reconstruct_tree(root.left) right = self.reconstruct_tree(root.right) root = NewTreeNode(root.val) root.left, root.right = left, right if root.left: root.count += root.left.count if root.right: root.count += root.right.count return root
def get_options_ratio(options, total): return options / total def get_faculty_rating(get_options_ratio): if get_options_ratio > .9 and get_options_ratio < 1: return "Excellent" if get_options_ratio > .8 and get_options_ratio < .9: return "Very Good" if get_options_ratio > .7 and get_options_ratio < .8: return "Good" if get_options_ratio > .6 and get_options_ratio < .7: return "Needs Improvement" if get_options_ratio > 0 and get_options_ratio < .6: return "Unacceptable"
"""Exceptions and Error Handling""" def assert_(condition, message='', exception_type=AssertionError): """Like assert, but with arbitrary exception types.""" if not condition: raise exception_type(message) # ------ VALUE ERRORS ------ class ShapeError(ValueError): pass class FrequencyValueError(ValueError): pass class DeviceError(ValueError): pass class NotSetError(ValueError): pass # ------ TYPE ERRORS ------ class NotTorchModuleError(TypeError): pass class FrequencyTypeError(TypeError): pass class DTypeError(TypeError): pass # ------ LOOKUP ERRORS ------ class ClassNotFoundError(LookupError): pass # ------ NOT-IMPLEMENTED ERRORS ------ class NotUnwrappableError(NotImplementedError): pass
''' Given a word, you need to judge whether the usage of capitals in it is right or not. We define the usage of capitals in a word to be right when one of the following cases holds: All letters in this word are capitals, like "USA". All letters in this word are not capitals, like "leetcode". Only the first letter in this word is capital, like "Google". Otherwise, we define that this word doesn't use capitals in a right way. ''' class Solution: def detectCapitalUse(self, word: str) -> bool: s = word all_caps = True all_low = True for i in range(len(s)): if s[i].isupper() == False: all_caps = False break for i in range(len(s)): if s[i].islower() == False: all_low = False break first_letter_cap = s[0].isupper() the_rest = s[1:] for i in range(len(the_rest)): if the_rest[i].isupper(): first_letter_cap = False break if all_caps or all_low or first_letter_cap: return True return False
# See readme.md for instructions on running this code. class HelpHandler(object): def usage(self): return ''' This plugin will give info about Zulip to any user that types a message saying "help". This is example code; ideally, you would flesh this out for more useful help pertaining to your Zulip instance. ''' def triage_message(self, message): # return True if we think the message may be of interest original_content = message['content'] if message['type'] != 'stream': return True if original_content.lower().strip() != 'help': return False return True def handle_message(self, message, client): help_content = ''' Info on Zulip can be found here: https://github.com/zulip/zulip '''.strip() client.send_message(dict( type='stream', to=message['display_recipient'], subject=message['subject'], content=help_content, )) handler_class = HelpHandler
''' Given a string S, return the "reversed" string where all characters that are not a letter stay in the same place, and all letters reverse their positions. Example 1: Input: "ab-cd" Output: "dc-ba" Example 2: Input: "a-bC-dEf-ghIj" Output: "j-Ih-gfE-dCba" Example 3: Input: "Test1ng-Leet=code-Q!" Output: "Qedo1ct-eeLg=ntse-T!" Note: S.length <= 100 33 <= S[i].ASCIIcode <= 122 S doesn't contain \ or " ''' def reverseOnlyLetters(S): l = "" r = [None]*len(S) # add not letters for i, char in enumerate(S): if char.isalpha(): l+=char else: r[i] = char # print(l, r) # add leters j=len(l)-1 for i in range(len(r)): if r[i] == None: r[i] = l[j] j-=1 # print("".join(r)) return("".join(r)) def reverseOnlyLetters2(S): r = ['']*len(S) i, j = len(S)-1, 0 while i >=0 and j < len(S): if S[i].isalpha(): r[j] = S[i] else: while not S[j].isalpha(): j+=1 if j >=len(S): j-=1 break if j < len(S): r[j] = S[i] i-=1 j+=1 print("".join(r)) return "".join(r) reverseOnlyLetters("21-a_bc1=")
"""Top-level package for Railyard.""" __author__ = """Konstantin Taletskiy""" __email__ = 'konstantin@taletskiy.com' __version__ = '0.1.0'
test_cases_q = [{'q': 'Stockholms län'}, {'q': 'Stockholms län Halmstad'}, {'q': 'Stockholms län Norrbotten'}, {'q': 'Stockholms län Järfälla'}, {'q': 'Stockholms län Sigtuna'}, {'q': 'Skåne län'}, {'q': 'Skåne län Luleå'}, {'q': 'Skåne län Gotland'}, {'q': 'Skåne län Norrbotten'}, {'q': 'Skåne län Järfälla'}, {'q': 'Skåne län Västra hamnen'}, {'q': 'Skåne län Trelleborg'}, {'q': 'Sjuksköterska'}, {'q': 'Sjuksköterska Lärare'}, {'q': 'Sjuksköterska Utvecklare'}, {'q': 'Sjuksköterska Specialpedagog'}, {'q': 'Sjuksköterska Mjukvaruutvecklare'}, {'q': 'Sjuksköterska Intensivvårdssjuksköterska'}, {'q': 'Sjuksköterska Lärare i grundskolan'}, {'q': 'Skåne län svenska'}, {'q': 'huvudkontor'}, {'q': 'Lärare Utvecklare'}, {'q': 'Lärare'}, {'q': 'engineer'}, {'q': 'engineer kock'}, {'q': 'CAD gymnasieutbildning'}, {'q': 'gymnasieutbildning kandidatexamen'}, {'q': 'SFI gymnasieutbildning'}, {'q': 'sjuksköterskeexamen gymnasieutbildning'}, {'q': 'gymnasieutbildning masterexamen'}, {'q': 'Lärare Specialpedagog'}, {'q': 'gymnasieutbildning'}, {'q': 'Lärare Mjukvaruutvecklare'}, {'q': 'Lärare Intensivvårdssjuksköterska'}, {'q': 'Lärare Lärare i grundskolan'}, {'q': 'Skåne län engelska'}, {'q': 'Halmstad Luleå'}, {'q': 'Falun Luleå'}, {'q': 'Halmstad Falun'}, {'q': 'Gotland Halmstad'}, {'q': 'Gotland Luleå'}, {'q': 'Norrbotten Halmstad'}, {'q': 'Järfälla Halmstad'}, {'q': 'Järfälla Luleå'}, {'q': 'Gotland Falun'}, {'q': 'Sigtuna Halmstad'}, {'q': 'Sigtuna Luleå'}, {'q': 'Norrbotten Luleå'}, {'q': 'Trelleborg Luleå'}, {'q': 'Trelleborg Halmstad'}, {'q': 'Utvecklare Specialpedagog'}, {'q': 'Piteå Halmstad'}, {'q': 'Piteå Luleå'}, {'q': 'Halmstad Bromma'}, {'q': 'Luleå Bromma'}, {'q': 'Norrbotten Falun'}, {'q': 'Norrbotten Gotland'}, {'q': 'Järfälla Falun'}, {'q': 'Gotland Järfälla'}, {'q': 'Halmstad Hisingen'}, {'q': 'Luleå Hisingen'}, {'q': 'Utvecklare'}, {'q': 'Utvecklare Mjukvaruutvecklare'}, {'q': 'Utvecklare Intensivvårdssjuksköterska'}, {'q': 'c#'}, {'q': '.net'}, {'q': 'CAD'}, {'q': 'Falu Luleå'}, {'q': 'Sigtuna Falun'}, {'q': 'Stockholms län huvudkontor'}, {'q': 'Gotland Sigtuna'}, {'q': 'Södermanland Halmstad'}, {'q': 'Södermanland Luleå'}, {'q': 'Halmstad Kungsängen'}, {'q': 'Halmstad Märsta'}, {'q': 'Luleå Kungsängen'}, {'q': 'Luleå Märsta'}, {'q': 'Gnesta Halmstad'}, {'q': 'Gnesta Luleå'}, {'q': 'Utvecklare Lärare i grundskolan'}, {'q': 'Halmstad Bålsta'}, {'q': 'Luleå Bålsta'}, {'q': 'Halmstad Västra hamnen'}, {'q': 'Luleå Västra hamnen'}, {'q': 'Trelleborg Falun'}, {'q': 'Gotland Trelleborg'}, {'q': 'Stockholms län excel'}, {'q': 'Halmstad'}, {'q': 'Luleå'}, {'q': 'Piteå Falun'}, {'q': 'Gotland Piteå'}, {'q': 'Falun Bromma'}, {'q': 'Norrbotten Järfälla'}, {'q': 'Gotland Bromma'}, {'q': 'Stockholms län Sjuksköterska'}, {'q': 'Skåne län produkter'}, {'q': 'Norrbotten Sigtuna'}, {'q': 'Falun Hisingen'}, {'q': 'Järfälla Sigtuna'}, {'q': 'Gotland Hisingen'}, {'q': 'Gotland Falu'}, {'q': 'Södermanland Falun'}, {'q': 'Södermanland Gotland'}, {'q': 'Falun Kungsängen'}, {'q': 'Falun Märsta'}, {'q': 'Gotland Kungsängen'}, {'q': 'Gotland Märsta'}, {'q': 'Norrbotten Trelleborg'}, {'q': 'Gnesta Falun'}, {'q': 'Gotland Gnesta'}, {'q': 'Falun Bålsta'}, {'q': 'Järfälla Trelleborg'}, {'q': 'Gotland Bålsta'}, {'q': 'Skåne län telefon'}, {'q': 'Gotland Västra hamnen'}, {'q': 'Norrbotten Bromma'}, {'q': 'Järfälla Piteå'}, {'q': 'Falu Falun'}, {'q': 'CAD kandidatexamen'}, {'q': 'Järfälla Bromma'}, {'q': 'Trelleborg Sigtuna'}, {'q': 'Falun'}, {'q': 'Norrbotten Piteå'}, {'q': 'Gotland'}, {'q': 'Sigtuna Piteå'}, {'q': 'Norrbotten Hisingen'}, {'q': 'Sigtuna Bromma'}, {'q': 'Järfälla Hisingen'}, {'q': 'Skåne län Sjuksköterska'}, {'q': 'Norrbotten Falu'}, {'q': 'Järfälla Falu'}, {'q': 'Norrbotten Södermanland'}, {'q': 'Sigtuna Hisingen'}, {'q': 'Södermanland Järfälla'}, {'q': 'Norrbotten Kungsängen'}, {'q': 'Norrbotten Märsta'}, {'q': 'CAD SFI'}, {'q': 'Trelleborg Piteå'}, {'q': 'Falu Sigtuna'}, {'q': 'Norrbotten Gnesta'}, {'q': 'Järfälla Märsta'}, {'q': 'Järfälla Kungsängen'}, {'q': 'Stockholms län Lärare'}, {'q': 'Norrbotten Bålsta'}, {'q': 'Trelleborg Bromma'}, {'q': 'Järfälla Gnesta'}, {'q': 'CAD sjuksköterskeexamen'}, {'q': 'Norrbotten Västra hamnen'}, {'q': 'Södermanland Sigtuna'}, {'q': 'CAD masterexamen'}, {'q': 'Järfälla Bålsta'}, {'q': 'Skåne län huvudkontor'}, {'q': 'Järfälla Västra hamnen'}, {'q': 'Piteå Bromma'}, {'q': 'Sigtuna Kungsängen'}, {'q': 'ica'}, {'q': 'Gnesta Sigtuna'}, {'q': 'Stockholms län gymnasieutbildning'}, {'q': 'Norrbotten'}, {'q': 'Trelleborg Hisingen'}, {'q': 'Järfälla'}, {'q': 'SFI kandidatexamen'}, {'q': 'Sigtuna Bålsta'}, {'q': 'Sigtuna Västra hamnen'}, {'q': 'däck'}, {'q': 'Stockholms län ambitiös'}, {'q': 'Piteå Hisingen'}, {'q': 'Trelleborg Falu'}, {'q': 'Sigtuna Märsta'}, {'q': 'Bromma Hisingen'}, {'q': 'Stockholms län undervisning'}, {'q': 'sjuksköterskeexamen kandidatexamen'}, {'q': 'Södermanland Trelleborg'}, {'q': 'kandidatexamen masterexamen'}, {'q': 'Sigtuna'}, {'q': 'Falu Bromma'}, {'q': 'Södermanland Piteå'}, {'q': 'Trelleborg Kungsängen'}, {'q': 'Trelleborg Märsta'}, {'q': 'Södermanland Bromma'}, {'q': 'Trelleborg Gnesta'}, {'q': 'Mjukvaruutvecklare Specialpedagog'}, {'q': 'Trelleborg Bålsta'}, {'q': 'Piteå Kungsängen'}, {'q': 'Piteå Märsta'}, {'q': 'Trelleborg Västra hamnen'}, {'q': 'Utvecklare .net'}, {'q': 'Gnesta Piteå'}, {'q': 'Bromma Kungsängen'}, {'q': 'Märsta Bromma'}, {'q': 'Piteå Bålsta'}, {'q': 'Gnesta Bromma'}, {'q': 'Piteå Västra hamnen'}, {'q': 'Stockholms län .net'}, {'q': 'Bålsta Bromma'}, {'q': 'kandidatexamen'}, {'q': 'Södermanland Hisingen'}, {'q': 'Bromma Västra hamnen'}, {'q': 'Intensivvårdssjuksköterska Specialpedagog'}, {'q': 'SFI sjuksköterskeexamen'}, {'q': 'Trelleborg'}, {'q': 'SFI masterexamen'}, {'q': 'Stockholms län Utvecklare'}, {'q': 'fönster'}, {'q': 'Bromma'}, {'q': 'Hisingen Kungsängen'}, {'q': 'Märsta Hisingen'}, {'q': 'Södermanland Falu'}, {'q': 'sjuksköterskeexamen masterexamen'}, {'q': 'Piteå'}, {'q': 'Skåne län gymnasieutbildning'}, {'q': 'Gnesta Hisingen'}, {'q': 'Bålsta Hisingen'}, {'q': 'Gynekologi'}, {'q': 'Skåne län Lärare'}, {'q': 'Specialpedagog'}, {'q': 'Västra hamnen Hisingen'}, {'q': 'Falu Kungsängen'}, {'q': 'Falu Märsta'}, {'q': 'Mjukvaruutvecklare Intensivvårdssjuksköterska'}, {'q': 'Lärare i grundskolan Specialpedagog'}, {'q': 'Skåne län lager'}, {'q': 'Gnesta Falu'}, {'q': 'Södermanland Kungsängen'}, {'q': 'Södermanland Märsta'}, {'q': 'Stockholms län utredning'}, {'q': 'Stockholms län ica'}, {'q': 'Falu Västra hamnen'}, {'q': 'Skåne län felsökning'}, {'q': 'Södermanland Gnesta'}, {'q': 'Södermanland Bålsta'}, {'q': 'BB'}, {'q': 'Logoped'}, {'q': 'Hisingen'}, {'q': 'Mjukvaruutvecklare'}, {'q': 'Märsta Kungsängen'}, {'q': 'Södermanland Västra hamnen'}, {'q': 'SFI'}, {'q': 'Gnesta Kungsängen'}, {'q': 'Gnesta Märsta'}, {'q': 'Mjukvaruutvecklare Lärare i grundskolan'}, {'q': 'Bålsta Kungsängen'}, {'q': 'Märsta Bålsta'}, {'q': 'Falu Mora Borlänge heltid'}, {'q': 'Falu'}, {'q': 'Märsta Västra hamnen'}, {'q': 'Västra hamnen Kungsängen'}, {'q': 'Gnesta Bålsta'}, {'q': 'sjuksköterskeexamen'}, {'q': 'masterexamen'}, {'q': 'Gnesta Västra hamnen'}, {'q': 'Södermanland'}, {'q': 'Bålsta Västra hamnen'}, {'q': 'Gävle ärlighet'}, {'q': 'Västmanland Södermanland Kronobergs län Gotland mat kassa'}, {'q': 'Skåne län Utvecklare'}, {'q': 'Skåne län .net'}, {'q': 'gymnasieutbildning huvudkontor'}, {'q': 'Intensivvårdssjuksköterska'}, {'q': 'Märsta'}, {'q': 'elgiganten'}, {'q': 'Capio sjuksköterska'}, {'q': 'Intensivvårdssjuksköterska Lärare i grundskolan'}, {'q': 'Stockholms län kandidatexamen'}, {'q': 'Kungsängen'}, {'q': 'Norrbotten körkort'}, {'q': 'Sjuksköterska huvudkontor'}, {'q': 'Sundbyberg Solna Järfälla Barnskötare Ledsagare Personlig assistent Vårdare'}, {'q': 'Stockholms län däck'}, {'q': 'Stockholms län läkare'}, {'q': 'Stockholms län CAD'}, {'q': 'Gnesta'}, {'q': 'Utvecklare huvudkontor'}, {'q': 'Bålsta'}, {'q': 'Skåne län ica'}, {'q': 'Västra hamnen'}, {'q': 'Västmanland Södermanland vård'}, {'q': 'Bromma Vällingby Danderyd sjuksköterska undersjuksköterska'}, {'q': 'Sjuksköterska sjuksköterskeexamen'}, {'q': 'Stockholms län Specialpedagog'}, {'q': 'Lärare SFI'}, {'q': 'Sollentuna personlig assistent säljare telefonist'}, {'q': 'Skåne län CAD'}, {'q': 'Grundutbildad sjuksköterska'}, {'q': 'Grundutbildad sjuksköterska Intensivvårdssjuksköterska'}, {'q': 'Grundutbildad sjuksköterska Lärare i grundskolan'}, {'q': 'Grundutbildad sjuksköterska Specialpedagog'}, {'q': 'Intensivvårdssjuksköterska Grundutbildad sjuksköterska'}, {'q': 'Lärare Grundutbildad sjuksköterska'}, {'q': 'Mjukvaruutvecklare Grundutbildad sjuksköterska'}, {'q': 'Sjuksköterska Grundutbildad sjuksköterska'}, {'q': 'Utvecklare Grundutbildad sjuksköterska'}, {'q': 'Norrbotten undersköterska'}, {'q': 'Västmanland Södermanland Kronobergs län kock'}, {'q': 'Västmanland Södermanland bil'}, {'q': 'Västmanland Södermanland ekonomi juridik'}, {'q': 'Mjukvaruutvecklare .net'}, {'q': 'Västmanland lärare'}, {'q': 'Västmanland Södermanland ekonomi'}, {'q': 'Ica coop willys hemköp'}, {'q': 'Lärare i grundskolan'}, {'q': 'Norrbotten Personlig assistent'}, {'q': 'Skåne län bilmekaniker'}, {'q': 'Norrbotten säljare'}, {'q': 'Norrbotten huvudkontor'}, {'q': 'Täby Danderyd Upplands väsby Vallentuna Upplands-bro förare lagerarbetare truckförare'}, {'q': 'Norrbotten arbetslivserfarenhet'}, {'q': 'Södermanland chef'}, {'q': 'Stockholms län Mjukvaruutvecklare'}, {'q': 'Skåne län Grundutbildad sjuksköterska'}, {'q': 'Södermanland utesäljare hemsäljare'}, {'q': 'Västmanland ingenjör civilingenjör'}, {'q': 'Västmanland säljare'}, {'q': 'Norrbotten Lärare'}, {'q': 'Skåne län lärare i fritidshem'}, {'q': 'Södermanland Sjuksköterska'}, {'q': 'Västmanland bygg'}, {'q': 'Skåne län Mjukvaruutvecklare'}, {'q': 'Stockholms län Lärare i grundskolan'}, {'q': 'Stockholms län lärare i grundskolan'}, {'q': 'Västmanland Södermanland it'}, {'q': 'Aleris attendo'}, {'q': 'Capio sjuksjköterska'}, {'q': 'Mcdonalds max sybilla burger king stockholm'}, { 'q': 'Norrbotten lärare i grundskolan lärare i fritidshem lärare i praktiska och estetiska ämnen lärare i förskoleklass'}, {'q': 'Skåne län Lärare i grundskolan'}, {'q': "Starbucks Wayne's Coffee Nero"}, {'q': 'Södermanland Lärare'}, {'q': 'Södermanland Lärare i grundskolan'}, {'q': 'Västmanland Södermanland Kronobergs län ica coop hemköp'}, {'q': 'anktbhrxzn huvudkontor'}, {'q': 'asbvqxuapb Falu'}, {'q': 'ddkpqndxhk Bålsta'}, {'q': 'dhutfjwawz Bromma'}, {'q': 'dkhjwtbopt Trelleborg'}, {'q': 'ekrccsykeq ica'}, {'q': 'fbmpmghcpj Specialpedagog'}, {'q': 'gifrrcdjsu Kungsängen'}, {'q': 'jpqgkssaku .net'}, {'q': 'mebdwxawkv masterexamen'}, {'q': 'mqihoxjiul Sjuksköterska'}, {'q': 'myykioegcb gymnasieutbildning'}, {'q': 'nwswkfjhlz CAD'}, {'q': 'pbrvzzrdln SFI'}]
# # PySNMP MIB module NMS-EPON-ONU-SERIAL-PORT (http://snmplabs.com/pysmi) # ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/NMS-EPON-ONU-SERIAL-PORT # Produced by pysmi-0.3.4 at Mon Apr 29 20:12:14 2019 # On host DAVWANG4-M-1475 platform Darwin version 18.5.0 by user davwang4 # Using Python version 3.7.3 (default, Mar 27 2019, 09:23:15) # OctetString, ObjectIdentifier, Integer = mibBuilder.importSymbols("ASN1", "OctetString", "ObjectIdentifier", "Integer") NamedValues, = mibBuilder.importSymbols("ASN1-ENUMERATION", "NamedValues") ConstraintsIntersection, ValueSizeConstraint, ConstraintsUnion, ValueRangeConstraint, SingleValueConstraint = mibBuilder.importSymbols("ASN1-REFINEMENT", "ConstraintsIntersection", "ValueSizeConstraint", "ConstraintsUnion", "ValueRangeConstraint", "SingleValueConstraint") nmsEPONGroup, = mibBuilder.importSymbols("NMS-SMI", "nmsEPONGroup") ModuleCompliance, NotificationGroup = mibBuilder.importSymbols("SNMPv2-CONF", "ModuleCompliance", "NotificationGroup") iso, MibScalar, MibTable, MibTableRow, MibTableColumn, ModuleIdentity, Integer32, ObjectIdentity, IpAddress, Counter32, MibIdentifier, Bits, Unsigned32, TimeTicks, Counter64, NotificationType, Gauge32 = mibBuilder.importSymbols("SNMPv2-SMI", "iso", "MibScalar", "MibTable", "MibTableRow", "MibTableColumn", "ModuleIdentity", "Integer32", "ObjectIdentity", "IpAddress", "Counter32", "MibIdentifier", "Bits", "Unsigned32", "TimeTicks", "Counter64", "NotificationType", "Gauge32") DisplayString, RowStatus, MacAddress, TruthValue, PhysAddress, TextualConvention = mibBuilder.importSymbols("SNMPv2-TC", "DisplayString", "RowStatus", "MacAddress", "TruthValue", "PhysAddress", "TextualConvention") nmsEponOnuSerialPort = MibIdentifier((1, 3, 6, 1, 4, 1, 11606, 10, 101, 27)) nmsEponOnuSerialPortTable = MibTable((1, 3, 6, 1, 4, 1, 11606, 10, 101, 27, 1), ) if mibBuilder.loadTexts: nmsEponOnuSerialPortTable.setStatus('mandatory') nmsEponOnuSerialPortEntry = MibTableRow((1, 3, 6, 1, 4, 1, 11606, 10, 101, 27, 1, 1), ).setIndexNames((0, "NMS-EPON-ONU-SERIAL-PORT", "llidIfIndex"), (0, "NMS-EPON-ONU-SERIAL-PORT", "onuSerialPortSeqNo")) if mibBuilder.loadTexts: nmsEponOnuSerialPortEntry.setStatus('mandatory') llidIfIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 11606, 10, 101, 27, 1, 1, 1), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: llidIfIndex.setStatus('mandatory') onuSerialPortSeqNo = MibTableColumn((1, 3, 6, 1, 4, 1, 11606, 10, 101, 27, 1, 1, 2), Integer32().subtype(subtypeSpec=ValueRangeConstraint(224, 239))).setMaxAccess("readonly") if mibBuilder.loadTexts: onuSerialPortSeqNo.setStatus('mandatory') onuSerialPortSpeed = MibTableColumn((1, 3, 6, 1, 4, 1, 11606, 10, 101, 27, 1, 1, 3), Integer32().subtype(subtypeSpec=ValueRangeConstraint(300, 115200))).setMaxAccess("readwrite") if mibBuilder.loadTexts: onuSerialPortSpeed.setStatus('mandatory') onuSerialPortDataBits = MibTableColumn((1, 3, 6, 1, 4, 1, 11606, 10, 101, 27, 1, 1, 4), Integer32().subtype(subtypeSpec=ValueRangeConstraint(5, 8))).setMaxAccess("readwrite") if mibBuilder.loadTexts: onuSerialPortDataBits.setStatus('mandatory') onuSerialPortHaltBits = MibTableColumn((1, 3, 6, 1, 4, 1, 11606, 10, 101, 27, 1, 1, 5), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 2))).setMaxAccess("readwrite") if mibBuilder.loadTexts: onuSerialPortHaltBits.setStatus('mandatory') onuSerialPortParity = MibTableColumn((1, 3, 6, 1, 4, 1, 11606, 10, 101, 27, 1, 1, 6), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 1, 2))).clone(namedValues=NamedValues(("none", 0), ("odd", 1), ("even", 2)))).setMaxAccess("readwrite") if mibBuilder.loadTexts: onuSerialPortParity.setStatus('mandatory') onuSerialPortFlowControl = MibTableColumn((1, 3, 6, 1, 4, 1, 11606, 10, 101, 27, 1, 1, 7), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 1, 2))).clone(namedValues=NamedValues(("none", 0), ("software", 1), ("hardware", 2)))).setMaxAccess("readwrite") if mibBuilder.loadTexts: onuSerialPortFlowControl.setStatus('mandatory') onuSerialPortPropRowStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 11606, 10, 101, 27, 1, 1, 8), RowStatus()).setMaxAccess("readcreate") if mibBuilder.loadTexts: onuSerialPortPropRowStatus.setStatus('mandatory') onuSerialPortDataReadInterval = MibTableColumn((1, 3, 6, 1, 4, 1, 11606, 10, 101, 27, 1, 1, 9), Integer32().subtype(subtypeSpec=ValueRangeConstraint(10, 100000))).setMaxAccess("readwrite") if mibBuilder.loadTexts: onuSerialPortDataReadInterval.setStatus('mandatory') onuSerialPortDataReadBytes = MibTableColumn((1, 3, 6, 1, 4, 1, 11606, 10, 101, 27, 1, 1, 10), Integer32().subtype(subtypeSpec=ValueRangeConstraint(10, 1000))).setMaxAccess("readwrite") if mibBuilder.loadTexts: onuSerialPortDataReadBytes.setStatus('mandatory') onuSerialPortBufferRowStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 11606, 10, 101, 27, 1, 1, 11), RowStatus()).setMaxAccess("readcreate") if mibBuilder.loadTexts: onuSerialPortBufferRowStatus.setStatus('mandatory') onuSerialPortKeepaliveMode = MibTableColumn((1, 3, 6, 1, 4, 1, 11606, 10, 101, 27, 1, 1, 12), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 1))).clone(namedValues=NamedValues(("disable", 0), ("enable", 1)))).setMaxAccess("readwrite") if mibBuilder.loadTexts: onuSerialPortKeepaliveMode.setStatus('mandatory') onuSerialPortKeepaliveIdle = MibTableColumn((1, 3, 6, 1, 4, 1, 11606, 10, 101, 27, 1, 1, 13), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 10000))).setMaxAccess("readwrite") if mibBuilder.loadTexts: onuSerialPortKeepaliveIdle.setStatus('mandatory') onuSerialPortKeepaliveTimeout = MibTableColumn((1, 3, 6, 1, 4, 1, 11606, 10, 101, 27, 1, 1, 14), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 10000))).setMaxAccess("readwrite") if mibBuilder.loadTexts: onuSerialPortKeepaliveTimeout.setStatus('mandatory') onuSerialPortKeepaliveProbeCount = MibTableColumn((1, 3, 6, 1, 4, 1, 11606, 10, 101, 27, 1, 1, 15), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 1000))).setMaxAccess("readwrite") if mibBuilder.loadTexts: onuSerialPortKeepaliveProbeCount.setStatus('mandatory') onuSerialPortKeepaliveRowStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 11606, 10, 101, 27, 1, 1, 16), RowStatus()).setMaxAccess("readcreate") if mibBuilder.loadTexts: onuSerialPortKeepaliveRowStatus.setStatus('mandatory') onuSerialPortLoopback = MibTableColumn((1, 3, 6, 1, 4, 1, 11606, 10, 101, 27, 1, 1, 17), TruthValue()).setMaxAccess("readwrite") if mibBuilder.loadTexts: onuSerialPortLoopback.setStatus('mandatory') mibBuilder.exportSymbols("NMS-EPON-ONU-SERIAL-PORT", onuSerialPortDataReadInterval=onuSerialPortDataReadInterval, onuSerialPortDataReadBytes=onuSerialPortDataReadBytes, nmsEponOnuSerialPortEntry=nmsEponOnuSerialPortEntry, onuSerialPortHaltBits=onuSerialPortHaltBits, onuSerialPortBufferRowStatus=onuSerialPortBufferRowStatus, onuSerialPortDataBits=onuSerialPortDataBits, onuSerialPortSeqNo=onuSerialPortSeqNo, onuSerialPortLoopback=onuSerialPortLoopback, onuSerialPortKeepaliveTimeout=onuSerialPortKeepaliveTimeout, onuSerialPortKeepaliveMode=onuSerialPortKeepaliveMode, onuSerialPortParity=onuSerialPortParity, onuSerialPortPropRowStatus=onuSerialPortPropRowStatus, onuSerialPortKeepaliveProbeCount=onuSerialPortKeepaliveProbeCount, onuSerialPortKeepaliveIdle=onuSerialPortKeepaliveIdle, onuSerialPortSpeed=onuSerialPortSpeed, nmsEponOnuSerialPort=nmsEponOnuSerialPort, onuSerialPortFlowControl=onuSerialPortFlowControl, llidIfIndex=llidIfIndex, onuSerialPortKeepaliveRowStatus=onuSerialPortKeepaliveRowStatus, nmsEponOnuSerialPortTable=nmsEponOnuSerialPortTable)