content stringlengths 7 1.05M | fixed_cases stringlengths 1 1.28M |
|---|---|
class Command(object):
def get_option(self, name):
pass
def run(self, ):
raise NotImplementedError
| class Command(object):
def get_option(self, name):
pass
def run(self):
raise NotImplementedError |
a, b, c, d = map(int, input().split())
if a+b > c+d:
print("Left")
elif a+b < c+d:
print("Right")
else:
print("Balanced")
| (a, b, c, d) = map(int, input().split())
if a + b > c + d:
print('Left')
elif a + b < c + d:
print('Right')
else:
print('Balanced') |
# pyre-ignore-all-errors
# TODO: Change `pyre-ignore-all-errors` to `pyre-strict` on line 1, so we get
# to see all type errors in this file.
# A (hypothetical) Python developer is having trouble with a typing-related
# issue. Here is what the code looks like:
class ConfigA:
pass
class ConfigB:
some_attribute: int = 1
class HelperBase:
def __init__(self, config: ConfigA | ConfigB) -> None:
self.config = config
def common_fn(self) -> None:
pass
class HelperA(HelperBase):
def __init__(self, config: ConfigA) -> None:
super().__init__(config)
class HelperB(HelperBase):
def __init__(self, config: ConfigB) -> None:
super().__init__(config)
def some_fn(self) -> int:
return self.config.some_attribute
# The developer is confused about why Pyre reports a type error on `HelperB.some_fn`.
# Question: Is the reported type error a false positive or not?
# Question: How would you suggest changing the code to avoid the type error?
# Question: Is it a good idea to have `HelperA` and `HelperB` share the same base class?
| class Configa:
pass
class Configb:
some_attribute: int = 1
class Helperbase:
def __init__(self, config: ConfigA | ConfigB) -> None:
self.config = config
def common_fn(self) -> None:
pass
class Helpera(HelperBase):
def __init__(self, config: ConfigA) -> None:
super().__init__(config)
class Helperb(HelperBase):
def __init__(self, config: ConfigB) -> None:
super().__init__(config)
def some_fn(self) -> int:
return self.config.some_attribute |
#
# PySNMP MIB module CISCO-LWAPP-LOCAL-AUTH-MIB (http://snmplabs.com/pysmi)
# ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/CISCO-LWAPP-LOCAL-AUTH-MIB
# Produced by pysmi-0.3.4 at Mon Apr 29 17:48:42 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")
ValueSizeConstraint, ValueRangeConstraint, ConstraintsUnion, ConstraintsIntersection, SingleValueConstraint = mibBuilder.importSymbols("ASN1-REFINEMENT", "ValueSizeConstraint", "ValueRangeConstraint", "ConstraintsUnion", "ConstraintsIntersection", "SingleValueConstraint")
cLWlanIndex, = mibBuilder.importSymbols("CISCO-LWAPP-WLAN-MIB", "cLWlanIndex")
ciscoMgmt, = mibBuilder.importSymbols("CISCO-SMI", "ciscoMgmt")
ObjectGroup, ModuleCompliance, NotificationGroup = mibBuilder.importSymbols("SNMPv2-CONF", "ObjectGroup", "ModuleCompliance", "NotificationGroup")
TimeTicks, IpAddress, Gauge32, iso, MibIdentifier, ObjectIdentity, Integer32, ModuleIdentity, MibScalar, MibTable, MibTableRow, MibTableColumn, Bits, Unsigned32, Counter32, NotificationType, Counter64 = mibBuilder.importSymbols("SNMPv2-SMI", "TimeTicks", "IpAddress", "Gauge32", "iso", "MibIdentifier", "ObjectIdentity", "Integer32", "ModuleIdentity", "MibScalar", "MibTable", "MibTableRow", "MibTableColumn", "Bits", "Unsigned32", "Counter32", "NotificationType", "Counter64")
TextualConvention, DisplayString, RowStatus, TruthValue = mibBuilder.importSymbols("SNMPv2-TC", "TextualConvention", "DisplayString", "RowStatus", "TruthValue")
ciscoLwappLocalAuthMIB = ModuleIdentity((1, 3, 6, 1, 4, 1, 9, 9, 619))
ciscoLwappLocalAuthMIB.setRevisions(('2010-02-09 00:00', '2009-11-24 00:00', '2007-03-15 00:00',))
if mibBuilder.loadTexts: ciscoLwappLocalAuthMIB.setLastUpdated('201002090000Z')
if mibBuilder.loadTexts: ciscoLwappLocalAuthMIB.setOrganization('Cisco Systems Inc.')
ciscoLwappLocalAuthMIBNotifs = MibIdentifier((1, 3, 6, 1, 4, 1, 9, 9, 619, 0))
ciscoLwappLocalAuthMIBObjects = MibIdentifier((1, 3, 6, 1, 4, 1, 9, 9, 619, 1))
ciscoLwappLocalAuthMIBConform = MibIdentifier((1, 3, 6, 1, 4, 1, 9, 9, 619, 2))
cllaConfig = MibIdentifier((1, 3, 6, 1, 4, 1, 9, 9, 619, 1, 1))
cllaLocalAuth = MibIdentifier((1, 3, 6, 1, 4, 1, 9, 9, 619, 1, 1, 1))
cllaActiveTimeout = MibScalar((1, 3, 6, 1, 4, 1, 9, 9, 619, 1, 1, 1, 1), Unsigned32()).setUnits('seconds').setMaxAccess("readwrite")
if mibBuilder.loadTexts: cllaActiveTimeout.setStatus('current')
cllaEapIdentityReqTimeout = MibScalar((1, 3, 6, 1, 4, 1, 9, 9, 619, 1, 1, 1, 2), Unsigned32()).setUnits('seconds').setMaxAccess("readwrite")
if mibBuilder.loadTexts: cllaEapIdentityReqTimeout.setStatus('current')
cllaEapIdentityReqMaxRetries = MibScalar((1, 3, 6, 1, 4, 1, 9, 9, 619, 1, 1, 1, 3), Unsigned32()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: cllaEapIdentityReqMaxRetries.setStatus('current')
cllaEapDynamicWepKeyIndex = MibScalar((1, 3, 6, 1, 4, 1, 9, 9, 619, 1, 1, 1, 4), Unsigned32().subtype(subtypeSpec=ValueRangeConstraint(0, 3))).setMaxAccess("readwrite")
if mibBuilder.loadTexts: cllaEapDynamicWepKeyIndex.setStatus('current')
cllaEapReqTimeout = MibScalar((1, 3, 6, 1, 4, 1, 9, 9, 619, 1, 1, 1, 5), Unsigned32()).setUnits('seconds').setMaxAccess("readwrite")
if mibBuilder.loadTexts: cllaEapReqTimeout.setStatus('current')
cllaEapReqMaxRetries = MibScalar((1, 3, 6, 1, 4, 1, 9, 9, 619, 1, 1, 1, 6), Unsigned32()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: cllaEapReqMaxRetries.setStatus('current')
cllaEapMaxLoginIgnIdResp = MibScalar((1, 3, 6, 1, 4, 1, 9, 9, 619, 1, 1, 1, 7), TruthValue().clone('true')).setMaxAccess("readwrite")
if mibBuilder.loadTexts: cllaEapMaxLoginIgnIdResp.setStatus('current')
cllaEapKeyTimeout = MibScalar((1, 3, 6, 1, 4, 1, 9, 9, 619, 1, 1, 1, 8), Unsigned32().subtype(subtypeSpec=ValueRangeConstraint(200, 5000)).clone(1000)).setUnits('milliseconds').setMaxAccess("readwrite")
if mibBuilder.loadTexts: cllaEapKeyTimeout.setStatus('current')
cllaEapKeyMaxRetries = MibScalar((1, 3, 6, 1, 4, 1, 9, 9, 619, 1, 1, 1, 9), Unsigned32().subtype(subtypeSpec=ValueRangeConstraint(0, 4)).clone(2)).setMaxAccess("readwrite")
if mibBuilder.loadTexts: cllaEapKeyMaxRetries.setStatus('current')
cllaEapProfileTable = MibTable((1, 3, 6, 1, 4, 1, 9, 9, 619, 1, 1, 2), )
if mibBuilder.loadTexts: cllaEapProfileTable.setStatus('current')
cllaEapProfileEntry = MibTableRow((1, 3, 6, 1, 4, 1, 9, 9, 619, 1, 1, 2, 1), ).setIndexNames((0, "CISCO-LWAPP-LOCAL-AUTH-MIB", "cllaEapProfileName"))
if mibBuilder.loadTexts: cllaEapProfileEntry.setStatus('current')
cllaEapProfileName = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 619, 1, 1, 2, 1, 1), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 63)))
if mibBuilder.loadTexts: cllaEapProfileName.setStatus('current')
cllaEapProfileMethods = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 619, 1, 1, 2, 1, 2), Bits().clone(namedValues=NamedValues(("none", 0), ("leap", 1), ("eapFast", 2), ("tls", 3), ("peap", 4)))).setMaxAccess("readcreate")
if mibBuilder.loadTexts: cllaEapProfileMethods.setStatus('current')
cllaEapProfileCertIssuer = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 619, 1, 1, 2, 1, 3), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("cisco", 1), ("vendor", 2))).clone('cisco')).setMaxAccess("readcreate")
if mibBuilder.loadTexts: cllaEapProfileCertIssuer.setStatus('current')
cllaEapProfileCaCertificationCheck = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 619, 1, 1, 2, 1, 4), TruthValue().clone('true')).setMaxAccess("readcreate")
if mibBuilder.loadTexts: cllaEapProfileCaCertificationCheck.setStatus('current')
cllaEapProfileCnCertificationIdVerify = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 619, 1, 1, 2, 1, 5), TruthValue().clone('false')).setMaxAccess("readcreate")
if mibBuilder.loadTexts: cllaEapProfileCnCertificationIdVerify.setStatus('current')
cllaEapProfileDateValidityEnabled = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 619, 1, 1, 2, 1, 6), TruthValue().clone('true')).setMaxAccess("readcreate")
if mibBuilder.loadTexts: cllaEapProfileDateValidityEnabled.setStatus('current')
cllaEapProfileLocalCertificateRequired = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 619, 1, 1, 2, 1, 7), TruthValue().clone('false')).setMaxAccess("readcreate")
if mibBuilder.loadTexts: cllaEapProfileLocalCertificateRequired.setStatus('current')
cllaEapProfileClientCertificateRequired = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 619, 1, 1, 2, 1, 8), TruthValue().clone('false')).setMaxAccess("readcreate")
if mibBuilder.loadTexts: cllaEapProfileClientCertificateRequired.setStatus('current')
cllaEapProfileRowStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 619, 1, 1, 2, 1, 9), RowStatus()).setMaxAccess("readcreate")
if mibBuilder.loadTexts: cllaEapProfileRowStatus.setStatus('current')
cllaWlanProfileTable = MibTable((1, 3, 6, 1, 4, 1, 9, 9, 619, 1, 1, 3), )
if mibBuilder.loadTexts: cllaWlanProfileTable.setStatus('current')
cllaWlanProfileEntry = MibTableRow((1, 3, 6, 1, 4, 1, 9, 9, 619, 1, 1, 3, 1), ).setIndexNames((0, "CISCO-LWAPP-WLAN-MIB", "cLWlanIndex"))
if mibBuilder.loadTexts: cllaWlanProfileEntry.setStatus('current')
cllaWlanProfileName = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 619, 1, 1, 3, 1, 1), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 63))).setMaxAccess("readwrite")
if mibBuilder.loadTexts: cllaWlanProfileName.setStatus('current')
cllaWlanProfileState = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 619, 1, 1, 3, 1, 2), TruthValue()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: cllaWlanProfileState.setStatus('current')
cllaUserPriorityTable = MibTable((1, 3, 6, 1, 4, 1, 9, 9, 619, 1, 1, 4), )
if mibBuilder.loadTexts: cllaUserPriorityTable.setStatus('current')
cllaUserPriorityEntry = MibTableRow((1, 3, 6, 1, 4, 1, 9, 9, 619, 1, 1, 4, 1), ).setIndexNames((0, "CISCO-LWAPP-LOCAL-AUTH-MIB", "cllaUserCredential"))
if mibBuilder.loadTexts: cllaUserPriorityEntry.setStatus('current')
cllaUserCredential = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 619, 1, 1, 4, 1, 1), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("local", 1), ("ldap", 2))))
if mibBuilder.loadTexts: cllaUserCredential.setStatus('current')
cllaUserPriorityNumber = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 619, 1, 1, 4, 1, 2), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 2))).setMaxAccess("readwrite")
if mibBuilder.loadTexts: cllaUserPriorityNumber.setStatus('current')
cllaEapParams = MibIdentifier((1, 3, 6, 1, 4, 1, 9, 9, 619, 1, 1, 5))
cllaEapMethodPacTtl = MibScalar((1, 3, 6, 1, 4, 1, 9, 9, 619, 1, 1, 5, 1), Unsigned32().subtype(subtypeSpec=ValueRangeConstraint(1, 1000)).clone(10)).setUnits('days').setMaxAccess("readwrite")
if mibBuilder.loadTexts: cllaEapMethodPacTtl.setStatus('current')
cllaEapAnonymousProvEnabled = MibScalar((1, 3, 6, 1, 4, 1, 9, 9, 619, 1, 1, 5, 2), TruthValue().clone('true')).setMaxAccess("readwrite")
if mibBuilder.loadTexts: cllaEapAnonymousProvEnabled.setStatus('current')
cllaEapAuthorityId = MibScalar((1, 3, 6, 1, 4, 1, 9, 9, 619, 1, 1, 5, 3), OctetString().subtype(subtypeSpec=ValueSizeConstraint(0, 128))).setMaxAccess("readwrite")
if mibBuilder.loadTexts: cllaEapAuthorityId.setStatus('current')
cllaEapAuthorityInfo = MibScalar((1, 3, 6, 1, 4, 1, 9, 9, 619, 1, 1, 5, 4), OctetString().subtype(subtypeSpec=ValueSizeConstraint(0, 32))).setMaxAccess("readwrite")
if mibBuilder.loadTexts: cllaEapAuthorityInfo.setStatus('current')
cllaEapServerKey = MibScalar((1, 3, 6, 1, 4, 1, 9, 9, 619, 1, 1, 5, 5), OctetString().subtype(subtypeSpec=ValueSizeConstraint(1, 32))).setMaxAccess("readwrite")
if mibBuilder.loadTexts: cllaEapServerKey.setStatus('current')
cllaEapAuthorityIdLength = MibScalar((1, 3, 6, 1, 4, 1, 9, 9, 619, 1, 1, 5, 6), Unsigned32().subtype(subtypeSpec=ValueRangeConstraint(0, 128)).clone(32)).setMaxAccess("readonly")
if mibBuilder.loadTexts: cllaEapAuthorityIdLength.setStatus('current')
ciscoLwappLocalAuthMIBCompliances = MibIdentifier((1, 3, 6, 1, 4, 1, 9, 9, 619, 2, 1))
ciscoLwappLocalAuthMIBGroups = MibIdentifier((1, 3, 6, 1, 4, 1, 9, 9, 619, 2, 2))
ciscoLwappLocalAuthMIBCompliance = ModuleCompliance((1, 3, 6, 1, 4, 1, 9, 9, 619, 2, 1, 1)).setObjects(("CISCO-LWAPP-LOCAL-AUTH-MIB", "ciscoLwappLocalAuthMIBConfigGroup"))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
ciscoLwappLocalAuthMIBCompliance = ciscoLwappLocalAuthMIBCompliance.setStatus('deprecated')
ciscoLwappLocalAuthMIBComplianceRev1 = ModuleCompliance((1, 3, 6, 1, 4, 1, 9, 9, 619, 2, 1, 2)).setObjects(("CISCO-LWAPP-LOCAL-AUTH-MIB", "ciscoLwappLocalAuthMIBConfigGroupSup1"))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
ciscoLwappLocalAuthMIBComplianceRev1 = ciscoLwappLocalAuthMIBComplianceRev1.setStatus('current')
ciscoLwappLocalAuthMIBConfigGroup = ObjectGroup((1, 3, 6, 1, 4, 1, 9, 9, 619, 2, 2, 1)).setObjects(("CISCO-LWAPP-LOCAL-AUTH-MIB", "cllaActiveTimeout"), ("CISCO-LWAPP-LOCAL-AUTH-MIB", "cllaEapProfileMethods"), ("CISCO-LWAPP-LOCAL-AUTH-MIB", "cllaEapProfileCertIssuer"), ("CISCO-LWAPP-LOCAL-AUTH-MIB", "cllaEapProfileCaCertificationCheck"), ("CISCO-LWAPP-LOCAL-AUTH-MIB", "cllaEapProfileCnCertificationIdVerify"), ("CISCO-LWAPP-LOCAL-AUTH-MIB", "cllaEapProfileDateValidityEnabled"), ("CISCO-LWAPP-LOCAL-AUTH-MIB", "cllaEapProfileLocalCertificateRequired"), ("CISCO-LWAPP-LOCAL-AUTH-MIB", "cllaEapProfileClientCertificateRequired"), ("CISCO-LWAPP-LOCAL-AUTH-MIB", "cllaEapProfileRowStatus"), ("CISCO-LWAPP-LOCAL-AUTH-MIB", "cllaWlanProfileName"), ("CISCO-LWAPP-LOCAL-AUTH-MIB", "cllaWlanProfileState"), ("CISCO-LWAPP-LOCAL-AUTH-MIB", "cllaUserPriorityNumber"), ("CISCO-LWAPP-LOCAL-AUTH-MIB", "cllaEapMethodPacTtl"), ("CISCO-LWAPP-LOCAL-AUTH-MIB", "cllaEapAnonymousProvEnabled"), ("CISCO-LWAPP-LOCAL-AUTH-MIB", "cllaEapAuthorityId"), ("CISCO-LWAPP-LOCAL-AUTH-MIB", "cllaEapAuthorityInfo"), ("CISCO-LWAPP-LOCAL-AUTH-MIB", "cllaEapServerKey"), ("CISCO-LWAPP-LOCAL-AUTH-MIB", "cllaEapAuthorityIdLength"))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
ciscoLwappLocalAuthMIBConfigGroup = ciscoLwappLocalAuthMIBConfigGroup.setStatus('deprecated')
ciscoLwappLocalAuthMIBConfigGroupSup1 = ObjectGroup((1, 3, 6, 1, 4, 1, 9, 9, 619, 2, 2, 2)).setObjects(("CISCO-LWAPP-LOCAL-AUTH-MIB", "cllaActiveTimeout"), ("CISCO-LWAPP-LOCAL-AUTH-MIB", "cllaEapIdentityReqTimeout"), ("CISCO-LWAPP-LOCAL-AUTH-MIB", "cllaEapIdentityReqMaxRetries"), ("CISCO-LWAPP-LOCAL-AUTH-MIB", "cllaEapDynamicWepKeyIndex"), ("CISCO-LWAPP-LOCAL-AUTH-MIB", "cllaEapReqTimeout"), ("CISCO-LWAPP-LOCAL-AUTH-MIB", "cllaEapReqMaxRetries"), ("CISCO-LWAPP-LOCAL-AUTH-MIB", "cllaEapProfileMethods"), ("CISCO-LWAPP-LOCAL-AUTH-MIB", "cllaEapProfileCertIssuer"), ("CISCO-LWAPP-LOCAL-AUTH-MIB", "cllaEapProfileCaCertificationCheck"), ("CISCO-LWAPP-LOCAL-AUTH-MIB", "cllaEapProfileCnCertificationIdVerify"), ("CISCO-LWAPP-LOCAL-AUTH-MIB", "cllaEapProfileDateValidityEnabled"), ("CISCO-LWAPP-LOCAL-AUTH-MIB", "cllaEapProfileLocalCertificateRequired"), ("CISCO-LWAPP-LOCAL-AUTH-MIB", "cllaEapProfileClientCertificateRequired"), ("CISCO-LWAPP-LOCAL-AUTH-MIB", "cllaEapProfileRowStatus"), ("CISCO-LWAPP-LOCAL-AUTH-MIB", "cllaWlanProfileName"), ("CISCO-LWAPP-LOCAL-AUTH-MIB", "cllaWlanProfileState"), ("CISCO-LWAPP-LOCAL-AUTH-MIB", "cllaUserPriorityNumber"), ("CISCO-LWAPP-LOCAL-AUTH-MIB", "cllaEapMethodPacTtl"), ("CISCO-LWAPP-LOCAL-AUTH-MIB", "cllaEapAnonymousProvEnabled"), ("CISCO-LWAPP-LOCAL-AUTH-MIB", "cllaEapAuthorityId"), ("CISCO-LWAPP-LOCAL-AUTH-MIB", "cllaEapAuthorityInfo"), ("CISCO-LWAPP-LOCAL-AUTH-MIB", "cllaEapServerKey"), ("CISCO-LWAPP-LOCAL-AUTH-MIB", "cllaEapAuthorityIdLength"), ("CISCO-LWAPP-LOCAL-AUTH-MIB", "cllaEapMaxLoginIgnIdResp"), ("CISCO-LWAPP-LOCAL-AUTH-MIB", "cllaEapKeyTimeout"), ("CISCO-LWAPP-LOCAL-AUTH-MIB", "cllaEapKeyMaxRetries"))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
ciscoLwappLocalAuthMIBConfigGroupSup1 = ciscoLwappLocalAuthMIBConfigGroupSup1.setStatus('current')
mibBuilder.exportSymbols("CISCO-LWAPP-LOCAL-AUTH-MIB", cllaEapProfileName=cllaEapProfileName, cllaLocalAuth=cllaLocalAuth, cllaEapProfileLocalCertificateRequired=cllaEapProfileLocalCertificateRequired, cllaUserCredential=cllaUserCredential, cllaEapProfileClientCertificateRequired=cllaEapProfileClientCertificateRequired, cllaWlanProfileTable=cllaWlanProfileTable, cllaActiveTimeout=cllaActiveTimeout, cllaUserPriorityTable=cllaUserPriorityTable, cllaEapServerKey=cllaEapServerKey, cllaEapProfileCnCertificationIdVerify=cllaEapProfileCnCertificationIdVerify, cllaEapAnonymousProvEnabled=cllaEapAnonymousProvEnabled, cllaEapKeyTimeout=cllaEapKeyTimeout, cllaConfig=cllaConfig, cllaWlanProfileName=cllaWlanProfileName, cllaEapMethodPacTtl=cllaEapMethodPacTtl, ciscoLwappLocalAuthMIBObjects=ciscoLwappLocalAuthMIBObjects, cllaEapReqTimeout=cllaEapReqTimeout, cllaEapIdentityReqMaxRetries=cllaEapIdentityReqMaxRetries, cllaEapProfileDateValidityEnabled=cllaEapProfileDateValidityEnabled, cllaEapParams=cllaEapParams, cllaEapAuthorityId=cllaEapAuthorityId, ciscoLwappLocalAuthMIBComplianceRev1=ciscoLwappLocalAuthMIBComplianceRev1, cllaEapIdentityReqTimeout=cllaEapIdentityReqTimeout, cllaEapAuthorityInfo=cllaEapAuthorityInfo, ciscoLwappLocalAuthMIB=ciscoLwappLocalAuthMIB, cllaEapKeyMaxRetries=cllaEapKeyMaxRetries, cllaEapAuthorityIdLength=cllaEapAuthorityIdLength, cllaUserPriorityNumber=cllaUserPriorityNumber, cllaEapProfileMethods=cllaEapProfileMethods, ciscoLwappLocalAuthMIBConfigGroup=ciscoLwappLocalAuthMIBConfigGroup, cllaEapProfileTable=cllaEapProfileTable, PYSNMP_MODULE_ID=ciscoLwappLocalAuthMIB, cllaWlanProfileState=cllaWlanProfileState, ciscoLwappLocalAuthMIBCompliances=ciscoLwappLocalAuthMIBCompliances, cllaEapProfileCaCertificationCheck=cllaEapProfileCaCertificationCheck, cllaEapProfileRowStatus=cllaEapProfileRowStatus, cllaEapDynamicWepKeyIndex=cllaEapDynamicWepKeyIndex, cllaEapMaxLoginIgnIdResp=cllaEapMaxLoginIgnIdResp, cllaEapProfileCertIssuer=cllaEapProfileCertIssuer, cllaUserPriorityEntry=cllaUserPriorityEntry, ciscoLwappLocalAuthMIBNotifs=ciscoLwappLocalAuthMIBNotifs, ciscoLwappLocalAuthMIBConfigGroupSup1=ciscoLwappLocalAuthMIBConfigGroupSup1, ciscoLwappLocalAuthMIBGroups=ciscoLwappLocalAuthMIBGroups, ciscoLwappLocalAuthMIBCompliance=ciscoLwappLocalAuthMIBCompliance, cllaWlanProfileEntry=cllaWlanProfileEntry, ciscoLwappLocalAuthMIBConform=ciscoLwappLocalAuthMIBConform, cllaEapProfileEntry=cllaEapProfileEntry, cllaEapReqMaxRetries=cllaEapReqMaxRetries)
| (object_identifier, integer, octet_string) = mibBuilder.importSymbols('ASN1', 'ObjectIdentifier', 'Integer', 'OctetString')
(named_values,) = mibBuilder.importSymbols('ASN1-ENUMERATION', 'NamedValues')
(value_size_constraint, value_range_constraint, constraints_union, constraints_intersection, single_value_constraint) = mibBuilder.importSymbols('ASN1-REFINEMENT', 'ValueSizeConstraint', 'ValueRangeConstraint', 'ConstraintsUnion', 'ConstraintsIntersection', 'SingleValueConstraint')
(c_l_wlan_index,) = mibBuilder.importSymbols('CISCO-LWAPP-WLAN-MIB', 'cLWlanIndex')
(cisco_mgmt,) = mibBuilder.importSymbols('CISCO-SMI', 'ciscoMgmt')
(object_group, module_compliance, notification_group) = mibBuilder.importSymbols('SNMPv2-CONF', 'ObjectGroup', 'ModuleCompliance', 'NotificationGroup')
(time_ticks, ip_address, gauge32, iso, mib_identifier, object_identity, integer32, module_identity, mib_scalar, mib_table, mib_table_row, mib_table_column, bits, unsigned32, counter32, notification_type, counter64) = mibBuilder.importSymbols('SNMPv2-SMI', 'TimeTicks', 'IpAddress', 'Gauge32', 'iso', 'MibIdentifier', 'ObjectIdentity', 'Integer32', 'ModuleIdentity', 'MibScalar', 'MibTable', 'MibTableRow', 'MibTableColumn', 'Bits', 'Unsigned32', 'Counter32', 'NotificationType', 'Counter64')
(textual_convention, display_string, row_status, truth_value) = mibBuilder.importSymbols('SNMPv2-TC', 'TextualConvention', 'DisplayString', 'RowStatus', 'TruthValue')
cisco_lwapp_local_auth_mib = module_identity((1, 3, 6, 1, 4, 1, 9, 9, 619))
ciscoLwappLocalAuthMIB.setRevisions(('2010-02-09 00:00', '2009-11-24 00:00', '2007-03-15 00:00'))
if mibBuilder.loadTexts:
ciscoLwappLocalAuthMIB.setLastUpdated('201002090000Z')
if mibBuilder.loadTexts:
ciscoLwappLocalAuthMIB.setOrganization('Cisco Systems Inc.')
cisco_lwapp_local_auth_mib_notifs = mib_identifier((1, 3, 6, 1, 4, 1, 9, 9, 619, 0))
cisco_lwapp_local_auth_mib_objects = mib_identifier((1, 3, 6, 1, 4, 1, 9, 9, 619, 1))
cisco_lwapp_local_auth_mib_conform = mib_identifier((1, 3, 6, 1, 4, 1, 9, 9, 619, 2))
clla_config = mib_identifier((1, 3, 6, 1, 4, 1, 9, 9, 619, 1, 1))
clla_local_auth = mib_identifier((1, 3, 6, 1, 4, 1, 9, 9, 619, 1, 1, 1))
clla_active_timeout = mib_scalar((1, 3, 6, 1, 4, 1, 9, 9, 619, 1, 1, 1, 1), unsigned32()).setUnits('seconds').setMaxAccess('readwrite')
if mibBuilder.loadTexts:
cllaActiveTimeout.setStatus('current')
clla_eap_identity_req_timeout = mib_scalar((1, 3, 6, 1, 4, 1, 9, 9, 619, 1, 1, 1, 2), unsigned32()).setUnits('seconds').setMaxAccess('readwrite')
if mibBuilder.loadTexts:
cllaEapIdentityReqTimeout.setStatus('current')
clla_eap_identity_req_max_retries = mib_scalar((1, 3, 6, 1, 4, 1, 9, 9, 619, 1, 1, 1, 3), unsigned32()).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
cllaEapIdentityReqMaxRetries.setStatus('current')
clla_eap_dynamic_wep_key_index = mib_scalar((1, 3, 6, 1, 4, 1, 9, 9, 619, 1, 1, 1, 4), unsigned32().subtype(subtypeSpec=value_range_constraint(0, 3))).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
cllaEapDynamicWepKeyIndex.setStatus('current')
clla_eap_req_timeout = mib_scalar((1, 3, 6, 1, 4, 1, 9, 9, 619, 1, 1, 1, 5), unsigned32()).setUnits('seconds').setMaxAccess('readwrite')
if mibBuilder.loadTexts:
cllaEapReqTimeout.setStatus('current')
clla_eap_req_max_retries = mib_scalar((1, 3, 6, 1, 4, 1, 9, 9, 619, 1, 1, 1, 6), unsigned32()).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
cllaEapReqMaxRetries.setStatus('current')
clla_eap_max_login_ign_id_resp = mib_scalar((1, 3, 6, 1, 4, 1, 9, 9, 619, 1, 1, 1, 7), truth_value().clone('true')).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
cllaEapMaxLoginIgnIdResp.setStatus('current')
clla_eap_key_timeout = mib_scalar((1, 3, 6, 1, 4, 1, 9, 9, 619, 1, 1, 1, 8), unsigned32().subtype(subtypeSpec=value_range_constraint(200, 5000)).clone(1000)).setUnits('milliseconds').setMaxAccess('readwrite')
if mibBuilder.loadTexts:
cllaEapKeyTimeout.setStatus('current')
clla_eap_key_max_retries = mib_scalar((1, 3, 6, 1, 4, 1, 9, 9, 619, 1, 1, 1, 9), unsigned32().subtype(subtypeSpec=value_range_constraint(0, 4)).clone(2)).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
cllaEapKeyMaxRetries.setStatus('current')
clla_eap_profile_table = mib_table((1, 3, 6, 1, 4, 1, 9, 9, 619, 1, 1, 2))
if mibBuilder.loadTexts:
cllaEapProfileTable.setStatus('current')
clla_eap_profile_entry = mib_table_row((1, 3, 6, 1, 4, 1, 9, 9, 619, 1, 1, 2, 1)).setIndexNames((0, 'CISCO-LWAPP-LOCAL-AUTH-MIB', 'cllaEapProfileName'))
if mibBuilder.loadTexts:
cllaEapProfileEntry.setStatus('current')
clla_eap_profile_name = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 619, 1, 1, 2, 1, 1), display_string().subtype(subtypeSpec=value_size_constraint(0, 63)))
if mibBuilder.loadTexts:
cllaEapProfileName.setStatus('current')
clla_eap_profile_methods = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 619, 1, 1, 2, 1, 2), bits().clone(namedValues=named_values(('none', 0), ('leap', 1), ('eapFast', 2), ('tls', 3), ('peap', 4)))).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
cllaEapProfileMethods.setStatus('current')
clla_eap_profile_cert_issuer = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 619, 1, 1, 2, 1, 3), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2))).clone(namedValues=named_values(('cisco', 1), ('vendor', 2))).clone('cisco')).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
cllaEapProfileCertIssuer.setStatus('current')
clla_eap_profile_ca_certification_check = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 619, 1, 1, 2, 1, 4), truth_value().clone('true')).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
cllaEapProfileCaCertificationCheck.setStatus('current')
clla_eap_profile_cn_certification_id_verify = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 619, 1, 1, 2, 1, 5), truth_value().clone('false')).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
cllaEapProfileCnCertificationIdVerify.setStatus('current')
clla_eap_profile_date_validity_enabled = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 619, 1, 1, 2, 1, 6), truth_value().clone('true')).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
cllaEapProfileDateValidityEnabled.setStatus('current')
clla_eap_profile_local_certificate_required = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 619, 1, 1, 2, 1, 7), truth_value().clone('false')).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
cllaEapProfileLocalCertificateRequired.setStatus('current')
clla_eap_profile_client_certificate_required = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 619, 1, 1, 2, 1, 8), truth_value().clone('false')).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
cllaEapProfileClientCertificateRequired.setStatus('current')
clla_eap_profile_row_status = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 619, 1, 1, 2, 1, 9), row_status()).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
cllaEapProfileRowStatus.setStatus('current')
clla_wlan_profile_table = mib_table((1, 3, 6, 1, 4, 1, 9, 9, 619, 1, 1, 3))
if mibBuilder.loadTexts:
cllaWlanProfileTable.setStatus('current')
clla_wlan_profile_entry = mib_table_row((1, 3, 6, 1, 4, 1, 9, 9, 619, 1, 1, 3, 1)).setIndexNames((0, 'CISCO-LWAPP-WLAN-MIB', 'cLWlanIndex'))
if mibBuilder.loadTexts:
cllaWlanProfileEntry.setStatus('current')
clla_wlan_profile_name = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 619, 1, 1, 3, 1, 1), display_string().subtype(subtypeSpec=value_size_constraint(0, 63))).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
cllaWlanProfileName.setStatus('current')
clla_wlan_profile_state = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 619, 1, 1, 3, 1, 2), truth_value()).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
cllaWlanProfileState.setStatus('current')
clla_user_priority_table = mib_table((1, 3, 6, 1, 4, 1, 9, 9, 619, 1, 1, 4))
if mibBuilder.loadTexts:
cllaUserPriorityTable.setStatus('current')
clla_user_priority_entry = mib_table_row((1, 3, 6, 1, 4, 1, 9, 9, 619, 1, 1, 4, 1)).setIndexNames((0, 'CISCO-LWAPP-LOCAL-AUTH-MIB', 'cllaUserCredential'))
if mibBuilder.loadTexts:
cllaUserPriorityEntry.setStatus('current')
clla_user_credential = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 619, 1, 1, 4, 1, 1), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2))).clone(namedValues=named_values(('local', 1), ('ldap', 2))))
if mibBuilder.loadTexts:
cllaUserCredential.setStatus('current')
clla_user_priority_number = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 619, 1, 1, 4, 1, 2), integer32().subtype(subtypeSpec=value_range_constraint(0, 2))).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
cllaUserPriorityNumber.setStatus('current')
clla_eap_params = mib_identifier((1, 3, 6, 1, 4, 1, 9, 9, 619, 1, 1, 5))
clla_eap_method_pac_ttl = mib_scalar((1, 3, 6, 1, 4, 1, 9, 9, 619, 1, 1, 5, 1), unsigned32().subtype(subtypeSpec=value_range_constraint(1, 1000)).clone(10)).setUnits('days').setMaxAccess('readwrite')
if mibBuilder.loadTexts:
cllaEapMethodPacTtl.setStatus('current')
clla_eap_anonymous_prov_enabled = mib_scalar((1, 3, 6, 1, 4, 1, 9, 9, 619, 1, 1, 5, 2), truth_value().clone('true')).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
cllaEapAnonymousProvEnabled.setStatus('current')
clla_eap_authority_id = mib_scalar((1, 3, 6, 1, 4, 1, 9, 9, 619, 1, 1, 5, 3), octet_string().subtype(subtypeSpec=value_size_constraint(0, 128))).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
cllaEapAuthorityId.setStatus('current')
clla_eap_authority_info = mib_scalar((1, 3, 6, 1, 4, 1, 9, 9, 619, 1, 1, 5, 4), octet_string().subtype(subtypeSpec=value_size_constraint(0, 32))).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
cllaEapAuthorityInfo.setStatus('current')
clla_eap_server_key = mib_scalar((1, 3, 6, 1, 4, 1, 9, 9, 619, 1, 1, 5, 5), octet_string().subtype(subtypeSpec=value_size_constraint(1, 32))).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
cllaEapServerKey.setStatus('current')
clla_eap_authority_id_length = mib_scalar((1, 3, 6, 1, 4, 1, 9, 9, 619, 1, 1, 5, 6), unsigned32().subtype(subtypeSpec=value_range_constraint(0, 128)).clone(32)).setMaxAccess('readonly')
if mibBuilder.loadTexts:
cllaEapAuthorityIdLength.setStatus('current')
cisco_lwapp_local_auth_mib_compliances = mib_identifier((1, 3, 6, 1, 4, 1, 9, 9, 619, 2, 1))
cisco_lwapp_local_auth_mib_groups = mib_identifier((1, 3, 6, 1, 4, 1, 9, 9, 619, 2, 2))
cisco_lwapp_local_auth_mib_compliance = module_compliance((1, 3, 6, 1, 4, 1, 9, 9, 619, 2, 1, 1)).setObjects(('CISCO-LWAPP-LOCAL-AUTH-MIB', 'ciscoLwappLocalAuthMIBConfigGroup'))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
cisco_lwapp_local_auth_mib_compliance = ciscoLwappLocalAuthMIBCompliance.setStatus('deprecated')
cisco_lwapp_local_auth_mib_compliance_rev1 = module_compliance((1, 3, 6, 1, 4, 1, 9, 9, 619, 2, 1, 2)).setObjects(('CISCO-LWAPP-LOCAL-AUTH-MIB', 'ciscoLwappLocalAuthMIBConfigGroupSup1'))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
cisco_lwapp_local_auth_mib_compliance_rev1 = ciscoLwappLocalAuthMIBComplianceRev1.setStatus('current')
cisco_lwapp_local_auth_mib_config_group = object_group((1, 3, 6, 1, 4, 1, 9, 9, 619, 2, 2, 1)).setObjects(('CISCO-LWAPP-LOCAL-AUTH-MIB', 'cllaActiveTimeout'), ('CISCO-LWAPP-LOCAL-AUTH-MIB', 'cllaEapProfileMethods'), ('CISCO-LWAPP-LOCAL-AUTH-MIB', 'cllaEapProfileCertIssuer'), ('CISCO-LWAPP-LOCAL-AUTH-MIB', 'cllaEapProfileCaCertificationCheck'), ('CISCO-LWAPP-LOCAL-AUTH-MIB', 'cllaEapProfileCnCertificationIdVerify'), ('CISCO-LWAPP-LOCAL-AUTH-MIB', 'cllaEapProfileDateValidityEnabled'), ('CISCO-LWAPP-LOCAL-AUTH-MIB', 'cllaEapProfileLocalCertificateRequired'), ('CISCO-LWAPP-LOCAL-AUTH-MIB', 'cllaEapProfileClientCertificateRequired'), ('CISCO-LWAPP-LOCAL-AUTH-MIB', 'cllaEapProfileRowStatus'), ('CISCO-LWAPP-LOCAL-AUTH-MIB', 'cllaWlanProfileName'), ('CISCO-LWAPP-LOCAL-AUTH-MIB', 'cllaWlanProfileState'), ('CISCO-LWAPP-LOCAL-AUTH-MIB', 'cllaUserPriorityNumber'), ('CISCO-LWAPP-LOCAL-AUTH-MIB', 'cllaEapMethodPacTtl'), ('CISCO-LWAPP-LOCAL-AUTH-MIB', 'cllaEapAnonymousProvEnabled'), ('CISCO-LWAPP-LOCAL-AUTH-MIB', 'cllaEapAuthorityId'), ('CISCO-LWAPP-LOCAL-AUTH-MIB', 'cllaEapAuthorityInfo'), ('CISCO-LWAPP-LOCAL-AUTH-MIB', 'cllaEapServerKey'), ('CISCO-LWAPP-LOCAL-AUTH-MIB', 'cllaEapAuthorityIdLength'))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
cisco_lwapp_local_auth_mib_config_group = ciscoLwappLocalAuthMIBConfigGroup.setStatus('deprecated')
cisco_lwapp_local_auth_mib_config_group_sup1 = object_group((1, 3, 6, 1, 4, 1, 9, 9, 619, 2, 2, 2)).setObjects(('CISCO-LWAPP-LOCAL-AUTH-MIB', 'cllaActiveTimeout'), ('CISCO-LWAPP-LOCAL-AUTH-MIB', 'cllaEapIdentityReqTimeout'), ('CISCO-LWAPP-LOCAL-AUTH-MIB', 'cllaEapIdentityReqMaxRetries'), ('CISCO-LWAPP-LOCAL-AUTH-MIB', 'cllaEapDynamicWepKeyIndex'), ('CISCO-LWAPP-LOCAL-AUTH-MIB', 'cllaEapReqTimeout'), ('CISCO-LWAPP-LOCAL-AUTH-MIB', 'cllaEapReqMaxRetries'), ('CISCO-LWAPP-LOCAL-AUTH-MIB', 'cllaEapProfileMethods'), ('CISCO-LWAPP-LOCAL-AUTH-MIB', 'cllaEapProfileCertIssuer'), ('CISCO-LWAPP-LOCAL-AUTH-MIB', 'cllaEapProfileCaCertificationCheck'), ('CISCO-LWAPP-LOCAL-AUTH-MIB', 'cllaEapProfileCnCertificationIdVerify'), ('CISCO-LWAPP-LOCAL-AUTH-MIB', 'cllaEapProfileDateValidityEnabled'), ('CISCO-LWAPP-LOCAL-AUTH-MIB', 'cllaEapProfileLocalCertificateRequired'), ('CISCO-LWAPP-LOCAL-AUTH-MIB', 'cllaEapProfileClientCertificateRequired'), ('CISCO-LWAPP-LOCAL-AUTH-MIB', 'cllaEapProfileRowStatus'), ('CISCO-LWAPP-LOCAL-AUTH-MIB', 'cllaWlanProfileName'), ('CISCO-LWAPP-LOCAL-AUTH-MIB', 'cllaWlanProfileState'), ('CISCO-LWAPP-LOCAL-AUTH-MIB', 'cllaUserPriorityNumber'), ('CISCO-LWAPP-LOCAL-AUTH-MIB', 'cllaEapMethodPacTtl'), ('CISCO-LWAPP-LOCAL-AUTH-MIB', 'cllaEapAnonymousProvEnabled'), ('CISCO-LWAPP-LOCAL-AUTH-MIB', 'cllaEapAuthorityId'), ('CISCO-LWAPP-LOCAL-AUTH-MIB', 'cllaEapAuthorityInfo'), ('CISCO-LWAPP-LOCAL-AUTH-MIB', 'cllaEapServerKey'), ('CISCO-LWAPP-LOCAL-AUTH-MIB', 'cllaEapAuthorityIdLength'), ('CISCO-LWAPP-LOCAL-AUTH-MIB', 'cllaEapMaxLoginIgnIdResp'), ('CISCO-LWAPP-LOCAL-AUTH-MIB', 'cllaEapKeyTimeout'), ('CISCO-LWAPP-LOCAL-AUTH-MIB', 'cllaEapKeyMaxRetries'))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
cisco_lwapp_local_auth_mib_config_group_sup1 = ciscoLwappLocalAuthMIBConfigGroupSup1.setStatus('current')
mibBuilder.exportSymbols('CISCO-LWAPP-LOCAL-AUTH-MIB', cllaEapProfileName=cllaEapProfileName, cllaLocalAuth=cllaLocalAuth, cllaEapProfileLocalCertificateRequired=cllaEapProfileLocalCertificateRequired, cllaUserCredential=cllaUserCredential, cllaEapProfileClientCertificateRequired=cllaEapProfileClientCertificateRequired, cllaWlanProfileTable=cllaWlanProfileTable, cllaActiveTimeout=cllaActiveTimeout, cllaUserPriorityTable=cllaUserPriorityTable, cllaEapServerKey=cllaEapServerKey, cllaEapProfileCnCertificationIdVerify=cllaEapProfileCnCertificationIdVerify, cllaEapAnonymousProvEnabled=cllaEapAnonymousProvEnabled, cllaEapKeyTimeout=cllaEapKeyTimeout, cllaConfig=cllaConfig, cllaWlanProfileName=cllaWlanProfileName, cllaEapMethodPacTtl=cllaEapMethodPacTtl, ciscoLwappLocalAuthMIBObjects=ciscoLwappLocalAuthMIBObjects, cllaEapReqTimeout=cllaEapReqTimeout, cllaEapIdentityReqMaxRetries=cllaEapIdentityReqMaxRetries, cllaEapProfileDateValidityEnabled=cllaEapProfileDateValidityEnabled, cllaEapParams=cllaEapParams, cllaEapAuthorityId=cllaEapAuthorityId, ciscoLwappLocalAuthMIBComplianceRev1=ciscoLwappLocalAuthMIBComplianceRev1, cllaEapIdentityReqTimeout=cllaEapIdentityReqTimeout, cllaEapAuthorityInfo=cllaEapAuthorityInfo, ciscoLwappLocalAuthMIB=ciscoLwappLocalAuthMIB, cllaEapKeyMaxRetries=cllaEapKeyMaxRetries, cllaEapAuthorityIdLength=cllaEapAuthorityIdLength, cllaUserPriorityNumber=cllaUserPriorityNumber, cllaEapProfileMethods=cllaEapProfileMethods, ciscoLwappLocalAuthMIBConfigGroup=ciscoLwappLocalAuthMIBConfigGroup, cllaEapProfileTable=cllaEapProfileTable, PYSNMP_MODULE_ID=ciscoLwappLocalAuthMIB, cllaWlanProfileState=cllaWlanProfileState, ciscoLwappLocalAuthMIBCompliances=ciscoLwappLocalAuthMIBCompliances, cllaEapProfileCaCertificationCheck=cllaEapProfileCaCertificationCheck, cllaEapProfileRowStatus=cllaEapProfileRowStatus, cllaEapDynamicWepKeyIndex=cllaEapDynamicWepKeyIndex, cllaEapMaxLoginIgnIdResp=cllaEapMaxLoginIgnIdResp, cllaEapProfileCertIssuer=cllaEapProfileCertIssuer, cllaUserPriorityEntry=cllaUserPriorityEntry, ciscoLwappLocalAuthMIBNotifs=ciscoLwappLocalAuthMIBNotifs, ciscoLwappLocalAuthMIBConfigGroupSup1=ciscoLwappLocalAuthMIBConfigGroupSup1, ciscoLwappLocalAuthMIBGroups=ciscoLwappLocalAuthMIBGroups, ciscoLwappLocalAuthMIBCompliance=ciscoLwappLocalAuthMIBCompliance, cllaWlanProfileEntry=cllaWlanProfileEntry, ciscoLwappLocalAuthMIBConform=ciscoLwappLocalAuthMIBConform, cllaEapProfileEntry=cllaEapProfileEntry, cllaEapReqMaxRetries=cllaEapReqMaxRetries) |
class Human:
def method(self):
return print(f'Hello - {self}')
@classmethod
def classmethod(cls):
return print('it is a species of "Homo sapiens"')
@staticmethod
def staticmethod():
return print('Congratulations')
name_human = input('Enter your name: ')
Human.method(name_human)
Human.classmethod()
Human.staticmethod()
| class Human:
def method(self):
return print(f'Hello - {self}')
@classmethod
def classmethod(cls):
return print('it is a species of "Homo sapiens"')
@staticmethod
def staticmethod():
return print('Congratulations')
name_human = input('Enter your name: ')
Human.method(name_human)
Human.classmethod()
Human.staticmethod() |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
SUCCESS = "0"
NEED_SMS = "1"
SMS_FAIL = "2"
| success = '0'
need_sms = '1'
sms_fail = '2' |
#Vigenere cipher + b64 - substitution
'''
method = sys.argv[1]
key = sys.argv[2]
string = sys.argv[3]
'''
def encode(key, string) :
encoded_chars = []
for i in range(len(string)) :
key_c = key[i % len(key)]
encoded_c = chr(ord(string[i]) + ord(key_c) % 256)
encoded_chars.append(encoded_c)
encoded_string = "".join(encoded_chars)
return encoded_string
def decode(key, string) :
decoded_chars = []
for i in range(len(string)) :
key_c = key[i % len(key)]
decoded_c = chr(ord(string[i]) - ord(key_c) % 256)
decoded_chars.append(decoded_c)
decoded_string = "".join(decoded_chars)
return decoded_string
def mainFunc(plaintext, key, method):
if method == 'e' or method == 'E' :
print (encode(key, plaintext))
else :
print (decode(key, plaintext))
| """
method = sys.argv[1]
key = sys.argv[2]
string = sys.argv[3]
"""
def encode(key, string):
encoded_chars = []
for i in range(len(string)):
key_c = key[i % len(key)]
encoded_c = chr(ord(string[i]) + ord(key_c) % 256)
encoded_chars.append(encoded_c)
encoded_string = ''.join(encoded_chars)
return encoded_string
def decode(key, string):
decoded_chars = []
for i in range(len(string)):
key_c = key[i % len(key)]
decoded_c = chr(ord(string[i]) - ord(key_c) % 256)
decoded_chars.append(decoded_c)
decoded_string = ''.join(decoded_chars)
return decoded_string
def main_func(plaintext, key, method):
if method == 'e' or method == 'E':
print(encode(key, plaintext))
else:
print(decode(key, plaintext)) |
def mult_by_two(num):
return num * 2
def mult_by_five(num):
return num * 5
def square(num):
return num * num
def add_one(num):
return num + 1
def apply(num, func):
return func(num)
result = apply(10, mult_by_two)
print(result)
print(apply(10, mult_by_five))
print(apply(10, square))
print(apply(10, add_one))
print(apply(10, mult_by_two))
| def mult_by_two(num):
return num * 2
def mult_by_five(num):
return num * 5
def square(num):
return num * num
def add_one(num):
return num + 1
def apply(num, func):
return func(num)
result = apply(10, mult_by_two)
print(result)
print(apply(10, mult_by_five))
print(apply(10, square))
print(apply(10, add_one))
print(apply(10, mult_by_two)) |
class BisectionMap(object):
__slots__ = ('nodes')
#//-------------------------------------------------------//
def __init__(self, dict = {} ):
self.nodes = []
for key, value in dict.iteritems():
self[ key ] = value
#//-------------------------------------------------------//
def __findPosition( self, key ):
nodes = self.nodes
pos = 0
end = len(nodes)
while pos < end:
mid = (pos + end) // 2
if nodes[mid][0] < key:
pos = mid + 1
else:
end = mid
try:
node = nodes[pos]
if not (key < node[0]):
return pos, node
except IndexError:
pass
return pos, None
#//-------------------------------------------------------//
def __getitem__(self, key ):
pos, node = self.__findPosition( key )
if node is None:
raise KeyError(str(key))
return node[1]
#//-------------------------------------------------------//
def __setitem__(self, key, value ):
pos, node = self.__findPosition( key )
if node is not None:
node[1] = value
else:
self.nodes.insert( pos, [ key, value ] )
#//-------------------------------------------------------//
def setdefault(self, key, value = None ):
pos, node = self.__findPosition( key )
if node is not None:
return node[1]
self.nodes.insert( pos, [key, value] )
return value
#//-------------------------------------------------------//
def __delitem__(self, key):
pos, node = self.__findPosition( key )
if node is not None:
del nodes[pos]
raise KeyError(str(key))
#//-------------------------------------------------------//
def __contains__(self, key):
return self.__findPosition( key )[1] is not None
#//-------------------------------------------------------//
def has_key(self, key):
return self.__findPosition( key )[1] is not None
#//-------------------------------------------------------//
def get(self, key, default = None):
try:
return self[key]
except KeyError:
return default
#//-------------------------------------------------------//
def keys(self):
return tuple( self.iterkeys() )
#//-------------------------------------------------------//
def values(self):
return tuple( self.itervalues() )
#//-------------------------------------------------------//
def items(self):
return tuple( self.iteritems() )
#//-------------------------------------------------------//
def itervalues(self):
for node in self.nodes:
yield node[1]
#//-------------------------------------------------------//
def iterkeys(self):
for node in self.nodes:
yield node[0]
#//-------------------------------------------------------//
def iteritems(self):
for node in self.nodes:
yield ( node[0], node[1] )
#//-------------------------------------------------------//
def __iter__(self):
return self.iterkeys()
#//-------------------------------------------------------//
def clear(self):
self.nodes = []
#//-------------------------------------------------------//
def copy(self):
clone = BisectionMap()
clone.nodes = list(self.nodes)
return clone
#//-------------------------------------------------------//
def update(self, other):
for key in other.iterkeys():
self[key] = other[key]
#//-------------------------------------------------------//
def __str__(self):
return '{'+ ', '.join( map(lambda node: repr(node[0]) + ': ' + repr(node[1]), self.nodes) ) + '}'
#//-------------------------------------------------------//
def __repr__(self):
return self.__str__()
| class Bisectionmap(object):
__slots__ = 'nodes'
def __init__(self, dict={}):
self.nodes = []
for (key, value) in dict.iteritems():
self[key] = value
def __find_position(self, key):
nodes = self.nodes
pos = 0
end = len(nodes)
while pos < end:
mid = (pos + end) // 2
if nodes[mid][0] < key:
pos = mid + 1
else:
end = mid
try:
node = nodes[pos]
if not key < node[0]:
return (pos, node)
except IndexError:
pass
return (pos, None)
def __getitem__(self, key):
(pos, node) = self.__findPosition(key)
if node is None:
raise key_error(str(key))
return node[1]
def __setitem__(self, key, value):
(pos, node) = self.__findPosition(key)
if node is not None:
node[1] = value
else:
self.nodes.insert(pos, [key, value])
def setdefault(self, key, value=None):
(pos, node) = self.__findPosition(key)
if node is not None:
return node[1]
self.nodes.insert(pos, [key, value])
return value
def __delitem__(self, key):
(pos, node) = self.__findPosition(key)
if node is not None:
del nodes[pos]
raise key_error(str(key))
def __contains__(self, key):
return self.__findPosition(key)[1] is not None
def has_key(self, key):
return self.__findPosition(key)[1] is not None
def get(self, key, default=None):
try:
return self[key]
except KeyError:
return default
def keys(self):
return tuple(self.iterkeys())
def values(self):
return tuple(self.itervalues())
def items(self):
return tuple(self.iteritems())
def itervalues(self):
for node in self.nodes:
yield node[1]
def iterkeys(self):
for node in self.nodes:
yield node[0]
def iteritems(self):
for node in self.nodes:
yield (node[0], node[1])
def __iter__(self):
return self.iterkeys()
def clear(self):
self.nodes = []
def copy(self):
clone = bisection_map()
clone.nodes = list(self.nodes)
return clone
def update(self, other):
for key in other.iterkeys():
self[key] = other[key]
def __str__(self):
return '{' + ', '.join(map(lambda node: repr(node[0]) + ': ' + repr(node[1]), self.nodes)) + '}'
def __repr__(self):
return self.__str__() |
# -*- coding: utf-8 -*-
test = 0
while True:
test += 1
deposits = int(input())
if deposits == 0:
break
delta = 0
print("Teste %d" % test)
for i in range(deposits):
values = input().split()
a = int(values[0])
b = int(values[1])
delta += a - b
print(delta)
print("") | test = 0
while True:
test += 1
deposits = int(input())
if deposits == 0:
break
delta = 0
print('Teste %d' % test)
for i in range(deposits):
values = input().split()
a = int(values[0])
b = int(values[1])
delta += a - b
print(delta)
print('') |
#LEETOCDE: 104. Maximum Depth of Binary Tree
class TreeNode:
def __init__(self, x):
self.val = x
self.left = None
self.right = None
def maxDepth(root: TreeNode) -> int:
if not root: return 0
else: return max(1+maxDepth(root.left), 1+maxDepth(root.right))
#TODO: Implement iterative way for a O(1) space solution
def maxDepthII(root: TreeNode) -> int:
print("PLACEHODLER")
if __name__ == "__main__":
n1 = TreeNode(1)
n2 = TreeNode(2)
n3 = TreeNode(3)
n1.left = n2
n2.left = n3
print(maxDepth(n1)) | class Treenode:
def __init__(self, x):
self.val = x
self.left = None
self.right = None
def max_depth(root: TreeNode) -> int:
if not root:
return 0
else:
return max(1 + max_depth(root.left), 1 + max_depth(root.right))
def max_depth_ii(root: TreeNode) -> int:
print('PLACEHODLER')
if __name__ == '__main__':
n1 = tree_node(1)
n2 = tree_node(2)
n3 = tree_node(3)
n1.left = n2
n2.left = n3
print(max_depth(n1)) |
# Definition for a binary tree node.
# from typing import List
# class TreeNode:
# def __init__(self, x):
# self.val = x
# self.left = None
# self.right = None
class Solution:
def solve(self, preorder: List[int], inorder: List[int]) -> TreeNode:
if not preorder:
return None
root = TreeNode(preorder[0])
if len(inorder) == 1:
return root
root_idx_inorder = inorder.index(preorder[0])
lchild = self.solve(preorder[1:root_idx_inorder + 1], inorder[:root_idx_inorder])
rchild = self.solve(preorder[root_idx_inorder + 1:], inorder[root_idx_inorder + 1:])
root.left = lchild
root.right = rchild
return root
def buildTree(self, preorder: List[int], inorder: List[int]) -> TreeNode:
return self.solve(preorder, inorder)
| class Solution:
def solve(self, preorder: List[int], inorder: List[int]) -> TreeNode:
if not preorder:
return None
root = tree_node(preorder[0])
if len(inorder) == 1:
return root
root_idx_inorder = inorder.index(preorder[0])
lchild = self.solve(preorder[1:root_idx_inorder + 1], inorder[:root_idx_inorder])
rchild = self.solve(preorder[root_idx_inorder + 1:], inorder[root_idx_inorder + 1:])
root.left = lchild
root.right = rchild
return root
def build_tree(self, preorder: List[int], inorder: List[int]) -> TreeNode:
return self.solve(preorder, inorder) |
# sorting algorithms
# mergeSort
def merge_sort(a):
n = len(a)
if n < 2:
return a
q = int(n / 2)
left = a[:q]
right = a[q:]
# print("left : {%s} , right : {%s}, A : {%s}" % (left, right, a))
merge_sort(left)
merge_sort(right)
a = merge(a, left, right)
# print("Result A ", a)
return a
def merge(a, left, right):
l = len(left)
r = len(right)
i, j, k = 0, 0, 0
# print("In merge function left : {%s} , right : {%s}, A : {%s}" % (left, right, a))
while i < l and j < r:
if left[i] <= right[j]:
a[k] = left[i]
k = k + 1
i = i + 1
else:
a[k] = right[j]
k = k + 1
j = j + 1
while i < l:
a[k] = left[i]
k = k + 1
i = i + 1
while j < r:
a[k] = right[j]
k = k + 1
j = j + 1
return a
# A=[8.01203212, 7, 6.2, 4.123122, 3-3, 43, 432, -2, 43, 42, 224, 2432, -432.0102, -42.4, -242342, -242342, 24234232,
# -4, 0, 20, 0.0001, 00.2, 00.32, -0.41, 2, 432, 2, -224223423]
A = ['A', 'B', 'C', 'EF', 'ALPHA', 'ZOOM', 'AAPPLE', 'COMP', 'JAGA', 'KKDAL']
# A = [8, 7, 6, 3, 9, -2, 19, 21, -2]
print("UnSorted list : ", A)
merge_sort(A)
print("Sorted list : ", A)
| def merge_sort(a):
n = len(a)
if n < 2:
return a
q = int(n / 2)
left = a[:q]
right = a[q:]
merge_sort(left)
merge_sort(right)
a = merge(a, left, right)
return a
def merge(a, left, right):
l = len(left)
r = len(right)
(i, j, k) = (0, 0, 0)
while i < l and j < r:
if left[i] <= right[j]:
a[k] = left[i]
k = k + 1
i = i + 1
else:
a[k] = right[j]
k = k + 1
j = j + 1
while i < l:
a[k] = left[i]
k = k + 1
i = i + 1
while j < r:
a[k] = right[j]
k = k + 1
j = j + 1
return a
a = ['A', 'B', 'C', 'EF', 'ALPHA', 'ZOOM', 'AAPPLE', 'COMP', 'JAGA', 'KKDAL']
print('UnSorted list : ', A)
merge_sort(A)
print('Sorted list : ', A) |
# AUTOGENERATED BY NBDEV! DO NOT EDIT!
__all__ = ["index", "modules", "custom_doc_links", "git_url"]
index = {"file_exists": "01_data.ipynb",
"ds_file_exists": "01_data.ipynb",
"filter_for_exists": "01_data.ipynb",
"drop_missing_files": "01_data.ipynb",
"add_ds": "01_data.ipynb",
"merge_ds": "01_data.ipynb",
"remove_special_characters": "01_data.ipynb",
"chars_to_ignore_regex": "01_data.ipynb",
"extract_all_chars": "01_data.ipynb",
"get_char_vocab": "01_data.ipynb",
"process_vocab": "01_data.ipynb",
"extract_vocab": "01_data.ipynb",
"speech_file_to_array": "01_data.ipynb",
"DataCollatorCTCWithPadding": "03_training.ipynb",
"wer_metric": "04_evaluation.ipynb",
"compute_wer_metric": "03_training.ipynb",
"evaluate_xlsr": "04_evaluation.ipynb",
"setup_wandb": "05_wandb_utils.ipynb"}
modules = ["data.py",
"augmentation.py",
"training.py",
"evaluation.py",
"wandbutils.py"]
doc_url = "https://morganmcg1.github.io/xlsr_finetune/"
git_url = "https://github.com/morganmcg1/xlsr_finetune/tree/master/"
def custom_doc_links(name): return None
| __all__ = ['index', 'modules', 'custom_doc_links', 'git_url']
index = {'file_exists': '01_data.ipynb', 'ds_file_exists': '01_data.ipynb', 'filter_for_exists': '01_data.ipynb', 'drop_missing_files': '01_data.ipynb', 'add_ds': '01_data.ipynb', 'merge_ds': '01_data.ipynb', 'remove_special_characters': '01_data.ipynb', 'chars_to_ignore_regex': '01_data.ipynb', 'extract_all_chars': '01_data.ipynb', 'get_char_vocab': '01_data.ipynb', 'process_vocab': '01_data.ipynb', 'extract_vocab': '01_data.ipynb', 'speech_file_to_array': '01_data.ipynb', 'DataCollatorCTCWithPadding': '03_training.ipynb', 'wer_metric': '04_evaluation.ipynb', 'compute_wer_metric': '03_training.ipynb', 'evaluate_xlsr': '04_evaluation.ipynb', 'setup_wandb': '05_wandb_utils.ipynb'}
modules = ['data.py', 'augmentation.py', 'training.py', 'evaluation.py', 'wandbutils.py']
doc_url = 'https://morganmcg1.github.io/xlsr_finetune/'
git_url = 'https://github.com/morganmcg1/xlsr_finetune/tree/master/'
def custom_doc_links(name):
return None |
# Copyright 2021 Jason Rumney
#
# 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
#
# https://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.
DOMAIN = "metlink"
ATTRIBUTION = "Data provided by Greater Wellington Regional Council"
CONF_STOPS = "stops"
CONF_STOP_ID = "stop_id"
CONF_DEST = "destination"
CONF_ROUTE = "route"
CONF_NUM_DEPARTURES = "num_departures"
ATTR_ACCESSIBLE = "wheelchair_accessible"
ATTR_AIMED = "aimed"
ATTR_ARRIVAL = "arrival"
ATTR_CLOSED = "closed"
ATTR_DELAY = "delay"
ATTR_DEPARTURE = "departure"
ATTR_DEPARTURES = "departures"
ATTR_DESCRIPTION = "description"
ATTR_DESTINATION = "destination"
ATTR_DESTINATION_ID = "destination_id"
ATTR_DIRECTION = "direction"
ATTR_EXPECTED = "expected"
ATTR_FAREZONE = "farezone"
ATTR_MONITORED = "monitored"
ATTR_NAME = "name"
ATTR_OPERATOR = "operator"
ATTR_ORIGIN = "origin"
ATTR_SERVICE = "service_id"
ATTR_STATUS = "status"
ATTR_STOP = "stop_id"
ATTR_STOP_NAME = "stop_name"
ATTR_VEHICLE = "vehicle_id"
| domain = 'metlink'
attribution = 'Data provided by Greater Wellington Regional Council'
conf_stops = 'stops'
conf_stop_id = 'stop_id'
conf_dest = 'destination'
conf_route = 'route'
conf_num_departures = 'num_departures'
attr_accessible = 'wheelchair_accessible'
attr_aimed = 'aimed'
attr_arrival = 'arrival'
attr_closed = 'closed'
attr_delay = 'delay'
attr_departure = 'departure'
attr_departures = 'departures'
attr_description = 'description'
attr_destination = 'destination'
attr_destination_id = 'destination_id'
attr_direction = 'direction'
attr_expected = 'expected'
attr_farezone = 'farezone'
attr_monitored = 'monitored'
attr_name = 'name'
attr_operator = 'operator'
attr_origin = 'origin'
attr_service = 'service_id'
attr_status = 'status'
attr_stop = 'stop_id'
attr_stop_name = 'stop_name'
attr_vehicle = 'vehicle_id' |
def cria_matriz(linhas, colunas, valor):
matriz = []
for i in range(linhas):
lin = []
for j in range(colunas):
lin.append(valor)
matriz.append(lin)
return matriz
def le_matriz():
linhas = int(input("Digite a quantidade de linhas: "))
colunas = int(input("Digite a quantidade de colunas: "))
return cria_matriz(linhas, colunas)
def imprime_matriz(tabela):
for i in tabela:
print(i) | def cria_matriz(linhas, colunas, valor):
matriz = []
for i in range(linhas):
lin = []
for j in range(colunas):
lin.append(valor)
matriz.append(lin)
return matriz
def le_matriz():
linhas = int(input('Digite a quantidade de linhas: '))
colunas = int(input('Digite a quantidade de colunas: '))
return cria_matriz(linhas, colunas)
def imprime_matriz(tabela):
for i in tabela:
print(i) |
ELECTION_HOME="election@home"
ELECTION_VIEW="election@view"
ELECTION_META="election@meta"
ELECTION_EDIT="election@edit"
ELECTION_SCHEDULE="election@schedule"
ELECTION_EXTEND="election@extend"
ELECTION_ARCHIVE="election@archive"
ELECTION_COPY="election@copy"
ELECTION_BADGE="election@badge"
ELECTION_TRUSTEES_HOME="election@trustees"
ELECTION_TRUSTEES_VIEW="election@trustees@view"
ELECTION_TRUSTEES_NEW="election@trustees@new"
ELECTION_TRUSTEES_ADD_HELIOS="election@trustees@add-helios"
ELECTION_TRUSTEES_DELETE="election@trustees@delete"
ELECTION_TRUSTEE_HOME="election@trustee"
ELECTION_TRUSTEE_SEND_URL="election@trustee@send-url"
ELECTION_TRUSTEE_KEY_GENERATOR="election@trustee@key-generator"
ELECTION_TRUSTEE_CHECK_SK="election@trustee@check-sk"
ELECTION_TRUSTEE_UPLOAD_PK="election@trustee@upload-pk"
ELECTION_TRUSTEE_DECRYPT_AND_PROVE="election@trustee@decrypt-and-prove"
ELECTION_TRUSTEE_UPLOAD_DECRYPTION="election@trustee@upload-decryption"
ELECTION_RESULT="election@result"
ELECTION_RESULT_PROOF="election@result@proof"
ELECTION_BBOARD="election@bboard"
ELECTION_AUDITED_BALLOTS="election@audited-ballots"
ELECTION_GET_RANDOMNESS="election@get-randomness"
ELECTION_ENCRYPT_BALLOT="election@encrypt-ballot"
ELECTION_QUESTIONS="election@questions"
ELECTION_SET_REG="election@set-reg"
ELECTION_SET_FEATURED="election@set-featured"
ELECTION_SAVE_QUESTIONS="election@save-questions"
ELECTION_REGISTER="election@register"
ELECTION_FREEZE="election@freeze"
ELECTION_COMPUTE_TALLY="election@compute-tally"
ELECTION_COMBINE_DECRYPTIONS="election@combine-decryptions"
ELECTION_RELEASE_RESULT="election@release-result"
ELECTION_CAST="election@cast"
ELECTION_CAST_CONFIRM="election@cast-confirm"
ELECTION_PASSWORD_VOTER_LOGIN="election@password-voter-login"
ELECTION_CAST_DONE="election@cast-done"
ELECTION_POST_AUDITED_BALLOT="election@post-audited-ballot"
ELECTION_VOTERS_HOME="election@voters"
ELECTION_VOTERS_UPLOAD="election@voters@upload"
ELECTION_VOTERS_UPLOAD_CANCEL="election@voters@upload-cancel"
ELECTION_VOTERS_LIST="election@voters@list"
ELECTION_VOTERS_LIST_PRETTY="election@voters@list-pretty"
ELECTION_VOTERS_ELIGIBILITY="election@voters@eligibility"
ELECTION_VOTERS_EMAIL="election@voters@email"
ELECTION_VOTER="election@voter"
ELECTION_VOTER_DELETE="election@voter@delete"
ELECTION_BALLOTS_LIST="election@ballots@list"
ELECTION_BALLOTS_VOTER="election@ballots@voter"
ELECTION_BALLOTS_VOTER_LAST="election@ballots@voter@last"
| election_home = 'election@home'
election_view = 'election@view'
election_meta = 'election@meta'
election_edit = 'election@edit'
election_schedule = 'election@schedule'
election_extend = 'election@extend'
election_archive = 'election@archive'
election_copy = 'election@copy'
election_badge = 'election@badge'
election_trustees_home = 'election@trustees'
election_trustees_view = 'election@trustees@view'
election_trustees_new = 'election@trustees@new'
election_trustees_add_helios = 'election@trustees@add-helios'
election_trustees_delete = 'election@trustees@delete'
election_trustee_home = 'election@trustee'
election_trustee_send_url = 'election@trustee@send-url'
election_trustee_key_generator = 'election@trustee@key-generator'
election_trustee_check_sk = 'election@trustee@check-sk'
election_trustee_upload_pk = 'election@trustee@upload-pk'
election_trustee_decrypt_and_prove = 'election@trustee@decrypt-and-prove'
election_trustee_upload_decryption = 'election@trustee@upload-decryption'
election_result = 'election@result'
election_result_proof = 'election@result@proof'
election_bboard = 'election@bboard'
election_audited_ballots = 'election@audited-ballots'
election_get_randomness = 'election@get-randomness'
election_encrypt_ballot = 'election@encrypt-ballot'
election_questions = 'election@questions'
election_set_reg = 'election@set-reg'
election_set_featured = 'election@set-featured'
election_save_questions = 'election@save-questions'
election_register = 'election@register'
election_freeze = 'election@freeze'
election_compute_tally = 'election@compute-tally'
election_combine_decryptions = 'election@combine-decryptions'
election_release_result = 'election@release-result'
election_cast = 'election@cast'
election_cast_confirm = 'election@cast-confirm'
election_password_voter_login = 'election@password-voter-login'
election_cast_done = 'election@cast-done'
election_post_audited_ballot = 'election@post-audited-ballot'
election_voters_home = 'election@voters'
election_voters_upload = 'election@voters@upload'
election_voters_upload_cancel = 'election@voters@upload-cancel'
election_voters_list = 'election@voters@list'
election_voters_list_pretty = 'election@voters@list-pretty'
election_voters_eligibility = 'election@voters@eligibility'
election_voters_email = 'election@voters@email'
election_voter = 'election@voter'
election_voter_delete = 'election@voter@delete'
election_ballots_list = 'election@ballots@list'
election_ballots_voter = 'election@ballots@voter'
election_ballots_voter_last = 'election@ballots@voter@last' |
class IdentifierLabels:
ID = "CMPLNT_NUM"
class DateTimeEventLabels:
EVENT_START_TIMESTAMP = "CMPLNT_FR_DT"
EVENT_END_TIMESTAMP = "CMPLNT_TO_DT"
class DateTimeSubmissionLabels:
SUBMISSION_TO_POLICE_TIMESTAMP = "RPT_DT"
class LawBreakingLabels:
KEY_CODE = "KY_CD"
PD_CODE = "PD_CD"
LAW_BREAKING_LEVEL = "LAW_CAT_CD"
class EventStatusLabels:
EVENT_STATUS = "CRM_ATPT_CPTD_CD"
class EventSurroundingsLabels:
PLACE_TYPE = "PREM_TYP_DESC"
PLACE_TYPE_POSITION = "LOC_OF_OCCUR_DESC"
class EventLocationLabels:
PRECINCT_CODE = "ADDR_PCT_CD"
BOROUGH_NAME = "BORO_NM"
LATITUDE = "Latitude"
LONGITUDE = "Longitude"
class SuspectLabels:
SUSPECT_AGE_GROUP = "SUSP_AGE_GROUP"
SUSPECT_RACE = "SUSP_RACE"
SUSPECT_SEX = "SUSP_SEX"
class VictimLabels:
VICTIM_AGE_GROUP = "VIC_AGE_GROUP"
VICTIM_RACE = "VIC_RACE"
VICTIM_SEX = "VIC_SEX"
| class Identifierlabels:
id = 'CMPLNT_NUM'
class Datetimeeventlabels:
event_start_timestamp = 'CMPLNT_FR_DT'
event_end_timestamp = 'CMPLNT_TO_DT'
class Datetimesubmissionlabels:
submission_to_police_timestamp = 'RPT_DT'
class Lawbreakinglabels:
key_code = 'KY_CD'
pd_code = 'PD_CD'
law_breaking_level = 'LAW_CAT_CD'
class Eventstatuslabels:
event_status = 'CRM_ATPT_CPTD_CD'
class Eventsurroundingslabels:
place_type = 'PREM_TYP_DESC'
place_type_position = 'LOC_OF_OCCUR_DESC'
class Eventlocationlabels:
precinct_code = 'ADDR_PCT_CD'
borough_name = 'BORO_NM'
latitude = 'Latitude'
longitude = 'Longitude'
class Suspectlabels:
suspect_age_group = 'SUSP_AGE_GROUP'
suspect_race = 'SUSP_RACE'
suspect_sex = 'SUSP_SEX'
class Victimlabels:
victim_age_group = 'VIC_AGE_GROUP'
victim_race = 'VIC_RACE'
victim_sex = 'VIC_SEX' |
class Solution:
def longestArithSeqLength(self, A: List[int]) -> int:
if len(A) <= 2:
return len(A)
ans = 2
dp = collections.defaultdict(set)
for i, num in enumerate(A):
if num in dp:
for d, cnt in dp.pop(num):
dp[num + d].add((d, cnt + 1))
ans = max(ans, cnt + 1)
for j in range(i):
first = A[j]
dp[num * 2 - first].add((num - first, 2))
return ans
| class Solution:
def longest_arith_seq_length(self, A: List[int]) -> int:
if len(A) <= 2:
return len(A)
ans = 2
dp = collections.defaultdict(set)
for (i, num) in enumerate(A):
if num in dp:
for (d, cnt) in dp.pop(num):
dp[num + d].add((d, cnt + 1))
ans = max(ans, cnt + 1)
for j in range(i):
first = A[j]
dp[num * 2 - first].add((num - first, 2))
return ans |
H, W = map(int, input().split())
A = [list(map(int, input().split())) for _ in range(H)]
for i1 in range(H):
for i2 in range(i1 + 1, H):
for j1 in range(W):
for j2 in range(j1 + 1, W):
if A[i1][j1] + A[i2][j2] > A[i2][j1] + A[i1][j2]:
print('No')
exit()
print('Yes')
| (h, w) = map(int, input().split())
a = [list(map(int, input().split())) for _ in range(H)]
for i1 in range(H):
for i2 in range(i1 + 1, H):
for j1 in range(W):
for j2 in range(j1 + 1, W):
if A[i1][j1] + A[i2][j2] > A[i2][j1] + A[i1][j2]:
print('No')
exit()
print('Yes') |
# s.remove(0)
s = {1, 2, 3}
s.remove(0)
print(s)
# bug as it should return a KeyError exception !!!
| s = {1, 2, 3}
s.remove(0)
print(s) |
class Contacts:
def __init__(self, first_name=None, last_name=None, id=None, email_1=None, email_2=None, email_3=None,
home_phone=None, mobile_phone=None, work_phone=None):
self.first_name = first_name
self.last_name = last_name
self.mobile_phone = mobile_phone
self.home_phone = home_phone
self.work_phone = work_phone
self.id = id
self.email_1 = email_1
self.email_2 = email_2
self.email_3 = email_3
def __eq__(self, other):
return (self.id == other.id or self.id is None or other.id is None) \
and self.first_name == other.first_name and self.last_name==other.last_name | class Contacts:
def __init__(self, first_name=None, last_name=None, id=None, email_1=None, email_2=None, email_3=None, home_phone=None, mobile_phone=None, work_phone=None):
self.first_name = first_name
self.last_name = last_name
self.mobile_phone = mobile_phone
self.home_phone = home_phone
self.work_phone = work_phone
self.id = id
self.email_1 = email_1
self.email_2 = email_2
self.email_3 = email_3
def __eq__(self, other):
return (self.id == other.id or self.id is None or other.id is None) and self.first_name == other.first_name and (self.last_name == other.last_name) |
'''
The rows of levels in the .azr file are converted to list of strings. These
indices make it more convenient to access the desired parameter.
'''
J_INDEX = 0
PI_INDEX = 1
ENERGY_INDEX = 2
ENERGY_FIXED_INDEX = 3
CHANNEL_INDEX = 5
WIDTH_INDEX = 11
WIDTH_FIXED_INDEX = 10
SEPARATION_ENERGY_INDEX = 21
CHANNEL_RADIUS_INDEX = 27
OUTPUT_DIR_INDEX = 2
DATA_FILEPATH_INDEX = 11
LEVEL_INCLUDE_INDEX = 9
'''
Data-related constants.
'''
INCLUDE_INDEX = 0
IN_CHANNEL_INDEX = 1
OUT_CHANNEL_INDEX = 2
NORM_FACTOR_INDEX = 8
VARY_NORM_FACTOR_INDEX = 9
FILEPATH_INDEX = 11
| """
The rows of levels in the .azr file are converted to list of strings. These
indices make it more convenient to access the desired parameter.
"""
j_index = 0
pi_index = 1
energy_index = 2
energy_fixed_index = 3
channel_index = 5
width_index = 11
width_fixed_index = 10
separation_energy_index = 21
channel_radius_index = 27
output_dir_index = 2
data_filepath_index = 11
level_include_index = 9
'\nData-related constants.\n'
include_index = 0
in_channel_index = 1
out_channel_index = 2
norm_factor_index = 8
vary_norm_factor_index = 9
filepath_index = 11 |
class ModelMinxi:
def to_dict(self,*exclude):
attr_dict = {}
for field in self._meta.fields:
name = field.attname
if name not in exclude:
attr_dict[name] = getattr(self,name)
return attr_dict | class Modelminxi:
def to_dict(self, *exclude):
attr_dict = {}
for field in self._meta.fields:
name = field.attname
if name not in exclude:
attr_dict[name] = getattr(self, name)
return attr_dict |
numbers = []
for i in range(1,101) :
numbers.append(i)
prime_number = []
for number in numbers :
zero_mod = []
if number == 1 :
continue
else :
for divider in range(1,number+1) :
remain = number % divider
if remain == 0 :
zero_mod.append(divider)
if len(zero_mod) == 2 :
prime_number.append(number)
print(prime_number)
| numbers = []
for i in range(1, 101):
numbers.append(i)
prime_number = []
for number in numbers:
zero_mod = []
if number == 1:
continue
else:
for divider in range(1, number + 1):
remain = number % divider
if remain == 0:
zero_mod.append(divider)
if len(zero_mod) == 2:
prime_number.append(number)
print(prime_number) |
def get_data():
data = []
data_file = open("data.txt")
# data_file = open("test.txt")
for val in data_file:
data.append(val.strip())
data_file.close()
cubes = {}
for row in range(len(data)):
for col in range(len(data[row])):
if data[row][col] == '#':
cubes[f'{row}|{col}|0|0'] = 1
print(f"read {len(data)} lines\n")
return cubes
def print_state(cube_active_neighbor_counts, active_cubes):
for z in range(-7, 8):
print(f'z:{z}')
for x in range(-7, 8):
count_line = ''
active_line = ''
for y in range(-7, 8):
cube_location = f'{x}|{y}|{z}'
spacer = ' '
if cube_location == '0|0|0':
spacer = '<'
if cube_location in cube_active_neighbor_counts:
count_line += str(
cube_active_neighbor_counts[cube_location]) + spacer
else:
count_line += ' '
active = '#'
inactive = '.'
if cube_location == '0|0|0':
active = '*'
inactive = '+'
if cube_location in active_cubes:
active_line += active
else:
active_line += inactive
print(active_line, ' ', count_line)
def check_data(active_cubes):
for cycle in range(6):
print(f'\nCycle: {cycle + 1}')
cube_active_neighbor_counts = {}
for cube in active_cubes:
cx, cy, cz, cw = [int(c) for c in cube.split('|')]
# set neighbor counts
# print(cube)
for x in range(cx-1, cx+2):
for y in range(cy-1, cy+2):
for z in range(cz-1, cz+2):
for w in range(cw-1, cw+2):
cube_location = f'{x}|{y}|{z}|{w}'
if not (cube_location == cube):
if cube_location in cube_active_neighbor_counts:
cube_active_neighbor_counts[cube_location] += 1
else:
cube_active_neighbor_counts[cube_location] = 1
else:
if cube_location not in cube_active_neighbor_counts:
cube_active_neighbor_counts[cube_location] = 0
# print(cube_location,
# cube_active_neighbor_counts[cube_location])
# now make new cubes
new_cubes = {}
for cube_location in cube_active_neighbor_counts:
is_active = False
if cube_location in active_cubes:
is_active = active_cubes[cube_location]
if is_active and (cube_active_neighbor_counts[cube_location] == 2 or
cube_active_neighbor_counts[cube_location] == 3):
new_cubes[cube_location] = 1
if not (is_active) and cube_active_neighbor_counts[cube_location] == 3:
new_cubes[cube_location] = 1
active_cubes = new_cubes
print(f'Active Cube Count: {len(active_cubes)}')
# print_state(cube_active_neighbor_counts, active_cubes)
print(len(active_cubes))
def main():
data = get_data()
check_data(data)
main()
# track only live cubes
# track them as x-y-z strings in a hash
# so '1-2-1' in the hash means that cube is live.
| def get_data():
data = []
data_file = open('data.txt')
for val in data_file:
data.append(val.strip())
data_file.close()
cubes = {}
for row in range(len(data)):
for col in range(len(data[row])):
if data[row][col] == '#':
cubes[f'{row}|{col}|0|0'] = 1
print(f'read {len(data)} lines\n')
return cubes
def print_state(cube_active_neighbor_counts, active_cubes):
for z in range(-7, 8):
print(f'z:{z}')
for x in range(-7, 8):
count_line = ''
active_line = ''
for y in range(-7, 8):
cube_location = f'{x}|{y}|{z}'
spacer = ' '
if cube_location == '0|0|0':
spacer = '<'
if cube_location in cube_active_neighbor_counts:
count_line += str(cube_active_neighbor_counts[cube_location]) + spacer
else:
count_line += ' '
active = '#'
inactive = '.'
if cube_location == '0|0|0':
active = '*'
inactive = '+'
if cube_location in active_cubes:
active_line += active
else:
active_line += inactive
print(active_line, ' ', count_line)
def check_data(active_cubes):
for cycle in range(6):
print(f'\nCycle: {cycle + 1}')
cube_active_neighbor_counts = {}
for cube in active_cubes:
(cx, cy, cz, cw) = [int(c) for c in cube.split('|')]
for x in range(cx - 1, cx + 2):
for y in range(cy - 1, cy + 2):
for z in range(cz - 1, cz + 2):
for w in range(cw - 1, cw + 2):
cube_location = f'{x}|{y}|{z}|{w}'
if not cube_location == cube:
if cube_location in cube_active_neighbor_counts:
cube_active_neighbor_counts[cube_location] += 1
else:
cube_active_neighbor_counts[cube_location] = 1
elif cube_location not in cube_active_neighbor_counts:
cube_active_neighbor_counts[cube_location] = 0
new_cubes = {}
for cube_location in cube_active_neighbor_counts:
is_active = False
if cube_location in active_cubes:
is_active = active_cubes[cube_location]
if is_active and (cube_active_neighbor_counts[cube_location] == 2 or cube_active_neighbor_counts[cube_location] == 3):
new_cubes[cube_location] = 1
if not is_active and cube_active_neighbor_counts[cube_location] == 3:
new_cubes[cube_location] = 1
active_cubes = new_cubes
print(f'Active Cube Count: {len(active_cubes)}')
print(len(active_cubes))
def main():
data = get_data()
check_data(data)
main() |
# Write a python program to get a single string from two givan string, separated by a space
# and swap a first two char of each string
# Simple string = "abc", "xyz"
# Expected result = "xyc", "abz"
# st = "abc", "xyz"
# print(st[1][:2] + st[0][-1:])
# print(st[0][:2] + st[1][-1:])
def char_swap(a, b):
x = b[:2] + a[2:]
y = a[:2] + b[2:]
return x + " " + y
if __name__ == "__main__":
print(char_swap("abc", "xyz"))
| def char_swap(a, b):
x = b[:2] + a[2:]
y = a[:2] + b[2:]
return x + ' ' + y
if __name__ == '__main__':
print(char_swap('abc', 'xyz')) |
'''
Write a function that takes variable number of arguments and returns the sum , sum of squares, sum of
cubes, average, multiplication, multiplication of squares, multiplication of cubes of that numbers.
'''
def calc(*a):
sum = 0
mul = 1
sumSQR = 0
sumCubes = 0
mulSQR = 1
mulCubes = 1
for i in a:
sum = sum+i
mul = mul*i
sumSQR = sumSQR+(i**2)
sumCubes = sumCubes+ (i**3)
mulSQR = mulSQR*(i**2)
mulCubes = mulCubes*(i**3)
return sum,mul,sumSQR,sumCubes,mulSQR,mulCubes
#Call
sum,mul,sumSQR,sumCubes,mulSQR,mulCubes=calc(1,2,4,5,6,7,8)
print("sum = {},mul= {},sumSQR= {},sumCubes={},mulSQR={},mulCubes={}".format(sum,mul,sumSQR,sumCubes,mulSQR,mulCubes))
| """
Write a function that takes variable number of arguments and returns the sum , sum of squares, sum of
cubes, average, multiplication, multiplication of squares, multiplication of cubes of that numbers.
"""
def calc(*a):
sum = 0
mul = 1
sum_sqr = 0
sum_cubes = 0
mul_sqr = 1
mul_cubes = 1
for i in a:
sum = sum + i
mul = mul * i
sum_sqr = sumSQR + i ** 2
sum_cubes = sumCubes + i ** 3
mul_sqr = mulSQR * i ** 2
mul_cubes = mulCubes * i ** 3
return (sum, mul, sumSQR, sumCubes, mulSQR, mulCubes)
(sum, mul, sum_sqr, sum_cubes, mul_sqr, mul_cubes) = calc(1, 2, 4, 5, 6, 7, 8)
print('sum = {},mul= {},sumSQR= {},sumCubes={},mulSQR={},mulCubes={}'.format(sum, mul, sumSQR, sumCubes, mulSQR, mulCubes)) |
# URLs
MEXC_BASE_URL = "https://www.mexc.com"
MEXC_SYMBOL_URL = '/open/api/v2/market/symbols'
MEXC_TICKERS_URL = '/open/api/v2/market/ticker'
MEXC_DEPTH_URL = '/open/api/v2/market/depth?symbol={trading_pair}&depth=200'
MEXC_PRICE_URL = '/open/api/v2/market/ticker?symbol={trading_pair}'
MEXC_PING_URL = '/open/api/v2/common/ping'
MEXC_PLACE_ORDER = "/open/api/v2/order/place"
MEXC_ORDER_DETAILS_URL = '/open/api/v2/order/query'
MEXC_ORDER_CANCEL = '/open/api/v2/order/cancel'
MEXC_BATCH_ORDER_CANCEL = '/open/api/v2/order/cancel'
MEXC_BALANCE_URL = '/open/api/v2/account/info'
MEXC_DEAL_DETAIL = '/open/api/v2/order/deal_detail'
# WS
MEXC_WS_URL_PUBLIC = 'wss://wbs.mexc.com/raw/ws'
| mexc_base_url = 'https://www.mexc.com'
mexc_symbol_url = '/open/api/v2/market/symbols'
mexc_tickers_url = '/open/api/v2/market/ticker'
mexc_depth_url = '/open/api/v2/market/depth?symbol={trading_pair}&depth=200'
mexc_price_url = '/open/api/v2/market/ticker?symbol={trading_pair}'
mexc_ping_url = '/open/api/v2/common/ping'
mexc_place_order = '/open/api/v2/order/place'
mexc_order_details_url = '/open/api/v2/order/query'
mexc_order_cancel = '/open/api/v2/order/cancel'
mexc_batch_order_cancel = '/open/api/v2/order/cancel'
mexc_balance_url = '/open/api/v2/account/info'
mexc_deal_detail = '/open/api/v2/order/deal_detail'
mexc_ws_url_public = 'wss://wbs.mexc.com/raw/ws' |
CONFUSION_MATRIX = "confusion_matrix"
AP = "ap"
DETECTION_AP = "detection_mAP"
DETECTION_APS = "detection_APs"
MOTA = "MOTA"
MOTP = "MOTP"
FALSE_POSITIVES = "false_positives"
FALSE_NEGATIVES = "false_negatives"
ID_SWITCHES = "id_switches"
AP_INTERPOLATED = "ap_interpolated"
ERRORS = "errors"
IOU = "iou"
BINARY_IOU = "binary_IOU"
RANKS = "ranks"
DT_NEG = "u0"
DT_POS = "u1"
CLICKS = "clicks"
FORWARD_INTERACTIVE = "forward_interactive"
FORWARD_RECURSIVE = "forward_recursive"
ONESHOT_INTERACTIVE = "oneshot_interactive"
ITERATIVE_FORWARD = "iterative_forward"
INTERACTIVE_DT_METHOD = "dt_method"
DT_NEG_PARAMS = "dt_neg_params"
DT_POS_PARAMS = "dt_pos_params"
USE_CLICKS = "use_clicks"
OLD_LABEL_AS_DT = "old_label_as_distance_transform"
STRATEGY = "STRATEGY"
IGNORE_CLASSES = "ignore_classes"
DT_FN_ARGS = "distance_transform_fn_args"
# Train recursively - add a click based on the previous output mask for the interactive correction network.
RECURSIVE_TRAINING = "recursive_training"
YS_ARGMAX = "ys_argmax"
TAGS = "tags"
BBOXES = "bboxes"
IGNORE_REGIONS = "ignore_regions"
CLASSES = "classes"
IDS = "ids"
UNNORMALIZED_IMG = "unnormalized_img"
IMG_IDS = "img_ids"
ORIGINAL_SIZES = "original_size"
RESIZED_SIZES = "resized_size"
CLUSTER_IDS = "cluster_ids"
ORIGINAL_LABELS = "original_labels"
ADJUSTED_MUTUAL_INFORMATION = "AMI"
HOMOGENEITY = "homogeneity"
COMPLETENESS = "completeness"
EMBEDDING = "embedding"
PREV_NEG_CLICKS = 'prev_neg_clicks'
PREV_POS_CLICKS = 'prev_pos_clicks'
SCENE_INFOS = "scene_infos"
LABELS = "labels"
INPUTS = "inputs"
BYPASS_MASKS_FLAG = "bypass_masks_flag"
| confusion_matrix = 'confusion_matrix'
ap = 'ap'
detection_ap = 'detection_mAP'
detection_aps = 'detection_APs'
mota = 'MOTA'
motp = 'MOTP'
false_positives = 'false_positives'
false_negatives = 'false_negatives'
id_switches = 'id_switches'
ap_interpolated = 'ap_interpolated'
errors = 'errors'
iou = 'iou'
binary_iou = 'binary_IOU'
ranks = 'ranks'
dt_neg = 'u0'
dt_pos = 'u1'
clicks = 'clicks'
forward_interactive = 'forward_interactive'
forward_recursive = 'forward_recursive'
oneshot_interactive = 'oneshot_interactive'
iterative_forward = 'iterative_forward'
interactive_dt_method = 'dt_method'
dt_neg_params = 'dt_neg_params'
dt_pos_params = 'dt_pos_params'
use_clicks = 'use_clicks'
old_label_as_dt = 'old_label_as_distance_transform'
strategy = 'STRATEGY'
ignore_classes = 'ignore_classes'
dt_fn_args = 'distance_transform_fn_args'
recursive_training = 'recursive_training'
ys_argmax = 'ys_argmax'
tags = 'tags'
bboxes = 'bboxes'
ignore_regions = 'ignore_regions'
classes = 'classes'
ids = 'ids'
unnormalized_img = 'unnormalized_img'
img_ids = 'img_ids'
original_sizes = 'original_size'
resized_sizes = 'resized_size'
cluster_ids = 'cluster_ids'
original_labels = 'original_labels'
adjusted_mutual_information = 'AMI'
homogeneity = 'homogeneity'
completeness = 'completeness'
embedding = 'embedding'
prev_neg_clicks = 'prev_neg_clicks'
prev_pos_clicks = 'prev_pos_clicks'
scene_infos = 'scene_infos'
labels = 'labels'
inputs = 'inputs'
bypass_masks_flag = 'bypass_masks_flag' |
class GitRequire(object):
def __init__(self, git_url=None, branch=None, submodule=False):
self.git_url = git_url
self.submodule = submodule
self.branch = branch
def clone_params(self):
clone_params = {"single_branch": True}
if self.branch is not None:
clone_params["branch"] = self.branch
return clone_params
def __eq__(self, other):
return (
self.git_url == other.git_url
and self.submodule == other.submodule
and self.branch == other.branch
)
def __repr__(self):
return "%s,%s,%s" % (self.git_url, self.branch, self.submodule)
| class Gitrequire(object):
def __init__(self, git_url=None, branch=None, submodule=False):
self.git_url = git_url
self.submodule = submodule
self.branch = branch
def clone_params(self):
clone_params = {'single_branch': True}
if self.branch is not None:
clone_params['branch'] = self.branch
return clone_params
def __eq__(self, other):
return self.git_url == other.git_url and self.submodule == other.submodule and (self.branch == other.branch)
def __repr__(self):
return '%s,%s,%s' % (self.git_url, self.branch, self.submodule) |
# Object in Python do not have a fixed layout.
class X:
def __init__(self, a):
self.a = a
x = X(1)
print(x.a) # 1
# For example, we can add new attributes to objects:
x.b = 5
print(x.b) # 5
# Or even new methods into a class:
X.foo = lambda self: 10
print(x.foo()) # 10
# Or even changing base classes during runtime (this is just for illustration,
# I do not recommend doing this in practice):
class A:
def foo(self):
return 1
class B(A):
pass
class C:
def foo(self):
return 2
b = B()
print(b.foo(), B.__bases__) # 1 (<class '__main__.A'>,)
B.__bases__ = (C,)
print(b.foo(), B.__bases__) # 2 (<class '__main__.C'>,)
| class X:
def __init__(self, a):
self.a = a
x = x(1)
print(x.a)
x.b = 5
print(x.b)
X.foo = lambda self: 10
print(x.foo())
class A:
def foo(self):
return 1
class B(A):
pass
class C:
def foo(self):
return 2
b = b()
print(b.foo(), B.__bases__)
B.__bases__ = (C,)
print(b.foo(), B.__bases__) |
class Solution:
# @param A : list of strings
# @return a strings
def longestCommonPrefix(self, A):
common_substring = ""
if A:
common_substring = A[0]
for s in A[1:]:
i = 0
l = len(min(common_substring, s))
while i < l:
if s[i] != common_substring[i]:
break
else:
i += 1
common_substring = common_substring[:i]
return common_substring
s = Solution()
print(s.longestCommonPrefix(["abcdefgh", "abefghijk", "abcefgh"]))
print(s.longestCommonPrefix([ "aaaaaaaaaaaaaaaaaaaaaaa", "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "aaaaaaaaaaaaaaaaaaaaaaaaaa", "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "aaaaaa", "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "aaaaa", "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "aaaaaaaaaaaaaaaaaaaaaa", "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" ])) | class Solution:
def longest_common_prefix(self, A):
common_substring = ''
if A:
common_substring = A[0]
for s in A[1:]:
i = 0
l = len(min(common_substring, s))
while i < l:
if s[i] != common_substring[i]:
break
else:
i += 1
common_substring = common_substring[:i]
return common_substring
s = solution()
print(s.longestCommonPrefix(['abcdefgh', 'abefghijk', 'abcefgh']))
print(s.longestCommonPrefix(['aaaaaaaaaaaaaaaaaaaaaaa', 'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa', 'aaaaaaaaaaaaaaaaaaaaaaaaaa', 'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa', 'aaaaaa', 'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa', 'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa', 'aaaaa', 'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa', 'aaaaaaaaaaaaaaaaaaaaaa', 'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa', 'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa', 'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa'])) |
# Link to the problem: https://www.codechef.com/LTIME63B/problems/EID
def EID():
_ = input()
A = list(map(int, input().split()))
A.sort()
size = len(A)
diff = A[size - 1]
for i in range(size - 1):
tempDiff = A[i + 1] - A[i]
if tempDiff < diff:
diff = tempDiff
return diff
def main():
T = int(input())
while T:
T -= 1
res = EID()
print(res)
if __name__ == "__main__":
main() | def eid():
_ = input()
a = list(map(int, input().split()))
A.sort()
size = len(A)
diff = A[size - 1]
for i in range(size - 1):
temp_diff = A[i + 1] - A[i]
if tempDiff < diff:
diff = tempDiff
return diff
def main():
t = int(input())
while T:
t -= 1
res = eid()
print(res)
if __name__ == '__main__':
main() |
monster = ['fairy', 'goblin', 'ogre', 'werewolf',
'vampire', 'gargoyle', 'pirate', 'undead']
weapon1 = ['dagger', 'stone', 'pistol', 'knife']
weapon2 = ['sword', 'war hammer', 'machine gun', 'battle axe', 'war scythe']
scene = ['grass and yellow wildflowers.',
'sand and sea shells',
'sand and cactus']
place = ['field', 'beach', 'jungle', 'dessert', 'rainforest', 'city']
| monster = ['fairy', 'goblin', 'ogre', 'werewolf', 'vampire', 'gargoyle', 'pirate', 'undead']
weapon1 = ['dagger', 'stone', 'pistol', 'knife']
weapon2 = ['sword', 'war hammer', 'machine gun', 'battle axe', 'war scythe']
scene = ['grass and yellow wildflowers.', 'sand and sea shells', 'sand and cactus']
place = ['field', 'beach', 'jungle', 'dessert', 'rainforest', 'city'] |
# if-elif-else ladder
'''
if is a conditional statement that is used to perform different actions based on different conditions.
'''
if (5 < 6):
print('5 is less than 6')
print()
print()
a = 6
if (a == 5):
print('a is equal to 5')
else:
print('a is not equal to 5')
print()
print()
a = 6
b = 5
if (a < b):
print('a is less than b')
elif (a == b):
print('a is equal to b')
else:
print('a is greater than b')
# elif stands for `else if`
'''
On comaparing 2 numbers, we get one of the following 3 results:
- a is less than b
- a is equal to b
- a is greater than b
'''
print()
print()
if (a < b):
print('a is less than b')
elif (a == b):
print('a is equal to b')
elif (a > b):
print('a is greater than b')
'''
Conclusion:
- An if statement states whether to execute some code or not.
- An elif statement states the same as if, but is executed only if the previous if statement is not true.
- An else statement is executed if all the previous conditions are not true.
'''
'''
NOTE:
If a if condition is true, then the code under the if block is executed and the successive elif and else blocks are not executed.
''' | """
if is a conditional statement that is used to perform different actions based on different conditions.
"""
if 5 < 6:
print('5 is less than 6')
print()
print()
a = 6
if a == 5:
print('a is equal to 5')
else:
print('a is not equal to 5')
print()
print()
a = 6
b = 5
if a < b:
print('a is less than b')
elif a == b:
print('a is equal to b')
else:
print('a is greater than b')
'\nOn comaparing 2 numbers, we get one of the following 3 results:\n\n- a is less than b\n- a is equal to b\n- a is greater than b\n'
print()
print()
if a < b:
print('a is less than b')
elif a == b:
print('a is equal to b')
elif a > b:
print('a is greater than b')
'\nConclusion:\n\n - An if statement states whether to execute some code or not.\n - An elif statement states the same as if, but is executed only if the previous if statement is not true.\n - An else statement is executed if all the previous conditions are not true.\n'
'\nNOTE:\n\nIf a if condition is true, then the code under the if block is executed and the successive elif and else blocks are not executed.\n' |
def conta_votos(lista_candidatos_numeros, lista_votos, numeros):
brancos = 0
nulos = 0
contagem_geral = []
for i in range(len(lista_candidatos_numeros)):
contagem_individual = [lista_candidatos_numeros[i][0], numeros[i], 0]
contagem_geral.append(contagem_individual)
for v in votos:
if v in numeros:
for c in range(len(lista_candidatos_numeros)):
if v == lista_candidatos_numeros[c][1]:
contagem_geral[c][2] += 1
elif v == 0:
brancos += 1
else:
nulos += 1
print("-----------------------------")
for candidato in contagem_geral:
print(candidato[0], "-", candidato[1], "- com ", candidato[2], " voto(s)")
print("Brancos - com ", brancos, " voto(s)")
print("Nulos - com ", nulos, " voto(s)")
print("-----------------------------")
n = int(input())
cadidatos_numeros = []
numeros = []
for i in range(n):
nome_numero = []
x = input().split("#")
nome_numero.append(x[0])
nome_numero.append(int(x[1]))
numeros.append(int(x[1]))
cadidatos_numeros.append(nome_numero)
voto = int(input())
votos = []
while voto >= 0:
votos.append(voto)
voto = int(input())
conta_votos(cadidatos_numeros, votos, numeros) | def conta_votos(lista_candidatos_numeros, lista_votos, numeros):
brancos = 0
nulos = 0
contagem_geral = []
for i in range(len(lista_candidatos_numeros)):
contagem_individual = [lista_candidatos_numeros[i][0], numeros[i], 0]
contagem_geral.append(contagem_individual)
for v in votos:
if v in numeros:
for c in range(len(lista_candidatos_numeros)):
if v == lista_candidatos_numeros[c][1]:
contagem_geral[c][2] += 1
elif v == 0:
brancos += 1
else:
nulos += 1
print('-----------------------------')
for candidato in contagem_geral:
print(candidato[0], '-', candidato[1], '- com ', candidato[2], ' voto(s)')
print('Brancos - com ', brancos, ' voto(s)')
print('Nulos - com ', nulos, ' voto(s)')
print('-----------------------------')
n = int(input())
cadidatos_numeros = []
numeros = []
for i in range(n):
nome_numero = []
x = input().split('#')
nome_numero.append(x[0])
nome_numero.append(int(x[1]))
numeros.append(int(x[1]))
cadidatos_numeros.append(nome_numero)
voto = int(input())
votos = []
while voto >= 0:
votos.append(voto)
voto = int(input())
conta_votos(cadidatos_numeros, votos, numeros) |
global T_D,EPS,MU,ETA,dt
T_D = 12.0
L0 = 1.0
EPS = 0.05
# Osborne 2017 params
MU = -50.
ETA = 1.0
dt = 0.005 #hours
| global T_D, EPS, MU, ETA, dt
t_d = 12.0
l0 = 1.0
eps = 0.05
mu = -50.0
eta = 1.0
dt = 0.005 |
class Solution:
def numberOfArithmeticSlices(self, nums: List[int]) -> int:
if len(nums)<3:
return 0
output=[]
slices=[nums[0], nums[1]]
for num in nums[2:]:
if num-slices[-1]==slices[1]-slices[0]:
slices.append(num)
else:
if len(slices)>=3:
output.append(slices)
slices=[slices[-1], num]
output.append(slices)
result = 0
for o in output:
result+= int((len(o)-2)*(len(o)-1)/2)
return result | class Solution:
def number_of_arithmetic_slices(self, nums: List[int]) -> int:
if len(nums) < 3:
return 0
output = []
slices = [nums[0], nums[1]]
for num in nums[2:]:
if num - slices[-1] == slices[1] - slices[0]:
slices.append(num)
else:
if len(slices) >= 3:
output.append(slices)
slices = [slices[-1], num]
output.append(slices)
result = 0
for o in output:
result += int((len(o) - 2) * (len(o) - 1) / 2)
return result |
# Definition for a binary tree node.
class TreeNode:
def __init__(self, x):
self.val = x
self.left = None
self.right = None
class Solution:
def isSymmetric(self, root: TreeNode) -> bool:
if not root:
return True
return self.isSymmetricHelper(root.left, root.right)
def isSymmetricHelper(self, leftNode: TreeNode, rightNode: TreeNode) -> bool:
if not leftNode and not rightNode:
return True
if not leftNode or not rightNode:
return False
if leftNode.val != rightNode.val:
return False
return self.isSymmetricHelper(leftNode.left, rightNode.right) and self.isSymmetricHelper(leftNode.right, rightNode.left) | class Treenode:
def __init__(self, x):
self.val = x
self.left = None
self.right = None
class Solution:
def is_symmetric(self, root: TreeNode) -> bool:
if not root:
return True
return self.isSymmetricHelper(root.left, root.right)
def is_symmetric_helper(self, leftNode: TreeNode, rightNode: TreeNode) -> bool:
if not leftNode and (not rightNode):
return True
if not leftNode or not rightNode:
return False
if leftNode.val != rightNode.val:
return False
return self.isSymmetricHelper(leftNode.left, rightNode.right) and self.isSymmetricHelper(leftNode.right, rightNode.left) |
# Copyright 2019 The TensorFlow Authors. All Rights Reserved.
#
# 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.
# ==============================================================================
def preprocess_input(x, data_format=None, mode=None):
if mode == 'tf':
x /= 127.5
x -= 1.
return x
elif mode == 'torch':
x /= 255.
mean = [0.485, 0.456, 0.406]
std = [0.229, 0.224, 0.225]
elif mode == 'caffe':
if data_format == 'channels_first':
# 'RGB'->'BGR'
if x.ndim == 3:
x = x[::-1, ...]
else:
x = x[:, ::-1, ...]
else:
# 'RGB'->'BGR'
x = x[..., ::-1]
mean = [103.939, 116.779, 123.68]
std = None
elif mode == 'tfhub':
x /= 255.
return x
else:
return x
# Zero-center by mean pixel
if data_format == 'channels_first':
if x.ndim == 3:
x[0, :, :] -= mean[0]
x[1, :, :] -= mean[1]
x[2, :, :] -= mean[2]
if std is not None:
x[0, :, :] /= std[0]
x[1, :, :] /= std[1]
x[2, :, :] /= std[2]
else:
x[:, 0, :, :] -= mean[0]
x[:, 1, :, :] -= mean[1]
x[:, 2, :, :] -= mean[2]
if std is not None:
x[:, 0, :, :] /= std[0]
x[:, 1, :, :] /= std[1]
x[:, 2, :, :] /= std[2]
else:
x[..., 0] -= mean[0]
x[..., 1] -= mean[1]
x[..., 2] -= mean[2]
if std is not None:
x[..., 0] /= std[0]
x[..., 1] /= std[1]
x[..., 2] /= std[2]
return x
| def preprocess_input(x, data_format=None, mode=None):
if mode == 'tf':
x /= 127.5
x -= 1.0
return x
elif mode == 'torch':
x /= 255.0
mean = [0.485, 0.456, 0.406]
std = [0.229, 0.224, 0.225]
elif mode == 'caffe':
if data_format == 'channels_first':
if x.ndim == 3:
x = x[::-1, ...]
else:
x = x[:, ::-1, ...]
else:
x = x[..., ::-1]
mean = [103.939, 116.779, 123.68]
std = None
elif mode == 'tfhub':
x /= 255.0
return x
else:
return x
if data_format == 'channels_first':
if x.ndim == 3:
x[0, :, :] -= mean[0]
x[1, :, :] -= mean[1]
x[2, :, :] -= mean[2]
if std is not None:
x[0, :, :] /= std[0]
x[1, :, :] /= std[1]
x[2, :, :] /= std[2]
else:
x[:, 0, :, :] -= mean[0]
x[:, 1, :, :] -= mean[1]
x[:, 2, :, :] -= mean[2]
if std is not None:
x[:, 0, :, :] /= std[0]
x[:, 1, :, :] /= std[1]
x[:, 2, :, :] /= std[2]
else:
x[..., 0] -= mean[0]
x[..., 1] -= mean[1]
x[..., 2] -= mean[2]
if std is not None:
x[..., 0] /= std[0]
x[..., 1] /= std[1]
x[..., 2] /= std[2]
return x |
### Insertion Sort - Part 2 - Solution
def insertionSort2(nums):
for i in range(1, len(nums)):
comp, prev = nums[i], i-1
while (prev >= 0) and (nums[prev] > comp):
nums[prev+1] = nums[prev]
prev -= 1
nums[prev+1] = comp
print(*nums)
n = int(input())
nums = list(map(int, input().split()[:n]))
insertionSort2(nums) | def insertion_sort2(nums):
for i in range(1, len(nums)):
(comp, prev) = (nums[i], i - 1)
while prev >= 0 and nums[prev] > comp:
nums[prev + 1] = nums[prev]
prev -= 1
nums[prev + 1] = comp
print(*nums)
n = int(input())
nums = list(map(int, input().split()[:n]))
insertion_sort2(nums) |
### CLASSES
class TrackPoint:
def __init__(self, time, coordinates, alt):
self.time = time
self.coordinates = coordinates
self.alt = alt
def __repr__(self):
return "%s %s %dm" % (self.time.strftime("%H:%m:%S"), self.coordinates, self.alt)
| class Trackpoint:
def __init__(self, time, coordinates, alt):
self.time = time
self.coordinates = coordinates
self.alt = alt
def __repr__(self):
return '%s %s %dm' % (self.time.strftime('%H:%m:%S'), self.coordinates, self.alt) |
VARS = [
{'name': 'script_name',
'required': True,
'example': 'fancy_script'},
{'name': 'description',
'example': 'Super fancy script'}
]
| vars = [{'name': 'script_name', 'required': True, 'example': 'fancy_script'}, {'name': 'description', 'example': 'Super fancy script'}] |
def test_api_docs(api_client):
rv = api_client.get("/apidocs", follow_redirects=True)
assert rv.status_code == 200
assert b"JournalsDB API Docs" in rv.data
| def test_api_docs(api_client):
rv = api_client.get('/apidocs', follow_redirects=True)
assert rv.status_code == 200
assert b'JournalsDB API Docs' in rv.data |
# Solution A
class Solution:
def isLongPressedName(self, name: str, typed: str) -> bool:
i = 0
name += "1"
for s in typed:
if s == name[i]:
i += 1
elif s != name[i - 1]:
return False
return i == len(name) - 1
# Solution B
class Solution:
def isLongPressedName(self, name: str, typed: str) -> bool:
i, j = 0, 0
m, n = len(name), len(typed)
while j < n:
if i < m and name[i] == typed[j]:
i += 1
elif j == 0 or typed[j - 1] != typed[j]:
return False
j += 1
return i == m
| class Solution:
def is_long_pressed_name(self, name: str, typed: str) -> bool:
i = 0
name += '1'
for s in typed:
if s == name[i]:
i += 1
elif s != name[i - 1]:
return False
return i == len(name) - 1
class Solution:
def is_long_pressed_name(self, name: str, typed: str) -> bool:
(i, j) = (0, 0)
(m, n) = (len(name), len(typed))
while j < n:
if i < m and name[i] == typed[j]:
i += 1
elif j == 0 or typed[j - 1] != typed[j]:
return False
j += 1
return i == m |
#!/usr/bin/env python
# coding: utf-8
# # Re-implement some Python built-in functions
# In[1]:
def my_max(l1):
max_number = l1[0]
for number in l1:
if number > max_number:
max_number = number
return max_number
# In[2]:
def my_min(l1):
min_number = l1[0]
for number in l1:
if number < min_number:
min_number = number
return min_number
# In[3]:
def my_sum(l1):
total = 0
for number in l1:
total += number
return total
# In[4]:
def my_len(l1):
count = 0
for i in l1:
count += 1
return count
# In[5]:
def my_divmod(x, y):
result = x // y
reminder = x % y
return result, reminder
# In[6]:
def my_power(x, y):
return x ** y
# In[7]:
def my_abs(x):
if x >= 0:
return x
else:
return x * -1
# # # calls
#
# # In[8]:
#
#
# print(my_max([1, 2, 5]))
#
#
# # In[9]:
#
#
# print(my_min([1, 2, 5]))
#
#
# # In[10]:
#
#
# print(my_sum([1, 2, 5]))
#
#
# # In[11]:
#
#
# print(my_len([1, 2, 5]))
#
#
# # In[12]:
#
#
# print(my_divmod(23, 5))
#
#
# # In[13]:
#
#
# print(my_power(23, 5))
#
#
# # In[14]:
#
#
# print(my_abs(-12))
| def my_max(l1):
max_number = l1[0]
for number in l1:
if number > max_number:
max_number = number
return max_number
def my_min(l1):
min_number = l1[0]
for number in l1:
if number < min_number:
min_number = number
return min_number
def my_sum(l1):
total = 0
for number in l1:
total += number
return total
def my_len(l1):
count = 0
for i in l1:
count += 1
return count
def my_divmod(x, y):
result = x // y
reminder = x % y
return (result, reminder)
def my_power(x, y):
return x ** y
def my_abs(x):
if x >= 0:
return x
else:
return x * -1 |
# Copyright 2021 The Chromium OS Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
register_npcx_project(
project_name="herobrine_npcx9",
zephyr_board="herobrine_npcx9",
dts_overlays=[
"gpio.dts",
"battery.dts",
"i2c.dts",
"motionsense.dts",
"switchcap.dts",
"usbc.dts",
],
)
| register_npcx_project(project_name='herobrine_npcx9', zephyr_board='herobrine_npcx9', dts_overlays=['gpio.dts', 'battery.dts', 'i2c.dts', 'motionsense.dts', 'switchcap.dts', 'usbc.dts']) |
num1=num2=res=0
def cn():
global canal
canal="CFB Cursos"
cn()
print(canal) | num1 = num2 = res = 0
def cn():
global canal
canal = 'CFB Cursos'
cn()
print(canal) |
class Db:
def __init__(self):
self._db = None
self._connection = None
@property
def db(self):
return self._db
@db.setter
def db(self, db):
self._db = db
async def _make_connection(self):
self._connection = await self.db.acquire()
async def _close_connection(self):
await self.db.release(self._connection)
| class Db:
def __init__(self):
self._db = None
self._connection = None
@property
def db(self):
return self._db
@db.setter
def db(self, db):
self._db = db
async def _make_connection(self):
self._connection = await self.db.acquire()
async def _close_connection(self):
await self.db.release(self._connection) |
# -*- coding: utf-8 -*-
# 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.
# All hardware-specific features are prefixed with this namespace
_HW_NS = 'hw:'
# All CPU-specific features are prefixed with this namespace
_CPU_NS = _HW_NS + 'cpu:'
_CPU_X86_NS = _CPU_NS + 'x86:'
# ref: https://en.wikipedia.org/wiki/Streaming_SIMD_Extensions
HW_CPU_X86_AVX = _CPU_X86_NS + 'avx'
HW_CPU_X86_AVX2 = _CPU_X86_NS + 'avx2'
HW_CPU_X86_CLMUL = _CPU_X86_NS + 'clmul'
HW_CPU_X86_FMA3 = _CPU_X86_NS + 'fma3'
HW_CPU_X86_FMA4 = _CPU_X86_NS + 'fma4'
HW_CPU_X86_F16C = _CPU_X86_NS + 'f16c'
HW_CPU_X86_MMX = _CPU_X86_NS + 'mmx'
HW_CPU_X86_SSE = _CPU_X86_NS + 'sse'
HW_CPU_X86_SSE2 = _CPU_X86_NS + 'sse2'
HW_CPU_X86_SSE3 = _CPU_X86_NS + 'sse3'
HW_CPU_X86_SSSE3 = _CPU_X86_NS + 'ssse3'
HW_CPU_X86_SSE41 = _CPU_X86_NS + 'sse41'
HW_CPU_X86_SSE42 = _CPU_X86_NS + 'sse42'
HW_CPU_X86_SSE4A = _CPU_X86_NS + 'sse4a'
HW_CPU_X86_XOP = _CPU_X86_NS + 'xop'
HW_CPU_X86_3DNOW = _CPU_X86_NS + '3dnow'
# ref: https://en.wikipedia.org/wiki/AVX-512
HW_CPU_X86_AVX512F = _CPU_X86_NS + 'avx512f' # foundation
HW_CPU_X86_AVX512CD = _CPU_X86_NS + 'avx512cd' # conflict detection
HW_CPU_X86_AVX512PF = _CPU_X86_NS + 'avx512pf' # prefetch
HW_CPU_X86_AVX512ER = _CPU_X86_NS + 'avx512er' # exponential + reciprocal
HW_CPU_X86_AVX512VL = _CPU_X86_NS + 'avx512vl' # vector length extensions
HW_CPU_X86_AVX512BW = _CPU_X86_NS + 'avx512bw' # byte + word
HW_CPU_X86_AVX512DQ = _CPU_X86_NS + 'avx512dq' # double word + quad word
# ref: https://en.wikipedia.org/wiki/Bit_Manipulation_Instruction_Sets
HW_CPU_X86_ABM = _CPU_X86_NS + 'abm'
HW_CPU_X86_BMI = _CPU_X86_NS + 'bmi'
HW_CPU_X86_BMI2 = _CPU_X86_NS + 'bmi2'
HW_CPU_X86_TBM = _CPU_X86_NS + 'tbm'
# ref: https://en.wikipedia.org/wiki/AES_instruction_set
HW_CPU_X86_AESNI = _CPU_X86_NS + 'aes-ni'
# ref: https://en.wikipedia.org/wiki/Intel_SHA_extensions
HW_CPU_X86_SHA = _CPU_X86_NS + 'sha'
# ref: https://en.wikipedia.org/wiki/Intel_MPX
HW_CPU_X86_MPX = _CPU_X86_NS + 'mpx'
# ref: https://en.wikipedia.org/wiki/Software_Guard_Extensions
HW_CPU_X86_SGX = _CPU_X86_NS + 'sgx'
# ref: https://en.wikipedia.org/wiki/Transactional_Synchronization_Extensions
HW_CPU_X86_TSX = _CPU_X86_NS + 'tsx'
# ref: https://en.wikipedia.org/wiki/Advanced_Synchronization_Facility
HW_CPU_X86_ASF = _CPU_X86_NS + 'asf'
# ref: https://en.wikipedia.org/wiki/VT-x
HW_CPU_X86_VMX = _CPU_X86_NS + 'vmx'
# ref: https://en.wikipedia.org/wiki/AMD-V
HW_CPU_X86_SVM = _CPU_X86_NS + 'svm'
NAMESPACES = {
'hardware': _HW_NS,
'hw': _HW_NS,
'cpu': _CPU_NS,
'x86': _CPU_X86_NS,
}
| _hw_ns = 'hw:'
_cpu_ns = _HW_NS + 'cpu:'
_cpu_x86_ns = _CPU_NS + 'x86:'
hw_cpu_x86_avx = _CPU_X86_NS + 'avx'
hw_cpu_x86_avx2 = _CPU_X86_NS + 'avx2'
hw_cpu_x86_clmul = _CPU_X86_NS + 'clmul'
hw_cpu_x86_fma3 = _CPU_X86_NS + 'fma3'
hw_cpu_x86_fma4 = _CPU_X86_NS + 'fma4'
hw_cpu_x86_f16_c = _CPU_X86_NS + 'f16c'
hw_cpu_x86_mmx = _CPU_X86_NS + 'mmx'
hw_cpu_x86_sse = _CPU_X86_NS + 'sse'
hw_cpu_x86_sse2 = _CPU_X86_NS + 'sse2'
hw_cpu_x86_sse3 = _CPU_X86_NS + 'sse3'
hw_cpu_x86_ssse3 = _CPU_X86_NS + 'ssse3'
hw_cpu_x86_sse41 = _CPU_X86_NS + 'sse41'
hw_cpu_x86_sse42 = _CPU_X86_NS + 'sse42'
hw_cpu_x86_sse4_a = _CPU_X86_NS + 'sse4a'
hw_cpu_x86_xop = _CPU_X86_NS + 'xop'
hw_cpu_x86_3_dnow = _CPU_X86_NS + '3dnow'
hw_cpu_x86_avx512_f = _CPU_X86_NS + 'avx512f'
hw_cpu_x86_avx512_cd = _CPU_X86_NS + 'avx512cd'
hw_cpu_x86_avx512_pf = _CPU_X86_NS + 'avx512pf'
hw_cpu_x86_avx512_er = _CPU_X86_NS + 'avx512er'
hw_cpu_x86_avx512_vl = _CPU_X86_NS + 'avx512vl'
hw_cpu_x86_avx512_bw = _CPU_X86_NS + 'avx512bw'
hw_cpu_x86_avx512_dq = _CPU_X86_NS + 'avx512dq'
hw_cpu_x86_abm = _CPU_X86_NS + 'abm'
hw_cpu_x86_bmi = _CPU_X86_NS + 'bmi'
hw_cpu_x86_bmi2 = _CPU_X86_NS + 'bmi2'
hw_cpu_x86_tbm = _CPU_X86_NS + 'tbm'
hw_cpu_x86_aesni = _CPU_X86_NS + 'aes-ni'
hw_cpu_x86_sha = _CPU_X86_NS + 'sha'
hw_cpu_x86_mpx = _CPU_X86_NS + 'mpx'
hw_cpu_x86_sgx = _CPU_X86_NS + 'sgx'
hw_cpu_x86_tsx = _CPU_X86_NS + 'tsx'
hw_cpu_x86_asf = _CPU_X86_NS + 'asf'
hw_cpu_x86_vmx = _CPU_X86_NS + 'vmx'
hw_cpu_x86_svm = _CPU_X86_NS + 'svm'
namespaces = {'hardware': _HW_NS, 'hw': _HW_NS, 'cpu': _CPU_NS, 'x86': _CPU_X86_NS} |
#
# PySNMP MIB module CISCO-MEDIATRACE-MIB (http://snmplabs.com/pysmi)
# ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/CISCO-MEDIATRACE-MIB
# Produced by pysmi-0.3.4 at Wed May 1 12:07: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)
#
Integer, OctetString, ObjectIdentifier = mibBuilder.importSymbols("ASN1", "Integer", "OctetString", "ObjectIdentifier")
NamedValues, = mibBuilder.importSymbols("ASN1-ENUMERATION", "NamedValues")
ValueRangeConstraint, ConstraintsIntersection, ConstraintsUnion, SingleValueConstraint, ValueSizeConstraint = mibBuilder.importSymbols("ASN1-REFINEMENT", "ValueRangeConstraint", "ConstraintsIntersection", "ConstraintsUnion", "SingleValueConstraint", "ValueSizeConstraint")
FlowMetricValue, = mibBuilder.importSymbols("CISCO-FLOW-MONITOR-TC-MIB", "FlowMetricValue")
ciscoMgmt, = mibBuilder.importSymbols("CISCO-SMI", "ciscoMgmt")
InterfaceIndexOrZero, = mibBuilder.importSymbols("IF-MIB", "InterfaceIndexOrZero")
InetPortNumber, InetAddress, InetAddressType = mibBuilder.importSymbols("INET-ADDRESS-MIB", "InetPortNumber", "InetAddress", "InetAddressType")
VlanId, = mibBuilder.importSymbols("Q-BRIDGE-MIB", "VlanId")
SnmpAdminString, = mibBuilder.importSymbols("SNMP-FRAMEWORK-MIB", "SnmpAdminString")
ModuleCompliance, NotificationGroup, ObjectGroup = mibBuilder.importSymbols("SNMPv2-CONF", "ModuleCompliance", "NotificationGroup", "ObjectGroup")
Counter32, MibScalar, MibTable, MibTableRow, MibTableColumn, IpAddress, MibIdentifier, Counter64, ModuleIdentity, Gauge32, iso, Bits, Integer32, NotificationType, Unsigned32, ObjectIdentity, TimeTicks = mibBuilder.importSymbols("SNMPv2-SMI", "Counter32", "MibScalar", "MibTable", "MibTableRow", "MibTableColumn", "IpAddress", "MibIdentifier", "Counter64", "ModuleIdentity", "Gauge32", "iso", "Bits", "Integer32", "NotificationType", "Unsigned32", "ObjectIdentity", "TimeTicks")
TruthValue, TimeStamp, DisplayString, RowStatus, TextualConvention = mibBuilder.importSymbols("SNMPv2-TC", "TruthValue", "TimeStamp", "DisplayString", "RowStatus", "TextualConvention")
ciscoMediatraceMIB = ModuleIdentity((1, 3, 6, 1, 4, 1, 9, 9, 800))
ciscoMediatraceMIB.setRevisions(('2012-08-23 00:00',))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
if mibBuilder.loadTexts: ciscoMediatraceMIB.setRevisionsDescriptions(('Initial version of this MIB module.',))
if mibBuilder.loadTexts: ciscoMediatraceMIB.setLastUpdated('201208230000Z')
if mibBuilder.loadTexts: ciscoMediatraceMIB.setOrganization('Cisco Systems, Inc.')
if mibBuilder.loadTexts: ciscoMediatraceMIB.setContactInfo('Cisco Systems Customer Service Postal: 170 W Tasman Drive San Jose, CA 95134 USA Tel: +1 800 553-NETS E-mail: cs-mediatrace@cisco.com')
if mibBuilder.loadTexts: ciscoMediatraceMIB.setDescription("Mediatrace helps to isolate and troubleshoot network degradation problems by enabling a network administrator to discover an Internet Protocol (IP) flow's path, dynamically enable monitoring capabilities on the nodes along the path, and collect information on a hop-by-hop basis. This information includes, among other things, flow statistics, and utilization information for incoming and outgoing interfaces, CPUs, and memory, as well as any changes to IP routes. This information can be retrieved by configuring Cisco Mediatrace to start a recurring monitoring session at a specific time and on specific days. The session can be configured to specify which metrics to collect, and how frequently they are collected. The hops along the path are automatically discovered as part of the operation. This module defines a MIB for the features of configuring Mediatrace sessions and obtain statistics data for a particular hop at a specific time. INITIATOR/RESPONDER ==================== At the top level, this MIB module describes the initiator and responder roles for the device. The scalar objects corresponding to each role are used to enable and set parameters like maximum sessions supported, IP address used for enabling the initiator,etc. Some of the scalar objects are used to obtain information about a particular role for the device. At a time the device supports a single initiator and/or single responder. The following scalar objects are used for enabling the initiator, +---------> cMTInitiatorEnable +---------> cMTInitiatorSourceInterface +---------> cMTInitiatorSourceAddressType +---------> cMTInitiatorSourceAddress +---------> cMTInitiatorMaxSessions In addition to the above objects, the following objects are used for obtaining information about the initiator role on the device, +---------> cMTInitiatorSoftwareVersionMajor +---------> cMTInitiatorSoftwareVersionMinor +---------> cMTInitiatorProtocolVersionMajor +---------> cMTInitiatorProtocolVersionMinor +---------> cMTInitiatorConfiguredSessions +---------> cMTInitiatorPendingSessions +---------> cMTInitiatorInactiveSessions +---------> cMTInitiatorActiveSessions The following scalar objects are used for enabling the responder, +---------> cMTResponderEnable +---------> cMTResponderMaxSessions In addition to the above objects, the following object is used for obtaining information about the responder role on the device, +---------> cMTResponderActiveSessions CONTROL TABLES =============== At the next level, this MIB module describes the entities - path specifier, flow specifier, session params and profile. This section also includes the session and scheduling entities. Each row in the cMTSessionTable corresponds to a single session. The session is a container and hence the path specifier, flow specifier, session params and profile objects for each session point to the corresponding entities in the cMTPathSpecifierTable, cMTFlowSpecifierTable, cMTSessionParamsTable, cMTMediaMonitorProfileTable and cMTSystemProfileTable tables. o cMTPathSpecifierTable - describes path specifiers. o cMTFlowSpecifierTable - describes flow specifiers. o cMTSessionParamsTable - describes session params entities. o cMTMediaMonitorProfileTable - describes media monitor profile. o cMTSystemProfileTable - describes system profiles. The cMTSessionTable has a sparse dependent relationship with each of these tables, as there exist situations when data from those tables may not be used for a particular session, including : 1) The session using system profile does not need flow specifier. 2) The session using media monitor profile may not need optional flow specifier. 3) The session may only use one of the two profiles, system or media monitor. o cMTSessionTable - describes sessions. o cMTScheduleTable - describes scheduling entities for the sessions. The cMTScheduleTable has sparse dependent relationship on the cMTSessionTable, as there exist situations when the a session is not available for scheduling, including - a session is created but is not yet scheduled. +----------------------+ | cMTPathSpecifierTable| | | +-----------------------------+ | cMTPathSpecifierName = ps1 | +-----------------------------+ | | +-----------------------------+ | cMTPathSpecifierName = ps2 | +-----------------------------+ : : : : +-----------------------------+ | cMTPathSpecifierName = ps6 | +-----------------------------+ | | +----------------------+ +----------------------+ | cMTFlowSpecifierTable| | | +-----------------------------+ | cMTFlowSpecifierName = fs1 | +-----------------------------+ | | +-----------------------------+ | cMTFlowSpecifierName = fs2 | +-----------------------------+ : : : : +-----------------------------+ | cMTFlowSpecifierName = fs6 | +-----------------------------+ | | +----------------------+ +-------------------------+ +----------------------+ | cMTSessionTable | | cMTSessionParamsTable| | | | | +-------------------------------------+ +--------------------------+ | cMTSessionNumber = 1 | |cMTSessionParamsName = sp1| | +---------------------------------+ | +--------------------------+ | |cMTSessionPathSpecifierName = ps1| | | | | +---------------------------------+ | +--------------------------+ | | |cMTSessionParamsName = sp2| | +---------------------------------+ | +--------------------------+ | |cMTSessionParamName = sp1 | | : : | +---------------------------------+ | : : | | +--------------------------+ | +---------------------------------+ | |cMTSessionParamsName = sp5| | |cMTSessionProfileName = rtp1 | | +--------------------------+ | +---------------------------------+ | | | | | +-----------------------+ | +---------------------------------+ | | |cMTSessionFlowSpecifierName = fs1| | | +---------------------------------+ | | | | +---------------------------------+ | | |cMTSessionTraceRouteEnabled = T | | | +---------------------------------+ | | | +-------------------------------------+ | | | | +-------------------------------------+ | cMTSessionNumber = 2 | | +---------------------------------+ | +---------------------------+ | |cMTSessionPathSpecifierName = ps2| | |cMTMediaMonitorProfileTable| | +---------------------------------+ | | | | | +-----------------------------+ | +---------------------------------+ | |cMTMediaMonitorProfileName | | |cMTSessionParamName = sp5 | | | =rtp1 | | +---------------------------------+ | +-----------------------------+ | | | | | +---------------------------------+ | +-----------------------------+ | |cMTSessionProfileName = intf1 | | |cMTMediaMonitorProfileName | | +---------------------------------+ | | =rtp1 | | | +-----------------------------+ | +---------------------------------+ | : : | |cMTSessionTraceRouteEnabled = T | | : : | +---------------------------------+ | +-----------------------------+ | | |cMTMediaMonitorProfileName | +-------------------------------------+ | =tcp1 | : : +-----------------------------+ : : | | +-------------------------------------+ +---------------------------+ | cMTSessionNumber = 10 | | +---------------------------------+ | | |cMTSessionPathSpecifierName = ps1| | | +---------------------------------+ | | | | +---------------------------------+ | | |cMTSessionParamName = sp1 | | | +---------------------------------+ | | | | +---------------------------------+ | | |cMTSessionProfileName = tcp1 | | | +---------------------------------+ | | | | +---------------------------------+ | | |cMTSessionTraceRouteEnabled = T | | | +---------------------------------+ | | | +-------------------------------------+ | | | | +-------------------------+ +----------------------+ | cMTSystemProfileTable| | | +-----------------------------+ | cMTSystemProfileName = intf1| +-----------------------------+ | | +-----------------------------+ | cMTSystemProfileName = cpu1 | +-----------------------------+ : : : : +-----------------------------+ | cMTSystemProfileName = intf2| +-----------------------------+ | | +----------------------+ DEFINITIONS =============== Mediatrace Initiator - This is the entity that supports creation of periodic sessions using global session id. Initiator can send request, collects the responses to those request and processes them for reporting. Henceforth, it will be referred as initiator. Mediatrace Responder - This is the entity that queries local database and features to obtain information based on the request sent by the Initiator as part of a session. The collected information is sent as response to the initiator to match the session. Henceforth, it will be referred as responder. Meta-data - Meta information about the flow not contained in the data packet. Examples of such information are global session id, multi party session id, type of application that is generating this flow e.g., telepresence. Meta-data global session identifier - it is one of the meta-data attributes which uniquely identifies a flow globally and is used to query the meta-data database for obtaining the corresponding 5-tuple (destination address, destination port, source address, source port and IP protocol) for path specifier or flow specifier. Path - This specifies the route taken by the Mediatrace request for a particular session. This can be specified in terms of single or multiple 5-tuple parameters - destination address, destination port, source address, source port and IP protocol. Gateway address and VLAN are required in cases where the path starts from network element without IP address. This is specified using path specifier entity. Path Specifier - The path specifier is generally specified using complete or partial 5-tuple (destination address, destination port, source address, source port and IP protocol) for Layer 3 initiator. Gateway and VLAN ID are required for a Layer 2 initiator. It can also use the meta-data Global session Id to specify the 5-tuple. A single row corresponds to a path specifier which is created or destroyed when a path specifier is added or removed. Each path specifier entry is uniquely identified by cMTPathSpecifierName. Examples of a path specifier are as follows, path-specifier (ps1)+-------> destination address (10.10.10.2) +-------> destination port (12344) +-------> source address (10.10.12.2) +-------> source port (12567) +-------> IP protocol (UDP) +-------> gateway (10.10.11.2) +-------> VLAN ID (601) path-specifier (ps2)+-------> meta-data global identifier (345123456) Flow - A unidirectional stream of packets conforming to a classifier. For example, packets having a particular source IP address, destination IP address, protocol type, source port number, and destination port number. This is specified using a flow specifier entity. Flow Specifier - The flow specifier is generally specified using complete or partial 5-tuple (destination address, destination port, source address, source port and IP protocol). It can also use the meta-data Global session Id to specify the 5-tuple. A single row corresponds to a flow specifier which is created or destroyed when a flow specifier is added or removed. Each flow specifier entry is uniquely identified by cMTFlowSpecifierName. Examples of a flow specifier is as follows, flow-specifier (fs1)+-------> destination address(10.11.10.2) +-------> destination port (12344) +-------> source address (10.11.12.2) +-------> source port (12567) +-------> IP protocol (UDP) flow-specifier (fs2)+-------> meta-data global identifier (345123456) Metric - It defines a measurement that reflects the quality of a traffic flow or a resource on a hop or along the path e.g. number of packets for a flow, memory utilization on a hop, number of dropped packets on an interface, etc. Metric-list - It defines logical grouping of related metrics e.g. Metric-list CPU has 1% and 2% CPU utilization metric, Metric-list interface has ingress interface speed, egress interface speed, etc. Profile - It defines the set of metric-lists to be collected from the devices along the path. It can also include additional parameters which are required for collecting the metric e.g., sampling interval (also referred as monitor interval), etc. A Profile can include a set of related metric-lists along with related configuration parameters. The metrics could be the media monitoring (also referred as performance monitoring) metrics such as jitter, packet loss, bit rate etc., or system resource utilization metrics or interface counters. Two profiles, System profile and Media Monitoring (Performance Monitoring) Profile are supported. The different profiles, metric-lists and metrics are listed below, +-----> Profile +---> Metric-list +--------> one min CPU utilization | System | CPU | | | +--------> five min CPU utilization | | | +---> Metric-list +-----> memory utilization Memory | | | +---> Metric-list +------> octets input at ingress | Interface | | +------> octets output at egress | |------> packets received with error | | at ingress | +------> packets with error at egress | +------> packets discarded at ingress | +------> packets discarded at egress | +------> ingress interface speed | +------> egress interface speed | +--> Profile +--> Metric-list +--> Common +--> loss of Media Monitor | TCP | IP | measurement confidence | | metrics | | | +--> media stop event occurred | | +--> IP packet drop count | | +--> IP byte count | | +--> IP byte rate | | +--> IP DSCP | | +--> IP TTL | | +--> IP protocol | | +---> media byte | | count | | | +--> TCP +--> TCP connect round trip | specific | delay | metrics | | +--> TCP lost event count | +--> Metric-list +--> Common +--> loss of measurement RTP | IP | confidence | metrics | | +--> media stop event occurred | +--> IP packet drop count | +--> IP byte count | +--> IP byte rate | +--> IP DSCP | +--> IP TTL | +--> IP protocol | +---> media byte count | +--> RTP +--> RTP inter arrival jitter specific | delay metrics | +--> RTP packets lost +--> RTP packets expected +--> RTP packets lost event | count +---> RTP loss percent Examples of the profiles are as follows, profile system - metric-list interface (sys1) profile media-monitor - metric-list rtp (rtp1) +-------> monitor interval (60 seconds) Session parameter Profile - These correspond to the various parameters related to session such as frequency of data collection, timeout for request, etc. These are specified using the session params entity. This is the entity that executes via a conceptual session/schedule control row and populates a conceptual statistics row. Example session parameter profile is as follows, Session-params (sp1)+-------> response timeout (10 seconds) +-------> frequency (60 seconds) +-------> history data sets (2) +-------> route change reaction time (10 seconds) +-------> inactivity timeout (180 seconds) Session - The session is a grouping of various configurable entities such as profiles, session parameters and path specifiers. Flow specifier is optional and required for media monitor profile only. Once these parameters for a mediatrace session are defined through these entities, they are combined into a mediatrace session. Example of sessions are as follows, session (1) +--------> path-specifier (ps1) +--------> session-params (sp1) +--------> profile system (sys1) metric-list interface session (2) +--------> path-specifier (ps1) +--------> session-params (sp2) +--------> profile media-monitor (rtp1) | metric-list rtp +--------> flow-specifier (fs1) A session cycles through various states in its lifetime. The different states are, Active state : A session is said to be in active state when it is requesting and collecting data from the responders. Inactive state : A session becomes inactive when it is either stopped by unscheduling or life expires. In this state it will no longer collect or request data. Pending state: A session is in pending state when the session is created but not yet scheduled to be active. Based on the state and history of a session it can be classified as configured or scheduled session. Configured session : A session which is created and is in pending or inactive state is called a configured session. It can also be a newly created session which has not been scheduled (made active) yet. Scheduled session : A session which is in active state or pending state which is already requesting and collecting data or has set a time in future to start requesting or collecting data. Responder: The responder is in active state when it is able to process the requests from the initiator, collect the data locally and send the Response back to the initiator. Reachability Address: It is the address of the interface on a responder which is used to send the response to the initiator. Statistics row - This conceptual row is indexed based on the session index, session life index, bucket number and hop information (Hop address type and Hop address). This identifies the statistics for a particular session with specific life, at a particular time and for a specific hop.")
class CiscoNTPTimeStamp(TextualConvention, OctetString):
reference = "D.L. Mills, 'Network Time Protocol (Version 3)', RFC-1305, March 1992, Section 3.1"
description = 'CiscoNTP timestamps are represented as a 64-bit unsigned fixed-point number, in seconds relative to 00:00 on 1 January 1900. The integer part is in the first 32 bits and the fraction part is in the last 32 bits.'
status = 'current'
displayHint = '4d.4d'
subtypeSpec = OctetString.subtypeSpec + ValueSizeConstraint(8, 8)
fixedLength = 8
class CiscoMediatraceSupportProtocol(TextualConvention, Integer32):
description = 'Represents different types of layer 3 protocols supported by by Mediatrace for path and flow specification. Currently two protocols - TCP and UDP are supported.'
status = 'current'
subtypeSpec = Integer32.subtypeSpec + ConstraintsUnion(SingleValueConstraint(6, 17))
namedValues = NamedValues(("tcp", 6), ("udp", 17))
class CiscoMediatraceDiscoveryProtocol(TextualConvention, Integer32):
description = 'Represents different types of protocols used by Mediatrace to discover the path based on the path specifier.'
status = 'current'
subtypeSpec = Integer32.subtypeSpec + ConstraintsUnion(SingleValueConstraint(46))
namedValues = NamedValues(("rsvp", 46))
ciscoMediatraceMIBNotifs = MibIdentifier((1, 3, 6, 1, 4, 1, 9, 9, 800, 0))
ciscoMediatraceMIBObjects = MibIdentifier((1, 3, 6, 1, 4, 1, 9, 9, 800, 1))
ciscoMediatraceMIBConform = MibIdentifier((1, 3, 6, 1, 4, 1, 9, 9, 800, 2))
cMTCtrl = MibIdentifier((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 1))
cMTStats = MibIdentifier((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 2))
cMTInitiatorEnable = MibScalar((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 1, 2), TruthValue()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: cMTInitiatorEnable.setStatus('current')
if mibBuilder.loadTexts: cMTInitiatorEnable.setDescription('This object specifies the whether the Mediatrace initiator is enabled on the network element.')
cMTInitiatorSourceInterface = MibScalar((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 1, 3), InterfaceIndexOrZero()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: cMTInitiatorSourceInterface.setStatus('current')
if mibBuilder.loadTexts: cMTInitiatorSourceInterface.setDescription('This object specifies the interface whose IP or IPv6 address will be used as initiator address. The Initiator address is used by layer 2 mediatrace responder to unicast the response message to initiator. This address is also reachability address for mediatrace hop 0. The value of this object should be set to ifIndex value of the desired interface from the ifTable.')
cMTInitiatorSourceAddressType = MibScalar((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 1, 4), InetAddressType()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: cMTInitiatorSourceAddressType.setStatus('current')
if mibBuilder.loadTexts: cMTInitiatorSourceAddressType.setDescription('Address type (IP or IPv6) of the initiator address specified in cMTInitiatorSourceAddress object. The value should be set to unknown (0) if source interface object is non zero.')
cMTInitiatorSourceAddress = MibScalar((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 1, 5), InetAddress()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: cMTInitiatorSourceAddress.setStatus('current')
if mibBuilder.loadTexts: cMTInitiatorSourceAddress.setDescription('This object specifies the IP address used by the initiator when obtaining the reachability address from a downstream responder.')
cMTInitiatorMaxSessions = MibScalar((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 1, 6), Unsigned32()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: cMTInitiatorMaxSessions.setStatus('current')
if mibBuilder.loadTexts: cMTInitiatorMaxSessions.setDescription('This object specifies the maximum number of mediatrace sessions that can be active simultaneously on the initiator.')
cMTInitiatorSoftwareVersionMajor = MibScalar((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 1, 7), Unsigned32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: cMTInitiatorSoftwareVersionMajor.setStatus('current')
if mibBuilder.loadTexts: cMTInitiatorSoftwareVersionMajor.setDescription('This object indicates the major version number of Mediatrace application.')
cMTInitiatorSoftwareVersionMinor = MibScalar((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 1, 8), Unsigned32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: cMTInitiatorSoftwareVersionMinor.setStatus('current')
if mibBuilder.loadTexts: cMTInitiatorSoftwareVersionMinor.setDescription('This object indicates the minor version number of Mediatrace application.')
cMTInitiatorProtocolVersionMajor = MibScalar((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 1, 9), Unsigned32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: cMTInitiatorProtocolVersionMajor.setStatus('current')
if mibBuilder.loadTexts: cMTInitiatorProtocolVersionMajor.setDescription('This object indicates the major version number of Mediatrace protocol.')
cMTInitiatorProtocolVersionMinor = MibScalar((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 1, 10), Unsigned32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: cMTInitiatorProtocolVersionMinor.setStatus('current')
if mibBuilder.loadTexts: cMTInitiatorProtocolVersionMinor.setDescription('This object indicates the minor version number of Mediatrace protocol.')
cMTInitiatorConfiguredSessions = MibScalar((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 1, 11), Gauge32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: cMTInitiatorConfiguredSessions.setStatus('current')
if mibBuilder.loadTexts: cMTInitiatorConfiguredSessions.setDescription('This object indicates number of mediatrace sessions configured. The session may or may not be active.')
cMTInitiatorPendingSessions = MibScalar((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 1, 12), Gauge32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: cMTInitiatorPendingSessions.setStatus('current')
if mibBuilder.loadTexts: cMTInitiatorPendingSessions.setDescription('This object indicates the current number of sessions in pending state on the initiator.')
cMTInitiatorInactiveSessions = MibScalar((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 1, 13), Gauge32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: cMTInitiatorInactiveSessions.setStatus('current')
if mibBuilder.loadTexts: cMTInitiatorInactiveSessions.setDescription('This object indicates the current number of sessions in inactive state on the initiator.')
cMTInitiatorActiveSessions = MibScalar((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 1, 14), Gauge32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: cMTInitiatorActiveSessions.setStatus('current')
if mibBuilder.loadTexts: cMTInitiatorActiveSessions.setDescription('This object indicates the current number of sessions in active state on the initiator.')
cMTResponderEnable = MibScalar((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 1, 15), TruthValue()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: cMTResponderEnable.setStatus('current')
if mibBuilder.loadTexts: cMTResponderEnable.setDescription("This object specifies the whether the Mediatrace responder is enabled. If set to 'true' the responder will be enabled. If set to false then mediatrace responder process will be stopped and the device will no longer be discovered as mediatrace capable hop along the flow path.")
cMTResponderMaxSessions = MibScalar((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 1, 16), Unsigned32()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: cMTResponderMaxSessions.setStatus('current')
if mibBuilder.loadTexts: cMTResponderMaxSessions.setDescription('This object specifies the maximum number of sessions that a responder can accept from initiator.')
cMTResponderActiveSessions = MibScalar((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 1, 17), Gauge32()).setUnits('sessions').setMaxAccess("readonly")
if mibBuilder.loadTexts: cMTResponderActiveSessions.setStatus('current')
if mibBuilder.loadTexts: cMTResponderActiveSessions.setDescription('This object indicates the current number of sessions that are in active state on the responder.')
cMTFlowSpecifierTable = MibTable((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 1, 18), )
if mibBuilder.loadTexts: cMTFlowSpecifierTable.setStatus('current')
if mibBuilder.loadTexts: cMTFlowSpecifierTable.setDescription('This table lists the flow specifiers contained by the device.')
cMTFlowSpecifierEntry = MibTableRow((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 1, 18, 1), ).setIndexNames((0, "CISCO-MEDIATRACE-MIB", "cMTFlowSpecifierName"))
if mibBuilder.loadTexts: cMTFlowSpecifierEntry.setStatus('current')
if mibBuilder.loadTexts: cMTFlowSpecifierEntry.setDescription("An entry represents a flow specifier which can be associated with a Mediatrace session contained by the cMTSessionTable. Each entry is uniquely identified by name specified by cMTFlowSpecifierName object. A row created in this table will be shown in 'show running' command and it will not be saved into non-volatile memory.")
cMTFlowSpecifierName = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 1, 18, 1, 1), SnmpAdminString())
if mibBuilder.loadTexts: cMTFlowSpecifierName.setStatus('current')
if mibBuilder.loadTexts: cMTFlowSpecifierName.setDescription('A unique identifier for the flow specifier.')
cMTFlowSpecifierRowStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 1, 18, 1, 2), RowStatus()).setMaxAccess("readcreate")
if mibBuilder.loadTexts: cMTFlowSpecifierRowStatus.setStatus('current')
if mibBuilder.loadTexts: cMTFlowSpecifierRowStatus.setDescription("This object specifies the status of the flow specifier. Only CreateAndGo and active status is supported. The following columns must be valid before activating the flow specifier: - cMTFlowSpecifierDestAddrType and cMTFlowSpecifierDestAddr OR - cMTFlowSpecifierMetadataGlobalId All other objects can assume default values. Once the flow specifier is activated no column can be modified. Setting this object to 'delete' will destroy the flow specifier. The flow specifier can be deleted only if it is not attached to any session.")
cMTFlowSpecifierMetadataGlobalId = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 1, 18, 1, 3), SnmpAdminString()).setMaxAccess("readcreate")
if mibBuilder.loadTexts: cMTFlowSpecifierMetadataGlobalId.setStatus('current')
if mibBuilder.loadTexts: cMTFlowSpecifierMetadataGlobalId.setDescription('This object specifies the meta-data Global ID of the flow specifier. Maximum of 24 characters can be specified for this field.')
cMTFlowSpecifierDestAddrType = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 1, 18, 1, 4), InetAddressType()).setMaxAccess("readcreate")
if mibBuilder.loadTexts: cMTFlowSpecifierDestAddrType.setStatus('current')
if mibBuilder.loadTexts: cMTFlowSpecifierDestAddrType.setDescription('This object specifies the type of IP address specified by the corresponding instance of cMTFlowSpecifierDestAddr.')
cMTFlowSpecifierDestAddr = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 1, 18, 1, 5), InetAddress()).setMaxAccess("readcreate")
if mibBuilder.loadTexts: cMTFlowSpecifierDestAddr.setStatus('current')
if mibBuilder.loadTexts: cMTFlowSpecifierDestAddr.setDescription('Address of the destination of the flow to be monitored.')
cMTFlowSpecifierDestPort = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 1, 18, 1, 6), InetPortNumber()).setMaxAccess("readcreate")
if mibBuilder.loadTexts: cMTFlowSpecifierDestPort.setStatus('current')
if mibBuilder.loadTexts: cMTFlowSpecifierDestPort.setDescription('This object specifies the destination port for the flow.')
cMTFlowSpecifierSourceAddrType = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 1, 18, 1, 7), InetAddressType()).setMaxAccess("readcreate")
if mibBuilder.loadTexts: cMTFlowSpecifierSourceAddrType.setStatus('current')
if mibBuilder.loadTexts: cMTFlowSpecifierSourceAddrType.setDescription('This object specifies the type of IP address specified by the corresponding instance of cMTFlowSpecifierSourceAddr.')
cMTFlowSpecifierSourceAddr = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 1, 18, 1, 8), InetAddress()).setMaxAccess("readcreate")
if mibBuilder.loadTexts: cMTFlowSpecifierSourceAddr.setStatus('current')
if mibBuilder.loadTexts: cMTFlowSpecifierSourceAddr.setDescription('This object specifies the source address for the flow to be monitored.')
cMTFlowSpecifierSourcePort = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 1, 18, 1, 9), InetPortNumber()).setMaxAccess("readcreate")
if mibBuilder.loadTexts: cMTFlowSpecifierSourcePort.setStatus('current')
if mibBuilder.loadTexts: cMTFlowSpecifierSourcePort.setDescription('This object specifies the source port for the flow.')
cMTFlowSpecifierIpProtocol = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 1, 18, 1, 10), CiscoMediatraceSupportProtocol().clone('udp')).setMaxAccess("readcreate")
if mibBuilder.loadTexts: cMTFlowSpecifierIpProtocol.setStatus('current')
if mibBuilder.loadTexts: cMTFlowSpecifierIpProtocol.setDescription('This is transport protocol type for the flow. Flow of this type between specified source and and destination will be monitored.')
cMTPathSpecifierTable = MibTable((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 1, 19), )
if mibBuilder.loadTexts: cMTPathSpecifierTable.setStatus('current')
if mibBuilder.loadTexts: cMTPathSpecifierTable.setDescription('This table lists the path specifiers contained by the device.')
cMTPathSpecifierEntry = MibTableRow((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 1, 19, 1), ).setIndexNames((0, "CISCO-MEDIATRACE-MIB", "cMTPathSpecifierName"))
if mibBuilder.loadTexts: cMTPathSpecifierEntry.setStatus('current')
if mibBuilder.loadTexts: cMTPathSpecifierEntry.setDescription("This entry defines path specifier that can be used in mediatrace session. Each entry is uniquely identified by name specified by cMTPathSpecifierName object. A row created in this table will be shown in 'show running' command and it will not be saved into non-volatile memory.")
cMTPathSpecifierName = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 1, 19, 1, 1), SnmpAdminString())
if mibBuilder.loadTexts: cMTPathSpecifierName.setStatus('current')
if mibBuilder.loadTexts: cMTPathSpecifierName.setDescription('A unique identifier for the path specifier.')
cMTPathSpecifierRowStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 1, 19, 1, 2), RowStatus()).setMaxAccess("readcreate")
if mibBuilder.loadTexts: cMTPathSpecifierRowStatus.setStatus('current')
if mibBuilder.loadTexts: cMTPathSpecifierRowStatus.setDescription("This object specifies the status of the path specifier. Only CreateAndGo and active status is supported. The following columns must be valid before activating the path specifier: - cMTPathSpecifierDestAddrType and cMTPathSpecifierDestAddr OR - cMTPathSpecifierMetadataGlobalId All other objects can assume default values. Once the path specifier is activated no column can be modified. Setting this object to 'delete' will destroy the path specifier. The path specifier can be deleted only if it is not attached to any session.")
cMTPathSpecifierMetadataGlobalId = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 1, 19, 1, 3), SnmpAdminString()).setMaxAccess("readcreate")
if mibBuilder.loadTexts: cMTPathSpecifierMetadataGlobalId.setStatus('current')
if mibBuilder.loadTexts: cMTPathSpecifierMetadataGlobalId.setDescription('Metadata global session id can be used as path specifier. This object should be populated when this is desired. Mediatrace software will query the Metadata database for five tuple to be used for establishing the path.')
cMTPathSpecifierDestAddrType = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 1, 19, 1, 4), InetAddressType()).setMaxAccess("readcreate")
if mibBuilder.loadTexts: cMTPathSpecifierDestAddrType.setStatus('current')
if mibBuilder.loadTexts: cMTPathSpecifierDestAddrType.setDescription('This object specifies the type of IP address specified by the corresponding instance of cMTPathSpecifierDestAddr.')
cMTPathSpecifierDestAddr = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 1, 19, 1, 5), InetAddress()).setMaxAccess("readcreate")
if mibBuilder.loadTexts: cMTPathSpecifierDestAddr.setStatus('current')
if mibBuilder.loadTexts: cMTPathSpecifierDestAddr.setDescription('This object specifies the destination address for the path specifier.')
cMTPathSpecifierDestPort = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 1, 19, 1, 6), InetPortNumber()).setMaxAccess("readcreate")
if mibBuilder.loadTexts: cMTPathSpecifierDestPort.setStatus('current')
if mibBuilder.loadTexts: cMTPathSpecifierDestPort.setDescription('This object specifies the destination port for the path specifier.')
cMTPathSpecifierSourceAddrType = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 1, 19, 1, 7), InetAddressType()).setMaxAccess("readcreate")
if mibBuilder.loadTexts: cMTPathSpecifierSourceAddrType.setStatus('current')
if mibBuilder.loadTexts: cMTPathSpecifierSourceAddrType.setDescription('This object specifies the type of IP address specified by the corresponding instance of cMTFlowSpecifierSourceAddr.')
cMTPathSpecifierSourceAddr = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 1, 19, 1, 8), InetAddress()).setMaxAccess("readcreate")
if mibBuilder.loadTexts: cMTPathSpecifierSourceAddr.setStatus('current')
if mibBuilder.loadTexts: cMTPathSpecifierSourceAddr.setDescription('This object specifies the source address for the path specifier.')
cMTPathSpecifierSourcePort = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 1, 19, 1, 9), InetPortNumber()).setMaxAccess("readcreate")
if mibBuilder.loadTexts: cMTPathSpecifierSourcePort.setStatus('current')
if mibBuilder.loadTexts: cMTPathSpecifierSourcePort.setDescription('This object specifies the source port for the path specifier.')
cMTPathSpecifierProtocolForDiscovery = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 1, 19, 1, 10), CiscoMediatraceDiscoveryProtocol().clone('rsvp')).setMaxAccess("readcreate")
if mibBuilder.loadTexts: cMTPathSpecifierProtocolForDiscovery.setStatus('current')
if mibBuilder.loadTexts: cMTPathSpecifierProtocolForDiscovery.setDescription('This object specifies the protocol used for path discovery on Mediatrace. Currently, only RSVP is used by default.')
cMTPathSpecifierGatewayAddrType = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 1, 19, 1, 11), InetAddressType()).setMaxAccess("readcreate")
if mibBuilder.loadTexts: cMTPathSpecifierGatewayAddrType.setStatus('current')
if mibBuilder.loadTexts: cMTPathSpecifierGatewayAddrType.setDescription('This object specifies the type of IP address specified by the corresponding instance of cMTPathSpecifierGatewayAddr.')
cMTPathSpecifierGatewayAddr = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 1, 19, 1, 12), InetAddress()).setMaxAccess("readcreate")
if mibBuilder.loadTexts: cMTPathSpecifierGatewayAddr.setStatus('current')
if mibBuilder.loadTexts: cMTPathSpecifierGatewayAddr.setDescription('When the mediatrace session is originated on layer-2 switch the address of gateway is required to establish the session. This object specifies address of this gateway.')
cMTPathSpecifierGatewayVlanId = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 1, 19, 1, 13), VlanId().subtype(subtypeSpec=ValueRangeConstraint(1, 4094))).setMaxAccess("readcreate")
if mibBuilder.loadTexts: cMTPathSpecifierGatewayVlanId.setStatus('current')
if mibBuilder.loadTexts: cMTPathSpecifierGatewayVlanId.setDescription('This object specifies the Vlan ID associated with the gateway for path specifier.')
cMTPathSpecifierIpProtocol = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 1, 19, 1, 14), CiscoMediatraceSupportProtocol().clone('udp')).setMaxAccess("readcreate")
if mibBuilder.loadTexts: cMTPathSpecifierIpProtocol.setStatus('current')
if mibBuilder.loadTexts: cMTPathSpecifierIpProtocol.setDescription('This object specifies which metrics are monitored for a path specifier. Currently, only TCP and UDP are supported.')
cMTSessionParamsTable = MibTable((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 1, 20), )
if mibBuilder.loadTexts: cMTSessionParamsTable.setStatus('current')
if mibBuilder.loadTexts: cMTSessionParamsTable.setDescription('This table is collection of session parameter profiles.')
cMTSessionParamsEntry = MibTableRow((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 1, 20, 1), ).setIndexNames((0, "CISCO-MEDIATRACE-MIB", "cMTSessionParamsName"))
if mibBuilder.loadTexts: cMTSessionParamsEntry.setStatus('current')
if mibBuilder.loadTexts: cMTSessionParamsEntry.setDescription("An entry represents session parameters that can be associated with a Mediatrace session contained by the cMTSessionTable. Each entry is uniquely identified by name specified by cMTSessionParamsName object. A row created in this table will be shown in 'show running' command and it will not be saved into non-volatile memory.")
cMTSessionParamsName = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 1, 20, 1, 1), SnmpAdminString())
if mibBuilder.loadTexts: cMTSessionParamsName.setStatus('current')
if mibBuilder.loadTexts: cMTSessionParamsName.setDescription('This object specifies the name of this set of session parameters.')
cMTSessionParamsRowStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 1, 20, 1, 2), RowStatus()).setMaxAccess("readcreate")
if mibBuilder.loadTexts: cMTSessionParamsRowStatus.setStatus('current')
if mibBuilder.loadTexts: cMTSessionParamsRowStatus.setDescription("This object specifies the status of the session parameters. Only CreateAndGo and active status is supported. In order for this object to become active cMTSessionParamsName must be defined. The value of cMTSessionParamsInactivityTimeout needs to be at least 3 times of the value of cMTSessionParamsFrequency. All other objects assume the default value. Once the session parameters is activated no column can be modified. Setting this object to 'delete' will destroy the session parameters. The session parameters can be deleted only if it is not attached to any session.")
cMTSessionParamsResponseTimeout = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 1, 20, 1, 3), Unsigned32().subtype(subtypeSpec=ValueRangeConstraint(1, 65535))).setUnits('seconds').setMaxAccess("readcreate")
if mibBuilder.loadTexts: cMTSessionParamsResponseTimeout.setStatus('current')
if mibBuilder.loadTexts: cMTSessionParamsResponseTimeout.setDescription('This object specifies the amount of time a session should wait for the responses after sending out a Mediatrace request. The initiator will discard any responses to a particular request after this timeout.')
cMTSessionParamsFrequency = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 1, 20, 1, 4), Unsigned32().subtype(subtypeSpec=ValueRangeConstraint(10, 3600)).clone(120)).setUnits('seconds').setMaxAccess("readcreate")
if mibBuilder.loadTexts: cMTSessionParamsFrequency.setStatus('current')
if mibBuilder.loadTexts: cMTSessionParamsFrequency.setDescription('Duration between two successive data fetch requests.')
cMTSessionParamsInactivityTimeout = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 1, 20, 1, 5), Unsigned32().subtype(subtypeSpec=ValueRangeConstraint(1, 10800))).setUnits('sconds').setMaxAccess("readcreate")
if mibBuilder.loadTexts: cMTSessionParamsInactivityTimeout.setStatus('current')
if mibBuilder.loadTexts: cMTSessionParamsInactivityTimeout.setDescription('This object specifies the interval that the responder wait without any requests from the initiator before removing a particular session. The inactivity timeout needs to be at least 3 times of the session frequency.')
cMTSessionParamsHistoryBuckets = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 1, 20, 1, 6), Unsigned32().subtype(subtypeSpec=ValueRangeConstraint(1, 10)).clone(3)).setUnits('buckets').setMaxAccess("readcreate")
if mibBuilder.loadTexts: cMTSessionParamsHistoryBuckets.setStatus('current')
if mibBuilder.loadTexts: cMTSessionParamsHistoryBuckets.setDescription('This object specifies the number of buckets of statistics retained. Each bucket will contain complete set of metrics collected for all hops in one iteration.')
cMTSessionParamsRouteChangeReactiontime = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 1, 20, 1, 7), Unsigned32().subtype(subtypeSpec=ValueRangeConstraint(0, 60))).setUnits('seconds').setMaxAccess("readcreate")
if mibBuilder.loadTexts: cMTSessionParamsRouteChangeReactiontime.setStatus('current')
if mibBuilder.loadTexts: cMTSessionParamsRouteChangeReactiontime.setDescription('This object specifies the amount of time the initiator should wait after receiving the first route change, before reacting to further route change notifications. Range is from 0 to 60.')
cMTMediaMonitorProfileTable = MibTable((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 1, 21), )
if mibBuilder.loadTexts: cMTMediaMonitorProfileTable.setStatus('current')
if mibBuilder.loadTexts: cMTMediaMonitorProfileTable.setDescription('This table lists the media monitor profiles configured on the device.')
cMTMediaMonitorProfileEntry = MibTableRow((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 1, 21, 1), ).setIndexNames((0, "CISCO-MEDIATRACE-MIB", "cMTMediaMonitorProfileName"))
if mibBuilder.loadTexts: cMTMediaMonitorProfileEntry.setStatus('current')
if mibBuilder.loadTexts: cMTMediaMonitorProfileEntry.setDescription("An entry represents a media monitor profile that can be associated with a Mediatrace session contained by the cMTSessionTable. The entry is uniquely identified by cMTMediaMonitorProfileName. A row created in this table will be shown in 'show running' command and it will not be saved into non-volatile memory.")
cMTMediaMonitorProfileName = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 1, 21, 1, 1), SnmpAdminString())
if mibBuilder.loadTexts: cMTMediaMonitorProfileName.setStatus('current')
if mibBuilder.loadTexts: cMTMediaMonitorProfileName.setDescription('This object specifies the name of the Mediatrace media monitor profile.')
cMTMediaMonitorProfileRowStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 1, 21, 1, 2), RowStatus()).setMaxAccess("readcreate")
if mibBuilder.loadTexts: cMTMediaMonitorProfileRowStatus.setStatus('current')
if mibBuilder.loadTexts: cMTMediaMonitorProfileRowStatus.setDescription("This object specifies the status of the media monitor profile. Only CreateAndGo and active status is supported. In order for this object to become active cMTMediaMonitorProfileName must be defined. All other objects assume the default value. Once the media monitor profile is activated no column can be modified. Setting this object to 'delete' will destroy the media monitor. The media monitor profile can be deleted only if it is not attached to any session.")
cMTMediaMonitorProfileMetric = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 1, 21, 1, 3), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("rtp", 1), ("tcp", 2)))).setMaxAccess("readcreate")
if mibBuilder.loadTexts: cMTMediaMonitorProfileMetric.setStatus('current')
if mibBuilder.loadTexts: cMTMediaMonitorProfileMetric.setDescription("This object specifies the type of metrics group to be collected in addition to basic IP metrics. Specify value as RTP if metrics from 'Metric-List RTP' are desired and 'TCP' if metrics in 'Metric-List TCP' is desired.")
cMTMediaMonitorProfileInterval = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 1, 21, 1, 4), Unsigned32().subtype(subtypeSpec=ValueRangeConstraint(10, 120))).setUnits('seconds').setMaxAccess("readcreate")
if mibBuilder.loadTexts: cMTMediaMonitorProfileInterval.setStatus('current')
if mibBuilder.loadTexts: cMTMediaMonitorProfileInterval.setDescription('This object specifies the sampling interval for the media monitor profile.')
cMTMediaMonitorProfileRtpMaxDropout = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 1, 21, 1, 5), Unsigned32().subtype(subtypeSpec=ValueRangeConstraint(1, 20)).clone(10)).setUnits('packets').setMaxAccess("readcreate")
if mibBuilder.loadTexts: cMTMediaMonitorProfileRtpMaxDropout.setStatus('current')
if mibBuilder.loadTexts: cMTMediaMonitorProfileRtpMaxDropout.setDescription('This object specifies the maximum number of dropouts allowed when sampling RTP monitoring metrics.')
cMTMediaMonitorProfileRtpMaxReorder = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 1, 21, 1, 6), Unsigned32().subtype(subtypeSpec=ValueRangeConstraint(1, 20)).clone(5)).setUnits('packets').setMaxAccess("readcreate")
if mibBuilder.loadTexts: cMTMediaMonitorProfileRtpMaxReorder.setStatus('current')
if mibBuilder.loadTexts: cMTMediaMonitorProfileRtpMaxReorder.setDescription('This object specifies the maximum number of reorders allowed when sampling RTP monitoring metrics.')
cMTMediaMonitorProfileRtpMinimalSequential = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 1, 21, 1, 7), Unsigned32().subtype(subtypeSpec=ValueRangeConstraint(2, 10))).setUnits('packets').setMaxAccess("readcreate")
if mibBuilder.loadTexts: cMTMediaMonitorProfileRtpMinimalSequential.setStatus('current')
if mibBuilder.loadTexts: cMTMediaMonitorProfileRtpMinimalSequential.setDescription('This object specifies the minimum number of sequental packets required to identify a stream as being an RTP flow.')
cMTSystemProfileTable = MibTable((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 1, 22), )
if mibBuilder.loadTexts: cMTSystemProfileTable.setStatus('current')
if mibBuilder.loadTexts: cMTSystemProfileTable.setDescription('This table lists the system profiles configured on the device.')
cMTSystemProfileEntry = MibTableRow((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 1, 22, 1), ).setIndexNames((0, "CISCO-MEDIATRACE-MIB", "cMTSystemProfileName"))
if mibBuilder.loadTexts: cMTSystemProfileEntry.setStatus('current')
if mibBuilder.loadTexts: cMTSystemProfileEntry.setDescription("An entry represents a system profile that can be associated with a Mediatrace session contained by the cMTSessionTable. Each entry is uniquely identified by name specified by cMTSystemProfileName object. A row created in this table will be shown in 'show running' command and it will not be saved into non-volatile memory.")
cMTSystemProfileName = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 1, 22, 1, 1), SnmpAdminString())
if mibBuilder.loadTexts: cMTSystemProfileName.setStatus('current')
if mibBuilder.loadTexts: cMTSystemProfileName.setDescription('This object specifies the name of the Mediatrace system profile.')
cMTSystemProfileRowStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 1, 22, 1, 2), RowStatus()).setMaxAccess("readcreate")
if mibBuilder.loadTexts: cMTSystemProfileRowStatus.setStatus('current')
if mibBuilder.loadTexts: cMTSystemProfileRowStatus.setDescription("This object specifies the status of the system profile. Only CreateAndGo and active status is supported. In order for this object to become active cMTSystemProfileName must be defined. All other objects assume the default value. Once the system profile is activated no column can be modified. Setting this object to 'delete' will destroy the system profile. The system prifile can be deleted only if it is not attached to any session.")
cMTSystemProfileMetric = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 1, 22, 1, 3), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3))).clone(namedValues=NamedValues(("interface", 1), ("cpu", 2), ("memory", 3)))).setMaxAccess("readcreate")
if mibBuilder.loadTexts: cMTSystemProfileMetric.setStatus('current')
if mibBuilder.loadTexts: cMTSystemProfileMetric.setDescription("This object specifies the type of metrics group to be collected in addition to basic IP metrics. Specify 'interface' if metrics from 'Metric-List-Interface' are desired. Specify 'cpu' if metrics in 'Metric-List-CPU' is desired. Specify 'memory' if metrics in 'Metric-List-Memory' is desired.")
cMTSessionTable = MibTable((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 1, 23), )
if mibBuilder.loadTexts: cMTSessionTable.setStatus('current')
if mibBuilder.loadTexts: cMTSessionTable.setDescription('This table lists the Mediatrace sessions configured on the device.')
cMTSessionEntry = MibTableRow((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 1, 23, 1), ).setIndexNames((0, "CISCO-MEDIATRACE-MIB", "cMTSessionNumber"))
if mibBuilder.loadTexts: cMTSessionEntry.setReference('An entry in cMTSessionTable')
if mibBuilder.loadTexts: cMTSessionEntry.setStatus('current')
if mibBuilder.loadTexts: cMTSessionEntry.setDescription("A list of objects that define specific configuration for the session of Mediatrace. The entry is uniquely identified by cMTSessionNumber. A row created in this table will be shown in 'show running' command and it will not be saved into non-volatile memory.")
cMTSessionNumber = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 1, 23, 1, 2), Unsigned32().subtype(subtypeSpec=ValueRangeConstraint(1, 2147483647)))
if mibBuilder.loadTexts: cMTSessionNumber.setStatus('current')
if mibBuilder.loadTexts: cMTSessionNumber.setDescription('This object specifies an arbitrary integer-value that uniquely identifies a Mediatrace session.')
cMTSessionRowStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 1, 23, 1, 3), RowStatus()).setMaxAccess("readcreate")
if mibBuilder.loadTexts: cMTSessionRowStatus.setStatus('current')
if mibBuilder.loadTexts: cMTSessionRowStatus.setDescription("This object indicates the status of Mediatrace session. Only CreateAndGo and active status is supported. Following columns must be specified in order to activate the session: - cMTSessionPathSpecifierName - cMTSessionProfileName All other objects can assume default values. None of the properties of session can be modified once it is in 'active' state. Setting the value of 'destroy' for this object will delete the session. The session can be deleted only if the corresponding schedule (row in cMTScheduleTable ) not exist.")
cMTSessionPathSpecifierName = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 1, 23, 1, 4), SnmpAdminString()).setMaxAccess("readcreate")
if mibBuilder.loadTexts: cMTSessionPathSpecifierName.setStatus('current')
if mibBuilder.loadTexts: cMTSessionPathSpecifierName.setDescription('This object specifies the name of the Mediatrace path specifier profile associated with the session.')
cMTSessionParamName = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 1, 23, 1, 5), SnmpAdminString()).setMaxAccess("readcreate")
if mibBuilder.loadTexts: cMTSessionParamName.setStatus('current')
if mibBuilder.loadTexts: cMTSessionParamName.setDescription('This object specifies the name of Mediatrace session parameter associated with the session.')
cMTSessionProfileName = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 1, 23, 1, 6), SnmpAdminString()).setMaxAccess("readcreate")
if mibBuilder.loadTexts: cMTSessionProfileName.setStatus('current')
if mibBuilder.loadTexts: cMTSessionProfileName.setDescription('This object specifies the name of the Mediatrace metric profile associated with the session.')
cMTSessionFlowSpecifierName = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 1, 23, 1, 7), SnmpAdminString()).setMaxAccess("readcreate")
if mibBuilder.loadTexts: cMTSessionFlowSpecifierName.setStatus('current')
if mibBuilder.loadTexts: cMTSessionFlowSpecifierName.setDescription('This object specifies the name of the Mediatrace flow specifier profile associated with the session. Flow specifier is not required if system profile is attached to the session. In this case, media monitor profile is attached to the session. Flow specifier is optional and the 5-tuple from the path-specifier is used instead.')
cMTSessionTraceRouteEnabled = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 1, 23, 1, 8), TruthValue()).setMaxAccess("readcreate")
if mibBuilder.loadTexts: cMTSessionTraceRouteEnabled.setStatus('current')
if mibBuilder.loadTexts: cMTSessionTraceRouteEnabled.setDescription('This object specifies if traceroute is enabled for this session.')
cMTScheduleTable = MibTable((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 1, 24), )
if mibBuilder.loadTexts: cMTScheduleTable.setStatus('current')
if mibBuilder.loadTexts: cMTScheduleTable.setDescription('A table of Mediatrace scheduling specific definitions. Each entry in this table schedules a cMTSessionEntry created via the cMTSessionTable object.')
cMTScheduleEntry = MibTableRow((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 1, 24, 1), ).setIndexNames((0, "CISCO-MEDIATRACE-MIB", "cMTSessionNumber"))
if mibBuilder.loadTexts: cMTScheduleEntry.setReference('An entry in cMTScheduleTable')
if mibBuilder.loadTexts: cMTScheduleEntry.setStatus('current')
if mibBuilder.loadTexts: cMTScheduleEntry.setDescription("A list of objects that define specific configuration for the scheduling of Mediatrace operations. A row is created when a session is scheduled to make it active. Likewise, a row is destroyed when the session is unscheduled. A row created in this table will be shown in 'show running' command and it will not be saved into non-volatile memory.")
cMTScheduleRowStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 1, 24, 1, 1), RowStatus()).setMaxAccess("readcreate")
if mibBuilder.loadTexts: cMTScheduleRowStatus.setStatus('current')
if mibBuilder.loadTexts: cMTScheduleRowStatus.setDescription("This objects specifies the status of Mediatrace session schedule. Only CreateAndGo and destroy operations are permitted on the row. All objects can assume default values. The schedule start time (column cMTScheduleStartTime) must be specified in order to activate the schedule. Once activated none of the properties of the schedule can be changed. The schedule can be destroyed any time by setting the value of this object to 'destroy'. Destroying the schedule will stop the Mediatrace session but the session will not be destroyed.")
cMTScheduleStartTime = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 1, 24, 1, 2), TimeStamp()).setMaxAccess("readcreate")
if mibBuilder.loadTexts: cMTScheduleStartTime.setStatus('current')
if mibBuilder.loadTexts: cMTScheduleStartTime.setDescription('This object specifies the start time of the scheduled session.')
cMTScheduleLife = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 1, 24, 1, 3), Unsigned32().subtype(subtypeSpec=ValueRangeConstraint(0, 2147483647)).clone(3600)).setUnits('seconds').setMaxAccess("readcreate")
if mibBuilder.loadTexts: cMTScheduleLife.setStatus('current')
if mibBuilder.loadTexts: cMTScheduleLife.setDescription('This object specifies the duration of the session in seconds.')
cMTScheduleEntryAgeout = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 1, 24, 1, 4), Unsigned32().subtype(subtypeSpec=ValueRangeConstraint(0, 2073600)).clone(3600)).setUnits('seconds').setMaxAccess("readcreate")
if mibBuilder.loadTexts: cMTScheduleEntryAgeout.setStatus('current')
if mibBuilder.loadTexts: cMTScheduleEntryAgeout.setDescription('This object specifies the amount of time after which mediatrace session entry will be removed once the life of session is over and session is inactive.')
cMTScheduleRecurring = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 1, 24, 1, 5), TruthValue()).setMaxAccess("readcreate")
if mibBuilder.loadTexts: cMTScheduleRecurring.setStatus('current')
if mibBuilder.loadTexts: cMTScheduleRecurring.setDescription('This object specifies whether the schedule is recurring schedule. This object can be used when a periodic session is to be executed everyday at certain time and for certain life.')
cMTPathTable = MibTable((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 2, 1), )
if mibBuilder.loadTexts: cMTPathTable.setStatus('current')
if mibBuilder.loadTexts: cMTPathTable.setDescription('List of paths discovered by a mediatrace session.')
cMTPathEntry = MibTableRow((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 2, 1, 1), ).setIndexNames((0, "CISCO-MEDIATRACE-MIB", "cMTSessionNumber"), (0, "CISCO-MEDIATRACE-MIB", "cMTSessionLifeNumber"), (0, "CISCO-MEDIATRACE-MIB", "cMTBucketNumber"), (0, "CISCO-MEDIATRACE-MIB", "cMTPathHopNumber"))
if mibBuilder.loadTexts: cMTPathEntry.setStatus('current')
if mibBuilder.loadTexts: cMTPathEntry.setDescription('An entry in cMTPathTable represents a Mediatrace path discovered by a session. This table contains information about the hops (Mediatrace or non-Mediatrace) discovered during a specific request. The Path table is used to find the hop address (Address type - IPv4 or IPv6 and Address) and hop type (currently Mediatrace or Traceroute) to use as index for other statistics tables. A row is created when a Mediatrace scheduled session discovers a path to the specified destination during a request. Likewise, a row is destroyed when the path is no longer avilable. A single row corresponds to a Mediatrace path discovered for a session and is uniquely identified by cMTSessionNumber, cMTSessionLifeNumber, cMTBucketNumber and cMTPathHopNumber. The created rows are destroyed when the device undergoes a restart.')
cMTSessionLifeNumber = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 2, 1, 1, 1), Unsigned32().subtype(subtypeSpec=ValueRangeConstraint(0, 2)))
if mibBuilder.loadTexts: cMTSessionLifeNumber.setStatus('current')
if mibBuilder.loadTexts: cMTSessionLifeNumber.setDescription('This object specifies a life for a conceptual statistics row. For a particular value of cMTSessionLifeNumber, the agent assigns the first value of 0 to the current (latest) life, with 1 being the next latest and so on. The sequence keeps incrementing, despite older (lower) values being removed from the table.')
cMTBucketNumber = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 2, 1, 1, 2), Unsigned32().subtype(subtypeSpec=ValueRangeConstraint(0, 10)))
if mibBuilder.loadTexts: cMTBucketNumber.setStatus('current')
if mibBuilder.loadTexts: cMTBucketNumber.setDescription('This object is index of the list of statistics buckets stored. A statistics bucket corresponds to data collected from each hop in one run of the periodic mediatrace session. Bucket with Index value of 0 is the bucket for latest completed run. Index 1 is one run prior to latest completed run, index 2 is two runs prior to latest completed run, and so on.')
cMTPathHopNumber = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 2, 1, 1, 3), Unsigned32().subtype(subtypeSpec=ValueRangeConstraint(0, 255)))
if mibBuilder.loadTexts: cMTPathHopNumber.setStatus('current')
if mibBuilder.loadTexts: cMTPathHopNumber.setDescription('This object specifies the hop number for a Mediatrace Path. This hop can be either Mediatrace or Non-Mediatrace node. The hop number is relative to the initiator with 0 being used to identify initiator itself, 1 for next farther node, etc. This hop number is always unique i.e., two hops cannot have same hop number.')
cMTPathHopAddrType = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 2, 1, 1, 4), InetAddressType()).setMaxAccess("readonly")
if mibBuilder.loadTexts: cMTPathHopAddrType.setStatus('current')
if mibBuilder.loadTexts: cMTPathHopAddrType.setDescription('This object specifies the type of IP address specified by the corresponding instance of cMTPathHopAddrType.')
cMTPathHopAddr = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 2, 1, 1, 5), InetAddress()).setMaxAccess("readonly")
if mibBuilder.loadTexts: cMTPathHopAddr.setStatus('current')
if mibBuilder.loadTexts: cMTPathHopAddr.setDescription('This object indicates IP Address type of the hop on a Mediatrace Path.')
cMTPathHopType = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 2, 1, 1, 6), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("mediatrace", 1), ("traceroute", 2)))).setMaxAccess("readonly")
if mibBuilder.loadTexts: cMTPathHopType.setStatus('current')
if mibBuilder.loadTexts: cMTPathHopType.setDescription("This object indicates the type of the hop on a Mediatrace path. Currently, only two types are present - mediatrace(1) and traceroute(2). A hop is of type 'mediatrace' if it is discovered by only mediatrace or by both mediatrace and trace-route. The hop is 'trace route' if it is discovered by trace route only.")
cMTPathHopAlternate1AddrType = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 2, 1, 1, 7), InetAddressType()).setMaxAccess("readonly")
if mibBuilder.loadTexts: cMTPathHopAlternate1AddrType.setStatus('current')
if mibBuilder.loadTexts: cMTPathHopAlternate1AddrType.setDescription('This object specifies the type of IP address specified by the corresponding instance of cMTPathHopAlternate1AddrType.')
cMTPathHopAlternate1Addr = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 2, 1, 1, 8), InetAddress()).setMaxAccess("readonly")
if mibBuilder.loadTexts: cMTPathHopAlternate1Addr.setStatus('current')
if mibBuilder.loadTexts: cMTPathHopAlternate1Addr.setDescription('This object indicates the IP Address of the first alternate hop on a traceroute path.')
cMTPathHopAlternate2AddrType = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 2, 1, 1, 9), InetAddressType()).setMaxAccess("readonly")
if mibBuilder.loadTexts: cMTPathHopAlternate2AddrType.setStatus('current')
if mibBuilder.loadTexts: cMTPathHopAlternate2AddrType.setDescription('This object specifies the type of IP address specified by the corresponding instance of cMTPathHopAlternate2AddrType.')
cMTPathHopAlternate2Addr = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 2, 1, 1, 10), InetAddress()).setMaxAccess("readonly")
if mibBuilder.loadTexts: cMTPathHopAlternate2Addr.setStatus('current')
if mibBuilder.loadTexts: cMTPathHopAlternate2Addr.setDescription('This object indicates the IP Address of the second alternate hop on a traceroute path.')
cMTPathHopAlternate3AddrType = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 2, 1, 1, 11), InetAddressType()).setMaxAccess("readonly")
if mibBuilder.loadTexts: cMTPathHopAlternate3AddrType.setStatus('current')
if mibBuilder.loadTexts: cMTPathHopAlternate3AddrType.setDescription('This object specifies the type of IP address specified by the corresponding instance of cMTPathHopAlternate3AddrType.')
cMTPathHopAlternate3Addr = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 2, 1, 1, 12), InetAddress()).setMaxAccess("readonly")
if mibBuilder.loadTexts: cMTPathHopAlternate3Addr.setStatus('current')
if mibBuilder.loadTexts: cMTPathHopAlternate3Addr.setDescription('This object indicates the IP Address of the third alternate hop on a traceroute path.')
cMTHopStatsTable = MibTable((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 2, 2), )
if mibBuilder.loadTexts: cMTHopStatsTable.setStatus('current')
if mibBuilder.loadTexts: cMTHopStatsTable.setDescription('An entry in cMTHopStatsTable represents a hop on the path associated to a Mediatrace session. This table contains information about particular hop (Mediatrace or non-Mediatrace) such as the address, type of hop, etc. A single row corresponds to a hop on the Mediatrace path discovered for a session and is uniquely identified by cMTSessionNumber, cMTSessionLifeNumber, cMTBucketNumber,cMTHopStatsAddrType and cMTHopStatsAddr. The created rows are destroyed when the device undergoes a restart.')
cMTHopStatsEntry = MibTableRow((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 2, 2, 1), ).setIndexNames((0, "CISCO-MEDIATRACE-MIB", "cMTSessionNumber"), (0, "CISCO-MEDIATRACE-MIB", "cMTSessionLifeNumber"), (0, "CISCO-MEDIATRACE-MIB", "cMTBucketNumber"), (0, "CISCO-MEDIATRACE-MIB", "cMTHopStatsAddrType"), (0, "CISCO-MEDIATRACE-MIB", "cMTHopStatsAddr"))
if mibBuilder.loadTexts: cMTHopStatsEntry.setStatus('current')
if mibBuilder.loadTexts: cMTHopStatsEntry.setDescription('An entry in cMTHopStatsTable')
cMTHopStatsMaskBitmaps = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 2, 2, 1, 1), Bits().clone(namedValues=NamedValues(("mediatraceTtlUnsupported", 0), ("mediatraceTtlUncollected", 1), ("collectionStatsUnsupported", 2), ("collectionStatsUncollected", 3), ("ingressInterfaceUnsupported", 4), ("ingressInterfaceUncollected", 5), ("egressInterfaceUnsupported", 6), ("egressInterfaceUncollected", 7)))).setMaxAccess("readonly")
if mibBuilder.loadTexts: cMTHopStatsMaskBitmaps.setStatus('current')
if mibBuilder.loadTexts: cMTHopStatsMaskBitmaps.setDescription('This object indicates whether the corresponding instances of these statistics fields in the table are supported. It also indicates if the statistics data are collected. There are 2 bits for each corresponding field.')
cMTHopStatsAddrType = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 2, 2, 1, 2), InetAddressType())
if mibBuilder.loadTexts: cMTHopStatsAddrType.setStatus('current')
if mibBuilder.loadTexts: cMTHopStatsAddrType.setDescription('This object specifies the type of IP address specified by the corresponding instance of cMTHopStatsAddr.')
cMTHopStatsAddr = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 2, 2, 1, 3), InetAddress())
if mibBuilder.loadTexts: cMTHopStatsAddr.setStatus('current')
if mibBuilder.loadTexts: cMTHopStatsAddr.setDescription('This object specifies the IP Address of the hop on a Mediatrace Path. This value is obtained from CMTPathHopAddr in cMTPathTable.')
cMTHopStatsName = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 2, 2, 1, 4), SnmpAdminString()).setMaxAccess("readonly")
if mibBuilder.loadTexts: cMTHopStatsName.setStatus('current')
if mibBuilder.loadTexts: cMTHopStatsName.setDescription('This object indicates the name for this hop. This can be either the hostname or the IP address for the hop.')
cMTHopStatsMediatraceTtl = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 2, 2, 1, 5), Unsigned32().subtype(subtypeSpec=ValueRangeConstraint(0, 255))).setMaxAccess("readonly")
if mibBuilder.loadTexts: cMTHopStatsMediatraceTtl.setReference("J. Postel, 'Internet Protocol', RFC-791, September 1981. J. Deering and R. Hinden, 'Internet Protocol, Version 6 (IPv6) Specification', RFC-2460, December 1998.")
if mibBuilder.loadTexts: cMTHopStatsMediatraceTtl.setStatus('current')
if mibBuilder.loadTexts: cMTHopStatsMediatraceTtl.setDescription("This object indicates the hop limit of the corresponding traffic flow. If version 4 of the IP carries the traffic flow, then the value of this column corresponds to the 'Time to Live' field of the IP header contained by packets in the Mediatrace request. If version 6 of the IP carries the traffic flow, then the value of this column corresponds to the 'Hop Limit' field of the IP header contained by packets in the Mediatrace request.")
cMTHopStatsCollectionStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 2, 2, 1, 6), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("success", 1), ("notSuccess", 2)))).setMaxAccess("readonly")
if mibBuilder.loadTexts: cMTHopStatsCollectionStatus.setStatus('current')
if mibBuilder.loadTexts: cMTHopStatsCollectionStatus.setDescription("This object indicates the operational status of data being collected on the hop for a specific session: 'success' The hop is actively collecting and responding with data. 'notsuccess' The hop is not collecting or responding with data.")
cMTHopStatsIngressInterface = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 2, 2, 1, 7), SnmpAdminString()).setMaxAccess("readonly")
if mibBuilder.loadTexts: cMTHopStatsIngressInterface.setStatus('current')
if mibBuilder.loadTexts: cMTHopStatsIngressInterface.setDescription('This object indicates the interface on the responder that receives the Mediatrace request from the initiator.')
cMTHopStatsEgressInterface = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 2, 2, 1, 8), SnmpAdminString()).setMaxAccess("readonly")
if mibBuilder.loadTexts: cMTHopStatsEgressInterface.setStatus('current')
if mibBuilder.loadTexts: cMTHopStatsEgressInterface.setDescription("This object indicates the interface on the responder which is used to forward the Mediatrace request from the initiator towards destination in the path specifier. Value of 'None' will be shown if the destination address in path specifier terminates on this hop.")
cMTTraceRouteTable = MibTable((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 2, 3), )
if mibBuilder.loadTexts: cMTTraceRouteTable.setStatus('current')
if mibBuilder.loadTexts: cMTTraceRouteTable.setDescription('This table lists the hops discovered by traceroute executed from the initiator. These are the hops which are on media flow path but on which mediatrace is not enabled or is not supported.')
cMTTraceRouteEntry = MibTableRow((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 2, 3, 1), ).setIndexNames((0, "CISCO-MEDIATRACE-MIB", "cMTSessionNumber"), (0, "CISCO-MEDIATRACE-MIB", "cMTSessionLifeNumber"), (0, "CISCO-MEDIATRACE-MIB", "cMTBucketNumber"), (0, "CISCO-MEDIATRACE-MIB", "cMTHopStatsAddrType"), (0, "CISCO-MEDIATRACE-MIB", "cMTHopStatsAddr"))
if mibBuilder.loadTexts: cMTTraceRouteEntry.setStatus('current')
if mibBuilder.loadTexts: cMTTraceRouteEntry.setDescription('An entry in cMTTraceRouteTable represents a Traceroute hop on the path associated to a Mediatrace session. The created rows are destroyed when the device undergoes a restart.')
cMTTraceRouteHopNumber = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 2, 3, 1, 1), Gauge32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: cMTTraceRouteHopNumber.setStatus('current')
if mibBuilder.loadTexts: cMTTraceRouteHopNumber.setDescription('This object indicates the hop number of Traceroute host relative to the Initiator. It start with 1 and increments as we go farther from the Initiator.')
cMTTraceRouteHopRtt = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 2, 3, 1, 2), Counter64()).setMaxAccess("readonly")
if mibBuilder.loadTexts: cMTTraceRouteHopRtt.setStatus('current')
if mibBuilder.loadTexts: cMTTraceRouteHopRtt.setDescription('This object indicates RTT. The time it takes for a packet to get to a hop and back, displayed in milliseconds. (ms).')
cMTSessionStatusTable = MibTable((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 2, 4), )
if mibBuilder.loadTexts: cMTSessionStatusTable.setStatus('current')
if mibBuilder.loadTexts: cMTSessionStatusTable.setDescription('This table contains aggregate data maintained by Mediatrace for session status.')
cMTSessionStatusEntry = MibTableRow((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 2, 4, 1), ).setIndexNames((0, "CISCO-MEDIATRACE-MIB", "cMTSessionNumber"))
if mibBuilder.loadTexts: cMTSessionStatusEntry.setStatus('current')
if mibBuilder.loadTexts: cMTSessionStatusEntry.setDescription('An entry in cMTSessionStatusTable represents information about a Mediatrace session. This table contains information about particular session such as global session identifier, operation state and time to live. A single row corresponds to status of a Mediatrace session and is uniquely identified by cMTSessionNumber. The created rows are destroyed when the device undergoes a restart.')
cMTSessionStatusBitmaps = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 2, 4, 1, 1), Bits().clone(namedValues=NamedValues(("globalSessionIdUusupport", 0), ("globalSessionIdUncollected", 1), ("operationStateUusupport", 2), ("operationStateUncollected", 3), ("operationTimeToLiveUusupport", 4), ("operationTimeToLiveUncollected", 5)))).setMaxAccess("readonly")
if mibBuilder.loadTexts: cMTSessionStatusBitmaps.setStatus('current')
if mibBuilder.loadTexts: cMTSessionStatusBitmaps.setDescription('This object indicates whether the corresponding instances of these statistics fields in the table are supported. It also indicates if the statistics are collected. There are 2 bits for each field.')
cMTSessionStatusGlobalSessionId = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 2, 4, 1, 2), Unsigned32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: cMTSessionStatusGlobalSessionId.setStatus('current')
if mibBuilder.loadTexts: cMTSessionStatusGlobalSessionId.setDescription('This object indicates a globally unique Id to identify a session throughout the network.')
cMTSessionStatusOperationState = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 2, 4, 1, 3), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4))).clone(namedValues=NamedValues(("pending", 1), ("active", 2), ("inactive", 3), ("sleep", 4)))).setMaxAccess("readonly")
if mibBuilder.loadTexts: cMTSessionStatusOperationState.setStatus('current')
if mibBuilder.loadTexts: cMTSessionStatusOperationState.setDescription('This object indicates the operation status of the session. pending - Session is not currently active. active - Session is in active state. inactive - Session is not active but it has not aged out. sleep - Session is in sleep state.')
cMTSessionStatusOperationTimeToLive = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 2, 4, 1, 4), Counter64()).setMaxAccess("readonly")
if mibBuilder.loadTexts: cMTSessionStatusOperationTimeToLive.setStatus('current')
if mibBuilder.loadTexts: cMTSessionStatusOperationTimeToLive.setDescription('This object indicates how long the session operation will last.')
cMTSessionRequestStatsTable = MibTable((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 2, 5), )
if mibBuilder.loadTexts: cMTSessionRequestStatsTable.setStatus('current')
if mibBuilder.loadTexts: cMTSessionRequestStatsTable.setDescription('This table contains aggregate data maintained by Mediatrace for session request status.')
cMTSessionRequestStatsEntry = MibTableRow((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 2, 5, 1), ).setIndexNames((0, "CISCO-MEDIATRACE-MIB", "cMTSessionNumber"), (0, "CISCO-MEDIATRACE-MIB", "cMTSessionLifeNumber"), (0, "CISCO-MEDIATRACE-MIB", "cMTBucketNumber"))
if mibBuilder.loadTexts: cMTSessionRequestStatsEntry.setStatus('current')
if mibBuilder.loadTexts: cMTSessionRequestStatsEntry.setDescription('An entry in cMTSessionRequestStatsTable represents status for each request for a particular session. A single row corresponds to a request sent by a particular Mediatrace session and is uniquely identified by cMTSessionNumber, cMTSessionLifeNumber and cMTBucketNumber. The created rows are destroyed when the device undergoes a restart.')
cMTSessionRequestStatsBitmaps = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 2, 5, 1, 1), Bits().clone(namedValues=NamedValues(("requestTimestampUnsupport", 0), ("requestTimestampUncollected", 1), ("requestStatusUnsupport", 2), ("requestStatusUncollected", 3), ("tracerouteStatusUnsupport", 4), ("tracerouteStatusUncollected", 5), ("routeIndexUnsupport", 6), ("routeIndexUncollected", 7), ("numberOfMediatraceHopsUnsupport", 8), ("numberOfMediatraceHopsUncollected", 9), ("numberOfNonMediatraceHopsUnsupport", 10), ("numberOfNonMediatraceHopsUncollected", 11), ("numberOfValidHopsUnsupport", 12), ("numberOfValidHopsUncollected", 13), ("numberOfErrorHopsUnsupport", 14), ("numberOfErrorHopsUncollected", 15), ("numberOfNoDataRecordHopsUnsupport", 16), ("numberOfNoDataRecordHopsUncollected", 17), ("metaGlobalIdUnsupport", 18), ("metaGlobalIdUncollected", 19), ("metaMultiPartySessionIdUnsupport", 20), ("metaMultiPartySessionIdUncollected", 21), ("metaAppNameUnsupport", 22), ("metaAppNameUncollected", 23)))).setMaxAccess("readonly")
if mibBuilder.loadTexts: cMTSessionRequestStatsBitmaps.setStatus('current')
if mibBuilder.loadTexts: cMTSessionRequestStatsBitmaps.setDescription('This object indicates whether the corresponding instances of these stats fields in the table are supported. It also indicates if the stats data are collected. There are 2 bits for each corresponding field.')
cMTSessionRequestStatsRequestTimestamp = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 2, 5, 1, 2), TimeStamp()).setMaxAccess("readonly")
if mibBuilder.loadTexts: cMTSessionRequestStatsRequestTimestamp.setStatus('current')
if mibBuilder.loadTexts: cMTSessionRequestStatsRequestTimestamp.setDescription('This object indicates the value of request time when the request was sent our by the initiator for this particular session.')
cMTSessionRequestStatsRequestStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 2, 5, 1, 3), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("completed", 1), ("notCompleted", 2)))).setMaxAccess("readonly")
if mibBuilder.loadTexts: cMTSessionRequestStatsRequestStatus.setStatus('current')
if mibBuilder.loadTexts: cMTSessionRequestStatsRequestStatus.setDescription('This object indicates the status of request for the session.')
cMTSessionRequestStatsTracerouteStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 2, 5, 1, 4), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("completed", 1), ("notCompleted", 2)))).setMaxAccess("readonly")
if mibBuilder.loadTexts: cMTSessionRequestStatsTracerouteStatus.setStatus('current')
if mibBuilder.loadTexts: cMTSessionRequestStatsTracerouteStatus.setDescription('This object indicates the status of traceroute for the session.')
cMTSessionRequestStatsRouteIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 2, 5, 1, 5), Gauge32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: cMTSessionRequestStatsRouteIndex.setStatus('current')
if mibBuilder.loadTexts: cMTSessionRequestStatsRouteIndex.setDescription('This object indicates the route index for the session request. It signifies the number of times a route has changed for a particular session. 0 signifies no route change.')
cMTSessionRequestStatsNumberOfMediatraceHops = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 2, 5, 1, 6), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: cMTSessionRequestStatsNumberOfMediatraceHops.setStatus('current')
if mibBuilder.loadTexts: cMTSessionRequestStatsNumberOfMediatraceHops.setDescription('This object indicates the number of Mediatrace hops in the path.')
cMTSessionRequestStatsNumberOfNonMediatraceHops = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 2, 5, 1, 7), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: cMTSessionRequestStatsNumberOfNonMediatraceHops.setStatus('current')
if mibBuilder.loadTexts: cMTSessionRequestStatsNumberOfNonMediatraceHops.setDescription('This object indicates the number of non-Mediatrace hops in the path.')
cMTSessionRequestStatsNumberOfValidHops = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 2, 5, 1, 8), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: cMTSessionRequestStatsNumberOfValidHops.setStatus('current')
if mibBuilder.loadTexts: cMTSessionRequestStatsNumberOfValidHops.setDescription('This object indicates the number of hops with valid data report.')
cMTSessionRequestStatsNumberOfErrorHops = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 2, 5, 1, 9), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: cMTSessionRequestStatsNumberOfErrorHops.setStatus('current')
if mibBuilder.loadTexts: cMTSessionRequestStatsNumberOfErrorHops.setDescription('This object indicates the number of hops with error report. These hops are not able to return the statistics due to some issue.')
cMTSessionRequestStatsNumberOfNoDataRecordHops = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 2, 5, 1, 10), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: cMTSessionRequestStatsNumberOfNoDataRecordHops.setStatus('current')
if mibBuilder.loadTexts: cMTSessionRequestStatsNumberOfNoDataRecordHops.setDescription('This object indicates the number of hops with no data record.')
cMTSessionRequestStatsMDGlobalId = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 2, 5, 1, 11), OctetString()).setMaxAccess("readonly")
if mibBuilder.loadTexts: cMTSessionRequestStatsMDGlobalId.setStatus('current')
if mibBuilder.loadTexts: cMTSessionRequestStatsMDGlobalId.setDescription('This object indicates the meta-data global Id for this session.')
cMTSessionRequestStatsMDMultiPartySessionId = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 2, 5, 1, 12), OctetString()).setMaxAccess("readonly")
if mibBuilder.loadTexts: cMTSessionRequestStatsMDMultiPartySessionId.setStatus('current')
if mibBuilder.loadTexts: cMTSessionRequestStatsMDMultiPartySessionId.setDescription('This object indicates the meta-data Multi Party Session Id for this session.')
cMTSessionRequestStatsMDAppName = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 2, 5, 1, 13), OctetString()).setMaxAccess("readonly")
if mibBuilder.loadTexts: cMTSessionRequestStatsMDAppName.setStatus('current')
if mibBuilder.loadTexts: cMTSessionRequestStatsMDAppName.setDescription('This object indicates the meta-data AppName for this session.')
cMTCommonMetricStatsTable = MibTable((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 2, 6), )
if mibBuilder.loadTexts: cMTCommonMetricStatsTable.setStatus('current')
if mibBuilder.loadTexts: cMTCommonMetricStatsTable.setDescription('This table contains the list of entries representing common IP metrics values for a particular mediatrace session on particular hop.')
cMTCommonMetricStatsEntry = MibTableRow((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 2, 6, 1), ).setIndexNames((0, "CISCO-MEDIATRACE-MIB", "cMTSessionNumber"), (0, "CISCO-MEDIATRACE-MIB", "cMTSessionLifeNumber"), (0, "CISCO-MEDIATRACE-MIB", "cMTBucketNumber"), (0, "CISCO-MEDIATRACE-MIB", "cMTHopStatsAddrType"), (0, "CISCO-MEDIATRACE-MIB", "cMTHopStatsAddr"))
if mibBuilder.loadTexts: cMTCommonMetricStatsEntry.setStatus('current')
if mibBuilder.loadTexts: cMTCommonMetricStatsEntry.setDescription('An entry in cMTCommonMetricStatsTable represents common media monitor profile information of a hop on the path associated to a Mediatrace session such as flow sampling time stamp, packets dropped, IP TTL, etc. The devices creates a row in the cMTCommonMetricStatsTable when a Mediatrace session starts collecting a traffic metrics data and has been configured to compute common IP metrics. Likewise, the device destroys a row in the cMTCommonMetricStatsTable when the corresponding Mediatrace session has ceased collecting the traffic metrics data (e.g., when a scheduled session has timed out). A single row corresponds to a common media monitor profile information of a hop on the path discovered for a session and is uniquely identified by cMTSessionNumber, cMTSessionLifeNumber, cMTBucketNumber,cMTHopStatsAddrType and cMTHopStatsAddr. The created rows are destroyed when the device undergoes a restart.')
cMTCommonMetricsBitmaps = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 2, 6, 1, 2), Bits().clone(namedValues=NamedValues(("flowSamplingStartTimeUnsupported", 0), ("flowSamplingStartTimeUncollected", 1), ("ipPktDroppedUnsupported", 2), ("ipPktDroppedUncollected", 3), ("ipPktCountUnsupported", 4), ("ipPktCountUncollected", 5), ("ipOctetsUnsupported", 6), ("ipOctetsUncollected", 7), ("ipByteRateUnsupported", 8), ("ipByteRateUncollected", 9), ("ipDscpUnsupported", 10), ("ipDscpUncollected", 11), ("ipTtlUnsupported", 12), ("ipTtlUncollected", 13), ("flowCounterUnsupported", 14), ("flowCounterUncollected", 15), ("flowDirectionUnsupported", 16), ("flowDirectionUncollected", 17), ("lossMeasurementUnsupported", 18), ("lossMeasurementUncollected", 19), ("mediaStopOccurredUnsupported", 20), ("mediaStopOccurredUncollected", 21), ("routeForwardUnsupported", 22), ("routeForwardUncollected", 23), ("ipProtocolUnsupported", 24), ("ipProtocolUncollected", 25)))).setMaxAccess("readonly")
if mibBuilder.loadTexts: cMTCommonMetricsBitmaps.setStatus('current')
if mibBuilder.loadTexts: cMTCommonMetricsBitmaps.setDescription('This object indicates whether the corresponding instances of these stats fields in the table are supported. It also indicates if the stats data are collected. There are 2 bits for each field.')
cMTCommonMetricsFlowSamplingStartTime = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 2, 6, 1, 3), CiscoNTPTimeStamp()).setMaxAccess("readonly")
if mibBuilder.loadTexts: cMTCommonMetricsFlowSamplingStartTime.setStatus('current')
if mibBuilder.loadTexts: cMTCommonMetricsFlowSamplingStartTime.setDescription('This object defines the the timestamp when the statistics were collected on the responder.')
cMTCommonMetricsIpPktDropped = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 2, 6, 1, 4), Counter64()).setUnits('packets').setMaxAccess("readonly")
if mibBuilder.loadTexts: cMTCommonMetricsIpPktDropped.setStatus('current')
if mibBuilder.loadTexts: cMTCommonMetricsIpPktDropped.setDescription("This object indicates number of packet drops observed on the flow being monitored on this hop from flow sampling start time in window of 'sample interval' length.")
cMTCommonMetricsIpOctets = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 2, 6, 1, 5), Counter64()).setUnits('octets').setMaxAccess("readonly")
if mibBuilder.loadTexts: cMTCommonMetricsIpOctets.setStatus('current')
if mibBuilder.loadTexts: cMTCommonMetricsIpOctets.setDescription('This object indicates the total number of octets contained by the packets processed by the Mediatrace request for the corresponding traffic flow.')
cMTCommonMetricsIpPktCount = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 2, 6, 1, 6), Counter64()).setUnits('packets').setMaxAccess("readonly")
if mibBuilder.loadTexts: cMTCommonMetricsIpPktCount.setStatus('current')
if mibBuilder.loadTexts: cMTCommonMetricsIpPktCount.setDescription('This object indicates the total number of packets processed by the Mediatrace request for the corresponding traffic flow.')
cMTCommonMetricsIpByteRate = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 2, 6, 1, 7), Gauge32()).setUnits('packets per second').setMaxAccess("readonly")
if mibBuilder.loadTexts: cMTCommonMetricsIpByteRate.setStatus('current')
if mibBuilder.loadTexts: cMTCommonMetricsIpByteRate.setDescription('This object indicates the average packet rate at which the Mediatrace request is processing data for the corresponding traffic flow. This value is cumulative over the lifetime of the traffic flow.')
cMTCommonMetricsIpDscp = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 2, 6, 1, 8), Unsigned32().subtype(subtypeSpec=ValueRangeConstraint(0, 64))).setMaxAccess("readonly")
if mibBuilder.loadTexts: cMTCommonMetricsIpDscp.setStatus('current')
if mibBuilder.loadTexts: cMTCommonMetricsIpDscp.setDescription("This object indicates the DSCP value of the corresponding traffic flow. If version 4 of the IP carries the traffic flow, then the value of this column corresponds to the DSCP part of 'Type of Service' field of the IP header contained by packets in the traffic flow. If version 6 of the IP carries the traffic flow, then the value of this column corresponds to DSCP part of the 'Traffic Class' field of the IP header contained by packets in the traffic flow.")
cMTCommonMetricsIpTtl = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 2, 6, 1, 9), Unsigned32().subtype(subtypeSpec=ValueRangeConstraint(0, 255))).setMaxAccess("readonly")
if mibBuilder.loadTexts: cMTCommonMetricsIpTtl.setReference("J. Postel, 'Internet Protocol', RFC-791, September 1981. J. Deering and R. Hinden, 'Internet Protocol, Version 6 (IPv6) Specification', RFC-2460, December 1998.")
if mibBuilder.loadTexts: cMTCommonMetricsIpTtl.setStatus('current')
if mibBuilder.loadTexts: cMTCommonMetricsIpTtl.setDescription("This object indicates the hop limit of the corresponding traffic flow. If version 4 of the IP carries the traffic flow, then the value of this column corresponds to the 'Time to Live' field of the IP header contained by packets in the Mediatrace request. If version 6 of the IP carries the traffic flow, then the value of this column corresponds to the 'Hop Limit' field of the IP header contained by packets in the Mediatrace request.")
cMTCommonMetricsFlowCounter = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 2, 6, 1, 10), Gauge32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: cMTCommonMetricsFlowCounter.setStatus('current')
if mibBuilder.loadTexts: cMTCommonMetricsFlowCounter.setDescription('This object indicates the number of traffic flows currently monitored by the Mediatrace request.')
cMTCommonMetricsFlowDirection = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 2, 6, 1, 11), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3))).clone(namedValues=NamedValues(("unknown", 1), ("ingress", 2), ("egress", 3)))).setMaxAccess("readonly")
if mibBuilder.loadTexts: cMTCommonMetricsFlowDirection.setStatus('current')
if mibBuilder.loadTexts: cMTCommonMetricsFlowDirection.setDescription("This object indicates the direction of the traffic flow where the data is monitored : 'unknown' The SNMP entity does not know the direction of the traffic flow at the point data is collected. 'ingress' Data is collected at the point where the traffic flow enters the devices 'egress' Data is colected at the point where the traffic flow leaves the device.")
cMTCommonMetricsLossMeasurement = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 2, 6, 1, 12), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("true", 1), ("false", 2)))).setMaxAccess("readonly")
if mibBuilder.loadTexts: cMTCommonMetricsLossMeasurement.setStatus('current')
if mibBuilder.loadTexts: cMTCommonMetricsLossMeasurement.setDescription('This object indicates the loss measurement.')
cMTCommonMetricsMediaStopOccurred = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 2, 6, 1, 13), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("true", 1), ("false", 2)))).setMaxAccess("readonly")
if mibBuilder.loadTexts: cMTCommonMetricsMediaStopOccurred.setStatus('current')
if mibBuilder.loadTexts: cMTCommonMetricsMediaStopOccurred.setDescription('This object indicates the media stop occurred.')
cMTCommonMetricsRouteForward = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 2, 6, 1, 14), SnmpAdminString()).setMaxAccess("readonly")
if mibBuilder.loadTexts: cMTCommonMetricsRouteForward.setStatus('current')
if mibBuilder.loadTexts: cMTCommonMetricsRouteForward.setDescription('This object indicates routing or forwarding status i.e. whether the packet is forwarded or dropped for the flow.')
cMTCommonMetricsIpProtocol = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 2, 6, 1, 15), CiscoMediatraceSupportProtocol()).setMaxAccess("readonly")
if mibBuilder.loadTexts: cMTCommonMetricsIpProtocol.setStatus('current')
if mibBuilder.loadTexts: cMTCommonMetricsIpProtocol.setDescription('This table contains entry to specify the media Metric-list for the particular Mmediatrace session on the hop.')
cMTRtpMetricStatsTable = MibTable((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 2, 7), )
if mibBuilder.loadTexts: cMTRtpMetricStatsTable.setStatus('current')
if mibBuilder.loadTexts: cMTRtpMetricStatsTable.setDescription('This table contains aggregate data maintained by Mediatrace for traffic flows for which it is computing RTP metrics.')
cMTRtpMetricStatsEntry = MibTableRow((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 2, 7, 1), )
cMTCommonMetricStatsEntry.registerAugmentions(("CISCO-MEDIATRACE-MIB", "cMTRtpMetricStatsEntry"))
cMTRtpMetricStatsEntry.setIndexNames(*cMTCommonMetricStatsEntry.getIndexNames())
if mibBuilder.loadTexts: cMTRtpMetricStatsEntry.setStatus('current')
if mibBuilder.loadTexts: cMTRtpMetricStatsEntry.setDescription('An entry in cMTRtpMetricStatsTable represents RTP related information of a hop on the path associated to a Mediatrace session such as bit rate, octets, etc. The devices creates a row in the cMTRtpMetricStatsTable when a Mediatrace session starts collecting a traffic metrics data and has been configured to compute RTP metrics for the same traffic metrics data. Likewise, the device destroys a row in the cMTRtpMetricStatsTable when the corresponding Mediatrace session has ceased collecting the traffic metrics data (e.g., when a scheduled session has timed out). A single row corresponds to a RTP information of a hop on the path discovered for a Mediatrace session and is uniquely identified by cMTSessionNumber, cMTSessionLifeNumber, cMTBucketNumber,cMTHopStatsAddrType and cMTHopStatsAddr. The created rows are destroyed when the device undergoes a restart.')
cMTRtpMetricsBitmaps = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 2, 7, 1, 2), Bits().clone(namedValues=NamedValues(("bitRateunSupport", 0), ("bitRateunCollected", 1), ("octetsunSupport", 2), ("octetsunCollected", 3), ("pktsunSupport", 4), ("pktsunCollected", 5), ("jitterunSupport", 6), ("jitterunCollected", 7), ("lostPktsunSupport", 8), ("lostPktsunCollected", 9), ("expectedPktsunSupport", 10), ("expectedPktsunCollected", 11), ("lostPktEventsunSupport", 12), ("lostPktEventsunCollected", 13), ("losspercentUnsupport", 14), ("losspercentUncollected", 15)))).setMaxAccess("readonly")
if mibBuilder.loadTexts: cMTRtpMetricsBitmaps.setStatus('current')
if mibBuilder.loadTexts: cMTRtpMetricsBitmaps.setDescription('This object indicates whether the corresponding instances of these statistics fields in the table are supported. It also indicates if the stats data are collected. There are 2 bits for each field.')
cMTRtpMetricsBitRate = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 2, 7, 1, 3), Gauge32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: cMTRtpMetricsBitRate.setStatus('current')
if mibBuilder.loadTexts: cMTRtpMetricsBitRate.setDescription('This object indicates the average bit rate at which the corresponding Mediatrace request is processing data for the corresponding traffic flow. This value is cumulative over the lifetime of the traffic flow.')
cMTRtpMetricsOctets = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 2, 7, 1, 4), Counter64()).setMaxAccess("readonly")
if mibBuilder.loadTexts: cMTRtpMetricsOctets.setStatus('current')
if mibBuilder.loadTexts: cMTRtpMetricsOctets.setDescription('This object indicates the total number of octets contained by the packets processed by the Mediatrace request for the corresponding traffic flow.')
cMTRtpMetricsPkts = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 2, 7, 1, 5), Counter64()).setUnits('packets').setMaxAccess("readonly")
if mibBuilder.loadTexts: cMTRtpMetricsPkts.setStatus('current')
if mibBuilder.loadTexts: cMTRtpMetricsPkts.setDescription('This object indicates the total number of packets processed by the corresponding Mediatrace request for the corresponding traffic flow.')
cMTRtpMetricsJitter = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 2, 7, 1, 6), FlowMetricValue()).setUnits('seconds').setMaxAccess("readonly")
if mibBuilder.loadTexts: cMTRtpMetricsJitter.setStatus('current')
if mibBuilder.loadTexts: cMTRtpMetricsJitter.setDescription('This object indicates the inter-arrival jitter for the traffic flow.')
cMTRtpMetricsLostPkts = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 2, 7, 1, 7), Counter64()).setUnits('packets').setMaxAccess("readonly")
if mibBuilder.loadTexts: cMTRtpMetricsLostPkts.setStatus('current')
if mibBuilder.loadTexts: cMTRtpMetricsLostPkts.setDescription('This object indicates the number of RTP packets lost for the traffic flow.')
cMTRtpMetricsExpectedPkts = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 2, 7, 1, 8), Counter64()).setUnits('packets').setMaxAccess("readonly")
if mibBuilder.loadTexts: cMTRtpMetricsExpectedPkts.setStatus('current')
if mibBuilder.loadTexts: cMTRtpMetricsExpectedPkts.setDescription('This object indicates the number of RTP packets expected for the traffic flow.')
cMTRtpMetricsLostPktEvents = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 2, 7, 1, 9), Counter64()).setUnits('packets').setMaxAccess("readonly")
if mibBuilder.loadTexts: cMTRtpMetricsLostPktEvents.setStatus('current')
if mibBuilder.loadTexts: cMTRtpMetricsLostPktEvents.setDescription('This object indicates the number of packet loss events observed by the Mediatrace request for the corresponding traffic flow.')
cMTRtpMetricsLossPercent = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 2, 7, 1, 10), Gauge32().subtype(subtypeSpec=ValueRangeConstraint(0, 100))).setMaxAccess("readonly")
if mibBuilder.loadTexts: cMTRtpMetricsLossPercent.setStatus('current')
if mibBuilder.loadTexts: cMTRtpMetricsLossPercent.setDescription('This object indicates the percentage of packages are lost per ten thousand packets in a traffic flow.')
cMTTcpMetricStatsTable = MibTable((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 2, 8), )
if mibBuilder.loadTexts: cMTTcpMetricStatsTable.setStatus('current')
if mibBuilder.loadTexts: cMTTcpMetricStatsTable.setDescription('This table contains aggregate data maintained by Mediatrace for traffic flows for which it is computing TCP metrics.')
cMTTcpMetricStatsEntry = MibTableRow((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 2, 8, 1), )
cMTCommonMetricStatsEntry.registerAugmentions(("CISCO-MEDIATRACE-MIB", "cMTTcpMetricStatsEntry"))
cMTTcpMetricStatsEntry.setIndexNames(*cMTCommonMetricStatsEntry.getIndexNames())
if mibBuilder.loadTexts: cMTTcpMetricStatsEntry.setStatus('current')
if mibBuilder.loadTexts: cMTTcpMetricStatsEntry.setDescription('An entry in cMTTcpMetricStatsTable represents TCP information of a hop on the path associated to a Mediatrace session such as byte count, round trip delay, etc. The devices creates a row in the cMTTcpMetricStatsTable when a Mediatrace session starts collecting a traffic metrics data and has been configured to compute TCP metrics for the same traffic metrics data. Likewise, the device destroys a row in the cMTTcpMetricStatsTable when the corresponding Mediatrace session has ceased collecting the traffic metrics data (e.g., when a scheduled session has timed out). A single row corresponds to TCP information of a hop on the path discovered for a Mediatrace session and is uniquely identified by cMTSessionNumber, cMTSessionLifeNumber, cMTBucketNumber,cMTHopStatsAddrType and cMTHopStatsAddr. The created rows are destroyed when the device undergoes a restart.')
cMTTcpMetricBitmaps = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 2, 8, 1, 2), Bits().clone(namedValues=NamedValues(("mediaByteCountUnsupport", 0), ("mediaByteCountUncollected", 1), ("connectRoundTripDelayUnsupport", 2), ("connectRoundTripDelayUncollected", 3), ("lostEventCountUnsupport", 4), ("lostEventCountUncollected", 5)))).setMaxAccess("readonly")
if mibBuilder.loadTexts: cMTTcpMetricBitmaps.setStatus('current')
if mibBuilder.loadTexts: cMTTcpMetricBitmaps.setDescription('This object indicates whether the corresponding instances of these stats fields in the table are supported. It also indicates if the stats data are collected. There are 2 bits for each field.')
cMTTcpMetricMediaByteCount = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 2, 8, 1, 3), FlowMetricValue()).setMaxAccess("readonly")
if mibBuilder.loadTexts: cMTTcpMetricMediaByteCount.setStatus('current')
if mibBuilder.loadTexts: cMTTcpMetricMediaByteCount.setDescription('This object indicates the number of bytes for the packets observed by the Mediatrace session for the corresponding flow.')
cMTTcpMetricConnectRoundTripDelay = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 2, 8, 1, 4), Counter64()).setMaxAccess("readonly")
if mibBuilder.loadTexts: cMTTcpMetricConnectRoundTripDelay.setStatus('current')
if mibBuilder.loadTexts: cMTTcpMetricConnectRoundTripDelay.setDescription('This object indicates the round trip time for the packets observed by the Mediatrace session for the corresponding flow. The round trip time is defined as the length of time it takes for a TCP segment transmission and receipt of acknowledgement. This object indicates the connect round trip delay.')
cMTTcpMetricLostEventCount = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 2, 8, 1, 5), Counter64()).setMaxAccess("readonly")
if mibBuilder.loadTexts: cMTTcpMetricLostEventCount.setStatus('current')
if mibBuilder.loadTexts: cMTTcpMetricLostEventCount.setDescription('This object indicates the number of packets lost for the traffic flow.')
cMTSystemMetricStatsTable = MibTable((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 2, 9), )
if mibBuilder.loadTexts: cMTSystemMetricStatsTable.setStatus('current')
if mibBuilder.loadTexts: cMTSystemMetricStatsTable.setDescription('A list of objects which accumulate the system metrics results of a particular node for that path.')
cMTSystemMetricStatsEntry = MibTableRow((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 2, 9, 1), ).setIndexNames((0, "CISCO-MEDIATRACE-MIB", "cMTSessionNumber"), (0, "CISCO-MEDIATRACE-MIB", "cMTSessionLifeNumber"), (0, "CISCO-MEDIATRACE-MIB", "cMTBucketNumber"), (0, "CISCO-MEDIATRACE-MIB", "cMTHopStatsAddrType"), (0, "CISCO-MEDIATRACE-MIB", "cMTHopStatsAddr"))
if mibBuilder.loadTexts: cMTSystemMetricStatsEntry.setStatus('current')
if mibBuilder.loadTexts: cMTSystemMetricStatsEntry.setDescription('An entry in cMTSystemMetricStatsTable represents CPU or memory utilization information of a hop on the path associated to a Mediatrace session such as five minutes CPU utilization, memory utilization, etc. The devices creates a row in the cMTSystemMetricStatsTable when a Mediatrace session starts collecting a system metrics data and has been configured to compute system metrics. Likewise, the device destroys a row in the cMTSystemMetricStatsTable when the corresponding Mediatrace session has ceased collecting the system metrics data (e.g., when a scheduled session has timed out). A single row corresponds to a CPU or memory utilization information of a hop on the path discovered for a Mediatrace session and is uniquely identified by cMTSessionNumber, cMTSessionLifeNumber, cMTBucketNumber,cMTHopStatsAddrType and cMTHopStatsAddr. The created rows are destroyed when the device undergoes a restart.')
cMTSystemMetricBitmaps = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 2, 9, 1, 1), Bits().clone(namedValues=NamedValues(("cpuOneMinuteUtilizationUnsupport", 0), ("cpuOneMinuteUtilizationUncollected", 1), ("cpuFiveMinutesUtilizationUnsupport", 2), ("cpuFiveMinutesUtilizationUncollected", 3), ("memoryMetricsUnsupport", 4), ("memoryMetricsUncollected", 5)))).setMaxAccess("readonly")
if mibBuilder.loadTexts: cMTSystemMetricBitmaps.setStatus('current')
if mibBuilder.loadTexts: cMTSystemMetricBitmaps.setDescription('This object indicates whether the corresponding instances of these stats fields in the table are supported. It also indicates if the stats data are collected. There are 2 bits for each field.')
cMTSystemMetricCpuOneMinuteUtilization = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 2, 9, 1, 2), Gauge32().subtype(subtypeSpec=ValueRangeConstraint(0, 100))).setMaxAccess("readonly")
if mibBuilder.loadTexts: cMTSystemMetricCpuOneMinuteUtilization.setStatus('current')
if mibBuilder.loadTexts: cMTSystemMetricCpuOneMinuteUtilization.setDescription('This object indicates the overall CPU busy percentage in the last 1 minute period for the network element')
cMTSystemMetricCpuFiveMinutesUtilization = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 2, 9, 1, 3), Gauge32().subtype(subtypeSpec=ValueRangeConstraint(0, 100))).setMaxAccess("readonly")
if mibBuilder.loadTexts: cMTSystemMetricCpuFiveMinutesUtilization.setStatus('current')
if mibBuilder.loadTexts: cMTSystemMetricCpuFiveMinutesUtilization.setDescription('This object indicates the overall CPU busy percentage in the last 5 minute period for the network element')
cMTSystemMetricMemoryUtilization = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 2, 9, 1, 4), Gauge32().subtype(subtypeSpec=ValueRangeConstraint(0, 100))).setMaxAccess("readonly")
if mibBuilder.loadTexts: cMTSystemMetricMemoryUtilization.setStatus('current')
if mibBuilder.loadTexts: cMTSystemMetricMemoryUtilization.setDescription('This object indicates the overall memory usage percentage for the node.')
cMTInterfaceMetricStatsTable = MibTable((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 2, 10), )
if mibBuilder.loadTexts: cMTInterfaceMetricStatsTable.setStatus('current')
if mibBuilder.loadTexts: cMTInterfaceMetricStatsTable.setDescription('This table contains aggregate data of interface information for the network nodes.')
cMTInterfaceMetricStatsEntry = MibTableRow((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 2, 10, 1), ).setIndexNames((0, "CISCO-MEDIATRACE-MIB", "cMTSessionNumber"), (0, "CISCO-MEDIATRACE-MIB", "cMTSessionLifeNumber"), (0, "CISCO-MEDIATRACE-MIB", "cMTBucketNumber"), (0, "CISCO-MEDIATRACE-MIB", "cMTHopStatsAddrType"), (0, "CISCO-MEDIATRACE-MIB", "cMTHopStatsAddr"))
if mibBuilder.loadTexts: cMTInterfaceMetricStatsEntry.setStatus('current')
if mibBuilder.loadTexts: cMTInterfaceMetricStatsEntry.setDescription('An entry in cMTInterfaceMetricStatsTable represents interface information of a hop on the path associated to a Mediatrace session such as ingress interface speed, egress interface speed, etc. The devices creates a row in the cMTInterfaceMetricStatsTable when a Mediatrace session starts collecting an interface metrics data and has been configured to compute interface metrics. Likewise, the device destroys a row in the cMTInterfaceMetricStatsTable when the corresponding Mediatrace session has ceased collecting the interface metrics data (e.g., when a scheduled session has timed out). A single row corresponds to a interface information of a hop on the path discovered for a session and is uniquely identified by cMTSessionNumber, cMTSessionLifeNumber, cMTBucketNumber, cMTHopStatsAddrType and cMTHopStatsAddr. The created rows are destroyed when the device undergoes a restart.')
cMTInterfaceBitmaps = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 2, 10, 1, 2), Bits().clone(namedValues=NamedValues(("inSpeedUnsupport", 0), ("inSpeedUncollected", 1), ("outSpeedUnsupport", 2), ("outSpeedUncollected", 3), ("outDiscardsUnsupport", 4), ("outDiscardsUncollected", 5), ("inDiscardsUnsupport", 6), ("inDiscardsUncollected", 7), ("outErrorsUnsupport", 8), ("outErrorsUncollected", 9), ("inErrorsUnsupport", 10), ("inErrorsUncollected", 11), ("outOctetsUnsupport", 12), ("outOctetsUncollected", 13), ("inOctetsUnsupport", 14), ("inOctetsUncollected", 15)))).setMaxAccess("readonly")
if mibBuilder.loadTexts: cMTInterfaceBitmaps.setStatus('current')
if mibBuilder.loadTexts: cMTInterfaceBitmaps.setDescription('This object indicates whether the corresponding instances of these stats fields in the table are supported. It also indicates if the stats data are collected. There are 2 bits for each field.')
cMTInterfaceOutSpeed = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 2, 10, 1, 3), Gauge32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: cMTInterfaceOutSpeed.setStatus('current')
if mibBuilder.loadTexts: cMTInterfaceOutSpeed.setDescription("This object indicates the egress interface's current bandwidth in bits per second. For interfaces which do not vary in bandwidth or for those where no accurate estimation can be made, this object should contain the nominal bandwidth. Currently bandwidth above the maximum value 4,294,967,295 is not supported and it will show the maximum for this condition.")
cMTInterfaceInSpeed = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 2, 10, 1, 4), Gauge32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: cMTInterfaceInSpeed.setStatus('current')
if mibBuilder.loadTexts: cMTInterfaceInSpeed.setDescription("This object indicates an estimate of the ingress interface's current bandwidth in bits per second. Currently bandwidth above the maximum value 4,294,967,295 is not supported and it will show the maximum for this condition.")
cMTInterfaceOutDiscards = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 2, 10, 1, 5), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: cMTInterfaceOutDiscards.setStatus('current')
if mibBuilder.loadTexts: cMTInterfaceOutDiscards.setDescription('This object indicates the number of outbound packets which were chosen to be discarded even though no errors had been detected to prevent their being transmitted. One possible reason for discarding such a packet could be to free up buffer space.')
cMTInterfaceInDiscards = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 2, 10, 1, 6), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: cMTInterfaceInDiscards.setStatus('current')
if mibBuilder.loadTexts: cMTInterfaceInDiscards.setDescription('This object indicates the number of inbound packets which were chosen to be discarded even though no errors had been detected to prevent their being deliverable to a higher-layer protocol. One possible reason for discarding such a packet could be to free up buffer space. Discontinuities in the value of this counter can occur at re-initialization of the management system, and at other times as indicated by the value of ifCounterDiscontinuityTime.')
cMTInterfaceOutErrors = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 2, 10, 1, 7), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: cMTInterfaceOutErrors.setStatus('current')
if mibBuilder.loadTexts: cMTInterfaceOutErrors.setDescription('This object indicates the error packet number. For packet-oriented interfaces, the number of outbound packets that could not be transmitted because of errors. For character-oriented or fixed-length interfaces, the number of outbound transmission units that could not be transmitted because of errors. Discontinuities in the value of this counter can occur at re-initialization of the management system, and at other times as indicated by the value of ifCounterDiscontinuityTime.')
cMTInterfaceInErrors = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 2, 10, 1, 8), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: cMTInterfaceInErrors.setStatus('current')
if mibBuilder.loadTexts: cMTInterfaceInErrors.setDescription('This object indicates the error packet number. For packet-oriented interfaces, the number of inbound packets that contained errors preventing them from being deliverable to a higher-layer protocol. For character-oriented or fixed-length interfaces, the number of inbound transmission units that contained errors preventing them from being deliverable to a higher-layer protocol. Discontinuities in the value of this counter can occur at re-initialization of the management system, and at other times as indicated by the value of ifCounterDiscontinuityTime.')
cMTInterfaceOutOctets = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 2, 10, 1, 9), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: cMTInterfaceOutOctets.setStatus('current')
if mibBuilder.loadTexts: cMTInterfaceOutOctets.setDescription('This object indicates the total number of octets transmitted out of the interface, including framing characters. Discontinuities in the value of this counter can occur at re-initialization of the management system, and at other times as indicated by the value of ifCounterDiscontinuityTime.')
cMTInterfaceInOctets = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 2, 10, 1, 10), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: cMTInterfaceInOctets.setStatus('current')
if mibBuilder.loadTexts: cMTInterfaceInOctets.setDescription('This object indicates the total number of octets received on the interface, including framing characters. Discontinuities in the value of this counter can occur at re-initialization of the management system, and at other times as indicated by the value of ifCounterDiscontinuityTime.')
ciscoMediatraceMIBCompliances = MibIdentifier((1, 3, 6, 1, 4, 1, 9, 9, 800, 2, 1))
ciscoMediatraceMIBGroups = MibIdentifier((1, 3, 6, 1, 4, 1, 9, 9, 800, 2, 2))
ciscoMediatraceMIBCompliance = ModuleCompliance((1, 3, 6, 1, 4, 1, 9, 9, 800, 2, 1, 1)).setObjects(("CISCO-MEDIATRACE-MIB", "ciscoMediatraceMIBMainObjectGroup"))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
ciscoMediatraceMIBCompliance = ciscoMediatraceMIBCompliance.setStatus('current')
if mibBuilder.loadTexts: ciscoMediatraceMIBCompliance.setDescription('This is a default module-compliance containing default object groups.')
ciscoMediatraceMIBMainObjectGroup = ObjectGroup((1, 3, 6, 1, 4, 1, 9, 9, 800, 2, 2, 1)).setObjects(("CISCO-MEDIATRACE-MIB", "cMTFlowSpecifierRowStatus"), ("CISCO-MEDIATRACE-MIB", "cMTFlowSpecifierDestAddrType"), ("CISCO-MEDIATRACE-MIB", "cMTFlowSpecifierDestAddr"), ("CISCO-MEDIATRACE-MIB", "cMTFlowSpecifierDestPort"), ("CISCO-MEDIATRACE-MIB", "cMTFlowSpecifierSourceAddrType"), ("CISCO-MEDIATRACE-MIB", "cMTFlowSpecifierSourceAddr"), ("CISCO-MEDIATRACE-MIB", "cMTFlowSpecifierSourcePort"), ("CISCO-MEDIATRACE-MIB", "cMTFlowSpecifierIpProtocol"), ("CISCO-MEDIATRACE-MIB", "cMTPathSpecifierRowStatus"), ("CISCO-MEDIATRACE-MIB", "cMTPathSpecifierDestAddrType"), ("CISCO-MEDIATRACE-MIB", "cMTPathSpecifierDestAddr"), ("CISCO-MEDIATRACE-MIB", "cMTPathSpecifierDestPort"), ("CISCO-MEDIATRACE-MIB", "cMTPathSpecifierSourceAddrType"), ("CISCO-MEDIATRACE-MIB", "cMTPathSpecifierSourceAddr"), ("CISCO-MEDIATRACE-MIB", "cMTPathSpecifierSourcePort"), ("CISCO-MEDIATRACE-MIB", "cMTPathSpecifierProtocolForDiscovery"), ("CISCO-MEDIATRACE-MIB", "cMTPathSpecifierGatewayAddrType"), ("CISCO-MEDIATRACE-MIB", "cMTPathSpecifierGatewayAddr"), ("CISCO-MEDIATRACE-MIB", "cMTPathSpecifierGatewayVlanId"), ("CISCO-MEDIATRACE-MIB", "cMTPathSpecifierIpProtocol"), ("CISCO-MEDIATRACE-MIB", "cMTSessionParamsResponseTimeout"), ("CISCO-MEDIATRACE-MIB", "cMTSessionParamsFrequency"), ("CISCO-MEDIATRACE-MIB", "cMTSessionParamsHistoryBuckets"), ("CISCO-MEDIATRACE-MIB", "cMTSessionParamsInactivityTimeout"), ("CISCO-MEDIATRACE-MIB", "cMTSessionParamsRouteChangeReactiontime"), ("CISCO-MEDIATRACE-MIB", "cMTSessionParamsRowStatus"), ("CISCO-MEDIATRACE-MIB", "cMTSessionPathSpecifierName"), ("CISCO-MEDIATRACE-MIB", "cMTMediaMonitorProfileRtpMaxDropout"), ("CISCO-MEDIATRACE-MIB", "cMTMediaMonitorProfileRtpMaxReorder"), ("CISCO-MEDIATRACE-MIB", "cMTMediaMonitorProfileRtpMinimalSequential"), ("CISCO-MEDIATRACE-MIB", "cMTMediaMonitorProfileInterval"), ("CISCO-MEDIATRACE-MIB", "cMTMediaMonitorProfileRowStatus"), ("CISCO-MEDIATRACE-MIB", "cMTSessionFlowSpecifierName"), ("CISCO-MEDIATRACE-MIB", "cMTSessionParamName"), ("CISCO-MEDIATRACE-MIB", "cMTSessionProfileName"), ("CISCO-MEDIATRACE-MIB", "cMTSessionRequestStatsRouteIndex"), ("CISCO-MEDIATRACE-MIB", "cMTSessionRequestStatsTracerouteStatus"), ("CISCO-MEDIATRACE-MIB", "cMTSessionRowStatus"), ("CISCO-MEDIATRACE-MIB", "cMTScheduleLife"), ("CISCO-MEDIATRACE-MIB", "cMTScheduleStartTime"), ("CISCO-MEDIATRACE-MIB", "cMTScheduleEntryAgeout"), ("CISCO-MEDIATRACE-MIB", "cMTScheduleRowStatus"), ("CISCO-MEDIATRACE-MIB", "cMTSystemProfileMetric"), ("CISCO-MEDIATRACE-MIB", "cMTSystemProfileRowStatus"), ("CISCO-MEDIATRACE-MIB", "cMTHopStatsMediatraceTtl"), ("CISCO-MEDIATRACE-MIB", "cMTHopStatsName"), ("CISCO-MEDIATRACE-MIB", "cMTHopStatsCollectionStatus"), ("CISCO-MEDIATRACE-MIB", "cMTHopStatsIngressInterface"), ("CISCO-MEDIATRACE-MIB", "cMTHopStatsEgressInterface"), ("CISCO-MEDIATRACE-MIB", "cMTPathHopType"), ("CISCO-MEDIATRACE-MIB", "cMTPathHopAddrType"), ("CISCO-MEDIATRACE-MIB", "cMTPathHopAddr"), ("CISCO-MEDIATRACE-MIB", "cMTPathHopAlternate1AddrType"), ("CISCO-MEDIATRACE-MIB", "cMTPathHopAlternate1Addr"), ("CISCO-MEDIATRACE-MIB", "cMTPathHopAlternate2AddrType"), ("CISCO-MEDIATRACE-MIB", "cMTPathHopAlternate2Addr"), ("CISCO-MEDIATRACE-MIB", "cMTPathHopAlternate3AddrType"), ("CISCO-MEDIATRACE-MIB", "cMTPathHopAlternate3Addr"), ("CISCO-MEDIATRACE-MIB", "cMTTraceRouteHopNumber"), ("CISCO-MEDIATRACE-MIB", "cMTTraceRouteHopRtt"), ("CISCO-MEDIATRACE-MIB", "cMTSessionRequestStatsRequestTimestamp"), ("CISCO-MEDIATRACE-MIB", "cMTSessionRequestStatsRequestStatus"), ("CISCO-MEDIATRACE-MIB", "cMTSessionRequestStatsNumberOfMediatraceHops"), ("CISCO-MEDIATRACE-MIB", "cMTSessionRequestStatsNumberOfValidHops"), ("CISCO-MEDIATRACE-MIB", "cMTSessionRequestStatsNumberOfErrorHops"), ("CISCO-MEDIATRACE-MIB", "cMTSessionRequestStatsNumberOfNoDataRecordHops"), ("CISCO-MEDIATRACE-MIB", "cMTSessionRequestStatsNumberOfNonMediatraceHops"), ("CISCO-MEDIATRACE-MIB", "cMTCommonMetricsIpPktDropped"), ("CISCO-MEDIATRACE-MIB", "cMTCommonMetricsIpOctets"), ("CISCO-MEDIATRACE-MIB", "cMTCommonMetricsIpPktCount"), ("CISCO-MEDIATRACE-MIB", "cMTCommonMetricsIpByteRate"), ("CISCO-MEDIATRACE-MIB", "cMTCommonMetricsIpDscp"), ("CISCO-MEDIATRACE-MIB", "cMTCommonMetricsIpTtl"), ("CISCO-MEDIATRACE-MIB", "cMTCommonMetricsFlowCounter"), ("CISCO-MEDIATRACE-MIB", "cMTCommonMetricsFlowDirection"), ("CISCO-MEDIATRACE-MIB", "cMTCommonMetricsLossMeasurement"), ("CISCO-MEDIATRACE-MIB", "cMTCommonMetricsMediaStopOccurred"), ("CISCO-MEDIATRACE-MIB", "cMTCommonMetricsRouteForward"), ("CISCO-MEDIATRACE-MIB", "cMTCommonMetricsIpProtocol"), ("CISCO-MEDIATRACE-MIB", "cMTRtpMetricsBitRate"), ("CISCO-MEDIATRACE-MIB", "cMTRtpMetricsOctets"), ("CISCO-MEDIATRACE-MIB", "cMTRtpMetricsPkts"), ("CISCO-MEDIATRACE-MIB", "cMTRtpMetricsJitter"), ("CISCO-MEDIATRACE-MIB", "cMTRtpMetricsLostPkts"), ("CISCO-MEDIATRACE-MIB", "cMTRtpMetricsExpectedPkts"), ("CISCO-MEDIATRACE-MIB", "cMTRtpMetricsLostPktEvents"), ("CISCO-MEDIATRACE-MIB", "cMTRtpMetricsLossPercent"), ("CISCO-MEDIATRACE-MIB", "cMTTcpMetricMediaByteCount"), ("CISCO-MEDIATRACE-MIB", "cMTTcpMetricConnectRoundTripDelay"), ("CISCO-MEDIATRACE-MIB", "cMTTcpMetricLostEventCount"), ("CISCO-MEDIATRACE-MIB", "cMTSystemMetricCpuOneMinuteUtilization"), ("CISCO-MEDIATRACE-MIB", "cMTSystemMetricCpuFiveMinutesUtilization"), ("CISCO-MEDIATRACE-MIB", "cMTSystemMetricMemoryUtilization"), ("CISCO-MEDIATRACE-MIB", "cMTInterfaceOutSpeed"), ("CISCO-MEDIATRACE-MIB", "cMTInterfaceInSpeed"), ("CISCO-MEDIATRACE-MIB", "cMTInterfaceOutDiscards"), ("CISCO-MEDIATRACE-MIB", "cMTInterfaceInDiscards"), ("CISCO-MEDIATRACE-MIB", "cMTInterfaceOutErrors"), ("CISCO-MEDIATRACE-MIB", "cMTInterfaceInErrors"), ("CISCO-MEDIATRACE-MIB", "cMTInterfaceOutOctets"), ("CISCO-MEDIATRACE-MIB", "cMTInterfaceInOctets"), ("CISCO-MEDIATRACE-MIB", "cMTMediaMonitorProfileMetric"), ("CISCO-MEDIATRACE-MIB", "cMTSessionTraceRouteEnabled"), ("CISCO-MEDIATRACE-MIB", "cMTScheduleRecurring"), ("CISCO-MEDIATRACE-MIB", "cMTFlowSpecifierMetadataGlobalId"), ("CISCO-MEDIATRACE-MIB", "cMTPathSpecifierMetadataGlobalId"), ("CISCO-MEDIATRACE-MIB", "cMTHopStatsMaskBitmaps"), ("CISCO-MEDIATRACE-MIB", "cMTSessionStatusBitmaps"), ("CISCO-MEDIATRACE-MIB", "cMTCommonMetricsBitmaps"), ("CISCO-MEDIATRACE-MIB", "cMTRtpMetricsBitmaps"), ("CISCO-MEDIATRACE-MIB", "cMTTcpMetricBitmaps"), ("CISCO-MEDIATRACE-MIB", "cMTSystemMetricBitmaps"), ("CISCO-MEDIATRACE-MIB", "cMTInterfaceBitmaps"), ("CISCO-MEDIATRACE-MIB", "cMTSessionStatusOperationState"), ("CISCO-MEDIATRACE-MIB", "cMTSessionStatusOperationTimeToLive"), ("CISCO-MEDIATRACE-MIB", "cMTSessionStatusGlobalSessionId"), ("CISCO-MEDIATRACE-MIB", "cMTSessionRequestStatsBitmaps"), ("CISCO-MEDIATRACE-MIB", "cMTSessionRequestStatsMDGlobalId"), ("CISCO-MEDIATRACE-MIB", "cMTSessionRequestStatsMDMultiPartySessionId"), ("CISCO-MEDIATRACE-MIB", "cMTSessionRequestStatsMDAppName"), ("CISCO-MEDIATRACE-MIB", "cMTInitiatorEnable"), ("CISCO-MEDIATRACE-MIB", "cMTInitiatorSourceInterface"), ("CISCO-MEDIATRACE-MIB", "cMTInitiatorSourceAddressType"), ("CISCO-MEDIATRACE-MIB", "cMTInitiatorSourceAddress"), ("CISCO-MEDIATRACE-MIB", "cMTInitiatorMaxSessions"), ("CISCO-MEDIATRACE-MIB", "cMTInitiatorSoftwareVersionMajor"), ("CISCO-MEDIATRACE-MIB", "cMTInitiatorProtocolVersionMajor"), ("CISCO-MEDIATRACE-MIB", "cMTInitiatorConfiguredSessions"), ("CISCO-MEDIATRACE-MIB", "cMTInitiatorPendingSessions"), ("CISCO-MEDIATRACE-MIB", "cMTInitiatorInactiveSessions"), ("CISCO-MEDIATRACE-MIB", "cMTInitiatorActiveSessions"), ("CISCO-MEDIATRACE-MIB", "cMTResponderEnable"), ("CISCO-MEDIATRACE-MIB", "cMTResponderMaxSessions"), ("CISCO-MEDIATRACE-MIB", "cMTResponderActiveSessions"), ("CISCO-MEDIATRACE-MIB", "cMTInitiatorSoftwareVersionMinor"), ("CISCO-MEDIATRACE-MIB", "cMTInitiatorProtocolVersionMinor"), ("CISCO-MEDIATRACE-MIB", "cMTCommonMetricsFlowSamplingStartTime"))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
ciscoMediatraceMIBMainObjectGroup = ciscoMediatraceMIBMainObjectGroup.setStatus('current')
if mibBuilder.loadTexts: ciscoMediatraceMIBMainObjectGroup.setDescription('The is a object group.')
mibBuilder.exportSymbols("CISCO-MEDIATRACE-MIB", cMTResponderActiveSessions=cMTResponderActiveSessions, cMTFlowSpecifierSourcePort=cMTFlowSpecifierSourcePort, cMTSessionRequestStatsNumberOfNoDataRecordHops=cMTSessionRequestStatsNumberOfNoDataRecordHops, cMTRtpMetricStatsTable=cMTRtpMetricStatsTable, cMTRtpMetricsLossPercent=cMTRtpMetricsLossPercent, cMTPathHopAddrType=cMTPathHopAddrType, cMTSessionStatusGlobalSessionId=cMTSessionStatusGlobalSessionId, cMTInitiatorActiveSessions=cMTInitiatorActiveSessions, cMTSessionRequestStatsNumberOfNonMediatraceHops=cMTSessionRequestStatsNumberOfNonMediatraceHops, cMTSessionParamsHistoryBuckets=cMTSessionParamsHistoryBuckets, cMTHopStatsEgressInterface=cMTHopStatsEgressInterface, cMTMediaMonitorProfileName=cMTMediaMonitorProfileName, cMTPathHopAlternate1Addr=cMTPathHopAlternate1Addr, cMTHopStatsEntry=cMTHopStatsEntry, cMTPathSpecifierEntry=cMTPathSpecifierEntry, cMTTraceRouteEntry=cMTTraceRouteEntry, cMTSessionFlowSpecifierName=cMTSessionFlowSpecifierName, cMTSessionStatusBitmaps=cMTSessionStatusBitmaps, cMTInitiatorSourceAddressType=cMTInitiatorSourceAddressType, cMTRtpMetricsBitRate=cMTRtpMetricsBitRate, cMTSessionRequestStatsMDGlobalId=cMTSessionRequestStatsMDGlobalId, cMTInterfaceOutSpeed=cMTInterfaceOutSpeed, cMTFlowSpecifierRowStatus=cMTFlowSpecifierRowStatus, cMTSystemProfileEntry=cMTSystemProfileEntry, cMTInitiatorSourceAddress=cMTInitiatorSourceAddress, cMTSessionParamsEntry=cMTSessionParamsEntry, cMTSessionParamsFrequency=cMTSessionParamsFrequency, cMTInitiatorProtocolVersionMinor=cMTInitiatorProtocolVersionMinor, CiscoNTPTimeStamp=CiscoNTPTimeStamp, cMTSystemMetricBitmaps=cMTSystemMetricBitmaps, cMTTcpMetricMediaByteCount=cMTTcpMetricMediaByteCount, cMTSessionRequestStatsRequestStatus=cMTSessionRequestStatsRequestStatus, cMTRtpMetricsBitmaps=cMTRtpMetricsBitmaps, ciscoMediatraceMIB=ciscoMediatraceMIB, cMTInterfaceInSpeed=cMTInterfaceInSpeed, cMTInitiatorConfiguredSessions=cMTInitiatorConfiguredSessions, cMTHopStatsMediatraceTtl=cMTHopStatsMediatraceTtl, cMTPathSpecifierDestPort=cMTPathSpecifierDestPort, cMTHopStatsCollectionStatus=cMTHopStatsCollectionStatus, cMTSessionParamsResponseTimeout=cMTSessionParamsResponseTimeout, ciscoMediatraceMIBNotifs=ciscoMediatraceMIBNotifs, cMTTcpMetricStatsEntry=cMTTcpMetricStatsEntry, cMTInterfaceMetricStatsTable=cMTInterfaceMetricStatsTable, cMTSessionParamName=cMTSessionParamName, cMTSessionLifeNumber=cMTSessionLifeNumber, cMTScheduleLife=cMTScheduleLife, cMTTcpMetricStatsTable=cMTTcpMetricStatsTable, cMTBucketNumber=cMTBucketNumber, cMTResponderMaxSessions=cMTResponderMaxSessions, cMTScheduleTable=cMTScheduleTable, cMTSessionRequestStatsRequestTimestamp=cMTSessionRequestStatsRequestTimestamp, cMTPathTable=cMTPathTable, cMTRtpMetricsLostPkts=cMTRtpMetricsLostPkts, ciscoMediatraceMIBGroups=ciscoMediatraceMIBGroups, cMTFlowSpecifierDestAddrType=cMTFlowSpecifierDestAddrType, cMTCommonMetricsMediaStopOccurred=cMTCommonMetricsMediaStopOccurred, cMTCommonMetricStatsTable=cMTCommonMetricStatsTable, cMTPathEntry=cMTPathEntry, cMTInitiatorMaxSessions=cMTInitiatorMaxSessions, cMTInterfaceInOctets=cMTInterfaceInOctets, cMTFlowSpecifierTable=cMTFlowSpecifierTable, cMTHopStatsMaskBitmaps=cMTHopStatsMaskBitmaps, cMTSessionRequestStatsMDAppName=cMTSessionRequestStatsMDAppName, cMTSessionPathSpecifierName=cMTSessionPathSpecifierName, cMTMediaMonitorProfileRowStatus=cMTMediaMonitorProfileRowStatus, cMTPathSpecifierProtocolForDiscovery=cMTPathSpecifierProtocolForDiscovery, cMTCtrl=cMTCtrl, cMTFlowSpecifierEntry=cMTFlowSpecifierEntry, cMTCommonMetricsBitmaps=cMTCommonMetricsBitmaps, cMTInitiatorPendingSessions=cMTInitiatorPendingSessions, cMTSystemProfileTable=cMTSystemProfileTable, CiscoMediatraceDiscoveryProtocol=CiscoMediatraceDiscoveryProtocol, cMTFlowSpecifierName=cMTFlowSpecifierName, cMTCommonMetricsIpOctets=cMTCommonMetricsIpOctets, cMTSystemProfileMetric=cMTSystemProfileMetric, cMTHopStatsIngressInterface=cMTHopStatsIngressInterface, cMTHopStatsAddr=cMTHopStatsAddr, cMTPathSpecifierGatewayAddrType=cMTPathSpecifierGatewayAddrType, CiscoMediatraceSupportProtocol=CiscoMediatraceSupportProtocol, cMTPathSpecifierIpProtocol=cMTPathSpecifierIpProtocol, cMTSessionRowStatus=cMTSessionRowStatus, cMTFlowSpecifierIpProtocol=cMTFlowSpecifierIpProtocol, cMTTcpMetricBitmaps=cMTTcpMetricBitmaps, cMTSystemMetricCpuFiveMinutesUtilization=cMTSystemMetricCpuFiveMinutesUtilization, cMTSessionNumber=cMTSessionNumber, cMTPathSpecifierSourceAddrType=cMTPathSpecifierSourceAddrType, cMTInitiatorSoftwareVersionMajor=cMTInitiatorSoftwareVersionMajor, cMTSessionRequestStatsNumberOfErrorHops=cMTSessionRequestStatsNumberOfErrorHops, cMTMediaMonitorProfileRtpMaxReorder=cMTMediaMonitorProfileRtpMaxReorder, cMTSessionParamsRowStatus=cMTSessionParamsRowStatus, cMTHopStatsAddrType=cMTHopStatsAddrType, cMTMediaMonitorProfileEntry=cMTMediaMonitorProfileEntry, cMTInterfaceOutDiscards=cMTInterfaceOutDiscards, cMTSessionParamsRouteChangeReactiontime=cMTSessionParamsRouteChangeReactiontime, cMTRtpMetricsPkts=cMTRtpMetricsPkts, cMTSessionParamsName=cMTSessionParamsName, cMTResponderEnable=cMTResponderEnable, cMTSessionTable=cMTSessionTable, cMTTraceRouteHopNumber=cMTTraceRouteHopNumber, cMTPathSpecifierDestAddr=cMTPathSpecifierDestAddr, cMTInitiatorProtocolVersionMajor=cMTInitiatorProtocolVersionMajor, cMTPathHopAddr=cMTPathHopAddr, cMTSessionStatusTable=cMTSessionStatusTable, cMTSystemMetricStatsTable=cMTSystemMetricStatsTable, cMTInterfaceMetricStatsEntry=cMTInterfaceMetricStatsEntry, cMTTraceRouteHopRtt=cMTTraceRouteHopRtt, cMTSessionRequestStatsNumberOfMediatraceHops=cMTSessionRequestStatsNumberOfMediatraceHops, cMTSessionParamsInactivityTimeout=cMTSessionParamsInactivityTimeout, cMTSystemProfileRowStatus=cMTSystemProfileRowStatus, cMTFlowSpecifierSourceAddrType=cMTFlowSpecifierSourceAddrType, cMTPathHopNumber=cMTPathHopNumber, cMTSessionRequestStatsNumberOfValidHops=cMTSessionRequestStatsNumberOfValidHops, cMTScheduleRowStatus=cMTScheduleRowStatus, cMTCommonMetricsIpTtl=cMTCommonMetricsIpTtl, cMTSessionTraceRouteEnabled=cMTSessionTraceRouteEnabled, cMTSessionRequestStatsTracerouteStatus=cMTSessionRequestStatsTracerouteStatus, cMTRtpMetricsOctets=cMTRtpMetricsOctets, cMTSystemMetricCpuOneMinuteUtilization=cMTSystemMetricCpuOneMinuteUtilization, cMTSessionStatusOperationState=cMTSessionStatusOperationState, ciscoMediatraceMIBCompliances=ciscoMediatraceMIBCompliances, cMTPathSpecifierRowStatus=cMTPathSpecifierRowStatus, cMTCommonMetricsIpPktCount=cMTCommonMetricsIpPktCount, cMTPathSpecifierGatewayAddr=cMTPathSpecifierGatewayAddr, cMTInterfaceBitmaps=cMTInterfaceBitmaps, cMTFlowSpecifierMetadataGlobalId=cMTFlowSpecifierMetadataGlobalId, cMTPathHopAlternate2AddrType=cMTPathHopAlternate2AddrType, cMTSessionRequestStatsRouteIndex=cMTSessionRequestStatsRouteIndex, cMTPathSpecifierName=cMTPathSpecifierName, cMTTcpMetricConnectRoundTripDelay=cMTTcpMetricConnectRoundTripDelay, cMTCommonMetricsRouteForward=cMTCommonMetricsRouteForward, cMTSessionRequestStatsTable=cMTSessionRequestStatsTable, cMTSystemMetricStatsEntry=cMTSystemMetricStatsEntry, cMTPathHopAlternate3Addr=cMTPathHopAlternate3Addr, cMTPathHopAlternate1AddrType=cMTPathHopAlternate1AddrType, cMTCommonMetricsIpDscp=cMTCommonMetricsIpDscp, ciscoMediatraceMIBObjects=ciscoMediatraceMIBObjects, cMTPathSpecifierGatewayVlanId=cMTPathSpecifierGatewayVlanId, cMTTraceRouteTable=cMTTraceRouteTable, cMTPathSpecifierMetadataGlobalId=cMTPathSpecifierMetadataGlobalId, cMTPathSpecifierDestAddrType=cMTPathSpecifierDestAddrType, cMTSessionRequestStatsMDMultiPartySessionId=cMTSessionRequestStatsMDMultiPartySessionId, cMTPathHopType=cMTPathHopType, cMTPathHopAlternate3AddrType=cMTPathHopAlternate3AddrType, cMTMediaMonitorProfileMetric=cMTMediaMonitorProfileMetric, cMTPathSpecifierTable=cMTPathSpecifierTable, cMTStats=cMTStats, cMTSessionStatusEntry=cMTSessionStatusEntry, cMTPathSpecifierSourcePort=cMTPathSpecifierSourcePort, cMTSessionRequestStatsEntry=cMTSessionRequestStatsEntry, ciscoMediatraceMIBMainObjectGroup=ciscoMediatraceMIBMainObjectGroup, cMTCommonMetricsFlowCounter=cMTCommonMetricsFlowCounter, cMTHopStatsName=cMTHopStatsName, cMTSystemMetricMemoryUtilization=cMTSystemMetricMemoryUtilization, cMTFlowSpecifierSourceAddr=cMTFlowSpecifierSourceAddr, PYSNMP_MODULE_ID=ciscoMediatraceMIB, cMTMediaMonitorProfileTable=cMTMediaMonitorProfileTable, ciscoMediatraceMIBConform=ciscoMediatraceMIBConform, cMTMediaMonitorProfileInterval=cMTMediaMonitorProfileInterval, cMTCommonMetricStatsEntry=cMTCommonMetricStatsEntry, cMTRtpMetricsExpectedPkts=cMTRtpMetricsExpectedPkts, cMTFlowSpecifierDestAddr=cMTFlowSpecifierDestAddr, cMTCommonMetricsFlowSamplingStartTime=cMTCommonMetricsFlowSamplingStartTime, cMTInitiatorSoftwareVersionMinor=cMTInitiatorSoftwareVersionMinor, cMTPathHopAlternate2Addr=cMTPathHopAlternate2Addr, cMTSessionProfileName=cMTSessionProfileName, cMTCommonMetricsIpProtocol=cMTCommonMetricsIpProtocol, cMTFlowSpecifierDestPort=cMTFlowSpecifierDestPort, cMTPathSpecifierSourceAddr=cMTPathSpecifierSourceAddr, cMTCommonMetricsFlowDirection=cMTCommonMetricsFlowDirection, cMTSessionStatusOperationTimeToLive=cMTSessionStatusOperationTimeToLive, cMTSessionRequestStatsBitmaps=cMTSessionRequestStatsBitmaps, cMTInterfaceInErrors=cMTInterfaceInErrors, cMTHopStatsTable=cMTHopStatsTable, cMTInterfaceInDiscards=cMTInterfaceInDiscards, cMTScheduleRecurring=cMTScheduleRecurring, cMTSessionParamsTable=cMTSessionParamsTable, cMTCommonMetricsIpByteRate=cMTCommonMetricsIpByteRate, cMTInitiatorInactiveSessions=cMTInitiatorInactiveSessions, cMTSystemProfileName=cMTSystemProfileName, cMTInterfaceOutOctets=cMTInterfaceOutOctets, cMTScheduleEntryAgeout=cMTScheduleEntryAgeout, cMTCommonMetricsLossMeasurement=cMTCommonMetricsLossMeasurement, cMTRtpMetricsJitter=cMTRtpMetricsJitter, cMTInterfaceOutErrors=cMTInterfaceOutErrors, cMTRtpMetricStatsEntry=cMTRtpMetricStatsEntry, cMTScheduleEntry=cMTScheduleEntry, cMTInitiatorSourceInterface=cMTInitiatorSourceInterface, cMTTcpMetricLostEventCount=cMTTcpMetricLostEventCount, cMTSessionEntry=cMTSessionEntry, cMTMediaMonitorProfileRtpMaxDropout=cMTMediaMonitorProfileRtpMaxDropout, ciscoMediatraceMIBCompliance=ciscoMediatraceMIBCompliance, cMTMediaMonitorProfileRtpMinimalSequential=cMTMediaMonitorProfileRtpMinimalSequential, cMTInitiatorEnable=cMTInitiatorEnable, cMTScheduleStartTime=cMTScheduleStartTime, cMTCommonMetricsIpPktDropped=cMTCommonMetricsIpPktDropped, cMTRtpMetricsLostPktEvents=cMTRtpMetricsLostPktEvents)
| (integer, octet_string, object_identifier) = mibBuilder.importSymbols('ASN1', 'Integer', 'OctetString', 'ObjectIdentifier')
(named_values,) = mibBuilder.importSymbols('ASN1-ENUMERATION', 'NamedValues')
(value_range_constraint, constraints_intersection, constraints_union, single_value_constraint, value_size_constraint) = mibBuilder.importSymbols('ASN1-REFINEMENT', 'ValueRangeConstraint', 'ConstraintsIntersection', 'ConstraintsUnion', 'SingleValueConstraint', 'ValueSizeConstraint')
(flow_metric_value,) = mibBuilder.importSymbols('CISCO-FLOW-MONITOR-TC-MIB', 'FlowMetricValue')
(cisco_mgmt,) = mibBuilder.importSymbols('CISCO-SMI', 'ciscoMgmt')
(interface_index_or_zero,) = mibBuilder.importSymbols('IF-MIB', 'InterfaceIndexOrZero')
(inet_port_number, inet_address, inet_address_type) = mibBuilder.importSymbols('INET-ADDRESS-MIB', 'InetPortNumber', 'InetAddress', 'InetAddressType')
(vlan_id,) = mibBuilder.importSymbols('Q-BRIDGE-MIB', 'VlanId')
(snmp_admin_string,) = mibBuilder.importSymbols('SNMP-FRAMEWORK-MIB', 'SnmpAdminString')
(module_compliance, notification_group, object_group) = mibBuilder.importSymbols('SNMPv2-CONF', 'ModuleCompliance', 'NotificationGroup', 'ObjectGroup')
(counter32, mib_scalar, mib_table, mib_table_row, mib_table_column, ip_address, mib_identifier, counter64, module_identity, gauge32, iso, bits, integer32, notification_type, unsigned32, object_identity, time_ticks) = mibBuilder.importSymbols('SNMPv2-SMI', 'Counter32', 'MibScalar', 'MibTable', 'MibTableRow', 'MibTableColumn', 'IpAddress', 'MibIdentifier', 'Counter64', 'ModuleIdentity', 'Gauge32', 'iso', 'Bits', 'Integer32', 'NotificationType', 'Unsigned32', 'ObjectIdentity', 'TimeTicks')
(truth_value, time_stamp, display_string, row_status, textual_convention) = mibBuilder.importSymbols('SNMPv2-TC', 'TruthValue', 'TimeStamp', 'DisplayString', 'RowStatus', 'TextualConvention')
cisco_mediatrace_mib = module_identity((1, 3, 6, 1, 4, 1, 9, 9, 800))
ciscoMediatraceMIB.setRevisions(('2012-08-23 00:00',))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
if mibBuilder.loadTexts:
ciscoMediatraceMIB.setRevisionsDescriptions(('Initial version of this MIB module.',))
if mibBuilder.loadTexts:
ciscoMediatraceMIB.setLastUpdated('201208230000Z')
if mibBuilder.loadTexts:
ciscoMediatraceMIB.setOrganization('Cisco Systems, Inc.')
if mibBuilder.loadTexts:
ciscoMediatraceMIB.setContactInfo('Cisco Systems Customer Service Postal: 170 W Tasman Drive San Jose, CA 95134 USA Tel: +1 800 553-NETS E-mail: cs-mediatrace@cisco.com')
if mibBuilder.loadTexts:
ciscoMediatraceMIB.setDescription("Mediatrace helps to isolate and troubleshoot network degradation problems by enabling a network administrator to discover an Internet Protocol (IP) flow's path, dynamically enable monitoring capabilities on the nodes along the path, and collect information on a hop-by-hop basis. This information includes, among other things, flow statistics, and utilization information for incoming and outgoing interfaces, CPUs, and memory, as well as any changes to IP routes. This information can be retrieved by configuring Cisco Mediatrace to start a recurring monitoring session at a specific time and on specific days. The session can be configured to specify which metrics to collect, and how frequently they are collected. The hops along the path are automatically discovered as part of the operation. This module defines a MIB for the features of configuring Mediatrace sessions and obtain statistics data for a particular hop at a specific time. INITIATOR/RESPONDER ==================== At the top level, this MIB module describes the initiator and responder roles for the device. The scalar objects corresponding to each role are used to enable and set parameters like maximum sessions supported, IP address used for enabling the initiator,etc. Some of the scalar objects are used to obtain information about a particular role for the device. At a time the device supports a single initiator and/or single responder. The following scalar objects are used for enabling the initiator, +---------> cMTInitiatorEnable +---------> cMTInitiatorSourceInterface +---------> cMTInitiatorSourceAddressType +---------> cMTInitiatorSourceAddress +---------> cMTInitiatorMaxSessions In addition to the above objects, the following objects are used for obtaining information about the initiator role on the device, +---------> cMTInitiatorSoftwareVersionMajor +---------> cMTInitiatorSoftwareVersionMinor +---------> cMTInitiatorProtocolVersionMajor +---------> cMTInitiatorProtocolVersionMinor +---------> cMTInitiatorConfiguredSessions +---------> cMTInitiatorPendingSessions +---------> cMTInitiatorInactiveSessions +---------> cMTInitiatorActiveSessions The following scalar objects are used for enabling the responder, +---------> cMTResponderEnable +---------> cMTResponderMaxSessions In addition to the above objects, the following object is used for obtaining information about the responder role on the device, +---------> cMTResponderActiveSessions CONTROL TABLES =============== At the next level, this MIB module describes the entities - path specifier, flow specifier, session params and profile. This section also includes the session and scheduling entities. Each row in the cMTSessionTable corresponds to a single session. The session is a container and hence the path specifier, flow specifier, session params and profile objects for each session point to the corresponding entities in the cMTPathSpecifierTable, cMTFlowSpecifierTable, cMTSessionParamsTable, cMTMediaMonitorProfileTable and cMTSystemProfileTable tables. o cMTPathSpecifierTable - describes path specifiers. o cMTFlowSpecifierTable - describes flow specifiers. o cMTSessionParamsTable - describes session params entities. o cMTMediaMonitorProfileTable - describes media monitor profile. o cMTSystemProfileTable - describes system profiles. The cMTSessionTable has a sparse dependent relationship with each of these tables, as there exist situations when data from those tables may not be used for a particular session, including : 1) The session using system profile does not need flow specifier. 2) The session using media monitor profile may not need optional flow specifier. 3) The session may only use one of the two profiles, system or media monitor. o cMTSessionTable - describes sessions. o cMTScheduleTable - describes scheduling entities for the sessions. The cMTScheduleTable has sparse dependent relationship on the cMTSessionTable, as there exist situations when the a session is not available for scheduling, including - a session is created but is not yet scheduled. +----------------------+ | cMTPathSpecifierTable| | | +-----------------------------+ | cMTPathSpecifierName = ps1 | +-----------------------------+ | | +-----------------------------+ | cMTPathSpecifierName = ps2 | +-----------------------------+ : : : : +-----------------------------+ | cMTPathSpecifierName = ps6 | +-----------------------------+ | | +----------------------+ +----------------------+ | cMTFlowSpecifierTable| | | +-----------------------------+ | cMTFlowSpecifierName = fs1 | +-----------------------------+ | | +-----------------------------+ | cMTFlowSpecifierName = fs2 | +-----------------------------+ : : : : +-----------------------------+ | cMTFlowSpecifierName = fs6 | +-----------------------------+ | | +----------------------+ +-------------------------+ +----------------------+ | cMTSessionTable | | cMTSessionParamsTable| | | | | +-------------------------------------+ +--------------------------+ | cMTSessionNumber = 1 | |cMTSessionParamsName = sp1| | +---------------------------------+ | +--------------------------+ | |cMTSessionPathSpecifierName = ps1| | | | | +---------------------------------+ | +--------------------------+ | | |cMTSessionParamsName = sp2| | +---------------------------------+ | +--------------------------+ | |cMTSessionParamName = sp1 | | : : | +---------------------------------+ | : : | | +--------------------------+ | +---------------------------------+ | |cMTSessionParamsName = sp5| | |cMTSessionProfileName = rtp1 | | +--------------------------+ | +---------------------------------+ | | | | | +-----------------------+ | +---------------------------------+ | | |cMTSessionFlowSpecifierName = fs1| | | +---------------------------------+ | | | | +---------------------------------+ | | |cMTSessionTraceRouteEnabled = T | | | +---------------------------------+ | | | +-------------------------------------+ | | | | +-------------------------------------+ | cMTSessionNumber = 2 | | +---------------------------------+ | +---------------------------+ | |cMTSessionPathSpecifierName = ps2| | |cMTMediaMonitorProfileTable| | +---------------------------------+ | | | | | +-----------------------------+ | +---------------------------------+ | |cMTMediaMonitorProfileName | | |cMTSessionParamName = sp5 | | | =rtp1 | | +---------------------------------+ | +-----------------------------+ | | | | | +---------------------------------+ | +-----------------------------+ | |cMTSessionProfileName = intf1 | | |cMTMediaMonitorProfileName | | +---------------------------------+ | | =rtp1 | | | +-----------------------------+ | +---------------------------------+ | : : | |cMTSessionTraceRouteEnabled = T | | : : | +---------------------------------+ | +-----------------------------+ | | |cMTMediaMonitorProfileName | +-------------------------------------+ | =tcp1 | : : +-----------------------------+ : : | | +-------------------------------------+ +---------------------------+ | cMTSessionNumber = 10 | | +---------------------------------+ | | |cMTSessionPathSpecifierName = ps1| | | +---------------------------------+ | | | | +---------------------------------+ | | |cMTSessionParamName = sp1 | | | +---------------------------------+ | | | | +---------------------------------+ | | |cMTSessionProfileName = tcp1 | | | +---------------------------------+ | | | | +---------------------------------+ | | |cMTSessionTraceRouteEnabled = T | | | +---------------------------------+ | | | +-------------------------------------+ | | | | +-------------------------+ +----------------------+ | cMTSystemProfileTable| | | +-----------------------------+ | cMTSystemProfileName = intf1| +-----------------------------+ | | +-----------------------------+ | cMTSystemProfileName = cpu1 | +-----------------------------+ : : : : +-----------------------------+ | cMTSystemProfileName = intf2| +-----------------------------+ | | +----------------------+ DEFINITIONS =============== Mediatrace Initiator - This is the entity that supports creation of periodic sessions using global session id. Initiator can send request, collects the responses to those request and processes them for reporting. Henceforth, it will be referred as initiator. Mediatrace Responder - This is the entity that queries local database and features to obtain information based on the request sent by the Initiator as part of a session. The collected information is sent as response to the initiator to match the session. Henceforth, it will be referred as responder. Meta-data - Meta information about the flow not contained in the data packet. Examples of such information are global session id, multi party session id, type of application that is generating this flow e.g., telepresence. Meta-data global session identifier - it is one of the meta-data attributes which uniquely identifies a flow globally and is used to query the meta-data database for obtaining the corresponding 5-tuple (destination address, destination port, source address, source port and IP protocol) for path specifier or flow specifier. Path - This specifies the route taken by the Mediatrace request for a particular session. This can be specified in terms of single or multiple 5-tuple parameters - destination address, destination port, source address, source port and IP protocol. Gateway address and VLAN are required in cases where the path starts from network element without IP address. This is specified using path specifier entity. Path Specifier - The path specifier is generally specified using complete or partial 5-tuple (destination address, destination port, source address, source port and IP protocol) for Layer 3 initiator. Gateway and VLAN ID are required for a Layer 2 initiator. It can also use the meta-data Global session Id to specify the 5-tuple. A single row corresponds to a path specifier which is created or destroyed when a path specifier is added or removed. Each path specifier entry is uniquely identified by cMTPathSpecifierName. Examples of a path specifier are as follows, path-specifier (ps1)+-------> destination address (10.10.10.2) +-------> destination port (12344) +-------> source address (10.10.12.2) +-------> source port (12567) +-------> IP protocol (UDP) +-------> gateway (10.10.11.2) +-------> VLAN ID (601) path-specifier (ps2)+-------> meta-data global identifier (345123456) Flow - A unidirectional stream of packets conforming to a classifier. For example, packets having a particular source IP address, destination IP address, protocol type, source port number, and destination port number. This is specified using a flow specifier entity. Flow Specifier - The flow specifier is generally specified using complete or partial 5-tuple (destination address, destination port, source address, source port and IP protocol). It can also use the meta-data Global session Id to specify the 5-tuple. A single row corresponds to a flow specifier which is created or destroyed when a flow specifier is added or removed. Each flow specifier entry is uniquely identified by cMTFlowSpecifierName. Examples of a flow specifier is as follows, flow-specifier (fs1)+-------> destination address(10.11.10.2) +-------> destination port (12344) +-------> source address (10.11.12.2) +-------> source port (12567) +-------> IP protocol (UDP) flow-specifier (fs2)+-------> meta-data global identifier (345123456) Metric - It defines a measurement that reflects the quality of a traffic flow or a resource on a hop or along the path e.g. number of packets for a flow, memory utilization on a hop, number of dropped packets on an interface, etc. Metric-list - It defines logical grouping of related metrics e.g. Metric-list CPU has 1% and 2% CPU utilization metric, Metric-list interface has ingress interface speed, egress interface speed, etc. Profile - It defines the set of metric-lists to be collected from the devices along the path. It can also include additional parameters which are required for collecting the metric e.g., sampling interval (also referred as monitor interval), etc. A Profile can include a set of related metric-lists along with related configuration parameters. The metrics could be the media monitoring (also referred as performance monitoring) metrics such as jitter, packet loss, bit rate etc., or system resource utilization metrics or interface counters. Two profiles, System profile and Media Monitoring (Performance Monitoring) Profile are supported. The different profiles, metric-lists and metrics are listed below, +-----> Profile +---> Metric-list +--------> one min CPU utilization | System | CPU | | | +--------> five min CPU utilization | | | +---> Metric-list +-----> memory utilization Memory | | | +---> Metric-list +------> octets input at ingress | Interface | | +------> octets output at egress | |------> packets received with error | | at ingress | +------> packets with error at egress | +------> packets discarded at ingress | +------> packets discarded at egress | +------> ingress interface speed | +------> egress interface speed | +--> Profile +--> Metric-list +--> Common +--> loss of Media Monitor | TCP | IP | measurement confidence | | metrics | | | +--> media stop event occurred | | +--> IP packet drop count | | +--> IP byte count | | +--> IP byte rate | | +--> IP DSCP | | +--> IP TTL | | +--> IP protocol | | +---> media byte | | count | | | +--> TCP +--> TCP connect round trip | specific | delay | metrics | | +--> TCP lost event count | +--> Metric-list +--> Common +--> loss of measurement RTP | IP | confidence | metrics | | +--> media stop event occurred | +--> IP packet drop count | +--> IP byte count | +--> IP byte rate | +--> IP DSCP | +--> IP TTL | +--> IP protocol | +---> media byte count | +--> RTP +--> RTP inter arrival jitter specific | delay metrics | +--> RTP packets lost +--> RTP packets expected +--> RTP packets lost event | count +---> RTP loss percent Examples of the profiles are as follows, profile system - metric-list interface (sys1) profile media-monitor - metric-list rtp (rtp1) +-------> monitor interval (60 seconds) Session parameter Profile - These correspond to the various parameters related to session such as frequency of data collection, timeout for request, etc. These are specified using the session params entity. This is the entity that executes via a conceptual session/schedule control row and populates a conceptual statistics row. Example session parameter profile is as follows, Session-params (sp1)+-------> response timeout (10 seconds) +-------> frequency (60 seconds) +-------> history data sets (2) +-------> route change reaction time (10 seconds) +-------> inactivity timeout (180 seconds) Session - The session is a grouping of various configurable entities such as profiles, session parameters and path specifiers. Flow specifier is optional and required for media monitor profile only. Once these parameters for a mediatrace session are defined through these entities, they are combined into a mediatrace session. Example of sessions are as follows, session (1) +--------> path-specifier (ps1) +--------> session-params (sp1) +--------> profile system (sys1) metric-list interface session (2) +--------> path-specifier (ps1) +--------> session-params (sp2) +--------> profile media-monitor (rtp1) | metric-list rtp +--------> flow-specifier (fs1) A session cycles through various states in its lifetime. The different states are, Active state : A session is said to be in active state when it is requesting and collecting data from the responders. Inactive state : A session becomes inactive when it is either stopped by unscheduling or life expires. In this state it will no longer collect or request data. Pending state: A session is in pending state when the session is created but not yet scheduled to be active. Based on the state and history of a session it can be classified as configured or scheduled session. Configured session : A session which is created and is in pending or inactive state is called a configured session. It can also be a newly created session which has not been scheduled (made active) yet. Scheduled session : A session which is in active state or pending state which is already requesting and collecting data or has set a time in future to start requesting or collecting data. Responder: The responder is in active state when it is able to process the requests from the initiator, collect the data locally and send the Response back to the initiator. Reachability Address: It is the address of the interface on a responder which is used to send the response to the initiator. Statistics row - This conceptual row is indexed based on the session index, session life index, bucket number and hop information (Hop address type and Hop address). This identifies the statistics for a particular session with specific life, at a particular time and for a specific hop.")
class Ciscontptimestamp(TextualConvention, OctetString):
reference = "D.L. Mills, 'Network Time Protocol (Version 3)', RFC-1305, March 1992, Section 3.1"
description = 'CiscoNTP timestamps are represented as a 64-bit unsigned fixed-point number, in seconds relative to 00:00 on 1 January 1900. The integer part is in the first 32 bits and the fraction part is in the last 32 bits.'
status = 'current'
display_hint = '4d.4d'
subtype_spec = OctetString.subtypeSpec + value_size_constraint(8, 8)
fixed_length = 8
class Ciscomediatracesupportprotocol(TextualConvention, Integer32):
description = 'Represents different types of layer 3 protocols supported by by Mediatrace for path and flow specification. Currently two protocols - TCP and UDP are supported.'
status = 'current'
subtype_spec = Integer32.subtypeSpec + constraints_union(single_value_constraint(6, 17))
named_values = named_values(('tcp', 6), ('udp', 17))
class Ciscomediatracediscoveryprotocol(TextualConvention, Integer32):
description = 'Represents different types of protocols used by Mediatrace to discover the path based on the path specifier.'
status = 'current'
subtype_spec = Integer32.subtypeSpec + constraints_union(single_value_constraint(46))
named_values = named_values(('rsvp', 46))
cisco_mediatrace_mib_notifs = mib_identifier((1, 3, 6, 1, 4, 1, 9, 9, 800, 0))
cisco_mediatrace_mib_objects = mib_identifier((1, 3, 6, 1, 4, 1, 9, 9, 800, 1))
cisco_mediatrace_mib_conform = mib_identifier((1, 3, 6, 1, 4, 1, 9, 9, 800, 2))
c_mt_ctrl = mib_identifier((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 1))
c_mt_stats = mib_identifier((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 2))
c_mt_initiator_enable = mib_scalar((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 1, 2), truth_value()).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
cMTInitiatorEnable.setStatus('current')
if mibBuilder.loadTexts:
cMTInitiatorEnable.setDescription('This object specifies the whether the Mediatrace initiator is enabled on the network element.')
c_mt_initiator_source_interface = mib_scalar((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 1, 3), interface_index_or_zero()).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
cMTInitiatorSourceInterface.setStatus('current')
if mibBuilder.loadTexts:
cMTInitiatorSourceInterface.setDescription('This object specifies the interface whose IP or IPv6 address will be used as initiator address. The Initiator address is used by layer 2 mediatrace responder to unicast the response message to initiator. This address is also reachability address for mediatrace hop 0. The value of this object should be set to ifIndex value of the desired interface from the ifTable.')
c_mt_initiator_source_address_type = mib_scalar((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 1, 4), inet_address_type()).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
cMTInitiatorSourceAddressType.setStatus('current')
if mibBuilder.loadTexts:
cMTInitiatorSourceAddressType.setDescription('Address type (IP or IPv6) of the initiator address specified in cMTInitiatorSourceAddress object. The value should be set to unknown (0) if source interface object is non zero.')
c_mt_initiator_source_address = mib_scalar((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 1, 5), inet_address()).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
cMTInitiatorSourceAddress.setStatus('current')
if mibBuilder.loadTexts:
cMTInitiatorSourceAddress.setDescription('This object specifies the IP address used by the initiator when obtaining the reachability address from a downstream responder.')
c_mt_initiator_max_sessions = mib_scalar((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 1, 6), unsigned32()).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
cMTInitiatorMaxSessions.setStatus('current')
if mibBuilder.loadTexts:
cMTInitiatorMaxSessions.setDescription('This object specifies the maximum number of mediatrace sessions that can be active simultaneously on the initiator.')
c_mt_initiator_software_version_major = mib_scalar((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 1, 7), unsigned32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
cMTInitiatorSoftwareVersionMajor.setStatus('current')
if mibBuilder.loadTexts:
cMTInitiatorSoftwareVersionMajor.setDescription('This object indicates the major version number of Mediatrace application.')
c_mt_initiator_software_version_minor = mib_scalar((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 1, 8), unsigned32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
cMTInitiatorSoftwareVersionMinor.setStatus('current')
if mibBuilder.loadTexts:
cMTInitiatorSoftwareVersionMinor.setDescription('This object indicates the minor version number of Mediatrace application.')
c_mt_initiator_protocol_version_major = mib_scalar((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 1, 9), unsigned32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
cMTInitiatorProtocolVersionMajor.setStatus('current')
if mibBuilder.loadTexts:
cMTInitiatorProtocolVersionMajor.setDescription('This object indicates the major version number of Mediatrace protocol.')
c_mt_initiator_protocol_version_minor = mib_scalar((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 1, 10), unsigned32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
cMTInitiatorProtocolVersionMinor.setStatus('current')
if mibBuilder.loadTexts:
cMTInitiatorProtocolVersionMinor.setDescription('This object indicates the minor version number of Mediatrace protocol.')
c_mt_initiator_configured_sessions = mib_scalar((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 1, 11), gauge32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
cMTInitiatorConfiguredSessions.setStatus('current')
if mibBuilder.loadTexts:
cMTInitiatorConfiguredSessions.setDescription('This object indicates number of mediatrace sessions configured. The session may or may not be active.')
c_mt_initiator_pending_sessions = mib_scalar((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 1, 12), gauge32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
cMTInitiatorPendingSessions.setStatus('current')
if mibBuilder.loadTexts:
cMTInitiatorPendingSessions.setDescription('This object indicates the current number of sessions in pending state on the initiator.')
c_mt_initiator_inactive_sessions = mib_scalar((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 1, 13), gauge32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
cMTInitiatorInactiveSessions.setStatus('current')
if mibBuilder.loadTexts:
cMTInitiatorInactiveSessions.setDescription('This object indicates the current number of sessions in inactive state on the initiator.')
c_mt_initiator_active_sessions = mib_scalar((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 1, 14), gauge32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
cMTInitiatorActiveSessions.setStatus('current')
if mibBuilder.loadTexts:
cMTInitiatorActiveSessions.setDescription('This object indicates the current number of sessions in active state on the initiator.')
c_mt_responder_enable = mib_scalar((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 1, 15), truth_value()).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
cMTResponderEnable.setStatus('current')
if mibBuilder.loadTexts:
cMTResponderEnable.setDescription("This object specifies the whether the Mediatrace responder is enabled. If set to 'true' the responder will be enabled. If set to false then mediatrace responder process will be stopped and the device will no longer be discovered as mediatrace capable hop along the flow path.")
c_mt_responder_max_sessions = mib_scalar((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 1, 16), unsigned32()).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
cMTResponderMaxSessions.setStatus('current')
if mibBuilder.loadTexts:
cMTResponderMaxSessions.setDescription('This object specifies the maximum number of sessions that a responder can accept from initiator.')
c_mt_responder_active_sessions = mib_scalar((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 1, 17), gauge32()).setUnits('sessions').setMaxAccess('readonly')
if mibBuilder.loadTexts:
cMTResponderActiveSessions.setStatus('current')
if mibBuilder.loadTexts:
cMTResponderActiveSessions.setDescription('This object indicates the current number of sessions that are in active state on the responder.')
c_mt_flow_specifier_table = mib_table((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 1, 18))
if mibBuilder.loadTexts:
cMTFlowSpecifierTable.setStatus('current')
if mibBuilder.loadTexts:
cMTFlowSpecifierTable.setDescription('This table lists the flow specifiers contained by the device.')
c_mt_flow_specifier_entry = mib_table_row((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 1, 18, 1)).setIndexNames((0, 'CISCO-MEDIATRACE-MIB', 'cMTFlowSpecifierName'))
if mibBuilder.loadTexts:
cMTFlowSpecifierEntry.setStatus('current')
if mibBuilder.loadTexts:
cMTFlowSpecifierEntry.setDescription("An entry represents a flow specifier which can be associated with a Mediatrace session contained by the cMTSessionTable. Each entry is uniquely identified by name specified by cMTFlowSpecifierName object. A row created in this table will be shown in 'show running' command and it will not be saved into non-volatile memory.")
c_mt_flow_specifier_name = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 1, 18, 1, 1), snmp_admin_string())
if mibBuilder.loadTexts:
cMTFlowSpecifierName.setStatus('current')
if mibBuilder.loadTexts:
cMTFlowSpecifierName.setDescription('A unique identifier for the flow specifier.')
c_mt_flow_specifier_row_status = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 1, 18, 1, 2), row_status()).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
cMTFlowSpecifierRowStatus.setStatus('current')
if mibBuilder.loadTexts:
cMTFlowSpecifierRowStatus.setDescription("This object specifies the status of the flow specifier. Only CreateAndGo and active status is supported. The following columns must be valid before activating the flow specifier: - cMTFlowSpecifierDestAddrType and cMTFlowSpecifierDestAddr OR - cMTFlowSpecifierMetadataGlobalId All other objects can assume default values. Once the flow specifier is activated no column can be modified. Setting this object to 'delete' will destroy the flow specifier. The flow specifier can be deleted only if it is not attached to any session.")
c_mt_flow_specifier_metadata_global_id = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 1, 18, 1, 3), snmp_admin_string()).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
cMTFlowSpecifierMetadataGlobalId.setStatus('current')
if mibBuilder.loadTexts:
cMTFlowSpecifierMetadataGlobalId.setDescription('This object specifies the meta-data Global ID of the flow specifier. Maximum of 24 characters can be specified for this field.')
c_mt_flow_specifier_dest_addr_type = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 1, 18, 1, 4), inet_address_type()).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
cMTFlowSpecifierDestAddrType.setStatus('current')
if mibBuilder.loadTexts:
cMTFlowSpecifierDestAddrType.setDescription('This object specifies the type of IP address specified by the corresponding instance of cMTFlowSpecifierDestAddr.')
c_mt_flow_specifier_dest_addr = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 1, 18, 1, 5), inet_address()).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
cMTFlowSpecifierDestAddr.setStatus('current')
if mibBuilder.loadTexts:
cMTFlowSpecifierDestAddr.setDescription('Address of the destination of the flow to be monitored.')
c_mt_flow_specifier_dest_port = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 1, 18, 1, 6), inet_port_number()).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
cMTFlowSpecifierDestPort.setStatus('current')
if mibBuilder.loadTexts:
cMTFlowSpecifierDestPort.setDescription('This object specifies the destination port for the flow.')
c_mt_flow_specifier_source_addr_type = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 1, 18, 1, 7), inet_address_type()).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
cMTFlowSpecifierSourceAddrType.setStatus('current')
if mibBuilder.loadTexts:
cMTFlowSpecifierSourceAddrType.setDescription('This object specifies the type of IP address specified by the corresponding instance of cMTFlowSpecifierSourceAddr.')
c_mt_flow_specifier_source_addr = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 1, 18, 1, 8), inet_address()).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
cMTFlowSpecifierSourceAddr.setStatus('current')
if mibBuilder.loadTexts:
cMTFlowSpecifierSourceAddr.setDescription('This object specifies the source address for the flow to be monitored.')
c_mt_flow_specifier_source_port = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 1, 18, 1, 9), inet_port_number()).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
cMTFlowSpecifierSourcePort.setStatus('current')
if mibBuilder.loadTexts:
cMTFlowSpecifierSourcePort.setDescription('This object specifies the source port for the flow.')
c_mt_flow_specifier_ip_protocol = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 1, 18, 1, 10), cisco_mediatrace_support_protocol().clone('udp')).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
cMTFlowSpecifierIpProtocol.setStatus('current')
if mibBuilder.loadTexts:
cMTFlowSpecifierIpProtocol.setDescription('This is transport protocol type for the flow. Flow of this type between specified source and and destination will be monitored.')
c_mt_path_specifier_table = mib_table((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 1, 19))
if mibBuilder.loadTexts:
cMTPathSpecifierTable.setStatus('current')
if mibBuilder.loadTexts:
cMTPathSpecifierTable.setDescription('This table lists the path specifiers contained by the device.')
c_mt_path_specifier_entry = mib_table_row((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 1, 19, 1)).setIndexNames((0, 'CISCO-MEDIATRACE-MIB', 'cMTPathSpecifierName'))
if mibBuilder.loadTexts:
cMTPathSpecifierEntry.setStatus('current')
if mibBuilder.loadTexts:
cMTPathSpecifierEntry.setDescription("This entry defines path specifier that can be used in mediatrace session. Each entry is uniquely identified by name specified by cMTPathSpecifierName object. A row created in this table will be shown in 'show running' command and it will not be saved into non-volatile memory.")
c_mt_path_specifier_name = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 1, 19, 1, 1), snmp_admin_string())
if mibBuilder.loadTexts:
cMTPathSpecifierName.setStatus('current')
if mibBuilder.loadTexts:
cMTPathSpecifierName.setDescription('A unique identifier for the path specifier.')
c_mt_path_specifier_row_status = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 1, 19, 1, 2), row_status()).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
cMTPathSpecifierRowStatus.setStatus('current')
if mibBuilder.loadTexts:
cMTPathSpecifierRowStatus.setDescription("This object specifies the status of the path specifier. Only CreateAndGo and active status is supported. The following columns must be valid before activating the path specifier: - cMTPathSpecifierDestAddrType and cMTPathSpecifierDestAddr OR - cMTPathSpecifierMetadataGlobalId All other objects can assume default values. Once the path specifier is activated no column can be modified. Setting this object to 'delete' will destroy the path specifier. The path specifier can be deleted only if it is not attached to any session.")
c_mt_path_specifier_metadata_global_id = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 1, 19, 1, 3), snmp_admin_string()).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
cMTPathSpecifierMetadataGlobalId.setStatus('current')
if mibBuilder.loadTexts:
cMTPathSpecifierMetadataGlobalId.setDescription('Metadata global session id can be used as path specifier. This object should be populated when this is desired. Mediatrace software will query the Metadata database for five tuple to be used for establishing the path.')
c_mt_path_specifier_dest_addr_type = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 1, 19, 1, 4), inet_address_type()).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
cMTPathSpecifierDestAddrType.setStatus('current')
if mibBuilder.loadTexts:
cMTPathSpecifierDestAddrType.setDescription('This object specifies the type of IP address specified by the corresponding instance of cMTPathSpecifierDestAddr.')
c_mt_path_specifier_dest_addr = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 1, 19, 1, 5), inet_address()).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
cMTPathSpecifierDestAddr.setStatus('current')
if mibBuilder.loadTexts:
cMTPathSpecifierDestAddr.setDescription('This object specifies the destination address for the path specifier.')
c_mt_path_specifier_dest_port = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 1, 19, 1, 6), inet_port_number()).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
cMTPathSpecifierDestPort.setStatus('current')
if mibBuilder.loadTexts:
cMTPathSpecifierDestPort.setDescription('This object specifies the destination port for the path specifier.')
c_mt_path_specifier_source_addr_type = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 1, 19, 1, 7), inet_address_type()).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
cMTPathSpecifierSourceAddrType.setStatus('current')
if mibBuilder.loadTexts:
cMTPathSpecifierSourceAddrType.setDescription('This object specifies the type of IP address specified by the corresponding instance of cMTFlowSpecifierSourceAddr.')
c_mt_path_specifier_source_addr = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 1, 19, 1, 8), inet_address()).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
cMTPathSpecifierSourceAddr.setStatus('current')
if mibBuilder.loadTexts:
cMTPathSpecifierSourceAddr.setDescription('This object specifies the source address for the path specifier.')
c_mt_path_specifier_source_port = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 1, 19, 1, 9), inet_port_number()).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
cMTPathSpecifierSourcePort.setStatus('current')
if mibBuilder.loadTexts:
cMTPathSpecifierSourcePort.setDescription('This object specifies the source port for the path specifier.')
c_mt_path_specifier_protocol_for_discovery = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 1, 19, 1, 10), cisco_mediatrace_discovery_protocol().clone('rsvp')).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
cMTPathSpecifierProtocolForDiscovery.setStatus('current')
if mibBuilder.loadTexts:
cMTPathSpecifierProtocolForDiscovery.setDescription('This object specifies the protocol used for path discovery on Mediatrace. Currently, only RSVP is used by default.')
c_mt_path_specifier_gateway_addr_type = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 1, 19, 1, 11), inet_address_type()).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
cMTPathSpecifierGatewayAddrType.setStatus('current')
if mibBuilder.loadTexts:
cMTPathSpecifierGatewayAddrType.setDescription('This object specifies the type of IP address specified by the corresponding instance of cMTPathSpecifierGatewayAddr.')
c_mt_path_specifier_gateway_addr = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 1, 19, 1, 12), inet_address()).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
cMTPathSpecifierGatewayAddr.setStatus('current')
if mibBuilder.loadTexts:
cMTPathSpecifierGatewayAddr.setDescription('When the mediatrace session is originated on layer-2 switch the address of gateway is required to establish the session. This object specifies address of this gateway.')
c_mt_path_specifier_gateway_vlan_id = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 1, 19, 1, 13), vlan_id().subtype(subtypeSpec=value_range_constraint(1, 4094))).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
cMTPathSpecifierGatewayVlanId.setStatus('current')
if mibBuilder.loadTexts:
cMTPathSpecifierGatewayVlanId.setDescription('This object specifies the Vlan ID associated with the gateway for path specifier.')
c_mt_path_specifier_ip_protocol = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 1, 19, 1, 14), cisco_mediatrace_support_protocol().clone('udp')).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
cMTPathSpecifierIpProtocol.setStatus('current')
if mibBuilder.loadTexts:
cMTPathSpecifierIpProtocol.setDescription('This object specifies which metrics are monitored for a path specifier. Currently, only TCP and UDP are supported.')
c_mt_session_params_table = mib_table((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 1, 20))
if mibBuilder.loadTexts:
cMTSessionParamsTable.setStatus('current')
if mibBuilder.loadTexts:
cMTSessionParamsTable.setDescription('This table is collection of session parameter profiles.')
c_mt_session_params_entry = mib_table_row((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 1, 20, 1)).setIndexNames((0, 'CISCO-MEDIATRACE-MIB', 'cMTSessionParamsName'))
if mibBuilder.loadTexts:
cMTSessionParamsEntry.setStatus('current')
if mibBuilder.loadTexts:
cMTSessionParamsEntry.setDescription("An entry represents session parameters that can be associated with a Mediatrace session contained by the cMTSessionTable. Each entry is uniquely identified by name specified by cMTSessionParamsName object. A row created in this table will be shown in 'show running' command and it will not be saved into non-volatile memory.")
c_mt_session_params_name = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 1, 20, 1, 1), snmp_admin_string())
if mibBuilder.loadTexts:
cMTSessionParamsName.setStatus('current')
if mibBuilder.loadTexts:
cMTSessionParamsName.setDescription('This object specifies the name of this set of session parameters.')
c_mt_session_params_row_status = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 1, 20, 1, 2), row_status()).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
cMTSessionParamsRowStatus.setStatus('current')
if mibBuilder.loadTexts:
cMTSessionParamsRowStatus.setDescription("This object specifies the status of the session parameters. Only CreateAndGo and active status is supported. In order for this object to become active cMTSessionParamsName must be defined. The value of cMTSessionParamsInactivityTimeout needs to be at least 3 times of the value of cMTSessionParamsFrequency. All other objects assume the default value. Once the session parameters is activated no column can be modified. Setting this object to 'delete' will destroy the session parameters. The session parameters can be deleted only if it is not attached to any session.")
c_mt_session_params_response_timeout = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 1, 20, 1, 3), unsigned32().subtype(subtypeSpec=value_range_constraint(1, 65535))).setUnits('seconds').setMaxAccess('readcreate')
if mibBuilder.loadTexts:
cMTSessionParamsResponseTimeout.setStatus('current')
if mibBuilder.loadTexts:
cMTSessionParamsResponseTimeout.setDescription('This object specifies the amount of time a session should wait for the responses after sending out a Mediatrace request. The initiator will discard any responses to a particular request after this timeout.')
c_mt_session_params_frequency = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 1, 20, 1, 4), unsigned32().subtype(subtypeSpec=value_range_constraint(10, 3600)).clone(120)).setUnits('seconds').setMaxAccess('readcreate')
if mibBuilder.loadTexts:
cMTSessionParamsFrequency.setStatus('current')
if mibBuilder.loadTexts:
cMTSessionParamsFrequency.setDescription('Duration between two successive data fetch requests.')
c_mt_session_params_inactivity_timeout = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 1, 20, 1, 5), unsigned32().subtype(subtypeSpec=value_range_constraint(1, 10800))).setUnits('sconds').setMaxAccess('readcreate')
if mibBuilder.loadTexts:
cMTSessionParamsInactivityTimeout.setStatus('current')
if mibBuilder.loadTexts:
cMTSessionParamsInactivityTimeout.setDescription('This object specifies the interval that the responder wait without any requests from the initiator before removing a particular session. The inactivity timeout needs to be at least 3 times of the session frequency.')
c_mt_session_params_history_buckets = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 1, 20, 1, 6), unsigned32().subtype(subtypeSpec=value_range_constraint(1, 10)).clone(3)).setUnits('buckets').setMaxAccess('readcreate')
if mibBuilder.loadTexts:
cMTSessionParamsHistoryBuckets.setStatus('current')
if mibBuilder.loadTexts:
cMTSessionParamsHistoryBuckets.setDescription('This object specifies the number of buckets of statistics retained. Each bucket will contain complete set of metrics collected for all hops in one iteration.')
c_mt_session_params_route_change_reactiontime = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 1, 20, 1, 7), unsigned32().subtype(subtypeSpec=value_range_constraint(0, 60))).setUnits('seconds').setMaxAccess('readcreate')
if mibBuilder.loadTexts:
cMTSessionParamsRouteChangeReactiontime.setStatus('current')
if mibBuilder.loadTexts:
cMTSessionParamsRouteChangeReactiontime.setDescription('This object specifies the amount of time the initiator should wait after receiving the first route change, before reacting to further route change notifications. Range is from 0 to 60.')
c_mt_media_monitor_profile_table = mib_table((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 1, 21))
if mibBuilder.loadTexts:
cMTMediaMonitorProfileTable.setStatus('current')
if mibBuilder.loadTexts:
cMTMediaMonitorProfileTable.setDescription('This table lists the media monitor profiles configured on the device.')
c_mt_media_monitor_profile_entry = mib_table_row((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 1, 21, 1)).setIndexNames((0, 'CISCO-MEDIATRACE-MIB', 'cMTMediaMonitorProfileName'))
if mibBuilder.loadTexts:
cMTMediaMonitorProfileEntry.setStatus('current')
if mibBuilder.loadTexts:
cMTMediaMonitorProfileEntry.setDescription("An entry represents a media monitor profile that can be associated with a Mediatrace session contained by the cMTSessionTable. The entry is uniquely identified by cMTMediaMonitorProfileName. A row created in this table will be shown in 'show running' command and it will not be saved into non-volatile memory.")
c_mt_media_monitor_profile_name = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 1, 21, 1, 1), snmp_admin_string())
if mibBuilder.loadTexts:
cMTMediaMonitorProfileName.setStatus('current')
if mibBuilder.loadTexts:
cMTMediaMonitorProfileName.setDescription('This object specifies the name of the Mediatrace media monitor profile.')
c_mt_media_monitor_profile_row_status = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 1, 21, 1, 2), row_status()).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
cMTMediaMonitorProfileRowStatus.setStatus('current')
if mibBuilder.loadTexts:
cMTMediaMonitorProfileRowStatus.setDescription("This object specifies the status of the media monitor profile. Only CreateAndGo and active status is supported. In order for this object to become active cMTMediaMonitorProfileName must be defined. All other objects assume the default value. Once the media monitor profile is activated no column can be modified. Setting this object to 'delete' will destroy the media monitor. The media monitor profile can be deleted only if it is not attached to any session.")
c_mt_media_monitor_profile_metric = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 1, 21, 1, 3), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2))).clone(namedValues=named_values(('rtp', 1), ('tcp', 2)))).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
cMTMediaMonitorProfileMetric.setStatus('current')
if mibBuilder.loadTexts:
cMTMediaMonitorProfileMetric.setDescription("This object specifies the type of metrics group to be collected in addition to basic IP metrics. Specify value as RTP if metrics from 'Metric-List RTP' are desired and 'TCP' if metrics in 'Metric-List TCP' is desired.")
c_mt_media_monitor_profile_interval = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 1, 21, 1, 4), unsigned32().subtype(subtypeSpec=value_range_constraint(10, 120))).setUnits('seconds').setMaxAccess('readcreate')
if mibBuilder.loadTexts:
cMTMediaMonitorProfileInterval.setStatus('current')
if mibBuilder.loadTexts:
cMTMediaMonitorProfileInterval.setDescription('This object specifies the sampling interval for the media monitor profile.')
c_mt_media_monitor_profile_rtp_max_dropout = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 1, 21, 1, 5), unsigned32().subtype(subtypeSpec=value_range_constraint(1, 20)).clone(10)).setUnits('packets').setMaxAccess('readcreate')
if mibBuilder.loadTexts:
cMTMediaMonitorProfileRtpMaxDropout.setStatus('current')
if mibBuilder.loadTexts:
cMTMediaMonitorProfileRtpMaxDropout.setDescription('This object specifies the maximum number of dropouts allowed when sampling RTP monitoring metrics.')
c_mt_media_monitor_profile_rtp_max_reorder = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 1, 21, 1, 6), unsigned32().subtype(subtypeSpec=value_range_constraint(1, 20)).clone(5)).setUnits('packets').setMaxAccess('readcreate')
if mibBuilder.loadTexts:
cMTMediaMonitorProfileRtpMaxReorder.setStatus('current')
if mibBuilder.loadTexts:
cMTMediaMonitorProfileRtpMaxReorder.setDescription('This object specifies the maximum number of reorders allowed when sampling RTP monitoring metrics.')
c_mt_media_monitor_profile_rtp_minimal_sequential = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 1, 21, 1, 7), unsigned32().subtype(subtypeSpec=value_range_constraint(2, 10))).setUnits('packets').setMaxAccess('readcreate')
if mibBuilder.loadTexts:
cMTMediaMonitorProfileRtpMinimalSequential.setStatus('current')
if mibBuilder.loadTexts:
cMTMediaMonitorProfileRtpMinimalSequential.setDescription('This object specifies the minimum number of sequental packets required to identify a stream as being an RTP flow.')
c_mt_system_profile_table = mib_table((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 1, 22))
if mibBuilder.loadTexts:
cMTSystemProfileTable.setStatus('current')
if mibBuilder.loadTexts:
cMTSystemProfileTable.setDescription('This table lists the system profiles configured on the device.')
c_mt_system_profile_entry = mib_table_row((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 1, 22, 1)).setIndexNames((0, 'CISCO-MEDIATRACE-MIB', 'cMTSystemProfileName'))
if mibBuilder.loadTexts:
cMTSystemProfileEntry.setStatus('current')
if mibBuilder.loadTexts:
cMTSystemProfileEntry.setDescription("An entry represents a system profile that can be associated with a Mediatrace session contained by the cMTSessionTable. Each entry is uniquely identified by name specified by cMTSystemProfileName object. A row created in this table will be shown in 'show running' command and it will not be saved into non-volatile memory.")
c_mt_system_profile_name = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 1, 22, 1, 1), snmp_admin_string())
if mibBuilder.loadTexts:
cMTSystemProfileName.setStatus('current')
if mibBuilder.loadTexts:
cMTSystemProfileName.setDescription('This object specifies the name of the Mediatrace system profile.')
c_mt_system_profile_row_status = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 1, 22, 1, 2), row_status()).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
cMTSystemProfileRowStatus.setStatus('current')
if mibBuilder.loadTexts:
cMTSystemProfileRowStatus.setDescription("This object specifies the status of the system profile. Only CreateAndGo and active status is supported. In order for this object to become active cMTSystemProfileName must be defined. All other objects assume the default value. Once the system profile is activated no column can be modified. Setting this object to 'delete' will destroy the system profile. The system prifile can be deleted only if it is not attached to any session.")
c_mt_system_profile_metric = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 1, 22, 1, 3), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3))).clone(namedValues=named_values(('interface', 1), ('cpu', 2), ('memory', 3)))).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
cMTSystemProfileMetric.setStatus('current')
if mibBuilder.loadTexts:
cMTSystemProfileMetric.setDescription("This object specifies the type of metrics group to be collected in addition to basic IP metrics. Specify 'interface' if metrics from 'Metric-List-Interface' are desired. Specify 'cpu' if metrics in 'Metric-List-CPU' is desired. Specify 'memory' if metrics in 'Metric-List-Memory' is desired.")
c_mt_session_table = mib_table((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 1, 23))
if mibBuilder.loadTexts:
cMTSessionTable.setStatus('current')
if mibBuilder.loadTexts:
cMTSessionTable.setDescription('This table lists the Mediatrace sessions configured on the device.')
c_mt_session_entry = mib_table_row((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 1, 23, 1)).setIndexNames((0, 'CISCO-MEDIATRACE-MIB', 'cMTSessionNumber'))
if mibBuilder.loadTexts:
cMTSessionEntry.setReference('An entry in cMTSessionTable')
if mibBuilder.loadTexts:
cMTSessionEntry.setStatus('current')
if mibBuilder.loadTexts:
cMTSessionEntry.setDescription("A list of objects that define specific configuration for the session of Mediatrace. The entry is uniquely identified by cMTSessionNumber. A row created in this table will be shown in 'show running' command and it will not be saved into non-volatile memory.")
c_mt_session_number = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 1, 23, 1, 2), unsigned32().subtype(subtypeSpec=value_range_constraint(1, 2147483647)))
if mibBuilder.loadTexts:
cMTSessionNumber.setStatus('current')
if mibBuilder.loadTexts:
cMTSessionNumber.setDescription('This object specifies an arbitrary integer-value that uniquely identifies a Mediatrace session.')
c_mt_session_row_status = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 1, 23, 1, 3), row_status()).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
cMTSessionRowStatus.setStatus('current')
if mibBuilder.loadTexts:
cMTSessionRowStatus.setDescription("This object indicates the status of Mediatrace session. Only CreateAndGo and active status is supported. Following columns must be specified in order to activate the session: - cMTSessionPathSpecifierName - cMTSessionProfileName All other objects can assume default values. None of the properties of session can be modified once it is in 'active' state. Setting the value of 'destroy' for this object will delete the session. The session can be deleted only if the corresponding schedule (row in cMTScheduleTable ) not exist.")
c_mt_session_path_specifier_name = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 1, 23, 1, 4), snmp_admin_string()).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
cMTSessionPathSpecifierName.setStatus('current')
if mibBuilder.loadTexts:
cMTSessionPathSpecifierName.setDescription('This object specifies the name of the Mediatrace path specifier profile associated with the session.')
c_mt_session_param_name = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 1, 23, 1, 5), snmp_admin_string()).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
cMTSessionParamName.setStatus('current')
if mibBuilder.loadTexts:
cMTSessionParamName.setDescription('This object specifies the name of Mediatrace session parameter associated with the session.')
c_mt_session_profile_name = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 1, 23, 1, 6), snmp_admin_string()).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
cMTSessionProfileName.setStatus('current')
if mibBuilder.loadTexts:
cMTSessionProfileName.setDescription('This object specifies the name of the Mediatrace metric profile associated with the session.')
c_mt_session_flow_specifier_name = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 1, 23, 1, 7), snmp_admin_string()).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
cMTSessionFlowSpecifierName.setStatus('current')
if mibBuilder.loadTexts:
cMTSessionFlowSpecifierName.setDescription('This object specifies the name of the Mediatrace flow specifier profile associated with the session. Flow specifier is not required if system profile is attached to the session. In this case, media monitor profile is attached to the session. Flow specifier is optional and the 5-tuple from the path-specifier is used instead.')
c_mt_session_trace_route_enabled = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 1, 23, 1, 8), truth_value()).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
cMTSessionTraceRouteEnabled.setStatus('current')
if mibBuilder.loadTexts:
cMTSessionTraceRouteEnabled.setDescription('This object specifies if traceroute is enabled for this session.')
c_mt_schedule_table = mib_table((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 1, 24))
if mibBuilder.loadTexts:
cMTScheduleTable.setStatus('current')
if mibBuilder.loadTexts:
cMTScheduleTable.setDescription('A table of Mediatrace scheduling specific definitions. Each entry in this table schedules a cMTSessionEntry created via the cMTSessionTable object.')
c_mt_schedule_entry = mib_table_row((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 1, 24, 1)).setIndexNames((0, 'CISCO-MEDIATRACE-MIB', 'cMTSessionNumber'))
if mibBuilder.loadTexts:
cMTScheduleEntry.setReference('An entry in cMTScheduleTable')
if mibBuilder.loadTexts:
cMTScheduleEntry.setStatus('current')
if mibBuilder.loadTexts:
cMTScheduleEntry.setDescription("A list of objects that define specific configuration for the scheduling of Mediatrace operations. A row is created when a session is scheduled to make it active. Likewise, a row is destroyed when the session is unscheduled. A row created in this table will be shown in 'show running' command and it will not be saved into non-volatile memory.")
c_mt_schedule_row_status = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 1, 24, 1, 1), row_status()).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
cMTScheduleRowStatus.setStatus('current')
if mibBuilder.loadTexts:
cMTScheduleRowStatus.setDescription("This objects specifies the status of Mediatrace session schedule. Only CreateAndGo and destroy operations are permitted on the row. All objects can assume default values. The schedule start time (column cMTScheduleStartTime) must be specified in order to activate the schedule. Once activated none of the properties of the schedule can be changed. The schedule can be destroyed any time by setting the value of this object to 'destroy'. Destroying the schedule will stop the Mediatrace session but the session will not be destroyed.")
c_mt_schedule_start_time = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 1, 24, 1, 2), time_stamp()).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
cMTScheduleStartTime.setStatus('current')
if mibBuilder.loadTexts:
cMTScheduleStartTime.setDescription('This object specifies the start time of the scheduled session.')
c_mt_schedule_life = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 1, 24, 1, 3), unsigned32().subtype(subtypeSpec=value_range_constraint(0, 2147483647)).clone(3600)).setUnits('seconds').setMaxAccess('readcreate')
if mibBuilder.loadTexts:
cMTScheduleLife.setStatus('current')
if mibBuilder.loadTexts:
cMTScheduleLife.setDescription('This object specifies the duration of the session in seconds.')
c_mt_schedule_entry_ageout = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 1, 24, 1, 4), unsigned32().subtype(subtypeSpec=value_range_constraint(0, 2073600)).clone(3600)).setUnits('seconds').setMaxAccess('readcreate')
if mibBuilder.loadTexts:
cMTScheduleEntryAgeout.setStatus('current')
if mibBuilder.loadTexts:
cMTScheduleEntryAgeout.setDescription('This object specifies the amount of time after which mediatrace session entry will be removed once the life of session is over and session is inactive.')
c_mt_schedule_recurring = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 1, 24, 1, 5), truth_value()).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
cMTScheduleRecurring.setStatus('current')
if mibBuilder.loadTexts:
cMTScheduleRecurring.setDescription('This object specifies whether the schedule is recurring schedule. This object can be used when a periodic session is to be executed everyday at certain time and for certain life.')
c_mt_path_table = mib_table((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 2, 1))
if mibBuilder.loadTexts:
cMTPathTable.setStatus('current')
if mibBuilder.loadTexts:
cMTPathTable.setDescription('List of paths discovered by a mediatrace session.')
c_mt_path_entry = mib_table_row((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 2, 1, 1)).setIndexNames((0, 'CISCO-MEDIATRACE-MIB', 'cMTSessionNumber'), (0, 'CISCO-MEDIATRACE-MIB', 'cMTSessionLifeNumber'), (0, 'CISCO-MEDIATRACE-MIB', 'cMTBucketNumber'), (0, 'CISCO-MEDIATRACE-MIB', 'cMTPathHopNumber'))
if mibBuilder.loadTexts:
cMTPathEntry.setStatus('current')
if mibBuilder.loadTexts:
cMTPathEntry.setDescription('An entry in cMTPathTable represents a Mediatrace path discovered by a session. This table contains information about the hops (Mediatrace or non-Mediatrace) discovered during a specific request. The Path table is used to find the hop address (Address type - IPv4 or IPv6 and Address) and hop type (currently Mediatrace or Traceroute) to use as index for other statistics tables. A row is created when a Mediatrace scheduled session discovers a path to the specified destination during a request. Likewise, a row is destroyed when the path is no longer avilable. A single row corresponds to a Mediatrace path discovered for a session and is uniquely identified by cMTSessionNumber, cMTSessionLifeNumber, cMTBucketNumber and cMTPathHopNumber. The created rows are destroyed when the device undergoes a restart.')
c_mt_session_life_number = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 2, 1, 1, 1), unsigned32().subtype(subtypeSpec=value_range_constraint(0, 2)))
if mibBuilder.loadTexts:
cMTSessionLifeNumber.setStatus('current')
if mibBuilder.loadTexts:
cMTSessionLifeNumber.setDescription('This object specifies a life for a conceptual statistics row. For a particular value of cMTSessionLifeNumber, the agent assigns the first value of 0 to the current (latest) life, with 1 being the next latest and so on. The sequence keeps incrementing, despite older (lower) values being removed from the table.')
c_mt_bucket_number = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 2, 1, 1, 2), unsigned32().subtype(subtypeSpec=value_range_constraint(0, 10)))
if mibBuilder.loadTexts:
cMTBucketNumber.setStatus('current')
if mibBuilder.loadTexts:
cMTBucketNumber.setDescription('This object is index of the list of statistics buckets stored. A statistics bucket corresponds to data collected from each hop in one run of the periodic mediatrace session. Bucket with Index value of 0 is the bucket for latest completed run. Index 1 is one run prior to latest completed run, index 2 is two runs prior to latest completed run, and so on.')
c_mt_path_hop_number = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 2, 1, 1, 3), unsigned32().subtype(subtypeSpec=value_range_constraint(0, 255)))
if mibBuilder.loadTexts:
cMTPathHopNumber.setStatus('current')
if mibBuilder.loadTexts:
cMTPathHopNumber.setDescription('This object specifies the hop number for a Mediatrace Path. This hop can be either Mediatrace or Non-Mediatrace node. The hop number is relative to the initiator with 0 being used to identify initiator itself, 1 for next farther node, etc. This hop number is always unique i.e., two hops cannot have same hop number.')
c_mt_path_hop_addr_type = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 2, 1, 1, 4), inet_address_type()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
cMTPathHopAddrType.setStatus('current')
if mibBuilder.loadTexts:
cMTPathHopAddrType.setDescription('This object specifies the type of IP address specified by the corresponding instance of cMTPathHopAddrType.')
c_mt_path_hop_addr = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 2, 1, 1, 5), inet_address()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
cMTPathHopAddr.setStatus('current')
if mibBuilder.loadTexts:
cMTPathHopAddr.setDescription('This object indicates IP Address type of the hop on a Mediatrace Path.')
c_mt_path_hop_type = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 2, 1, 1, 6), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2))).clone(namedValues=named_values(('mediatrace', 1), ('traceroute', 2)))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
cMTPathHopType.setStatus('current')
if mibBuilder.loadTexts:
cMTPathHopType.setDescription("This object indicates the type of the hop on a Mediatrace path. Currently, only two types are present - mediatrace(1) and traceroute(2). A hop is of type 'mediatrace' if it is discovered by only mediatrace or by both mediatrace and trace-route. The hop is 'trace route' if it is discovered by trace route only.")
c_mt_path_hop_alternate1_addr_type = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 2, 1, 1, 7), inet_address_type()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
cMTPathHopAlternate1AddrType.setStatus('current')
if mibBuilder.loadTexts:
cMTPathHopAlternate1AddrType.setDescription('This object specifies the type of IP address specified by the corresponding instance of cMTPathHopAlternate1AddrType.')
c_mt_path_hop_alternate1_addr = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 2, 1, 1, 8), inet_address()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
cMTPathHopAlternate1Addr.setStatus('current')
if mibBuilder.loadTexts:
cMTPathHopAlternate1Addr.setDescription('This object indicates the IP Address of the first alternate hop on a traceroute path.')
c_mt_path_hop_alternate2_addr_type = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 2, 1, 1, 9), inet_address_type()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
cMTPathHopAlternate2AddrType.setStatus('current')
if mibBuilder.loadTexts:
cMTPathHopAlternate2AddrType.setDescription('This object specifies the type of IP address specified by the corresponding instance of cMTPathHopAlternate2AddrType.')
c_mt_path_hop_alternate2_addr = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 2, 1, 1, 10), inet_address()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
cMTPathHopAlternate2Addr.setStatus('current')
if mibBuilder.loadTexts:
cMTPathHopAlternate2Addr.setDescription('This object indicates the IP Address of the second alternate hop on a traceroute path.')
c_mt_path_hop_alternate3_addr_type = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 2, 1, 1, 11), inet_address_type()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
cMTPathHopAlternate3AddrType.setStatus('current')
if mibBuilder.loadTexts:
cMTPathHopAlternate3AddrType.setDescription('This object specifies the type of IP address specified by the corresponding instance of cMTPathHopAlternate3AddrType.')
c_mt_path_hop_alternate3_addr = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 2, 1, 1, 12), inet_address()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
cMTPathHopAlternate3Addr.setStatus('current')
if mibBuilder.loadTexts:
cMTPathHopAlternate3Addr.setDescription('This object indicates the IP Address of the third alternate hop on a traceroute path.')
c_mt_hop_stats_table = mib_table((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 2, 2))
if mibBuilder.loadTexts:
cMTHopStatsTable.setStatus('current')
if mibBuilder.loadTexts:
cMTHopStatsTable.setDescription('An entry in cMTHopStatsTable represents a hop on the path associated to a Mediatrace session. This table contains information about particular hop (Mediatrace or non-Mediatrace) such as the address, type of hop, etc. A single row corresponds to a hop on the Mediatrace path discovered for a session and is uniquely identified by cMTSessionNumber, cMTSessionLifeNumber, cMTBucketNumber,cMTHopStatsAddrType and cMTHopStatsAddr. The created rows are destroyed when the device undergoes a restart.')
c_mt_hop_stats_entry = mib_table_row((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 2, 2, 1)).setIndexNames((0, 'CISCO-MEDIATRACE-MIB', 'cMTSessionNumber'), (0, 'CISCO-MEDIATRACE-MIB', 'cMTSessionLifeNumber'), (0, 'CISCO-MEDIATRACE-MIB', 'cMTBucketNumber'), (0, 'CISCO-MEDIATRACE-MIB', 'cMTHopStatsAddrType'), (0, 'CISCO-MEDIATRACE-MIB', 'cMTHopStatsAddr'))
if mibBuilder.loadTexts:
cMTHopStatsEntry.setStatus('current')
if mibBuilder.loadTexts:
cMTHopStatsEntry.setDescription('An entry in cMTHopStatsTable')
c_mt_hop_stats_mask_bitmaps = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 2, 2, 1, 1), bits().clone(namedValues=named_values(('mediatraceTtlUnsupported', 0), ('mediatraceTtlUncollected', 1), ('collectionStatsUnsupported', 2), ('collectionStatsUncollected', 3), ('ingressInterfaceUnsupported', 4), ('ingressInterfaceUncollected', 5), ('egressInterfaceUnsupported', 6), ('egressInterfaceUncollected', 7)))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
cMTHopStatsMaskBitmaps.setStatus('current')
if mibBuilder.loadTexts:
cMTHopStatsMaskBitmaps.setDescription('This object indicates whether the corresponding instances of these statistics fields in the table are supported. It also indicates if the statistics data are collected. There are 2 bits for each corresponding field.')
c_mt_hop_stats_addr_type = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 2, 2, 1, 2), inet_address_type())
if mibBuilder.loadTexts:
cMTHopStatsAddrType.setStatus('current')
if mibBuilder.loadTexts:
cMTHopStatsAddrType.setDescription('This object specifies the type of IP address specified by the corresponding instance of cMTHopStatsAddr.')
c_mt_hop_stats_addr = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 2, 2, 1, 3), inet_address())
if mibBuilder.loadTexts:
cMTHopStatsAddr.setStatus('current')
if mibBuilder.loadTexts:
cMTHopStatsAddr.setDescription('This object specifies the IP Address of the hop on a Mediatrace Path. This value is obtained from CMTPathHopAddr in cMTPathTable.')
c_mt_hop_stats_name = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 2, 2, 1, 4), snmp_admin_string()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
cMTHopStatsName.setStatus('current')
if mibBuilder.loadTexts:
cMTHopStatsName.setDescription('This object indicates the name for this hop. This can be either the hostname or the IP address for the hop.')
c_mt_hop_stats_mediatrace_ttl = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 2, 2, 1, 5), unsigned32().subtype(subtypeSpec=value_range_constraint(0, 255))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
cMTHopStatsMediatraceTtl.setReference("J. Postel, 'Internet Protocol', RFC-791, September 1981. J. Deering and R. Hinden, 'Internet Protocol, Version 6 (IPv6) Specification', RFC-2460, December 1998.")
if mibBuilder.loadTexts:
cMTHopStatsMediatraceTtl.setStatus('current')
if mibBuilder.loadTexts:
cMTHopStatsMediatraceTtl.setDescription("This object indicates the hop limit of the corresponding traffic flow. If version 4 of the IP carries the traffic flow, then the value of this column corresponds to the 'Time to Live' field of the IP header contained by packets in the Mediatrace request. If version 6 of the IP carries the traffic flow, then the value of this column corresponds to the 'Hop Limit' field of the IP header contained by packets in the Mediatrace request.")
c_mt_hop_stats_collection_status = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 2, 2, 1, 6), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2))).clone(namedValues=named_values(('success', 1), ('notSuccess', 2)))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
cMTHopStatsCollectionStatus.setStatus('current')
if mibBuilder.loadTexts:
cMTHopStatsCollectionStatus.setDescription("This object indicates the operational status of data being collected on the hop for a specific session: 'success' The hop is actively collecting and responding with data. 'notsuccess' The hop is not collecting or responding with data.")
c_mt_hop_stats_ingress_interface = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 2, 2, 1, 7), snmp_admin_string()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
cMTHopStatsIngressInterface.setStatus('current')
if mibBuilder.loadTexts:
cMTHopStatsIngressInterface.setDescription('This object indicates the interface on the responder that receives the Mediatrace request from the initiator.')
c_mt_hop_stats_egress_interface = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 2, 2, 1, 8), snmp_admin_string()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
cMTHopStatsEgressInterface.setStatus('current')
if mibBuilder.loadTexts:
cMTHopStatsEgressInterface.setDescription("This object indicates the interface on the responder which is used to forward the Mediatrace request from the initiator towards destination in the path specifier. Value of 'None' will be shown if the destination address in path specifier terminates on this hop.")
c_mt_trace_route_table = mib_table((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 2, 3))
if mibBuilder.loadTexts:
cMTTraceRouteTable.setStatus('current')
if mibBuilder.loadTexts:
cMTTraceRouteTable.setDescription('This table lists the hops discovered by traceroute executed from the initiator. These are the hops which are on media flow path but on which mediatrace is not enabled or is not supported.')
c_mt_trace_route_entry = mib_table_row((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 2, 3, 1)).setIndexNames((0, 'CISCO-MEDIATRACE-MIB', 'cMTSessionNumber'), (0, 'CISCO-MEDIATRACE-MIB', 'cMTSessionLifeNumber'), (0, 'CISCO-MEDIATRACE-MIB', 'cMTBucketNumber'), (0, 'CISCO-MEDIATRACE-MIB', 'cMTHopStatsAddrType'), (0, 'CISCO-MEDIATRACE-MIB', 'cMTHopStatsAddr'))
if mibBuilder.loadTexts:
cMTTraceRouteEntry.setStatus('current')
if mibBuilder.loadTexts:
cMTTraceRouteEntry.setDescription('An entry in cMTTraceRouteTable represents a Traceroute hop on the path associated to a Mediatrace session. The created rows are destroyed when the device undergoes a restart.')
c_mt_trace_route_hop_number = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 2, 3, 1, 1), gauge32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
cMTTraceRouteHopNumber.setStatus('current')
if mibBuilder.loadTexts:
cMTTraceRouteHopNumber.setDescription('This object indicates the hop number of Traceroute host relative to the Initiator. It start with 1 and increments as we go farther from the Initiator.')
c_mt_trace_route_hop_rtt = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 2, 3, 1, 2), counter64()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
cMTTraceRouteHopRtt.setStatus('current')
if mibBuilder.loadTexts:
cMTTraceRouteHopRtt.setDescription('This object indicates RTT. The time it takes for a packet to get to a hop and back, displayed in milliseconds. (ms).')
c_mt_session_status_table = mib_table((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 2, 4))
if mibBuilder.loadTexts:
cMTSessionStatusTable.setStatus('current')
if mibBuilder.loadTexts:
cMTSessionStatusTable.setDescription('This table contains aggregate data maintained by Mediatrace for session status.')
c_mt_session_status_entry = mib_table_row((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 2, 4, 1)).setIndexNames((0, 'CISCO-MEDIATRACE-MIB', 'cMTSessionNumber'))
if mibBuilder.loadTexts:
cMTSessionStatusEntry.setStatus('current')
if mibBuilder.loadTexts:
cMTSessionStatusEntry.setDescription('An entry in cMTSessionStatusTable represents information about a Mediatrace session. This table contains information about particular session such as global session identifier, operation state and time to live. A single row corresponds to status of a Mediatrace session and is uniquely identified by cMTSessionNumber. The created rows are destroyed when the device undergoes a restart.')
c_mt_session_status_bitmaps = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 2, 4, 1, 1), bits().clone(namedValues=named_values(('globalSessionIdUusupport', 0), ('globalSessionIdUncollected', 1), ('operationStateUusupport', 2), ('operationStateUncollected', 3), ('operationTimeToLiveUusupport', 4), ('operationTimeToLiveUncollected', 5)))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
cMTSessionStatusBitmaps.setStatus('current')
if mibBuilder.loadTexts:
cMTSessionStatusBitmaps.setDescription('This object indicates whether the corresponding instances of these statistics fields in the table are supported. It also indicates if the statistics are collected. There are 2 bits for each field.')
c_mt_session_status_global_session_id = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 2, 4, 1, 2), unsigned32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
cMTSessionStatusGlobalSessionId.setStatus('current')
if mibBuilder.loadTexts:
cMTSessionStatusGlobalSessionId.setDescription('This object indicates a globally unique Id to identify a session throughout the network.')
c_mt_session_status_operation_state = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 2, 4, 1, 3), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3, 4))).clone(namedValues=named_values(('pending', 1), ('active', 2), ('inactive', 3), ('sleep', 4)))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
cMTSessionStatusOperationState.setStatus('current')
if mibBuilder.loadTexts:
cMTSessionStatusOperationState.setDescription('This object indicates the operation status of the session. pending - Session is not currently active. active - Session is in active state. inactive - Session is not active but it has not aged out. sleep - Session is in sleep state.')
c_mt_session_status_operation_time_to_live = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 2, 4, 1, 4), counter64()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
cMTSessionStatusOperationTimeToLive.setStatus('current')
if mibBuilder.loadTexts:
cMTSessionStatusOperationTimeToLive.setDescription('This object indicates how long the session operation will last.')
c_mt_session_request_stats_table = mib_table((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 2, 5))
if mibBuilder.loadTexts:
cMTSessionRequestStatsTable.setStatus('current')
if mibBuilder.loadTexts:
cMTSessionRequestStatsTable.setDescription('This table contains aggregate data maintained by Mediatrace for session request status.')
c_mt_session_request_stats_entry = mib_table_row((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 2, 5, 1)).setIndexNames((0, 'CISCO-MEDIATRACE-MIB', 'cMTSessionNumber'), (0, 'CISCO-MEDIATRACE-MIB', 'cMTSessionLifeNumber'), (0, 'CISCO-MEDIATRACE-MIB', 'cMTBucketNumber'))
if mibBuilder.loadTexts:
cMTSessionRequestStatsEntry.setStatus('current')
if mibBuilder.loadTexts:
cMTSessionRequestStatsEntry.setDescription('An entry in cMTSessionRequestStatsTable represents status for each request for a particular session. A single row corresponds to a request sent by a particular Mediatrace session and is uniquely identified by cMTSessionNumber, cMTSessionLifeNumber and cMTBucketNumber. The created rows are destroyed when the device undergoes a restart.')
c_mt_session_request_stats_bitmaps = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 2, 5, 1, 1), bits().clone(namedValues=named_values(('requestTimestampUnsupport', 0), ('requestTimestampUncollected', 1), ('requestStatusUnsupport', 2), ('requestStatusUncollected', 3), ('tracerouteStatusUnsupport', 4), ('tracerouteStatusUncollected', 5), ('routeIndexUnsupport', 6), ('routeIndexUncollected', 7), ('numberOfMediatraceHopsUnsupport', 8), ('numberOfMediatraceHopsUncollected', 9), ('numberOfNonMediatraceHopsUnsupport', 10), ('numberOfNonMediatraceHopsUncollected', 11), ('numberOfValidHopsUnsupport', 12), ('numberOfValidHopsUncollected', 13), ('numberOfErrorHopsUnsupport', 14), ('numberOfErrorHopsUncollected', 15), ('numberOfNoDataRecordHopsUnsupport', 16), ('numberOfNoDataRecordHopsUncollected', 17), ('metaGlobalIdUnsupport', 18), ('metaGlobalIdUncollected', 19), ('metaMultiPartySessionIdUnsupport', 20), ('metaMultiPartySessionIdUncollected', 21), ('metaAppNameUnsupport', 22), ('metaAppNameUncollected', 23)))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
cMTSessionRequestStatsBitmaps.setStatus('current')
if mibBuilder.loadTexts:
cMTSessionRequestStatsBitmaps.setDescription('This object indicates whether the corresponding instances of these stats fields in the table are supported. It also indicates if the stats data are collected. There are 2 bits for each corresponding field.')
c_mt_session_request_stats_request_timestamp = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 2, 5, 1, 2), time_stamp()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
cMTSessionRequestStatsRequestTimestamp.setStatus('current')
if mibBuilder.loadTexts:
cMTSessionRequestStatsRequestTimestamp.setDescription('This object indicates the value of request time when the request was sent our by the initiator for this particular session.')
c_mt_session_request_stats_request_status = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 2, 5, 1, 3), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2))).clone(namedValues=named_values(('completed', 1), ('notCompleted', 2)))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
cMTSessionRequestStatsRequestStatus.setStatus('current')
if mibBuilder.loadTexts:
cMTSessionRequestStatsRequestStatus.setDescription('This object indicates the status of request for the session.')
c_mt_session_request_stats_traceroute_status = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 2, 5, 1, 4), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2))).clone(namedValues=named_values(('completed', 1), ('notCompleted', 2)))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
cMTSessionRequestStatsTracerouteStatus.setStatus('current')
if mibBuilder.loadTexts:
cMTSessionRequestStatsTracerouteStatus.setDescription('This object indicates the status of traceroute for the session.')
c_mt_session_request_stats_route_index = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 2, 5, 1, 5), gauge32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
cMTSessionRequestStatsRouteIndex.setStatus('current')
if mibBuilder.loadTexts:
cMTSessionRequestStatsRouteIndex.setDescription('This object indicates the route index for the session request. It signifies the number of times a route has changed for a particular session. 0 signifies no route change.')
c_mt_session_request_stats_number_of_mediatrace_hops = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 2, 5, 1, 6), counter32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
cMTSessionRequestStatsNumberOfMediatraceHops.setStatus('current')
if mibBuilder.loadTexts:
cMTSessionRequestStatsNumberOfMediatraceHops.setDescription('This object indicates the number of Mediatrace hops in the path.')
c_mt_session_request_stats_number_of_non_mediatrace_hops = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 2, 5, 1, 7), counter32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
cMTSessionRequestStatsNumberOfNonMediatraceHops.setStatus('current')
if mibBuilder.loadTexts:
cMTSessionRequestStatsNumberOfNonMediatraceHops.setDescription('This object indicates the number of non-Mediatrace hops in the path.')
c_mt_session_request_stats_number_of_valid_hops = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 2, 5, 1, 8), counter32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
cMTSessionRequestStatsNumberOfValidHops.setStatus('current')
if mibBuilder.loadTexts:
cMTSessionRequestStatsNumberOfValidHops.setDescription('This object indicates the number of hops with valid data report.')
c_mt_session_request_stats_number_of_error_hops = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 2, 5, 1, 9), counter32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
cMTSessionRequestStatsNumberOfErrorHops.setStatus('current')
if mibBuilder.loadTexts:
cMTSessionRequestStatsNumberOfErrorHops.setDescription('This object indicates the number of hops with error report. These hops are not able to return the statistics due to some issue.')
c_mt_session_request_stats_number_of_no_data_record_hops = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 2, 5, 1, 10), counter32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
cMTSessionRequestStatsNumberOfNoDataRecordHops.setStatus('current')
if mibBuilder.loadTexts:
cMTSessionRequestStatsNumberOfNoDataRecordHops.setDescription('This object indicates the number of hops with no data record.')
c_mt_session_request_stats_md_global_id = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 2, 5, 1, 11), octet_string()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
cMTSessionRequestStatsMDGlobalId.setStatus('current')
if mibBuilder.loadTexts:
cMTSessionRequestStatsMDGlobalId.setDescription('This object indicates the meta-data global Id for this session.')
c_mt_session_request_stats_md_multi_party_session_id = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 2, 5, 1, 12), octet_string()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
cMTSessionRequestStatsMDMultiPartySessionId.setStatus('current')
if mibBuilder.loadTexts:
cMTSessionRequestStatsMDMultiPartySessionId.setDescription('This object indicates the meta-data Multi Party Session Id for this session.')
c_mt_session_request_stats_md_app_name = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 2, 5, 1, 13), octet_string()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
cMTSessionRequestStatsMDAppName.setStatus('current')
if mibBuilder.loadTexts:
cMTSessionRequestStatsMDAppName.setDescription('This object indicates the meta-data AppName for this session.')
c_mt_common_metric_stats_table = mib_table((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 2, 6))
if mibBuilder.loadTexts:
cMTCommonMetricStatsTable.setStatus('current')
if mibBuilder.loadTexts:
cMTCommonMetricStatsTable.setDescription('This table contains the list of entries representing common IP metrics values for a particular mediatrace session on particular hop.')
c_mt_common_metric_stats_entry = mib_table_row((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 2, 6, 1)).setIndexNames((0, 'CISCO-MEDIATRACE-MIB', 'cMTSessionNumber'), (0, 'CISCO-MEDIATRACE-MIB', 'cMTSessionLifeNumber'), (0, 'CISCO-MEDIATRACE-MIB', 'cMTBucketNumber'), (0, 'CISCO-MEDIATRACE-MIB', 'cMTHopStatsAddrType'), (0, 'CISCO-MEDIATRACE-MIB', 'cMTHopStatsAddr'))
if mibBuilder.loadTexts:
cMTCommonMetricStatsEntry.setStatus('current')
if mibBuilder.loadTexts:
cMTCommonMetricStatsEntry.setDescription('An entry in cMTCommonMetricStatsTable represents common media monitor profile information of a hop on the path associated to a Mediatrace session such as flow sampling time stamp, packets dropped, IP TTL, etc. The devices creates a row in the cMTCommonMetricStatsTable when a Mediatrace session starts collecting a traffic metrics data and has been configured to compute common IP metrics. Likewise, the device destroys a row in the cMTCommonMetricStatsTable when the corresponding Mediatrace session has ceased collecting the traffic metrics data (e.g., when a scheduled session has timed out). A single row corresponds to a common media monitor profile information of a hop on the path discovered for a session and is uniquely identified by cMTSessionNumber, cMTSessionLifeNumber, cMTBucketNumber,cMTHopStatsAddrType and cMTHopStatsAddr. The created rows are destroyed when the device undergoes a restart.')
c_mt_common_metrics_bitmaps = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 2, 6, 1, 2), bits().clone(namedValues=named_values(('flowSamplingStartTimeUnsupported', 0), ('flowSamplingStartTimeUncollected', 1), ('ipPktDroppedUnsupported', 2), ('ipPktDroppedUncollected', 3), ('ipPktCountUnsupported', 4), ('ipPktCountUncollected', 5), ('ipOctetsUnsupported', 6), ('ipOctetsUncollected', 7), ('ipByteRateUnsupported', 8), ('ipByteRateUncollected', 9), ('ipDscpUnsupported', 10), ('ipDscpUncollected', 11), ('ipTtlUnsupported', 12), ('ipTtlUncollected', 13), ('flowCounterUnsupported', 14), ('flowCounterUncollected', 15), ('flowDirectionUnsupported', 16), ('flowDirectionUncollected', 17), ('lossMeasurementUnsupported', 18), ('lossMeasurementUncollected', 19), ('mediaStopOccurredUnsupported', 20), ('mediaStopOccurredUncollected', 21), ('routeForwardUnsupported', 22), ('routeForwardUncollected', 23), ('ipProtocolUnsupported', 24), ('ipProtocolUncollected', 25)))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
cMTCommonMetricsBitmaps.setStatus('current')
if mibBuilder.loadTexts:
cMTCommonMetricsBitmaps.setDescription('This object indicates whether the corresponding instances of these stats fields in the table are supported. It also indicates if the stats data are collected. There are 2 bits for each field.')
c_mt_common_metrics_flow_sampling_start_time = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 2, 6, 1, 3), cisco_ntp_time_stamp()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
cMTCommonMetricsFlowSamplingStartTime.setStatus('current')
if mibBuilder.loadTexts:
cMTCommonMetricsFlowSamplingStartTime.setDescription('This object defines the the timestamp when the statistics were collected on the responder.')
c_mt_common_metrics_ip_pkt_dropped = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 2, 6, 1, 4), counter64()).setUnits('packets').setMaxAccess('readonly')
if mibBuilder.loadTexts:
cMTCommonMetricsIpPktDropped.setStatus('current')
if mibBuilder.loadTexts:
cMTCommonMetricsIpPktDropped.setDescription("This object indicates number of packet drops observed on the flow being monitored on this hop from flow sampling start time in window of 'sample interval' length.")
c_mt_common_metrics_ip_octets = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 2, 6, 1, 5), counter64()).setUnits('octets').setMaxAccess('readonly')
if mibBuilder.loadTexts:
cMTCommonMetricsIpOctets.setStatus('current')
if mibBuilder.loadTexts:
cMTCommonMetricsIpOctets.setDescription('This object indicates the total number of octets contained by the packets processed by the Mediatrace request for the corresponding traffic flow.')
c_mt_common_metrics_ip_pkt_count = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 2, 6, 1, 6), counter64()).setUnits('packets').setMaxAccess('readonly')
if mibBuilder.loadTexts:
cMTCommonMetricsIpPktCount.setStatus('current')
if mibBuilder.loadTexts:
cMTCommonMetricsIpPktCount.setDescription('This object indicates the total number of packets processed by the Mediatrace request for the corresponding traffic flow.')
c_mt_common_metrics_ip_byte_rate = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 2, 6, 1, 7), gauge32()).setUnits('packets per second').setMaxAccess('readonly')
if mibBuilder.loadTexts:
cMTCommonMetricsIpByteRate.setStatus('current')
if mibBuilder.loadTexts:
cMTCommonMetricsIpByteRate.setDescription('This object indicates the average packet rate at which the Mediatrace request is processing data for the corresponding traffic flow. This value is cumulative over the lifetime of the traffic flow.')
c_mt_common_metrics_ip_dscp = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 2, 6, 1, 8), unsigned32().subtype(subtypeSpec=value_range_constraint(0, 64))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
cMTCommonMetricsIpDscp.setStatus('current')
if mibBuilder.loadTexts:
cMTCommonMetricsIpDscp.setDescription("This object indicates the DSCP value of the corresponding traffic flow. If version 4 of the IP carries the traffic flow, then the value of this column corresponds to the DSCP part of 'Type of Service' field of the IP header contained by packets in the traffic flow. If version 6 of the IP carries the traffic flow, then the value of this column corresponds to DSCP part of the 'Traffic Class' field of the IP header contained by packets in the traffic flow.")
c_mt_common_metrics_ip_ttl = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 2, 6, 1, 9), unsigned32().subtype(subtypeSpec=value_range_constraint(0, 255))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
cMTCommonMetricsIpTtl.setReference("J. Postel, 'Internet Protocol', RFC-791, September 1981. J. Deering and R. Hinden, 'Internet Protocol, Version 6 (IPv6) Specification', RFC-2460, December 1998.")
if mibBuilder.loadTexts:
cMTCommonMetricsIpTtl.setStatus('current')
if mibBuilder.loadTexts:
cMTCommonMetricsIpTtl.setDescription("This object indicates the hop limit of the corresponding traffic flow. If version 4 of the IP carries the traffic flow, then the value of this column corresponds to the 'Time to Live' field of the IP header contained by packets in the Mediatrace request. If version 6 of the IP carries the traffic flow, then the value of this column corresponds to the 'Hop Limit' field of the IP header contained by packets in the Mediatrace request.")
c_mt_common_metrics_flow_counter = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 2, 6, 1, 10), gauge32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
cMTCommonMetricsFlowCounter.setStatus('current')
if mibBuilder.loadTexts:
cMTCommonMetricsFlowCounter.setDescription('This object indicates the number of traffic flows currently monitored by the Mediatrace request.')
c_mt_common_metrics_flow_direction = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 2, 6, 1, 11), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3))).clone(namedValues=named_values(('unknown', 1), ('ingress', 2), ('egress', 3)))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
cMTCommonMetricsFlowDirection.setStatus('current')
if mibBuilder.loadTexts:
cMTCommonMetricsFlowDirection.setDescription("This object indicates the direction of the traffic flow where the data is monitored : 'unknown' The SNMP entity does not know the direction of the traffic flow at the point data is collected. 'ingress' Data is collected at the point where the traffic flow enters the devices 'egress' Data is colected at the point where the traffic flow leaves the device.")
c_mt_common_metrics_loss_measurement = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 2, 6, 1, 12), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2))).clone(namedValues=named_values(('true', 1), ('false', 2)))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
cMTCommonMetricsLossMeasurement.setStatus('current')
if mibBuilder.loadTexts:
cMTCommonMetricsLossMeasurement.setDescription('This object indicates the loss measurement.')
c_mt_common_metrics_media_stop_occurred = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 2, 6, 1, 13), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2))).clone(namedValues=named_values(('true', 1), ('false', 2)))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
cMTCommonMetricsMediaStopOccurred.setStatus('current')
if mibBuilder.loadTexts:
cMTCommonMetricsMediaStopOccurred.setDescription('This object indicates the media stop occurred.')
c_mt_common_metrics_route_forward = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 2, 6, 1, 14), snmp_admin_string()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
cMTCommonMetricsRouteForward.setStatus('current')
if mibBuilder.loadTexts:
cMTCommonMetricsRouteForward.setDescription('This object indicates routing or forwarding status i.e. whether the packet is forwarded or dropped for the flow.')
c_mt_common_metrics_ip_protocol = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 2, 6, 1, 15), cisco_mediatrace_support_protocol()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
cMTCommonMetricsIpProtocol.setStatus('current')
if mibBuilder.loadTexts:
cMTCommonMetricsIpProtocol.setDescription('This table contains entry to specify the media Metric-list for the particular Mmediatrace session on the hop.')
c_mt_rtp_metric_stats_table = mib_table((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 2, 7))
if mibBuilder.loadTexts:
cMTRtpMetricStatsTable.setStatus('current')
if mibBuilder.loadTexts:
cMTRtpMetricStatsTable.setDescription('This table contains aggregate data maintained by Mediatrace for traffic flows for which it is computing RTP metrics.')
c_mt_rtp_metric_stats_entry = mib_table_row((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 2, 7, 1))
cMTCommonMetricStatsEntry.registerAugmentions(('CISCO-MEDIATRACE-MIB', 'cMTRtpMetricStatsEntry'))
cMTRtpMetricStatsEntry.setIndexNames(*cMTCommonMetricStatsEntry.getIndexNames())
if mibBuilder.loadTexts:
cMTRtpMetricStatsEntry.setStatus('current')
if mibBuilder.loadTexts:
cMTRtpMetricStatsEntry.setDescription('An entry in cMTRtpMetricStatsTable represents RTP related information of a hop on the path associated to a Mediatrace session such as bit rate, octets, etc. The devices creates a row in the cMTRtpMetricStatsTable when a Mediatrace session starts collecting a traffic metrics data and has been configured to compute RTP metrics for the same traffic metrics data. Likewise, the device destroys a row in the cMTRtpMetricStatsTable when the corresponding Mediatrace session has ceased collecting the traffic metrics data (e.g., when a scheduled session has timed out). A single row corresponds to a RTP information of a hop on the path discovered for a Mediatrace session and is uniquely identified by cMTSessionNumber, cMTSessionLifeNumber, cMTBucketNumber,cMTHopStatsAddrType and cMTHopStatsAddr. The created rows are destroyed when the device undergoes a restart.')
c_mt_rtp_metrics_bitmaps = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 2, 7, 1, 2), bits().clone(namedValues=named_values(('bitRateunSupport', 0), ('bitRateunCollected', 1), ('octetsunSupport', 2), ('octetsunCollected', 3), ('pktsunSupport', 4), ('pktsunCollected', 5), ('jitterunSupport', 6), ('jitterunCollected', 7), ('lostPktsunSupport', 8), ('lostPktsunCollected', 9), ('expectedPktsunSupport', 10), ('expectedPktsunCollected', 11), ('lostPktEventsunSupport', 12), ('lostPktEventsunCollected', 13), ('losspercentUnsupport', 14), ('losspercentUncollected', 15)))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
cMTRtpMetricsBitmaps.setStatus('current')
if mibBuilder.loadTexts:
cMTRtpMetricsBitmaps.setDescription('This object indicates whether the corresponding instances of these statistics fields in the table are supported. It also indicates if the stats data are collected. There are 2 bits for each field.')
c_mt_rtp_metrics_bit_rate = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 2, 7, 1, 3), gauge32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
cMTRtpMetricsBitRate.setStatus('current')
if mibBuilder.loadTexts:
cMTRtpMetricsBitRate.setDescription('This object indicates the average bit rate at which the corresponding Mediatrace request is processing data for the corresponding traffic flow. This value is cumulative over the lifetime of the traffic flow.')
c_mt_rtp_metrics_octets = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 2, 7, 1, 4), counter64()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
cMTRtpMetricsOctets.setStatus('current')
if mibBuilder.loadTexts:
cMTRtpMetricsOctets.setDescription('This object indicates the total number of octets contained by the packets processed by the Mediatrace request for the corresponding traffic flow.')
c_mt_rtp_metrics_pkts = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 2, 7, 1, 5), counter64()).setUnits('packets').setMaxAccess('readonly')
if mibBuilder.loadTexts:
cMTRtpMetricsPkts.setStatus('current')
if mibBuilder.loadTexts:
cMTRtpMetricsPkts.setDescription('This object indicates the total number of packets processed by the corresponding Mediatrace request for the corresponding traffic flow.')
c_mt_rtp_metrics_jitter = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 2, 7, 1, 6), flow_metric_value()).setUnits('seconds').setMaxAccess('readonly')
if mibBuilder.loadTexts:
cMTRtpMetricsJitter.setStatus('current')
if mibBuilder.loadTexts:
cMTRtpMetricsJitter.setDescription('This object indicates the inter-arrival jitter for the traffic flow.')
c_mt_rtp_metrics_lost_pkts = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 2, 7, 1, 7), counter64()).setUnits('packets').setMaxAccess('readonly')
if mibBuilder.loadTexts:
cMTRtpMetricsLostPkts.setStatus('current')
if mibBuilder.loadTexts:
cMTRtpMetricsLostPkts.setDescription('This object indicates the number of RTP packets lost for the traffic flow.')
c_mt_rtp_metrics_expected_pkts = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 2, 7, 1, 8), counter64()).setUnits('packets').setMaxAccess('readonly')
if mibBuilder.loadTexts:
cMTRtpMetricsExpectedPkts.setStatus('current')
if mibBuilder.loadTexts:
cMTRtpMetricsExpectedPkts.setDescription('This object indicates the number of RTP packets expected for the traffic flow.')
c_mt_rtp_metrics_lost_pkt_events = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 2, 7, 1, 9), counter64()).setUnits('packets').setMaxAccess('readonly')
if mibBuilder.loadTexts:
cMTRtpMetricsLostPktEvents.setStatus('current')
if mibBuilder.loadTexts:
cMTRtpMetricsLostPktEvents.setDescription('This object indicates the number of packet loss events observed by the Mediatrace request for the corresponding traffic flow.')
c_mt_rtp_metrics_loss_percent = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 2, 7, 1, 10), gauge32().subtype(subtypeSpec=value_range_constraint(0, 100))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
cMTRtpMetricsLossPercent.setStatus('current')
if mibBuilder.loadTexts:
cMTRtpMetricsLossPercent.setDescription('This object indicates the percentage of packages are lost per ten thousand packets in a traffic flow.')
c_mt_tcp_metric_stats_table = mib_table((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 2, 8))
if mibBuilder.loadTexts:
cMTTcpMetricStatsTable.setStatus('current')
if mibBuilder.loadTexts:
cMTTcpMetricStatsTable.setDescription('This table contains aggregate data maintained by Mediatrace for traffic flows for which it is computing TCP metrics.')
c_mt_tcp_metric_stats_entry = mib_table_row((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 2, 8, 1))
cMTCommonMetricStatsEntry.registerAugmentions(('CISCO-MEDIATRACE-MIB', 'cMTTcpMetricStatsEntry'))
cMTTcpMetricStatsEntry.setIndexNames(*cMTCommonMetricStatsEntry.getIndexNames())
if mibBuilder.loadTexts:
cMTTcpMetricStatsEntry.setStatus('current')
if mibBuilder.loadTexts:
cMTTcpMetricStatsEntry.setDescription('An entry in cMTTcpMetricStatsTable represents TCP information of a hop on the path associated to a Mediatrace session such as byte count, round trip delay, etc. The devices creates a row in the cMTTcpMetricStatsTable when a Mediatrace session starts collecting a traffic metrics data and has been configured to compute TCP metrics for the same traffic metrics data. Likewise, the device destroys a row in the cMTTcpMetricStatsTable when the corresponding Mediatrace session has ceased collecting the traffic metrics data (e.g., when a scheduled session has timed out). A single row corresponds to TCP information of a hop on the path discovered for a Mediatrace session and is uniquely identified by cMTSessionNumber, cMTSessionLifeNumber, cMTBucketNumber,cMTHopStatsAddrType and cMTHopStatsAddr. The created rows are destroyed when the device undergoes a restart.')
c_mt_tcp_metric_bitmaps = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 2, 8, 1, 2), bits().clone(namedValues=named_values(('mediaByteCountUnsupport', 0), ('mediaByteCountUncollected', 1), ('connectRoundTripDelayUnsupport', 2), ('connectRoundTripDelayUncollected', 3), ('lostEventCountUnsupport', 4), ('lostEventCountUncollected', 5)))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
cMTTcpMetricBitmaps.setStatus('current')
if mibBuilder.loadTexts:
cMTTcpMetricBitmaps.setDescription('This object indicates whether the corresponding instances of these stats fields in the table are supported. It also indicates if the stats data are collected. There are 2 bits for each field.')
c_mt_tcp_metric_media_byte_count = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 2, 8, 1, 3), flow_metric_value()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
cMTTcpMetricMediaByteCount.setStatus('current')
if mibBuilder.loadTexts:
cMTTcpMetricMediaByteCount.setDescription('This object indicates the number of bytes for the packets observed by the Mediatrace session for the corresponding flow.')
c_mt_tcp_metric_connect_round_trip_delay = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 2, 8, 1, 4), counter64()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
cMTTcpMetricConnectRoundTripDelay.setStatus('current')
if mibBuilder.loadTexts:
cMTTcpMetricConnectRoundTripDelay.setDescription('This object indicates the round trip time for the packets observed by the Mediatrace session for the corresponding flow. The round trip time is defined as the length of time it takes for a TCP segment transmission and receipt of acknowledgement. This object indicates the connect round trip delay.')
c_mt_tcp_metric_lost_event_count = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 2, 8, 1, 5), counter64()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
cMTTcpMetricLostEventCount.setStatus('current')
if mibBuilder.loadTexts:
cMTTcpMetricLostEventCount.setDescription('This object indicates the number of packets lost for the traffic flow.')
c_mt_system_metric_stats_table = mib_table((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 2, 9))
if mibBuilder.loadTexts:
cMTSystemMetricStatsTable.setStatus('current')
if mibBuilder.loadTexts:
cMTSystemMetricStatsTable.setDescription('A list of objects which accumulate the system metrics results of a particular node for that path.')
c_mt_system_metric_stats_entry = mib_table_row((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 2, 9, 1)).setIndexNames((0, 'CISCO-MEDIATRACE-MIB', 'cMTSessionNumber'), (0, 'CISCO-MEDIATRACE-MIB', 'cMTSessionLifeNumber'), (0, 'CISCO-MEDIATRACE-MIB', 'cMTBucketNumber'), (0, 'CISCO-MEDIATRACE-MIB', 'cMTHopStatsAddrType'), (0, 'CISCO-MEDIATRACE-MIB', 'cMTHopStatsAddr'))
if mibBuilder.loadTexts:
cMTSystemMetricStatsEntry.setStatus('current')
if mibBuilder.loadTexts:
cMTSystemMetricStatsEntry.setDescription('An entry in cMTSystemMetricStatsTable represents CPU or memory utilization information of a hop on the path associated to a Mediatrace session such as five minutes CPU utilization, memory utilization, etc. The devices creates a row in the cMTSystemMetricStatsTable when a Mediatrace session starts collecting a system metrics data and has been configured to compute system metrics. Likewise, the device destroys a row in the cMTSystemMetricStatsTable when the corresponding Mediatrace session has ceased collecting the system metrics data (e.g., when a scheduled session has timed out). A single row corresponds to a CPU or memory utilization information of a hop on the path discovered for a Mediatrace session and is uniquely identified by cMTSessionNumber, cMTSessionLifeNumber, cMTBucketNumber,cMTHopStatsAddrType and cMTHopStatsAddr. The created rows are destroyed when the device undergoes a restart.')
c_mt_system_metric_bitmaps = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 2, 9, 1, 1), bits().clone(namedValues=named_values(('cpuOneMinuteUtilizationUnsupport', 0), ('cpuOneMinuteUtilizationUncollected', 1), ('cpuFiveMinutesUtilizationUnsupport', 2), ('cpuFiveMinutesUtilizationUncollected', 3), ('memoryMetricsUnsupport', 4), ('memoryMetricsUncollected', 5)))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
cMTSystemMetricBitmaps.setStatus('current')
if mibBuilder.loadTexts:
cMTSystemMetricBitmaps.setDescription('This object indicates whether the corresponding instances of these stats fields in the table are supported. It also indicates if the stats data are collected. There are 2 bits for each field.')
c_mt_system_metric_cpu_one_minute_utilization = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 2, 9, 1, 2), gauge32().subtype(subtypeSpec=value_range_constraint(0, 100))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
cMTSystemMetricCpuOneMinuteUtilization.setStatus('current')
if mibBuilder.loadTexts:
cMTSystemMetricCpuOneMinuteUtilization.setDescription('This object indicates the overall CPU busy percentage in the last 1 minute period for the network element')
c_mt_system_metric_cpu_five_minutes_utilization = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 2, 9, 1, 3), gauge32().subtype(subtypeSpec=value_range_constraint(0, 100))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
cMTSystemMetricCpuFiveMinutesUtilization.setStatus('current')
if mibBuilder.loadTexts:
cMTSystemMetricCpuFiveMinutesUtilization.setDescription('This object indicates the overall CPU busy percentage in the last 5 minute period for the network element')
c_mt_system_metric_memory_utilization = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 2, 9, 1, 4), gauge32().subtype(subtypeSpec=value_range_constraint(0, 100))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
cMTSystemMetricMemoryUtilization.setStatus('current')
if mibBuilder.loadTexts:
cMTSystemMetricMemoryUtilization.setDescription('This object indicates the overall memory usage percentage for the node.')
c_mt_interface_metric_stats_table = mib_table((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 2, 10))
if mibBuilder.loadTexts:
cMTInterfaceMetricStatsTable.setStatus('current')
if mibBuilder.loadTexts:
cMTInterfaceMetricStatsTable.setDescription('This table contains aggregate data of interface information for the network nodes.')
c_mt_interface_metric_stats_entry = mib_table_row((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 2, 10, 1)).setIndexNames((0, 'CISCO-MEDIATRACE-MIB', 'cMTSessionNumber'), (0, 'CISCO-MEDIATRACE-MIB', 'cMTSessionLifeNumber'), (0, 'CISCO-MEDIATRACE-MIB', 'cMTBucketNumber'), (0, 'CISCO-MEDIATRACE-MIB', 'cMTHopStatsAddrType'), (0, 'CISCO-MEDIATRACE-MIB', 'cMTHopStatsAddr'))
if mibBuilder.loadTexts:
cMTInterfaceMetricStatsEntry.setStatus('current')
if mibBuilder.loadTexts:
cMTInterfaceMetricStatsEntry.setDescription('An entry in cMTInterfaceMetricStatsTable represents interface information of a hop on the path associated to a Mediatrace session such as ingress interface speed, egress interface speed, etc. The devices creates a row in the cMTInterfaceMetricStatsTable when a Mediatrace session starts collecting an interface metrics data and has been configured to compute interface metrics. Likewise, the device destroys a row in the cMTInterfaceMetricStatsTable when the corresponding Mediatrace session has ceased collecting the interface metrics data (e.g., when a scheduled session has timed out). A single row corresponds to a interface information of a hop on the path discovered for a session and is uniquely identified by cMTSessionNumber, cMTSessionLifeNumber, cMTBucketNumber, cMTHopStatsAddrType and cMTHopStatsAddr. The created rows are destroyed when the device undergoes a restart.')
c_mt_interface_bitmaps = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 2, 10, 1, 2), bits().clone(namedValues=named_values(('inSpeedUnsupport', 0), ('inSpeedUncollected', 1), ('outSpeedUnsupport', 2), ('outSpeedUncollected', 3), ('outDiscardsUnsupport', 4), ('outDiscardsUncollected', 5), ('inDiscardsUnsupport', 6), ('inDiscardsUncollected', 7), ('outErrorsUnsupport', 8), ('outErrorsUncollected', 9), ('inErrorsUnsupport', 10), ('inErrorsUncollected', 11), ('outOctetsUnsupport', 12), ('outOctetsUncollected', 13), ('inOctetsUnsupport', 14), ('inOctetsUncollected', 15)))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
cMTInterfaceBitmaps.setStatus('current')
if mibBuilder.loadTexts:
cMTInterfaceBitmaps.setDescription('This object indicates whether the corresponding instances of these stats fields in the table are supported. It also indicates if the stats data are collected. There are 2 bits for each field.')
c_mt_interface_out_speed = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 2, 10, 1, 3), gauge32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
cMTInterfaceOutSpeed.setStatus('current')
if mibBuilder.loadTexts:
cMTInterfaceOutSpeed.setDescription("This object indicates the egress interface's current bandwidth in bits per second. For interfaces which do not vary in bandwidth or for those where no accurate estimation can be made, this object should contain the nominal bandwidth. Currently bandwidth above the maximum value 4,294,967,295 is not supported and it will show the maximum for this condition.")
c_mt_interface_in_speed = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 2, 10, 1, 4), gauge32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
cMTInterfaceInSpeed.setStatus('current')
if mibBuilder.loadTexts:
cMTInterfaceInSpeed.setDescription("This object indicates an estimate of the ingress interface's current bandwidth in bits per second. Currently bandwidth above the maximum value 4,294,967,295 is not supported and it will show the maximum for this condition.")
c_mt_interface_out_discards = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 2, 10, 1, 5), counter32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
cMTInterfaceOutDiscards.setStatus('current')
if mibBuilder.loadTexts:
cMTInterfaceOutDiscards.setDescription('This object indicates the number of outbound packets which were chosen to be discarded even though no errors had been detected to prevent their being transmitted. One possible reason for discarding such a packet could be to free up buffer space.')
c_mt_interface_in_discards = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 2, 10, 1, 6), counter32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
cMTInterfaceInDiscards.setStatus('current')
if mibBuilder.loadTexts:
cMTInterfaceInDiscards.setDescription('This object indicates the number of inbound packets which were chosen to be discarded even though no errors had been detected to prevent their being deliverable to a higher-layer protocol. One possible reason for discarding such a packet could be to free up buffer space. Discontinuities in the value of this counter can occur at re-initialization of the management system, and at other times as indicated by the value of ifCounterDiscontinuityTime.')
c_mt_interface_out_errors = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 2, 10, 1, 7), counter32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
cMTInterfaceOutErrors.setStatus('current')
if mibBuilder.loadTexts:
cMTInterfaceOutErrors.setDescription('This object indicates the error packet number. For packet-oriented interfaces, the number of outbound packets that could not be transmitted because of errors. For character-oriented or fixed-length interfaces, the number of outbound transmission units that could not be transmitted because of errors. Discontinuities in the value of this counter can occur at re-initialization of the management system, and at other times as indicated by the value of ifCounterDiscontinuityTime.')
c_mt_interface_in_errors = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 2, 10, 1, 8), counter32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
cMTInterfaceInErrors.setStatus('current')
if mibBuilder.loadTexts:
cMTInterfaceInErrors.setDescription('This object indicates the error packet number. For packet-oriented interfaces, the number of inbound packets that contained errors preventing them from being deliverable to a higher-layer protocol. For character-oriented or fixed-length interfaces, the number of inbound transmission units that contained errors preventing them from being deliverable to a higher-layer protocol. Discontinuities in the value of this counter can occur at re-initialization of the management system, and at other times as indicated by the value of ifCounterDiscontinuityTime.')
c_mt_interface_out_octets = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 2, 10, 1, 9), counter32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
cMTInterfaceOutOctets.setStatus('current')
if mibBuilder.loadTexts:
cMTInterfaceOutOctets.setDescription('This object indicates the total number of octets transmitted out of the interface, including framing characters. Discontinuities in the value of this counter can occur at re-initialization of the management system, and at other times as indicated by the value of ifCounterDiscontinuityTime.')
c_mt_interface_in_octets = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 2, 10, 1, 10), counter32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
cMTInterfaceInOctets.setStatus('current')
if mibBuilder.loadTexts:
cMTInterfaceInOctets.setDescription('This object indicates the total number of octets received on the interface, including framing characters. Discontinuities in the value of this counter can occur at re-initialization of the management system, and at other times as indicated by the value of ifCounterDiscontinuityTime.')
cisco_mediatrace_mib_compliances = mib_identifier((1, 3, 6, 1, 4, 1, 9, 9, 800, 2, 1))
cisco_mediatrace_mib_groups = mib_identifier((1, 3, 6, 1, 4, 1, 9, 9, 800, 2, 2))
cisco_mediatrace_mib_compliance = module_compliance((1, 3, 6, 1, 4, 1, 9, 9, 800, 2, 1, 1)).setObjects(('CISCO-MEDIATRACE-MIB', 'ciscoMediatraceMIBMainObjectGroup'))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
cisco_mediatrace_mib_compliance = ciscoMediatraceMIBCompliance.setStatus('current')
if mibBuilder.loadTexts:
ciscoMediatraceMIBCompliance.setDescription('This is a default module-compliance containing default object groups.')
cisco_mediatrace_mib_main_object_group = object_group((1, 3, 6, 1, 4, 1, 9, 9, 800, 2, 2, 1)).setObjects(('CISCO-MEDIATRACE-MIB', 'cMTFlowSpecifierRowStatus'), ('CISCO-MEDIATRACE-MIB', 'cMTFlowSpecifierDestAddrType'), ('CISCO-MEDIATRACE-MIB', 'cMTFlowSpecifierDestAddr'), ('CISCO-MEDIATRACE-MIB', 'cMTFlowSpecifierDestPort'), ('CISCO-MEDIATRACE-MIB', 'cMTFlowSpecifierSourceAddrType'), ('CISCO-MEDIATRACE-MIB', 'cMTFlowSpecifierSourceAddr'), ('CISCO-MEDIATRACE-MIB', 'cMTFlowSpecifierSourcePort'), ('CISCO-MEDIATRACE-MIB', 'cMTFlowSpecifierIpProtocol'), ('CISCO-MEDIATRACE-MIB', 'cMTPathSpecifierRowStatus'), ('CISCO-MEDIATRACE-MIB', 'cMTPathSpecifierDestAddrType'), ('CISCO-MEDIATRACE-MIB', 'cMTPathSpecifierDestAddr'), ('CISCO-MEDIATRACE-MIB', 'cMTPathSpecifierDestPort'), ('CISCO-MEDIATRACE-MIB', 'cMTPathSpecifierSourceAddrType'), ('CISCO-MEDIATRACE-MIB', 'cMTPathSpecifierSourceAddr'), ('CISCO-MEDIATRACE-MIB', 'cMTPathSpecifierSourcePort'), ('CISCO-MEDIATRACE-MIB', 'cMTPathSpecifierProtocolForDiscovery'), ('CISCO-MEDIATRACE-MIB', 'cMTPathSpecifierGatewayAddrType'), ('CISCO-MEDIATRACE-MIB', 'cMTPathSpecifierGatewayAddr'), ('CISCO-MEDIATRACE-MIB', 'cMTPathSpecifierGatewayVlanId'), ('CISCO-MEDIATRACE-MIB', 'cMTPathSpecifierIpProtocol'), ('CISCO-MEDIATRACE-MIB', 'cMTSessionParamsResponseTimeout'), ('CISCO-MEDIATRACE-MIB', 'cMTSessionParamsFrequency'), ('CISCO-MEDIATRACE-MIB', 'cMTSessionParamsHistoryBuckets'), ('CISCO-MEDIATRACE-MIB', 'cMTSessionParamsInactivityTimeout'), ('CISCO-MEDIATRACE-MIB', 'cMTSessionParamsRouteChangeReactiontime'), ('CISCO-MEDIATRACE-MIB', 'cMTSessionParamsRowStatus'), ('CISCO-MEDIATRACE-MIB', 'cMTSessionPathSpecifierName'), ('CISCO-MEDIATRACE-MIB', 'cMTMediaMonitorProfileRtpMaxDropout'), ('CISCO-MEDIATRACE-MIB', 'cMTMediaMonitorProfileRtpMaxReorder'), ('CISCO-MEDIATRACE-MIB', 'cMTMediaMonitorProfileRtpMinimalSequential'), ('CISCO-MEDIATRACE-MIB', 'cMTMediaMonitorProfileInterval'), ('CISCO-MEDIATRACE-MIB', 'cMTMediaMonitorProfileRowStatus'), ('CISCO-MEDIATRACE-MIB', 'cMTSessionFlowSpecifierName'), ('CISCO-MEDIATRACE-MIB', 'cMTSessionParamName'), ('CISCO-MEDIATRACE-MIB', 'cMTSessionProfileName'), ('CISCO-MEDIATRACE-MIB', 'cMTSessionRequestStatsRouteIndex'), ('CISCO-MEDIATRACE-MIB', 'cMTSessionRequestStatsTracerouteStatus'), ('CISCO-MEDIATRACE-MIB', 'cMTSessionRowStatus'), ('CISCO-MEDIATRACE-MIB', 'cMTScheduleLife'), ('CISCO-MEDIATRACE-MIB', 'cMTScheduleStartTime'), ('CISCO-MEDIATRACE-MIB', 'cMTScheduleEntryAgeout'), ('CISCO-MEDIATRACE-MIB', 'cMTScheduleRowStatus'), ('CISCO-MEDIATRACE-MIB', 'cMTSystemProfileMetric'), ('CISCO-MEDIATRACE-MIB', 'cMTSystemProfileRowStatus'), ('CISCO-MEDIATRACE-MIB', 'cMTHopStatsMediatraceTtl'), ('CISCO-MEDIATRACE-MIB', 'cMTHopStatsName'), ('CISCO-MEDIATRACE-MIB', 'cMTHopStatsCollectionStatus'), ('CISCO-MEDIATRACE-MIB', 'cMTHopStatsIngressInterface'), ('CISCO-MEDIATRACE-MIB', 'cMTHopStatsEgressInterface'), ('CISCO-MEDIATRACE-MIB', 'cMTPathHopType'), ('CISCO-MEDIATRACE-MIB', 'cMTPathHopAddrType'), ('CISCO-MEDIATRACE-MIB', 'cMTPathHopAddr'), ('CISCO-MEDIATRACE-MIB', 'cMTPathHopAlternate1AddrType'), ('CISCO-MEDIATRACE-MIB', 'cMTPathHopAlternate1Addr'), ('CISCO-MEDIATRACE-MIB', 'cMTPathHopAlternate2AddrType'), ('CISCO-MEDIATRACE-MIB', 'cMTPathHopAlternate2Addr'), ('CISCO-MEDIATRACE-MIB', 'cMTPathHopAlternate3AddrType'), ('CISCO-MEDIATRACE-MIB', 'cMTPathHopAlternate3Addr'), ('CISCO-MEDIATRACE-MIB', 'cMTTraceRouteHopNumber'), ('CISCO-MEDIATRACE-MIB', 'cMTTraceRouteHopRtt'), ('CISCO-MEDIATRACE-MIB', 'cMTSessionRequestStatsRequestTimestamp'), ('CISCO-MEDIATRACE-MIB', 'cMTSessionRequestStatsRequestStatus'), ('CISCO-MEDIATRACE-MIB', 'cMTSessionRequestStatsNumberOfMediatraceHops'), ('CISCO-MEDIATRACE-MIB', 'cMTSessionRequestStatsNumberOfValidHops'), ('CISCO-MEDIATRACE-MIB', 'cMTSessionRequestStatsNumberOfErrorHops'), ('CISCO-MEDIATRACE-MIB', 'cMTSessionRequestStatsNumberOfNoDataRecordHops'), ('CISCO-MEDIATRACE-MIB', 'cMTSessionRequestStatsNumberOfNonMediatraceHops'), ('CISCO-MEDIATRACE-MIB', 'cMTCommonMetricsIpPktDropped'), ('CISCO-MEDIATRACE-MIB', 'cMTCommonMetricsIpOctets'), ('CISCO-MEDIATRACE-MIB', 'cMTCommonMetricsIpPktCount'), ('CISCO-MEDIATRACE-MIB', 'cMTCommonMetricsIpByteRate'), ('CISCO-MEDIATRACE-MIB', 'cMTCommonMetricsIpDscp'), ('CISCO-MEDIATRACE-MIB', 'cMTCommonMetricsIpTtl'), ('CISCO-MEDIATRACE-MIB', 'cMTCommonMetricsFlowCounter'), ('CISCO-MEDIATRACE-MIB', 'cMTCommonMetricsFlowDirection'), ('CISCO-MEDIATRACE-MIB', 'cMTCommonMetricsLossMeasurement'), ('CISCO-MEDIATRACE-MIB', 'cMTCommonMetricsMediaStopOccurred'), ('CISCO-MEDIATRACE-MIB', 'cMTCommonMetricsRouteForward'), ('CISCO-MEDIATRACE-MIB', 'cMTCommonMetricsIpProtocol'), ('CISCO-MEDIATRACE-MIB', 'cMTRtpMetricsBitRate'), ('CISCO-MEDIATRACE-MIB', 'cMTRtpMetricsOctets'), ('CISCO-MEDIATRACE-MIB', 'cMTRtpMetricsPkts'), ('CISCO-MEDIATRACE-MIB', 'cMTRtpMetricsJitter'), ('CISCO-MEDIATRACE-MIB', 'cMTRtpMetricsLostPkts'), ('CISCO-MEDIATRACE-MIB', 'cMTRtpMetricsExpectedPkts'), ('CISCO-MEDIATRACE-MIB', 'cMTRtpMetricsLostPktEvents'), ('CISCO-MEDIATRACE-MIB', 'cMTRtpMetricsLossPercent'), ('CISCO-MEDIATRACE-MIB', 'cMTTcpMetricMediaByteCount'), ('CISCO-MEDIATRACE-MIB', 'cMTTcpMetricConnectRoundTripDelay'), ('CISCO-MEDIATRACE-MIB', 'cMTTcpMetricLostEventCount'), ('CISCO-MEDIATRACE-MIB', 'cMTSystemMetricCpuOneMinuteUtilization'), ('CISCO-MEDIATRACE-MIB', 'cMTSystemMetricCpuFiveMinutesUtilization'), ('CISCO-MEDIATRACE-MIB', 'cMTSystemMetricMemoryUtilization'), ('CISCO-MEDIATRACE-MIB', 'cMTInterfaceOutSpeed'), ('CISCO-MEDIATRACE-MIB', 'cMTInterfaceInSpeed'), ('CISCO-MEDIATRACE-MIB', 'cMTInterfaceOutDiscards'), ('CISCO-MEDIATRACE-MIB', 'cMTInterfaceInDiscards'), ('CISCO-MEDIATRACE-MIB', 'cMTInterfaceOutErrors'), ('CISCO-MEDIATRACE-MIB', 'cMTInterfaceInErrors'), ('CISCO-MEDIATRACE-MIB', 'cMTInterfaceOutOctets'), ('CISCO-MEDIATRACE-MIB', 'cMTInterfaceInOctets'), ('CISCO-MEDIATRACE-MIB', 'cMTMediaMonitorProfileMetric'), ('CISCO-MEDIATRACE-MIB', 'cMTSessionTraceRouteEnabled'), ('CISCO-MEDIATRACE-MIB', 'cMTScheduleRecurring'), ('CISCO-MEDIATRACE-MIB', 'cMTFlowSpecifierMetadataGlobalId'), ('CISCO-MEDIATRACE-MIB', 'cMTPathSpecifierMetadataGlobalId'), ('CISCO-MEDIATRACE-MIB', 'cMTHopStatsMaskBitmaps'), ('CISCO-MEDIATRACE-MIB', 'cMTSessionStatusBitmaps'), ('CISCO-MEDIATRACE-MIB', 'cMTCommonMetricsBitmaps'), ('CISCO-MEDIATRACE-MIB', 'cMTRtpMetricsBitmaps'), ('CISCO-MEDIATRACE-MIB', 'cMTTcpMetricBitmaps'), ('CISCO-MEDIATRACE-MIB', 'cMTSystemMetricBitmaps'), ('CISCO-MEDIATRACE-MIB', 'cMTInterfaceBitmaps'), ('CISCO-MEDIATRACE-MIB', 'cMTSessionStatusOperationState'), ('CISCO-MEDIATRACE-MIB', 'cMTSessionStatusOperationTimeToLive'), ('CISCO-MEDIATRACE-MIB', 'cMTSessionStatusGlobalSessionId'), ('CISCO-MEDIATRACE-MIB', 'cMTSessionRequestStatsBitmaps'), ('CISCO-MEDIATRACE-MIB', 'cMTSessionRequestStatsMDGlobalId'), ('CISCO-MEDIATRACE-MIB', 'cMTSessionRequestStatsMDMultiPartySessionId'), ('CISCO-MEDIATRACE-MIB', 'cMTSessionRequestStatsMDAppName'), ('CISCO-MEDIATRACE-MIB', 'cMTInitiatorEnable'), ('CISCO-MEDIATRACE-MIB', 'cMTInitiatorSourceInterface'), ('CISCO-MEDIATRACE-MIB', 'cMTInitiatorSourceAddressType'), ('CISCO-MEDIATRACE-MIB', 'cMTInitiatorSourceAddress'), ('CISCO-MEDIATRACE-MIB', 'cMTInitiatorMaxSessions'), ('CISCO-MEDIATRACE-MIB', 'cMTInitiatorSoftwareVersionMajor'), ('CISCO-MEDIATRACE-MIB', 'cMTInitiatorProtocolVersionMajor'), ('CISCO-MEDIATRACE-MIB', 'cMTInitiatorConfiguredSessions'), ('CISCO-MEDIATRACE-MIB', 'cMTInitiatorPendingSessions'), ('CISCO-MEDIATRACE-MIB', 'cMTInitiatorInactiveSessions'), ('CISCO-MEDIATRACE-MIB', 'cMTInitiatorActiveSessions'), ('CISCO-MEDIATRACE-MIB', 'cMTResponderEnable'), ('CISCO-MEDIATRACE-MIB', 'cMTResponderMaxSessions'), ('CISCO-MEDIATRACE-MIB', 'cMTResponderActiveSessions'), ('CISCO-MEDIATRACE-MIB', 'cMTInitiatorSoftwareVersionMinor'), ('CISCO-MEDIATRACE-MIB', 'cMTInitiatorProtocolVersionMinor'), ('CISCO-MEDIATRACE-MIB', 'cMTCommonMetricsFlowSamplingStartTime'))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
cisco_mediatrace_mib_main_object_group = ciscoMediatraceMIBMainObjectGroup.setStatus('current')
if mibBuilder.loadTexts:
ciscoMediatraceMIBMainObjectGroup.setDescription('The is a object group.')
mibBuilder.exportSymbols('CISCO-MEDIATRACE-MIB', cMTResponderActiveSessions=cMTResponderActiveSessions, cMTFlowSpecifierSourcePort=cMTFlowSpecifierSourcePort, cMTSessionRequestStatsNumberOfNoDataRecordHops=cMTSessionRequestStatsNumberOfNoDataRecordHops, cMTRtpMetricStatsTable=cMTRtpMetricStatsTable, cMTRtpMetricsLossPercent=cMTRtpMetricsLossPercent, cMTPathHopAddrType=cMTPathHopAddrType, cMTSessionStatusGlobalSessionId=cMTSessionStatusGlobalSessionId, cMTInitiatorActiveSessions=cMTInitiatorActiveSessions, cMTSessionRequestStatsNumberOfNonMediatraceHops=cMTSessionRequestStatsNumberOfNonMediatraceHops, cMTSessionParamsHistoryBuckets=cMTSessionParamsHistoryBuckets, cMTHopStatsEgressInterface=cMTHopStatsEgressInterface, cMTMediaMonitorProfileName=cMTMediaMonitorProfileName, cMTPathHopAlternate1Addr=cMTPathHopAlternate1Addr, cMTHopStatsEntry=cMTHopStatsEntry, cMTPathSpecifierEntry=cMTPathSpecifierEntry, cMTTraceRouteEntry=cMTTraceRouteEntry, cMTSessionFlowSpecifierName=cMTSessionFlowSpecifierName, cMTSessionStatusBitmaps=cMTSessionStatusBitmaps, cMTInitiatorSourceAddressType=cMTInitiatorSourceAddressType, cMTRtpMetricsBitRate=cMTRtpMetricsBitRate, cMTSessionRequestStatsMDGlobalId=cMTSessionRequestStatsMDGlobalId, cMTInterfaceOutSpeed=cMTInterfaceOutSpeed, cMTFlowSpecifierRowStatus=cMTFlowSpecifierRowStatus, cMTSystemProfileEntry=cMTSystemProfileEntry, cMTInitiatorSourceAddress=cMTInitiatorSourceAddress, cMTSessionParamsEntry=cMTSessionParamsEntry, cMTSessionParamsFrequency=cMTSessionParamsFrequency, cMTInitiatorProtocolVersionMinor=cMTInitiatorProtocolVersionMinor, CiscoNTPTimeStamp=CiscoNTPTimeStamp, cMTSystemMetricBitmaps=cMTSystemMetricBitmaps, cMTTcpMetricMediaByteCount=cMTTcpMetricMediaByteCount, cMTSessionRequestStatsRequestStatus=cMTSessionRequestStatsRequestStatus, cMTRtpMetricsBitmaps=cMTRtpMetricsBitmaps, ciscoMediatraceMIB=ciscoMediatraceMIB, cMTInterfaceInSpeed=cMTInterfaceInSpeed, cMTInitiatorConfiguredSessions=cMTInitiatorConfiguredSessions, cMTHopStatsMediatraceTtl=cMTHopStatsMediatraceTtl, cMTPathSpecifierDestPort=cMTPathSpecifierDestPort, cMTHopStatsCollectionStatus=cMTHopStatsCollectionStatus, cMTSessionParamsResponseTimeout=cMTSessionParamsResponseTimeout, ciscoMediatraceMIBNotifs=ciscoMediatraceMIBNotifs, cMTTcpMetricStatsEntry=cMTTcpMetricStatsEntry, cMTInterfaceMetricStatsTable=cMTInterfaceMetricStatsTable, cMTSessionParamName=cMTSessionParamName, cMTSessionLifeNumber=cMTSessionLifeNumber, cMTScheduleLife=cMTScheduleLife, cMTTcpMetricStatsTable=cMTTcpMetricStatsTable, cMTBucketNumber=cMTBucketNumber, cMTResponderMaxSessions=cMTResponderMaxSessions, cMTScheduleTable=cMTScheduleTable, cMTSessionRequestStatsRequestTimestamp=cMTSessionRequestStatsRequestTimestamp, cMTPathTable=cMTPathTable, cMTRtpMetricsLostPkts=cMTRtpMetricsLostPkts, ciscoMediatraceMIBGroups=ciscoMediatraceMIBGroups, cMTFlowSpecifierDestAddrType=cMTFlowSpecifierDestAddrType, cMTCommonMetricsMediaStopOccurred=cMTCommonMetricsMediaStopOccurred, cMTCommonMetricStatsTable=cMTCommonMetricStatsTable, cMTPathEntry=cMTPathEntry, cMTInitiatorMaxSessions=cMTInitiatorMaxSessions, cMTInterfaceInOctets=cMTInterfaceInOctets, cMTFlowSpecifierTable=cMTFlowSpecifierTable, cMTHopStatsMaskBitmaps=cMTHopStatsMaskBitmaps, cMTSessionRequestStatsMDAppName=cMTSessionRequestStatsMDAppName, cMTSessionPathSpecifierName=cMTSessionPathSpecifierName, cMTMediaMonitorProfileRowStatus=cMTMediaMonitorProfileRowStatus, cMTPathSpecifierProtocolForDiscovery=cMTPathSpecifierProtocolForDiscovery, cMTCtrl=cMTCtrl, cMTFlowSpecifierEntry=cMTFlowSpecifierEntry, cMTCommonMetricsBitmaps=cMTCommonMetricsBitmaps, cMTInitiatorPendingSessions=cMTInitiatorPendingSessions, cMTSystemProfileTable=cMTSystemProfileTable, CiscoMediatraceDiscoveryProtocol=CiscoMediatraceDiscoveryProtocol, cMTFlowSpecifierName=cMTFlowSpecifierName, cMTCommonMetricsIpOctets=cMTCommonMetricsIpOctets, cMTSystemProfileMetric=cMTSystemProfileMetric, cMTHopStatsIngressInterface=cMTHopStatsIngressInterface, cMTHopStatsAddr=cMTHopStatsAddr, cMTPathSpecifierGatewayAddrType=cMTPathSpecifierGatewayAddrType, CiscoMediatraceSupportProtocol=CiscoMediatraceSupportProtocol, cMTPathSpecifierIpProtocol=cMTPathSpecifierIpProtocol, cMTSessionRowStatus=cMTSessionRowStatus, cMTFlowSpecifierIpProtocol=cMTFlowSpecifierIpProtocol, cMTTcpMetricBitmaps=cMTTcpMetricBitmaps, cMTSystemMetricCpuFiveMinutesUtilization=cMTSystemMetricCpuFiveMinutesUtilization, cMTSessionNumber=cMTSessionNumber, cMTPathSpecifierSourceAddrType=cMTPathSpecifierSourceAddrType, cMTInitiatorSoftwareVersionMajor=cMTInitiatorSoftwareVersionMajor, cMTSessionRequestStatsNumberOfErrorHops=cMTSessionRequestStatsNumberOfErrorHops, cMTMediaMonitorProfileRtpMaxReorder=cMTMediaMonitorProfileRtpMaxReorder, cMTSessionParamsRowStatus=cMTSessionParamsRowStatus, cMTHopStatsAddrType=cMTHopStatsAddrType, cMTMediaMonitorProfileEntry=cMTMediaMonitorProfileEntry, cMTInterfaceOutDiscards=cMTInterfaceOutDiscards, cMTSessionParamsRouteChangeReactiontime=cMTSessionParamsRouteChangeReactiontime, cMTRtpMetricsPkts=cMTRtpMetricsPkts, cMTSessionParamsName=cMTSessionParamsName, cMTResponderEnable=cMTResponderEnable, cMTSessionTable=cMTSessionTable, cMTTraceRouteHopNumber=cMTTraceRouteHopNumber, cMTPathSpecifierDestAddr=cMTPathSpecifierDestAddr, cMTInitiatorProtocolVersionMajor=cMTInitiatorProtocolVersionMajor, cMTPathHopAddr=cMTPathHopAddr, cMTSessionStatusTable=cMTSessionStatusTable, cMTSystemMetricStatsTable=cMTSystemMetricStatsTable, cMTInterfaceMetricStatsEntry=cMTInterfaceMetricStatsEntry, cMTTraceRouteHopRtt=cMTTraceRouteHopRtt, cMTSessionRequestStatsNumberOfMediatraceHops=cMTSessionRequestStatsNumberOfMediatraceHops, cMTSessionParamsInactivityTimeout=cMTSessionParamsInactivityTimeout, cMTSystemProfileRowStatus=cMTSystemProfileRowStatus, cMTFlowSpecifierSourceAddrType=cMTFlowSpecifierSourceAddrType, cMTPathHopNumber=cMTPathHopNumber, cMTSessionRequestStatsNumberOfValidHops=cMTSessionRequestStatsNumberOfValidHops, cMTScheduleRowStatus=cMTScheduleRowStatus, cMTCommonMetricsIpTtl=cMTCommonMetricsIpTtl, cMTSessionTraceRouteEnabled=cMTSessionTraceRouteEnabled, cMTSessionRequestStatsTracerouteStatus=cMTSessionRequestStatsTracerouteStatus, cMTRtpMetricsOctets=cMTRtpMetricsOctets, cMTSystemMetricCpuOneMinuteUtilization=cMTSystemMetricCpuOneMinuteUtilization, cMTSessionStatusOperationState=cMTSessionStatusOperationState, ciscoMediatraceMIBCompliances=ciscoMediatraceMIBCompliances, cMTPathSpecifierRowStatus=cMTPathSpecifierRowStatus, cMTCommonMetricsIpPktCount=cMTCommonMetricsIpPktCount, cMTPathSpecifierGatewayAddr=cMTPathSpecifierGatewayAddr, cMTInterfaceBitmaps=cMTInterfaceBitmaps, cMTFlowSpecifierMetadataGlobalId=cMTFlowSpecifierMetadataGlobalId, cMTPathHopAlternate2AddrType=cMTPathHopAlternate2AddrType, cMTSessionRequestStatsRouteIndex=cMTSessionRequestStatsRouteIndex, cMTPathSpecifierName=cMTPathSpecifierName, cMTTcpMetricConnectRoundTripDelay=cMTTcpMetricConnectRoundTripDelay, cMTCommonMetricsRouteForward=cMTCommonMetricsRouteForward, cMTSessionRequestStatsTable=cMTSessionRequestStatsTable, cMTSystemMetricStatsEntry=cMTSystemMetricStatsEntry, cMTPathHopAlternate3Addr=cMTPathHopAlternate3Addr, cMTPathHopAlternate1AddrType=cMTPathHopAlternate1AddrType, cMTCommonMetricsIpDscp=cMTCommonMetricsIpDscp, ciscoMediatraceMIBObjects=ciscoMediatraceMIBObjects, cMTPathSpecifierGatewayVlanId=cMTPathSpecifierGatewayVlanId, cMTTraceRouteTable=cMTTraceRouteTable, cMTPathSpecifierMetadataGlobalId=cMTPathSpecifierMetadataGlobalId, cMTPathSpecifierDestAddrType=cMTPathSpecifierDestAddrType, cMTSessionRequestStatsMDMultiPartySessionId=cMTSessionRequestStatsMDMultiPartySessionId, cMTPathHopType=cMTPathHopType, cMTPathHopAlternate3AddrType=cMTPathHopAlternate3AddrType, cMTMediaMonitorProfileMetric=cMTMediaMonitorProfileMetric, cMTPathSpecifierTable=cMTPathSpecifierTable, cMTStats=cMTStats, cMTSessionStatusEntry=cMTSessionStatusEntry, cMTPathSpecifierSourcePort=cMTPathSpecifierSourcePort, cMTSessionRequestStatsEntry=cMTSessionRequestStatsEntry, ciscoMediatraceMIBMainObjectGroup=ciscoMediatraceMIBMainObjectGroup, cMTCommonMetricsFlowCounter=cMTCommonMetricsFlowCounter, cMTHopStatsName=cMTHopStatsName, cMTSystemMetricMemoryUtilization=cMTSystemMetricMemoryUtilization, cMTFlowSpecifierSourceAddr=cMTFlowSpecifierSourceAddr, PYSNMP_MODULE_ID=ciscoMediatraceMIB, cMTMediaMonitorProfileTable=cMTMediaMonitorProfileTable, ciscoMediatraceMIBConform=ciscoMediatraceMIBConform, cMTMediaMonitorProfileInterval=cMTMediaMonitorProfileInterval, cMTCommonMetricStatsEntry=cMTCommonMetricStatsEntry, cMTRtpMetricsExpectedPkts=cMTRtpMetricsExpectedPkts, cMTFlowSpecifierDestAddr=cMTFlowSpecifierDestAddr, cMTCommonMetricsFlowSamplingStartTime=cMTCommonMetricsFlowSamplingStartTime, cMTInitiatorSoftwareVersionMinor=cMTInitiatorSoftwareVersionMinor, cMTPathHopAlternate2Addr=cMTPathHopAlternate2Addr, cMTSessionProfileName=cMTSessionProfileName, cMTCommonMetricsIpProtocol=cMTCommonMetricsIpProtocol, cMTFlowSpecifierDestPort=cMTFlowSpecifierDestPort, cMTPathSpecifierSourceAddr=cMTPathSpecifierSourceAddr, cMTCommonMetricsFlowDirection=cMTCommonMetricsFlowDirection, cMTSessionStatusOperationTimeToLive=cMTSessionStatusOperationTimeToLive, cMTSessionRequestStatsBitmaps=cMTSessionRequestStatsBitmaps, cMTInterfaceInErrors=cMTInterfaceInErrors, cMTHopStatsTable=cMTHopStatsTable, cMTInterfaceInDiscards=cMTInterfaceInDiscards, cMTScheduleRecurring=cMTScheduleRecurring, cMTSessionParamsTable=cMTSessionParamsTable, cMTCommonMetricsIpByteRate=cMTCommonMetricsIpByteRate, cMTInitiatorInactiveSessions=cMTInitiatorInactiveSessions, cMTSystemProfileName=cMTSystemProfileName, cMTInterfaceOutOctets=cMTInterfaceOutOctets, cMTScheduleEntryAgeout=cMTScheduleEntryAgeout, cMTCommonMetricsLossMeasurement=cMTCommonMetricsLossMeasurement, cMTRtpMetricsJitter=cMTRtpMetricsJitter, cMTInterfaceOutErrors=cMTInterfaceOutErrors, cMTRtpMetricStatsEntry=cMTRtpMetricStatsEntry, cMTScheduleEntry=cMTScheduleEntry, cMTInitiatorSourceInterface=cMTInitiatorSourceInterface, cMTTcpMetricLostEventCount=cMTTcpMetricLostEventCount, cMTSessionEntry=cMTSessionEntry, cMTMediaMonitorProfileRtpMaxDropout=cMTMediaMonitorProfileRtpMaxDropout, ciscoMediatraceMIBCompliance=ciscoMediatraceMIBCompliance, cMTMediaMonitorProfileRtpMinimalSequential=cMTMediaMonitorProfileRtpMinimalSequential, cMTInitiatorEnable=cMTInitiatorEnable, cMTScheduleStartTime=cMTScheduleStartTime, cMTCommonMetricsIpPktDropped=cMTCommonMetricsIpPktDropped, cMTRtpMetricsLostPktEvents=cMTRtpMetricsLostPktEvents) |
# %% [1128. Number of Equivalent Domino Pairs](https://leetcode.com/problems/number-of-equivalent-domino-pairs/)
class Solution:
def numEquivDominoPairs(self, dominoes: List[List[int]]) -> int:
c = collections.Counter(tuple(sorted(i)) for i in dominoes)
return sum(n * (n - 1) // 2 for n in c.values())
| class Solution:
def num_equiv_domino_pairs(self, dominoes: List[List[int]]) -> int:
c = collections.Counter((tuple(sorted(i)) for i in dominoes))
return sum((n * (n - 1) // 2 for n in c.values())) |
print("hi\nmyname is : abdullah")
print("And in this code we will do ")
#Files
print("Files")
#______________________#
with open("information.txt" , "r") as f:
print(f.read()) | print('hi\nmyname is : abdullah')
print('And in this code we will do ')
print('Files')
with open('information.txt', 'r') as f:
print(f.read()) |
def canTransform1(start, end):
startX = "".join([c for c in start if c != "X"])
endX = "".join([c for c in end if c != "X"])
if startX != endX: return False
startR = [i for i in range(len(start)) if start[i] == "R"]
startL = [i for i in range(len(start)) if start[i] == "L"]
endR = [i for i in range(len(end)) if end[i] == "R"]
endL = [i for i in range(len(end)) if end[i] == "L"]
for s, e in zip(startR, endR):
if s > e: return False
for s, e in zip(startL, endL):
if s < e: return False
return True
def canTransform2(start, end):
n = len(start)
i, j = 0, 0
while i < n or j < n:
while i < n and start[i] == "X": i += 1
while j < n and end[j] == "X": j += 1
if (i < n) != (j < n): return False
if i < n and j < n:
if (start[i] != end[j]) or (start[i] == "L" and i < j) or (end[j] == "R" and i > j):
return False
i += 1
j += 1
return True
print(canTransform1("RXXLRXRXL", "XRLXXRRLX")) # True
print(canTransform2("RXXLRXRXL", "XRLXXRRLX")) # True
print(canTransform1("XXXXXLXXXX", "LXXXXXXXXX")) # True
print(canTransform2("XXXXXLXXXX", "LXXXXXXXXX")) # True
print(canTransform1("RXR", "XXR")) # False
print(canTransform2("RXR", "XXR")) # False | def can_transform1(start, end):
start_x = ''.join([c for c in start if c != 'X'])
end_x = ''.join([c for c in end if c != 'X'])
if startX != endX:
return False
start_r = [i for i in range(len(start)) if start[i] == 'R']
start_l = [i for i in range(len(start)) if start[i] == 'L']
end_r = [i for i in range(len(end)) if end[i] == 'R']
end_l = [i for i in range(len(end)) if end[i] == 'L']
for (s, e) in zip(startR, endR):
if s > e:
return False
for (s, e) in zip(startL, endL):
if s < e:
return False
return True
def can_transform2(start, end):
n = len(start)
(i, j) = (0, 0)
while i < n or j < n:
while i < n and start[i] == 'X':
i += 1
while j < n and end[j] == 'X':
j += 1
if (i < n) != (j < n):
return False
if i < n and j < n:
if start[i] != end[j] or (start[i] == 'L' and i < j) or (end[j] == 'R' and i > j):
return False
i += 1
j += 1
return True
print(can_transform1('RXXLRXRXL', 'XRLXXRRLX'))
print(can_transform2('RXXLRXRXL', 'XRLXXRRLX'))
print(can_transform1('XXXXXLXXXX', 'LXXXXXXXXX'))
print(can_transform2('XXXXXLXXXX', 'LXXXXXXXXX'))
print(can_transform1('RXR', 'XXR'))
print(can_transform2('RXR', 'XXR')) |
n = int(input())
lst = sorted([int(input()) for i in range(n)])
ans = sorted(set(range(lst[0], lst[len(lst) - 1])).difference(lst))
if lst[0] > 1:
for i in range(1, lst[0]):
ans.append(i)
if (len(ans) != 0):
print(*sorted(ans), sep='\n')
else:
print("good job")
| n = int(input())
lst = sorted([int(input()) for i in range(n)])
ans = sorted(set(range(lst[0], lst[len(lst) - 1])).difference(lst))
if lst[0] > 1:
for i in range(1, lst[0]):
ans.append(i)
if len(ans) != 0:
print(*sorted(ans), sep='\n')
else:
print('good job') |
#
# PySNMP MIB module HH3C-RCR-MIB (http://snmplabs.com/pysmi)
# ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/HH3C-RCR-MIB
# Produced by pysmi-0.3.4 at Wed May 1 13:29:21 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)
#
Integer, OctetString, ObjectIdentifier = mibBuilder.importSymbols("ASN1", "Integer", "OctetString", "ObjectIdentifier")
NamedValues, = mibBuilder.importSymbols("ASN1-ENUMERATION", "NamedValues")
ConstraintsUnion, ValueRangeConstraint, SingleValueConstraint, ValueSizeConstraint, ConstraintsIntersection = mibBuilder.importSymbols("ASN1-REFINEMENT", "ConstraintsUnion", "ValueRangeConstraint", "SingleValueConstraint", "ValueSizeConstraint", "ConstraintsIntersection")
hh3cCommon, = mibBuilder.importSymbols("HH3C-OID-MIB", "hh3cCommon")
InterfaceIndex, = mibBuilder.importSymbols("IF-MIB", "InterfaceIndex")
InetAddress, InetAddressType = mibBuilder.importSymbols("INET-ADDRESS-MIB", "InetAddress", "InetAddressType")
NotificationGroup, ModuleCompliance = mibBuilder.importSymbols("SNMPv2-CONF", "NotificationGroup", "ModuleCompliance")
Counter32, ModuleIdentity, Integer32, IpAddress, Bits, Unsigned32, Counter64, iso, TimeTicks, NotificationType, ObjectIdentity, Gauge32, MibScalar, MibTable, MibTableRow, MibTableColumn, MibIdentifier = mibBuilder.importSymbols("SNMPv2-SMI", "Counter32", "ModuleIdentity", "Integer32", "IpAddress", "Bits", "Unsigned32", "Counter64", "iso", "TimeTicks", "NotificationType", "ObjectIdentity", "Gauge32", "MibScalar", "MibTable", "MibTableRow", "MibTableColumn", "MibIdentifier")
DisplayString, TextualConvention = mibBuilder.importSymbols("SNMPv2-TC", "DisplayString", "TextualConvention")
hh3cRcr = ModuleIdentity((1, 3, 6, 1, 4, 1, 25506, 2, 48))
hh3cRcr.setRevisions(('2005-06-28 19:36',))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
if mibBuilder.loadTexts: hh3cRcr.setRevisionsDescriptions(('The modified revision of this MIB module. Rewrite the whole MIB.',))
if mibBuilder.loadTexts: hh3cRcr.setLastUpdated('200506281936Z')
if mibBuilder.loadTexts: hh3cRcr.setOrganization('Hangzhou H3C Tech. Co., Ltd.')
if mibBuilder.loadTexts: hh3cRcr.setContactInfo('Platform Team Hangzhou H3C Tech. Co., Ltd. Hai-Dian District Beijing P.R. China http://www.h3c.com Zip:100085 ')
if mibBuilder.loadTexts: hh3cRcr.setDescription("This MIB is applicable to router-devices. It's made for RCR (Resilient Controllable Routing). RCR provides an effective resolution which can dynamically auto-adjust outbound traffic to the optimal external interface by monitoring the performance and traffic load of each external interface. It provides the functions of intelligentized traffic load distribution and the optimal external interface selection. This can optimally utilize the external interfaces. Furthermore, RCR realized the function which can select the optimal external interface based on different classes of operation flow.")
hh3cRcrMR = MibIdentifier((1, 3, 6, 1, 4, 1, 25506, 2, 48, 1))
hh3cRcrMRGroup = MibIdentifier((1, 3, 6, 1, 4, 1, 25506, 2, 48, 1, 1))
hh3cRcrMRAllMaxUsedBandRate = MibScalar((1, 3, 6, 1, 4, 1, 25506, 2, 48, 1, 1, 1), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 100))).setUnits('%').setMaxAccess("readwrite")
if mibBuilder.loadTexts: hh3cRcrMRAllMaxUsedBandRate.setStatus('current')
if mibBuilder.loadTexts: hh3cRcrMRAllMaxUsedBandRate.setDescription('The max used band rate of all external interfaces on member router-devices(MRs) which are controlled by RCR.')
hh3cRcrMRAllMinUsedBandRate = MibScalar((1, 3, 6, 1, 4, 1, 25506, 2, 48, 1, 1, 2), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 100))).setUnits('%').setMaxAccess("readwrite")
if mibBuilder.loadTexts: hh3cRcrMRAllMinUsedBandRate.setStatus('current')
if mibBuilder.loadTexts: hh3cRcrMRAllMinUsedBandRate.setDescription('The min used band rate of all external interfaces on MRs which are controlled by RCR.')
hh3cRcrMRListenTime = MibScalar((1, 3, 6, 1, 4, 1, 25506, 2, 48, 1, 1, 3), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 1440))).setUnits('minute').setMaxAccess("readwrite")
if mibBuilder.loadTexts: hh3cRcrMRListenTime.setStatus('current')
if mibBuilder.loadTexts: hh3cRcrMRListenTime.setDescription('The persistent time of a probe on member router-device(MR) which is controlled by RCR.')
hh3cRcrMRStateTable = MibTable((1, 3, 6, 1, 4, 1, 25506, 2, 48, 1, 2), )
if mibBuilder.loadTexts: hh3cRcrMRStateTable.setStatus('current')
if mibBuilder.loadTexts: hh3cRcrMRStateTable.setDescription('This table contains state information of each MR which is controlled by RCR.')
hh3cRcrMRStateEntry = MibTableRow((1, 3, 6, 1, 4, 1, 25506, 2, 48, 1, 2, 1), ).setIndexNames((0, "HH3C-RCR-MIB", "hh3cRcrMRName"))
if mibBuilder.loadTexts: hh3cRcrMRStateEntry.setStatus('current')
if mibBuilder.loadTexts: hh3cRcrMRStateEntry.setDescription('Entry items')
hh3cRcrMRName = MibTableColumn((1, 3, 6, 1, 4, 1, 25506, 2, 48, 1, 2, 1, 1), OctetString().subtype(subtypeSpec=ValueSizeConstraint(1, 32)))
if mibBuilder.loadTexts: hh3cRcrMRName.setStatus('current')
if mibBuilder.loadTexts: hh3cRcrMRName.setDescription('The name of MR which is controlled by RCR.')
hh3cRcrMRState = MibTableColumn((1, 3, 6, 1, 4, 1, 25506, 2, 48, 1, 2, 1, 2), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3))).clone(namedValues=NamedValues(("down", 1), ("up", 2), ("controlled", 3)))).setMaxAccess("readonly")
if mibBuilder.loadTexts: hh3cRcrMRState.setStatus('current')
if mibBuilder.loadTexts: hh3cRcrMRState.setDescription('The state of MR where identified on the controller router-device(CR). down: The MR has been enabled but has not connected to the CR with TCP connection. up: The MR has already successfully connected to the CR but has not been ready for adjusting route. controlled: The MR has already passed the consultation with the CR and could be controlled by it.')
hh3cRcrMRAuthType = MibTableColumn((1, 3, 6, 1, 4, 1, 25506, 2, 48, 1, 2, 1, 3), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("simple", 1), ("md5", 2)))).setMaxAccess("readwrite")
if mibBuilder.loadTexts: hh3cRcrMRAuthType.setStatus('current')
if mibBuilder.loadTexts: hh3cRcrMRAuthType.setDescription('The authentication type of communication packet between CR and MR.')
hh3cRcrMRAuthPwd = MibTableColumn((1, 3, 6, 1, 4, 1, 25506, 2, 48, 1, 2, 1, 4), OctetString()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: hh3cRcrMRAuthPwd.setStatus('current')
if mibBuilder.loadTexts: hh3cRcrMRAuthPwd.setDescription('The authentication password of communication packet between CR and MR. Reading this object always results in an OCTET STRING of length zero; authentication may not be bypassed by reading the MIB object.')
hh3cRcrMROutIfStateTable = MibTable((1, 3, 6, 1, 4, 1, 25506, 2, 48, 1, 3), )
if mibBuilder.loadTexts: hh3cRcrMROutIfStateTable.setStatus('current')
if mibBuilder.loadTexts: hh3cRcrMROutIfStateTable.setDescription('This table contains the external interface states of each MR which is controlled by RCR.')
hh3cRcrMROutIfStateEntry = MibTableRow((1, 3, 6, 1, 4, 1, 25506, 2, 48, 1, 3, 1), ).setIndexNames((0, "HH3C-RCR-MIB", "hh3cRcrMRName"), (0, "HH3C-RCR-MIB", "hh3cRcrMROutIfName"))
if mibBuilder.loadTexts: hh3cRcrMROutIfStateEntry.setStatus('current')
if mibBuilder.loadTexts: hh3cRcrMROutIfStateEntry.setDescription('Entry items')
hh3cRcrMROutIfName = MibTableColumn((1, 3, 6, 1, 4, 1, 25506, 2, 48, 1, 3, 1, 1), OctetString().subtype(subtypeSpec=ValueSizeConstraint(1, 48)))
if mibBuilder.loadTexts: hh3cRcrMROutIfName.setStatus('current')
if mibBuilder.loadTexts: hh3cRcrMROutIfName.setDescription('The name of external interface on each MR.')
hh3cRcrMROutIfState = MibTableColumn((1, 3, 6, 1, 4, 1, 25506, 2, 48, 1, 3, 1, 2), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3))).clone(namedValues=NamedValues(("down", 1), ("up", 2), ("notExist", 3)))).setMaxAccess("readonly")
if mibBuilder.loadTexts: hh3cRcrMROutIfState.setStatus('current')
if mibBuilder.loadTexts: hh3cRcrMROutIfState.setDescription('The state of external interface on each MR.')
hh3cRcrMROutIfMaxUsedBandRate = MibTableColumn((1, 3, 6, 1, 4, 1, 25506, 2, 48, 1, 3, 1, 3), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 100))).setUnits('%').setMaxAccess("readwrite")
if mibBuilder.loadTexts: hh3cRcrMROutIfMaxUsedBandRate.setStatus('current')
if mibBuilder.loadTexts: hh3cRcrMROutIfMaxUsedBandRate.setDescription('The max spendable bandwidth rate on external interface.')
hh3cRcrMROutIfMinUsedBandRate = MibTableColumn((1, 3, 6, 1, 4, 1, 25506, 2, 48, 1, 3, 1, 4), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 100))).setUnits('%').setMaxAccess("readwrite")
if mibBuilder.loadTexts: hh3cRcrMROutIfMinUsedBandRate.setStatus('current')
if mibBuilder.loadTexts: hh3cRcrMROutIfMinUsedBandRate.setDescription('The min spendable bandwidth rate on external interface.')
hh3cRcrMROutIfUsedBandRate = MibTableColumn((1, 3, 6, 1, 4, 1, 25506, 2, 48, 1, 3, 1, 5), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 100))).setUnits('%').setMaxAccess("readonly")
if mibBuilder.loadTexts: hh3cRcrMROutIfUsedBandRate.setStatus('current')
if mibBuilder.loadTexts: hh3cRcrMROutIfUsedBandRate.setDescription('The used bandwidth rate on external interface.')
hh3cRcrCR = MibIdentifier((1, 3, 6, 1, 4, 1, 25506, 2, 48, 2))
hh3cRcrCRGroup = MibIdentifier((1, 3, 6, 1, 4, 1, 25506, 2, 48, 2, 1))
hh3cRcrCRState = MibScalar((1, 3, 6, 1, 4, 1, 25506, 2, 48, 2, 1, 1), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3))).clone(namedValues=NamedValues(("down", 1), ("init", 2), ("active", 3)))).setMaxAccess("readonly")
if mibBuilder.loadTexts: hh3cRcrCRState.setStatus('current')
if mibBuilder.loadTexts: hh3cRcrCRState.setDescription('The state of the CR which is controlled by RCR. down: The CR has been enabled but has not started a TCP connection server. init: The CR has started a TCP connection server and has been waiting for MR connection, but has not been ready for adjusting route. active: The CR is ready for adjusting route.')
hh3cRcrCRPortNum = MibScalar((1, 3, 6, 1, 4, 1, 25506, 2, 48, 2, 1, 2), Integer32()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: hh3cRcrCRPortNum.setStatus('current')
if mibBuilder.loadTexts: hh3cRcrCRPortNum.setDescription('The communication port number between CR and MR.')
hh3cRcrCRCtrlMode = MibScalar((1, 3, 6, 1, 4, 1, 25506, 2, 48, 2, 1, 3), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("control", 1), ("observe", 2)))).setMaxAccess("readwrite")
if mibBuilder.loadTexts: hh3cRcrCRCtrlMode.setStatus('current')
if mibBuilder.loadTexts: hh3cRcrCRCtrlMode.setDescription('The observe mode or control mode is configured to operate in the CR. observe: The CR monitors prefixes and external interfaces based on default and user-defined policies and then reports the status of the network and the decisions that should be made but does not implement any changes. controlled: The CR monitors prefixes and external interfaces based on default and user-defined policies and then reports the status of the network and the decisions that should be made and implement any changes.')
hh3cRcrCRChooseMode = MibScalar((1, 3, 6, 1, 4, 1, 25506, 2, 48, 2, 1, 4), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("good", 1), ("best", 2)))).setMaxAccess("readwrite")
if mibBuilder.loadTexts: hh3cRcrCRChooseMode.setStatus('current')
if mibBuilder.loadTexts: hh3cRcrCRChooseMode.setDescription('The algorithm used to choose an alternative external interface for a prefix. good: The first external interface that conforms to the policy is selected as the new external interface. best: Information is collected from all external interfaces and the best one is selected even though the best external interface may not be in-policy.')
hh3cRcrCRKeepaliveTime = MibScalar((1, 3, 6, 1, 4, 1, 25506, 2, 48, 2, 1, 5), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 1000))).setUnits('second').setMaxAccess("readwrite")
if mibBuilder.loadTexts: hh3cRcrCRKeepaliveTime.setStatus('current')
if mibBuilder.loadTexts: hh3cRcrCRKeepaliveTime.setDescription('The interval time of the transmission of the keepalive communication packet between CR and MR.')
hh3cRcrCRPolicyMode = MibScalar((1, 3, 6, 1, 4, 1, 25506, 2, 48, 2, 1, 6), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3))).clone(namedValues=NamedValues(("prefix", 1), ("operation", 2), ("study", 3)))).setMaxAccess("readwrite")
if mibBuilder.loadTexts: hh3cRcrCRPolicyMode.setStatus('current')
if mibBuilder.loadTexts: hh3cRcrCRPolicyMode.setDescription('The chosen policy mode which decides to change what prefix. prefix: An RCR policy is designed to select IP prefixes or to select RCR learn policies using a match clause and then to apply RCR policy configurations using a set clause. operation: To deside to adjusted prefixes based on operation which user configured. study: To learn and optimize prefixes based on the highest throughput or the highest delay.')
hh3cRcrCRStudyMode = MibScalar((1, 3, 6, 1, 4, 1, 25506, 2, 48, 2, 1, 7), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("maxThoughout", 1), ("maxDelay", 2)))).setMaxAccess("readwrite")
if mibBuilder.loadTexts: hh3cRcrCRStudyMode.setStatus('current')
if mibBuilder.loadTexts: hh3cRcrCRStudyMode.setDescription("The mode of collecting prefix in studying configuration mode. It's to collect either the prefix of max thoughtout or the prefix of max delay time. It doesn't have a value when CR isn't in studying configuration mode.")
hh3cRcrCRStudyIpPrefixNum = MibScalar((1, 3, 6, 1, 4, 1, 25506, 2, 48, 2, 1, 8), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 2500))).setMaxAccess("readwrite")
if mibBuilder.loadTexts: hh3cRcrCRStudyIpPrefixNum.setStatus('current')
if mibBuilder.loadTexts: hh3cRcrCRStudyIpPrefixNum.setDescription('The max number of collecting prefix in studying configuration mode.')
hh3cRcrCRIpPrefixLen = MibScalar((1, 3, 6, 1, 4, 1, 25506, 2, 48, 2, 1, 9), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 32)).clone(24)).setMaxAccess("readwrite")
if mibBuilder.loadTexts: hh3cRcrCRIpPrefixLen.setStatus('current')
if mibBuilder.loadTexts: hh3cRcrCRIpPrefixLen.setDescription('The mask length of collecting prefix in configuration mode.')
hh3cRcrCRRcrPolicyTable = MibTable((1, 3, 6, 1, 4, 1, 25506, 2, 48, 2, 2), )
if mibBuilder.loadTexts: hh3cRcrCRRcrPolicyTable.setStatus('current')
if mibBuilder.loadTexts: hh3cRcrCRRcrPolicyTable.setDescription('This table contains objects to get statistic information of interfaces on a device.')
hh3cRcrCRRcrPolicyEntry = MibTableRow((1, 3, 6, 1, 4, 1, 25506, 2, 48, 2, 2, 1), ).setIndexNames((0, "HH3C-RCR-MIB", "hh3cRcrCRRcrPlyID"))
if mibBuilder.loadTexts: hh3cRcrCRRcrPolicyEntry.setStatus('current')
if mibBuilder.loadTexts: hh3cRcrCRRcrPolicyEntry.setDescription('Entry items')
hh3cRcrCRRcrPlyID = MibTableColumn((1, 3, 6, 1, 4, 1, 25506, 2, 48, 2, 2, 1, 1), Integer32())
if mibBuilder.loadTexts: hh3cRcrCRRcrPlyID.setStatus('current')
if mibBuilder.loadTexts: hh3cRcrCRRcrPlyID.setDescription('The ID of RCR policy which the user has configured.')
hh3cRcrCRRcrPlyMatchIPListName = MibTableColumn((1, 3, 6, 1, 4, 1, 25506, 2, 48, 2, 2, 1, 2), OctetString().subtype(subtypeSpec=ValueSizeConstraint(1, 19))).setMaxAccess("readwrite")
if mibBuilder.loadTexts: hh3cRcrCRRcrPlyMatchIPListName.setStatus('current')
if mibBuilder.loadTexts: hh3cRcrCRRcrPlyMatchIPListName.setDescription('The matched IP prefix list name of RCR policy which the user has configured.')
hh3cRcrCRRcrPlyMatchStudyEnable = MibTableColumn((1, 3, 6, 1, 4, 1, 25506, 2, 48, 2, 2, 1, 3), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("disable", 1), ("enable", 2)))).setMaxAccess("readwrite")
if mibBuilder.loadTexts: hh3cRcrCRRcrPlyMatchStudyEnable.setStatus('current')
if mibBuilder.loadTexts: hh3cRcrCRRcrPlyMatchStudyEnable.setDescription('Whether the RCR policy which the user has configured is matched for studying prefix mode.')
hh3cRcrCRRcrPlyMatchOperPlyName = MibTableColumn((1, 3, 6, 1, 4, 1, 25506, 2, 48, 2, 2, 1, 4), OctetString().subtype(subtypeSpec=ValueSizeConstraint(1, 19))).setMaxAccess("readwrite")
if mibBuilder.loadTexts: hh3cRcrCRRcrPlyMatchOperPlyName.setStatus('current')
if mibBuilder.loadTexts: hh3cRcrCRRcrPlyMatchOperPlyName.setDescription('The matched operation policy name of RCR policy which the user has configured.')
hh3cRcrCRRcrAclNumber = MibTableColumn((1, 3, 6, 1, 4, 1, 25506, 2, 48, 2, 2, 1, 5), Integer32().subtype(subtypeSpec=ValueRangeConstraint(3000, 3999))).setMaxAccess("readwrite")
if mibBuilder.loadTexts: hh3cRcrCRRcrAclNumber.setStatus('current')
if mibBuilder.loadTexts: hh3cRcrCRRcrAclNumber.setDescription('The matched acl number of RCR operation policy which the user has configured.')
hh3cRcrCRRcrPlyDelayTime = MibTableColumn((1, 3, 6, 1, 4, 1, 25506, 2, 48, 2, 2, 1, 6), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 10000))).setUnits('millisecond').setMaxAccess("readwrite")
if mibBuilder.loadTexts: hh3cRcrCRRcrPlyDelayTime.setStatus('current')
if mibBuilder.loadTexts: hh3cRcrCRRcrPlyDelayTime.setDescription('The absolute maximum delay time. The range of values that can be configured is from 1 to 10000.')
hh3cRcrCRRcrPlyLossRate = MibTableColumn((1, 3, 6, 1, 4, 1, 25506, 2, 48, 2, 2, 1, 7), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 100))).setUnits('%').setMaxAccess("readwrite")
if mibBuilder.loadTexts: hh3cRcrCRRcrPlyLossRate.setStatus('current')
if mibBuilder.loadTexts: hh3cRcrCRRcrPlyLossRate.setDescription('The packet loss percent of prefix which the CR concerns.')
hh3cRcrCRMatPrefixPerfTable = MibTable((1, 3, 6, 1, 4, 1, 25506, 2, 48, 2, 3), )
if mibBuilder.loadTexts: hh3cRcrCRMatPrefixPerfTable.setStatus('current')
if mibBuilder.loadTexts: hh3cRcrCRMatPrefixPerfTable.setDescription('This table contains the matched prefix performance information.')
hh3cRcrCRMatPrefixPerfEntry = MibTableRow((1, 3, 6, 1, 4, 1, 25506, 2, 48, 2, 3, 1), ).setIndexNames((0, "HH3C-RCR-MIB", "hh3cRcrCRMatPrefPerfAddrType"), (0, "HH3C-RCR-MIB", "hh3cRcrCRMatPrefPerfDestIPAddr"), (0, "HH3C-RCR-MIB", "hh3cRcrCRMatPrefPerfDestMaskLen"))
if mibBuilder.loadTexts: hh3cRcrCRMatPrefixPerfEntry.setStatus('current')
if mibBuilder.loadTexts: hh3cRcrCRMatPrefixPerfEntry.setDescription('Entry items')
hh3cRcrCRMatPrefPerfAddrType = MibTableColumn((1, 3, 6, 1, 4, 1, 25506, 2, 48, 2, 3, 1, 1), InetAddressType())
if mibBuilder.loadTexts: hh3cRcrCRMatPrefPerfAddrType.setStatus('current')
if mibBuilder.loadTexts: hh3cRcrCRMatPrefPerfAddrType.setDescription('The destination IP addresses type of matched prefix which the CR wants (IPv4 or IPv6).')
hh3cRcrCRMatPrefPerfDestIPAddr = MibTableColumn((1, 3, 6, 1, 4, 1, 25506, 2, 48, 2, 3, 1, 2), InetAddress())
if mibBuilder.loadTexts: hh3cRcrCRMatPrefPerfDestIPAddr.setStatus('current')
if mibBuilder.loadTexts: hh3cRcrCRMatPrefPerfDestIPAddr.setDescription('The destination IP address of matched prefix which the CR wants.')
hh3cRcrCRMatPrefPerfDestMaskLen = MibTableColumn((1, 3, 6, 1, 4, 1, 25506, 2, 48, 2, 3, 1, 3), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 32)))
if mibBuilder.loadTexts: hh3cRcrCRMatPrefPerfDestMaskLen.setStatus('current')
if mibBuilder.loadTexts: hh3cRcrCRMatPrefPerfDestMaskLen.setDescription('The destination IP address mask length of matched prefix which the CR wants.')
hh3cRcrCRMatPrefPerfDelayTime = MibTableColumn((1, 3, 6, 1, 4, 1, 25506, 2, 48, 2, 3, 1, 4), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 10000))).setUnits('second').setMaxAccess("readonly")
if mibBuilder.loadTexts: hh3cRcrCRMatPrefPerfDelayTime.setStatus('current')
if mibBuilder.loadTexts: hh3cRcrCRMatPrefPerfDelayTime.setDescription('The absolute maximum delay time of prefix which the CR has configured.')
hh3cRcrCRMatPrefPerfLossRate = MibTableColumn((1, 3, 6, 1, 4, 1, 25506, 2, 48, 2, 3, 1, 5), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 100))).setUnits('%').setMaxAccess("readonly")
if mibBuilder.loadTexts: hh3cRcrCRMatPrefPerfLossRate.setStatus('current')
if mibBuilder.loadTexts: hh3cRcrCRMatPrefPerfLossRate.setDescription('The packet loss percent of prefix which the CR has configured.')
hh3cRcrCRMatPrefPerfThroughput = MibTableColumn((1, 3, 6, 1, 4, 1, 25506, 2, 48, 2, 3, 1, 6), Integer32()).setUnits('kb').setMaxAccess("readonly")
if mibBuilder.loadTexts: hh3cRcrCRMatPrefPerfThroughput.setStatus('current')
if mibBuilder.loadTexts: hh3cRcrCRMatPrefPerfThroughput.setDescription('The bandwidth of prefix which the CR has monitored.')
hh3cRcrCRAdjustPrefixTable = MibTable((1, 3, 6, 1, 4, 1, 25506, 2, 48, 2, 4), )
if mibBuilder.loadTexts: hh3cRcrCRAdjustPrefixTable.setStatus('current')
if mibBuilder.loadTexts: hh3cRcrCRAdjustPrefixTable.setDescription('This table contains objects to get adjusted prefix information which the CR controlled.')
hh3cRcrCRAdjustPrefixEntry = MibTableRow((1, 3, 6, 1, 4, 1, 25506, 2, 48, 2, 4, 1), ).setIndexNames((0, "HH3C-RCR-MIB", "hh3cRcrCRAdjuPrefDestAddrType"), (0, "HH3C-RCR-MIB", "hh3cRcrCRAdjuPrefDestAddr"), (0, "HH3C-RCR-MIB", "hh3cRcrCRAdjuPrefMaskLen"), (0, "HH3C-RCR-MIB", "hh3cRcrCRAdjuPrefPreMRName"), (0, "HH3C-RCR-MIB", "hh3cRcrCRAdjuPrefPreOutIfName"))
if mibBuilder.loadTexts: hh3cRcrCRAdjustPrefixEntry.setStatus('current')
if mibBuilder.loadTexts: hh3cRcrCRAdjustPrefixEntry.setDescription('Entry items')
hh3cRcrCRAdjuPrefDestAddrType = MibTableColumn((1, 3, 6, 1, 4, 1, 25506, 2, 48, 2, 4, 1, 1), InetAddressType())
if mibBuilder.loadTexts: hh3cRcrCRAdjuPrefDestAddrType.setStatus('current')
if mibBuilder.loadTexts: hh3cRcrCRAdjuPrefDestAddrType.setDescription('The IP address type of the adjusted prefix which CR controlled (IPv4 or IPv6).')
hh3cRcrCRAdjuPrefDestAddr = MibTableColumn((1, 3, 6, 1, 4, 1, 25506, 2, 48, 2, 4, 1, 2), InetAddress())
if mibBuilder.loadTexts: hh3cRcrCRAdjuPrefDestAddr.setStatus('current')
if mibBuilder.loadTexts: hh3cRcrCRAdjuPrefDestAddr.setDescription('The IP address of the adjusted prefix which CR controlled.')
hh3cRcrCRAdjuPrefMaskLen = MibTableColumn((1, 3, 6, 1, 4, 1, 25506, 2, 48, 2, 4, 1, 3), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 32)))
if mibBuilder.loadTexts: hh3cRcrCRAdjuPrefMaskLen.setStatus('current')
if mibBuilder.loadTexts: hh3cRcrCRAdjuPrefMaskLen.setDescription('The IP address mask length of the adjusted prefix which CR controlled.')
hh3cRcrCRAdjuPrefPreMRName = MibTableColumn((1, 3, 6, 1, 4, 1, 25506, 2, 48, 2, 4, 1, 4), OctetString().subtype(subtypeSpec=ValueSizeConstraint(1, 32)))
if mibBuilder.loadTexts: hh3cRcrCRAdjuPrefPreMRName.setStatus('current')
if mibBuilder.loadTexts: hh3cRcrCRAdjuPrefPreMRName.setDescription('The name of the MR which the previous outbound traffic flows through.')
hh3cRcrCRAdjuPrefPreOutIfName = MibTableColumn((1, 3, 6, 1, 4, 1, 25506, 2, 48, 2, 4, 1, 5), OctetString().subtype(subtypeSpec=ValueSizeConstraint(1, 48)))
if mibBuilder.loadTexts: hh3cRcrCRAdjuPrefPreOutIfName.setStatus('current')
if mibBuilder.loadTexts: hh3cRcrCRAdjuPrefPreOutIfName.setDescription('The name of the external interface on the MR which the previous outbound traffic flows through.')
hh3cRcrCRAdjuPrefCurMRName = MibTableColumn((1, 3, 6, 1, 4, 1, 25506, 2, 48, 2, 4, 1, 6), OctetString().subtype(subtypeSpec=ValueSizeConstraint(1, 32))).setMaxAccess("readonly")
if mibBuilder.loadTexts: hh3cRcrCRAdjuPrefCurMRName.setStatus('current')
if mibBuilder.loadTexts: hh3cRcrCRAdjuPrefCurMRName.setDescription('The name of the MR which the current outbound traffic flows through.')
hh3cRcrCRAdjuPrefCurOutIfName = MibTableColumn((1, 3, 6, 1, 4, 1, 25506, 2, 48, 2, 4, 1, 7), OctetString()).setMaxAccess("readonly")
if mibBuilder.loadTexts: hh3cRcrCRAdjuPrefCurOutIfName.setStatus('current')
if mibBuilder.loadTexts: hh3cRcrCRAdjuPrefCurOutIfName.setDescription('The name of the external interface on the MR which the current outbound traffic flows through.')
hh3cRcrCRAdjuPrefPersistTime = MibTableColumn((1, 3, 6, 1, 4, 1, 25506, 2, 48, 2, 4, 1, 8), Integer32()).setUnits('second').setMaxAccess("readonly")
if mibBuilder.loadTexts: hh3cRcrCRAdjuPrefPersistTime.setStatus('current')
if mibBuilder.loadTexts: hh3cRcrCRAdjuPrefPersistTime.setDescription('The persisting time from the time which the adjusted outbound traffic has been adjusted by CR to now.')
hh3cRcrCRAdjuPrefAgeTime = MibTableColumn((1, 3, 6, 1, 4, 1, 25506, 2, 48, 2, 4, 1, 9), Integer32()).setUnits('second').setMaxAccess("readonly")
if mibBuilder.loadTexts: hh3cRcrCRAdjuPrefAgeTime.setStatus('current')
if mibBuilder.loadTexts: hh3cRcrCRAdjuPrefAgeTime.setDescription('The time which the adjusted prefix remains.')
mibBuilder.exportSymbols("HH3C-RCR-MIB", hh3cRcrCRAdjuPrefDestAddr=hh3cRcrCRAdjuPrefDestAddr, hh3cRcrCRMatPrefPerfDestIPAddr=hh3cRcrCRMatPrefPerfDestIPAddr, hh3cRcrCRMatPrefPerfDestMaskLen=hh3cRcrCRMatPrefPerfDestMaskLen, hh3cRcrMR=hh3cRcrMR, hh3cRcrCRStudyMode=hh3cRcrCRStudyMode, hh3cRcrMRName=hh3cRcrMRName, hh3cRcrCRRcrPlyID=hh3cRcrCRRcrPlyID, hh3cRcrCRRcrPlyMatchOperPlyName=hh3cRcrCRRcrPlyMatchOperPlyName, hh3cRcrCRMatPrefixPerfEntry=hh3cRcrCRMatPrefixPerfEntry, hh3cRcrCRAdjuPrefPreOutIfName=hh3cRcrCRAdjuPrefPreOutIfName, hh3cRcrMRGroup=hh3cRcrMRGroup, hh3cRcrMRStateEntry=hh3cRcrMRStateEntry, hh3cRcrCR=hh3cRcrCR, hh3cRcrCRPortNum=hh3cRcrCRPortNum, hh3cRcrCRRcrPlyLossRate=hh3cRcrCRRcrPlyLossRate, hh3cRcrMROutIfUsedBandRate=hh3cRcrMROutIfUsedBandRate, hh3cRcr=hh3cRcr, hh3cRcrMRAuthType=hh3cRcrMRAuthType, hh3cRcrMRAuthPwd=hh3cRcrMRAuthPwd, hh3cRcrCRRcrAclNumber=hh3cRcrCRRcrAclNumber, hh3cRcrCRChooseMode=hh3cRcrCRChooseMode, hh3cRcrCRAdjustPrefixTable=hh3cRcrCRAdjustPrefixTable, hh3cRcrMROutIfStateEntry=hh3cRcrMROutIfStateEntry, hh3cRcrCRMatPrefPerfThroughput=hh3cRcrCRMatPrefPerfThroughput, hh3cRcrCRGroup=hh3cRcrCRGroup, hh3cRcrCRAdjuPrefPreMRName=hh3cRcrCRAdjuPrefPreMRName, hh3cRcrCRAdjustPrefixEntry=hh3cRcrCRAdjustPrefixEntry, hh3cRcrCRMatPrefPerfAddrType=hh3cRcrCRMatPrefPerfAddrType, hh3cRcrMRStateTable=hh3cRcrMRStateTable, hh3cRcrCRAdjuPrefCurOutIfName=hh3cRcrCRAdjuPrefCurOutIfName, hh3cRcrCRAdjuPrefAgeTime=hh3cRcrCRAdjuPrefAgeTime, hh3cRcrCRMatPrefixPerfTable=hh3cRcrCRMatPrefixPerfTable, hh3cRcrMROutIfMaxUsedBandRate=hh3cRcrMROutIfMaxUsedBandRate, hh3cRcrMROutIfStateTable=hh3cRcrMROutIfStateTable, hh3cRcrMRAllMaxUsedBandRate=hh3cRcrMRAllMaxUsedBandRate, hh3cRcrCRCtrlMode=hh3cRcrCRCtrlMode, hh3cRcrCRRcrPlyMatchStudyEnable=hh3cRcrCRRcrPlyMatchStudyEnable, hh3cRcrMRState=hh3cRcrMRState, hh3cRcrCRKeepaliveTime=hh3cRcrCRKeepaliveTime, hh3cRcrMROutIfState=hh3cRcrMROutIfState, hh3cRcrMROutIfMinUsedBandRate=hh3cRcrMROutIfMinUsedBandRate, hh3cRcrCRIpPrefixLen=hh3cRcrCRIpPrefixLen, hh3cRcrCRMatPrefPerfLossRate=hh3cRcrCRMatPrefPerfLossRate, hh3cRcrMRAllMinUsedBandRate=hh3cRcrMRAllMinUsedBandRate, hh3cRcrMRListenTime=hh3cRcrMRListenTime, hh3cRcrCRStudyIpPrefixNum=hh3cRcrCRStudyIpPrefixNum, hh3cRcrCRRcrPolicyEntry=hh3cRcrCRRcrPolicyEntry, hh3cRcrCRRcrPlyMatchIPListName=hh3cRcrCRRcrPlyMatchIPListName, hh3cRcrCRAdjuPrefDestAddrType=hh3cRcrCRAdjuPrefDestAddrType, hh3cRcrCRMatPrefPerfDelayTime=hh3cRcrCRMatPrefPerfDelayTime, hh3cRcrMROutIfName=hh3cRcrMROutIfName, hh3cRcrCRState=hh3cRcrCRState, hh3cRcrCRRcrPolicyTable=hh3cRcrCRRcrPolicyTable, hh3cRcrCRAdjuPrefMaskLen=hh3cRcrCRAdjuPrefMaskLen, hh3cRcrCRAdjuPrefCurMRName=hh3cRcrCRAdjuPrefCurMRName, hh3cRcrCRRcrPlyDelayTime=hh3cRcrCRRcrPlyDelayTime, PYSNMP_MODULE_ID=hh3cRcr, hh3cRcrCRPolicyMode=hh3cRcrCRPolicyMode, hh3cRcrCRAdjuPrefPersistTime=hh3cRcrCRAdjuPrefPersistTime)
| (integer, octet_string, object_identifier) = mibBuilder.importSymbols('ASN1', 'Integer', 'OctetString', 'ObjectIdentifier')
(named_values,) = mibBuilder.importSymbols('ASN1-ENUMERATION', 'NamedValues')
(constraints_union, value_range_constraint, single_value_constraint, value_size_constraint, constraints_intersection) = mibBuilder.importSymbols('ASN1-REFINEMENT', 'ConstraintsUnion', 'ValueRangeConstraint', 'SingleValueConstraint', 'ValueSizeConstraint', 'ConstraintsIntersection')
(hh3c_common,) = mibBuilder.importSymbols('HH3C-OID-MIB', 'hh3cCommon')
(interface_index,) = mibBuilder.importSymbols('IF-MIB', 'InterfaceIndex')
(inet_address, inet_address_type) = mibBuilder.importSymbols('INET-ADDRESS-MIB', 'InetAddress', 'InetAddressType')
(notification_group, module_compliance) = mibBuilder.importSymbols('SNMPv2-CONF', 'NotificationGroup', 'ModuleCompliance')
(counter32, module_identity, integer32, ip_address, bits, unsigned32, counter64, iso, time_ticks, notification_type, object_identity, gauge32, mib_scalar, mib_table, mib_table_row, mib_table_column, mib_identifier) = mibBuilder.importSymbols('SNMPv2-SMI', 'Counter32', 'ModuleIdentity', 'Integer32', 'IpAddress', 'Bits', 'Unsigned32', 'Counter64', 'iso', 'TimeTicks', 'NotificationType', 'ObjectIdentity', 'Gauge32', 'MibScalar', 'MibTable', 'MibTableRow', 'MibTableColumn', 'MibIdentifier')
(display_string, textual_convention) = mibBuilder.importSymbols('SNMPv2-TC', 'DisplayString', 'TextualConvention')
hh3c_rcr = module_identity((1, 3, 6, 1, 4, 1, 25506, 2, 48))
hh3cRcr.setRevisions(('2005-06-28 19:36',))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
if mibBuilder.loadTexts:
hh3cRcr.setRevisionsDescriptions(('The modified revision of this MIB module. Rewrite the whole MIB.',))
if mibBuilder.loadTexts:
hh3cRcr.setLastUpdated('200506281936Z')
if mibBuilder.loadTexts:
hh3cRcr.setOrganization('Hangzhou H3C Tech. Co., Ltd.')
if mibBuilder.loadTexts:
hh3cRcr.setContactInfo('Platform Team Hangzhou H3C Tech. Co., Ltd. Hai-Dian District Beijing P.R. China http://www.h3c.com Zip:100085 ')
if mibBuilder.loadTexts:
hh3cRcr.setDescription("This MIB is applicable to router-devices. It's made for RCR (Resilient Controllable Routing). RCR provides an effective resolution which can dynamically auto-adjust outbound traffic to the optimal external interface by monitoring the performance and traffic load of each external interface. It provides the functions of intelligentized traffic load distribution and the optimal external interface selection. This can optimally utilize the external interfaces. Furthermore, RCR realized the function which can select the optimal external interface based on different classes of operation flow.")
hh3c_rcr_mr = mib_identifier((1, 3, 6, 1, 4, 1, 25506, 2, 48, 1))
hh3c_rcr_mr_group = mib_identifier((1, 3, 6, 1, 4, 1, 25506, 2, 48, 1, 1))
hh3c_rcr_mr_all_max_used_band_rate = mib_scalar((1, 3, 6, 1, 4, 1, 25506, 2, 48, 1, 1, 1), integer32().subtype(subtypeSpec=value_range_constraint(1, 100))).setUnits('%').setMaxAccess('readwrite')
if mibBuilder.loadTexts:
hh3cRcrMRAllMaxUsedBandRate.setStatus('current')
if mibBuilder.loadTexts:
hh3cRcrMRAllMaxUsedBandRate.setDescription('The max used band rate of all external interfaces on member router-devices(MRs) which are controlled by RCR.')
hh3c_rcr_mr_all_min_used_band_rate = mib_scalar((1, 3, 6, 1, 4, 1, 25506, 2, 48, 1, 1, 2), integer32().subtype(subtypeSpec=value_range_constraint(0, 100))).setUnits('%').setMaxAccess('readwrite')
if mibBuilder.loadTexts:
hh3cRcrMRAllMinUsedBandRate.setStatus('current')
if mibBuilder.loadTexts:
hh3cRcrMRAllMinUsedBandRate.setDescription('The min used band rate of all external interfaces on MRs which are controlled by RCR.')
hh3c_rcr_mr_listen_time = mib_scalar((1, 3, 6, 1, 4, 1, 25506, 2, 48, 1, 1, 3), integer32().subtype(subtypeSpec=value_range_constraint(1, 1440))).setUnits('minute').setMaxAccess('readwrite')
if mibBuilder.loadTexts:
hh3cRcrMRListenTime.setStatus('current')
if mibBuilder.loadTexts:
hh3cRcrMRListenTime.setDescription('The persistent time of a probe on member router-device(MR) which is controlled by RCR.')
hh3c_rcr_mr_state_table = mib_table((1, 3, 6, 1, 4, 1, 25506, 2, 48, 1, 2))
if mibBuilder.loadTexts:
hh3cRcrMRStateTable.setStatus('current')
if mibBuilder.loadTexts:
hh3cRcrMRStateTable.setDescription('This table contains state information of each MR which is controlled by RCR.')
hh3c_rcr_mr_state_entry = mib_table_row((1, 3, 6, 1, 4, 1, 25506, 2, 48, 1, 2, 1)).setIndexNames((0, 'HH3C-RCR-MIB', 'hh3cRcrMRName'))
if mibBuilder.loadTexts:
hh3cRcrMRStateEntry.setStatus('current')
if mibBuilder.loadTexts:
hh3cRcrMRStateEntry.setDescription('Entry items')
hh3c_rcr_mr_name = mib_table_column((1, 3, 6, 1, 4, 1, 25506, 2, 48, 1, 2, 1, 1), octet_string().subtype(subtypeSpec=value_size_constraint(1, 32)))
if mibBuilder.loadTexts:
hh3cRcrMRName.setStatus('current')
if mibBuilder.loadTexts:
hh3cRcrMRName.setDescription('The name of MR which is controlled by RCR.')
hh3c_rcr_mr_state = mib_table_column((1, 3, 6, 1, 4, 1, 25506, 2, 48, 1, 2, 1, 2), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3))).clone(namedValues=named_values(('down', 1), ('up', 2), ('controlled', 3)))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
hh3cRcrMRState.setStatus('current')
if mibBuilder.loadTexts:
hh3cRcrMRState.setDescription('The state of MR where identified on the controller router-device(CR). down: The MR has been enabled but has not connected to the CR with TCP connection. up: The MR has already successfully connected to the CR but has not been ready for adjusting route. controlled: The MR has already passed the consultation with the CR and could be controlled by it.')
hh3c_rcr_mr_auth_type = mib_table_column((1, 3, 6, 1, 4, 1, 25506, 2, 48, 1, 2, 1, 3), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2))).clone(namedValues=named_values(('simple', 1), ('md5', 2)))).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
hh3cRcrMRAuthType.setStatus('current')
if mibBuilder.loadTexts:
hh3cRcrMRAuthType.setDescription('The authentication type of communication packet between CR and MR.')
hh3c_rcr_mr_auth_pwd = mib_table_column((1, 3, 6, 1, 4, 1, 25506, 2, 48, 1, 2, 1, 4), octet_string()).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
hh3cRcrMRAuthPwd.setStatus('current')
if mibBuilder.loadTexts:
hh3cRcrMRAuthPwd.setDescription('The authentication password of communication packet between CR and MR. Reading this object always results in an OCTET STRING of length zero; authentication may not be bypassed by reading the MIB object.')
hh3c_rcr_mr_out_if_state_table = mib_table((1, 3, 6, 1, 4, 1, 25506, 2, 48, 1, 3))
if mibBuilder.loadTexts:
hh3cRcrMROutIfStateTable.setStatus('current')
if mibBuilder.loadTexts:
hh3cRcrMROutIfStateTable.setDescription('This table contains the external interface states of each MR which is controlled by RCR.')
hh3c_rcr_mr_out_if_state_entry = mib_table_row((1, 3, 6, 1, 4, 1, 25506, 2, 48, 1, 3, 1)).setIndexNames((0, 'HH3C-RCR-MIB', 'hh3cRcrMRName'), (0, 'HH3C-RCR-MIB', 'hh3cRcrMROutIfName'))
if mibBuilder.loadTexts:
hh3cRcrMROutIfStateEntry.setStatus('current')
if mibBuilder.loadTexts:
hh3cRcrMROutIfStateEntry.setDescription('Entry items')
hh3c_rcr_mr_out_if_name = mib_table_column((1, 3, 6, 1, 4, 1, 25506, 2, 48, 1, 3, 1, 1), octet_string().subtype(subtypeSpec=value_size_constraint(1, 48)))
if mibBuilder.loadTexts:
hh3cRcrMROutIfName.setStatus('current')
if mibBuilder.loadTexts:
hh3cRcrMROutIfName.setDescription('The name of external interface on each MR.')
hh3c_rcr_mr_out_if_state = mib_table_column((1, 3, 6, 1, 4, 1, 25506, 2, 48, 1, 3, 1, 2), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3))).clone(namedValues=named_values(('down', 1), ('up', 2), ('notExist', 3)))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
hh3cRcrMROutIfState.setStatus('current')
if mibBuilder.loadTexts:
hh3cRcrMROutIfState.setDescription('The state of external interface on each MR.')
hh3c_rcr_mr_out_if_max_used_band_rate = mib_table_column((1, 3, 6, 1, 4, 1, 25506, 2, 48, 1, 3, 1, 3), integer32().subtype(subtypeSpec=value_range_constraint(1, 100))).setUnits('%').setMaxAccess('readwrite')
if mibBuilder.loadTexts:
hh3cRcrMROutIfMaxUsedBandRate.setStatus('current')
if mibBuilder.loadTexts:
hh3cRcrMROutIfMaxUsedBandRate.setDescription('The max spendable bandwidth rate on external interface.')
hh3c_rcr_mr_out_if_min_used_band_rate = mib_table_column((1, 3, 6, 1, 4, 1, 25506, 2, 48, 1, 3, 1, 4), integer32().subtype(subtypeSpec=value_range_constraint(0, 100))).setUnits('%').setMaxAccess('readwrite')
if mibBuilder.loadTexts:
hh3cRcrMROutIfMinUsedBandRate.setStatus('current')
if mibBuilder.loadTexts:
hh3cRcrMROutIfMinUsedBandRate.setDescription('The min spendable bandwidth rate on external interface.')
hh3c_rcr_mr_out_if_used_band_rate = mib_table_column((1, 3, 6, 1, 4, 1, 25506, 2, 48, 1, 3, 1, 5), integer32().subtype(subtypeSpec=value_range_constraint(0, 100))).setUnits('%').setMaxAccess('readonly')
if mibBuilder.loadTexts:
hh3cRcrMROutIfUsedBandRate.setStatus('current')
if mibBuilder.loadTexts:
hh3cRcrMROutIfUsedBandRate.setDescription('The used bandwidth rate on external interface.')
hh3c_rcr_cr = mib_identifier((1, 3, 6, 1, 4, 1, 25506, 2, 48, 2))
hh3c_rcr_cr_group = mib_identifier((1, 3, 6, 1, 4, 1, 25506, 2, 48, 2, 1))
hh3c_rcr_cr_state = mib_scalar((1, 3, 6, 1, 4, 1, 25506, 2, 48, 2, 1, 1), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3))).clone(namedValues=named_values(('down', 1), ('init', 2), ('active', 3)))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
hh3cRcrCRState.setStatus('current')
if mibBuilder.loadTexts:
hh3cRcrCRState.setDescription('The state of the CR which is controlled by RCR. down: The CR has been enabled but has not started a TCP connection server. init: The CR has started a TCP connection server and has been waiting for MR connection, but has not been ready for adjusting route. active: The CR is ready for adjusting route.')
hh3c_rcr_cr_port_num = mib_scalar((1, 3, 6, 1, 4, 1, 25506, 2, 48, 2, 1, 2), integer32()).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
hh3cRcrCRPortNum.setStatus('current')
if mibBuilder.loadTexts:
hh3cRcrCRPortNum.setDescription('The communication port number between CR and MR.')
hh3c_rcr_cr_ctrl_mode = mib_scalar((1, 3, 6, 1, 4, 1, 25506, 2, 48, 2, 1, 3), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2))).clone(namedValues=named_values(('control', 1), ('observe', 2)))).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
hh3cRcrCRCtrlMode.setStatus('current')
if mibBuilder.loadTexts:
hh3cRcrCRCtrlMode.setDescription('The observe mode or control mode is configured to operate in the CR. observe: The CR monitors prefixes and external interfaces based on default and user-defined policies and then reports the status of the network and the decisions that should be made but does not implement any changes. controlled: The CR monitors prefixes and external interfaces based on default and user-defined policies and then reports the status of the network and the decisions that should be made and implement any changes.')
hh3c_rcr_cr_choose_mode = mib_scalar((1, 3, 6, 1, 4, 1, 25506, 2, 48, 2, 1, 4), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2))).clone(namedValues=named_values(('good', 1), ('best', 2)))).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
hh3cRcrCRChooseMode.setStatus('current')
if mibBuilder.loadTexts:
hh3cRcrCRChooseMode.setDescription('The algorithm used to choose an alternative external interface for a prefix. good: The first external interface that conforms to the policy is selected as the new external interface. best: Information is collected from all external interfaces and the best one is selected even though the best external interface may not be in-policy.')
hh3c_rcr_cr_keepalive_time = mib_scalar((1, 3, 6, 1, 4, 1, 25506, 2, 48, 2, 1, 5), integer32().subtype(subtypeSpec=value_range_constraint(1, 1000))).setUnits('second').setMaxAccess('readwrite')
if mibBuilder.loadTexts:
hh3cRcrCRKeepaliveTime.setStatus('current')
if mibBuilder.loadTexts:
hh3cRcrCRKeepaliveTime.setDescription('The interval time of the transmission of the keepalive communication packet between CR and MR.')
hh3c_rcr_cr_policy_mode = mib_scalar((1, 3, 6, 1, 4, 1, 25506, 2, 48, 2, 1, 6), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3))).clone(namedValues=named_values(('prefix', 1), ('operation', 2), ('study', 3)))).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
hh3cRcrCRPolicyMode.setStatus('current')
if mibBuilder.loadTexts:
hh3cRcrCRPolicyMode.setDescription('The chosen policy mode which decides to change what prefix. prefix: An RCR policy is designed to select IP prefixes or to select RCR learn policies using a match clause and then to apply RCR policy configurations using a set clause. operation: To deside to adjusted prefixes based on operation which user configured. study: To learn and optimize prefixes based on the highest throughput or the highest delay.')
hh3c_rcr_cr_study_mode = mib_scalar((1, 3, 6, 1, 4, 1, 25506, 2, 48, 2, 1, 7), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2))).clone(namedValues=named_values(('maxThoughout', 1), ('maxDelay', 2)))).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
hh3cRcrCRStudyMode.setStatus('current')
if mibBuilder.loadTexts:
hh3cRcrCRStudyMode.setDescription("The mode of collecting prefix in studying configuration mode. It's to collect either the prefix of max thoughtout or the prefix of max delay time. It doesn't have a value when CR isn't in studying configuration mode.")
hh3c_rcr_cr_study_ip_prefix_num = mib_scalar((1, 3, 6, 1, 4, 1, 25506, 2, 48, 2, 1, 8), integer32().subtype(subtypeSpec=value_range_constraint(1, 2500))).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
hh3cRcrCRStudyIpPrefixNum.setStatus('current')
if mibBuilder.loadTexts:
hh3cRcrCRStudyIpPrefixNum.setDescription('The max number of collecting prefix in studying configuration mode.')
hh3c_rcr_cr_ip_prefix_len = mib_scalar((1, 3, 6, 1, 4, 1, 25506, 2, 48, 2, 1, 9), integer32().subtype(subtypeSpec=value_range_constraint(1, 32)).clone(24)).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
hh3cRcrCRIpPrefixLen.setStatus('current')
if mibBuilder.loadTexts:
hh3cRcrCRIpPrefixLen.setDescription('The mask length of collecting prefix in configuration mode.')
hh3c_rcr_cr_rcr_policy_table = mib_table((1, 3, 6, 1, 4, 1, 25506, 2, 48, 2, 2))
if mibBuilder.loadTexts:
hh3cRcrCRRcrPolicyTable.setStatus('current')
if mibBuilder.loadTexts:
hh3cRcrCRRcrPolicyTable.setDescription('This table contains objects to get statistic information of interfaces on a device.')
hh3c_rcr_cr_rcr_policy_entry = mib_table_row((1, 3, 6, 1, 4, 1, 25506, 2, 48, 2, 2, 1)).setIndexNames((0, 'HH3C-RCR-MIB', 'hh3cRcrCRRcrPlyID'))
if mibBuilder.loadTexts:
hh3cRcrCRRcrPolicyEntry.setStatus('current')
if mibBuilder.loadTexts:
hh3cRcrCRRcrPolicyEntry.setDescription('Entry items')
hh3c_rcr_cr_rcr_ply_id = mib_table_column((1, 3, 6, 1, 4, 1, 25506, 2, 48, 2, 2, 1, 1), integer32())
if mibBuilder.loadTexts:
hh3cRcrCRRcrPlyID.setStatus('current')
if mibBuilder.loadTexts:
hh3cRcrCRRcrPlyID.setDescription('The ID of RCR policy which the user has configured.')
hh3c_rcr_cr_rcr_ply_match_ip_list_name = mib_table_column((1, 3, 6, 1, 4, 1, 25506, 2, 48, 2, 2, 1, 2), octet_string().subtype(subtypeSpec=value_size_constraint(1, 19))).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
hh3cRcrCRRcrPlyMatchIPListName.setStatus('current')
if mibBuilder.loadTexts:
hh3cRcrCRRcrPlyMatchIPListName.setDescription('The matched IP prefix list name of RCR policy which the user has configured.')
hh3c_rcr_cr_rcr_ply_match_study_enable = mib_table_column((1, 3, 6, 1, 4, 1, 25506, 2, 48, 2, 2, 1, 3), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2))).clone(namedValues=named_values(('disable', 1), ('enable', 2)))).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
hh3cRcrCRRcrPlyMatchStudyEnable.setStatus('current')
if mibBuilder.loadTexts:
hh3cRcrCRRcrPlyMatchStudyEnable.setDescription('Whether the RCR policy which the user has configured is matched for studying prefix mode.')
hh3c_rcr_cr_rcr_ply_match_oper_ply_name = mib_table_column((1, 3, 6, 1, 4, 1, 25506, 2, 48, 2, 2, 1, 4), octet_string().subtype(subtypeSpec=value_size_constraint(1, 19))).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
hh3cRcrCRRcrPlyMatchOperPlyName.setStatus('current')
if mibBuilder.loadTexts:
hh3cRcrCRRcrPlyMatchOperPlyName.setDescription('The matched operation policy name of RCR policy which the user has configured.')
hh3c_rcr_cr_rcr_acl_number = mib_table_column((1, 3, 6, 1, 4, 1, 25506, 2, 48, 2, 2, 1, 5), integer32().subtype(subtypeSpec=value_range_constraint(3000, 3999))).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
hh3cRcrCRRcrAclNumber.setStatus('current')
if mibBuilder.loadTexts:
hh3cRcrCRRcrAclNumber.setDescription('The matched acl number of RCR operation policy which the user has configured.')
hh3c_rcr_cr_rcr_ply_delay_time = mib_table_column((1, 3, 6, 1, 4, 1, 25506, 2, 48, 2, 2, 1, 6), integer32().subtype(subtypeSpec=value_range_constraint(1, 10000))).setUnits('millisecond').setMaxAccess('readwrite')
if mibBuilder.loadTexts:
hh3cRcrCRRcrPlyDelayTime.setStatus('current')
if mibBuilder.loadTexts:
hh3cRcrCRRcrPlyDelayTime.setDescription('The absolute maximum delay time. The range of values that can be configured is from 1 to 10000.')
hh3c_rcr_cr_rcr_ply_loss_rate = mib_table_column((1, 3, 6, 1, 4, 1, 25506, 2, 48, 2, 2, 1, 7), integer32().subtype(subtypeSpec=value_range_constraint(1, 100))).setUnits('%').setMaxAccess('readwrite')
if mibBuilder.loadTexts:
hh3cRcrCRRcrPlyLossRate.setStatus('current')
if mibBuilder.loadTexts:
hh3cRcrCRRcrPlyLossRate.setDescription('The packet loss percent of prefix which the CR concerns.')
hh3c_rcr_cr_mat_prefix_perf_table = mib_table((1, 3, 6, 1, 4, 1, 25506, 2, 48, 2, 3))
if mibBuilder.loadTexts:
hh3cRcrCRMatPrefixPerfTable.setStatus('current')
if mibBuilder.loadTexts:
hh3cRcrCRMatPrefixPerfTable.setDescription('This table contains the matched prefix performance information.')
hh3c_rcr_cr_mat_prefix_perf_entry = mib_table_row((1, 3, 6, 1, 4, 1, 25506, 2, 48, 2, 3, 1)).setIndexNames((0, 'HH3C-RCR-MIB', 'hh3cRcrCRMatPrefPerfAddrType'), (0, 'HH3C-RCR-MIB', 'hh3cRcrCRMatPrefPerfDestIPAddr'), (0, 'HH3C-RCR-MIB', 'hh3cRcrCRMatPrefPerfDestMaskLen'))
if mibBuilder.loadTexts:
hh3cRcrCRMatPrefixPerfEntry.setStatus('current')
if mibBuilder.loadTexts:
hh3cRcrCRMatPrefixPerfEntry.setDescription('Entry items')
hh3c_rcr_cr_mat_pref_perf_addr_type = mib_table_column((1, 3, 6, 1, 4, 1, 25506, 2, 48, 2, 3, 1, 1), inet_address_type())
if mibBuilder.loadTexts:
hh3cRcrCRMatPrefPerfAddrType.setStatus('current')
if mibBuilder.loadTexts:
hh3cRcrCRMatPrefPerfAddrType.setDescription('The destination IP addresses type of matched prefix which the CR wants (IPv4 or IPv6).')
hh3c_rcr_cr_mat_pref_perf_dest_ip_addr = mib_table_column((1, 3, 6, 1, 4, 1, 25506, 2, 48, 2, 3, 1, 2), inet_address())
if mibBuilder.loadTexts:
hh3cRcrCRMatPrefPerfDestIPAddr.setStatus('current')
if mibBuilder.loadTexts:
hh3cRcrCRMatPrefPerfDestIPAddr.setDescription('The destination IP address of matched prefix which the CR wants.')
hh3c_rcr_cr_mat_pref_perf_dest_mask_len = mib_table_column((1, 3, 6, 1, 4, 1, 25506, 2, 48, 2, 3, 1, 3), integer32().subtype(subtypeSpec=value_range_constraint(0, 32)))
if mibBuilder.loadTexts:
hh3cRcrCRMatPrefPerfDestMaskLen.setStatus('current')
if mibBuilder.loadTexts:
hh3cRcrCRMatPrefPerfDestMaskLen.setDescription('The destination IP address mask length of matched prefix which the CR wants.')
hh3c_rcr_cr_mat_pref_perf_delay_time = mib_table_column((1, 3, 6, 1, 4, 1, 25506, 2, 48, 2, 3, 1, 4), integer32().subtype(subtypeSpec=value_range_constraint(1, 10000))).setUnits('second').setMaxAccess('readonly')
if mibBuilder.loadTexts:
hh3cRcrCRMatPrefPerfDelayTime.setStatus('current')
if mibBuilder.loadTexts:
hh3cRcrCRMatPrefPerfDelayTime.setDescription('The absolute maximum delay time of prefix which the CR has configured.')
hh3c_rcr_cr_mat_pref_perf_loss_rate = mib_table_column((1, 3, 6, 1, 4, 1, 25506, 2, 48, 2, 3, 1, 5), integer32().subtype(subtypeSpec=value_range_constraint(1, 100))).setUnits('%').setMaxAccess('readonly')
if mibBuilder.loadTexts:
hh3cRcrCRMatPrefPerfLossRate.setStatus('current')
if mibBuilder.loadTexts:
hh3cRcrCRMatPrefPerfLossRate.setDescription('The packet loss percent of prefix which the CR has configured.')
hh3c_rcr_cr_mat_pref_perf_throughput = mib_table_column((1, 3, 6, 1, 4, 1, 25506, 2, 48, 2, 3, 1, 6), integer32()).setUnits('kb').setMaxAccess('readonly')
if mibBuilder.loadTexts:
hh3cRcrCRMatPrefPerfThroughput.setStatus('current')
if mibBuilder.loadTexts:
hh3cRcrCRMatPrefPerfThroughput.setDescription('The bandwidth of prefix which the CR has monitored.')
hh3c_rcr_cr_adjust_prefix_table = mib_table((1, 3, 6, 1, 4, 1, 25506, 2, 48, 2, 4))
if mibBuilder.loadTexts:
hh3cRcrCRAdjustPrefixTable.setStatus('current')
if mibBuilder.loadTexts:
hh3cRcrCRAdjustPrefixTable.setDescription('This table contains objects to get adjusted prefix information which the CR controlled.')
hh3c_rcr_cr_adjust_prefix_entry = mib_table_row((1, 3, 6, 1, 4, 1, 25506, 2, 48, 2, 4, 1)).setIndexNames((0, 'HH3C-RCR-MIB', 'hh3cRcrCRAdjuPrefDestAddrType'), (0, 'HH3C-RCR-MIB', 'hh3cRcrCRAdjuPrefDestAddr'), (0, 'HH3C-RCR-MIB', 'hh3cRcrCRAdjuPrefMaskLen'), (0, 'HH3C-RCR-MIB', 'hh3cRcrCRAdjuPrefPreMRName'), (0, 'HH3C-RCR-MIB', 'hh3cRcrCRAdjuPrefPreOutIfName'))
if mibBuilder.loadTexts:
hh3cRcrCRAdjustPrefixEntry.setStatus('current')
if mibBuilder.loadTexts:
hh3cRcrCRAdjustPrefixEntry.setDescription('Entry items')
hh3c_rcr_cr_adju_pref_dest_addr_type = mib_table_column((1, 3, 6, 1, 4, 1, 25506, 2, 48, 2, 4, 1, 1), inet_address_type())
if mibBuilder.loadTexts:
hh3cRcrCRAdjuPrefDestAddrType.setStatus('current')
if mibBuilder.loadTexts:
hh3cRcrCRAdjuPrefDestAddrType.setDescription('The IP address type of the adjusted prefix which CR controlled (IPv4 or IPv6).')
hh3c_rcr_cr_adju_pref_dest_addr = mib_table_column((1, 3, 6, 1, 4, 1, 25506, 2, 48, 2, 4, 1, 2), inet_address())
if mibBuilder.loadTexts:
hh3cRcrCRAdjuPrefDestAddr.setStatus('current')
if mibBuilder.loadTexts:
hh3cRcrCRAdjuPrefDestAddr.setDescription('The IP address of the adjusted prefix which CR controlled.')
hh3c_rcr_cr_adju_pref_mask_len = mib_table_column((1, 3, 6, 1, 4, 1, 25506, 2, 48, 2, 4, 1, 3), integer32().subtype(subtypeSpec=value_range_constraint(0, 32)))
if mibBuilder.loadTexts:
hh3cRcrCRAdjuPrefMaskLen.setStatus('current')
if mibBuilder.loadTexts:
hh3cRcrCRAdjuPrefMaskLen.setDescription('The IP address mask length of the adjusted prefix which CR controlled.')
hh3c_rcr_cr_adju_pref_pre_mr_name = mib_table_column((1, 3, 6, 1, 4, 1, 25506, 2, 48, 2, 4, 1, 4), octet_string().subtype(subtypeSpec=value_size_constraint(1, 32)))
if mibBuilder.loadTexts:
hh3cRcrCRAdjuPrefPreMRName.setStatus('current')
if mibBuilder.loadTexts:
hh3cRcrCRAdjuPrefPreMRName.setDescription('The name of the MR which the previous outbound traffic flows through.')
hh3c_rcr_cr_adju_pref_pre_out_if_name = mib_table_column((1, 3, 6, 1, 4, 1, 25506, 2, 48, 2, 4, 1, 5), octet_string().subtype(subtypeSpec=value_size_constraint(1, 48)))
if mibBuilder.loadTexts:
hh3cRcrCRAdjuPrefPreOutIfName.setStatus('current')
if mibBuilder.loadTexts:
hh3cRcrCRAdjuPrefPreOutIfName.setDescription('The name of the external interface on the MR which the previous outbound traffic flows through.')
hh3c_rcr_cr_adju_pref_cur_mr_name = mib_table_column((1, 3, 6, 1, 4, 1, 25506, 2, 48, 2, 4, 1, 6), octet_string().subtype(subtypeSpec=value_size_constraint(1, 32))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
hh3cRcrCRAdjuPrefCurMRName.setStatus('current')
if mibBuilder.loadTexts:
hh3cRcrCRAdjuPrefCurMRName.setDescription('The name of the MR which the current outbound traffic flows through.')
hh3c_rcr_cr_adju_pref_cur_out_if_name = mib_table_column((1, 3, 6, 1, 4, 1, 25506, 2, 48, 2, 4, 1, 7), octet_string()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
hh3cRcrCRAdjuPrefCurOutIfName.setStatus('current')
if mibBuilder.loadTexts:
hh3cRcrCRAdjuPrefCurOutIfName.setDescription('The name of the external interface on the MR which the current outbound traffic flows through.')
hh3c_rcr_cr_adju_pref_persist_time = mib_table_column((1, 3, 6, 1, 4, 1, 25506, 2, 48, 2, 4, 1, 8), integer32()).setUnits('second').setMaxAccess('readonly')
if mibBuilder.loadTexts:
hh3cRcrCRAdjuPrefPersistTime.setStatus('current')
if mibBuilder.loadTexts:
hh3cRcrCRAdjuPrefPersistTime.setDescription('The persisting time from the time which the adjusted outbound traffic has been adjusted by CR to now.')
hh3c_rcr_cr_adju_pref_age_time = mib_table_column((1, 3, 6, 1, 4, 1, 25506, 2, 48, 2, 4, 1, 9), integer32()).setUnits('second').setMaxAccess('readonly')
if mibBuilder.loadTexts:
hh3cRcrCRAdjuPrefAgeTime.setStatus('current')
if mibBuilder.loadTexts:
hh3cRcrCRAdjuPrefAgeTime.setDescription('The time which the adjusted prefix remains.')
mibBuilder.exportSymbols('HH3C-RCR-MIB', hh3cRcrCRAdjuPrefDestAddr=hh3cRcrCRAdjuPrefDestAddr, hh3cRcrCRMatPrefPerfDestIPAddr=hh3cRcrCRMatPrefPerfDestIPAddr, hh3cRcrCRMatPrefPerfDestMaskLen=hh3cRcrCRMatPrefPerfDestMaskLen, hh3cRcrMR=hh3cRcrMR, hh3cRcrCRStudyMode=hh3cRcrCRStudyMode, hh3cRcrMRName=hh3cRcrMRName, hh3cRcrCRRcrPlyID=hh3cRcrCRRcrPlyID, hh3cRcrCRRcrPlyMatchOperPlyName=hh3cRcrCRRcrPlyMatchOperPlyName, hh3cRcrCRMatPrefixPerfEntry=hh3cRcrCRMatPrefixPerfEntry, hh3cRcrCRAdjuPrefPreOutIfName=hh3cRcrCRAdjuPrefPreOutIfName, hh3cRcrMRGroup=hh3cRcrMRGroup, hh3cRcrMRStateEntry=hh3cRcrMRStateEntry, hh3cRcrCR=hh3cRcrCR, hh3cRcrCRPortNum=hh3cRcrCRPortNum, hh3cRcrCRRcrPlyLossRate=hh3cRcrCRRcrPlyLossRate, hh3cRcrMROutIfUsedBandRate=hh3cRcrMROutIfUsedBandRate, hh3cRcr=hh3cRcr, hh3cRcrMRAuthType=hh3cRcrMRAuthType, hh3cRcrMRAuthPwd=hh3cRcrMRAuthPwd, hh3cRcrCRRcrAclNumber=hh3cRcrCRRcrAclNumber, hh3cRcrCRChooseMode=hh3cRcrCRChooseMode, hh3cRcrCRAdjustPrefixTable=hh3cRcrCRAdjustPrefixTable, hh3cRcrMROutIfStateEntry=hh3cRcrMROutIfStateEntry, hh3cRcrCRMatPrefPerfThroughput=hh3cRcrCRMatPrefPerfThroughput, hh3cRcrCRGroup=hh3cRcrCRGroup, hh3cRcrCRAdjuPrefPreMRName=hh3cRcrCRAdjuPrefPreMRName, hh3cRcrCRAdjustPrefixEntry=hh3cRcrCRAdjustPrefixEntry, hh3cRcrCRMatPrefPerfAddrType=hh3cRcrCRMatPrefPerfAddrType, hh3cRcrMRStateTable=hh3cRcrMRStateTable, hh3cRcrCRAdjuPrefCurOutIfName=hh3cRcrCRAdjuPrefCurOutIfName, hh3cRcrCRAdjuPrefAgeTime=hh3cRcrCRAdjuPrefAgeTime, hh3cRcrCRMatPrefixPerfTable=hh3cRcrCRMatPrefixPerfTable, hh3cRcrMROutIfMaxUsedBandRate=hh3cRcrMROutIfMaxUsedBandRate, hh3cRcrMROutIfStateTable=hh3cRcrMROutIfStateTable, hh3cRcrMRAllMaxUsedBandRate=hh3cRcrMRAllMaxUsedBandRate, hh3cRcrCRCtrlMode=hh3cRcrCRCtrlMode, hh3cRcrCRRcrPlyMatchStudyEnable=hh3cRcrCRRcrPlyMatchStudyEnable, hh3cRcrMRState=hh3cRcrMRState, hh3cRcrCRKeepaliveTime=hh3cRcrCRKeepaliveTime, hh3cRcrMROutIfState=hh3cRcrMROutIfState, hh3cRcrMROutIfMinUsedBandRate=hh3cRcrMROutIfMinUsedBandRate, hh3cRcrCRIpPrefixLen=hh3cRcrCRIpPrefixLen, hh3cRcrCRMatPrefPerfLossRate=hh3cRcrCRMatPrefPerfLossRate, hh3cRcrMRAllMinUsedBandRate=hh3cRcrMRAllMinUsedBandRate, hh3cRcrMRListenTime=hh3cRcrMRListenTime, hh3cRcrCRStudyIpPrefixNum=hh3cRcrCRStudyIpPrefixNum, hh3cRcrCRRcrPolicyEntry=hh3cRcrCRRcrPolicyEntry, hh3cRcrCRRcrPlyMatchIPListName=hh3cRcrCRRcrPlyMatchIPListName, hh3cRcrCRAdjuPrefDestAddrType=hh3cRcrCRAdjuPrefDestAddrType, hh3cRcrCRMatPrefPerfDelayTime=hh3cRcrCRMatPrefPerfDelayTime, hh3cRcrMROutIfName=hh3cRcrMROutIfName, hh3cRcrCRState=hh3cRcrCRState, hh3cRcrCRRcrPolicyTable=hh3cRcrCRRcrPolicyTable, hh3cRcrCRAdjuPrefMaskLen=hh3cRcrCRAdjuPrefMaskLen, hh3cRcrCRAdjuPrefCurMRName=hh3cRcrCRAdjuPrefCurMRName, hh3cRcrCRRcrPlyDelayTime=hh3cRcrCRRcrPlyDelayTime, PYSNMP_MODULE_ID=hh3cRcr, hh3cRcrCRPolicyMode=hh3cRcrCRPolicyMode, hh3cRcrCRAdjuPrefPersistTime=hh3cRcrCRAdjuPrefPersistTime) |
DATA_DIR = "/path/your_data_path"
IDX_DIR = "/path/your_index_path"
FILE_ROOT = "./test"
CALIB_FILE = "./imagenet_int8_cache"
MODEL_FILE = "./resnet_imagenet.uff" | data_dir = '/path/your_data_path'
idx_dir = '/path/your_index_path'
file_root = './test'
calib_file = './imagenet_int8_cache'
model_file = './resnet_imagenet.uff' |
APP_DIRECTORY_NAME = "APP"
SRC_DIRECTORY_NAME = "src"
TEMPLATES_DIRECTORY_NAME = "templates"
# Production React Js Template files having Github Repository Links
REACTJS_TEMPLATES_URLS_DICT = {
"package.json-tpl": "https://raw.githubusercontent.com/Jitensid/django-webpack-dev-server/main/assets/reactjs/package.json-tpl",
"webpack.config.js-tpl": "https://raw.githubusercontent.com/Jitensid/django-webpack-dev-server/main/assets/reactjs/webpack.config.js-tpl",
"babel.config.json-tpl": "https://raw.githubusercontent.com/Jitensid/django-webpack-dev-server/main/assets/reactjs/babel.config.json-tpl",
"App.js-tpl": "https://raw.githubusercontent.com/Jitensid/django-webpack-dev-server/main/assets/reactjs/App.js-tpl",
"index.js-tpl": "https://raw.githubusercontent.com/Jitensid/django-webpack-dev-server/main/assets/reactjs/index.js-tpl",
"App.css-tpl": "https://raw.githubusercontent.com/Jitensid/django-webpack-dev-server/main/assets/reactjs/App.css-tpl",
"reactlogo.png": "https://raw.githubusercontent.com/Jitensid/django-webpack-dev-server/main/assets/reactjs/reactlogo.png",
}
# Template files specific to react js configuration
PROD_REACTJS_TEMPLATE_FILES = [
(
APP_DIRECTORY_NAME,
"package.json",
REACTJS_TEMPLATES_URLS_DICT["package.json-tpl"],
),
(
APP_DIRECTORY_NAME,
"webpack.config.js",
REACTJS_TEMPLATES_URLS_DICT["webpack.config.js-tpl"],
),
(
APP_DIRECTORY_NAME,
"babel.config.json",
REACTJS_TEMPLATES_URLS_DICT["babel.config.json-tpl"],
),
(SRC_DIRECTORY_NAME, "App.js", REACTJS_TEMPLATES_URLS_DICT["App.js-tpl"]),
(SRC_DIRECTORY_NAME, "index.js", REACTJS_TEMPLATES_URLS_DICT["index.js-tpl"]),
(SRC_DIRECTORY_NAME, "App.css", REACTJS_TEMPLATES_URLS_DICT["App.css-tpl"]),
(SRC_DIRECTORY_NAME, "reactlogo.png", REACTJS_TEMPLATES_URLS_DICT["reactlogo.png"]),
]
| app_directory_name = 'APP'
src_directory_name = 'src'
templates_directory_name = 'templates'
reactjs_templates_urls_dict = {'package.json-tpl': 'https://raw.githubusercontent.com/Jitensid/django-webpack-dev-server/main/assets/reactjs/package.json-tpl', 'webpack.config.js-tpl': 'https://raw.githubusercontent.com/Jitensid/django-webpack-dev-server/main/assets/reactjs/webpack.config.js-tpl', 'babel.config.json-tpl': 'https://raw.githubusercontent.com/Jitensid/django-webpack-dev-server/main/assets/reactjs/babel.config.json-tpl', 'App.js-tpl': 'https://raw.githubusercontent.com/Jitensid/django-webpack-dev-server/main/assets/reactjs/App.js-tpl', 'index.js-tpl': 'https://raw.githubusercontent.com/Jitensid/django-webpack-dev-server/main/assets/reactjs/index.js-tpl', 'App.css-tpl': 'https://raw.githubusercontent.com/Jitensid/django-webpack-dev-server/main/assets/reactjs/App.css-tpl', 'reactlogo.png': 'https://raw.githubusercontent.com/Jitensid/django-webpack-dev-server/main/assets/reactjs/reactlogo.png'}
prod_reactjs_template_files = [(APP_DIRECTORY_NAME, 'package.json', REACTJS_TEMPLATES_URLS_DICT['package.json-tpl']), (APP_DIRECTORY_NAME, 'webpack.config.js', REACTJS_TEMPLATES_URLS_DICT['webpack.config.js-tpl']), (APP_DIRECTORY_NAME, 'babel.config.json', REACTJS_TEMPLATES_URLS_DICT['babel.config.json-tpl']), (SRC_DIRECTORY_NAME, 'App.js', REACTJS_TEMPLATES_URLS_DICT['App.js-tpl']), (SRC_DIRECTORY_NAME, 'index.js', REACTJS_TEMPLATES_URLS_DICT['index.js-tpl']), (SRC_DIRECTORY_NAME, 'App.css', REACTJS_TEMPLATES_URLS_DICT['App.css-tpl']), (SRC_DIRECTORY_NAME, 'reactlogo.png', REACTJS_TEMPLATES_URLS_DICT['reactlogo.png'])] |
# SPDX-License-Identifier: GPL-3.0-only
def make_definitions(f, ecpp, bcpp, all_enums, all_bitfields, all_structs_arranged):
f.write("// SPDX-License-Identifier: GPL-3.0-only\n\n// This file was auto-generated.\n// If you want to edit this, edit the .json definitions and rerun the generator script, instead.\n\n")
header_name = "INVADER__TAG__HEK__CLASS__DEFINITION_HPP"
f.write("#ifndef {}\n".format(header_name))
f.write("#define {}\n\n".format(header_name))
f.write("#include \"../../hek/data_type.hpp\"\n\n")
f.write("namespace Invader::HEK {\n")
ecpp.write("// SPDX-License-Identifier: GPL-3.0-only\n\n// This file was auto-generated.\n// If you want to edit this, edit the .json definitions and rerun the generator script, instead.\n\n")
ecpp.write("#include <cstring>\n")
ecpp.write("#include <invader/printf.hpp>\n")
ecpp.write("#include <invader/tag/hek/definition.hpp>\n\n")
ecpp.write("namespace Invader::HEK {\n")
bcpp.write("// SPDX-License-Identifier: GPL-3.0-only\n\n// This file was auto-generated.\n// If you want to edit this, edit the .json definitions and rerun the generator script, instead.\n\n")
bcpp.write("#include <cstring>\n")
bcpp.write("#include <cctype>\n")
bcpp.write("#include <invader/printf.hpp>\n")
bcpp.write("#include <invader/tag/hek/definition.hpp>\n\n")
bcpp.write("namespace Invader::HEK {\n")
# Convert PascalCase to UPPER_SNAKE_CASE
def format_enum(prefix, value):
return "{}_{}".format(prefix,value.upper()).replace("-", "_")
def format_enum_str(value):
return value.lower()
def write_enum(name, fields, fields_pretty, type, cpp):
f.write(" enum {} : {} {{\n".format(name, type))
prefix = ""
name_to_consider = name.replace("HUD", "Hud").replace("UI", "Ui").replace("GBX", "Gbx")
for i in name_to_consider:
if prefix != "" and i.isupper():
prefix += "_"
prefix += i.upper()
for n in range(0,len(fields)):
f.write(" {}{},\n".format(format_enum(prefix, fields[n]), " = static_cast<{}>(1) << {}".format(type, n) if (cpp == bcpp) else ""))
f.write(" {}\n".format(format_enum(prefix, "enum_count")))
f.write(" };\n")
f.write(" /**\n")
f.write(" * Get the string representation of the enum.\n")
f.write(" * @param value value of the enum\n")
f.write(" * @return string representation of the enum\n")
f.write(" */\n")
f.write(" const char *{}_to_string({} value);\n".format(name, name))
cpp.write(" const char *{}_to_string({} value) {{\n".format(name, name))
cpp.write(" switch(value) {\n")
for n in fields:
cpp.write(" case {}::{}:\n".format(name, format_enum(prefix, n)))
cpp.write(" return \"{}\";\n".format(format_enum_str(n)))
cpp.write(" default:\n")
cpp.write(" throw std::exception();\n")
cpp.write(" }\n")
cpp.write(" }\n")
f.write(" /**\n")
f.write(" * Get the pretty string representation of the enum.\n")
f.write(" * @param value value of the enum\n")
f.write(" * @return pretty string representation of the enum\n")
f.write(" */\n")
f.write(" const char *{}_to_string_pretty({} value);\n".format(name, name))
cpp.write(" const char *{}_to_string_pretty({} value) {{\n".format(name, name))
cpp.write(" switch(value) {\n")
for n in range(0,len(fields)):
cpp.write(" case {}::{}:\n".format(name, format_enum(prefix, fields[n])))
cpp.write(" return \"{}\";\n".format(fields_pretty[n]))
cpp.write(" default:\n")
cpp.write(" throw std::exception();\n")
cpp.write(" }\n")
cpp.write(" }\n")
f.write(" /**\n")
f.write(" * Get the enum value from the string.\n")
f.write(" * @param value value of the enum as a string\n")
f.write(" * @return value of the enum\n")
f.write(" */\n")
f.write(" {} {}_from_string(const char *value);\n".format(name, name))
cpp.write(" {} {}_from_string(const char *value) {{\n".format(name, name))
for n in range(0,len(fields)):
cpp.write(" {}if(std::strcmp(value, \"{}\") == 0) {{\n".format("" if n == 0 else "else ", format_enum_str(fields[n])))
cpp.write(" return {}::{};\n".format(name, format_enum(prefix, fields[n])))
cpp.write(" }\n")
cpp.write(" else {\n")
cpp.write(" throw std::exception();\n")
cpp.write(" }\n")
cpp.write(" }\n")
f.write("\n")
# Write enums at the top first, then bitfields
for e in all_enums:
write_enum(e["name"], e["options_formatted"], e["options"], "TagEnum", ecpp)
for b in all_bitfields:
f.write(" using {} = std::uint{}_t;\n".format(b["name"], b["width"]))
write_enum("{}Flag".format(b["name"]), b["fields_formatted"], b["fields"], "std::uint{}_t".format(b["width"]), bcpp)
ecpp.write("}\n")
bcpp.write("}\n")
# Now the hard part
padding_present = False
for s in all_structs_arranged:
f.write(" ENDIAN_TEMPLATE(EndianType) struct {} {}{{\n".format(s["name"], ": {}<EndianType> ".format(s["inherits"]) if "inherits" in s else ""))
for n in s["fields"]:
type_to_write = n["type"]
if type_to_write.startswith("int") or type_to_write.startswith("uint"):
type_to_write = "std::{}_t".format(type_to_write)
elif type_to_write == "pad":
f.write(" PAD(0x{:X});\n".format(n["size"]))
continue
if "flagged" in n and n["flagged"]:
type_to_write = "FlaggedInt<{}>".format(type_to_write)
name = n["member_name"]
if "count" in n:
name = "{}[{}]".format(name, n["count"])
format_to_use = None
default_endian = "EndianType"
if "endian" in n:
if n["endian"] == "little":
default_endian = "LittleEndian"
elif n["endian"] == "big":
default_endian = "BigEndian"
elif n["endian"] == None:
default_endian = None
if type_to_write == "TagReflexive":
f.write(" TagReflexive<{}, {}> {};\n".format(default_endian, n["struct"], name))
else:
if default_endian is None:
format_to_use = "{}"
elif "compound" in n and n["compound"]:
format_to_use = "{{}}<{}>".format(default_endian)
else:
format_to_use = "{}<{{}}>".format(default_endian)
if "bounds" in n and n["bounds"]:
f.write(" Bounds<{}> {};\n".format(format_to_use.format(type_to_write), name))
else:
f.write(" {} {};\n".format(format_to_use.format(type_to_write), name))
# Make sure we have all of the structs we depend on, too
depended_structs = []
dependency = s
padding_present = False
while dependency is not None:
depended_structs.append(dependency)
if not padding_present:
for n in dependency["fields"]:
if n["type"] == "pad":
padding_present = True
break
if "inherits" in dependency:
dependency_name = dependency["inherits"]
dependency = None
for ds in all_structs_arranged:
if ds["name"] == dependency_name:
dependency = ds
break
else:
break
# And we can't forget the copy part
f.write(" ENDIAN_TEMPLATE(NewEndian) operator {}<NewEndian>() const {{\n".format(s["name"]))
f.write(" {}<NewEndian> copy{};\n".format(s["name"], " = {}" if padding_present else ""))
for ds in depended_structs:
for n in ds["fields"]:
if n["type"] == "pad":
continue
else:
f.write(" {}({});\n".format("COPY_THIS_ARRAY" if "count" in n else "COPY_THIS", n["member_name"]))
f.write(" return copy;\n")
f.write(" }\n")
f.write(" };\n")
f.write(" static_assert(sizeof({}<NativeEndian>) == 0x{:X});\n\n".format(s["name"], s["size"]))
f.write("}\n\n")
f.write("#endif\n")
| def make_definitions(f, ecpp, bcpp, all_enums, all_bitfields, all_structs_arranged):
f.write('// SPDX-License-Identifier: GPL-3.0-only\n\n// This file was auto-generated.\n// If you want to edit this, edit the .json definitions and rerun the generator script, instead.\n\n')
header_name = 'INVADER__TAG__HEK__CLASS__DEFINITION_HPP'
f.write('#ifndef {}\n'.format(header_name))
f.write('#define {}\n\n'.format(header_name))
f.write('#include "../../hek/data_type.hpp"\n\n')
f.write('namespace Invader::HEK {\n')
ecpp.write('// SPDX-License-Identifier: GPL-3.0-only\n\n// This file was auto-generated.\n// If you want to edit this, edit the .json definitions and rerun the generator script, instead.\n\n')
ecpp.write('#include <cstring>\n')
ecpp.write('#include <invader/printf.hpp>\n')
ecpp.write('#include <invader/tag/hek/definition.hpp>\n\n')
ecpp.write('namespace Invader::HEK {\n')
bcpp.write('// SPDX-License-Identifier: GPL-3.0-only\n\n// This file was auto-generated.\n// If you want to edit this, edit the .json definitions and rerun the generator script, instead.\n\n')
bcpp.write('#include <cstring>\n')
bcpp.write('#include <cctype>\n')
bcpp.write('#include <invader/printf.hpp>\n')
bcpp.write('#include <invader/tag/hek/definition.hpp>\n\n')
bcpp.write('namespace Invader::HEK {\n')
def format_enum(prefix, value):
return '{}_{}'.format(prefix, value.upper()).replace('-', '_')
def format_enum_str(value):
return value.lower()
def write_enum(name, fields, fields_pretty, type, cpp):
f.write(' enum {} : {} {{\n'.format(name, type))
prefix = ''
name_to_consider = name.replace('HUD', 'Hud').replace('UI', 'Ui').replace('GBX', 'Gbx')
for i in name_to_consider:
if prefix != '' and i.isupper():
prefix += '_'
prefix += i.upper()
for n in range(0, len(fields)):
f.write(' {}{},\n'.format(format_enum(prefix, fields[n]), ' = static_cast<{}>(1) << {}'.format(type, n) if cpp == bcpp else ''))
f.write(' {}\n'.format(format_enum(prefix, 'enum_count')))
f.write(' };\n')
f.write(' /**\n')
f.write(' * Get the string representation of the enum.\n')
f.write(' * @param value value of the enum\n')
f.write(' * @return string representation of the enum\n')
f.write(' */\n')
f.write(' const char *{}_to_string({} value);\n'.format(name, name))
cpp.write(' const char *{}_to_string({} value) {{\n'.format(name, name))
cpp.write(' switch(value) {\n')
for n in fields:
cpp.write(' case {}::{}:\n'.format(name, format_enum(prefix, n)))
cpp.write(' return "{}";\n'.format(format_enum_str(n)))
cpp.write(' default:\n')
cpp.write(' throw std::exception();\n')
cpp.write(' }\n')
cpp.write(' }\n')
f.write(' /**\n')
f.write(' * Get the pretty string representation of the enum.\n')
f.write(' * @param value value of the enum\n')
f.write(' * @return pretty string representation of the enum\n')
f.write(' */\n')
f.write(' const char *{}_to_string_pretty({} value);\n'.format(name, name))
cpp.write(' const char *{}_to_string_pretty({} value) {{\n'.format(name, name))
cpp.write(' switch(value) {\n')
for n in range(0, len(fields)):
cpp.write(' case {}::{}:\n'.format(name, format_enum(prefix, fields[n])))
cpp.write(' return "{}";\n'.format(fields_pretty[n]))
cpp.write(' default:\n')
cpp.write(' throw std::exception();\n')
cpp.write(' }\n')
cpp.write(' }\n')
f.write(' /**\n')
f.write(' * Get the enum value from the string.\n')
f.write(' * @param value value of the enum as a string\n')
f.write(' * @return value of the enum\n')
f.write(' */\n')
f.write(' {} {}_from_string(const char *value);\n'.format(name, name))
cpp.write(' {} {}_from_string(const char *value) {{\n'.format(name, name))
for n in range(0, len(fields)):
cpp.write(' {}if(std::strcmp(value, "{}") == 0) {{\n'.format('' if n == 0 else 'else ', format_enum_str(fields[n])))
cpp.write(' return {}::{};\n'.format(name, format_enum(prefix, fields[n])))
cpp.write(' }\n')
cpp.write(' else {\n')
cpp.write(' throw std::exception();\n')
cpp.write(' }\n')
cpp.write(' }\n')
f.write('\n')
for e in all_enums:
write_enum(e['name'], e['options_formatted'], e['options'], 'TagEnum', ecpp)
for b in all_bitfields:
f.write(' using {} = std::uint{}_t;\n'.format(b['name'], b['width']))
write_enum('{}Flag'.format(b['name']), b['fields_formatted'], b['fields'], 'std::uint{}_t'.format(b['width']), bcpp)
ecpp.write('}\n')
bcpp.write('}\n')
padding_present = False
for s in all_structs_arranged:
f.write(' ENDIAN_TEMPLATE(EndianType) struct {} {}{{\n'.format(s['name'], ': {}<EndianType> '.format(s['inherits']) if 'inherits' in s else ''))
for n in s['fields']:
type_to_write = n['type']
if type_to_write.startswith('int') or type_to_write.startswith('uint'):
type_to_write = 'std::{}_t'.format(type_to_write)
elif type_to_write == 'pad':
f.write(' PAD(0x{:X});\n'.format(n['size']))
continue
if 'flagged' in n and n['flagged']:
type_to_write = 'FlaggedInt<{}>'.format(type_to_write)
name = n['member_name']
if 'count' in n:
name = '{}[{}]'.format(name, n['count'])
format_to_use = None
default_endian = 'EndianType'
if 'endian' in n:
if n['endian'] == 'little':
default_endian = 'LittleEndian'
elif n['endian'] == 'big':
default_endian = 'BigEndian'
elif n['endian'] == None:
default_endian = None
if type_to_write == 'TagReflexive':
f.write(' TagReflexive<{}, {}> {};\n'.format(default_endian, n['struct'], name))
else:
if default_endian is None:
format_to_use = '{}'
elif 'compound' in n and n['compound']:
format_to_use = '{{}}<{}>'.format(default_endian)
else:
format_to_use = '{}<{{}}>'.format(default_endian)
if 'bounds' in n and n['bounds']:
f.write(' Bounds<{}> {};\n'.format(format_to_use.format(type_to_write), name))
else:
f.write(' {} {};\n'.format(format_to_use.format(type_to_write), name))
depended_structs = []
dependency = s
padding_present = False
while dependency is not None:
depended_structs.append(dependency)
if not padding_present:
for n in dependency['fields']:
if n['type'] == 'pad':
padding_present = True
break
if 'inherits' in dependency:
dependency_name = dependency['inherits']
dependency = None
for ds in all_structs_arranged:
if ds['name'] == dependency_name:
dependency = ds
break
else:
break
f.write(' ENDIAN_TEMPLATE(NewEndian) operator {}<NewEndian>() const {{\n'.format(s['name']))
f.write(' {}<NewEndian> copy{};\n'.format(s['name'], ' = {}' if padding_present else ''))
for ds in depended_structs:
for n in ds['fields']:
if n['type'] == 'pad':
continue
else:
f.write(' {}({});\n'.format('COPY_THIS_ARRAY' if 'count' in n else 'COPY_THIS', n['member_name']))
f.write(' return copy;\n')
f.write(' }\n')
f.write(' };\n')
f.write(' static_assert(sizeof({}<NativeEndian>) == 0x{:X});\n\n'.format(s['name'], s['size']))
f.write('}\n\n')
f.write('#endif\n') |
def run_gbrt(d, r, t, ne=0, lr=0.1, md=3, trs=0, frs=0, mf=7):
X_train, X_test, y_train, y_test = train_test_split(
np.append(r, d, 1), t, random_state=trs)
gbrt = GradientBoostingClassifier(
n_estimators=ne, learning_rate=lr, max_depth=md, max_features=mf, random_state=frs)
gbrt.fit(X_train[:, 1:], y_train)
print("Training score: {:.3f}".format(gbrt.score(X_train[:, 1:], y_train)))
print("Test score: {:.3f}".format(gbrt.score(X_test[:, 1:], y_test)))
plot_feature_importances(gbrt)
preds = gbrt.predict(X_test[:, 1:])
print(preds)
print('Predictions: {} {}'.format(type(preds), preds.shape))
dec = gbrt.decision_function(X_test[:, 1:])
print('Decision function: {} {}'.format(type(dec), dec.shape))
print(dec[:3])
probs = gbrt.predict_proba(X_test[:, 1:])
print('Probabilities: {} {}'.format(type(probs), probs.shape))
print(probs[:3])
outcomes = np.append(X_test, np.reshape(preds, (-1, 1)), 1)
print(outcomes[:6])
| def run_gbrt(d, r, t, ne=0, lr=0.1, md=3, trs=0, frs=0, mf=7):
(x_train, x_test, y_train, y_test) = train_test_split(np.append(r, d, 1), t, random_state=trs)
gbrt = gradient_boosting_classifier(n_estimators=ne, learning_rate=lr, max_depth=md, max_features=mf, random_state=frs)
gbrt.fit(X_train[:, 1:], y_train)
print('Training score: {:.3f}'.format(gbrt.score(X_train[:, 1:], y_train)))
print('Test score: {:.3f}'.format(gbrt.score(X_test[:, 1:], y_test)))
plot_feature_importances(gbrt)
preds = gbrt.predict(X_test[:, 1:])
print(preds)
print('Predictions: {} {}'.format(type(preds), preds.shape))
dec = gbrt.decision_function(X_test[:, 1:])
print('Decision function: {} {}'.format(type(dec), dec.shape))
print(dec[:3])
probs = gbrt.predict_proba(X_test[:, 1:])
print('Probabilities: {} {}'.format(type(probs), probs.shape))
print(probs[:3])
outcomes = np.append(X_test, np.reshape(preds, (-1, 1)), 1)
print(outcomes[:6]) |
class Solution:
def buildArray(self, target: List[int], n: int) -> List[str]:
res = []
n = min(max(target), n)
for i in range(1, n+1):
if i in target:
res += ["Push"]
else:
res += ["Push","Pop"]
return res
| class Solution:
def build_array(self, target: List[int], n: int) -> List[str]:
res = []
n = min(max(target), n)
for i in range(1, n + 1):
if i in target:
res += ['Push']
else:
res += ['Push', 'Pop']
return res |
expected_output = {
"vrf": {
"default": {
"source_address": "172.16.10.13",
"path": {
"172.16.121.10 BRI0": {
"neighbor_address": "172.16.121.10",
"neighbor_host": "sj1.cisco.com",
"distance_preferred_lookup": True,
"recursion_count": 0,
"interface_name": "BRI0",
"originated_topology": "ipv4 unicast base",
"lookup_topology": "ipv4 multicast base",
"route_mask": "172.16.0.0/16",
"table_type": "unicast",
}
},
"source_host": "host1",
}
}
}
| expected_output = {'vrf': {'default': {'source_address': '172.16.10.13', 'path': {'172.16.121.10 BRI0': {'neighbor_address': '172.16.121.10', 'neighbor_host': 'sj1.cisco.com', 'distance_preferred_lookup': True, 'recursion_count': 0, 'interface_name': 'BRI0', 'originated_topology': 'ipv4 unicast base', 'lookup_topology': 'ipv4 multicast base', 'route_mask': '172.16.0.0/16', 'table_type': 'unicast'}}, 'source_host': 'host1'}}} |
a = True
b = False
if a == b:
print(1)
else:
print(0)
| a = True
b = False
if a == b:
print(1)
else:
print(0) |
#!/usr/bin/env python3
i = 1
for x in range(-10000, 10000):
for y in range(-10000, 10000):
if (abs(x)+abs(y)) < 100:
i += 1
print(i)
| i = 1
for x in range(-10000, 10000):
for y in range(-10000, 10000):
if abs(x) + abs(y) < 100:
i += 1
print(i) |
class BaseChild:
payload = {
"patient": {
"lastName": "Deeererederepwswdwewwdw",
"firstName": "Allakirillohldldwwwlflrereeeded",
"middleName": "Ballerffffff",
"birthDate": "2011-05-29",
"sex": True,
"isAutoPhone": True
},
"linkType": "6",
}
def __init__(self):
pass
def post_info(self, payload):
return payload
| class Basechild:
payload = {'patient': {'lastName': 'Deeererederepwswdwewwdw', 'firstName': 'Allakirillohldldwwwlflrereeeded', 'middleName': 'Ballerffffff', 'birthDate': '2011-05-29', 'sex': True, 'isAutoPhone': True}, 'linkType': '6'}
def __init__(self):
pass
def post_info(self, payload):
return payload |
# Write a dictionary or list to hdfs
best_params = {
"Key1": 123,
"Key2": "hello"
}
save_path = "hdfs://nameservice1/user/duc.nguyenv3/projects/01_lgbm_modeling/data/output/best_params.json"
sdf = (
spark
.sparkContext
.parallelize([best_params])
.toDF()
.coalesce(1)
.write
.mode("overwrite")
.json(save_path)
)
# Load the dict to SparkDF
json_df = spark.read.json(save_path) | best_params = {'Key1': 123, 'Key2': 'hello'}
save_path = 'hdfs://nameservice1/user/duc.nguyenv3/projects/01_lgbm_modeling/data/output/best_params.json'
sdf = spark.sparkContext.parallelize([best_params]).toDF().coalesce(1).write.mode('overwrite').json(save_path)
json_df = spark.read.json(save_path) |
'''
Title : sWAP cASE
Subdomain : Strings
Domain : Python
Author : Kalpak Seal
Created : 29 September 2016
'''
__author__ = 'Kalpak Seal'
inputString = raw_input()
finalString = ""
for i in range(0, len(inputString)):
currentChar = inputString[i]
if currentChar.islower() or currentChar.isupper():
finalString += currentChar.swapcase()
else:
finalString += currentChar
print(finalString)
'''
# Alternative One liner:
print ''.join([i.lower() if i.isupper() else i.upper() for i in raw_input()])
'''
| """
Title : sWAP cASE
Subdomain : Strings
Domain : Python
Author : Kalpak Seal
Created : 29 September 2016
"""
__author__ = 'Kalpak Seal'
input_string = raw_input()
final_string = ''
for i in range(0, len(inputString)):
current_char = inputString[i]
if currentChar.islower() or currentChar.isupper():
final_string += currentChar.swapcase()
else:
final_string += currentChar
print(finalString)
"\n# Alternative One liner:\n\nprint ''.join([i.lower() if i.isupper() else i.upper() for i in raw_input()])\n\n" |
class Singleton(object):
def __init__(self, func):
self._func = func
def Instance(self,*a,**k):
try:
return self._instance
except AttributeError:
self._instance = self._func(*a,**k)
return self._instance
def __call__(self):
raise TypeError('Singletons must be accessed by `Instance`.')
def __instancecheck__(self,inst):
return isinstance(inst,self._func)
@Singleton
class App(object):
def __init__(self, ):
pass
a= App.Instance()
b=App.Instance()
print(a is b)
| class Singleton(object):
def __init__(self, func):
self._func = func
def instance(self, *a, **k):
try:
return self._instance
except AttributeError:
self._instance = self._func(*a, **k)
return self._instance
def __call__(self):
raise type_error('Singletons must be accessed by `Instance`.')
def __instancecheck__(self, inst):
return isinstance(inst, self._func)
@Singleton
class App(object):
def __init__(self):
pass
a = App.Instance()
b = App.Instance()
print(a is b) |
#
# PySNMP MIB module BLUECOAT-AV-MIB (http://snmplabs.com/pysmi)
# ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/BLUECOAT-AV-MIB
# Produced by pysmi-0.3.4 at Mon Apr 29 17:22:33 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")
ValueRangeConstraint, ConstraintsUnion, ValueSizeConstraint, SingleValueConstraint, ConstraintsIntersection = mibBuilder.importSymbols("ASN1-REFINEMENT", "ValueRangeConstraint", "ConstraintsUnion", "ValueSizeConstraint", "SingleValueConstraint", "ConstraintsIntersection")
blueCoatMgmt, = mibBuilder.importSymbols("BLUECOAT-MIB", "blueCoatMgmt")
NotificationGroup, ModuleCompliance = mibBuilder.importSymbols("SNMPv2-CONF", "NotificationGroup", "ModuleCompliance")
NotificationType, ObjectIdentity, Integer32, Counter32, Bits, ModuleIdentity, iso, Unsigned32, IpAddress, MibIdentifier, TimeTicks, Gauge32, MibScalar, MibTable, MibTableRow, MibTableColumn, Counter64 = mibBuilder.importSymbols("SNMPv2-SMI", "NotificationType", "ObjectIdentity", "Integer32", "Counter32", "Bits", "ModuleIdentity", "iso", "Unsigned32", "IpAddress", "MibIdentifier", "TimeTicks", "Gauge32", "MibScalar", "MibTable", "MibTableRow", "MibTableColumn", "Counter64")
DateAndTime, TextualConvention, DisplayString = mibBuilder.importSymbols("SNMPv2-TC", "DateAndTime", "TextualConvention", "DisplayString")
blueCoatAvMib = ModuleIdentity((1, 3, 6, 1, 4, 1, 3417, 2, 10))
if mibBuilder.loadTexts: blueCoatAvMib.setLastUpdated('0704160000Z')
if mibBuilder.loadTexts: blueCoatAvMib.setOrganization('Blue Coat Systems, Inc.')
blueCoatAvMibObjects = MibIdentifier((1, 3, 6, 1, 4, 1, 3417, 2, 10, 1))
blueCoatAvMibNotificationObjects = MibIdentifier((1, 3, 6, 1, 4, 1, 3417, 2, 10, 2))
blueCoatAvMibNotifications = MibIdentifier((1, 3, 6, 1, 4, 1, 3417, 2, 10, 3))
avFilesScanned = MibScalar((1, 3, 6, 1, 4, 1, 3417, 2, 10, 1, 1), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: avFilesScanned.setStatus('current')
avVirusesDetected = MibScalar((1, 3, 6, 1, 4, 1, 3417, 2, 10, 1, 2), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: avVirusesDetected.setStatus('current')
avPatternVersion = MibScalar((1, 3, 6, 1, 4, 1, 3417, 2, 10, 1, 3), DisplayString()).setMaxAccess("readonly")
if mibBuilder.loadTexts: avPatternVersion.setStatus('current')
avPatternDateTime = MibScalar((1, 3, 6, 1, 4, 1, 3417, 2, 10, 1, 4), DateAndTime()).setMaxAccess("readonly")
if mibBuilder.loadTexts: avPatternDateTime.setStatus('current')
avEngineVersion = MibScalar((1, 3, 6, 1, 4, 1, 3417, 2, 10, 1, 5), DisplayString()).setMaxAccess("readonly")
if mibBuilder.loadTexts: avEngineVersion.setStatus('current')
avVendorName = MibScalar((1, 3, 6, 1, 4, 1, 3417, 2, 10, 1, 6), DisplayString()).setMaxAccess("readonly")
if mibBuilder.loadTexts: avVendorName.setStatus('current')
avLicenseDaysRemaining = MibScalar((1, 3, 6, 1, 4, 1, 3417, 2, 10, 1, 7), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: avLicenseDaysRemaining.setStatus('current')
avPublishedFirmwareVersion = MibScalar((1, 3, 6, 1, 4, 1, 3417, 2, 10, 1, 8), DisplayString()).setMaxAccess("readonly")
if mibBuilder.loadTexts: avPublishedFirmwareVersion.setStatus('current')
avInstalledFirmwareVersion = MibScalar((1, 3, 6, 1, 4, 1, 3417, 2, 10, 1, 9), DisplayString()).setMaxAccess("readonly")
if mibBuilder.loadTexts: avInstalledFirmwareVersion.setStatus('current')
avSlowICAPConnections = MibScalar((1, 3, 6, 1, 4, 1, 3417, 2, 10, 1, 10), Gauge32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: avSlowICAPConnections.setStatus('current')
avUpdateFailureReason = MibScalar((1, 3, 6, 1, 4, 1, 3417, 2, 10, 2, 1), DisplayString())
if mibBuilder.loadTexts: avUpdateFailureReason.setStatus('current')
avUrl = MibScalar((1, 3, 6, 1, 4, 1, 3417, 2, 10, 2, 2), DisplayString())
if mibBuilder.loadTexts: avUrl.setStatus('current')
avVirusName = MibScalar((1, 3, 6, 1, 4, 1, 3417, 2, 10, 2, 3), DisplayString())
if mibBuilder.loadTexts: avVirusName.setStatus('current')
avVirusDetails = MibScalar((1, 3, 6, 1, 4, 1, 3417, 2, 10, 2, 4), DisplayString())
if mibBuilder.loadTexts: avVirusDetails.setStatus('current')
avErrorCode = MibScalar((1, 3, 6, 1, 4, 1, 3417, 2, 10, 2, 5), DisplayString())
if mibBuilder.loadTexts: avErrorCode.setStatus('current')
avErrorDetails = MibScalar((1, 3, 6, 1, 4, 1, 3417, 2, 10, 2, 6), DisplayString())
if mibBuilder.loadTexts: avErrorDetails.setStatus('current')
avPreviousFirmwareVersion = MibScalar((1, 3, 6, 1, 4, 1, 3417, 2, 10, 2, 7), DisplayString())
if mibBuilder.loadTexts: avPreviousFirmwareVersion.setStatus('current')
avICTMWarningReason = MibScalar((1, 3, 6, 1, 4, 1, 3417, 2, 10, 2, 8), DisplayString())
if mibBuilder.loadTexts: avICTMWarningReason.setStatus('current')
avAntivirusUpdateSuccess = NotificationType((1, 3, 6, 1, 4, 1, 3417, 2, 10, 3, 1)).setObjects(("BLUECOAT-AV-MIB", "avVendorName"), ("BLUECOAT-AV-MIB", "avEngineVersion"), ("BLUECOAT-AV-MIB", "avPatternVersion"), ("BLUECOAT-AV-MIB", "avPatternDateTime"))
if mibBuilder.loadTexts: avAntivirusUpdateSuccess.setStatus('current')
avAntivirusUpdateFailed = NotificationType((1, 3, 6, 1, 4, 1, 3417, 2, 10, 3, 2)).setObjects(("BLUECOAT-AV-MIB", "avUpdateFailureReason"), ("BLUECOAT-AV-MIB", "avVendorName"), ("BLUECOAT-AV-MIB", "avEngineVersion"), ("BLUECOAT-AV-MIB", "avPatternVersion"), ("BLUECOAT-AV-MIB", "avPatternDateTime"))
if mibBuilder.loadTexts: avAntivirusUpdateFailed.setStatus('current')
avVirusDetected = NotificationType((1, 3, 6, 1, 4, 1, 3417, 2, 10, 3, 3)).setObjects(("BLUECOAT-AV-MIB", "avUrl"), ("BLUECOAT-AV-MIB", "avVirusName"), ("BLUECOAT-AV-MIB", "avVirusDetails"))
if mibBuilder.loadTexts: avVirusDetected.setStatus('current')
avFileServed = NotificationType((1, 3, 6, 1, 4, 1, 3417, 2, 10, 3, 4)).setObjects(("BLUECOAT-AV-MIB", "avUrl"), ("BLUECOAT-AV-MIB", "avErrorCode"), ("BLUECOAT-AV-MIB", "avErrorDetails"))
if mibBuilder.loadTexts: avFileServed.setStatus('current')
avFileBlocked = NotificationType((1, 3, 6, 1, 4, 1, 3417, 2, 10, 3, 5)).setObjects(("BLUECOAT-AV-MIB", "avUrl"), ("BLUECOAT-AV-MIB", "avErrorCode"), ("BLUECOAT-AV-MIB", "avErrorDetails"))
if mibBuilder.loadTexts: avFileBlocked.setStatus('current')
avNewFirmwareAvailable = NotificationType((1, 3, 6, 1, 4, 1, 3417, 2, 10, 3, 6)).setObjects(("BLUECOAT-AV-MIB", "avInstalledFirmwareVersion"), ("BLUECOAT-AV-MIB", "avPublishedFirmwareVersion"))
if mibBuilder.loadTexts: avNewFirmwareAvailable.setStatus('current')
avFirmwareUpdateSuccess = NotificationType((1, 3, 6, 1, 4, 1, 3417, 2, 10, 3, 7)).setObjects(("BLUECOAT-AV-MIB", "avPreviousFirmwareVersion"), ("BLUECOAT-AV-MIB", "avInstalledFirmwareVersion"))
if mibBuilder.loadTexts: avFirmwareUpdateSuccess.setStatus('current')
avFirmwareUpdateFailed = NotificationType((1, 3, 6, 1, 4, 1, 3417, 2, 10, 3, 8)).setObjects(("BLUECOAT-AV-MIB", "avInstalledFirmwareVersion"), ("BLUECOAT-AV-MIB", "avPublishedFirmwareVersion"), ("BLUECOAT-AV-MIB", "avUpdateFailureReason"))
if mibBuilder.loadTexts: avFirmwareUpdateFailed.setStatus('current')
avAntivirusLicenseWarning = NotificationType((1, 3, 6, 1, 4, 1, 3417, 2, 10, 3, 9)).setObjects(("BLUECOAT-AV-MIB", "avVendorName"), ("BLUECOAT-AV-MIB", "avLicenseDaysRemaining"))
if mibBuilder.loadTexts: avAntivirusLicenseWarning.setStatus('current')
avICTMWarning = NotificationType((1, 3, 6, 1, 4, 1, 3417, 2, 10, 3, 10)).setObjects(("BLUECOAT-AV-MIB", "avICTMWarningReason"), ("BLUECOAT-AV-MIB", "avSlowICAPConnections"))
if mibBuilder.loadTexts: avICTMWarning.setStatus('current')
mibBuilder.exportSymbols("BLUECOAT-AV-MIB", avErrorDetails=avErrorDetails, blueCoatAvMib=blueCoatAvMib, avPatternDateTime=avPatternDateTime, PYSNMP_MODULE_ID=blueCoatAvMib, avPatternVersion=avPatternVersion, avVendorName=avVendorName, avUrl=avUrl, avFileBlocked=avFileBlocked, avPublishedFirmwareVersion=avPublishedFirmwareVersion, avFirmwareUpdateSuccess=avFirmwareUpdateSuccess, avFirmwareUpdateFailed=avFirmwareUpdateFailed, blueCoatAvMibNotifications=blueCoatAvMibNotifications, avLicenseDaysRemaining=avLicenseDaysRemaining, avFilesScanned=avFilesScanned, avUpdateFailureReason=avUpdateFailureReason, blueCoatAvMibObjects=blueCoatAvMibObjects, blueCoatAvMibNotificationObjects=blueCoatAvMibNotificationObjects, avEngineVersion=avEngineVersion, avVirusDetected=avVirusDetected, avICTMWarning=avICTMWarning, avAntivirusUpdateFailed=avAntivirusUpdateFailed, avErrorCode=avErrorCode, avAntivirusUpdateSuccess=avAntivirusUpdateSuccess, avVirusName=avVirusName, avSlowICAPConnections=avSlowICAPConnections, avAntivirusLicenseWarning=avAntivirusLicenseWarning, avFileServed=avFileServed, avInstalledFirmwareVersion=avInstalledFirmwareVersion, avICTMWarningReason=avICTMWarningReason, avVirusesDetected=avVirusesDetected, avPreviousFirmwareVersion=avPreviousFirmwareVersion, avVirusDetails=avVirusDetails, avNewFirmwareAvailable=avNewFirmwareAvailable)
| (octet_string, object_identifier, integer) = mibBuilder.importSymbols('ASN1', 'OctetString', 'ObjectIdentifier', 'Integer')
(named_values,) = mibBuilder.importSymbols('ASN1-ENUMERATION', 'NamedValues')
(value_range_constraint, constraints_union, value_size_constraint, single_value_constraint, constraints_intersection) = mibBuilder.importSymbols('ASN1-REFINEMENT', 'ValueRangeConstraint', 'ConstraintsUnion', 'ValueSizeConstraint', 'SingleValueConstraint', 'ConstraintsIntersection')
(blue_coat_mgmt,) = mibBuilder.importSymbols('BLUECOAT-MIB', 'blueCoatMgmt')
(notification_group, module_compliance) = mibBuilder.importSymbols('SNMPv2-CONF', 'NotificationGroup', 'ModuleCompliance')
(notification_type, object_identity, integer32, counter32, bits, module_identity, iso, unsigned32, ip_address, mib_identifier, time_ticks, gauge32, mib_scalar, mib_table, mib_table_row, mib_table_column, counter64) = mibBuilder.importSymbols('SNMPv2-SMI', 'NotificationType', 'ObjectIdentity', 'Integer32', 'Counter32', 'Bits', 'ModuleIdentity', 'iso', 'Unsigned32', 'IpAddress', 'MibIdentifier', 'TimeTicks', 'Gauge32', 'MibScalar', 'MibTable', 'MibTableRow', 'MibTableColumn', 'Counter64')
(date_and_time, textual_convention, display_string) = mibBuilder.importSymbols('SNMPv2-TC', 'DateAndTime', 'TextualConvention', 'DisplayString')
blue_coat_av_mib = module_identity((1, 3, 6, 1, 4, 1, 3417, 2, 10))
if mibBuilder.loadTexts:
blueCoatAvMib.setLastUpdated('0704160000Z')
if mibBuilder.loadTexts:
blueCoatAvMib.setOrganization('Blue Coat Systems, Inc.')
blue_coat_av_mib_objects = mib_identifier((1, 3, 6, 1, 4, 1, 3417, 2, 10, 1))
blue_coat_av_mib_notification_objects = mib_identifier((1, 3, 6, 1, 4, 1, 3417, 2, 10, 2))
blue_coat_av_mib_notifications = mib_identifier((1, 3, 6, 1, 4, 1, 3417, 2, 10, 3))
av_files_scanned = mib_scalar((1, 3, 6, 1, 4, 1, 3417, 2, 10, 1, 1), counter32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
avFilesScanned.setStatus('current')
av_viruses_detected = mib_scalar((1, 3, 6, 1, 4, 1, 3417, 2, 10, 1, 2), counter32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
avVirusesDetected.setStatus('current')
av_pattern_version = mib_scalar((1, 3, 6, 1, 4, 1, 3417, 2, 10, 1, 3), display_string()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
avPatternVersion.setStatus('current')
av_pattern_date_time = mib_scalar((1, 3, 6, 1, 4, 1, 3417, 2, 10, 1, 4), date_and_time()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
avPatternDateTime.setStatus('current')
av_engine_version = mib_scalar((1, 3, 6, 1, 4, 1, 3417, 2, 10, 1, 5), display_string()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
avEngineVersion.setStatus('current')
av_vendor_name = mib_scalar((1, 3, 6, 1, 4, 1, 3417, 2, 10, 1, 6), display_string()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
avVendorName.setStatus('current')
av_license_days_remaining = mib_scalar((1, 3, 6, 1, 4, 1, 3417, 2, 10, 1, 7), integer32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
avLicenseDaysRemaining.setStatus('current')
av_published_firmware_version = mib_scalar((1, 3, 6, 1, 4, 1, 3417, 2, 10, 1, 8), display_string()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
avPublishedFirmwareVersion.setStatus('current')
av_installed_firmware_version = mib_scalar((1, 3, 6, 1, 4, 1, 3417, 2, 10, 1, 9), display_string()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
avInstalledFirmwareVersion.setStatus('current')
av_slow_icap_connections = mib_scalar((1, 3, 6, 1, 4, 1, 3417, 2, 10, 1, 10), gauge32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
avSlowICAPConnections.setStatus('current')
av_update_failure_reason = mib_scalar((1, 3, 6, 1, 4, 1, 3417, 2, 10, 2, 1), display_string())
if mibBuilder.loadTexts:
avUpdateFailureReason.setStatus('current')
av_url = mib_scalar((1, 3, 6, 1, 4, 1, 3417, 2, 10, 2, 2), display_string())
if mibBuilder.loadTexts:
avUrl.setStatus('current')
av_virus_name = mib_scalar((1, 3, 6, 1, 4, 1, 3417, 2, 10, 2, 3), display_string())
if mibBuilder.loadTexts:
avVirusName.setStatus('current')
av_virus_details = mib_scalar((1, 3, 6, 1, 4, 1, 3417, 2, 10, 2, 4), display_string())
if mibBuilder.loadTexts:
avVirusDetails.setStatus('current')
av_error_code = mib_scalar((1, 3, 6, 1, 4, 1, 3417, 2, 10, 2, 5), display_string())
if mibBuilder.loadTexts:
avErrorCode.setStatus('current')
av_error_details = mib_scalar((1, 3, 6, 1, 4, 1, 3417, 2, 10, 2, 6), display_string())
if mibBuilder.loadTexts:
avErrorDetails.setStatus('current')
av_previous_firmware_version = mib_scalar((1, 3, 6, 1, 4, 1, 3417, 2, 10, 2, 7), display_string())
if mibBuilder.loadTexts:
avPreviousFirmwareVersion.setStatus('current')
av_ictm_warning_reason = mib_scalar((1, 3, 6, 1, 4, 1, 3417, 2, 10, 2, 8), display_string())
if mibBuilder.loadTexts:
avICTMWarningReason.setStatus('current')
av_antivirus_update_success = notification_type((1, 3, 6, 1, 4, 1, 3417, 2, 10, 3, 1)).setObjects(('BLUECOAT-AV-MIB', 'avVendorName'), ('BLUECOAT-AV-MIB', 'avEngineVersion'), ('BLUECOAT-AV-MIB', 'avPatternVersion'), ('BLUECOAT-AV-MIB', 'avPatternDateTime'))
if mibBuilder.loadTexts:
avAntivirusUpdateSuccess.setStatus('current')
av_antivirus_update_failed = notification_type((1, 3, 6, 1, 4, 1, 3417, 2, 10, 3, 2)).setObjects(('BLUECOAT-AV-MIB', 'avUpdateFailureReason'), ('BLUECOAT-AV-MIB', 'avVendorName'), ('BLUECOAT-AV-MIB', 'avEngineVersion'), ('BLUECOAT-AV-MIB', 'avPatternVersion'), ('BLUECOAT-AV-MIB', 'avPatternDateTime'))
if mibBuilder.loadTexts:
avAntivirusUpdateFailed.setStatus('current')
av_virus_detected = notification_type((1, 3, 6, 1, 4, 1, 3417, 2, 10, 3, 3)).setObjects(('BLUECOAT-AV-MIB', 'avUrl'), ('BLUECOAT-AV-MIB', 'avVirusName'), ('BLUECOAT-AV-MIB', 'avVirusDetails'))
if mibBuilder.loadTexts:
avVirusDetected.setStatus('current')
av_file_served = notification_type((1, 3, 6, 1, 4, 1, 3417, 2, 10, 3, 4)).setObjects(('BLUECOAT-AV-MIB', 'avUrl'), ('BLUECOAT-AV-MIB', 'avErrorCode'), ('BLUECOAT-AV-MIB', 'avErrorDetails'))
if mibBuilder.loadTexts:
avFileServed.setStatus('current')
av_file_blocked = notification_type((1, 3, 6, 1, 4, 1, 3417, 2, 10, 3, 5)).setObjects(('BLUECOAT-AV-MIB', 'avUrl'), ('BLUECOAT-AV-MIB', 'avErrorCode'), ('BLUECOAT-AV-MIB', 'avErrorDetails'))
if mibBuilder.loadTexts:
avFileBlocked.setStatus('current')
av_new_firmware_available = notification_type((1, 3, 6, 1, 4, 1, 3417, 2, 10, 3, 6)).setObjects(('BLUECOAT-AV-MIB', 'avInstalledFirmwareVersion'), ('BLUECOAT-AV-MIB', 'avPublishedFirmwareVersion'))
if mibBuilder.loadTexts:
avNewFirmwareAvailable.setStatus('current')
av_firmware_update_success = notification_type((1, 3, 6, 1, 4, 1, 3417, 2, 10, 3, 7)).setObjects(('BLUECOAT-AV-MIB', 'avPreviousFirmwareVersion'), ('BLUECOAT-AV-MIB', 'avInstalledFirmwareVersion'))
if mibBuilder.loadTexts:
avFirmwareUpdateSuccess.setStatus('current')
av_firmware_update_failed = notification_type((1, 3, 6, 1, 4, 1, 3417, 2, 10, 3, 8)).setObjects(('BLUECOAT-AV-MIB', 'avInstalledFirmwareVersion'), ('BLUECOAT-AV-MIB', 'avPublishedFirmwareVersion'), ('BLUECOAT-AV-MIB', 'avUpdateFailureReason'))
if mibBuilder.loadTexts:
avFirmwareUpdateFailed.setStatus('current')
av_antivirus_license_warning = notification_type((1, 3, 6, 1, 4, 1, 3417, 2, 10, 3, 9)).setObjects(('BLUECOAT-AV-MIB', 'avVendorName'), ('BLUECOAT-AV-MIB', 'avLicenseDaysRemaining'))
if mibBuilder.loadTexts:
avAntivirusLicenseWarning.setStatus('current')
av_ictm_warning = notification_type((1, 3, 6, 1, 4, 1, 3417, 2, 10, 3, 10)).setObjects(('BLUECOAT-AV-MIB', 'avICTMWarningReason'), ('BLUECOAT-AV-MIB', 'avSlowICAPConnections'))
if mibBuilder.loadTexts:
avICTMWarning.setStatus('current')
mibBuilder.exportSymbols('BLUECOAT-AV-MIB', avErrorDetails=avErrorDetails, blueCoatAvMib=blueCoatAvMib, avPatternDateTime=avPatternDateTime, PYSNMP_MODULE_ID=blueCoatAvMib, avPatternVersion=avPatternVersion, avVendorName=avVendorName, avUrl=avUrl, avFileBlocked=avFileBlocked, avPublishedFirmwareVersion=avPublishedFirmwareVersion, avFirmwareUpdateSuccess=avFirmwareUpdateSuccess, avFirmwareUpdateFailed=avFirmwareUpdateFailed, blueCoatAvMibNotifications=blueCoatAvMibNotifications, avLicenseDaysRemaining=avLicenseDaysRemaining, avFilesScanned=avFilesScanned, avUpdateFailureReason=avUpdateFailureReason, blueCoatAvMibObjects=blueCoatAvMibObjects, blueCoatAvMibNotificationObjects=blueCoatAvMibNotificationObjects, avEngineVersion=avEngineVersion, avVirusDetected=avVirusDetected, avICTMWarning=avICTMWarning, avAntivirusUpdateFailed=avAntivirusUpdateFailed, avErrorCode=avErrorCode, avAntivirusUpdateSuccess=avAntivirusUpdateSuccess, avVirusName=avVirusName, avSlowICAPConnections=avSlowICAPConnections, avAntivirusLicenseWarning=avAntivirusLicenseWarning, avFileServed=avFileServed, avInstalledFirmwareVersion=avInstalledFirmwareVersion, avICTMWarningReason=avICTMWarningReason, avVirusesDetected=avVirusesDetected, avPreviousFirmwareVersion=avPreviousFirmwareVersion, avVirusDetails=avVirusDetails, avNewFirmwareAvailable=avNewFirmwareAvailable) |
class PartialFillHandlingEnum:
PARTIAL_FILL_UNSET = 0
PARTIAL_FILL_HANDLING_REDUCE_QUANTITY = 1
PARTIAL_FILL_HANDLING_IMMEDIATE_CANCEL = 2
| class Partialfillhandlingenum:
partial_fill_unset = 0
partial_fill_handling_reduce_quantity = 1
partial_fill_handling_immediate_cancel = 2 |
SKILL_SAMPLE_TYPES = (
("dc", "DC"),
("mod", "Modifier"),
)
| skill_sample_types = (('dc', 'DC'), ('mod', 'Modifier')) |
def emulate(instructions):
# did we already run a specific instruction?
previous = [False for _ in range(len(instructions))]
acc, i = 0, 0
while i < len(instructions):
# infinite loop detected
if previous[i]:
return None
previous[i] = True
instr, value = instructions[i]
# emulate
if instr == "acc":
acc += value
elif instr == "jmp":
i += value
continue
i += 1
return acc
instructions = []
with open("input.txt", "r") as file:
for line in file.readlines():
instructions.append([line[:3], int(line[4:])])
# keep flipping instructions until we find one that doesn't end up in an infinite loop
for i in range(len(instructions)):
# we only care about jmp's and nop's
if instructions[i][0] == "acc":
continue
# keep a copy of the original instruction
original = instructions[i][0]
if instructions[i][0] == "jmp":
instructions[i][0] = "nop"
elif instructions[i][0] == "nop":
instructions[i][0] = "jmp"
result = emulate(instructions)
# we found code that runs
if result != None:
print(result)
break
# restore to original
instructions[i][0] = original | def emulate(instructions):
previous = [False for _ in range(len(instructions))]
(acc, i) = (0, 0)
while i < len(instructions):
if previous[i]:
return None
previous[i] = True
(instr, value) = instructions[i]
if instr == 'acc':
acc += value
elif instr == 'jmp':
i += value
continue
i += 1
return acc
instructions = []
with open('input.txt', 'r') as file:
for line in file.readlines():
instructions.append([line[:3], int(line[4:])])
for i in range(len(instructions)):
if instructions[i][0] == 'acc':
continue
original = instructions[i][0]
if instructions[i][0] == 'jmp':
instructions[i][0] = 'nop'
elif instructions[i][0] == 'nop':
instructions[i][0] = 'jmp'
result = emulate(instructions)
if result != None:
print(result)
break
instructions[i][0] = original |
flowerpot_price = 4.00
flower_seeds_price = 1.00
soil_price = 5.00
tax_rate = 0.06
number_of_pots = int(input('How many flowerpots? '))
number_of_seeds = int(input('How many packs of seeds? '))
number_of_bags = int(input('How many bags of soil? '))
cost_of_items = (number_of_pots * flowerpot_price)
+ (number_of_seeds * flower_seeds_price)
+ (number_of_bags * soil_price)
print(cost_of_items)
| flowerpot_price = 4.0
flower_seeds_price = 1.0
soil_price = 5.0
tax_rate = 0.06
number_of_pots = int(input('How many flowerpots? '))
number_of_seeds = int(input('How many packs of seeds? '))
number_of_bags = int(input('How many bags of soil? '))
cost_of_items = number_of_pots * flowerpot_price
+(number_of_seeds * flower_seeds_price)
+(number_of_bags * soil_price)
print(cost_of_items) |
class Field:
cells = ()
def __init__(self, w, h):
print('Game Field Created!')
| class Field:
cells = ()
def __init__(self, w, h):
print('Game Field Created!') |
class Entry(object):
def __init__(self, record, value):
self.record = record
self.value = value
def __lt__(self, other):
# to make a max-heap
return self.value > other.value
def to_json(self):
return {"record": self.record.to_json(), "value": self.value}
| class Entry(object):
def __init__(self, record, value):
self.record = record
self.value = value
def __lt__(self, other):
return self.value > other.value
def to_json(self):
return {'record': self.record.to_json(), 'value': self.value} |
#
# PySNMP MIB module HUAWEI-TASK-MIB (http://snmplabs.com/pysmi)
# ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/HUAWEI-TASK-MIB
# Produced by pysmi-0.3.4 at Mon Apr 29 19:37:15 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, ValueRangeConstraint, SingleValueConstraint, ConstraintsUnion = mibBuilder.importSymbols("ASN1-REFINEMENT", "ConstraintsIntersection", "ValueSizeConstraint", "ValueRangeConstraint", "SingleValueConstraint", "ConstraintsUnion")
hwDatacomm, = mibBuilder.importSymbols("HUAWEI-MIB", "hwDatacomm")
ObjectGroup, ModuleCompliance, NotificationGroup = mibBuilder.importSymbols("SNMPv2-CONF", "ObjectGroup", "ModuleCompliance", "NotificationGroup")
ModuleIdentity, iso, Counter64, Gauge32, NotificationType, ObjectIdentity, Bits, Integer32, Unsigned32, MibScalar, MibTable, MibTableRow, MibTableColumn, IpAddress, TimeTicks, Counter32, MibIdentifier = mibBuilder.importSymbols("SNMPv2-SMI", "ModuleIdentity", "iso", "Counter64", "Gauge32", "NotificationType", "ObjectIdentity", "Bits", "Integer32", "Unsigned32", "MibScalar", "MibTable", "MibTableRow", "MibTableColumn", "IpAddress", "TimeTicks", "Counter32", "MibIdentifier")
TextualConvention, DisplayString = mibBuilder.importSymbols("SNMPv2-TC", "TextualConvention", "DisplayString")
hwTask = ModuleIdentity((1, 3, 6, 1, 4, 1, 2011, 5, 25, 27))
hwTask.setRevisions(('2014-09-25 00:00', '2003-07-31 00:00',))
if mibBuilder.loadTexts: hwTask.setLastUpdated('201409250000Z')
if mibBuilder.loadTexts: hwTask.setOrganization('Huawei Technologies Co.,Ltd.')
class HwTaskStatusType(TextualConvention, Integer32):
status = 'current'
subtypeSpec = Integer32.subtypeSpec + ConstraintsUnion(SingleValueConstraint(0, 1, 2, 4, 5, 6, 8, 17, 21, 33, 37, 65, 69, 128, 256, 513, 517))
namedValues = NamedValues(("normalready", 0), ("block", 1), ("sleep", 2), ("suspend", 4), ("blockAndSuspend", 5), ("sleptAndSuspend", 6), ("running", 8), ("queueblock", 17), ("queueblockAndSuspend", 21), ("semaphoreblock", 33), ("semaphoreblockAandSuspend", 37), ("eventblock", 65), ("eventblockAndSuspend", 69), ("prioblock", 128), ("preemptready", 256), ("writequeueblock", 513), ("writequeueblockAndSuspend", 517))
hwTaskObjects = MibIdentifier((1, 3, 6, 1, 4, 1, 2011, 5, 25, 27, 1))
hwTaskTable = MibTable((1, 3, 6, 1, 4, 1, 2011, 5, 25, 27, 1, 1), )
if mibBuilder.loadTexts: hwTaskTable.setStatus('current')
hwTaskEntry = MibTableRow((1, 3, 6, 1, 4, 1, 2011, 5, 25, 27, 1, 1, 1), ).setIndexNames((0, "HUAWEI-TASK-MIB", "hwTaskIndex"), (0, "HUAWEI-TASK-MIB", "hwTaskID"))
if mibBuilder.loadTexts: hwTaskEntry.setStatus('current')
hwTaskIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 2011, 5, 25, 27, 1, 1, 1, 1), Gauge32())
if mibBuilder.loadTexts: hwTaskIndex.setStatus('current')
hwTaskID = MibTableColumn((1, 3, 6, 1, 4, 1, 2011, 5, 25, 27, 1, 1, 1, 2), Gauge32())
if mibBuilder.loadTexts: hwTaskID.setStatus('current')
hwTaskName = MibTableColumn((1, 3, 6, 1, 4, 1, 2011, 5, 25, 27, 1, 1, 1, 3), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(1, 255))).setMaxAccess("readonly")
if mibBuilder.loadTexts: hwTaskName.setStatus('current')
hwTaskStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 2011, 5, 25, 27, 1, 1, 1, 4), HwTaskStatusType()).setMaxAccess("readonly")
if mibBuilder.loadTexts: hwTaskStatus.setStatus('current')
hwTaskCpuUsage = MibTableColumn((1, 3, 6, 1, 4, 1, 2011, 5, 25, 27, 1, 1, 1, 5), Gauge32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: hwTaskCpuUsage.setStatus('current')
hwTaskuSecs = MibTableColumn((1, 3, 6, 1, 4, 1, 2011, 5, 25, 27, 1, 1, 1, 6), Gauge32()).setUnits('millseconds').setMaxAccess("readonly")
if mibBuilder.loadTexts: hwTaskuSecs.setStatus('current')
hwKeyTaskTable = MibTable((1, 3, 6, 1, 4, 1, 2011, 5, 25, 27, 1, 2), )
if mibBuilder.loadTexts: hwKeyTaskTable.setStatus('current')
hwKeyTaskEntry = MibTableRow((1, 3, 6, 1, 4, 1, 2011, 5, 25, 27, 1, 2, 1), ).setIndexNames((0, "HUAWEI-TASK-MIB", "hwKeyTaskIndex"), (0, "HUAWEI-TASK-MIB", "hwKeyTaskID"))
if mibBuilder.loadTexts: hwKeyTaskEntry.setStatus('current')
hwKeyTaskIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 2011, 5, 25, 27, 1, 2, 1, 1), Integer32())
if mibBuilder.loadTexts: hwKeyTaskIndex.setStatus('current')
hwKeyTaskID = MibTableColumn((1, 3, 6, 1, 4, 1, 2011, 5, 25, 27, 1, 2, 1, 2), Integer32())
if mibBuilder.loadTexts: hwKeyTaskID.setStatus('current')
hwKeyTaskName = MibTableColumn((1, 3, 6, 1, 4, 1, 2011, 5, 25, 27, 1, 2, 1, 3), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(1, 255))).setMaxAccess("readonly")
if mibBuilder.loadTexts: hwKeyTaskName.setStatus('current')
hwKeyTaskCpuUsage = MibTableColumn((1, 3, 6, 1, 4, 1, 2011, 5, 25, 27, 1, 2, 1, 4), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: hwKeyTaskCpuUsage.setStatus('current')
hwTaskNotifications = MibIdentifier((1, 3, 6, 1, 4, 1, 2011, 5, 25, 27, 2))
hwTaskConformance = MibIdentifier((1, 3, 6, 1, 4, 1, 2011, 5, 25, 27, 3))
hwTaskCompliances = MibIdentifier((1, 3, 6, 1, 4, 1, 2011, 5, 25, 27, 3, 1))
hwTaskCompliance = ModuleCompliance((1, 3, 6, 1, 4, 1, 2011, 5, 25, 27, 3, 1, 1)).setObjects(("HUAWEI-TASK-MIB", "hwTaskGroup"))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
hwTaskCompliance = hwTaskCompliance.setStatus('current')
hwTaskGroups = MibIdentifier((1, 3, 6, 1, 4, 1, 2011, 5, 25, 27, 3, 2))
hwTaskGroup = ObjectGroup((1, 3, 6, 1, 4, 1, 2011, 5, 25, 27, 3, 2, 1)).setObjects(("HUAWEI-TASK-MIB", "hwTaskName"), ("HUAWEI-TASK-MIB", "hwTaskStatus"), ("HUAWEI-TASK-MIB", "hwTaskCpuUsage"), ("HUAWEI-TASK-MIB", "hwTaskuSecs"))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
hwTaskGroup = hwTaskGroup.setStatus('current')
hwKeyTaskGroup = ObjectGroup((1, 3, 6, 1, 4, 1, 2011, 5, 25, 27, 3, 2, 2)).setObjects(("HUAWEI-TASK-MIB", "hwKeyTaskName"), ("HUAWEI-TASK-MIB", "hwKeyTaskCpuUsage"))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
hwKeyTaskGroup = hwKeyTaskGroup.setStatus('current')
mibBuilder.exportSymbols("HUAWEI-TASK-MIB", hwKeyTaskName=hwKeyTaskName, PYSNMP_MODULE_ID=hwTask, hwKeyTaskCpuUsage=hwKeyTaskCpuUsage, hwTaskGroup=hwTaskGroup, hwTaskCompliances=hwTaskCompliances, hwTaskName=hwTaskName, hwKeyTaskIndex=hwKeyTaskIndex, hwTask=hwTask, hwKeyTaskTable=hwKeyTaskTable, hwKeyTaskEntry=hwKeyTaskEntry, hwKeyTaskID=hwKeyTaskID, hwTaskID=hwTaskID, hwTaskStatus=hwTaskStatus, hwTaskuSecs=hwTaskuSecs, hwTaskCpuUsage=hwTaskCpuUsage, hwTaskIndex=hwTaskIndex, hwTaskGroups=hwTaskGroups, hwTaskConformance=hwTaskConformance, hwTaskObjects=hwTaskObjects, hwTaskTable=hwTaskTable, hwTaskEntry=hwTaskEntry, hwTaskNotifications=hwTaskNotifications, hwKeyTaskGroup=hwKeyTaskGroup, hwTaskCompliance=hwTaskCompliance, HwTaskStatusType=HwTaskStatusType)
| (octet_string, object_identifier, integer) = mibBuilder.importSymbols('ASN1', 'OctetString', 'ObjectIdentifier', 'Integer')
(named_values,) = mibBuilder.importSymbols('ASN1-ENUMERATION', 'NamedValues')
(constraints_intersection, value_size_constraint, value_range_constraint, single_value_constraint, constraints_union) = mibBuilder.importSymbols('ASN1-REFINEMENT', 'ConstraintsIntersection', 'ValueSizeConstraint', 'ValueRangeConstraint', 'SingleValueConstraint', 'ConstraintsUnion')
(hw_datacomm,) = mibBuilder.importSymbols('HUAWEI-MIB', 'hwDatacomm')
(object_group, module_compliance, notification_group) = mibBuilder.importSymbols('SNMPv2-CONF', 'ObjectGroup', 'ModuleCompliance', 'NotificationGroup')
(module_identity, iso, counter64, gauge32, notification_type, object_identity, bits, integer32, unsigned32, mib_scalar, mib_table, mib_table_row, mib_table_column, ip_address, time_ticks, counter32, mib_identifier) = mibBuilder.importSymbols('SNMPv2-SMI', 'ModuleIdentity', 'iso', 'Counter64', 'Gauge32', 'NotificationType', 'ObjectIdentity', 'Bits', 'Integer32', 'Unsigned32', 'MibScalar', 'MibTable', 'MibTableRow', 'MibTableColumn', 'IpAddress', 'TimeTicks', 'Counter32', 'MibIdentifier')
(textual_convention, display_string) = mibBuilder.importSymbols('SNMPv2-TC', 'TextualConvention', 'DisplayString')
hw_task = module_identity((1, 3, 6, 1, 4, 1, 2011, 5, 25, 27))
hwTask.setRevisions(('2014-09-25 00:00', '2003-07-31 00:00'))
if mibBuilder.loadTexts:
hwTask.setLastUpdated('201409250000Z')
if mibBuilder.loadTexts:
hwTask.setOrganization('Huawei Technologies Co.,Ltd.')
class Hwtaskstatustype(TextualConvention, Integer32):
status = 'current'
subtype_spec = Integer32.subtypeSpec + constraints_union(single_value_constraint(0, 1, 2, 4, 5, 6, 8, 17, 21, 33, 37, 65, 69, 128, 256, 513, 517))
named_values = named_values(('normalready', 0), ('block', 1), ('sleep', 2), ('suspend', 4), ('blockAndSuspend', 5), ('sleptAndSuspend', 6), ('running', 8), ('queueblock', 17), ('queueblockAndSuspend', 21), ('semaphoreblock', 33), ('semaphoreblockAandSuspend', 37), ('eventblock', 65), ('eventblockAndSuspend', 69), ('prioblock', 128), ('preemptready', 256), ('writequeueblock', 513), ('writequeueblockAndSuspend', 517))
hw_task_objects = mib_identifier((1, 3, 6, 1, 4, 1, 2011, 5, 25, 27, 1))
hw_task_table = mib_table((1, 3, 6, 1, 4, 1, 2011, 5, 25, 27, 1, 1))
if mibBuilder.loadTexts:
hwTaskTable.setStatus('current')
hw_task_entry = mib_table_row((1, 3, 6, 1, 4, 1, 2011, 5, 25, 27, 1, 1, 1)).setIndexNames((0, 'HUAWEI-TASK-MIB', 'hwTaskIndex'), (0, 'HUAWEI-TASK-MIB', 'hwTaskID'))
if mibBuilder.loadTexts:
hwTaskEntry.setStatus('current')
hw_task_index = mib_table_column((1, 3, 6, 1, 4, 1, 2011, 5, 25, 27, 1, 1, 1, 1), gauge32())
if mibBuilder.loadTexts:
hwTaskIndex.setStatus('current')
hw_task_id = mib_table_column((1, 3, 6, 1, 4, 1, 2011, 5, 25, 27, 1, 1, 1, 2), gauge32())
if mibBuilder.loadTexts:
hwTaskID.setStatus('current')
hw_task_name = mib_table_column((1, 3, 6, 1, 4, 1, 2011, 5, 25, 27, 1, 1, 1, 3), display_string().subtype(subtypeSpec=value_size_constraint(1, 255))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
hwTaskName.setStatus('current')
hw_task_status = mib_table_column((1, 3, 6, 1, 4, 1, 2011, 5, 25, 27, 1, 1, 1, 4), hw_task_status_type()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
hwTaskStatus.setStatus('current')
hw_task_cpu_usage = mib_table_column((1, 3, 6, 1, 4, 1, 2011, 5, 25, 27, 1, 1, 1, 5), gauge32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
hwTaskCpuUsage.setStatus('current')
hw_tasku_secs = mib_table_column((1, 3, 6, 1, 4, 1, 2011, 5, 25, 27, 1, 1, 1, 6), gauge32()).setUnits('millseconds').setMaxAccess('readonly')
if mibBuilder.loadTexts:
hwTaskuSecs.setStatus('current')
hw_key_task_table = mib_table((1, 3, 6, 1, 4, 1, 2011, 5, 25, 27, 1, 2))
if mibBuilder.loadTexts:
hwKeyTaskTable.setStatus('current')
hw_key_task_entry = mib_table_row((1, 3, 6, 1, 4, 1, 2011, 5, 25, 27, 1, 2, 1)).setIndexNames((0, 'HUAWEI-TASK-MIB', 'hwKeyTaskIndex'), (0, 'HUAWEI-TASK-MIB', 'hwKeyTaskID'))
if mibBuilder.loadTexts:
hwKeyTaskEntry.setStatus('current')
hw_key_task_index = mib_table_column((1, 3, 6, 1, 4, 1, 2011, 5, 25, 27, 1, 2, 1, 1), integer32())
if mibBuilder.loadTexts:
hwKeyTaskIndex.setStatus('current')
hw_key_task_id = mib_table_column((1, 3, 6, 1, 4, 1, 2011, 5, 25, 27, 1, 2, 1, 2), integer32())
if mibBuilder.loadTexts:
hwKeyTaskID.setStatus('current')
hw_key_task_name = mib_table_column((1, 3, 6, 1, 4, 1, 2011, 5, 25, 27, 1, 2, 1, 3), display_string().subtype(subtypeSpec=value_size_constraint(1, 255))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
hwKeyTaskName.setStatus('current')
hw_key_task_cpu_usage = mib_table_column((1, 3, 6, 1, 4, 1, 2011, 5, 25, 27, 1, 2, 1, 4), integer32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
hwKeyTaskCpuUsage.setStatus('current')
hw_task_notifications = mib_identifier((1, 3, 6, 1, 4, 1, 2011, 5, 25, 27, 2))
hw_task_conformance = mib_identifier((1, 3, 6, 1, 4, 1, 2011, 5, 25, 27, 3))
hw_task_compliances = mib_identifier((1, 3, 6, 1, 4, 1, 2011, 5, 25, 27, 3, 1))
hw_task_compliance = module_compliance((1, 3, 6, 1, 4, 1, 2011, 5, 25, 27, 3, 1, 1)).setObjects(('HUAWEI-TASK-MIB', 'hwTaskGroup'))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
hw_task_compliance = hwTaskCompliance.setStatus('current')
hw_task_groups = mib_identifier((1, 3, 6, 1, 4, 1, 2011, 5, 25, 27, 3, 2))
hw_task_group = object_group((1, 3, 6, 1, 4, 1, 2011, 5, 25, 27, 3, 2, 1)).setObjects(('HUAWEI-TASK-MIB', 'hwTaskName'), ('HUAWEI-TASK-MIB', 'hwTaskStatus'), ('HUAWEI-TASK-MIB', 'hwTaskCpuUsage'), ('HUAWEI-TASK-MIB', 'hwTaskuSecs'))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
hw_task_group = hwTaskGroup.setStatus('current')
hw_key_task_group = object_group((1, 3, 6, 1, 4, 1, 2011, 5, 25, 27, 3, 2, 2)).setObjects(('HUAWEI-TASK-MIB', 'hwKeyTaskName'), ('HUAWEI-TASK-MIB', 'hwKeyTaskCpuUsage'))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
hw_key_task_group = hwKeyTaskGroup.setStatus('current')
mibBuilder.exportSymbols('HUAWEI-TASK-MIB', hwKeyTaskName=hwKeyTaskName, PYSNMP_MODULE_ID=hwTask, hwKeyTaskCpuUsage=hwKeyTaskCpuUsage, hwTaskGroup=hwTaskGroup, hwTaskCompliances=hwTaskCompliances, hwTaskName=hwTaskName, hwKeyTaskIndex=hwKeyTaskIndex, hwTask=hwTask, hwKeyTaskTable=hwKeyTaskTable, hwKeyTaskEntry=hwKeyTaskEntry, hwKeyTaskID=hwKeyTaskID, hwTaskID=hwTaskID, hwTaskStatus=hwTaskStatus, hwTaskuSecs=hwTaskuSecs, hwTaskCpuUsage=hwTaskCpuUsage, hwTaskIndex=hwTaskIndex, hwTaskGroups=hwTaskGroups, hwTaskConformance=hwTaskConformance, hwTaskObjects=hwTaskObjects, hwTaskTable=hwTaskTable, hwTaskEntry=hwTaskEntry, hwTaskNotifications=hwTaskNotifications, hwKeyTaskGroup=hwKeyTaskGroup, hwTaskCompliance=hwTaskCompliance, HwTaskStatusType=HwTaskStatusType) |
# keyword param for the ProfileHandler
KEY_DATASET_OBJECT_ID = 'dataset_object_id'
KEY_SAVE_ROW_COUNT = 'save_row_count'
KEY_DATASET_IS_DJANGO_FILEFIELD = 'dataset_is_django_filefield'
KEY_DATASET_IS_FILEPATH = 'dataset_is_filepath'
VAR_TYPE_BOOLEAN = 'Boolean'
VAR_TYPE_CATEGORICAL = 'Categorical'
VAR_TYPE_NUMERICAL = 'Numerical'
VAR_TYPE_INTEGER = 'Integer'
VAR_TYPE_FLOAT = 'Float'
NUMERIC_VAR_TYPES = [VAR_TYPE_NUMERICAL, VAR_TYPE_INTEGER, VAR_TYPE_FLOAT]
VALID_VAR_TYPES = [VAR_TYPE_BOOLEAN,
VAR_TYPE_CATEGORICAL,
VAR_TYPE_NUMERICAL,
VAR_TYPE_INTEGER,
VAR_TYPE_FLOAT]
KW_MAX_NUM_FEATURES = 'max_num_features'
# -----------------------------
ERR_MSG_COLUMN_LIMIT = 'The column_limit may be "None" or an integer greater than 0.'
ERR_MSG_SOURCE_FILE_DOES_NOT_EXIST = 'The source file does not exist for dataset: '
ERR_MSG_DATASET_POINTER_NOT_FIELDFILE = 'The dataset pointer is not a Django FieldFile object.'
ERR_FAILED_TO_READ_DATASET = 'Failed to read the dataset.'
ERR_DATASET_POINTER_NOT_SET = 'In order to profile the data, the "dataset_pointer" must be set.' | key_dataset_object_id = 'dataset_object_id'
key_save_row_count = 'save_row_count'
key_dataset_is_django_filefield = 'dataset_is_django_filefield'
key_dataset_is_filepath = 'dataset_is_filepath'
var_type_boolean = 'Boolean'
var_type_categorical = 'Categorical'
var_type_numerical = 'Numerical'
var_type_integer = 'Integer'
var_type_float = 'Float'
numeric_var_types = [VAR_TYPE_NUMERICAL, VAR_TYPE_INTEGER, VAR_TYPE_FLOAT]
valid_var_types = [VAR_TYPE_BOOLEAN, VAR_TYPE_CATEGORICAL, VAR_TYPE_NUMERICAL, VAR_TYPE_INTEGER, VAR_TYPE_FLOAT]
kw_max_num_features = 'max_num_features'
err_msg_column_limit = 'The column_limit may be "None" or an integer greater than 0.'
err_msg_source_file_does_not_exist = 'The source file does not exist for dataset: '
err_msg_dataset_pointer_not_fieldfile = 'The dataset pointer is not a Django FieldFile object.'
err_failed_to_read_dataset = 'Failed to read the dataset.'
err_dataset_pointer_not_set = 'In order to profile the data, the "dataset_pointer" must be set.' |
#! /usr/bin/env python3
# check if a word is palindromic without reversing it
def isPalindrome(word):
end = len(word)
start = 0
retval = True
while start < end+1:
left = word[start]
right = word[end-1]
if left != right:
retval = False
break
start += 1
end -= 1
return retval
print(isPalindrome("wwaabbaawwz"))
| def is_palindrome(word):
end = len(word)
start = 0
retval = True
while start < end + 1:
left = word[start]
right = word[end - 1]
if left != right:
retval = False
break
start += 1
end -= 1
return retval
print(is_palindrome('wwaabbaawwz')) |
class Pessoa:
olhos = 2
def __init__(self, *filhos, nome=None, idade=46):
self.idade = idade
self.nome = nome
self.filhos = list(filhos)
def cumprimentar(self):
return f'Ola {id(self)}'
if __name__ == '__main__':
nilton = Pessoa(nome='Nilton')
roberto = Pessoa(nilton, nome='Roberto')
print(Pessoa.cumprimentar(roberto))
print(id(roberto))
print(roberto.cumprimentar())
print(roberto.nome)
print(roberto.idade)
for filho in roberto.filhos:
print(filho.nome)
roberto.sobrenome = 'Goncalves'
del roberto.filhos
roberto.olhos = 1
del roberto.olhos
print(roberto.__dict__)
print(nilton.__dict__)
Pessoa.olhos = 3
print(Pessoa.olhos)
print(roberto.olhos)
print(nilton.olhos)
print(id(Pessoa.olhos), id(roberto), id(nilton.olhos)) | class Pessoa:
olhos = 2
def __init__(self, *filhos, nome=None, idade=46):
self.idade = idade
self.nome = nome
self.filhos = list(filhos)
def cumprimentar(self):
return f'Ola {id(self)}'
if __name__ == '__main__':
nilton = pessoa(nome='Nilton')
roberto = pessoa(nilton, nome='Roberto')
print(Pessoa.cumprimentar(roberto))
print(id(roberto))
print(roberto.cumprimentar())
print(roberto.nome)
print(roberto.idade)
for filho in roberto.filhos:
print(filho.nome)
roberto.sobrenome = 'Goncalves'
del roberto.filhos
roberto.olhos = 1
del roberto.olhos
print(roberto.__dict__)
print(nilton.__dict__)
Pessoa.olhos = 3
print(Pessoa.olhos)
print(roberto.olhos)
print(nilton.olhos)
print(id(Pessoa.olhos), id(roberto), id(nilton.olhos)) |
AIRTABLE_EXPORT_JOB_DOWNLOADING_PENDING = "pending"
AIRTABLE_EXPORT_JOB_DOWNLOADING_FAILED = "failed"
AIRTABLE_EXPORT_JOB_DOWNLOADING_FINISHED = "finished"
AIRTABLE_EXPORT_JOB_DOWNLOADING_BASE = "downloading-base"
AIRTABLE_EXPORT_JOB_CONVERTING = "converting"
AIRTABLE_EXPORT_JOB_DOWNLOADING_FILES = "downloading-files"
AIRTABLE_BASEROW_COLOR_MAPPING = {
"blue": "blue",
"cyan": "light-blue",
"teal": "light-green",
"green": "green",
"yellow": "light-orange",
"orange": "orange",
"red": "light-red",
"pink": "red",
"purple": "dark-blue",
"gray": "light-gray",
}
| airtable_export_job_downloading_pending = 'pending'
airtable_export_job_downloading_failed = 'failed'
airtable_export_job_downloading_finished = 'finished'
airtable_export_job_downloading_base = 'downloading-base'
airtable_export_job_converting = 'converting'
airtable_export_job_downloading_files = 'downloading-files'
airtable_baserow_color_mapping = {'blue': 'blue', 'cyan': 'light-blue', 'teal': 'light-green', 'green': 'green', 'yellow': 'light-orange', 'orange': 'orange', 'red': 'light-red', 'pink': 'red', 'purple': 'dark-blue', 'gray': 'light-gray'} |
print("Rathinn")
print("AM.EN.U4AIE19052")
print("AIE")
print("Anime Rocks")
| print('Rathinn')
print('AM.EN.U4AIE19052')
print('AIE')
print('Anime Rocks') |
# Backtracking
class Solution:
def combinationSum(self, candidates: List[int], target: int) -> List[List[int]]:
if not candidates:
return
candidates.sort()
paths = []
results = []
index = 0
cursum = 0
# paths, results, index, candidates, cursum, target
self.dfs(paths,results,index,candidates,cursum, target)
return results
def dfs(self,paths, results,index,candidates,cursum,target):
if cursum > target:
return
# append path must use list to new a paths
if cursum == target:
results.append(list(paths))
return
for i in range(index,len(candidates)):
paths.append(candidates[i])
cursum += candidates[i]
self.dfs(paths,results,i,candidates,cursum,target)
paths.pop()
cursum -= candidates[i]
# https://www.jiuzhang.com/problem/combination-sum/
class Solution:
def combinationSum(self, candidates: List[int], target: int) -> List[List[int]]:
results = []
def backtrack(remain,comb,start):
if remain == 0:
# make a deep copy of the current combination
results.append(list(comb))
return
# not satify condition
elif remain <0:
# exceed the scope, stop exploration.
return
for i in range(start,len(candidates)):
# add the number into the combination
comb.append(candidates[i])
# give the current number another chance, rather than moving on
backtrack(remain-candidates[i],comb,i)
# backtrack, remove the number from the combination
comb.pop()
backtrack(target,[],0)
return results
# Refer from
# https://leetcode.com/problems/combination-sum/solution/
# Time: O(N^(T/M)+1)
# Let N be the number of candidates, T be the target value, and M be the minimal value among the candidates.
# Space:O(T/M)
# V2
class Solution(object):
def combinationSum(self, candidates, target):
ret = []
self.dfs(candidates, target, [], ret)
return ret
def dfs(self, nums, target, path, ret):
if target < 0:
return
if target == 0:
ret.append(path)
return
for i in range(len(nums)):
# Here we have to use concatenation because if we use append, then path will be passed by
# reference and it will cause allocation problem
self.dfs(nums[i:], target-nums[i], path+[nums[i]], ret)
# V3
class Solution:
def combinationSum(self, candidates: List[int], target: int) -> List[List[int]]:
res = []
self.backtrack(0,candidates,target,[],res)
return res
def backtrack(self,start,candidates,target,path,res):
if target <0:
return
if target ==0:
res.append(path)
return
for i in range(start,len(candidates)):
self.backtrack(i,candidates,target-candidates[i],path+[candidates[i]],res)
| class Solution:
def combination_sum(self, candidates: List[int], target: int) -> List[List[int]]:
if not candidates:
return
candidates.sort()
paths = []
results = []
index = 0
cursum = 0
self.dfs(paths, results, index, candidates, cursum, target)
return results
def dfs(self, paths, results, index, candidates, cursum, target):
if cursum > target:
return
if cursum == target:
results.append(list(paths))
return
for i in range(index, len(candidates)):
paths.append(candidates[i])
cursum += candidates[i]
self.dfs(paths, results, i, candidates, cursum, target)
paths.pop()
cursum -= candidates[i]
class Solution:
def combination_sum(self, candidates: List[int], target: int) -> List[List[int]]:
results = []
def backtrack(remain, comb, start):
if remain == 0:
results.append(list(comb))
return
elif remain < 0:
return
for i in range(start, len(candidates)):
comb.append(candidates[i])
backtrack(remain - candidates[i], comb, i)
comb.pop()
backtrack(target, [], 0)
return results
class Solution(object):
def combination_sum(self, candidates, target):
ret = []
self.dfs(candidates, target, [], ret)
return ret
def dfs(self, nums, target, path, ret):
if target < 0:
return
if target == 0:
ret.append(path)
return
for i in range(len(nums)):
self.dfs(nums[i:], target - nums[i], path + [nums[i]], ret)
class Solution:
def combination_sum(self, candidates: List[int], target: int) -> List[List[int]]:
res = []
self.backtrack(0, candidates, target, [], res)
return res
def backtrack(self, start, candidates, target, path, res):
if target < 0:
return
if target == 0:
res.append(path)
return
for i in range(start, len(candidates)):
self.backtrack(i, candidates, target - candidates[i], path + [candidates[i]], res) |
# final
def sum_of_args(args):
result = 0
for i in args:
result += i
return result
print(sum_of_args(args=[1,2,3,4]))
| def sum_of_args(args):
result = 0
for i in args:
result += i
return result
print(sum_of_args(args=[1, 2, 3, 4])) |
'''
https://leetcode.com/contest/weekly-contest-182/problems/find-lucky-integer-in-an-array/
'''
class Solution:
def findLucky(self, arr: List[int]) -> int:
for a in sorted(arr)[::-1]:
if a == arr.count(a):
return a
return -1
| """
https://leetcode.com/contest/weekly-contest-182/problems/find-lucky-integer-in-an-array/
"""
class Solution:
def find_lucky(self, arr: List[int]) -> int:
for a in sorted(arr)[::-1]:
if a == arr.count(a):
return a
return -1 |
####Use the loop 'while'
# input a and b
a = int(input())
b = int(input())
if a > b :
print('it is not the total')
else :
i = a
total = 0
while i <= b :
total += i
i += 1
print(total) | a = int(input())
b = int(input())
if a > b:
print('it is not the total')
else:
i = a
total = 0
while i <= b:
total += i
i += 1
print(total) |
# Write your solution for 1.3 here!
x=0
i=0
while x<10000:
i+=1
x+=i
print(i)
| x = 0
i = 0
while x < 10000:
i += 1
x += i
print(i) |
tile_size = 25
# size of tiles in the board
screen_width = 400
# width of the screen
screen_height = 400
# height of the screen
| tile_size = 25
screen_width = 400
screen_height = 400 |
class Queue:
def __init__(self,list = None):
if list == None:
self.item =[]
else :
self.item = list
def enQueue(self,i):
self.item.append(i)
def size(self):
return len(self.item)
def isEmpty(self):
return len(self.item)==0
def deQueue(self):
return self.item.pop(0)
def showresult(r,b,heat,freeze,mistake):
print("Red Team : \n",r.size(),'\n',"".join(reversed(r.item)) if r.size()!=0 else "Empty",'\n',heat," Explosive(s) ! ! ! (HEAT)",sep="")
if mistake>0:
print("Blue Team Made (a) Mistake(s)",mistake,"Bomb(s)")
print("----------TENETTENET----------")
print(": maeT eulB\n",b.size(),'\n',"".join(reversed(b.item)) if b.size() != 0 else "ytpmE","\n","(EZEERF) ! ! ! (s)evisolpxE ",freeze,sep="")
def TENET(r,b):
bombl = Queue()
heat,freeze,mistake = 0,0,0
newr = Queue()
count = len(b.item)-2
j= 0
while j < count:
if b.item[j] == b.item[j+1] == b.item[j+2]:
bombl.enQueue(b.item[j])
# del b.item[j:j+3]
for _ in range(3):
b.item.pop(j)
count-=1
j-=1
freeze +=1
j+=1
# print(bombl.item)
for i in range(r.size()):
newr.enQueue(r.item[i])
# print("before",newr.item)
if newr.size()>=3:
if newr.item[-1]==newr.item[-2]==newr.item[-3]:
if not bombl.isEmpty():
bombq = bombl.deQueue()
if bombq == newr.item[-1]:
mistake+=1
for _ in range(2):
newr.item.pop()
else :
newr.item.insert(-1,bombq)
else:
heat+=1
for _ in range(3):
newr.item.pop()
# print("after",newr.item)
showresult(newr,b,heat,freeze,mistake)
r,b = input("Enter Input (Red, Blue) : ").split()
r = Queue(list(r))
b = Queue(list(b[::-1]))
# print(r.item,b.item)
TENET(r,b)
# print("heat",heat,"Freeze",freeze,"mistake",mistake)
| class Queue:
def __init__(self, list=None):
if list == None:
self.item = []
else:
self.item = list
def en_queue(self, i):
self.item.append(i)
def size(self):
return len(self.item)
def is_empty(self):
return len(self.item) == 0
def de_queue(self):
return self.item.pop(0)
def showresult(r, b, heat, freeze, mistake):
print('Red Team : \n', r.size(), '\n', ''.join(reversed(r.item)) if r.size() != 0 else 'Empty', '\n', heat, ' Explosive(s) ! ! ! (HEAT)', sep='')
if mistake > 0:
print('Blue Team Made (a) Mistake(s)', mistake, 'Bomb(s)')
print('----------TENETTENET----------')
print(': maeT eulB\n', b.size(), '\n', ''.join(reversed(b.item)) if b.size() != 0 else 'ytpmE', '\n', '(EZEERF) ! ! ! (s)evisolpxE ', freeze, sep='')
def tenet(r, b):
bombl = queue()
(heat, freeze, mistake) = (0, 0, 0)
newr = queue()
count = len(b.item) - 2
j = 0
while j < count:
if b.item[j] == b.item[j + 1] == b.item[j + 2]:
bombl.enQueue(b.item[j])
for _ in range(3):
b.item.pop(j)
count -= 1
j -= 1
freeze += 1
j += 1
for i in range(r.size()):
newr.enQueue(r.item[i])
if newr.size() >= 3:
if newr.item[-1] == newr.item[-2] == newr.item[-3]:
if not bombl.isEmpty():
bombq = bombl.deQueue()
if bombq == newr.item[-1]:
mistake += 1
for _ in range(2):
newr.item.pop()
else:
newr.item.insert(-1, bombq)
else:
heat += 1
for _ in range(3):
newr.item.pop()
showresult(newr, b, heat, freeze, mistake)
(r, b) = input('Enter Input (Red, Blue) : ').split()
r = queue(list(r))
b = queue(list(b[::-1]))
tenet(r, b) |
def test_signup_new_account(app):
username = "user1"
password = "test"
app.james.ensure_user_exists(username, password) | def test_signup_new_account(app):
username = 'user1'
password = 'test'
app.james.ensure_user_exists(username, password) |
list_var = [1, 2]
dict_var = {
"key1": "value1"
}
setVar = {1, 2, 3} | list_var = [1, 2]
dict_var = {'key1': 'value1'}
set_var = {1, 2, 3} |
n = int(input())
cnt1, cnt2 = {}, {}
for i in range(n):
x, y = map(int, input().split())
cnt1[x+y] = cnt1.get(x+y, 0) + 1
cnt2[x-y] = cnt2.get(x-y, 0) + 1
ans = 0
for t in cnt1.values():
ans += t*(t-1)//2
for t in cnt2.values():
ans += t*(t-1)//2
print(ans)
| n = int(input())
(cnt1, cnt2) = ({}, {})
for i in range(n):
(x, y) = map(int, input().split())
cnt1[x + y] = cnt1.get(x + y, 0) + 1
cnt2[x - y] = cnt2.get(x - y, 0) + 1
ans = 0
for t in cnt1.values():
ans += t * (t - 1) // 2
for t in cnt2.values():
ans += t * (t - 1) // 2
print(ans) |
def valid_oci_group(parser):
add_oci_group(parser)
def add_oci_group(parser):
oci_group = parser.add_argument_group(title="OCI arguments")
oci_group.add_argument("--oci-profile-name", default="")
oci_group.add_argument("--oci-profile-compartment-id", default="")
# HACK to extract the set provider from the cli
oci_group.add_argument("--oci", action="store_true", default=True)
| def valid_oci_group(parser):
add_oci_group(parser)
def add_oci_group(parser):
oci_group = parser.add_argument_group(title='OCI arguments')
oci_group.add_argument('--oci-profile-name', default='')
oci_group.add_argument('--oci-profile-compartment-id', default='')
oci_group.add_argument('--oci', action='store_true', default=True) |
class Card:
def __repr__(self):
return str((self.name, self.rules, self.value))
class Batman(Card):
def __init__(self):
self.name = 'Batman'
self.value = 1
self.rules = "Guess a player's hand"
self.action = 'guess'
class Catwoman(Card):
def __init__(self):
self.name = 'Catwoman'
self.value = 2
self.rules = 'Look at a hand'
self.action = 'look'
class Bane(Card):
def __init__(self):
self.name = 'Bane'
self.value = 3
self.rules = 'Compare hands; lower hand is out'
self.action = 'compare'
class Robin(Card):
def __init__(self):
self.name = 'Robin'
self.value = 4
self.rules = 'Protection until next turn'
self.action = 'immune'
class PoisonIvy(Card):
def __init__(self):
self.name = 'Poison Ivy'
self.value = 5
self.rules = 'One player discards their hand'
self.action = 'discard'
class TwoFace(Card):
def __init__(self):
self.name = 'Two-Face'
self.value = 6
self.rules = 'Trade hands'
self.action = 'trade'
class HarleyQuinn(Card):
def __init__(self):
self.name = 'Harley Quinn'
self.value = 7
self.rules = 'Discard if caught with TWO-FACE or POISON IVY'
self.action = 'nop'
class Joker(Card):
def __init__(self):
self.name = 'Joker'
self.value = 8
self.rules = 'Lose if discarded'
self.action = 'lose'
def get_card(v):
return {
1: Batman,
2: Catwoman,
3: Bane,
4: Robin,
5: PoisonIvy,
6: TwoFace,
7: HarleyQuinn,
8: Joker
}[v]()
| class Card:
def __repr__(self):
return str((self.name, self.rules, self.value))
class Batman(Card):
def __init__(self):
self.name = 'Batman'
self.value = 1
self.rules = "Guess a player's hand"
self.action = 'guess'
class Catwoman(Card):
def __init__(self):
self.name = 'Catwoman'
self.value = 2
self.rules = 'Look at a hand'
self.action = 'look'
class Bane(Card):
def __init__(self):
self.name = 'Bane'
self.value = 3
self.rules = 'Compare hands; lower hand is out'
self.action = 'compare'
class Robin(Card):
def __init__(self):
self.name = 'Robin'
self.value = 4
self.rules = 'Protection until next turn'
self.action = 'immune'
class Poisonivy(Card):
def __init__(self):
self.name = 'Poison Ivy'
self.value = 5
self.rules = 'One player discards their hand'
self.action = 'discard'
class Twoface(Card):
def __init__(self):
self.name = 'Two-Face'
self.value = 6
self.rules = 'Trade hands'
self.action = 'trade'
class Harleyquinn(Card):
def __init__(self):
self.name = 'Harley Quinn'
self.value = 7
self.rules = 'Discard if caught with TWO-FACE or POISON IVY'
self.action = 'nop'
class Joker(Card):
def __init__(self):
self.name = 'Joker'
self.value = 8
self.rules = 'Lose if discarded'
self.action = 'lose'
def get_card(v):
return {1: Batman, 2: Catwoman, 3: Bane, 4: Robin, 5: PoisonIvy, 6: TwoFace, 7: HarleyQuinn, 8: Joker}[v]() |
# Definition for a binary tree node.
# class TreeNode:
# def __init__(self, x):
# self.val = x
# self.left = None
# self.right = None
class Solution:
def inorderSuccessor(self, root: 'TreeNode', p: 'TreeNode') -> 'TreeNode':
'''
in-order traversal
'''
self.found = False
def inorder(node, target):
if not node:
return
if node.left:
l = inorder(node.left, target)
if l:
return l
if self.found:
return node
elif node == target:
self.found = True
if node.right:
r = inorder(node.right, target)
if r:
return r
return
res = inorder(root, p)
return res
## 4/8/2021: iterative solution
# class Solution:
# def inorderSuccessor(self, root: 'TreeNode', p: 'TreeNode') -> 'TreeNode':
# '''
# inorder traversal the tree, find the child node of the target node
# '''
# curr = None
# stack = []
# while True:
# while root:
# stack.append(root)
# root = root.left
# if not stack:
# return None
# node = stack.pop()
# if curr == p:
# return node
# curr = node
# root = node.right
| class Solution:
def inorder_successor(self, root: 'TreeNode', p: 'TreeNode') -> 'TreeNode':
"""
in-order traversal
"""
self.found = False
def inorder(node, target):
if not node:
return
if node.left:
l = inorder(node.left, target)
if l:
return l
if self.found:
return node
elif node == target:
self.found = True
if node.right:
r = inorder(node.right, target)
if r:
return r
return
res = inorder(root, p)
return res |
db_host_name="127.0.0.1"
db_name="TestDB"
db_user="testuser"
db_password="test123"
db_table_name="brady"
| db_host_name = '127.0.0.1'
db_name = 'TestDB'
db_user = 'testuser'
db_password = 'test123'
db_table_name = 'brady' |
'''
Created on 13 Jun 2016
@author: a
'''
class InvalidPasswords():
BAD_PASSWORDS = ['1234567890','qwertyuiop','123456789','password1','photoshop',
'11111111','12345678','1qaz2wsx','access14','adobe123','baseball',
'bigdaddy','butthead','cocacola','computer','corvette','danielle',\
'dolphins','einstein','firebird','football','hardcore','iloveyou',\
'internet','jennifer','marlboro','maverick','mercedes','michelle',\
'midnight','mistress','mountain','nicholas','passw0rd','password',\
'pa#sword','princess','qwertyui','redskins','redwings','rush2112',\
'samantha','scorpion','srinivas','startrek','starwars','steelers',\
'sunshine','superman','swimming','trustno1','victoria','whatever',\
'xxxxxxxx','1234567','7777777','8675309','abgrtyu','amateur','anthony',\
'arsenal','a#shole','bigc#ck','bigdick','bigtits','bitches','blondes',\
'bl#wjob','bond007','brandon','broncos','bulldog','cameron','captain',\
'charles','charlie','chelsea','chester','chicago','chicken','c#mming',\
'c#mshot','college','cowboys','crystal','diamond','dolphin','extreme',\
'f#cking','f#ckyou','ferrari','fishing','florida','forever','freedom',\
'gandalf','gateway','gregory','heather','hooters','hunting','jackson',\
'jasmine','jessica','johnson','leather','letmein','madison','matthew',\
'maxwell','melissa','michael','monster','mustang','naughty','ncc1701',\
'newyork','nipples','packers','panther','panties','patrick','peaches',\
'phantom','phoenix','porsche','private','p#ssies','raiders','rainbow',\
'rangers','rebecca','richard','rosebud','scooter','scorpio','shannon',\
'success','testing','thunder','thx1138','tiffany','trouble','voyager',\
'warrior','welcome','william','winston','yankees','zxcvbnm','123456',\
'111111','112233','121212','123123','123456','131313','232323','654321',\
'666666','696969','777777','987654','aaaaaa','abc123','access','action',\
'albert','alexis','amanda','andrea','andrew','angela','angels','animal',\
'apollo','apples','arthur','asdfgh','ashley','Aaugust','austin','azerty',\
'badboy','bailey','banana','barney','batman','beaver','beavis','bigdog',\
'birdie','biteme','blazer','blonde','blowme','bonnie','booboo','booger',\
'boomer','boston','brandy','braves','brazil','bronco','buster','butter',\
'calvin','camaro','canada','carlos','carter','casper','cheese','coffee',\
'compaq','cookie','cooper','cowboy','dakota','dallas','daniel','debbie',\
'dennis','diablo','doctor','doggie','donald','dragon','dreams','driver',\
'eagle1','eagles','edward','erotic','falcon','f#cked','f#cker','f#ckme',\
'fender','flower','flyers','freddy','gators','gemini','george','giants',\
'ginger','golden','golfer','gordon','guitar','gunner','hammer','hannah',\
'harley','helpme','hentai','hockey','horney','hotdog','hunter','iceman',\
'iwantu','jackie','jaguar','jasper','jeremy','johnny','jordan','joseph',\
'joshua','junior','justin','killer','knight','ladies','lakers','lauren',\
'legend','little','london','lovers','maddog','maggie','magnum','marine',\
'martin','marvin','master','matrix','member','merlin','mickey','miller',\
'monica','monkey','morgan','mother','muffin','murphy','nascar','nathan',\
'nicole','nipple','oliver','orange','parker','peanut','pepper','player',\
'please','pookie','prince','purple','qazwsx','qwerty','rabbit','rachel',\
'racing','ranger','redsox','robert','rocket','runner','russia','samson',\
'sandra','saturn','scooby','secret','sexsex','shadow','shaved','sierra',\
'silver','skippy','slayer','smokey','snoopy','soccer','sophie','spanky',\
'sparky','spider','squirt','steven','sticky','stupid','suckit','summer',\
'surfer','sydney','taylor','tennis','teresa','tester','theman','thomas',\
'tigers','tigger','tomcat','topgun','toyota','travis','tucker','turtle',\
'united','vagina','victor','viking','voodoo','walter','willie','wilson',\
'winner','winter','wizard','xavier','xxxxxx','yamaha','yankee','yellow',\
'zxcvbn','zzzzzz','qwerty123', 'qwerty12'] | """
Created on 13 Jun 2016
@author: a
"""
class Invalidpasswords:
bad_passwords = ['1234567890', 'qwertyuiop', '123456789', 'password1', 'photoshop', '11111111', '12345678', '1qaz2wsx', 'access14', 'adobe123', 'baseball', 'bigdaddy', 'butthead', 'cocacola', 'computer', 'corvette', 'danielle', 'dolphins', 'einstein', 'firebird', 'football', 'hardcore', 'iloveyou', 'internet', 'jennifer', 'marlboro', 'maverick', 'mercedes', 'michelle', 'midnight', 'mistress', 'mountain', 'nicholas', 'passw0rd', 'password', 'pa#sword', 'princess', 'qwertyui', 'redskins', 'redwings', 'rush2112', 'samantha', 'scorpion', 'srinivas', 'startrek', 'starwars', 'steelers', 'sunshine', 'superman', 'swimming', 'trustno1', 'victoria', 'whatever', 'xxxxxxxx', '1234567', '7777777', '8675309', 'abgrtyu', 'amateur', 'anthony', 'arsenal', 'a#shole', 'bigc#ck', 'bigdick', 'bigtits', 'bitches', 'blondes', 'bl#wjob', 'bond007', 'brandon', 'broncos', 'bulldog', 'cameron', 'captain', 'charles', 'charlie', 'chelsea', 'chester', 'chicago', 'chicken', 'c#mming', 'c#mshot', 'college', 'cowboys', 'crystal', 'diamond', 'dolphin', 'extreme', 'f#cking', 'f#ckyou', 'ferrari', 'fishing', 'florida', 'forever', 'freedom', 'gandalf', 'gateway', 'gregory', 'heather', 'hooters', 'hunting', 'jackson', 'jasmine', 'jessica', 'johnson', 'leather', 'letmein', 'madison', 'matthew', 'maxwell', 'melissa', 'michael', 'monster', 'mustang', 'naughty', 'ncc1701', 'newyork', 'nipples', 'packers', 'panther', 'panties', 'patrick', 'peaches', 'phantom', 'phoenix', 'porsche', 'private', 'p#ssies', 'raiders', 'rainbow', 'rangers', 'rebecca', 'richard', 'rosebud', 'scooter', 'scorpio', 'shannon', 'success', 'testing', 'thunder', 'thx1138', 'tiffany', 'trouble', 'voyager', 'warrior', 'welcome', 'william', 'winston', 'yankees', 'zxcvbnm', '123456', '111111', '112233', '121212', '123123', '123456', '131313', '232323', '654321', '666666', '696969', '777777', '987654', 'aaaaaa', 'abc123', 'access', 'action', 'albert', 'alexis', 'amanda', 'andrea', 'andrew', 'angela', 'angels', 'animal', 'apollo', 'apples', 'arthur', 'asdfgh', 'ashley', 'Aaugust', 'austin', 'azerty', 'badboy', 'bailey', 'banana', 'barney', 'batman', 'beaver', 'beavis', 'bigdog', 'birdie', 'biteme', 'blazer', 'blonde', 'blowme', 'bonnie', 'booboo', 'booger', 'boomer', 'boston', 'brandy', 'braves', 'brazil', 'bronco', 'buster', 'butter', 'calvin', 'camaro', 'canada', 'carlos', 'carter', 'casper', 'cheese', 'coffee', 'compaq', 'cookie', 'cooper', 'cowboy', 'dakota', 'dallas', 'daniel', 'debbie', 'dennis', 'diablo', 'doctor', 'doggie', 'donald', 'dragon', 'dreams', 'driver', 'eagle1', 'eagles', 'edward', 'erotic', 'falcon', 'f#cked', 'f#cker', 'f#ckme', 'fender', 'flower', 'flyers', 'freddy', 'gators', 'gemini', 'george', 'giants', 'ginger', 'golden', 'golfer', 'gordon', 'guitar', 'gunner', 'hammer', 'hannah', 'harley', 'helpme', 'hentai', 'hockey', 'horney', 'hotdog', 'hunter', 'iceman', 'iwantu', 'jackie', 'jaguar', 'jasper', 'jeremy', 'johnny', 'jordan', 'joseph', 'joshua', 'junior', 'justin', 'killer', 'knight', 'ladies', 'lakers', 'lauren', 'legend', 'little', 'london', 'lovers', 'maddog', 'maggie', 'magnum', 'marine', 'martin', 'marvin', 'master', 'matrix', 'member', 'merlin', 'mickey', 'miller', 'monica', 'monkey', 'morgan', 'mother', 'muffin', 'murphy', 'nascar', 'nathan', 'nicole', 'nipple', 'oliver', 'orange', 'parker', 'peanut', 'pepper', 'player', 'please', 'pookie', 'prince', 'purple', 'qazwsx', 'qwerty', 'rabbit', 'rachel', 'racing', 'ranger', 'redsox', 'robert', 'rocket', 'runner', 'russia', 'samson', 'sandra', 'saturn', 'scooby', 'secret', 'sexsex', 'shadow', 'shaved', 'sierra', 'silver', 'skippy', 'slayer', 'smokey', 'snoopy', 'soccer', 'sophie', 'spanky', 'sparky', 'spider', 'squirt', 'steven', 'sticky', 'stupid', 'suckit', 'summer', 'surfer', 'sydney', 'taylor', 'tennis', 'teresa', 'tester', 'theman', 'thomas', 'tigers', 'tigger', 'tomcat', 'topgun', 'toyota', 'travis', 'tucker', 'turtle', 'united', 'vagina', 'victor', 'viking', 'voodoo', 'walter', 'willie', 'wilson', 'winner', 'winter', 'wizard', 'xavier', 'xxxxxx', 'yamaha', 'yankee', 'yellow', 'zxcvbn', 'zzzzzz', 'qwerty123', 'qwerty12'] |
# None datatype
a = None
print(a)
# Numeric datatype (int,float,complex,bool)
b = 4
print(type(b))
c = 2.5
print(type(c))
d = 4 + 5j
print(type(d))
bool = b > c
print(type(bool))
e = int(c)
print(e)
f = complex(e, b)
print(f)
print(int(True))
# List datatype
lst = [1, 2, 3, 4, 5]
print(lst)
# Set datatype
s = {4, 8, 2, 1, 6, 3}
print(s)
# Tuple datatypes
tup = (10, 20, 50, 40, 30)
print(tup)
# String datatype
str = 'Sunny'
print(str)
# Range datatype
k = list(range(10))
print(k)
l = list(range(11, 21, 2))
print(l)
# Dictionary datatype
d = {1: 'sunny', 'raj': 'python', 2.4: 'java'}
print(d)
print(d.keys())
print(d.values())
print(d[2.4])
| a = None
print(a)
b = 4
print(type(b))
c = 2.5
print(type(c))
d = 4 + 5j
print(type(d))
bool = b > c
print(type(bool))
e = int(c)
print(e)
f = complex(e, b)
print(f)
print(int(True))
lst = [1, 2, 3, 4, 5]
print(lst)
s = {4, 8, 2, 1, 6, 3}
print(s)
tup = (10, 20, 50, 40, 30)
print(tup)
str = 'Sunny'
print(str)
k = list(range(10))
print(k)
l = list(range(11, 21, 2))
print(l)
d = {1: 'sunny', 'raj': 'python', 2.4: 'java'}
print(d)
print(d.keys())
print(d.values())
print(d[2.4]) |
# this menu.py only installs the SetLoop examples.
# get script location (necessaary for loading toolsets)
dirName = os.path.dirname( os.path.abspath(__file__)).replace('\\', '/')
# get node toolbar
nodes = nuke.menu('Nodes')
# make group entry for examples in toolsets menu
group = nodes.addMenu('ToolSets/SetLoop Examples', index=2)
# make adding examples a function
def addExample(fileName, toolSetName):
# add individual examples
group.addCommand('(' + toolSetName + ') ' + fileName, "nuke.loadToolset('" + dirName + '/' + fileName + ".nk')", icon = fileName + '.png')
# add each example
addExample('Geo Loop', 'SetLoop')
addExample('Motion Graphics', 'SetLoop')
addExample('Julia Set 1', 'SetLoop')
addExample('Julia Set 2', 'SetLoop')
addExample('Julia Set 3', 'SetLoop')
addExample('Mandelbrot 1', 'SetLoop')
addExample('Mandelbrot 2', 'SetLoop')
addExample('Reaction Diffusion 1', 'SetLoop')
addExample('Reaction Diffusion 2', 'SetLoop')
addExample('Reaction Diffusion 3', 'SetLoop') | dir_name = os.path.dirname(os.path.abspath(__file__)).replace('\\', '/')
nodes = nuke.menu('Nodes')
group = nodes.addMenu('ToolSets/SetLoop Examples', index=2)
def add_example(fileName, toolSetName):
group.addCommand('(' + toolSetName + ') ' + fileName, "nuke.loadToolset('" + dirName + '/' + fileName + ".nk')", icon=fileName + '.png')
add_example('Geo Loop', 'SetLoop')
add_example('Motion Graphics', 'SetLoop')
add_example('Julia Set 1', 'SetLoop')
add_example('Julia Set 2', 'SetLoop')
add_example('Julia Set 3', 'SetLoop')
add_example('Mandelbrot 1', 'SetLoop')
add_example('Mandelbrot 2', 'SetLoop')
add_example('Reaction Diffusion 1', 'SetLoop')
add_example('Reaction Diffusion 2', 'SetLoop')
add_example('Reaction Diffusion 3', 'SetLoop') |
_base_ = ["./FlowNet512_1.5AugCosyAAEGray_Flat_Pbr_01_ape.py"]
OUTPUT_DIR = "output/deepim/lmPbrSO/FlowNet512_1.5AugCosyAAEGray_Flat_lmPbr_SO/camera"
DATASETS = dict(TRAIN=("lm_pbr_camera_train",), TEST=("lm_real_camera_test",))
# bbnc7
# objects camera Avg(1)
# ad_2 26.86 26.86
# ad_5 84.41 84.41
# ad_10 99.12 99.12
# rete_2 40.88 40.88
# rete_5 99.12 99.12
# rete_10 100.00 100.00
# re_2 40.98 40.98
# re_5 99.12 99.12
# re_10 100.00 100.00
# te_2 99.51 99.51
# te_5 100.00 100.00
# te_10 100.00 100.00
# proj_2 81.76 81.76
# proj_5 99.31 99.31
# proj_10 100.00 100.00
# re 2.34 2.34
# te 0.01 0.01
# init by mlBCE
# objects camera Avg(1)
# ad_2 28.43 28.43
# ad_5 84.31 84.31
# ad_10 99.22 99.22
# rete_2 40.20 40.20
# rete_5 99.02 99.02
# rete_10 100.00 100.00
# re_2 40.29 40.29
# re_5 99.02 99.02
# re_10 100.00 100.00
# te_2 99.51 99.51
# te_5 100.00 100.00
# te_10 100.00 100.00
# proj_2 82.06 82.06
# proj_5 99.31 99.31
# proj_10 100.00 100.00
# re 2.34 2.34
# te 0.01 0.01
| _base_ = ['./FlowNet512_1.5AugCosyAAEGray_Flat_Pbr_01_ape.py']
output_dir = 'output/deepim/lmPbrSO/FlowNet512_1.5AugCosyAAEGray_Flat_lmPbr_SO/camera'
datasets = dict(TRAIN=('lm_pbr_camera_train',), TEST=('lm_real_camera_test',)) |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.