content
stringlengths
7
1.05M
fixed_cases
stringlengths
1
1.28M
XM_OFF = 649.900675 YM_OFF = -25400.296854 ZM_OFF = 15786.311942 MM_00 = 0.990902 MM_01 = 0.006561 MM_02 = 0.006433 MM_10 = 0.006561 MM_11 = 0.978122 MM_12 = 0.006076 MM_20 = 0.006433 MM_21 = 0.006076 MM_22 = 0.914589 XA_OFF = 0.141424 YA_OFF = 0.380157 ZA_OFF = -0.192037 AC_00 = 100.154822 AC_01 = 0.327635 AC_02 = -0.321495 AC_10 = 0.327635 AC_11 = 102.504150 AC_12 = -1.708150 AC_20 = -0.321495 AC_21 = -1.708150 AC_22 = 103.199592 MFSTR = +43.33
xm_off = 649.900675 ym_off = -25400.296854 zm_off = 15786.311942 mm_00 = 0.990902 mm_01 = 0.006561 mm_02 = 0.006433 mm_10 = 0.006561 mm_11 = 0.978122 mm_12 = 0.006076 mm_20 = 0.006433 mm_21 = 0.006076 mm_22 = 0.914589 xa_off = 0.141424 ya_off = 0.380157 za_off = -0.192037 ac_00 = 100.154822 ac_01 = 0.327635 ac_02 = -0.321495 ac_10 = 0.327635 ac_11 = 102.50415 ac_12 = -1.70815 ac_20 = -0.321495 ac_21 = -1.70815 ac_22 = 103.199592 mfstr = +43.33
# The mathematical modulo is used to calculate the remainder of the # integer division. As an example, 102%25 is 2. # Write a function that takes two values as parameters and returns # the calculation of a modulo from the two values. def mathematical_modulo(a, b): ''' divide a by b, return the remainder ''' return a % b print('Divide 100 by 25, remainder is: ', mathematical_modulo(100, 25)) print('Divide 102 by 25, remainder is: ', mathematical_modulo(102, 25))
def mathematical_modulo(a, b): """ divide a by b, return the remainder """ return a % b print('Divide 100 by 25, remainder is: ', mathematical_modulo(100, 25)) print('Divide 102 by 25, remainder is: ', mathematical_modulo(102, 25))
class CohereError(Exception): def __init__( self, message=None, http_status=None, headers=None, ) -> None: super(CohereError, self).__init__(message) self.message = message self.http_status = http_status self.headers = headers or {} def __str__(self) -> str: msg = self.message or '<empty message>' return msg def __repr__(self) -> str: return '%s(message=%r, http_status=%r, request_id=%r)' % ( self.__class__.__name__, self.message, self.http_status, )
class Cohereerror(Exception): def __init__(self, message=None, http_status=None, headers=None) -> None: super(CohereError, self).__init__(message) self.message = message self.http_status = http_status self.headers = headers or {} def __str__(self) -> str: msg = self.message or '<empty message>' return msg def __repr__(self) -> str: return '%s(message=%r, http_status=%r, request_id=%r)' % (self.__class__.__name__, self.message, self.http_status)
# # PySNMP MIB module WWP-LEOS-PORT-MIB (http://snmplabs.com/pysmi) # ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/WWP-LEOS-PORT-MIB # Produced by pysmi-0.3.4 at Wed May 1 15:38:09 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, ObjectIdentifier, OctetString = mibBuilder.importSymbols("ASN1", "Integer", "ObjectIdentifier", "OctetString") NamedValues, = mibBuilder.importSymbols("ASN1-ENUMERATION", "NamedValues") ConstraintsIntersection, ValueRangeConstraint, ConstraintsUnion, SingleValueConstraint, ValueSizeConstraint = mibBuilder.importSymbols("ASN1-REFINEMENT", "ConstraintsIntersection", "ValueRangeConstraint", "ConstraintsUnion", "SingleValueConstraint", "ValueSizeConstraint") dot3adAggPortListPorts, dot3adAggPortActorAdminKey = mibBuilder.importSymbols("IEEE8023-LAG-MIB", "dot3adAggPortListPorts", "dot3adAggPortActorAdminKey") NotificationGroup, ModuleCompliance = mibBuilder.importSymbols("SNMPv2-CONF", "NotificationGroup", "ModuleCompliance") sysName, sysLocation = mibBuilder.importSymbols("SNMPv2-MIB", "sysName", "sysLocation") ObjectIdentity, IpAddress, Unsigned32, MibIdentifier, Bits, ModuleIdentity, Counter64, TimeTicks, Counter32, iso, Gauge32, Integer32, NotificationType, MibScalar, MibTable, MibTableRow, MibTableColumn = mibBuilder.importSymbols("SNMPv2-SMI", "ObjectIdentity", "IpAddress", "Unsigned32", "MibIdentifier", "Bits", "ModuleIdentity", "Counter64", "TimeTicks", "Counter32", "iso", "Gauge32", "Integer32", "NotificationType", "MibScalar", "MibTable", "MibTableRow", "MibTableColumn") RowStatus, TruthValue, MacAddress, DisplayString, TextualConvention = mibBuilder.importSymbols("SNMPv2-TC", "RowStatus", "TruthValue", "MacAddress", "DisplayString", "TextualConvention") wwpModulesLeos, wwpModules = mibBuilder.importSymbols("WWP-SMI", "wwpModulesLeos", "wwpModules") wwpLeosPortMIB = ModuleIdentity((1, 3, 6, 1, 4, 1, 6141, 2, 60, 2)) wwpLeosPortMIB.setRevisions(('2012-05-25 00:00', '2011-02-02 00:00', '2010-11-01 00:00', '2010-07-28 00:00', '2010-05-05 17:00', '2008-11-14 00:00', '2008-07-21 00:00', '2007-08-11 00:00', '2007-06-20 00:00', '2006-05-26 00:00', '2006-05-18 00:00', '2006-03-15 00:00', '2005-07-28 00:00', '2004-04-18 17:00',)) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): if mibBuilder.loadTexts: wwpLeosPortMIB.setRevisionsDescriptions(('Added wwpLeosEtherPortAdvertSpeed and wwpLeosEtherPortAdvertDuplex to WwpLeosEtherPortEntry MIB object', 'Added admitOnlyUntagged to wwpLeosEtherPortAcceptableFrameTypes MIB object', 'Added wwpLeosEtherPortEgressCosPolicy', 'Added wwpLeosEtherFixedRColor and wwpLeosEtherPortFrameCosMapId mib objects', 'Added changed length of wwpLeosPortDescr from 32 to 128.', 'Added wwpLeosEtherPortEgressPortQueueMapId to wwpLeosEtherPortEntryTable. Added 10 gig option to wwpLeosEtherInterfaceType, wwpLeosEtherAdminSpeed and wwpLeosEtherOperSpeed', 'Added wwpLeosEtherPortResolvedCosPolicy,wwpLeosEtherPortMode and wwpLeosEtherFixedRcos mib objects', 'Added new mib object wwpLeosEtherPortStateMirrorGroupType.', 'Added new mib object wwpLeosEtherPortUntagDataVid.', 'Added new mib object wwpLeosEtherPortOperAutoNeg.', 'Added new mib object wwpLeosEtherPortStateMirrorGroupOperStatus. Added new mib object wwpLeosEtherPortStateMirrorGroupNumSrcPorts. Added new mib object wwpLeosEtherPortStateMirrorGroupNumDstPorts. Added new mib object wwpLeosEtherPortStateMirrorGroupMemOperState.', 'This MIB module is for the Extension of the dot1dBasePortTable for WWP Products', 'Added eumeration to wwpLeosEtherPortAdminSpeed.', 'Added new tables to support port state mirroring feature.',)) if mibBuilder.loadTexts: wwpLeosPortMIB.setLastUpdated('201205250000Z') if mibBuilder.loadTexts: wwpLeosPortMIB.setOrganization('Ciena, Inc') if mibBuilder.loadTexts: wwpLeosPortMIB.setContactInfo('Mib Meister 115 North Sullivan Road Spokane Valley, WA 99037 USA Phone: +1 509 242 9000 Email: support@ciena.com') if mibBuilder.loadTexts: wwpLeosPortMIB.setDescription('This MIB defines the managed objects for Ethernet ports.') class PortList(TextualConvention, OctetString): description = "Each octet within this value specifies a set of eight ports, with the first octet specifying ports 1 through 8, the second octet specifying ports 9 through 16, etc. Within each octet, the most significant bit represents the lowest numbered port, and the least significant bit represents the highest numbered port. Thus, each port of the bridge is represented by a single bit within the value of this object. If that bit has a value of '1' then that port is included in the set of ports; the port is not included if its bit has a value of '0'." status = 'current' subtypeSpec = OctetString.subtypeSpec + ValueSizeConstraint(0, 255) class PortEgressFrameCosPolicy(TextualConvention, Integer32): description = 'Egress cos policy to use on this port ignore means leave egress map disabled' status = 'current' subtypeSpec = Integer32.subtypeSpec + ConstraintsUnion(SingleValueConstraint(1, 2)) namedValues = NamedValues(("ingore", 1), ("rcosToL2OuterPcpMap", 2)) class PortIngressFixedColor(TextualConvention, Integer32): description = 'Egress cos policy to use on this port ignore means leave egress map disabled' status = 'current' subtypeSpec = Integer32.subtypeSpec + ConstraintsUnion(SingleValueConstraint(1, 2)) namedValues = NamedValues(("green", 1), ("yellow", 2)) wwpLeosPortMIBObjects = MibIdentifier((1, 3, 6, 1, 4, 1, 6141, 2, 60, 2, 1)) wwpLeosEtherPort = MibIdentifier((1, 3, 6, 1, 4, 1, 6141, 2, 60, 2, 1, 1)) wwpLeosEtherPortNotif = MibIdentifier((1, 3, 6, 1, 4, 1, 6141, 2, 60, 2, 1, 2)) wwpLeosPortMIBNotificationPrefix = MibIdentifier((1, 3, 6, 1, 4, 1, 6141, 2, 60, 2, 2)) wwpLeosPortMIBNotifications = MibIdentifier((1, 3, 6, 1, 4, 1, 6141, 2, 60, 2, 2, 0)) wwpLeosPortMIBConformance = MibIdentifier((1, 3, 6, 1, 4, 1, 6141, 2, 60, 2, 3)) wwpLeosPortMIBCompliances = MibIdentifier((1, 3, 6, 1, 4, 1, 6141, 2, 60, 2, 3, 1)) wwpLeosPortMIBGroups = MibIdentifier((1, 3, 6, 1, 4, 1, 6141, 2, 60, 2, 3, 2)) wwpLeosEtherPortTable = MibTable((1, 3, 6, 1, 4, 1, 6141, 2, 60, 2, 1, 1, 1), ) if mibBuilder.loadTexts: wwpLeosEtherPortTable.setStatus('current') if mibBuilder.loadTexts: wwpLeosEtherPortTable.setDescription('Table of Ethernet Ports.') wwpLeosEtherPortEntry = MibTableRow((1, 3, 6, 1, 4, 1, 6141, 2, 60, 2, 1, 1, 1, 1), ).setIndexNames((0, "WWP-LEOS-PORT-MIB", "wwpLeosEtherPortId")) if mibBuilder.loadTexts: wwpLeosEtherPortEntry.setStatus('current') if mibBuilder.loadTexts: wwpLeosEtherPortEntry.setDescription('Port Entry in the Ethernet Port Table.') wwpLeosEtherPortId = MibTableColumn((1, 3, 6, 1, 4, 1, 6141, 2, 60, 2, 1, 1, 1, 1, 1), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 65535))).setMaxAccess("readonly") if mibBuilder.loadTexts: wwpLeosEtherPortId.setStatus('current') if mibBuilder.loadTexts: wwpLeosEtherPortId.setDescription("Port ID for the instance. Port ID's start at 1, and may not be consecutive for each additional port. This port Id should refer to the dot1dBasePort in the Dot1dBasePortEntry.") wwpLeosEtherPortName = MibTableColumn((1, 3, 6, 1, 4, 1, 6141, 2, 60, 2, 1, 1, 1, 1, 2), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 8))).setMaxAccess("readonly") if mibBuilder.loadTexts: wwpLeosEtherPortName.setStatus('current') if mibBuilder.loadTexts: wwpLeosEtherPortName.setDescription('A textual string containing information about the port. This string should indicate about the physical location of the port as well.') wwpLeosEtherPortDesc = MibTableColumn((1, 3, 6, 1, 4, 1, 6141, 2, 60, 2, 1, 1, 1, 1, 3), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 128))).setMaxAccess("readwrite") if mibBuilder.loadTexts: wwpLeosEtherPortDesc.setStatus('current') if mibBuilder.loadTexts: wwpLeosEtherPortDesc.setDescription('A textual string containing port description.') wwpLeosEtherPortType = MibTableColumn((1, 3, 6, 1, 4, 1, 6141, 2, 60, 2, 1, 1, 1, 1, 4), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4, 5, 6, 7, 8, 9, 10))).clone(namedValues=NamedValues(("ethernet", 1), ("fastEthernet", 2), ("hundredFx", 3), ("gigEthernet", 4), ("lagPort", 5), ("unknown", 6), ("gigHundredFx", 7), ("tripleSpeed", 8), ("tenGigEthernet", 9), ("gigTenGigEthernet", 10)))).setMaxAccess("readonly") if mibBuilder.loadTexts: wwpLeosEtherPortType.setStatus('current') if mibBuilder.loadTexts: wwpLeosEtherPortType.setDescription('The port type for the port.') wwpLeosEtherPortPhysAddr = MibTableColumn((1, 3, 6, 1, 4, 1, 6141, 2, 60, 2, 1, 1, 1, 1, 5), MacAddress()).setMaxAccess("readonly") if mibBuilder.loadTexts: wwpLeosEtherPortPhysAddr.setStatus('current') if mibBuilder.loadTexts: wwpLeosEtherPortPhysAddr.setDescription('The ethernet MAC address for the port. This information can also be achieved via dot1dTpFdbTable') wwpLeosEtherPortAutoNeg = MibTableColumn((1, 3, 6, 1, 4, 1, 6141, 2, 60, 2, 1, 1, 1, 1, 6), TruthValue()).setMaxAccess("readwrite") if mibBuilder.loadTexts: wwpLeosEtherPortAutoNeg.setStatus('current') if mibBuilder.loadTexts: wwpLeosEtherPortAutoNeg.setDescription('The object sets the port to AUTO NEG MOde and vice versa. Specific platforms may have requirements of configuring speed before moving the port to out of AUTO-NEG mode.') wwpLeosEtherPortAdminStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 6141, 2, 60, 2, 1, 1, 1, 1, 7), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("up", 1), ("down", 2)))).setMaxAccess("readwrite") if mibBuilder.loadTexts: wwpLeosEtherPortAdminStatus.setStatus('current') if mibBuilder.loadTexts: wwpLeosEtherPortAdminStatus.setDescription('The desired state of the port.') wwpLeosEtherPortOperStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 6141, 2, 60, 2, 1, 1, 1, 1, 8), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4, 5, 6))).clone(namedValues=NamedValues(("up", 1), ("down", 2), ("notauth", 3), ("lbtx", 4), ("lbrx", 5), ("linkflap", 6)))).setMaxAccess("readonly") if mibBuilder.loadTexts: wwpLeosEtherPortOperStatus.setStatus('current') if mibBuilder.loadTexts: wwpLeosEtherPortOperStatus.setDescription('The current operational state of Port.') wwpLeosEtherPortAdminSpeed = MibTableColumn((1, 3, 6, 1, 4, 1, 6141, 2, 60, 2, 1, 1, 1, 1, 9), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4, 5))).clone(namedValues=NamedValues(("tenMb", 1), ("hundredMb", 2), ("gig", 3), ("auto", 4), ("tenGig", 5)))).setMaxAccess("readwrite") if mibBuilder.loadTexts: wwpLeosEtherPortAdminSpeed.setStatus('current') if mibBuilder.loadTexts: wwpLeosEtherPortAdminSpeed.setDescription('Desired speed of the port. Set the port speed to be either 10MB, 100MB, or gig. Set the port speed to auto to enable automatic port speed detection. The default value for this object depends upon the platform.') wwpLeosEtherPortOperSpeed = MibTableColumn((1, 3, 6, 1, 4, 1, 6141, 2, 60, 2, 1, 1, 1, 1, 10), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 1, 2, 3, 4))).clone(namedValues=NamedValues(("unknown", 0), ("tenMb", 1), ("hundredMb", 2), ("gig", 3), ("tenGig", 4)))).setMaxAccess("readonly") if mibBuilder.loadTexts: wwpLeosEtherPortOperSpeed.setStatus('deprecated') if mibBuilder.loadTexts: wwpLeosEtherPortOperSpeed.setDescription('The current operational speed of the port.') wwpLeosEtherPortAdminDuplex = MibTableColumn((1, 3, 6, 1, 4, 1, 6141, 2, 60, 2, 1, 1, 1, 1, 11), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("half", 1), ("full", 2)))).setMaxAccess("readwrite") if mibBuilder.loadTexts: wwpLeosEtherPortAdminDuplex.setStatus('current') if mibBuilder.loadTexts: wwpLeosEtherPortAdminDuplex.setDescription('The desired mode for the port. It can be set to either half or full duplex operation. The default value for this object depends upon the platform.') wwpLeosEtherPortOperDuplex = MibTableColumn((1, 3, 6, 1, 4, 1, 6141, 2, 60, 2, 1, 1, 1, 1, 12), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("half", 1), ("full", 2)))).setMaxAccess("readonly") if mibBuilder.loadTexts: wwpLeosEtherPortOperDuplex.setStatus('current') if mibBuilder.loadTexts: wwpLeosEtherPortOperDuplex.setDescription('The current duplex mode of the port.') wwpLeosEtherPortAdminFlowCtrl = MibTableColumn((1, 3, 6, 1, 4, 1, 6141, 2, 60, 2, 1, 1, 1, 1, 13), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4, 5))).clone(namedValues=NamedValues(("unknown", 1), ("off", 2), ("asymTx", 3), ("asymRx", 4), ("sym", 5)))).setMaxAccess("readwrite") if mibBuilder.loadTexts: wwpLeosEtherPortAdminFlowCtrl.setStatus('current') if mibBuilder.loadTexts: wwpLeosEtherPortAdminFlowCtrl.setDescription('Configures the ports flow control operation.') wwpLeosEtherPortOperFlowCtrl = MibTableColumn((1, 3, 6, 1, 4, 1, 6141, 2, 60, 2, 1, 1, 1, 1, 14), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4, 5))).clone(namedValues=NamedValues(("unknown", 1), ("off", 2), ("asymTx", 3), ("asymRx", 4), ("sym", 5)))).setMaxAccess("readonly") if mibBuilder.loadTexts: wwpLeosEtherPortOperFlowCtrl.setStatus('current') if mibBuilder.loadTexts: wwpLeosEtherPortOperFlowCtrl.setDescription('Shows ports flow control configuration.') wwpLeosEtherIngressPvid = MibTableColumn((1, 3, 6, 1, 4, 1, 6141, 2, 60, 2, 1, 1, 1, 1, 15), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 24576)).clone(1)).setMaxAccess("readwrite") if mibBuilder.loadTexts: wwpLeosEtherIngressPvid.setReference('IEEE 802.1Q/D11 Section 12.10.1.1') if mibBuilder.loadTexts: wwpLeosEtherIngressPvid.setStatus('current') if mibBuilder.loadTexts: wwpLeosEtherIngressPvid.setDescription('The Ingress PVID, the VLAN ID associated with untagged frames ingressing the port or if tunnel is enabled on this port. The max value for this object is platform dependent. Refer to architecture document for details of platform dependency.') wwpLeosEtherUntagEgressVlanId = MibTableColumn((1, 3, 6, 1, 4, 1, 6141, 2, 60, 2, 1, 1, 1, 1, 16), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 24576))).setMaxAccess("readwrite") if mibBuilder.loadTexts: wwpLeosEtherUntagEgressVlanId.setStatus('current') if mibBuilder.loadTexts: wwpLeosEtherUntagEgressVlanId.setDescription('All the egress frames whose VLAN id matches the wwpLeosEtherUntagEgressVlanId, will egress the port as untagged. To egress the frames tagged set wwpLeosEtherUntagEgressVlanId to 0. The max value for this object is platform dependent. Refer to architecture document for details of platform dependency.') wwpLeosEtherPortAcceptableFrameTypes = MibTableColumn((1, 3, 6, 1, 4, 1, 6141, 2, 60, 2, 1, 1, 1, 1, 17), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3))).clone(namedValues=NamedValues(("admitAll", 1), ("admitOnlyVlanTagged", 2), ("admitOnlyUntagged", 3))).clone('admitAll')).setMaxAccess("readwrite") if mibBuilder.loadTexts: wwpLeosEtherPortAcceptableFrameTypes.setReference('IEEE 802.1Q/D11 Section 12.10.1.3') if mibBuilder.loadTexts: wwpLeosEtherPortAcceptableFrameTypes.setStatus('current') if mibBuilder.loadTexts: wwpLeosEtherPortAcceptableFrameTypes.setDescription('When this is admitOnlyVlanTagged(2) the device will discard untagged frames or Priority-Tagged frames received on this port. When admitOnlyUntagged(3) is set, the device will discard VLAN tagged frames received on this port. With admitOnlyUntagged(3) and admitAll(1), untagged frames or Priority-Tagged frames received on this port will be accepted and assigned to the PVID for this port. This control does not affect VLAN independent BPDU frames, such as GVRP and STP. It does affect VLAN dependent BPDU frames, such as GMRP.') wwpLeosEtherPortUntaggedPriority = MibTableColumn((1, 3, 6, 1, 4, 1, 6141, 2, 60, 2, 1, 1, 1, 1, 18), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 1, 2, 3, 4, 5, 6, 7))).clone(namedValues=NamedValues(("p0", 0), ("p1", 1), ("p2", 2), ("p3", 3), ("p4", 4), ("p5", 5), ("p6", 6), ("p7", 7)))).setMaxAccess("readwrite") if mibBuilder.loadTexts: wwpLeosEtherPortUntaggedPriority.setStatus('deprecated') if mibBuilder.loadTexts: wwpLeosEtherPortUntaggedPriority.setDescription('The 802.1p packet priority to be assigned to packets ingressing this port that do not have an 802.1Q VLAN header. This priority is also assigned to ingress frame if tunnel is enabled on this port.') wwpLeosEtherPortMaxFrameSize = MibTableColumn((1, 3, 6, 1, 4, 1, 6141, 2, 60, 2, 1, 1, 1, 1, 19), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1522, 9216))).setMaxAccess("readwrite") if mibBuilder.loadTexts: wwpLeosEtherPortMaxFrameSize.setStatus('current') if mibBuilder.loadTexts: wwpLeosEtherPortMaxFrameSize.setDescription('Setting this object will set the max frame size allowed on a port. The max frame size can vary from 1522 bytes to 9216 bytes. Default value is 1526 bytes.') wwpLeosEtherPortVlanIngressFiltering = MibTableColumn((1, 3, 6, 1, 4, 1, 6141, 2, 60, 2, 1, 1, 1, 1, 20), TruthValue().clone('true')).setMaxAccess("readwrite") if mibBuilder.loadTexts: wwpLeosEtherPortVlanIngressFiltering.setStatus('current') if mibBuilder.loadTexts: wwpLeosEtherPortVlanIngressFiltering.setDescription('When this is true(1) the device will discard incoming frames for VLANs which do not include this Port in its Member set. When false(2), the port will accept all incoming frames.') wwpLeosEtherPortAdminAdvertisedFlowCtrl = MibTableColumn((1, 3, 6, 1, 4, 1, 6141, 2, 60, 2, 1, 1, 1, 1, 21), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4, 5))).clone(namedValues=NamedValues(("unknown", 1), ("off", 2), ("asymTx", 3), ("sym", 4), ("symAsymRx", 5)))).setMaxAccess("readwrite") if mibBuilder.loadTexts: wwpLeosEtherPortAdminAdvertisedFlowCtrl.setStatus('current') if mibBuilder.loadTexts: wwpLeosEtherPortAdminAdvertisedFlowCtrl.setDescription('This object specifies the advertised flow control for given port.') wwpLeosEtherPortVplsPortType = MibTableColumn((1, 3, 6, 1, 4, 1, 6141, 2, 60, 2, 1, 1, 1, 1, 22), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3))).clone(namedValues=NamedValues(("notDefined", 1), ("subscriber", 2), ("networkFacing", 3)))).setMaxAccess("readonly") if mibBuilder.loadTexts: wwpLeosEtherPortVplsPortType.setStatus('current') if mibBuilder.loadTexts: wwpLeosEtherPortVplsPortType.setDescription('This object specifies whether port is in subscriber type, network facing side or both. ') wwpLeosEtherPortIngressCosPolicy = MibTableColumn((1, 3, 6, 1, 4, 1, 6141, 2, 60, 2, 1, 1, 1, 1, 23), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4))).clone(namedValues=NamedValues(("leave", 1), ("fixed", 2), ("ippInherit", 3), ("phbgInherit", 4)))).setMaxAccess("readwrite") if mibBuilder.loadTexts: wwpLeosEtherPortIngressCosPolicy.setStatus('current') if mibBuilder.loadTexts: wwpLeosEtherPortIngressCosPolicy.setDescription('This object specifies the ingress cos policy to be applied to all frames coming in on the given port.') wwpLeosEtherPortIngressFixedDot1dPri = MibTableColumn((1, 3, 6, 1, 4, 1, 6141, 2, 60, 2, 1, 1, 1, 1, 24), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 7))).setMaxAccess("readwrite") if mibBuilder.loadTexts: wwpLeosEtherPortIngressFixedDot1dPri.setStatus('current') if mibBuilder.loadTexts: wwpLeosEtherPortIngressFixedDot1dPri.setDescription("The 802.1p packet priority to be assigned to packets ingressing this port that do not have an 802.1Q VLAN header. This priority is also assigned to ingress untagged frame if the virtual switch cos policy is set to 'fix' for a given port.") wwpLeosEtherPortUntagDataVsi = MibTableColumn((1, 3, 6, 1, 4, 1, 6141, 2, 60, 2, 1, 1, 1, 1, 25), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 65535))).setMaxAccess("readwrite") if mibBuilder.loadTexts: wwpLeosEtherPortUntagDataVsi.setStatus('current') if mibBuilder.loadTexts: wwpLeosEtherPortUntagDataVsi.setDescription('This object specifies the virtual switch to be used for this port if data frame is untagged. If this object is set to 0 then device will unset this object. When setting this object to Mpls Vsi Index then wwpLeosEtherPortUntagDataVsiType must also be set to mpls (Use multiple set operation)') wwpLeosEtherPortOperationalSpeed = MibTableColumn((1, 3, 6, 1, 4, 1, 6141, 2, 60, 2, 1, 1, 1, 1, 26), Gauge32()).setUnits('kbps').setMaxAccess("readonly") if mibBuilder.loadTexts: wwpLeosEtherPortOperationalSpeed.setStatus('current') if mibBuilder.loadTexts: wwpLeosEtherPortOperationalSpeed.setDescription("An estimate of the port's current bandwidth in k-bits per second for given port.") wwpLeosEtherPortUntagCtrlVsi = MibTableColumn((1, 3, 6, 1, 4, 1, 6141, 2, 60, 2, 1, 1, 1, 1, 27), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 65535))).setMaxAccess("readwrite") if mibBuilder.loadTexts: wwpLeosEtherPortUntagCtrlVsi.setStatus('current') if mibBuilder.loadTexts: wwpLeosEtherPortUntagCtrlVsi.setDescription('This object specifies the virtual switch to be used for this port if control frame is untagged. If this object is set to 0 then device will unset this object. When setting this object to Mpls Vsi Index then wwpLeosEtherPortUntagCtrlVsiType must also be set to mpls (Use multiple set operation)') wwpLeosEtherPortMirrorPort = MibTableColumn((1, 3, 6, 1, 4, 1, 6141, 2, 60, 2, 1, 1, 1, 1, 28), TruthValue().clone('false')).setMaxAccess("readwrite") if mibBuilder.loadTexts: wwpLeosEtherPortMirrorPort.setStatus('current') if mibBuilder.loadTexts: wwpLeosEtherPortMirrorPort.setDescription('This object defines whether the port will allow traffic from other ports to be mirrored to this port. To allow traffic from other ports to be sent to this port, set this object to True(1). This port is known as a mirror port. If set to true, then other ports may set the values of their wwpLeosEtherPortMirrorIngress or wwpLeosEtherPortMirrorEgress objects to the port index of this port. Setting this object to false(2) disables this port as a mirror port.') wwpLeosEtherPortMirrorIngress = MibTableColumn((1, 3, 6, 1, 4, 1, 6141, 2, 60, 2, 1, 1, 1, 1, 29), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 65535))).setMaxAccess("readwrite") if mibBuilder.loadTexts: wwpLeosEtherPortMirrorIngress.setStatus('current') if mibBuilder.loadTexts: wwpLeosEtherPortMirrorIngress.setDescription("The value of this object is the port index of a mirror port. The ingress traffic of this port can be mirrored by setting the destination port's wwpLeosEtherPortMirrorPort object to true. If the value of this object is set to zero this port's ingress traffic will not be mirrored.") wwpLeosEtherPortMirrorEgress = MibTableColumn((1, 3, 6, 1, 4, 1, 6141, 2, 60, 2, 1, 1, 1, 1, 30), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 65535))).setMaxAccess("readwrite") if mibBuilder.loadTexts: wwpLeosEtherPortMirrorEgress.setStatus('current') if mibBuilder.loadTexts: wwpLeosEtherPortMirrorEgress.setDescription("The value of this object is the port index of a mirror port. The egress traffic of this port can be mirrored by setting the destination port's wwpLeosEtherPortMirrorPort object to true. If the value of this object is set to zero this port's egress traffic will not be mirrored.") wwpLeosEtherPortUntagDataVsiType = MibTableColumn((1, 3, 6, 1, 4, 1, 6141, 2, 60, 2, 1, 1, 1, 1, 31), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("ethernet", 1), ("mpls", 2))).clone('ethernet')).setMaxAccess("readwrite") if mibBuilder.loadTexts: wwpLeosEtherPortUntagDataVsiType.setStatus('current') if mibBuilder.loadTexts: wwpLeosEtherPortUntagDataVsiType.setDescription('This object specifies the virtual switch instance type associated with this port. This object defaults to ethernet and specifies if wwpLeosEtherPortUntagDataVsi belongs to ethernet virtual switch table (wwpLeosVplsVirtualSwitchEthTable in WWP-LEOS-VPLS-MIB) or mpls virtual switch table (wwpLeosVplsVirtualSwitchMplsTable in WWP-LEOS-VPLS-MIB). When setting wwpLeosEtherPortUntagDataVsi to MPLS Vsi Index then this object must also be set to mpls (Use mutliple set operation).') wwpLeosEtherPortUntagCtrlVsiType = MibTableColumn((1, 3, 6, 1, 4, 1, 6141, 2, 60, 2, 1, 1, 1, 1, 32), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("ethernet", 1), ("mpls", 2))).clone('ethernet')).setMaxAccess("readwrite") if mibBuilder.loadTexts: wwpLeosEtherPortUntagCtrlVsiType.setStatus('current') if mibBuilder.loadTexts: wwpLeosEtherPortUntagCtrlVsiType.setDescription('This object specifies the virtual switch instance type associated with this port. This object defaults to ethernet and specifies if wwpLeosEtherPortUntagCtrlVsi belongs to ethernet virtual switch table (wwpLeosVplsVirtualSwitchEthTable) or mpls virtual switch table (wwpLeosVplsVirtualSwitchMplsTable). When setting wwpLeosEtherPortUntagCtrlVsi to MPLS Vsi Index then this object must also be set to mpls (Use mutliple set operation)') wwpLeosEtherPortVsIngressFiltering = MibTableColumn((1, 3, 6, 1, 4, 1, 6141, 2, 60, 2, 1, 1, 1, 1, 33), TruthValue().clone('false')).setMaxAccess("readwrite") if mibBuilder.loadTexts: wwpLeosEtherPortVsIngressFiltering.setStatus('current') if mibBuilder.loadTexts: wwpLeosEtherPortVsIngressFiltering.setDescription('This item is applicable to this port when the port is added as a per-port member to a virtual switch. If true(1) the device will discard incoming tagged frames. If false(2) the device will forwared incoming tagged frames so long as those customer tagged frames do not match another virtual switch with this port included as a per-port-per-vlan member.') wwpLeosEtherPortOperAutoNeg = MibTableColumn((1, 3, 6, 1, 4, 1, 6141, 2, 60, 2, 1, 1, 1, 1, 34), TruthValue()).setMaxAccess("readonly") if mibBuilder.loadTexts: wwpLeosEtherPortOperAutoNeg.setStatus('current') if mibBuilder.loadTexts: wwpLeosEtherPortOperAutoNeg.setDescription('The object specifies the operational auto neg state.') wwpLeosEtherPortUpTime = MibTableColumn((1, 3, 6, 1, 4, 1, 6141, 2, 60, 2, 1, 1, 1, 1, 35), TimeTicks()).setMaxAccess("readonly") if mibBuilder.loadTexts: wwpLeosEtherPortUpTime.setStatus('current') if mibBuilder.loadTexts: wwpLeosEtherPortUpTime.setDescription('The object specifies the port up time in hundredths of a second.') wwpLeosEtherPortUntagDataVid = MibTableColumn((1, 3, 6, 1, 4, 1, 6141, 2, 60, 2, 1, 1, 1, 1, 36), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 24576)).clone(1)).setMaxAccess("readwrite") if mibBuilder.loadTexts: wwpLeosEtherPortUntagDataVid.setReference('IEEE 802.1Q/D11 Section 12.10.1.1') if mibBuilder.loadTexts: wwpLeosEtherPortUntagDataVid.setStatus('current') if mibBuilder.loadTexts: wwpLeosEtherPortUntagDataVid.setDescription('The Ingress Untagged Data Vid, the VLAN ID stamped on untagged frames ingressing the port or if tunnel is enabled on this port. To disable tagging of untagged data on ingress write a value of 0. The max value for this object is platform dependent. Refer to architecture document for details of platform dependency.') wwpLeosEtherPortPhyLoopback = MibTableColumn((1, 3, 6, 1, 4, 1, 6141, 2, 60, 2, 1, 1, 1, 1, 37), TruthValue().clone('false')).setMaxAccess("readwrite") if mibBuilder.loadTexts: wwpLeosEtherPortPhyLoopback.setStatus('current') if mibBuilder.loadTexts: wwpLeosEtherPortPhyLoopback.setDescription('This object defines whether the phy has been placed in loopback mode, which causes frames egressing the port to be looped back to the port.') wwpLeosEtherPortVlanIngressFilterStrict = MibTableColumn((1, 3, 6, 1, 4, 1, 6141, 2, 60, 2, 1, 1, 1, 1, 38), TruthValue().clone('false')).setMaxAccess("readwrite") if mibBuilder.loadTexts: wwpLeosEtherPortVlanIngressFilterStrict.setStatus('current') if mibBuilder.loadTexts: wwpLeosEtherPortVlanIngressFilterStrict.setDescription('This item is applicable to this port when the port is added as a to a virtual switch. If true(1) the legacy ingress filter behavior will be enforced at member addition (drop bit will be set to drop untagged traffic). If false, the splat bit will not be changed. Note that external VLAN associations are also maintained when strict is false.') wwpLeosEtherPortMacSaDaSwap = MibTableColumn((1, 3, 6, 1, 4, 1, 6141, 2, 60, 2, 1, 1, 1, 1, 39), TruthValue().clone('false')).setMaxAccess("readwrite") if mibBuilder.loadTexts: wwpLeosEtherPortMacSaDaSwap.setStatus('current') if mibBuilder.loadTexts: wwpLeosEtherPortMacSaDaSwap.setDescription('This object defines whether the MAC SA and DA will be swapped on frames egressing the port. This only works on a 311V.') wwpLeosEtherPortMacSaDaSwapVlan = MibTableColumn((1, 3, 6, 1, 4, 1, 6141, 2, 60, 2, 1, 1, 1, 1, 40), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 24576))).setMaxAccess("readwrite") if mibBuilder.loadTexts: wwpLeosEtherPortMacSaDaSwapVlan.setStatus('current') if mibBuilder.loadTexts: wwpLeosEtherPortMacSaDaSwapVlan.setDescription('This object defines whether the MAC SA and DA will be swapped on specific VLAN frames egressing the port. This only works on a 311V.') wwpLeosEtherPortResolvedCosPolicy = MibTableColumn((1, 3, 6, 1, 4, 1, 6141, 2, 60, 2, 1, 1, 1, 1, 41), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 99))).clone(namedValues=NamedValues(("dot1d", 1), ("l3DscpCos", 2), ("fixedCos", 3), ("unknown", 99)))).setMaxAccess("readwrite") if mibBuilder.loadTexts: wwpLeosEtherPortResolvedCosPolicy.setStatus('current') if mibBuilder.loadTexts: wwpLeosEtherPortResolvedCosPolicy.setDescription(' The Resolved Cost Policy. Setting this attribute is not supported in leos version 4') wwpLeosEtherPortMode = MibTableColumn((1, 3, 6, 1, 4, 1, 6141, 2, 60, 2, 1, 1, 1, 1, 42), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 99))).clone(namedValues=NamedValues(("rj45", 1), ("sfp", 2), ("default", 3), ("unknown", 99)))).setMaxAccess("readwrite") if mibBuilder.loadTexts: wwpLeosEtherPortMode.setStatus('current') if mibBuilder.loadTexts: wwpLeosEtherPortMode.setDescription('The mode of the port Setting this attribute is not supported in leos version 4') wwpLeosEtherFixedRcos = MibTableColumn((1, 3, 6, 1, 4, 1, 6141, 2, 60, 2, 1, 1, 1, 1, 43), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 7))).setMaxAccess("readwrite") if mibBuilder.loadTexts: wwpLeosEtherFixedRcos.setStatus('current') if mibBuilder.loadTexts: wwpLeosEtherFixedRcos.setDescription('The fixed Resolve Cost value. Setting this attribute is not supported in leos version 4') wwpLeosEtherPortEgressPortQueueMapId = MibTableColumn((1, 3, 6, 1, 4, 1, 6141, 2, 60, 2, 1, 1, 1, 1, 44), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 65535))).setMaxAccess("readwrite") if mibBuilder.loadTexts: wwpLeosEtherPortEgressPortQueueMapId.setStatus('current') if mibBuilder.loadTexts: wwpLeosEtherPortEgressPortQueueMapId.setDescription('The Egress-port-Queue associated with this port. Setting this attribute is not supported in leos version 4') wwpLeosEtherPortResolvedCosMapId = MibTableColumn((1, 3, 6, 1, 4, 1, 6141, 2, 60, 2, 1, 1, 1, 1, 45), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 65535))).setMaxAccess("readwrite") if mibBuilder.loadTexts: wwpLeosEtherPortResolvedCosMapId.setStatus('current') if mibBuilder.loadTexts: wwpLeosEtherPortResolvedCosMapId.setDescription('RCOS map id for the port. Setting this attribute is not supported in leos version 4') wwpLeosEtherPortResolvedCosRemarkL2 = MibTableColumn((1, 3, 6, 1, 4, 1, 6141, 2, 60, 2, 1, 1, 1, 1, 46), TruthValue()).setMaxAccess("readwrite") if mibBuilder.loadTexts: wwpLeosEtherPortResolvedCosRemarkL2.setStatus('current') if mibBuilder.loadTexts: wwpLeosEtherPortResolvedCosRemarkL2.setDescription('The object specifies whether to remark L2 based on L3. This applies when the resolved cos policy is either l3-dscp-cos or dot1d-tag1-cos but not when it is fixed-cos policy. Setting this attribute is not supported in leos version 4') wwpLeosEtherPortL2TransformMode = MibTableColumn((1, 3, 6, 1, 4, 1, 6141, 2, 60, 2, 1, 1, 1, 1, 47), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 1, 2, 3))).clone(namedValues=NamedValues(("none", 0), ("iPush-e-Pop", 1), ("iStamp-Push-e-QualifiedPopStamp", 2), ("iPush-e-PopStamp", 3))).clone(1)).setMaxAccess("readwrite") if mibBuilder.loadTexts: wwpLeosEtherPortL2TransformMode.setStatus('current') if mibBuilder.loadTexts: wwpLeosEtherPortL2TransformMode.setDescription('L2 transform action for port. Setting this attribute is not supported in leos version 4') wwpLeosEtherPortLinkFlapDetection = MibTableColumn((1, 3, 6, 1, 4, 1, 6141, 2, 60, 2, 1, 1, 1, 1, 48), TruthValue().clone('false')).setMaxAccess("readwrite") if mibBuilder.loadTexts: wwpLeosEtherPortLinkFlapDetection.setStatus('current') if mibBuilder.loadTexts: wwpLeosEtherPortLinkFlapDetection.setDescription('This object defines whether link flap detection will be enabled on the port.') wwpLeosEtherPortLinkFlapCount = MibTableColumn((1, 3, 6, 1, 4, 1, 6141, 2, 60, 2, 1, 1, 1, 1, 49), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 64)).clone(5)).setMaxAccess("readwrite") if mibBuilder.loadTexts: wwpLeosEtherPortLinkFlapCount.setStatus('current') if mibBuilder.loadTexts: wwpLeosEtherPortLinkFlapCount.setDescription('This object defines how many link down events are required to trigger a link flap event.') wwpLeosEtherPortLinkFlapDetectTime = MibTableColumn((1, 3, 6, 1, 4, 1, 6141, 2, 60, 2, 1, 1, 1, 1, 50), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 600)).clone(10)).setMaxAccess("readwrite") if mibBuilder.loadTexts: wwpLeosEtherPortLinkFlapDetectTime.setStatus('current') if mibBuilder.loadTexts: wwpLeosEtherPortLinkFlapDetectTime.setDescription('This object defines the time in seconds during which link down events are accumlated to trigger a link flap event.') wwpLeosEtherPortLinkFlapHoldTime = MibTableColumn((1, 3, 6, 1, 4, 1, 6141, 2, 60, 2, 1, 1, 1, 1, 51), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 600)).clone(300)).setMaxAccess("readwrite") if mibBuilder.loadTexts: wwpLeosEtherPortLinkFlapHoldTime.setStatus('current') if mibBuilder.loadTexts: wwpLeosEtherPortLinkFlapHoldTime.setDescription('This object defines the time in seconds that a port will be operationally disabled after a link flap event, before it is re-enabled. A value of zero causes the port to remain disabled until manually enabled.') wwpLeosEtherFixedRColor = MibTableColumn((1, 3, 6, 1, 4, 1, 6141, 2, 60, 2, 1, 1, 1, 1, 52), PortIngressFixedColor().clone(1)).setMaxAccess("readwrite") if mibBuilder.loadTexts: wwpLeosEtherFixedRColor.setStatus('current') if mibBuilder.loadTexts: wwpLeosEtherFixedRColor.setDescription('This sets the fixed color to green (default) or yellow. Setting this attribute is not supported in saos version 4') wwpLeosEtherPortFrameCosMapId = MibTableColumn((1, 3, 6, 1, 4, 1, 6141, 2, 60, 2, 1, 1, 1, 1, 53), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 65535)).clone(1)).setMaxAccess("readwrite") if mibBuilder.loadTexts: wwpLeosEtherPortFrameCosMapId.setStatus('current') if mibBuilder.loadTexts: wwpLeosEtherPortFrameCosMapId.setDescription('Frame COS map id for the port. Setting this attribute is not supported in leos version 4') wwpLeosEtherPortEgressCosPolicy = MibTableColumn((1, 3, 6, 1, 4, 1, 6141, 2, 60, 2, 1, 1, 1, 1, 54), PortEgressFrameCosPolicy().clone(1)).setMaxAccess("readwrite") if mibBuilder.loadTexts: wwpLeosEtherPortEgressCosPolicy.setStatus('current') if mibBuilder.loadTexts: wwpLeosEtherPortEgressCosPolicy.setDescription('Sets the egress frame cos policy Setting this attribute is not supported in leos version 4') wwpLeosEtherPortEgressSpeed = MibTableColumn((1, 3, 6, 1, 4, 1, 6141, 2, 60, 2, 1, 1, 1, 1, 55), Gauge32()).setUnits('kbps').setMaxAccess("readonly") if mibBuilder.loadTexts: wwpLeosEtherPortEgressSpeed.setStatus('current') if mibBuilder.loadTexts: wwpLeosEtherPortEgressSpeed.setDescription("An estimate of the port's current egress bandwidth restriction in k-bits per second for given port. A value of 0 means there is no active restriction. This attribute not supported in leos version 6") wwpLeosEtherPortAdaptiveRateSpeed = MibTableColumn((1, 3, 6, 1, 4, 1, 6141, 2, 60, 2, 1, 1, 1, 1, 56), Gauge32()).setUnits('kbps').setMaxAccess("readonly") if mibBuilder.loadTexts: wwpLeosEtherPortAdaptiveRateSpeed.setStatus('current') if mibBuilder.loadTexts: wwpLeosEtherPortAdaptiveRateSpeed.setDescription("An estimate of the port's current adaptive-rate bandwidth restriction in k-bits per second for given port. A value of 0 means there is no active restriction. This attribute not supported in leos version 6") wwpLeosEtherPortMirrorEncap = MibTableColumn((1, 3, 6, 1, 4, 1, 6141, 2, 60, 2, 1, 1, 1, 1, 57), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 1))).clone(namedValues=NamedValues(("none", 0), ("vlanTag", 1))).clone('none')).setMaxAccess("readwrite") if mibBuilder.loadTexts: wwpLeosEtherPortMirrorEncap.setStatus('current') if mibBuilder.loadTexts: wwpLeosEtherPortMirrorEncap.setDescription('This object defines whether the port will encapsulate mirrored frames by adding a vlan-tag. (Or, in the case where a mirrored frame is already tagged, by adding a further vlan-tag to the frame) To allow mirrored traffic to be encapsulated, set this object to vlan-tag(1). If set to vlan-tag, then the values of wwpLeosEtherPortMirrorEncapVid and wwpLeosEtherPortMirrorEncapTpid will be used to populate tag added to each mirrored frame. Setting this object to none(0) indicates no tag is to be added to the mirrored frames.') wwpLeosEtherPortMirrorEncapVid = MibTableColumn((1, 3, 6, 1, 4, 1, 6141, 2, 60, 2, 1, 1, 1, 1, 58), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 24576)).clone(1)).setMaxAccess("readwrite") if mibBuilder.loadTexts: wwpLeosEtherPortMirrorEncapVid.setStatus('current') if mibBuilder.loadTexts: wwpLeosEtherPortMirrorEncapVid.setDescription('This object defines the VID that will be added to mirrored frames when the mirroring encapsulation mode is vlan-tag') wwpLeosEtherPortMirrorEncapTpid = MibTableColumn((1, 3, 6, 1, 4, 1, 6141, 2, 60, 2, 1, 1, 1, 1, 59), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3))).clone(namedValues=NamedValues(("tpid8100", 1), ("tpid9100", 2), ("tpid88A8", 3))).clone('tpid8100')).setMaxAccess("readwrite") if mibBuilder.loadTexts: wwpLeosEtherPortMirrorEncapTpid.setStatus('current') if mibBuilder.loadTexts: wwpLeosEtherPortMirrorEncapTpid.setDescription('This object defines the tpid used in the tag that is added to mirrored frames, when the mirroring encapsulation mode is vlan-tag') wwpLeosEtherPortIfgDecrease = MibTableColumn((1, 3, 6, 1, 4, 1, 6141, 2, 60, 2, 1, 1, 1, 1, 60), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 5))).setMaxAccess("readwrite") if mibBuilder.loadTexts: wwpLeosEtherPortIfgDecrease.setStatus('current') if mibBuilder.loadTexts: wwpLeosEtherPortIfgDecrease.setDescription('This object defines the number of bytes that will be subtracted from the minimum standard IFG of 12 bytes as defined in IEEE 802.3. SAOS 6.x only supports a value of 0 or 4.') wwpLeosEtherPortAdvertSpeed = MibTableColumn((1, 3, 6, 1, 4, 1, 6141, 2, 60, 2, 1, 1, 1, 1, 61), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4, 5))).clone(namedValues=NamedValues(("not-applicable", 1), ("ten", 2), ("hundred", 3), ("gigabit", 4), ("ten-hundred-gigabit", 5))).clone('ten-hundred-gigabit')).setMaxAccess("readwrite") if mibBuilder.loadTexts: wwpLeosEtherPortAdvertSpeed.setStatus('current') if mibBuilder.loadTexts: wwpLeosEtherPortAdvertSpeed.setDescription('This object defines the speed capabilities that will be advertised during the auto-negotiation process.') wwpLeosEtherPortAdvertDuplex = MibTableColumn((1, 3, 6, 1, 4, 1, 6141, 2, 60, 2, 1, 1, 1, 1, 62), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4))).clone(namedValues=NamedValues(("not-applicable", 1), ("half", 2), ("full", 3), ("half-full", 4))).clone('half-full')).setMaxAccess("readwrite") if mibBuilder.loadTexts: wwpLeosEtherPortAdvertDuplex.setStatus('current') if mibBuilder.loadTexts: wwpLeosEtherPortAdvertDuplex.setDescription('This object defines the duplex capabilities that will be advertised during the auto-negotiation process.') wwpLeosEtherPortFlushTable = MibTable((1, 3, 6, 1, 4, 1, 6141, 2, 60, 2, 1, 1, 2), ) if mibBuilder.loadTexts: wwpLeosEtherPortFlushTable.setStatus('current') if mibBuilder.loadTexts: wwpLeosEtherPortFlushTable.setDescription('Table of port flush entries.') wwpLeosEtherPortFlushEntry = MibTableRow((1, 3, 6, 1, 4, 1, 6141, 2, 60, 2, 1, 1, 2, 1), ).setIndexNames((0, "WWP-LEOS-PORT-MIB", "wwpLeosEtherPortId")) if mibBuilder.loadTexts: wwpLeosEtherPortFlushEntry.setStatus('current') if mibBuilder.loadTexts: wwpLeosEtherPortFlushEntry.setDescription('Broadcast containment port entry in the Ethernet Port Table.') wwpLeosEtherPortFlushActivate = MibTableColumn((1, 3, 6, 1, 4, 1, 6141, 2, 60, 2, 1, 1, 2, 1, 1), TruthValue().clone('false')).setMaxAccess("readwrite") if mibBuilder.loadTexts: wwpLeosEtherPortFlushActivate.setStatus('current') if mibBuilder.loadTexts: wwpLeosEtherPortFlushActivate.setDescription("Setting this object to 'true' will cause the Macs to be flushed for the port specified by wwpLeosEtherPortId.") wwpLeosEtherPortTrapsTable = MibTable((1, 3, 6, 1, 4, 1, 6141, 2, 60, 2, 1, 1, 3), ) if mibBuilder.loadTexts: wwpLeosEtherPortTrapsTable.setStatus('current') if mibBuilder.loadTexts: wwpLeosEtherPortTrapsTable.setDescription('Table of Ethernet Ports Traps.') wwpLeosEtherPortTrapsEntry = MibTableRow((1, 3, 6, 1, 4, 1, 6141, 2, 60, 2, 1, 1, 3, 1), ).setIndexNames((0, "WWP-LEOS-PORT-MIB", "wwpLeosEtherPortId")) if mibBuilder.loadTexts: wwpLeosEtherPortTrapsEntry.setStatus('current') if mibBuilder.loadTexts: wwpLeosEtherPortTrapsEntry.setDescription('Port Traps Entry in the Ethernet Port Trap Table.') wwpLeosEtherPortTrapsState = MibTableColumn((1, 3, 6, 1, 4, 1, 6141, 2, 60, 2, 1, 1, 3, 1, 1), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("disable", 1), ("enable", 2)))).setMaxAccess("readwrite") if mibBuilder.loadTexts: wwpLeosEtherPortTrapsState.setStatus('current') if mibBuilder.loadTexts: wwpLeosEtherPortTrapsState.setDescription('Setting this object will enable or disable all traps on given port.') wwpLeosEtherPortStateMirrorGroupTable = MibTable((1, 3, 6, 1, 4, 1, 6141, 2, 60, 2, 1, 1, 4), ) if mibBuilder.loadTexts: wwpLeosEtherPortStateMirrorGroupTable.setStatus('current') if mibBuilder.loadTexts: wwpLeosEtherPortStateMirrorGroupTable.setDescription('This table can be used to keep track of all the port state mirror groups. To create entry in this table along with indexes following mib objects must be set using multiple set operation wwpLeosEtherPortStateMirrorGroupName must be valid string. wwpLeosEtherPortStateMirrorGroupStatus must be set.') wwpLeosEtherPortStateMirrorGroupEntry = MibTableRow((1, 3, 6, 1, 4, 1, 6141, 2, 60, 2, 1, 1, 4, 1), ).setIndexNames((0, "WWP-LEOS-PORT-MIB", "wwpLeosEtherPortStateMirrorGroupId")) if mibBuilder.loadTexts: wwpLeosEtherPortStateMirrorGroupEntry.setStatus('current') if mibBuilder.loadTexts: wwpLeosEtherPortStateMirrorGroupEntry.setDescription('Each entry in this table will define the port state mirror group.') wwpLeosEtherPortStateMirrorGroupId = MibTableColumn((1, 3, 6, 1, 4, 1, 6141, 2, 60, 2, 1, 1, 4, 1, 1), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 65535))).setMaxAccess("readonly") if mibBuilder.loadTexts: wwpLeosEtherPortStateMirrorGroupId.setStatus('current') if mibBuilder.loadTexts: wwpLeosEtherPortStateMirrorGroupId.setDescription('This mib object is used as index in the table and is used to identify the unique group id.') wwpLeosEtherPortStateMirrorGroupName = MibTableColumn((1, 3, 6, 1, 4, 1, 6141, 2, 60, 2, 1, 1, 4, 1, 2), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(1, 15))).setMaxAccess("readcreate") if mibBuilder.loadTexts: wwpLeosEtherPortStateMirrorGroupName.setStatus('current') if mibBuilder.loadTexts: wwpLeosEtherPortStateMirrorGroupName.setDescription('This mib object is used to specify the name of the group.') wwpLeosEtherPortStateMirrorGroupOperStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 6141, 2, 60, 2, 1, 1, 4, 1, 3), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("disabled", 1), ("enabled", 2)))).setMaxAccess("readonly") if mibBuilder.loadTexts: wwpLeosEtherPortStateMirrorGroupOperStatus.setStatus('current') if mibBuilder.loadTexts: wwpLeosEtherPortStateMirrorGroupOperStatus.setDescription('This mib object is used to specify the operational status of the group.') wwpLeosEtherPortStateMirrorGroupNumSrcPorts = MibTableColumn((1, 3, 6, 1, 4, 1, 6141, 2, 60, 2, 1, 1, 4, 1, 4), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: wwpLeosEtherPortStateMirrorGroupNumSrcPorts.setStatus('current') if mibBuilder.loadTexts: wwpLeosEtherPortStateMirrorGroupNumSrcPorts.setDescription('This mib object is used to specify the total number of source ports that exists in the group.') wwpLeosEtherPortStateMirrorGroupNumDstPorts = MibTableColumn((1, 3, 6, 1, 4, 1, 6141, 2, 60, 2, 1, 1, 4, 1, 5), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: wwpLeosEtherPortStateMirrorGroupNumDstPorts.setStatus('current') if mibBuilder.loadTexts: wwpLeosEtherPortStateMirrorGroupNumDstPorts.setDescription('This mib object is used to specify the total number of destination ports that exists in the group.') wwpLeosEtherPortStateMirrorGroupStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 6141, 2, 60, 2, 1, 1, 4, 1, 6), RowStatus()).setMaxAccess("readcreate") if mibBuilder.loadTexts: wwpLeosEtherPortStateMirrorGroupStatus.setStatus('current') if mibBuilder.loadTexts: wwpLeosEtherPortStateMirrorGroupStatus.setDescription('Used to manage the creation and deletion of the conceptual rows in this table.') wwpLeosEtherPortStateMirrorGroupType = MibTableColumn((1, 3, 6, 1, 4, 1, 6141, 2, 60, 2, 1, 1, 4, 1, 7), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("unidirectional", 1), ("bidirectional", 2)))).setMaxAccess("readwrite") if mibBuilder.loadTexts: wwpLeosEtherPortStateMirrorGroupType.setStatus('current') if mibBuilder.loadTexts: wwpLeosEtherPortStateMirrorGroupType.setDescription("This mib object is used to specify the directional mode type for the port state mirror group. A uni-directional(1) mirror group type will only mirror the port state of the source port(s) to the destination port(s). The bi-directional(2) mirror group type will mirror state of either the source port(s) to the destination port(s) or the state of the destination port(s) will be mirrored to the source port(s). Where there are more than one source or destination ports the combined state of the source or destination group will be the combined 'OR'ed status of all the ports in either the source or destination groups. In other words, if one or more source ports is 'UP' then the source group is 'UP' and the mirrored destination state may be 'UP'. The default for this object type is uni-directional.") wwpLeosEtherPortStateMirrorGroupMemTable = MibTable((1, 3, 6, 1, 4, 1, 6141, 2, 60, 2, 1, 1, 5), ) if mibBuilder.loadTexts: wwpLeosEtherPortStateMirrorGroupMemTable.setStatus('current') if mibBuilder.loadTexts: wwpLeosEtherPortStateMirrorGroupMemTable.setDescription('This table is used to keep track of port group membership.') wwpLeosEtherPortStateMirrorGroupMemEntry = MibTableRow((1, 3, 6, 1, 4, 1, 6141, 2, 60, 2, 1, 1, 5, 1), ).setIndexNames((0, "WWP-LEOS-PORT-MIB", "wwpLeosEtherPortStateMirrorGroupId"), (0, "WWP-LEOS-PORT-MIB", "wwpLeosEtherPortId")) if mibBuilder.loadTexts: wwpLeosEtherPortStateMirrorGroupMemEntry.setStatus('current') if mibBuilder.loadTexts: wwpLeosEtherPortStateMirrorGroupMemEntry.setDescription('Each entry in this table is used to represent the membership of port to a given group and group type.') wwpLeosEtherPortStateMirrorGroupMemType = MibTableColumn((1, 3, 6, 1, 4, 1, 6141, 2, 60, 2, 1, 1, 5, 1, 1), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("srcPort", 1), ("dstPort", 2))).clone('srcPort')).setMaxAccess("readcreate") if mibBuilder.loadTexts: wwpLeosEtherPortStateMirrorGroupMemType.setStatus('current') if mibBuilder.loadTexts: wwpLeosEtherPortStateMirrorGroupMemType.setDescription('Setting this object will specify the type of group this port is member of for a given port state mirror group. This object can only be set while creating the entry. This object cannot be modified once entry is created.') wwpLeosEtherPortStateMirrorGroupMemOperState = MibTableColumn((1, 3, 6, 1, 4, 1, 6141, 2, 60, 2, 1, 1, 5, 1, 2), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("disabled", 1), ("enabled", 2)))).setMaxAccess("readonly") if mibBuilder.loadTexts: wwpLeosEtherPortStateMirrorGroupMemOperState.setStatus('current') if mibBuilder.loadTexts: wwpLeosEtherPortStateMirrorGroupMemOperState.setDescription('This mib object is used to specify the operational status of the port.') wwpLeosEtherPortStateMirrorGroupMemStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 6141, 2, 60, 2, 1, 1, 5, 1, 3), RowStatus()).setMaxAccess("readcreate") if mibBuilder.loadTexts: wwpLeosEtherPortStateMirrorGroupMemStatus.setStatus('current') if mibBuilder.loadTexts: wwpLeosEtherPortStateMirrorGroupMemStatus.setDescription('Used to manage the creation and deletion of the conceptual rows in this table.') wwpLeosEtherStndLinkUpDownTrapsEnable = MibScalar((1, 3, 6, 1, 4, 1, 6141, 2, 60, 2, 1, 2, 1), TruthValue().clone('true')).setMaxAccess("readwrite") if mibBuilder.loadTexts: wwpLeosEtherStndLinkUpDownTrapsEnable.setStatus('current') if mibBuilder.loadTexts: wwpLeosEtherStndLinkUpDownTrapsEnable.setDescription("Setting this object to 'false(2)' will cause standard Link Up Down Traps to be suppressed.") wwpLeosEtherPortLinkUpDownTrapsEnable = MibScalar((1, 3, 6, 1, 4, 1, 6141, 2, 60, 2, 1, 2, 2), TruthValue().clone('false')).setMaxAccess("readwrite") if mibBuilder.loadTexts: wwpLeosEtherPortLinkUpDownTrapsEnable.setStatus('current') if mibBuilder.loadTexts: wwpLeosEtherPortLinkUpDownTrapsEnable.setDescription("Setting this object to 'true(1)' will cause wwp specific port up down trap to be generated.") wwpLeosEtherAggPortLinkUpDownTrapsEnable = MibScalar((1, 3, 6, 1, 4, 1, 6141, 2, 60, 2, 1, 2, 3), TruthValue().clone('false')).setMaxAccess("readwrite") if mibBuilder.loadTexts: wwpLeosEtherAggPortLinkUpDownTrapsEnable.setStatus('current') if mibBuilder.loadTexts: wwpLeosEtherAggPortLinkUpDownTrapsEnable.setDescription("Setting this object to 'true(1)' will cause wwp specific agg port up down trap to be generated for a link state change on a physical port that is a member of a agg.") wwpLeosEthLinkUp = NotificationType((1, 3, 6, 1, 4, 1, 6141, 2, 60, 2, 2, 0, 3)).setObjects(("SNMPv2-MIB", "sysName"), ("SNMPv2-MIB", "sysLocation"), ("WWP-LEOS-PORT-MIB", "wwpLeosEtherPortId"), ("WWP-LEOS-PORT-MIB", "wwpLeosEtherPortName"), ("WWP-LEOS-PORT-MIB", "wwpLeosEtherPortType"), ("WWP-LEOS-PORT-MIB", "wwpLeosEtherPortAdminStatus"), ("WWP-LEOS-PORT-MIB", "wwpLeosEtherPortOperStatus"), ("WWP-LEOS-PORT-MIB", "wwpLeosEtherPortDesc")) if mibBuilder.loadTexts: wwpLeosEthLinkUp.setStatus('current') if mibBuilder.loadTexts: wwpLeosEthLinkUp.setDescription('A wwpLeosEthLinkUp trap signifies that the SNMP entity, acting in an agent role, has detected that the ifOperStatus object for one of its communication links has entered the up state.') wwpLeosEthLinkDown = NotificationType((1, 3, 6, 1, 4, 1, 6141, 2, 60, 2, 2, 0, 4)).setObjects(("SNMPv2-MIB", "sysName"), ("SNMPv2-MIB", "sysLocation"), ("WWP-LEOS-PORT-MIB", "wwpLeosEtherPortId"), ("WWP-LEOS-PORT-MIB", "wwpLeosEtherPortType"), ("WWP-LEOS-PORT-MIB", "wwpLeosEtherPortName"), ("WWP-LEOS-PORT-MIB", "wwpLeosEtherPortAdminStatus"), ("WWP-LEOS-PORT-MIB", "wwpLeosEtherPortOperStatus"), ("WWP-LEOS-PORT-MIB", "wwpLeosEtherPortDesc")) if mibBuilder.loadTexts: wwpLeosEthLinkDown.setStatus('current') if mibBuilder.loadTexts: wwpLeosEthLinkDown.setDescription('A wwpLeosEthLinkDown trap signifies that the SNMP entity, acting in an agent role, has detected that the ifOperStatus object for one of its communication links has entered the down state.') wwpLeosEthAdminSpeedIncompatible = NotificationType((1, 3, 6, 1, 4, 1, 6141, 2, 60, 2, 2, 0, 5)).setObjects(("WWP-LEOS-PORT-MIB", "wwpLeosEtherPortId")) if mibBuilder.loadTexts: wwpLeosEthAdminSpeedIncompatible.setStatus('current') if mibBuilder.loadTexts: wwpLeosEthAdminSpeedIncompatible.setDescription("A wwpLeosEthAdminSpeedIncompatible trap is generated when the port administrative speed doesn't match the speed of the SFP transceiver installed.") wwpLeosEthLinkFlap = NotificationType((1, 3, 6, 1, 4, 1, 6141, 2, 60, 2, 2, 0, 6)).setObjects(("SNMPv2-MIB", "sysName"), ("SNMPv2-MIB", "sysLocation"), ("WWP-LEOS-PORT-MIB", "wwpLeosEtherPortId"), ("WWP-LEOS-PORT-MIB", "wwpLeosEtherPortType"), ("WWP-LEOS-PORT-MIB", "wwpLeosEtherPortName"), ("WWP-LEOS-PORT-MIB", "wwpLeosEtherPortOperStatus"), ("WWP-LEOS-PORT-MIB", "wwpLeosEtherPortDesc"), ("WWP-LEOS-PORT-MIB", "wwpLeosEtherPortLinkFlapHoldTime")) if mibBuilder.loadTexts: wwpLeosEthLinkFlap.setStatus('current') if mibBuilder.loadTexts: wwpLeosEthLinkFlap.setDescription('A wwpLeosEthLinkFlap trap signifies that the SNMP entity, acting in an agent role, has detected that the ifOperStatus object for one of its communication links has been changed due to link flap detection.') wwpLeosAggLinkUpDown = NotificationType((1, 3, 6, 1, 4, 1, 6141, 2, 60, 2, 2, 0, 7)).setObjects(("SNMPv2-MIB", "sysName"), ("SNMPv2-MIB", "sysLocation"), ("WWP-LEOS-PORT-MIB", "wwpLeosEtherPortId"), ("WWP-LEOS-PORT-MIB", "wwpLeosEtherPortName"), ("WWP-LEOS-PORT-MIB", "wwpLeosEtherPortDesc"), ("WWP-LEOS-PORT-MIB", "wwpLeosEtherPortType"), ("WWP-LEOS-PORT-MIB", "wwpLeosEtherPortAdminStatus"), ("WWP-LEOS-PORT-MIB", "wwpLeosEtherPortOperStatus"), ("IEEE8023-LAG-MIB", "dot3adAggPortActorAdminKey"), ("IEEE8023-LAG-MIB", "dot3adAggPortListPorts"), ("WWP-LEOS-PORT-MIB", "wwpLeosEtherPortName"), ("WWP-LEOS-PORT-MIB", "wwpLeosEtherPortDesc")) if mibBuilder.loadTexts: wwpLeosAggLinkUpDown.setStatus('current') if mibBuilder.loadTexts: wwpLeosAggLinkUpDown.setDescription('A wwpLeosAggLinkUpDown trap signifies that the SNMP entity, acting in an agent role, has detected that the ifOperStatus object for one of its communication links has changed state.') mibBuilder.exportSymbols("WWP-LEOS-PORT-MIB", wwpLeosEthLinkDown=wwpLeosEthLinkDown, wwpLeosEtherPortUntagCtrlVsi=wwpLeosEtherPortUntagCtrlVsi, wwpLeosEtherPortOperFlowCtrl=wwpLeosEtherPortOperFlowCtrl, wwpLeosEtherPortUntagDataVid=wwpLeosEtherPortUntagDataVid, wwpLeosEtherPortStateMirrorGroupMemStatus=wwpLeosEtherPortStateMirrorGroupMemStatus, wwpLeosEtherPortUntaggedPriority=wwpLeosEtherPortUntaggedPriority, wwpLeosEtherPortEntry=wwpLeosEtherPortEntry, wwpLeosEtherFixedRcos=wwpLeosEtherFixedRcos, wwpLeosEtherPortAdvertSpeed=wwpLeosEtherPortAdvertSpeed, wwpLeosEtherUntagEgressVlanId=wwpLeosEtherUntagEgressVlanId, wwpLeosEtherPortStateMirrorGroupType=wwpLeosEtherPortStateMirrorGroupType, wwpLeosEtherPortLinkFlapDetection=wwpLeosEtherPortLinkFlapDetection, wwpLeosEtherPortAdminStatus=wwpLeosEtherPortAdminStatus, PortEgressFrameCosPolicy=PortEgressFrameCosPolicy, wwpLeosEtherPortAcceptableFrameTypes=wwpLeosEtherPortAcceptableFrameTypes, wwpLeosPortMIBGroups=wwpLeosPortMIBGroups, wwpLeosEtherPortType=wwpLeosEtherPortType, wwpLeosEthLinkUp=wwpLeosEthLinkUp, wwpLeosEtherPortMirrorEgress=wwpLeosEtherPortMirrorEgress, wwpLeosEtherPortVsIngressFiltering=wwpLeosEtherPortVsIngressFiltering, wwpLeosEtherPortAdminAdvertisedFlowCtrl=wwpLeosEtherPortAdminAdvertisedFlowCtrl, wwpLeosEtherPortDesc=wwpLeosEtherPortDesc, wwpLeosEtherPortResolvedCosMapId=wwpLeosEtherPortResolvedCosMapId, wwpLeosEtherPortEgressPortQueueMapId=wwpLeosEtherPortEgressPortQueueMapId, wwpLeosEtherPortStateMirrorGroupMemOperState=wwpLeosEtherPortStateMirrorGroupMemOperState, wwpLeosEtherPortResolvedCosPolicy=wwpLeosEtherPortResolvedCosPolicy, wwpLeosPortMIBCompliances=wwpLeosPortMIBCompliances, wwpLeosEtherPortL2TransformMode=wwpLeosEtherPortL2TransformMode, wwpLeosEtherPortVlanIngressFiltering=wwpLeosEtherPortVlanIngressFiltering, wwpLeosPortMIBNotificationPrefix=wwpLeosPortMIBNotificationPrefix, wwpLeosEtherPortPhysAddr=wwpLeosEtherPortPhysAddr, wwpLeosEtherPortAutoNeg=wwpLeosEtherPortAutoNeg, wwpLeosEtherPortStateMirrorGroupMemTable=wwpLeosEtherPortStateMirrorGroupMemTable, wwpLeosEtherPortFlushActivate=wwpLeosEtherPortFlushActivate, wwpLeosEtherPortOperDuplex=wwpLeosEtherPortOperDuplex, wwpLeosEtherPort=wwpLeosEtherPort, wwpLeosEtherPortStateMirrorGroupNumSrcPorts=wwpLeosEtherPortStateMirrorGroupNumSrcPorts, wwpLeosEtherPortFlushTable=wwpLeosEtherPortFlushTable, wwpLeosEtherPortStateMirrorGroupStatus=wwpLeosEtherPortStateMirrorGroupStatus, wwpLeosEthAdminSpeedIncompatible=wwpLeosEthAdminSpeedIncompatible, wwpLeosEtherPortNotif=wwpLeosEtherPortNotif, wwpLeosEtherPortStateMirrorGroupMemEntry=wwpLeosEtherPortStateMirrorGroupMemEntry, wwpLeosEtherPortAdminFlowCtrl=wwpLeosEtherPortAdminFlowCtrl, wwpLeosEtherPortUntagCtrlVsiType=wwpLeosEtherPortUntagCtrlVsiType, wwpLeosEtherPortStateMirrorGroupMemType=wwpLeosEtherPortStateMirrorGroupMemType, wwpLeosEtherPortResolvedCosRemarkL2=wwpLeosEtherPortResolvedCosRemarkL2, wwpLeosEtherPortStateMirrorGroupName=wwpLeosEtherPortStateMirrorGroupName, wwpLeosPortMIB=wwpLeosPortMIB, wwpLeosEtherPortLinkUpDownTrapsEnable=wwpLeosEtherPortLinkUpDownTrapsEnable, wwpLeosEtherIngressPvid=wwpLeosEtherIngressPvid, wwpLeosPortMIBConformance=wwpLeosPortMIBConformance, wwpLeosEtherPortMirrorEncapTpid=wwpLeosEtherPortMirrorEncapTpid, wwpLeosEtherPortMirrorIngress=wwpLeosEtherPortMirrorIngress, wwpLeosEtherPortAdaptiveRateSpeed=wwpLeosEtherPortAdaptiveRateSpeed, wwpLeosEtherPortLinkFlapDetectTime=wwpLeosEtherPortLinkFlapDetectTime, wwpLeosEtherPortTrapsTable=wwpLeosEtherPortTrapsTable, wwpLeosEtherPortMirrorEncap=wwpLeosEtherPortMirrorEncap, wwpLeosEtherPortMacSaDaSwapVlan=wwpLeosEtherPortMacSaDaSwapVlan, wwpLeosEtherPortTrapsEntry=wwpLeosEtherPortTrapsEntry, wwpLeosEtherPortIngressFixedDot1dPri=wwpLeosEtherPortIngressFixedDot1dPri, wwpLeosEtherPortMirrorPort=wwpLeosEtherPortMirrorPort, wwpLeosPortMIBNotifications=wwpLeosPortMIBNotifications, wwpLeosEtherFixedRColor=wwpLeosEtherFixedRColor, wwpLeosEtherPortVplsPortType=wwpLeosEtherPortVplsPortType, wwpLeosEtherPortIngressCosPolicy=wwpLeosEtherPortIngressCosPolicy, wwpLeosEtherPortStateMirrorGroupTable=wwpLeosEtherPortStateMirrorGroupTable, wwpLeosEtherPortMode=wwpLeosEtherPortMode, wwpLeosEtherPortOperationalSpeed=wwpLeosEtherPortOperationalSpeed, wwpLeosEtherPortName=wwpLeosEtherPortName, wwpLeosEtherPortOperSpeed=wwpLeosEtherPortOperSpeed, wwpLeosEtherPortStateMirrorGroupOperStatus=wwpLeosEtherPortStateMirrorGroupOperStatus, wwpLeosEtherPortOperAutoNeg=wwpLeosEtherPortOperAutoNeg, wwpLeosAggLinkUpDown=wwpLeosAggLinkUpDown, wwpLeosPortMIBObjects=wwpLeosPortMIBObjects, wwpLeosEtherPortStateMirrorGroupEntry=wwpLeosEtherPortStateMirrorGroupEntry, PortIngressFixedColor=PortIngressFixedColor, wwpLeosEtherPortId=wwpLeosEtherPortId, wwpLeosEtherPortVlanIngressFilterStrict=wwpLeosEtherPortVlanIngressFilterStrict, wwpLeosEtherPortStateMirrorGroupId=wwpLeosEtherPortStateMirrorGroupId, wwpLeosEtherPortIfgDecrease=wwpLeosEtherPortIfgDecrease, wwpLeosEtherPortUpTime=wwpLeosEtherPortUpTime, wwpLeosEtherPortMirrorEncapVid=wwpLeosEtherPortMirrorEncapVid, wwpLeosEtherPortUntagDataVsi=wwpLeosEtherPortUntagDataVsi, wwpLeosEtherPortFrameCosMapId=wwpLeosEtherPortFrameCosMapId, wwpLeosEtherPortLinkFlapCount=wwpLeosEtherPortLinkFlapCount, wwpLeosEtherStndLinkUpDownTrapsEnable=wwpLeosEtherStndLinkUpDownTrapsEnable, wwpLeosEtherPortOperStatus=wwpLeosEtherPortOperStatus, wwpLeosEtherPortAdvertDuplex=wwpLeosEtherPortAdvertDuplex, wwpLeosEtherPortStateMirrorGroupNumDstPorts=wwpLeosEtherPortStateMirrorGroupNumDstPorts, PortList=PortList, wwpLeosEtherPortTrapsState=wwpLeosEtherPortTrapsState, wwpLeosEtherPortMaxFrameSize=wwpLeosEtherPortMaxFrameSize, wwpLeosEtherPortPhyLoopback=wwpLeosEtherPortPhyLoopback, wwpLeosEtherPortUntagDataVsiType=wwpLeosEtherPortUntagDataVsiType, wwpLeosEtherPortFlushEntry=wwpLeosEtherPortFlushEntry, wwpLeosEtherPortLinkFlapHoldTime=wwpLeosEtherPortLinkFlapHoldTime, PYSNMP_MODULE_ID=wwpLeosPortMIB, wwpLeosEtherPortEgressSpeed=wwpLeosEtherPortEgressSpeed, wwpLeosEthLinkFlap=wwpLeosEthLinkFlap, wwpLeosEtherPortTable=wwpLeosEtherPortTable, wwpLeosEtherAggPortLinkUpDownTrapsEnable=wwpLeosEtherAggPortLinkUpDownTrapsEnable, wwpLeosEtherPortMacSaDaSwap=wwpLeosEtherPortMacSaDaSwap, wwpLeosEtherPortEgressCosPolicy=wwpLeosEtherPortEgressCosPolicy, wwpLeosEtherPortAdminSpeed=wwpLeosEtherPortAdminSpeed, wwpLeosEtherPortAdminDuplex=wwpLeosEtherPortAdminDuplex)
(integer, object_identifier, octet_string) = mibBuilder.importSymbols('ASN1', 'Integer', 'ObjectIdentifier', 'OctetString') (named_values,) = mibBuilder.importSymbols('ASN1-ENUMERATION', 'NamedValues') (constraints_intersection, value_range_constraint, constraints_union, single_value_constraint, value_size_constraint) = mibBuilder.importSymbols('ASN1-REFINEMENT', 'ConstraintsIntersection', 'ValueRangeConstraint', 'ConstraintsUnion', 'SingleValueConstraint', 'ValueSizeConstraint') (dot3ad_agg_port_list_ports, dot3ad_agg_port_actor_admin_key) = mibBuilder.importSymbols('IEEE8023-LAG-MIB', 'dot3adAggPortListPorts', 'dot3adAggPortActorAdminKey') (notification_group, module_compliance) = mibBuilder.importSymbols('SNMPv2-CONF', 'NotificationGroup', 'ModuleCompliance') (sys_name, sys_location) = mibBuilder.importSymbols('SNMPv2-MIB', 'sysName', 'sysLocation') (object_identity, ip_address, unsigned32, mib_identifier, bits, module_identity, counter64, time_ticks, counter32, iso, gauge32, integer32, notification_type, mib_scalar, mib_table, mib_table_row, mib_table_column) = mibBuilder.importSymbols('SNMPv2-SMI', 'ObjectIdentity', 'IpAddress', 'Unsigned32', 'MibIdentifier', 'Bits', 'ModuleIdentity', 'Counter64', 'TimeTicks', 'Counter32', 'iso', 'Gauge32', 'Integer32', 'NotificationType', 'MibScalar', 'MibTable', 'MibTableRow', 'MibTableColumn') (row_status, truth_value, mac_address, display_string, textual_convention) = mibBuilder.importSymbols('SNMPv2-TC', 'RowStatus', 'TruthValue', 'MacAddress', 'DisplayString', 'TextualConvention') (wwp_modules_leos, wwp_modules) = mibBuilder.importSymbols('WWP-SMI', 'wwpModulesLeos', 'wwpModules') wwp_leos_port_mib = module_identity((1, 3, 6, 1, 4, 1, 6141, 2, 60, 2)) wwpLeosPortMIB.setRevisions(('2012-05-25 00:00', '2011-02-02 00:00', '2010-11-01 00:00', '2010-07-28 00:00', '2010-05-05 17:00', '2008-11-14 00:00', '2008-07-21 00:00', '2007-08-11 00:00', '2007-06-20 00:00', '2006-05-26 00:00', '2006-05-18 00:00', '2006-03-15 00:00', '2005-07-28 00:00', '2004-04-18 17:00')) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): if mibBuilder.loadTexts: wwpLeosPortMIB.setRevisionsDescriptions(('Added wwpLeosEtherPortAdvertSpeed and wwpLeosEtherPortAdvertDuplex to WwpLeosEtherPortEntry MIB object', 'Added admitOnlyUntagged to wwpLeosEtherPortAcceptableFrameTypes MIB object', 'Added wwpLeosEtherPortEgressCosPolicy', 'Added wwpLeosEtherFixedRColor and wwpLeosEtherPortFrameCosMapId mib objects', 'Added changed length of wwpLeosPortDescr from 32 to 128.', 'Added wwpLeosEtherPortEgressPortQueueMapId to wwpLeosEtherPortEntryTable. Added 10 gig option to wwpLeosEtherInterfaceType, wwpLeosEtherAdminSpeed and wwpLeosEtherOperSpeed', 'Added wwpLeosEtherPortResolvedCosPolicy,wwpLeosEtherPortMode and wwpLeosEtherFixedRcos mib objects', 'Added new mib object wwpLeosEtherPortStateMirrorGroupType.', 'Added new mib object wwpLeosEtherPortUntagDataVid.', 'Added new mib object wwpLeosEtherPortOperAutoNeg.', 'Added new mib object wwpLeosEtherPortStateMirrorGroupOperStatus. Added new mib object wwpLeosEtherPortStateMirrorGroupNumSrcPorts. Added new mib object wwpLeosEtherPortStateMirrorGroupNumDstPorts. Added new mib object wwpLeosEtherPortStateMirrorGroupMemOperState.', 'This MIB module is for the Extension of the dot1dBasePortTable for WWP Products', 'Added eumeration to wwpLeosEtherPortAdminSpeed.', 'Added new tables to support port state mirroring feature.')) if mibBuilder.loadTexts: wwpLeosPortMIB.setLastUpdated('201205250000Z') if mibBuilder.loadTexts: wwpLeosPortMIB.setOrganization('Ciena, Inc') if mibBuilder.loadTexts: wwpLeosPortMIB.setContactInfo('Mib Meister 115 North Sullivan Road Spokane Valley, WA 99037 USA Phone: +1 509 242 9000 Email: support@ciena.com') if mibBuilder.loadTexts: wwpLeosPortMIB.setDescription('This MIB defines the managed objects for Ethernet ports.') class Portlist(TextualConvention, OctetString): description = "Each octet within this value specifies a set of eight ports, with the first octet specifying ports 1 through 8, the second octet specifying ports 9 through 16, etc. Within each octet, the most significant bit represents the lowest numbered port, and the least significant bit represents the highest numbered port. Thus, each port of the bridge is represented by a single bit within the value of this object. If that bit has a value of '1' then that port is included in the set of ports; the port is not included if its bit has a value of '0'." status = 'current' subtype_spec = OctetString.subtypeSpec + value_size_constraint(0, 255) class Portegressframecospolicy(TextualConvention, Integer32): description = 'Egress cos policy to use on this port ignore means leave egress map disabled' status = 'current' subtype_spec = Integer32.subtypeSpec + constraints_union(single_value_constraint(1, 2)) named_values = named_values(('ingore', 1), ('rcosToL2OuterPcpMap', 2)) class Portingressfixedcolor(TextualConvention, Integer32): description = 'Egress cos policy to use on this port ignore means leave egress map disabled' status = 'current' subtype_spec = Integer32.subtypeSpec + constraints_union(single_value_constraint(1, 2)) named_values = named_values(('green', 1), ('yellow', 2)) wwp_leos_port_mib_objects = mib_identifier((1, 3, 6, 1, 4, 1, 6141, 2, 60, 2, 1)) wwp_leos_ether_port = mib_identifier((1, 3, 6, 1, 4, 1, 6141, 2, 60, 2, 1, 1)) wwp_leos_ether_port_notif = mib_identifier((1, 3, 6, 1, 4, 1, 6141, 2, 60, 2, 1, 2)) wwp_leos_port_mib_notification_prefix = mib_identifier((1, 3, 6, 1, 4, 1, 6141, 2, 60, 2, 2)) wwp_leos_port_mib_notifications = mib_identifier((1, 3, 6, 1, 4, 1, 6141, 2, 60, 2, 2, 0)) wwp_leos_port_mib_conformance = mib_identifier((1, 3, 6, 1, 4, 1, 6141, 2, 60, 2, 3)) wwp_leos_port_mib_compliances = mib_identifier((1, 3, 6, 1, 4, 1, 6141, 2, 60, 2, 3, 1)) wwp_leos_port_mib_groups = mib_identifier((1, 3, 6, 1, 4, 1, 6141, 2, 60, 2, 3, 2)) wwp_leos_ether_port_table = mib_table((1, 3, 6, 1, 4, 1, 6141, 2, 60, 2, 1, 1, 1)) if mibBuilder.loadTexts: wwpLeosEtherPortTable.setStatus('current') if mibBuilder.loadTexts: wwpLeosEtherPortTable.setDescription('Table of Ethernet Ports.') wwp_leos_ether_port_entry = mib_table_row((1, 3, 6, 1, 4, 1, 6141, 2, 60, 2, 1, 1, 1, 1)).setIndexNames((0, 'WWP-LEOS-PORT-MIB', 'wwpLeosEtherPortId')) if mibBuilder.loadTexts: wwpLeosEtherPortEntry.setStatus('current') if mibBuilder.loadTexts: wwpLeosEtherPortEntry.setDescription('Port Entry in the Ethernet Port Table.') wwp_leos_ether_port_id = mib_table_column((1, 3, 6, 1, 4, 1, 6141, 2, 60, 2, 1, 1, 1, 1, 1), integer32().subtype(subtypeSpec=value_range_constraint(1, 65535))).setMaxAccess('readonly') if mibBuilder.loadTexts: wwpLeosEtherPortId.setStatus('current') if mibBuilder.loadTexts: wwpLeosEtherPortId.setDescription("Port ID for the instance. Port ID's start at 1, and may not be consecutive for each additional port. This port Id should refer to the dot1dBasePort in the Dot1dBasePortEntry.") wwp_leos_ether_port_name = mib_table_column((1, 3, 6, 1, 4, 1, 6141, 2, 60, 2, 1, 1, 1, 1, 2), display_string().subtype(subtypeSpec=value_size_constraint(0, 8))).setMaxAccess('readonly') if mibBuilder.loadTexts: wwpLeosEtherPortName.setStatus('current') if mibBuilder.loadTexts: wwpLeosEtherPortName.setDescription('A textual string containing information about the port. This string should indicate about the physical location of the port as well.') wwp_leos_ether_port_desc = mib_table_column((1, 3, 6, 1, 4, 1, 6141, 2, 60, 2, 1, 1, 1, 1, 3), display_string().subtype(subtypeSpec=value_size_constraint(0, 128))).setMaxAccess('readwrite') if mibBuilder.loadTexts: wwpLeosEtherPortDesc.setStatus('current') if mibBuilder.loadTexts: wwpLeosEtherPortDesc.setDescription('A textual string containing port description.') wwp_leos_ether_port_type = mib_table_column((1, 3, 6, 1, 4, 1, 6141, 2, 60, 2, 1, 1, 1, 1, 4), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3, 4, 5, 6, 7, 8, 9, 10))).clone(namedValues=named_values(('ethernet', 1), ('fastEthernet', 2), ('hundredFx', 3), ('gigEthernet', 4), ('lagPort', 5), ('unknown', 6), ('gigHundredFx', 7), ('tripleSpeed', 8), ('tenGigEthernet', 9), ('gigTenGigEthernet', 10)))).setMaxAccess('readonly') if mibBuilder.loadTexts: wwpLeosEtherPortType.setStatus('current') if mibBuilder.loadTexts: wwpLeosEtherPortType.setDescription('The port type for the port.') wwp_leos_ether_port_phys_addr = mib_table_column((1, 3, 6, 1, 4, 1, 6141, 2, 60, 2, 1, 1, 1, 1, 5), mac_address()).setMaxAccess('readonly') if mibBuilder.loadTexts: wwpLeosEtherPortPhysAddr.setStatus('current') if mibBuilder.loadTexts: wwpLeosEtherPortPhysAddr.setDescription('The ethernet MAC address for the port. This information can also be achieved via dot1dTpFdbTable') wwp_leos_ether_port_auto_neg = mib_table_column((1, 3, 6, 1, 4, 1, 6141, 2, 60, 2, 1, 1, 1, 1, 6), truth_value()).setMaxAccess('readwrite') if mibBuilder.loadTexts: wwpLeosEtherPortAutoNeg.setStatus('current') if mibBuilder.loadTexts: wwpLeosEtherPortAutoNeg.setDescription('The object sets the port to AUTO NEG MOde and vice versa. Specific platforms may have requirements of configuring speed before moving the port to out of AUTO-NEG mode.') wwp_leos_ether_port_admin_status = mib_table_column((1, 3, 6, 1, 4, 1, 6141, 2, 60, 2, 1, 1, 1, 1, 7), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2))).clone(namedValues=named_values(('up', 1), ('down', 2)))).setMaxAccess('readwrite') if mibBuilder.loadTexts: wwpLeosEtherPortAdminStatus.setStatus('current') if mibBuilder.loadTexts: wwpLeosEtherPortAdminStatus.setDescription('The desired state of the port.') wwp_leos_ether_port_oper_status = mib_table_column((1, 3, 6, 1, 4, 1, 6141, 2, 60, 2, 1, 1, 1, 1, 8), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3, 4, 5, 6))).clone(namedValues=named_values(('up', 1), ('down', 2), ('notauth', 3), ('lbtx', 4), ('lbrx', 5), ('linkflap', 6)))).setMaxAccess('readonly') if mibBuilder.loadTexts: wwpLeosEtherPortOperStatus.setStatus('current') if mibBuilder.loadTexts: wwpLeosEtherPortOperStatus.setDescription('The current operational state of Port.') wwp_leos_ether_port_admin_speed = mib_table_column((1, 3, 6, 1, 4, 1, 6141, 2, 60, 2, 1, 1, 1, 1, 9), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3, 4, 5))).clone(namedValues=named_values(('tenMb', 1), ('hundredMb', 2), ('gig', 3), ('auto', 4), ('tenGig', 5)))).setMaxAccess('readwrite') if mibBuilder.loadTexts: wwpLeosEtherPortAdminSpeed.setStatus('current') if mibBuilder.loadTexts: wwpLeosEtherPortAdminSpeed.setDescription('Desired speed of the port. Set the port speed to be either 10MB, 100MB, or gig. Set the port speed to auto to enable automatic port speed detection. The default value for this object depends upon the platform.') wwp_leos_ether_port_oper_speed = mib_table_column((1, 3, 6, 1, 4, 1, 6141, 2, 60, 2, 1, 1, 1, 1, 10), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(0, 1, 2, 3, 4))).clone(namedValues=named_values(('unknown', 0), ('tenMb', 1), ('hundredMb', 2), ('gig', 3), ('tenGig', 4)))).setMaxAccess('readonly') if mibBuilder.loadTexts: wwpLeosEtherPortOperSpeed.setStatus('deprecated') if mibBuilder.loadTexts: wwpLeosEtherPortOperSpeed.setDescription('The current operational speed of the port.') wwp_leos_ether_port_admin_duplex = mib_table_column((1, 3, 6, 1, 4, 1, 6141, 2, 60, 2, 1, 1, 1, 1, 11), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2))).clone(namedValues=named_values(('half', 1), ('full', 2)))).setMaxAccess('readwrite') if mibBuilder.loadTexts: wwpLeosEtherPortAdminDuplex.setStatus('current') if mibBuilder.loadTexts: wwpLeosEtherPortAdminDuplex.setDescription('The desired mode for the port. It can be set to either half or full duplex operation. The default value for this object depends upon the platform.') wwp_leos_ether_port_oper_duplex = mib_table_column((1, 3, 6, 1, 4, 1, 6141, 2, 60, 2, 1, 1, 1, 1, 12), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2))).clone(namedValues=named_values(('half', 1), ('full', 2)))).setMaxAccess('readonly') if mibBuilder.loadTexts: wwpLeosEtherPortOperDuplex.setStatus('current') if mibBuilder.loadTexts: wwpLeosEtherPortOperDuplex.setDescription('The current duplex mode of the port.') wwp_leos_ether_port_admin_flow_ctrl = mib_table_column((1, 3, 6, 1, 4, 1, 6141, 2, 60, 2, 1, 1, 1, 1, 13), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3, 4, 5))).clone(namedValues=named_values(('unknown', 1), ('off', 2), ('asymTx', 3), ('asymRx', 4), ('sym', 5)))).setMaxAccess('readwrite') if mibBuilder.loadTexts: wwpLeosEtherPortAdminFlowCtrl.setStatus('current') if mibBuilder.loadTexts: wwpLeosEtherPortAdminFlowCtrl.setDescription('Configures the ports flow control operation.') wwp_leos_ether_port_oper_flow_ctrl = mib_table_column((1, 3, 6, 1, 4, 1, 6141, 2, 60, 2, 1, 1, 1, 1, 14), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3, 4, 5))).clone(namedValues=named_values(('unknown', 1), ('off', 2), ('asymTx', 3), ('asymRx', 4), ('sym', 5)))).setMaxAccess('readonly') if mibBuilder.loadTexts: wwpLeosEtherPortOperFlowCtrl.setStatus('current') if mibBuilder.loadTexts: wwpLeosEtherPortOperFlowCtrl.setDescription('Shows ports flow control configuration.') wwp_leos_ether_ingress_pvid = mib_table_column((1, 3, 6, 1, 4, 1, 6141, 2, 60, 2, 1, 1, 1, 1, 15), integer32().subtype(subtypeSpec=value_range_constraint(1, 24576)).clone(1)).setMaxAccess('readwrite') if mibBuilder.loadTexts: wwpLeosEtherIngressPvid.setReference('IEEE 802.1Q/D11 Section 12.10.1.1') if mibBuilder.loadTexts: wwpLeosEtherIngressPvid.setStatus('current') if mibBuilder.loadTexts: wwpLeosEtherIngressPvid.setDescription('The Ingress PVID, the VLAN ID associated with untagged frames ingressing the port or if tunnel is enabled on this port. The max value for this object is platform dependent. Refer to architecture document for details of platform dependency.') wwp_leos_ether_untag_egress_vlan_id = mib_table_column((1, 3, 6, 1, 4, 1, 6141, 2, 60, 2, 1, 1, 1, 1, 16), integer32().subtype(subtypeSpec=value_range_constraint(0, 24576))).setMaxAccess('readwrite') if mibBuilder.loadTexts: wwpLeosEtherUntagEgressVlanId.setStatus('current') if mibBuilder.loadTexts: wwpLeosEtherUntagEgressVlanId.setDescription('All the egress frames whose VLAN id matches the wwpLeosEtherUntagEgressVlanId, will egress the port as untagged. To egress the frames tagged set wwpLeosEtherUntagEgressVlanId to 0. The max value for this object is platform dependent. Refer to architecture document for details of platform dependency.') wwp_leos_ether_port_acceptable_frame_types = mib_table_column((1, 3, 6, 1, 4, 1, 6141, 2, 60, 2, 1, 1, 1, 1, 17), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3))).clone(namedValues=named_values(('admitAll', 1), ('admitOnlyVlanTagged', 2), ('admitOnlyUntagged', 3))).clone('admitAll')).setMaxAccess('readwrite') if mibBuilder.loadTexts: wwpLeosEtherPortAcceptableFrameTypes.setReference('IEEE 802.1Q/D11 Section 12.10.1.3') if mibBuilder.loadTexts: wwpLeosEtherPortAcceptableFrameTypes.setStatus('current') if mibBuilder.loadTexts: wwpLeosEtherPortAcceptableFrameTypes.setDescription('When this is admitOnlyVlanTagged(2) the device will discard untagged frames or Priority-Tagged frames received on this port. When admitOnlyUntagged(3) is set, the device will discard VLAN tagged frames received on this port. With admitOnlyUntagged(3) and admitAll(1), untagged frames or Priority-Tagged frames received on this port will be accepted and assigned to the PVID for this port. This control does not affect VLAN independent BPDU frames, such as GVRP and STP. It does affect VLAN dependent BPDU frames, such as GMRP.') wwp_leos_ether_port_untagged_priority = mib_table_column((1, 3, 6, 1, 4, 1, 6141, 2, 60, 2, 1, 1, 1, 1, 18), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(0, 1, 2, 3, 4, 5, 6, 7))).clone(namedValues=named_values(('p0', 0), ('p1', 1), ('p2', 2), ('p3', 3), ('p4', 4), ('p5', 5), ('p6', 6), ('p7', 7)))).setMaxAccess('readwrite') if mibBuilder.loadTexts: wwpLeosEtherPortUntaggedPriority.setStatus('deprecated') if mibBuilder.loadTexts: wwpLeosEtherPortUntaggedPriority.setDescription('The 802.1p packet priority to be assigned to packets ingressing this port that do not have an 802.1Q VLAN header. This priority is also assigned to ingress frame if tunnel is enabled on this port.') wwp_leos_ether_port_max_frame_size = mib_table_column((1, 3, 6, 1, 4, 1, 6141, 2, 60, 2, 1, 1, 1, 1, 19), integer32().subtype(subtypeSpec=value_range_constraint(1522, 9216))).setMaxAccess('readwrite') if mibBuilder.loadTexts: wwpLeosEtherPortMaxFrameSize.setStatus('current') if mibBuilder.loadTexts: wwpLeosEtherPortMaxFrameSize.setDescription('Setting this object will set the max frame size allowed on a port. The max frame size can vary from 1522 bytes to 9216 bytes. Default value is 1526 bytes.') wwp_leos_ether_port_vlan_ingress_filtering = mib_table_column((1, 3, 6, 1, 4, 1, 6141, 2, 60, 2, 1, 1, 1, 1, 20), truth_value().clone('true')).setMaxAccess('readwrite') if mibBuilder.loadTexts: wwpLeosEtherPortVlanIngressFiltering.setStatus('current') if mibBuilder.loadTexts: wwpLeosEtherPortVlanIngressFiltering.setDescription('When this is true(1) the device will discard incoming frames for VLANs which do not include this Port in its Member set. When false(2), the port will accept all incoming frames.') wwp_leos_ether_port_admin_advertised_flow_ctrl = mib_table_column((1, 3, 6, 1, 4, 1, 6141, 2, 60, 2, 1, 1, 1, 1, 21), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3, 4, 5))).clone(namedValues=named_values(('unknown', 1), ('off', 2), ('asymTx', 3), ('sym', 4), ('symAsymRx', 5)))).setMaxAccess('readwrite') if mibBuilder.loadTexts: wwpLeosEtherPortAdminAdvertisedFlowCtrl.setStatus('current') if mibBuilder.loadTexts: wwpLeosEtherPortAdminAdvertisedFlowCtrl.setDescription('This object specifies the advertised flow control for given port.') wwp_leos_ether_port_vpls_port_type = mib_table_column((1, 3, 6, 1, 4, 1, 6141, 2, 60, 2, 1, 1, 1, 1, 22), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3))).clone(namedValues=named_values(('notDefined', 1), ('subscriber', 2), ('networkFacing', 3)))).setMaxAccess('readonly') if mibBuilder.loadTexts: wwpLeosEtherPortVplsPortType.setStatus('current') if mibBuilder.loadTexts: wwpLeosEtherPortVplsPortType.setDescription('This object specifies whether port is in subscriber type, network facing side or both. ') wwp_leos_ether_port_ingress_cos_policy = mib_table_column((1, 3, 6, 1, 4, 1, 6141, 2, 60, 2, 1, 1, 1, 1, 23), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3, 4))).clone(namedValues=named_values(('leave', 1), ('fixed', 2), ('ippInherit', 3), ('phbgInherit', 4)))).setMaxAccess('readwrite') if mibBuilder.loadTexts: wwpLeosEtherPortIngressCosPolicy.setStatus('current') if mibBuilder.loadTexts: wwpLeosEtherPortIngressCosPolicy.setDescription('This object specifies the ingress cos policy to be applied to all frames coming in on the given port.') wwp_leos_ether_port_ingress_fixed_dot1d_pri = mib_table_column((1, 3, 6, 1, 4, 1, 6141, 2, 60, 2, 1, 1, 1, 1, 24), integer32().subtype(subtypeSpec=value_range_constraint(0, 7))).setMaxAccess('readwrite') if mibBuilder.loadTexts: wwpLeosEtherPortIngressFixedDot1dPri.setStatus('current') if mibBuilder.loadTexts: wwpLeosEtherPortIngressFixedDot1dPri.setDescription("The 802.1p packet priority to be assigned to packets ingressing this port that do not have an 802.1Q VLAN header. This priority is also assigned to ingress untagged frame if the virtual switch cos policy is set to 'fix' for a given port.") wwp_leos_ether_port_untag_data_vsi = mib_table_column((1, 3, 6, 1, 4, 1, 6141, 2, 60, 2, 1, 1, 1, 1, 25), integer32().subtype(subtypeSpec=value_range_constraint(0, 65535))).setMaxAccess('readwrite') if mibBuilder.loadTexts: wwpLeosEtherPortUntagDataVsi.setStatus('current') if mibBuilder.loadTexts: wwpLeosEtherPortUntagDataVsi.setDescription('This object specifies the virtual switch to be used for this port if data frame is untagged. If this object is set to 0 then device will unset this object. When setting this object to Mpls Vsi Index then wwpLeosEtherPortUntagDataVsiType must also be set to mpls (Use multiple set operation)') wwp_leos_ether_port_operational_speed = mib_table_column((1, 3, 6, 1, 4, 1, 6141, 2, 60, 2, 1, 1, 1, 1, 26), gauge32()).setUnits('kbps').setMaxAccess('readonly') if mibBuilder.loadTexts: wwpLeosEtherPortOperationalSpeed.setStatus('current') if mibBuilder.loadTexts: wwpLeosEtherPortOperationalSpeed.setDescription("An estimate of the port's current bandwidth in k-bits per second for given port.") wwp_leos_ether_port_untag_ctrl_vsi = mib_table_column((1, 3, 6, 1, 4, 1, 6141, 2, 60, 2, 1, 1, 1, 1, 27), integer32().subtype(subtypeSpec=value_range_constraint(0, 65535))).setMaxAccess('readwrite') if mibBuilder.loadTexts: wwpLeosEtherPortUntagCtrlVsi.setStatus('current') if mibBuilder.loadTexts: wwpLeosEtherPortUntagCtrlVsi.setDescription('This object specifies the virtual switch to be used for this port if control frame is untagged. If this object is set to 0 then device will unset this object. When setting this object to Mpls Vsi Index then wwpLeosEtherPortUntagCtrlVsiType must also be set to mpls (Use multiple set operation)') wwp_leos_ether_port_mirror_port = mib_table_column((1, 3, 6, 1, 4, 1, 6141, 2, 60, 2, 1, 1, 1, 1, 28), truth_value().clone('false')).setMaxAccess('readwrite') if mibBuilder.loadTexts: wwpLeosEtherPortMirrorPort.setStatus('current') if mibBuilder.loadTexts: wwpLeosEtherPortMirrorPort.setDescription('This object defines whether the port will allow traffic from other ports to be mirrored to this port. To allow traffic from other ports to be sent to this port, set this object to True(1). This port is known as a mirror port. If set to true, then other ports may set the values of their wwpLeosEtherPortMirrorIngress or wwpLeosEtherPortMirrorEgress objects to the port index of this port. Setting this object to false(2) disables this port as a mirror port.') wwp_leos_ether_port_mirror_ingress = mib_table_column((1, 3, 6, 1, 4, 1, 6141, 2, 60, 2, 1, 1, 1, 1, 29), integer32().subtype(subtypeSpec=value_range_constraint(0, 65535))).setMaxAccess('readwrite') if mibBuilder.loadTexts: wwpLeosEtherPortMirrorIngress.setStatus('current') if mibBuilder.loadTexts: wwpLeosEtherPortMirrorIngress.setDescription("The value of this object is the port index of a mirror port. The ingress traffic of this port can be mirrored by setting the destination port's wwpLeosEtherPortMirrorPort object to true. If the value of this object is set to zero this port's ingress traffic will not be mirrored.") wwp_leos_ether_port_mirror_egress = mib_table_column((1, 3, 6, 1, 4, 1, 6141, 2, 60, 2, 1, 1, 1, 1, 30), integer32().subtype(subtypeSpec=value_range_constraint(0, 65535))).setMaxAccess('readwrite') if mibBuilder.loadTexts: wwpLeosEtherPortMirrorEgress.setStatus('current') if mibBuilder.loadTexts: wwpLeosEtherPortMirrorEgress.setDescription("The value of this object is the port index of a mirror port. The egress traffic of this port can be mirrored by setting the destination port's wwpLeosEtherPortMirrorPort object to true. If the value of this object is set to zero this port's egress traffic will not be mirrored.") wwp_leos_ether_port_untag_data_vsi_type = mib_table_column((1, 3, 6, 1, 4, 1, 6141, 2, 60, 2, 1, 1, 1, 1, 31), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2))).clone(namedValues=named_values(('ethernet', 1), ('mpls', 2))).clone('ethernet')).setMaxAccess('readwrite') if mibBuilder.loadTexts: wwpLeosEtherPortUntagDataVsiType.setStatus('current') if mibBuilder.loadTexts: wwpLeosEtherPortUntagDataVsiType.setDescription('This object specifies the virtual switch instance type associated with this port. This object defaults to ethernet and specifies if wwpLeosEtherPortUntagDataVsi belongs to ethernet virtual switch table (wwpLeosVplsVirtualSwitchEthTable in WWP-LEOS-VPLS-MIB) or mpls virtual switch table (wwpLeosVplsVirtualSwitchMplsTable in WWP-LEOS-VPLS-MIB). When setting wwpLeosEtherPortUntagDataVsi to MPLS Vsi Index then this object must also be set to mpls (Use mutliple set operation).') wwp_leos_ether_port_untag_ctrl_vsi_type = mib_table_column((1, 3, 6, 1, 4, 1, 6141, 2, 60, 2, 1, 1, 1, 1, 32), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2))).clone(namedValues=named_values(('ethernet', 1), ('mpls', 2))).clone('ethernet')).setMaxAccess('readwrite') if mibBuilder.loadTexts: wwpLeosEtherPortUntagCtrlVsiType.setStatus('current') if mibBuilder.loadTexts: wwpLeosEtherPortUntagCtrlVsiType.setDescription('This object specifies the virtual switch instance type associated with this port. This object defaults to ethernet and specifies if wwpLeosEtherPortUntagCtrlVsi belongs to ethernet virtual switch table (wwpLeosVplsVirtualSwitchEthTable) or mpls virtual switch table (wwpLeosVplsVirtualSwitchMplsTable). When setting wwpLeosEtherPortUntagCtrlVsi to MPLS Vsi Index then this object must also be set to mpls (Use mutliple set operation)') wwp_leos_ether_port_vs_ingress_filtering = mib_table_column((1, 3, 6, 1, 4, 1, 6141, 2, 60, 2, 1, 1, 1, 1, 33), truth_value().clone('false')).setMaxAccess('readwrite') if mibBuilder.loadTexts: wwpLeosEtherPortVsIngressFiltering.setStatus('current') if mibBuilder.loadTexts: wwpLeosEtherPortVsIngressFiltering.setDescription('This item is applicable to this port when the port is added as a per-port member to a virtual switch. If true(1) the device will discard incoming tagged frames. If false(2) the device will forwared incoming tagged frames so long as those customer tagged frames do not match another virtual switch with this port included as a per-port-per-vlan member.') wwp_leos_ether_port_oper_auto_neg = mib_table_column((1, 3, 6, 1, 4, 1, 6141, 2, 60, 2, 1, 1, 1, 1, 34), truth_value()).setMaxAccess('readonly') if mibBuilder.loadTexts: wwpLeosEtherPortOperAutoNeg.setStatus('current') if mibBuilder.loadTexts: wwpLeosEtherPortOperAutoNeg.setDescription('The object specifies the operational auto neg state.') wwp_leos_ether_port_up_time = mib_table_column((1, 3, 6, 1, 4, 1, 6141, 2, 60, 2, 1, 1, 1, 1, 35), time_ticks()).setMaxAccess('readonly') if mibBuilder.loadTexts: wwpLeosEtherPortUpTime.setStatus('current') if mibBuilder.loadTexts: wwpLeosEtherPortUpTime.setDescription('The object specifies the port up time in hundredths of a second.') wwp_leos_ether_port_untag_data_vid = mib_table_column((1, 3, 6, 1, 4, 1, 6141, 2, 60, 2, 1, 1, 1, 1, 36), integer32().subtype(subtypeSpec=value_range_constraint(0, 24576)).clone(1)).setMaxAccess('readwrite') if mibBuilder.loadTexts: wwpLeosEtherPortUntagDataVid.setReference('IEEE 802.1Q/D11 Section 12.10.1.1') if mibBuilder.loadTexts: wwpLeosEtherPortUntagDataVid.setStatus('current') if mibBuilder.loadTexts: wwpLeosEtherPortUntagDataVid.setDescription('The Ingress Untagged Data Vid, the VLAN ID stamped on untagged frames ingressing the port or if tunnel is enabled on this port. To disable tagging of untagged data on ingress write a value of 0. The max value for this object is platform dependent. Refer to architecture document for details of platform dependency.') wwp_leos_ether_port_phy_loopback = mib_table_column((1, 3, 6, 1, 4, 1, 6141, 2, 60, 2, 1, 1, 1, 1, 37), truth_value().clone('false')).setMaxAccess('readwrite') if mibBuilder.loadTexts: wwpLeosEtherPortPhyLoopback.setStatus('current') if mibBuilder.loadTexts: wwpLeosEtherPortPhyLoopback.setDescription('This object defines whether the phy has been placed in loopback mode, which causes frames egressing the port to be looped back to the port.') wwp_leos_ether_port_vlan_ingress_filter_strict = mib_table_column((1, 3, 6, 1, 4, 1, 6141, 2, 60, 2, 1, 1, 1, 1, 38), truth_value().clone('false')).setMaxAccess('readwrite') if mibBuilder.loadTexts: wwpLeosEtherPortVlanIngressFilterStrict.setStatus('current') if mibBuilder.loadTexts: wwpLeosEtherPortVlanIngressFilterStrict.setDescription('This item is applicable to this port when the port is added as a to a virtual switch. If true(1) the legacy ingress filter behavior will be enforced at member addition (drop bit will be set to drop untagged traffic). If false, the splat bit will not be changed. Note that external VLAN associations are also maintained when strict is false.') wwp_leos_ether_port_mac_sa_da_swap = mib_table_column((1, 3, 6, 1, 4, 1, 6141, 2, 60, 2, 1, 1, 1, 1, 39), truth_value().clone('false')).setMaxAccess('readwrite') if mibBuilder.loadTexts: wwpLeosEtherPortMacSaDaSwap.setStatus('current') if mibBuilder.loadTexts: wwpLeosEtherPortMacSaDaSwap.setDescription('This object defines whether the MAC SA and DA will be swapped on frames egressing the port. This only works on a 311V.') wwp_leos_ether_port_mac_sa_da_swap_vlan = mib_table_column((1, 3, 6, 1, 4, 1, 6141, 2, 60, 2, 1, 1, 1, 1, 40), integer32().subtype(subtypeSpec=value_range_constraint(0, 24576))).setMaxAccess('readwrite') if mibBuilder.loadTexts: wwpLeosEtherPortMacSaDaSwapVlan.setStatus('current') if mibBuilder.loadTexts: wwpLeosEtherPortMacSaDaSwapVlan.setDescription('This object defines whether the MAC SA and DA will be swapped on specific VLAN frames egressing the port. This only works on a 311V.') wwp_leos_ether_port_resolved_cos_policy = mib_table_column((1, 3, 6, 1, 4, 1, 6141, 2, 60, 2, 1, 1, 1, 1, 41), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3, 99))).clone(namedValues=named_values(('dot1d', 1), ('l3DscpCos', 2), ('fixedCos', 3), ('unknown', 99)))).setMaxAccess('readwrite') if mibBuilder.loadTexts: wwpLeosEtherPortResolvedCosPolicy.setStatus('current') if mibBuilder.loadTexts: wwpLeosEtherPortResolvedCosPolicy.setDescription(' The Resolved Cost Policy. Setting this attribute is not supported in leos version 4') wwp_leos_ether_port_mode = mib_table_column((1, 3, 6, 1, 4, 1, 6141, 2, 60, 2, 1, 1, 1, 1, 42), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3, 99))).clone(namedValues=named_values(('rj45', 1), ('sfp', 2), ('default', 3), ('unknown', 99)))).setMaxAccess('readwrite') if mibBuilder.loadTexts: wwpLeosEtherPortMode.setStatus('current') if mibBuilder.loadTexts: wwpLeosEtherPortMode.setDescription('The mode of the port Setting this attribute is not supported in leos version 4') wwp_leos_ether_fixed_rcos = mib_table_column((1, 3, 6, 1, 4, 1, 6141, 2, 60, 2, 1, 1, 1, 1, 43), integer32().subtype(subtypeSpec=value_range_constraint(0, 7))).setMaxAccess('readwrite') if mibBuilder.loadTexts: wwpLeosEtherFixedRcos.setStatus('current') if mibBuilder.loadTexts: wwpLeosEtherFixedRcos.setDescription('The fixed Resolve Cost value. Setting this attribute is not supported in leos version 4') wwp_leos_ether_port_egress_port_queue_map_id = mib_table_column((1, 3, 6, 1, 4, 1, 6141, 2, 60, 2, 1, 1, 1, 1, 44), integer32().subtype(subtypeSpec=value_range_constraint(1, 65535))).setMaxAccess('readwrite') if mibBuilder.loadTexts: wwpLeosEtherPortEgressPortQueueMapId.setStatus('current') if mibBuilder.loadTexts: wwpLeosEtherPortEgressPortQueueMapId.setDescription('The Egress-port-Queue associated with this port. Setting this attribute is not supported in leos version 4') wwp_leos_ether_port_resolved_cos_map_id = mib_table_column((1, 3, 6, 1, 4, 1, 6141, 2, 60, 2, 1, 1, 1, 1, 45), integer32().subtype(subtypeSpec=value_range_constraint(1, 65535))).setMaxAccess('readwrite') if mibBuilder.loadTexts: wwpLeosEtherPortResolvedCosMapId.setStatus('current') if mibBuilder.loadTexts: wwpLeosEtherPortResolvedCosMapId.setDescription('RCOS map id for the port. Setting this attribute is not supported in leos version 4') wwp_leos_ether_port_resolved_cos_remark_l2 = mib_table_column((1, 3, 6, 1, 4, 1, 6141, 2, 60, 2, 1, 1, 1, 1, 46), truth_value()).setMaxAccess('readwrite') if mibBuilder.loadTexts: wwpLeosEtherPortResolvedCosRemarkL2.setStatus('current') if mibBuilder.loadTexts: wwpLeosEtherPortResolvedCosRemarkL2.setDescription('The object specifies whether to remark L2 based on L3. This applies when the resolved cos policy is either l3-dscp-cos or dot1d-tag1-cos but not when it is fixed-cos policy. Setting this attribute is not supported in leos version 4') wwp_leos_ether_port_l2_transform_mode = mib_table_column((1, 3, 6, 1, 4, 1, 6141, 2, 60, 2, 1, 1, 1, 1, 47), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(0, 1, 2, 3))).clone(namedValues=named_values(('none', 0), ('iPush-e-Pop', 1), ('iStamp-Push-e-QualifiedPopStamp', 2), ('iPush-e-PopStamp', 3))).clone(1)).setMaxAccess('readwrite') if mibBuilder.loadTexts: wwpLeosEtherPortL2TransformMode.setStatus('current') if mibBuilder.loadTexts: wwpLeosEtherPortL2TransformMode.setDescription('L2 transform action for port. Setting this attribute is not supported in leos version 4') wwp_leos_ether_port_link_flap_detection = mib_table_column((1, 3, 6, 1, 4, 1, 6141, 2, 60, 2, 1, 1, 1, 1, 48), truth_value().clone('false')).setMaxAccess('readwrite') if mibBuilder.loadTexts: wwpLeosEtherPortLinkFlapDetection.setStatus('current') if mibBuilder.loadTexts: wwpLeosEtherPortLinkFlapDetection.setDescription('This object defines whether link flap detection will be enabled on the port.') wwp_leos_ether_port_link_flap_count = mib_table_column((1, 3, 6, 1, 4, 1, 6141, 2, 60, 2, 1, 1, 1, 1, 49), integer32().subtype(subtypeSpec=value_range_constraint(1, 64)).clone(5)).setMaxAccess('readwrite') if mibBuilder.loadTexts: wwpLeosEtherPortLinkFlapCount.setStatus('current') if mibBuilder.loadTexts: wwpLeosEtherPortLinkFlapCount.setDescription('This object defines how many link down events are required to trigger a link flap event.') wwp_leos_ether_port_link_flap_detect_time = mib_table_column((1, 3, 6, 1, 4, 1, 6141, 2, 60, 2, 1, 1, 1, 1, 50), integer32().subtype(subtypeSpec=value_range_constraint(1, 600)).clone(10)).setMaxAccess('readwrite') if mibBuilder.loadTexts: wwpLeosEtherPortLinkFlapDetectTime.setStatus('current') if mibBuilder.loadTexts: wwpLeosEtherPortLinkFlapDetectTime.setDescription('This object defines the time in seconds during which link down events are accumlated to trigger a link flap event.') wwp_leos_ether_port_link_flap_hold_time = mib_table_column((1, 3, 6, 1, 4, 1, 6141, 2, 60, 2, 1, 1, 1, 1, 51), integer32().subtype(subtypeSpec=value_range_constraint(0, 600)).clone(300)).setMaxAccess('readwrite') if mibBuilder.loadTexts: wwpLeosEtherPortLinkFlapHoldTime.setStatus('current') if mibBuilder.loadTexts: wwpLeosEtherPortLinkFlapHoldTime.setDescription('This object defines the time in seconds that a port will be operationally disabled after a link flap event, before it is re-enabled. A value of zero causes the port to remain disabled until manually enabled.') wwp_leos_ether_fixed_r_color = mib_table_column((1, 3, 6, 1, 4, 1, 6141, 2, 60, 2, 1, 1, 1, 1, 52), port_ingress_fixed_color().clone(1)).setMaxAccess('readwrite') if mibBuilder.loadTexts: wwpLeosEtherFixedRColor.setStatus('current') if mibBuilder.loadTexts: wwpLeosEtherFixedRColor.setDescription('This sets the fixed color to green (default) or yellow. Setting this attribute is not supported in saos version 4') wwp_leos_ether_port_frame_cos_map_id = mib_table_column((1, 3, 6, 1, 4, 1, 6141, 2, 60, 2, 1, 1, 1, 1, 53), integer32().subtype(subtypeSpec=value_range_constraint(1, 65535)).clone(1)).setMaxAccess('readwrite') if mibBuilder.loadTexts: wwpLeosEtherPortFrameCosMapId.setStatus('current') if mibBuilder.loadTexts: wwpLeosEtherPortFrameCosMapId.setDescription('Frame COS map id for the port. Setting this attribute is not supported in leos version 4') wwp_leos_ether_port_egress_cos_policy = mib_table_column((1, 3, 6, 1, 4, 1, 6141, 2, 60, 2, 1, 1, 1, 1, 54), port_egress_frame_cos_policy().clone(1)).setMaxAccess('readwrite') if mibBuilder.loadTexts: wwpLeosEtherPortEgressCosPolicy.setStatus('current') if mibBuilder.loadTexts: wwpLeosEtherPortEgressCosPolicy.setDescription('Sets the egress frame cos policy Setting this attribute is not supported in leos version 4') wwp_leos_ether_port_egress_speed = mib_table_column((1, 3, 6, 1, 4, 1, 6141, 2, 60, 2, 1, 1, 1, 1, 55), gauge32()).setUnits('kbps').setMaxAccess('readonly') if mibBuilder.loadTexts: wwpLeosEtherPortEgressSpeed.setStatus('current') if mibBuilder.loadTexts: wwpLeosEtherPortEgressSpeed.setDescription("An estimate of the port's current egress bandwidth restriction in k-bits per second for given port. A value of 0 means there is no active restriction. This attribute not supported in leos version 6") wwp_leos_ether_port_adaptive_rate_speed = mib_table_column((1, 3, 6, 1, 4, 1, 6141, 2, 60, 2, 1, 1, 1, 1, 56), gauge32()).setUnits('kbps').setMaxAccess('readonly') if mibBuilder.loadTexts: wwpLeosEtherPortAdaptiveRateSpeed.setStatus('current') if mibBuilder.loadTexts: wwpLeosEtherPortAdaptiveRateSpeed.setDescription("An estimate of the port's current adaptive-rate bandwidth restriction in k-bits per second for given port. A value of 0 means there is no active restriction. This attribute not supported in leos version 6") wwp_leos_ether_port_mirror_encap = mib_table_column((1, 3, 6, 1, 4, 1, 6141, 2, 60, 2, 1, 1, 1, 1, 57), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(0, 1))).clone(namedValues=named_values(('none', 0), ('vlanTag', 1))).clone('none')).setMaxAccess('readwrite') if mibBuilder.loadTexts: wwpLeosEtherPortMirrorEncap.setStatus('current') if mibBuilder.loadTexts: wwpLeosEtherPortMirrorEncap.setDescription('This object defines whether the port will encapsulate mirrored frames by adding a vlan-tag. (Or, in the case where a mirrored frame is already tagged, by adding a further vlan-tag to the frame) To allow mirrored traffic to be encapsulated, set this object to vlan-tag(1). If set to vlan-tag, then the values of wwpLeosEtherPortMirrorEncapVid and wwpLeosEtherPortMirrorEncapTpid will be used to populate tag added to each mirrored frame. Setting this object to none(0) indicates no tag is to be added to the mirrored frames.') wwp_leos_ether_port_mirror_encap_vid = mib_table_column((1, 3, 6, 1, 4, 1, 6141, 2, 60, 2, 1, 1, 1, 1, 58), integer32().subtype(subtypeSpec=value_range_constraint(0, 24576)).clone(1)).setMaxAccess('readwrite') if mibBuilder.loadTexts: wwpLeosEtherPortMirrorEncapVid.setStatus('current') if mibBuilder.loadTexts: wwpLeosEtherPortMirrorEncapVid.setDescription('This object defines the VID that will be added to mirrored frames when the mirroring encapsulation mode is vlan-tag') wwp_leos_ether_port_mirror_encap_tpid = mib_table_column((1, 3, 6, 1, 4, 1, 6141, 2, 60, 2, 1, 1, 1, 1, 59), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3))).clone(namedValues=named_values(('tpid8100', 1), ('tpid9100', 2), ('tpid88A8', 3))).clone('tpid8100')).setMaxAccess('readwrite') if mibBuilder.loadTexts: wwpLeosEtherPortMirrorEncapTpid.setStatus('current') if mibBuilder.loadTexts: wwpLeosEtherPortMirrorEncapTpid.setDescription('This object defines the tpid used in the tag that is added to mirrored frames, when the mirroring encapsulation mode is vlan-tag') wwp_leos_ether_port_ifg_decrease = mib_table_column((1, 3, 6, 1, 4, 1, 6141, 2, 60, 2, 1, 1, 1, 1, 60), integer32().subtype(subtypeSpec=value_range_constraint(0, 5))).setMaxAccess('readwrite') if mibBuilder.loadTexts: wwpLeosEtherPortIfgDecrease.setStatus('current') if mibBuilder.loadTexts: wwpLeosEtherPortIfgDecrease.setDescription('This object defines the number of bytes that will be subtracted from the minimum standard IFG of 12 bytes as defined in IEEE 802.3. SAOS 6.x only supports a value of 0 or 4.') wwp_leos_ether_port_advert_speed = mib_table_column((1, 3, 6, 1, 4, 1, 6141, 2, 60, 2, 1, 1, 1, 1, 61), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3, 4, 5))).clone(namedValues=named_values(('not-applicable', 1), ('ten', 2), ('hundred', 3), ('gigabit', 4), ('ten-hundred-gigabit', 5))).clone('ten-hundred-gigabit')).setMaxAccess('readwrite') if mibBuilder.loadTexts: wwpLeosEtherPortAdvertSpeed.setStatus('current') if mibBuilder.loadTexts: wwpLeosEtherPortAdvertSpeed.setDescription('This object defines the speed capabilities that will be advertised during the auto-negotiation process.') wwp_leos_ether_port_advert_duplex = mib_table_column((1, 3, 6, 1, 4, 1, 6141, 2, 60, 2, 1, 1, 1, 1, 62), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3, 4))).clone(namedValues=named_values(('not-applicable', 1), ('half', 2), ('full', 3), ('half-full', 4))).clone('half-full')).setMaxAccess('readwrite') if mibBuilder.loadTexts: wwpLeosEtherPortAdvertDuplex.setStatus('current') if mibBuilder.loadTexts: wwpLeosEtherPortAdvertDuplex.setDescription('This object defines the duplex capabilities that will be advertised during the auto-negotiation process.') wwp_leos_ether_port_flush_table = mib_table((1, 3, 6, 1, 4, 1, 6141, 2, 60, 2, 1, 1, 2)) if mibBuilder.loadTexts: wwpLeosEtherPortFlushTable.setStatus('current') if mibBuilder.loadTexts: wwpLeosEtherPortFlushTable.setDescription('Table of port flush entries.') wwp_leos_ether_port_flush_entry = mib_table_row((1, 3, 6, 1, 4, 1, 6141, 2, 60, 2, 1, 1, 2, 1)).setIndexNames((0, 'WWP-LEOS-PORT-MIB', 'wwpLeosEtherPortId')) if mibBuilder.loadTexts: wwpLeosEtherPortFlushEntry.setStatus('current') if mibBuilder.loadTexts: wwpLeosEtherPortFlushEntry.setDescription('Broadcast containment port entry in the Ethernet Port Table.') wwp_leos_ether_port_flush_activate = mib_table_column((1, 3, 6, 1, 4, 1, 6141, 2, 60, 2, 1, 1, 2, 1, 1), truth_value().clone('false')).setMaxAccess('readwrite') if mibBuilder.loadTexts: wwpLeosEtherPortFlushActivate.setStatus('current') if mibBuilder.loadTexts: wwpLeosEtherPortFlushActivate.setDescription("Setting this object to 'true' will cause the Macs to be flushed for the port specified by wwpLeosEtherPortId.") wwp_leos_ether_port_traps_table = mib_table((1, 3, 6, 1, 4, 1, 6141, 2, 60, 2, 1, 1, 3)) if mibBuilder.loadTexts: wwpLeosEtherPortTrapsTable.setStatus('current') if mibBuilder.loadTexts: wwpLeosEtherPortTrapsTable.setDescription('Table of Ethernet Ports Traps.') wwp_leos_ether_port_traps_entry = mib_table_row((1, 3, 6, 1, 4, 1, 6141, 2, 60, 2, 1, 1, 3, 1)).setIndexNames((0, 'WWP-LEOS-PORT-MIB', 'wwpLeosEtherPortId')) if mibBuilder.loadTexts: wwpLeosEtherPortTrapsEntry.setStatus('current') if mibBuilder.loadTexts: wwpLeosEtherPortTrapsEntry.setDescription('Port Traps Entry in the Ethernet Port Trap Table.') wwp_leos_ether_port_traps_state = mib_table_column((1, 3, 6, 1, 4, 1, 6141, 2, 60, 2, 1, 1, 3, 1, 1), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2))).clone(namedValues=named_values(('disable', 1), ('enable', 2)))).setMaxAccess('readwrite') if mibBuilder.loadTexts: wwpLeosEtherPortTrapsState.setStatus('current') if mibBuilder.loadTexts: wwpLeosEtherPortTrapsState.setDescription('Setting this object will enable or disable all traps on given port.') wwp_leos_ether_port_state_mirror_group_table = mib_table((1, 3, 6, 1, 4, 1, 6141, 2, 60, 2, 1, 1, 4)) if mibBuilder.loadTexts: wwpLeosEtherPortStateMirrorGroupTable.setStatus('current') if mibBuilder.loadTexts: wwpLeosEtherPortStateMirrorGroupTable.setDescription('This table can be used to keep track of all the port state mirror groups. To create entry in this table along with indexes following mib objects must be set using multiple set operation wwpLeosEtherPortStateMirrorGroupName must be valid string. wwpLeosEtherPortStateMirrorGroupStatus must be set.') wwp_leos_ether_port_state_mirror_group_entry = mib_table_row((1, 3, 6, 1, 4, 1, 6141, 2, 60, 2, 1, 1, 4, 1)).setIndexNames((0, 'WWP-LEOS-PORT-MIB', 'wwpLeosEtherPortStateMirrorGroupId')) if mibBuilder.loadTexts: wwpLeosEtherPortStateMirrorGroupEntry.setStatus('current') if mibBuilder.loadTexts: wwpLeosEtherPortStateMirrorGroupEntry.setDescription('Each entry in this table will define the port state mirror group.') wwp_leos_ether_port_state_mirror_group_id = mib_table_column((1, 3, 6, 1, 4, 1, 6141, 2, 60, 2, 1, 1, 4, 1, 1), integer32().subtype(subtypeSpec=value_range_constraint(1, 65535))).setMaxAccess('readonly') if mibBuilder.loadTexts: wwpLeosEtherPortStateMirrorGroupId.setStatus('current') if mibBuilder.loadTexts: wwpLeosEtherPortStateMirrorGroupId.setDescription('This mib object is used as index in the table and is used to identify the unique group id.') wwp_leos_ether_port_state_mirror_group_name = mib_table_column((1, 3, 6, 1, 4, 1, 6141, 2, 60, 2, 1, 1, 4, 1, 2), display_string().subtype(subtypeSpec=value_size_constraint(1, 15))).setMaxAccess('readcreate') if mibBuilder.loadTexts: wwpLeosEtherPortStateMirrorGroupName.setStatus('current') if mibBuilder.loadTexts: wwpLeosEtherPortStateMirrorGroupName.setDescription('This mib object is used to specify the name of the group.') wwp_leos_ether_port_state_mirror_group_oper_status = mib_table_column((1, 3, 6, 1, 4, 1, 6141, 2, 60, 2, 1, 1, 4, 1, 3), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2))).clone(namedValues=named_values(('disabled', 1), ('enabled', 2)))).setMaxAccess('readonly') if mibBuilder.loadTexts: wwpLeosEtherPortStateMirrorGroupOperStatus.setStatus('current') if mibBuilder.loadTexts: wwpLeosEtherPortStateMirrorGroupOperStatus.setDescription('This mib object is used to specify the operational status of the group.') wwp_leos_ether_port_state_mirror_group_num_src_ports = mib_table_column((1, 3, 6, 1, 4, 1, 6141, 2, 60, 2, 1, 1, 4, 1, 4), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: wwpLeosEtherPortStateMirrorGroupNumSrcPorts.setStatus('current') if mibBuilder.loadTexts: wwpLeosEtherPortStateMirrorGroupNumSrcPorts.setDescription('This mib object is used to specify the total number of source ports that exists in the group.') wwp_leos_ether_port_state_mirror_group_num_dst_ports = mib_table_column((1, 3, 6, 1, 4, 1, 6141, 2, 60, 2, 1, 1, 4, 1, 5), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: wwpLeosEtherPortStateMirrorGroupNumDstPorts.setStatus('current') if mibBuilder.loadTexts: wwpLeosEtherPortStateMirrorGroupNumDstPorts.setDescription('This mib object is used to specify the total number of destination ports that exists in the group.') wwp_leos_ether_port_state_mirror_group_status = mib_table_column((1, 3, 6, 1, 4, 1, 6141, 2, 60, 2, 1, 1, 4, 1, 6), row_status()).setMaxAccess('readcreate') if mibBuilder.loadTexts: wwpLeosEtherPortStateMirrorGroupStatus.setStatus('current') if mibBuilder.loadTexts: wwpLeosEtherPortStateMirrorGroupStatus.setDescription('Used to manage the creation and deletion of the conceptual rows in this table.') wwp_leos_ether_port_state_mirror_group_type = mib_table_column((1, 3, 6, 1, 4, 1, 6141, 2, 60, 2, 1, 1, 4, 1, 7), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2))).clone(namedValues=named_values(('unidirectional', 1), ('bidirectional', 2)))).setMaxAccess('readwrite') if mibBuilder.loadTexts: wwpLeosEtherPortStateMirrorGroupType.setStatus('current') if mibBuilder.loadTexts: wwpLeosEtherPortStateMirrorGroupType.setDescription("This mib object is used to specify the directional mode type for the port state mirror group. A uni-directional(1) mirror group type will only mirror the port state of the source port(s) to the destination port(s). The bi-directional(2) mirror group type will mirror state of either the source port(s) to the destination port(s) or the state of the destination port(s) will be mirrored to the source port(s). Where there are more than one source or destination ports the combined state of the source or destination group will be the combined 'OR'ed status of all the ports in either the source or destination groups. In other words, if one or more source ports is 'UP' then the source group is 'UP' and the mirrored destination state may be 'UP'. The default for this object type is uni-directional.") wwp_leos_ether_port_state_mirror_group_mem_table = mib_table((1, 3, 6, 1, 4, 1, 6141, 2, 60, 2, 1, 1, 5)) if mibBuilder.loadTexts: wwpLeosEtherPortStateMirrorGroupMemTable.setStatus('current') if mibBuilder.loadTexts: wwpLeosEtherPortStateMirrorGroupMemTable.setDescription('This table is used to keep track of port group membership.') wwp_leos_ether_port_state_mirror_group_mem_entry = mib_table_row((1, 3, 6, 1, 4, 1, 6141, 2, 60, 2, 1, 1, 5, 1)).setIndexNames((0, 'WWP-LEOS-PORT-MIB', 'wwpLeosEtherPortStateMirrorGroupId'), (0, 'WWP-LEOS-PORT-MIB', 'wwpLeosEtherPortId')) if mibBuilder.loadTexts: wwpLeosEtherPortStateMirrorGroupMemEntry.setStatus('current') if mibBuilder.loadTexts: wwpLeosEtherPortStateMirrorGroupMemEntry.setDescription('Each entry in this table is used to represent the membership of port to a given group and group type.') wwp_leos_ether_port_state_mirror_group_mem_type = mib_table_column((1, 3, 6, 1, 4, 1, 6141, 2, 60, 2, 1, 1, 5, 1, 1), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2))).clone(namedValues=named_values(('srcPort', 1), ('dstPort', 2))).clone('srcPort')).setMaxAccess('readcreate') if mibBuilder.loadTexts: wwpLeosEtherPortStateMirrorGroupMemType.setStatus('current') if mibBuilder.loadTexts: wwpLeosEtherPortStateMirrorGroupMemType.setDescription('Setting this object will specify the type of group this port is member of for a given port state mirror group. This object can only be set while creating the entry. This object cannot be modified once entry is created.') wwp_leos_ether_port_state_mirror_group_mem_oper_state = mib_table_column((1, 3, 6, 1, 4, 1, 6141, 2, 60, 2, 1, 1, 5, 1, 2), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2))).clone(namedValues=named_values(('disabled', 1), ('enabled', 2)))).setMaxAccess('readonly') if mibBuilder.loadTexts: wwpLeosEtherPortStateMirrorGroupMemOperState.setStatus('current') if mibBuilder.loadTexts: wwpLeosEtherPortStateMirrorGroupMemOperState.setDescription('This mib object is used to specify the operational status of the port.') wwp_leos_ether_port_state_mirror_group_mem_status = mib_table_column((1, 3, 6, 1, 4, 1, 6141, 2, 60, 2, 1, 1, 5, 1, 3), row_status()).setMaxAccess('readcreate') if mibBuilder.loadTexts: wwpLeosEtherPortStateMirrorGroupMemStatus.setStatus('current') if mibBuilder.loadTexts: wwpLeosEtherPortStateMirrorGroupMemStatus.setDescription('Used to manage the creation and deletion of the conceptual rows in this table.') wwp_leos_ether_stnd_link_up_down_traps_enable = mib_scalar((1, 3, 6, 1, 4, 1, 6141, 2, 60, 2, 1, 2, 1), truth_value().clone('true')).setMaxAccess('readwrite') if mibBuilder.loadTexts: wwpLeosEtherStndLinkUpDownTrapsEnable.setStatus('current') if mibBuilder.loadTexts: wwpLeosEtherStndLinkUpDownTrapsEnable.setDescription("Setting this object to 'false(2)' will cause standard Link Up Down Traps to be suppressed.") wwp_leos_ether_port_link_up_down_traps_enable = mib_scalar((1, 3, 6, 1, 4, 1, 6141, 2, 60, 2, 1, 2, 2), truth_value().clone('false')).setMaxAccess('readwrite') if mibBuilder.loadTexts: wwpLeosEtherPortLinkUpDownTrapsEnable.setStatus('current') if mibBuilder.loadTexts: wwpLeosEtherPortLinkUpDownTrapsEnable.setDescription("Setting this object to 'true(1)' will cause wwp specific port up down trap to be generated.") wwp_leos_ether_agg_port_link_up_down_traps_enable = mib_scalar((1, 3, 6, 1, 4, 1, 6141, 2, 60, 2, 1, 2, 3), truth_value().clone('false')).setMaxAccess('readwrite') if mibBuilder.loadTexts: wwpLeosEtherAggPortLinkUpDownTrapsEnable.setStatus('current') if mibBuilder.loadTexts: wwpLeosEtherAggPortLinkUpDownTrapsEnable.setDescription("Setting this object to 'true(1)' will cause wwp specific agg port up down trap to be generated for a link state change on a physical port that is a member of a agg.") wwp_leos_eth_link_up = notification_type((1, 3, 6, 1, 4, 1, 6141, 2, 60, 2, 2, 0, 3)).setObjects(('SNMPv2-MIB', 'sysName'), ('SNMPv2-MIB', 'sysLocation'), ('WWP-LEOS-PORT-MIB', 'wwpLeosEtherPortId'), ('WWP-LEOS-PORT-MIB', 'wwpLeosEtherPortName'), ('WWP-LEOS-PORT-MIB', 'wwpLeosEtherPortType'), ('WWP-LEOS-PORT-MIB', 'wwpLeosEtherPortAdminStatus'), ('WWP-LEOS-PORT-MIB', 'wwpLeosEtherPortOperStatus'), ('WWP-LEOS-PORT-MIB', 'wwpLeosEtherPortDesc')) if mibBuilder.loadTexts: wwpLeosEthLinkUp.setStatus('current') if mibBuilder.loadTexts: wwpLeosEthLinkUp.setDescription('A wwpLeosEthLinkUp trap signifies that the SNMP entity, acting in an agent role, has detected that the ifOperStatus object for one of its communication links has entered the up state.') wwp_leos_eth_link_down = notification_type((1, 3, 6, 1, 4, 1, 6141, 2, 60, 2, 2, 0, 4)).setObjects(('SNMPv2-MIB', 'sysName'), ('SNMPv2-MIB', 'sysLocation'), ('WWP-LEOS-PORT-MIB', 'wwpLeosEtherPortId'), ('WWP-LEOS-PORT-MIB', 'wwpLeosEtherPortType'), ('WWP-LEOS-PORT-MIB', 'wwpLeosEtherPortName'), ('WWP-LEOS-PORT-MIB', 'wwpLeosEtherPortAdminStatus'), ('WWP-LEOS-PORT-MIB', 'wwpLeosEtherPortOperStatus'), ('WWP-LEOS-PORT-MIB', 'wwpLeosEtherPortDesc')) if mibBuilder.loadTexts: wwpLeosEthLinkDown.setStatus('current') if mibBuilder.loadTexts: wwpLeosEthLinkDown.setDescription('A wwpLeosEthLinkDown trap signifies that the SNMP entity, acting in an agent role, has detected that the ifOperStatus object for one of its communication links has entered the down state.') wwp_leos_eth_admin_speed_incompatible = notification_type((1, 3, 6, 1, 4, 1, 6141, 2, 60, 2, 2, 0, 5)).setObjects(('WWP-LEOS-PORT-MIB', 'wwpLeosEtherPortId')) if mibBuilder.loadTexts: wwpLeosEthAdminSpeedIncompatible.setStatus('current') if mibBuilder.loadTexts: wwpLeosEthAdminSpeedIncompatible.setDescription("A wwpLeosEthAdminSpeedIncompatible trap is generated when the port administrative speed doesn't match the speed of the SFP transceiver installed.") wwp_leos_eth_link_flap = notification_type((1, 3, 6, 1, 4, 1, 6141, 2, 60, 2, 2, 0, 6)).setObjects(('SNMPv2-MIB', 'sysName'), ('SNMPv2-MIB', 'sysLocation'), ('WWP-LEOS-PORT-MIB', 'wwpLeosEtherPortId'), ('WWP-LEOS-PORT-MIB', 'wwpLeosEtherPortType'), ('WWP-LEOS-PORT-MIB', 'wwpLeosEtherPortName'), ('WWP-LEOS-PORT-MIB', 'wwpLeosEtherPortOperStatus'), ('WWP-LEOS-PORT-MIB', 'wwpLeosEtherPortDesc'), ('WWP-LEOS-PORT-MIB', 'wwpLeosEtherPortLinkFlapHoldTime')) if mibBuilder.loadTexts: wwpLeosEthLinkFlap.setStatus('current') if mibBuilder.loadTexts: wwpLeosEthLinkFlap.setDescription('A wwpLeosEthLinkFlap trap signifies that the SNMP entity, acting in an agent role, has detected that the ifOperStatus object for one of its communication links has been changed due to link flap detection.') wwp_leos_agg_link_up_down = notification_type((1, 3, 6, 1, 4, 1, 6141, 2, 60, 2, 2, 0, 7)).setObjects(('SNMPv2-MIB', 'sysName'), ('SNMPv2-MIB', 'sysLocation'), ('WWP-LEOS-PORT-MIB', 'wwpLeosEtherPortId'), ('WWP-LEOS-PORT-MIB', 'wwpLeosEtherPortName'), ('WWP-LEOS-PORT-MIB', 'wwpLeosEtherPortDesc'), ('WWP-LEOS-PORT-MIB', 'wwpLeosEtherPortType'), ('WWP-LEOS-PORT-MIB', 'wwpLeosEtherPortAdminStatus'), ('WWP-LEOS-PORT-MIB', 'wwpLeosEtherPortOperStatus'), ('IEEE8023-LAG-MIB', 'dot3adAggPortActorAdminKey'), ('IEEE8023-LAG-MIB', 'dot3adAggPortListPorts'), ('WWP-LEOS-PORT-MIB', 'wwpLeosEtherPortName'), ('WWP-LEOS-PORT-MIB', 'wwpLeosEtherPortDesc')) if mibBuilder.loadTexts: wwpLeosAggLinkUpDown.setStatus('current') if mibBuilder.loadTexts: wwpLeosAggLinkUpDown.setDescription('A wwpLeosAggLinkUpDown trap signifies that the SNMP entity, acting in an agent role, has detected that the ifOperStatus object for one of its communication links has changed state.') mibBuilder.exportSymbols('WWP-LEOS-PORT-MIB', wwpLeosEthLinkDown=wwpLeosEthLinkDown, wwpLeosEtherPortUntagCtrlVsi=wwpLeosEtherPortUntagCtrlVsi, wwpLeosEtherPortOperFlowCtrl=wwpLeosEtherPortOperFlowCtrl, wwpLeosEtherPortUntagDataVid=wwpLeosEtherPortUntagDataVid, wwpLeosEtherPortStateMirrorGroupMemStatus=wwpLeosEtherPortStateMirrorGroupMemStatus, wwpLeosEtherPortUntaggedPriority=wwpLeosEtherPortUntaggedPriority, wwpLeosEtherPortEntry=wwpLeosEtherPortEntry, wwpLeosEtherFixedRcos=wwpLeosEtherFixedRcos, wwpLeosEtherPortAdvertSpeed=wwpLeosEtherPortAdvertSpeed, wwpLeosEtherUntagEgressVlanId=wwpLeosEtherUntagEgressVlanId, wwpLeosEtherPortStateMirrorGroupType=wwpLeosEtherPortStateMirrorGroupType, wwpLeosEtherPortLinkFlapDetection=wwpLeosEtherPortLinkFlapDetection, wwpLeosEtherPortAdminStatus=wwpLeosEtherPortAdminStatus, PortEgressFrameCosPolicy=PortEgressFrameCosPolicy, wwpLeosEtherPortAcceptableFrameTypes=wwpLeosEtherPortAcceptableFrameTypes, wwpLeosPortMIBGroups=wwpLeosPortMIBGroups, wwpLeosEtherPortType=wwpLeosEtherPortType, wwpLeosEthLinkUp=wwpLeosEthLinkUp, wwpLeosEtherPortMirrorEgress=wwpLeosEtherPortMirrorEgress, wwpLeosEtherPortVsIngressFiltering=wwpLeosEtherPortVsIngressFiltering, wwpLeosEtherPortAdminAdvertisedFlowCtrl=wwpLeosEtherPortAdminAdvertisedFlowCtrl, wwpLeosEtherPortDesc=wwpLeosEtherPortDesc, wwpLeosEtherPortResolvedCosMapId=wwpLeosEtherPortResolvedCosMapId, wwpLeosEtherPortEgressPortQueueMapId=wwpLeosEtherPortEgressPortQueueMapId, wwpLeosEtherPortStateMirrorGroupMemOperState=wwpLeosEtherPortStateMirrorGroupMemOperState, wwpLeosEtherPortResolvedCosPolicy=wwpLeosEtherPortResolvedCosPolicy, wwpLeosPortMIBCompliances=wwpLeosPortMIBCompliances, wwpLeosEtherPortL2TransformMode=wwpLeosEtherPortL2TransformMode, wwpLeosEtherPortVlanIngressFiltering=wwpLeosEtherPortVlanIngressFiltering, wwpLeosPortMIBNotificationPrefix=wwpLeosPortMIBNotificationPrefix, wwpLeosEtherPortPhysAddr=wwpLeosEtherPortPhysAddr, wwpLeosEtherPortAutoNeg=wwpLeosEtherPortAutoNeg, wwpLeosEtherPortStateMirrorGroupMemTable=wwpLeosEtherPortStateMirrorGroupMemTable, wwpLeosEtherPortFlushActivate=wwpLeosEtherPortFlushActivate, wwpLeosEtherPortOperDuplex=wwpLeosEtherPortOperDuplex, wwpLeosEtherPort=wwpLeosEtherPort, wwpLeosEtherPortStateMirrorGroupNumSrcPorts=wwpLeosEtherPortStateMirrorGroupNumSrcPorts, wwpLeosEtherPortFlushTable=wwpLeosEtherPortFlushTable, wwpLeosEtherPortStateMirrorGroupStatus=wwpLeosEtherPortStateMirrorGroupStatus, wwpLeosEthAdminSpeedIncompatible=wwpLeosEthAdminSpeedIncompatible, wwpLeosEtherPortNotif=wwpLeosEtherPortNotif, wwpLeosEtherPortStateMirrorGroupMemEntry=wwpLeosEtherPortStateMirrorGroupMemEntry, wwpLeosEtherPortAdminFlowCtrl=wwpLeosEtherPortAdminFlowCtrl, wwpLeosEtherPortUntagCtrlVsiType=wwpLeosEtherPortUntagCtrlVsiType, wwpLeosEtherPortStateMirrorGroupMemType=wwpLeosEtherPortStateMirrorGroupMemType, wwpLeosEtherPortResolvedCosRemarkL2=wwpLeosEtherPortResolvedCosRemarkL2, wwpLeosEtherPortStateMirrorGroupName=wwpLeosEtherPortStateMirrorGroupName, wwpLeosPortMIB=wwpLeosPortMIB, wwpLeosEtherPortLinkUpDownTrapsEnable=wwpLeosEtherPortLinkUpDownTrapsEnable, wwpLeosEtherIngressPvid=wwpLeosEtherIngressPvid, wwpLeosPortMIBConformance=wwpLeosPortMIBConformance, wwpLeosEtherPortMirrorEncapTpid=wwpLeosEtherPortMirrorEncapTpid, wwpLeosEtherPortMirrorIngress=wwpLeosEtherPortMirrorIngress, wwpLeosEtherPortAdaptiveRateSpeed=wwpLeosEtherPortAdaptiveRateSpeed, wwpLeosEtherPortLinkFlapDetectTime=wwpLeosEtherPortLinkFlapDetectTime, wwpLeosEtherPortTrapsTable=wwpLeosEtherPortTrapsTable, wwpLeosEtherPortMirrorEncap=wwpLeosEtherPortMirrorEncap, wwpLeosEtherPortMacSaDaSwapVlan=wwpLeosEtherPortMacSaDaSwapVlan, wwpLeosEtherPortTrapsEntry=wwpLeosEtherPortTrapsEntry, wwpLeosEtherPortIngressFixedDot1dPri=wwpLeosEtherPortIngressFixedDot1dPri, wwpLeosEtherPortMirrorPort=wwpLeosEtherPortMirrorPort, wwpLeosPortMIBNotifications=wwpLeosPortMIBNotifications, wwpLeosEtherFixedRColor=wwpLeosEtherFixedRColor, wwpLeosEtherPortVplsPortType=wwpLeosEtherPortVplsPortType, wwpLeosEtherPortIngressCosPolicy=wwpLeosEtherPortIngressCosPolicy, wwpLeosEtherPortStateMirrorGroupTable=wwpLeosEtherPortStateMirrorGroupTable, wwpLeosEtherPortMode=wwpLeosEtherPortMode, wwpLeosEtherPortOperationalSpeed=wwpLeosEtherPortOperationalSpeed, wwpLeosEtherPortName=wwpLeosEtherPortName, wwpLeosEtherPortOperSpeed=wwpLeosEtherPortOperSpeed, wwpLeosEtherPortStateMirrorGroupOperStatus=wwpLeosEtherPortStateMirrorGroupOperStatus, wwpLeosEtherPortOperAutoNeg=wwpLeosEtherPortOperAutoNeg, wwpLeosAggLinkUpDown=wwpLeosAggLinkUpDown, wwpLeosPortMIBObjects=wwpLeosPortMIBObjects, wwpLeosEtherPortStateMirrorGroupEntry=wwpLeosEtherPortStateMirrorGroupEntry, PortIngressFixedColor=PortIngressFixedColor, wwpLeosEtherPortId=wwpLeosEtherPortId, wwpLeosEtherPortVlanIngressFilterStrict=wwpLeosEtherPortVlanIngressFilterStrict, wwpLeosEtherPortStateMirrorGroupId=wwpLeosEtherPortStateMirrorGroupId, wwpLeosEtherPortIfgDecrease=wwpLeosEtherPortIfgDecrease, wwpLeosEtherPortUpTime=wwpLeosEtherPortUpTime, wwpLeosEtherPortMirrorEncapVid=wwpLeosEtherPortMirrorEncapVid, wwpLeosEtherPortUntagDataVsi=wwpLeosEtherPortUntagDataVsi, wwpLeosEtherPortFrameCosMapId=wwpLeosEtherPortFrameCosMapId, wwpLeosEtherPortLinkFlapCount=wwpLeosEtherPortLinkFlapCount, wwpLeosEtherStndLinkUpDownTrapsEnable=wwpLeosEtherStndLinkUpDownTrapsEnable, wwpLeosEtherPortOperStatus=wwpLeosEtherPortOperStatus, wwpLeosEtherPortAdvertDuplex=wwpLeosEtherPortAdvertDuplex, wwpLeosEtherPortStateMirrorGroupNumDstPorts=wwpLeosEtherPortStateMirrorGroupNumDstPorts, PortList=PortList, wwpLeosEtherPortTrapsState=wwpLeosEtherPortTrapsState, wwpLeosEtherPortMaxFrameSize=wwpLeosEtherPortMaxFrameSize, wwpLeosEtherPortPhyLoopback=wwpLeosEtherPortPhyLoopback, wwpLeosEtherPortUntagDataVsiType=wwpLeosEtherPortUntagDataVsiType, wwpLeosEtherPortFlushEntry=wwpLeosEtherPortFlushEntry, wwpLeosEtherPortLinkFlapHoldTime=wwpLeosEtherPortLinkFlapHoldTime, PYSNMP_MODULE_ID=wwpLeosPortMIB, wwpLeosEtherPortEgressSpeed=wwpLeosEtherPortEgressSpeed, wwpLeosEthLinkFlap=wwpLeosEthLinkFlap, wwpLeosEtherPortTable=wwpLeosEtherPortTable, wwpLeosEtherAggPortLinkUpDownTrapsEnable=wwpLeosEtherAggPortLinkUpDownTrapsEnable, wwpLeosEtherPortMacSaDaSwap=wwpLeosEtherPortMacSaDaSwap, wwpLeosEtherPortEgressCosPolicy=wwpLeosEtherPortEgressCosPolicy, wwpLeosEtherPortAdminSpeed=wwpLeosEtherPortAdminSpeed, wwpLeosEtherPortAdminDuplex=wwpLeosEtherPortAdminDuplex)
budget = int(input()) season = input() fisherman = int(input()) rent_price = 0 if season == "Spring": rent_price = 3000 elif season == "Summer" or season == "Autumn": rent_price = 4200 elif season == "Winter": rent_price = 2600 if fisherman <= 6: rent_price = rent_price - (rent_price * 0.1) elif 7 <= fisherman <= 11: rent_price = rent_price - (rent_price * 0.15) elif fisherman >= 12: rent_price = rent_price - (rent_price * 0.25) if fisherman % 2 == 0 and season == "Spring": rent_price = rent_price - (rent_price * 0.05) elif fisherman % 2 == 0 and season == "Summer": rent_price = rent_price - (rent_price * 0.05) elif fisherman % 2 == 0 and season == "Winter": rent_price = rent_price - (rent_price * 0.05) else: rent_price = rent_price if budget >= rent_price: extra_money = budget - rent_price print(f"Yes! You have {extra_money:.2f} leva left.") else: lack = rent_price - budget print(f"Not enough money! You need {lack:.2f} leva.")
budget = int(input()) season = input() fisherman = int(input()) rent_price = 0 if season == 'Spring': rent_price = 3000 elif season == 'Summer' or season == 'Autumn': rent_price = 4200 elif season == 'Winter': rent_price = 2600 if fisherman <= 6: rent_price = rent_price - rent_price * 0.1 elif 7 <= fisherman <= 11: rent_price = rent_price - rent_price * 0.15 elif fisherman >= 12: rent_price = rent_price - rent_price * 0.25 if fisherman % 2 == 0 and season == 'Spring': rent_price = rent_price - rent_price * 0.05 elif fisherman % 2 == 0 and season == 'Summer': rent_price = rent_price - rent_price * 0.05 elif fisherman % 2 == 0 and season == 'Winter': rent_price = rent_price - rent_price * 0.05 else: rent_price = rent_price if budget >= rent_price: extra_money = budget - rent_price print(f'Yes! You have {extra_money:.2f} leva left.') else: lack = rent_price - budget print(f'Not enough money! You need {lack:.2f} leva.')
def pascal_triangle(n): if n == 0: return [1] else: row = [1] line_behind = pascal_triangle(n - 1) for r in range(len(line_behind) - 1): row.append(line_behind[r] + line_behind[r + 1]) row += [1] return row print(pascal_triangle(4))
def pascal_triangle(n): if n == 0: return [1] else: row = [1] line_behind = pascal_triangle(n - 1) for r in range(len(line_behind) - 1): row.append(line_behind[r] + line_behind[r + 1]) row += [1] return row print(pascal_triangle(4))
class YesError(Exception): pass class YesUserCanceledError(YesError): pass class YesUnknownIssuerError(YesError): pass class YesAccountSelectionRequested(YesError): redirect_uri: str class YesOAuthError(YesError): oauth_error: str oauth_error_description: str
class Yeserror(Exception): pass class Yesusercancelederror(YesError): pass class Yesunknownissuererror(YesError): pass class Yesaccountselectionrequested(YesError): redirect_uri: str class Yesoautherror(YesError): oauth_error: str oauth_error_description: str
class Packtry(object): @staticmethod def print(): print('print')
class Packtry(object): @staticmethod def print(): print('print')
class Constants: APPLICATION_TITLE = "Welcome to Kafka Local Setup Tool" APPLICATION_WINDOW_TITLE = "Kafka Application Tool" START_BUTTON = "Start" STOP_BUTTON = "Stop" CHOOSE_FOLDER = "Choose Folder" SELECT_FOLDER = "Select the folder" ZOOKEEPER_START_SERVER_PATH = "bin/zookeeper-server-start.sh" APACHE_ZOOKEEPER_START_SERVER_CONFIG = "config/zookeeper.properties" CONFLUENT_ZOOKEEPER_START_SERVER_CONFIG = "etc/zookeeper.properties" KAFKA_START_SERVER_PATH = "bin/kafka-server-start.sh" APACHE_KAFKA_START_SERVER_CONFIG = "config/server.properties" CONFLUENT_KAFKA_START_SERVER_CONFIG = "etc/server.properties" ZOOKEEPER_STOP_SERVER_PATH = "bin/zookeeper-server-stop.sh" KAFKA_STOP_SERVER_PATH = "bin/kafka-server-stop.sh" KAFKA_BASE_IMAGE = "app/images/kafka.png" APACHE_KAFKA = "Apache" CONFLUENT_KAFKA = "Confluent"
class Constants: application_title = 'Welcome to Kafka Local Setup Tool' application_window_title = 'Kafka Application Tool' start_button = 'Start' stop_button = 'Stop' choose_folder = 'Choose Folder' select_folder = 'Select the folder' zookeeper_start_server_path = 'bin/zookeeper-server-start.sh' apache_zookeeper_start_server_config = 'config/zookeeper.properties' confluent_zookeeper_start_server_config = 'etc/zookeeper.properties' kafka_start_server_path = 'bin/kafka-server-start.sh' apache_kafka_start_server_config = 'config/server.properties' confluent_kafka_start_server_config = 'etc/server.properties' zookeeper_stop_server_path = 'bin/zookeeper-server-stop.sh' kafka_stop_server_path = 'bin/kafka-server-stop.sh' kafka_base_image = 'app/images/kafka.png' apache_kafka = 'Apache' confluent_kafka = 'Confluent'
class User(): def __init__(self, Name, LastName, ID, Mail, Phone): self.Name = Name self.LastName = LastName self.ID = ID self.Mail = Mail self.Phone = Phone def Describe_U(self): s = "\nName: " + self.Name + " "+self.LastName + "\nID: "+self.ID s += "\nInfo contacto\nPhone: " + self.Phone + " Mail: " + self.Mail print(s) def Greet_U(self): s = "\nWelcome " + self.Name + " " + self.LastName + "\n" print(s) Usuarios = [] Usuarios.append(User("Omar","Padilla","1","omarpadilla@mail.com","1234567890")) Usuarios.append(User("Diego","Castillo","2","castillo117@mail.com","0987654321")) Usuarios.append(User("Fernanda","Cisneros","3","fercis@mail.com","7894561230")) Usuarios.append(User("Alejandra","Sanchez","4","alesa19@mail.com","3692581470")) Usuarios.append(User("Armando","Garces","5","chivascampeon@mail.com","4561237890")) for i in Usuarios: i.Describe_U() i.Greet_U()
class User: def __init__(self, Name, LastName, ID, Mail, Phone): self.Name = Name self.LastName = LastName self.ID = ID self.Mail = Mail self.Phone = Phone def describe_u(self): s = '\nName: ' + self.Name + ' ' + self.LastName + '\nID: ' + self.ID s += '\nInfo contacto\nPhone: ' + self.Phone + ' Mail: ' + self.Mail print(s) def greet_u(self): s = '\nWelcome ' + self.Name + ' ' + self.LastName + '\n' print(s) usuarios = [] Usuarios.append(user('Omar', 'Padilla', '1', 'omarpadilla@mail.com', '1234567890')) Usuarios.append(user('Diego', 'Castillo', '2', 'castillo117@mail.com', '0987654321')) Usuarios.append(user('Fernanda', 'Cisneros', '3', 'fercis@mail.com', '7894561230')) Usuarios.append(user('Alejandra', 'Sanchez', '4', 'alesa19@mail.com', '3692581470')) Usuarios.append(user('Armando', 'Garces', '5', 'chivascampeon@mail.com', '4561237890')) for i in Usuarios: i.Describe_U() i.Greet_U()
with open("data_100.vrt", "rb") as f_in: with open("data_broken_header.vrt", "wb") as f_out: f_out.write(f_in.read(2)) with open("data_missing_fields.vrt", "wb") as f_out: f_out.write(f_in.read(4)) with open("data_broken_fields.vrt", "wb") as f_out: f_out.write(f_in.read(6)) with open("data_missing_trailer.vrt", "wb") as f_out: f_out.write(f_in.read(4 * 514)) with open("data_missing_words.vrt", "wb") as f_out: f_out.write(f_in.read(4 * 514)) f_in.seek(4 * 7) f_out.write(f_in.read(4 * 10 * 515)) with open("if_context_100.vrt", "rb") as f_in: with open("if_context_missing_context.vrt", "wb") as f_out: f_out.write(f_in.read(4 * 2)) with open("if_context_broken_context.vrt", "wb") as f_out: f_out.write(f_in.read(4 * 3))
with open('data_100.vrt', 'rb') as f_in: with open('data_broken_header.vrt', 'wb') as f_out: f_out.write(f_in.read(2)) with open('data_missing_fields.vrt', 'wb') as f_out: f_out.write(f_in.read(4)) with open('data_broken_fields.vrt', 'wb') as f_out: f_out.write(f_in.read(6)) with open('data_missing_trailer.vrt', 'wb') as f_out: f_out.write(f_in.read(4 * 514)) with open('data_missing_words.vrt', 'wb') as f_out: f_out.write(f_in.read(4 * 514)) f_in.seek(4 * 7) f_out.write(f_in.read(4 * 10 * 515)) with open('if_context_100.vrt', 'rb') as f_in: with open('if_context_missing_context.vrt', 'wb') as f_out: f_out.write(f_in.read(4 * 2)) with open('if_context_broken_context.vrt', 'wb') as f_out: f_out.write(f_in.read(4 * 3))
n = int(input()) arr = [int(x) for x in input().split()] if all(item < 0 for item in arr): print(0) else: mx = 0 su = 0 for item in arr: su += item if su < 0: su = 0 if su > mx: mx = su print(mx)
n = int(input()) arr = [int(x) for x in input().split()] if all((item < 0 for item in arr)): print(0) else: mx = 0 su = 0 for item in arr: su += item if su < 0: su = 0 if su > mx: mx = su print(mx)
def flatten_list(mylist,index=0,newlist=[]): if(index==len(mylist)): return newlist if(type(mylist[index])== list): newlist.extend(flatten_list(mylist[index],0,[])) else: newlist.append(mylist[index]) return flatten_list(mylist,index+1,newlist) mylist=[1,2,[3,4],[5,[6,7,[8]]],[],9] print(mylist) flat_list= flatten_list(mylist) print(flat_list)
def flatten_list(mylist, index=0, newlist=[]): if index == len(mylist): return newlist if type(mylist[index]) == list: newlist.extend(flatten_list(mylist[index], 0, [])) else: newlist.append(mylist[index]) return flatten_list(mylist, index + 1, newlist) mylist = [1, 2, [3, 4], [5, [6, 7, [8]]], [], 9] print(mylist) flat_list = flatten_list(mylist) print(flat_list)
class Service(object): '''Basic service interface. If you want your own service, you should respect this interface so that your service can be used by the looper. ''' def __init__(self, cfg, comp, outdir): ''' cfg: framework.config.Service object containing whatever parameters you need comp: dummy parameter outdir: output directory for your service (feel free not to use it) Please have a look at TFileService for more information ''' def start(self): '''Start the service. Called by the looper, not by the user. ''' pass def stop(self): '''Stop the service. Called by the looper, not by the user. ''' pass
class Service(object): """Basic service interface. If you want your own service, you should respect this interface so that your service can be used by the looper. """ def __init__(self, cfg, comp, outdir): """ cfg: framework.config.Service object containing whatever parameters you need comp: dummy parameter outdir: output directory for your service (feel free not to use it) Please have a look at TFileService for more information """ def start(self): """Start the service. Called by the looper, not by the user. """ pass def stop(self): """Stop the service. Called by the looper, not by the user. """ pass
def shorten_string(string : str, max_length : int): shortened_name = string if len(string) > max_length: shortened_name = string[0:max_length] + '...' return shortened_name
def shorten_string(string: str, max_length: int): shortened_name = string if len(string) > max_length: shortened_name = string[0:max_length] + '...' return shortened_name
#!/usr/bin/env python3 # # Prints to stdout very fast. # # Optimal time: # time ./stress.py >/dev/null # Actual time: # time ./stress.py for i in range(1000000): print('\033[31;1m', i, '\033[0m')
for i in range(1000000): print('\x1b[31;1m', i, '\x1b[0m')
GstreamerPackage ('gstreamer', 'gst-plugins-bad', '0.10.23', configure_flags = [ ' --disable-gtk-doc', ' --with-plugins=quicktime', ' --disable-apexsink', ' --disable-bz2', ' --disable-metadata', ' --disable-oss4', ' --disable-theoradec' ])
gstreamer_package('gstreamer', 'gst-plugins-bad', '0.10.23', configure_flags=[' --disable-gtk-doc', ' --with-plugins=quicktime', ' --disable-apexsink', ' --disable-bz2', ' --disable-metadata', ' --disable-oss4', ' --disable-theoradec'])
n = int(input()) list_names = [] for i in range(n): name = input() list_names.append(name) print(list_names)
n = int(input()) list_names = [] for i in range(n): name = input() list_names.append(name) print(list_names)
def mergeSort(myArray): # print to show splitting print("Splitting ",myArray) # if array is greater than 1 then: if len(myArray) > 1: # mid, leftside, and right side of array stored as variables mid = len(myArray)//2 lefthalf = myArray[:mid] righthalf = myArray[mid:] # function mergeSort passed both sides of array mergeSort(lefthalf) mergeSort(righthalf) # initialise i=0 j=0 k=0 # while loop, while i less than the length of leftside of array and right side of the array do the following while i < len(lefthalf) and j < len(righthalf): if lefthalf[i] < righthalf[j]: myArray[k] = lefthalf[i] i=i+1 else: myArray[k] = righthalf[j] j = j+1 k = k+1 # while loop, while i less than the length of leftside of array do the following while i < len(lefthalf): myArray[k] = lefthalf[i] i = i+1 k = k+1 # while loop, while j less than the length of rightside of array do the following while j < len(righthalf): myArray[k] = righthalf[j] j = j+1 k = k+1 # print to show merging print("Merging ",myArray) myArrray = [22,55,91,15,66,22,25,5,18] mergeSort(myArrray) print(myArrray)
def merge_sort(myArray): print('Splitting ', myArray) if len(myArray) > 1: mid = len(myArray) // 2 lefthalf = myArray[:mid] righthalf = myArray[mid:] merge_sort(lefthalf) merge_sort(righthalf) i = 0 j = 0 k = 0 while i < len(lefthalf) and j < len(righthalf): if lefthalf[i] < righthalf[j]: myArray[k] = lefthalf[i] i = i + 1 else: myArray[k] = righthalf[j] j = j + 1 k = k + 1 while i < len(lefthalf): myArray[k] = lefthalf[i] i = i + 1 k = k + 1 while j < len(righthalf): myArray[k] = righthalf[j] j = j + 1 k = k + 1 print('Merging ', myArray) my_arrray = [22, 55, 91, 15, 66, 22, 25, 5, 18] merge_sort(myArrray) print(myArrray)
#!/usr/bin/env python3 class Flower(): color = 'unknown' rose = Flower() rose.color = "red" violet = Flower() violet.color = "blue" this_pun_is_for_you = "The honey is sweet and so are you" print("Roses are {},".format(rose.color)) print("violets are {},".format(violet.color)) print(this_pun_is_for_you)
class Flower: color = 'unknown' rose = flower() rose.color = 'red' violet = flower() violet.color = 'blue' this_pun_is_for_you = 'The honey is sweet and so are you' print('Roses are {},'.format(rose.color)) print('violets are {},'.format(violet.color)) print(this_pun_is_for_you)
def query(start, end): if start < end: print('M {} {}'.format(start, end), flush=True) else: print('M {} {}'.format(end, start), flush=True) def swap(pos1, pos2): if pos1 < pos2: print('S {} {}'.format(pos1, pos2), flush=True) else: print('S {} {}'.format(pos2, pos1), flush=True) def solve(n): for i in range(1, n): start = i end = n query(start, end) min = int(input()) if min != i: swap(min, i) print('D') result = int(input()) if result != 1: quit() if __name__ == '__main__': t, n = list(map(int, input().split())) for case in range(1, t+1): solve(n)
def query(start, end): if start < end: print('M {} {}'.format(start, end), flush=True) else: print('M {} {}'.format(end, start), flush=True) def swap(pos1, pos2): if pos1 < pos2: print('S {} {}'.format(pos1, pos2), flush=True) else: print('S {} {}'.format(pos2, pos1), flush=True) def solve(n): for i in range(1, n): start = i end = n query(start, end) min = int(input()) if min != i: swap(min, i) print('D') result = int(input()) if result != 1: quit() if __name__ == '__main__': (t, n) = list(map(int, input().split())) for case in range(1, t + 1): solve(n)
# -*- mode: python -*- DOCUMENTATION = ''' --- module: group_by short_description: Create Ansible groups based on facts description: - Use facts to create ad-hoc groups that can be used later in a playbook. version_added: "0.9" options: key: description: - The variables whose values will be used as groups required: true author: Jeroen Hoekx notes: - Spaces in group names are converted to dashes '-'. ''' EXAMPLES = ''' # Create groups based on the machine architecture - group_by: key=machine_{{ ansible_machine }} # Create groups like 'kvm-host' - group_by: key=virt_{{ ansible_virtualization_type }}_{{ ansible_virtualization_role }} '''
documentation = '\n---\nmodule: group_by\nshort_description: Create Ansible groups based on facts\ndescription:\n - Use facts to create ad-hoc groups that can be used later in a playbook.\nversion_added: "0.9"\noptions:\n key:\n description:\n - The variables whose values will be used as groups\n required: true\nauthor: Jeroen Hoekx\nnotes:\n - Spaces in group names are converted to dashes \'-\'.\n' examples = "\n# Create groups based on the machine architecture\n- group_by: key=machine_{{ ansible_machine }}\n# Create groups like 'kvm-host'\n- group_by: key=virt_{{ ansible_virtualization_type }}_{{ ansible_virtualization_role }}\n"
#class that represents a resource class Resource: def __init__(self,name,id): self.name = name self.ID = id self.aliases = [name] #list of all the events this resource is involved in #reflects when the resource worked on which object #list of Event objects self.events = [] def getName(self): return self.name def setName(self,name): self.name = name def getID(self): return self.ID #add an alias for this resource def addAlias(self,name): if not (name in self.aliases): self.aliases.append(name) #get list of resource names def getNames(self): return self.aliases #returns a string of all the resource aliases def getLabel(self): label = "" count = 0 for alias in self.aliases: if(count != 0): label += "+" label += alias count += 1 return label def getEvents(self): return self.events #Append this event to the resource's list of events in which he was involved #@param event : event object def addEvent(self,event): self.events.append(event) #@returns a list of all the objects this programmer worked on in his Event list def getListOfObjects(self): files = [] for e in self.events: f = e.getObject() if f not in files: files.append(f) return files #@param file : Object object #@returns a list of time stamps the programmer worked on this object def getTimestampsForObject(self,file): timestamps = [] for e in self.events: if e.getObject() == file: time = e.getTimestamp() if time not in timestamps: timestamps.append(time) return timestamps
class Resource: def __init__(self, name, id): self.name = name self.ID = id self.aliases = [name] self.events = [] def get_name(self): return self.name def set_name(self, name): self.name = name def get_id(self): return self.ID def add_alias(self, name): if not name in self.aliases: self.aliases.append(name) def get_names(self): return self.aliases def get_label(self): label = '' count = 0 for alias in self.aliases: if count != 0: label += '+' label += alias count += 1 return label def get_events(self): return self.events def add_event(self, event): self.events.append(event) def get_list_of_objects(self): files = [] for e in self.events: f = e.getObject() if f not in files: files.append(f) return files def get_timestamps_for_object(self, file): timestamps = [] for e in self.events: if e.getObject() == file: time = e.getTimestamp() if time not in timestamps: timestamps.append(time) return timestamps
class Book(): def __init__(self, name) -> None: self._name = name def get_name(self): return self._name class BookShelf(): def __init__(self) -> None: self._books: list[Book] = [] def append(self, book: Book): self._books.append(book) def get_book_at(self, index): return self._books[index] def is_valid(self, index): return 0 <= index < len(self._books) bookShelf = BookShelf() bookShelf.append(Book("Around the World in 80 days")) bookShelf.append(Book("Bible")) bookShelf.append(Book("Cinderella")) bookShelf.append(Book("Daddy-Long-Legs")) index = 0 while bookShelf.is_valid(index): book = bookShelf.get_book_at(index) print(book.get_name()) index += 1
class Book: def __init__(self, name) -> None: self._name = name def get_name(self): return self._name class Bookshelf: def __init__(self) -> None: self._books: list[Book] = [] def append(self, book: Book): self._books.append(book) def get_book_at(self, index): return self._books[index] def is_valid(self, index): return 0 <= index < len(self._books) book_shelf = book_shelf() bookShelf.append(book('Around the World in 80 days')) bookShelf.append(book('Bible')) bookShelf.append(book('Cinderella')) bookShelf.append(book('Daddy-Long-Legs')) index = 0 while bookShelf.is_valid(index): book = bookShelf.get_book_at(index) print(book.get_name()) index += 1
# -*- coding: utf-8 -*- def main(): s = input() k = int(input()) count = 0 for si in s: if si == '1': count += 1 else: break if s[0] != '1': print(s[0]) else: if k <= count: print(1) else: print(s[count]) if __name__ == '__main__': main()
def main(): s = input() k = int(input()) count = 0 for si in s: if si == '1': count += 1 else: break if s[0] != '1': print(s[0]) elif k <= count: print(1) else: print(s[count]) if __name__ == '__main__': main()
values = input("please fill value: ") previous = [] result = [] def isAEIOU(value): # value = str(value) if value.upper() == 'A': return True elif value.upper() == 'E': return True elif value.upper() == 'I': return True elif value.upper() == 'O': return True elif value.upper() == 'U': return True return False for value in values : if isAEIOU(value) : previous.append(value) if len(previous) > 1: result.append(''.join(previous)) else : previous.clear() print(len(result)) print(result)
values = input('please fill value: ') previous = [] result = [] def is_aeiou(value): if value.upper() == 'A': return True elif value.upper() == 'E': return True elif value.upper() == 'I': return True elif value.upper() == 'O': return True elif value.upper() == 'U': return True return False for value in values: if is_aeiou(value): previous.append(value) if len(previous) > 1: result.append(''.join(previous)) else: previous.clear() print(len(result)) print(result)
__author__ = 'Shane' class ClassToPass: def __init__(self, int1=int(), int2=int()): self.int1 = int1 self.int2 = int2 def gimmeTheSum(self, a, b) -> int: return a + b
__author__ = 'Shane' class Classtopass: def __init__(self, int1=int(), int2=int()): self.int1 = int1 self.int2 = int2 def gimme_the_sum(self, a, b) -> int: return a + b
N = input() N = '0' + N result = 0 carry = 0 for i in range(len(N) - 1, 0, -1): c = int(N[i]) + carry n = int(N[i - 1]) if c < 5 or (c == 5 and n < 5): result += c carry = 0 else: result += 10 - c carry = 1 result += carry print(result)
n = input() n = '0' + N result = 0 carry = 0 for i in range(len(N) - 1, 0, -1): c = int(N[i]) + carry n = int(N[i - 1]) if c < 5 or (c == 5 and n < 5): result += c carry = 0 else: result += 10 - c carry = 1 result += carry print(result)
class Demo: def __init__(self, name): self.name = name print("Started!") def hello(self): print("Hey " + self.name + "!") def goodbye(self): print("Good-bye " + self.name + "!") m = Demo("Alexa") m.hello() m.goodbye()
class Demo: def __init__(self, name): self.name = name print('Started!') def hello(self): print('Hey ' + self.name + '!') def goodbye(self): print('Good-bye ' + self.name + '!') m = demo('Alexa') m.hello() m.goodbye()
assert set([1,2]) == set([1,2]) assert not set([1,2,3]) == set([1,2]) assert set([1,2,3]) >= set([1,2]) assert set([1,2]) >= set([1,2]) assert not set([1,3]) >= set([1,2]) assert set([1,2,3]).issuperset(set([1,2])) assert set([1,2]).issuperset(set([1,2])) assert not set([1,3]).issuperset(set([1,2])) assert set([1,2,3]) > set([1,2]) assert not set([1,2]) > set([1,2]) assert not set([1,3]) > set([1,2]) assert set([1,2]) <= set([1,2,3]) assert set([1,2]) <= set([1,2]) assert not set([1,3]) <= set([1,2]) assert set([1,2]).issubset(set([1,2,3])) assert set([1,2]).issubset(set([1,2])) assert not set([1,3]).issubset(set([1,2])) assert set([1,2]) < set([1,2,3]) assert not set([1,2]) < set([1,2]) assert not set([1,3]) < set([1,2]) class Hashable(object): def __init__(self, obj): self.obj = obj def __repr__(self): return repr(self.obj) def __hash__(self): return id(self) recursive = set() recursive.add(Hashable(recursive)) assert repr(recursive) == "{set(...)}" a = set([1, 2, 3]) assert len(a) == 3 a.clear() assert len(a) == 0 assert set([1,2,3]).union(set([4,5])) == set([1,2,3,4,5]) assert set([1,2,3]).union(set([1,2,3,4,5])) == set([1,2,3,4,5]) assert set([1,2,3]) | set([4,5]) == set([1,2,3,4,5]) assert set([1,2,3]) | set([1,2,3,4,5]) == set([1,2,3,4,5]) assert set([1,2,3]).intersection(set([1,2])) == set([1,2]) assert set([1,2,3]).intersection(set([5,6])) == set([]) assert set([1,2,3]) & set([4,5]) == set([]) assert set([1,2,3]) & set([1,2,3,4,5]) == set([1,2,3]) assert set([1,2,3]).difference(set([1,2])) == set([3]) assert set([1,2,3]).difference(set([5,6])) == set([1,2,3]) assert set([1,2,3]) - set([4,5]) == set([1,2,3]) assert set([1,2,3]) - set([1,2,3,4,5]) == set([]) assert set([1,2,3]).symmetric_difference(set([1,2])) == set([3]) assert set([1,2,3]).symmetric_difference(set([5,6])) == set([1,2,3,5,6]) assert set([1,2,3]) ^ set([4,5]) == set([1,2,3,4,5]) assert set([1,2,3]) ^ set([1,2,3,4,5]) == set([4,5]) try: set([[]]) except TypeError: pass else: assert False, "TypeError was not raised" try: set().add([]) except TypeError: pass else: assert False, "TypeError was not raised"
assert set([1, 2]) == set([1, 2]) assert not set([1, 2, 3]) == set([1, 2]) assert set([1, 2, 3]) >= set([1, 2]) assert set([1, 2]) >= set([1, 2]) assert not set([1, 3]) >= set([1, 2]) assert set([1, 2, 3]).issuperset(set([1, 2])) assert set([1, 2]).issuperset(set([1, 2])) assert not set([1, 3]).issuperset(set([1, 2])) assert set([1, 2, 3]) > set([1, 2]) assert not set([1, 2]) > set([1, 2]) assert not set([1, 3]) > set([1, 2]) assert set([1, 2]) <= set([1, 2, 3]) assert set([1, 2]) <= set([1, 2]) assert not set([1, 3]) <= set([1, 2]) assert set([1, 2]).issubset(set([1, 2, 3])) assert set([1, 2]).issubset(set([1, 2])) assert not set([1, 3]).issubset(set([1, 2])) assert set([1, 2]) < set([1, 2, 3]) assert not set([1, 2]) < set([1, 2]) assert not set([1, 3]) < set([1, 2]) class Hashable(object): def __init__(self, obj): self.obj = obj def __repr__(self): return repr(self.obj) def __hash__(self): return id(self) recursive = set() recursive.add(hashable(recursive)) assert repr(recursive) == '{set(...)}' a = set([1, 2, 3]) assert len(a) == 3 a.clear() assert len(a) == 0 assert set([1, 2, 3]).union(set([4, 5])) == set([1, 2, 3, 4, 5]) assert set([1, 2, 3]).union(set([1, 2, 3, 4, 5])) == set([1, 2, 3, 4, 5]) assert set([1, 2, 3]) | set([4, 5]) == set([1, 2, 3, 4, 5]) assert set([1, 2, 3]) | set([1, 2, 3, 4, 5]) == set([1, 2, 3, 4, 5]) assert set([1, 2, 3]).intersection(set([1, 2])) == set([1, 2]) assert set([1, 2, 3]).intersection(set([5, 6])) == set([]) assert set([1, 2, 3]) & set([4, 5]) == set([]) assert set([1, 2, 3]) & set([1, 2, 3, 4, 5]) == set([1, 2, 3]) assert set([1, 2, 3]).difference(set([1, 2])) == set([3]) assert set([1, 2, 3]).difference(set([5, 6])) == set([1, 2, 3]) assert set([1, 2, 3]) - set([4, 5]) == set([1, 2, 3]) assert set([1, 2, 3]) - set([1, 2, 3, 4, 5]) == set([]) assert set([1, 2, 3]).symmetric_difference(set([1, 2])) == set([3]) assert set([1, 2, 3]).symmetric_difference(set([5, 6])) == set([1, 2, 3, 5, 6]) assert set([1, 2, 3]) ^ set([4, 5]) == set([1, 2, 3, 4, 5]) assert set([1, 2, 3]) ^ set([1, 2, 3, 4, 5]) == set([4, 5]) try: set([[]]) except TypeError: pass else: assert False, 'TypeError was not raised' try: set().add([]) except TypeError: pass else: assert False, 'TypeError was not raised'
def makeGood(s: str) -> str: stack = [] for i in range(len(s)): if stack and ((s[i].isupper() and stack[-1] == s[i].lower()) or (s[i].islower() and stack[-1] == s[i].upper())): stack.pop() else: stack.append(s[i]) return ''.join(stack)
def make_good(s: str) -> str: stack = [] for i in range(len(s)): if stack and (s[i].isupper() and stack[-1] == s[i].lower() or (s[i].islower() and stack[-1] == s[i].upper())): stack.pop() else: stack.append(s[i]) return ''.join(stack)
#Given a binary tree, return all root-to-leaf paths. # dfs+stack, bfs+queue, dfs recursively class Solution: def binaryTreePaths1(self, root): if not root: return [] res, stack = [], [(root, "")] while stack: node, ls = stack.pop() if not node.left and not node.right: res.append(ls+str(node.val)) if node.right: stack.append((node.right, ls+str(node.val)+"->")) if node.left: stack.append((node.left, ls+str(node.val)+"->")) return res # bfs + queue def binaryTreePaths2(self, root): if not root: return [] res, queue = [], collections.deque([(root, "")]) while queue: node, ls = queue.popleft() if not node.left and not node.right: res.append(ls+str(node.val)) if node.left: queue.append((node.left, ls+str(node.val)+"->")) if node.right: queue.append((node.right, ls+str(node.val)+"->")) return res # dfs recursively def binaryTreePaths(self, root): if not root: return [] res = [] self.dfs(root, "", res) return res def dfs(self, root, ls, res): if not root.left and not root.right: res.append(ls+str(root.val)) if root.left: self.dfs(root.left, ls+str(root.val)+"->", res) if root.right: self.dfs(root.right, ls+str(root.val)+"->", res)
class Solution: def binary_tree_paths1(self, root): if not root: return [] (res, stack) = ([], [(root, '')]) while stack: (node, ls) = stack.pop() if not node.left and (not node.right): res.append(ls + str(node.val)) if node.right: stack.append((node.right, ls + str(node.val) + '->')) if node.left: stack.append((node.left, ls + str(node.val) + '->')) return res def binary_tree_paths2(self, root): if not root: return [] (res, queue) = ([], collections.deque([(root, '')])) while queue: (node, ls) = queue.popleft() if not node.left and (not node.right): res.append(ls + str(node.val)) if node.left: queue.append((node.left, ls + str(node.val) + '->')) if node.right: queue.append((node.right, ls + str(node.val) + '->')) return res def binary_tree_paths(self, root): if not root: return [] res = [] self.dfs(root, '', res) return res def dfs(self, root, ls, res): if not root.left and (not root.right): res.append(ls + str(root.val)) if root.left: self.dfs(root.left, ls + str(root.val) + '->', res) if root.right: self.dfs(root.right, ls + str(root.val) + '->', res)
class Solution: def diagonalSum(self, mat: List[List[int]]) -> int: sum = 0 n = len(mat) for i in range(n): sum += mat[i][i] if i != n - 1 - i: sum += mat[i][n - 1 - i] return sum
class Solution: def diagonal_sum(self, mat: List[List[int]]) -> int: sum = 0 n = len(mat) for i in range(n): sum += mat[i][i] if i != n - 1 - i: sum += mat[i][n - 1 - i] return sum
def courses_list(user=None): user = auth.user if not user else db(db.users.id==user).select().first() if user.type_==1: courses = db(db.registered_courses.professor==user.id).select(db.registered_courses.course_id) courses = map(lambda x: x.course_id, courses) else: courses = db(db.student_registrations.student_id==user.id).select(db.student_registrations.registered_course_id) courses = map(lambda x: x.registered_course_id, courses) courses = db(db.courses.id.belongs(courses)).select() return dict(current_year=get_current_year(), current_sem=get_current_sem(), courses=courses, user=user)
def courses_list(user=None): user = auth.user if not user else db(db.users.id == user).select().first() if user.type_ == 1: courses = db(db.registered_courses.professor == user.id).select(db.registered_courses.course_id) courses = map(lambda x: x.course_id, courses) else: courses = db(db.student_registrations.student_id == user.id).select(db.student_registrations.registered_course_id) courses = map(lambda x: x.registered_course_id, courses) courses = db(db.courses.id.belongs(courses)).select() return dict(current_year=get_current_year(), current_sem=get_current_sem(), courses=courses, user=user)
def check_inners(rule): if target in rules[rule]: return 1 for bag in rules[rule]: if check_inners(bag): return 1 return 0 def part1(): count = 0 for rule in rules: #print(rule) if rule == target: next else: count += check_inners(rule) print('part 1 = ',count) ######################### def counting(rule): count = 0 for bag in rules[rule]: count += rules[rule][bag] count += rules[rule][bag] * counting(bag) return count def part2(): print('part 2 = ',counting(target)) ############################## target = "shiny gold" rules = dict() for line in open("input.txt"): main = line.split("bags contain")[0].strip() rules[main] = dict() inside = line.split("bags contain")[1].split(',') for bag in inside: if not "no other bags" in bag: bag = bag.replace('bags','').replace('bag','').replace('.','').strip() rules[main][' '.join(bag.split(' ')[1:] )] = int(bag.split(' ')[0]) part1() part2()
def check_inners(rule): if target in rules[rule]: return 1 for bag in rules[rule]: if check_inners(bag): return 1 return 0 def part1(): count = 0 for rule in rules: if rule == target: next else: count += check_inners(rule) print('part 1 = ', count) def counting(rule): count = 0 for bag in rules[rule]: count += rules[rule][bag] count += rules[rule][bag] * counting(bag) return count def part2(): print('part 2 = ', counting(target)) target = 'shiny gold' rules = dict() for line in open('input.txt'): main = line.split('bags contain')[0].strip() rules[main] = dict() inside = line.split('bags contain')[1].split(',') for bag in inside: if not 'no other bags' in bag: bag = bag.replace('bags', '').replace('bag', '').replace('.', '').strip() rules[main][' '.join(bag.split(' ')[1:])] = int(bag.split(' ')[0]) part1() part2()
#practice using data structures and several algorithms #compiled all classes into one class Node: def __init__(self, data): self.data = data self.next = None class BinaryNode: def __init__(self, data): self.data = data self.left = None self.right = None self.val = data class GraphNode: def __init__(self, data, adj=[], visited=0): self.data = data self.adj = adj self.next = None self.visited = visited def print_node(self): return self.data def print_adj(self): return self.adj def update_adj(self, arr): self.adj = arr class LinkedList: def __init__(self): self.head = None def getNodeValue(self, node): return node.data def deleteNode(self, key): headnode = self.head if headnode.data == key: headnode.data = None self.head = headnode.next else: prevnode = headnode headnode = headnode.next while headnode != None: #print(prevnode.data, headnode.data) if headnode.data == key: prevnode.next = headnode.next headnode = None else: prevnode = headnode headnode = headnode.next def insertNode(self, key, placement): insertnode = Node(key) headnode = self.head if placement == "start": insertnode.next = self.head self.head = insertnode if placement == "end": while headnode != None: #print(headnode.data) if headnode.next == None: headnode.next = insertnode break else: headnode = headnode.next def insertNodeBtwn(self, key, front, back): frontnode = self.head backnode = self.head.next while backnode != None: if frontnode.data == front and backnode.data == back: insertnode = Node(key) frontnode.next = insertnode insertnode.next = backnode break else: backnode = backnode.next frontnode = frontnode.next def printLList(self): nodeList = [] headnode = self.head while headnode != None: #print(headnode.data) nodeList.append(headnode.data) #print(headnode.data) headnode = headnode.next return nodeList class BinaryTree: def __init__(self): self.root = None #def rebalance(self, currNode): #while def visitTree(self, currNode): if currNode != None: self.visitTree(currNode.left) print(currNode.data) self.visitTree(currNode.right) def insertNode(self, nodeRoot, data): if self.root == None: self.root = BinaryNode(data) elif nodeRoot == None: #return nodeRoot(data) return BinaryNode(data) else: if nodeRoot.data == data: return nodeRoot elif nodeRoot.data < data: nodeRoot.right = self.insertNode(nodeRoot.right, data) else: nodeRoot.left = self.insertNode(nodeRoot.left, data) return nodeRoot def updateRoot(self, data): self.root = BinaryNode(data) def peek(self): return self.root.data class MinHeap: def __init__(self): self.arr = [] self.root = None def insert_node(self, val): self.arr.append(val) self.sift_up(val) def sift_up(self, curr_node): parent_pos = self.arr.index(curr_node)//2 child_pos = self.arr.index(curr_node) while self.arr[child_pos] < self.arr[parent_pos]: self.swap(self.arr.index(curr_node),(self.arr.index(curr_node)//2)) child_pos = parent_pos parent_pos = parent_pos//2 def swap(self, first_pos, second_pos): self.arr[first_pos], self.arr[second_pos] = self.arr[second_pos], self.arr[first_pos] def print_heap(self): print(self.arr) class Queue: def __init__(self): self.frontNode = None self.backNode = None def queueNode(self, newNode): #newNode = Node(key) if isinstance(newNode, GraphNode) or isinstance(newNode, Node): if self.backNode != None: self.backNode.next = newNode self.backNode = newNode if self.frontNode is None: self.frontNode = self.backNode else: return def dequeueNode(self): if self.frontNode is None: return data = self.frontNode self.frontNode = self.frontNode.next if self.frontNode is None: self.backNode = None return data def peek(self): return self.frontNode.data def isEmpty(self): if self.frontNode == None: return True else: return False def printQueue(self, currNode): arr = [] while currNode != None: arr.append(currNode.data) currNode = currNode.next print(arr) class Stack: def __init__(self): self.topNode = None def pushNode(self, newNode): if isinstance(newNode, Node): if self.topNode == None: self.topNode = newNode else: newNode.next = self.topNode self.topNode = newNode else: return def popNode(self): if self.topNode == None: return self.topNode = self.topNode.next def peek(self): return self.topNode.data def dfs(curr_node): if curr_node == None: return print(curr_node.print_node()) curr_node.visited = 1 for n in curr_node.adj: if n.visited == 0: dfs(n) def bfs(curr_node): order = Queue() #print(order.isEmpty()) curr_node.visited = 1 order.queueNode(curr_node) print(curr_node.data) #order.printQueue(curr_node) #print(order.isEmpty()) #print(curr_node.data) #print(order.frontNode.data) while order.isEmpty() != True: #print(order.isEmpty()) #print(curr_node.data) next_node = order.dequeueNode() next_node.visited = 1 order.printQueue(next_node) print("Dequeued " + str(next_node.data)) #print(order.isEmpty()) #print(next_node.adj) for n in next_node.adj: #print(n.visited) if n.visited == 0: print("Adding " + str(n.data) + " to queue") n.visited = 1 #print("Node " + str(n.data) + " visited " + str(n.visited)) order.queueNode(n) #print(order.peek())
class Node: def __init__(self, data): self.data = data self.next = None class Binarynode: def __init__(self, data): self.data = data self.left = None self.right = None self.val = data class Graphnode: def __init__(self, data, adj=[], visited=0): self.data = data self.adj = adj self.next = None self.visited = visited def print_node(self): return self.data def print_adj(self): return self.adj def update_adj(self, arr): self.adj = arr class Linkedlist: def __init__(self): self.head = None def get_node_value(self, node): return node.data def delete_node(self, key): headnode = self.head if headnode.data == key: headnode.data = None self.head = headnode.next else: prevnode = headnode headnode = headnode.next while headnode != None: if headnode.data == key: prevnode.next = headnode.next headnode = None else: prevnode = headnode headnode = headnode.next def insert_node(self, key, placement): insertnode = node(key) headnode = self.head if placement == 'start': insertnode.next = self.head self.head = insertnode if placement == 'end': while headnode != None: if headnode.next == None: headnode.next = insertnode break else: headnode = headnode.next def insert_node_btwn(self, key, front, back): frontnode = self.head backnode = self.head.next while backnode != None: if frontnode.data == front and backnode.data == back: insertnode = node(key) frontnode.next = insertnode insertnode.next = backnode break else: backnode = backnode.next frontnode = frontnode.next def print_l_list(self): node_list = [] headnode = self.head while headnode != None: nodeList.append(headnode.data) headnode = headnode.next return nodeList class Binarytree: def __init__(self): self.root = None def visit_tree(self, currNode): if currNode != None: self.visitTree(currNode.left) print(currNode.data) self.visitTree(currNode.right) def insert_node(self, nodeRoot, data): if self.root == None: self.root = binary_node(data) elif nodeRoot == None: return binary_node(data) else: if nodeRoot.data == data: return nodeRoot elif nodeRoot.data < data: nodeRoot.right = self.insertNode(nodeRoot.right, data) else: nodeRoot.left = self.insertNode(nodeRoot.left, data) return nodeRoot def update_root(self, data): self.root = binary_node(data) def peek(self): return self.root.data class Minheap: def __init__(self): self.arr = [] self.root = None def insert_node(self, val): self.arr.append(val) self.sift_up(val) def sift_up(self, curr_node): parent_pos = self.arr.index(curr_node) // 2 child_pos = self.arr.index(curr_node) while self.arr[child_pos] < self.arr[parent_pos]: self.swap(self.arr.index(curr_node), self.arr.index(curr_node) // 2) child_pos = parent_pos parent_pos = parent_pos // 2 def swap(self, first_pos, second_pos): (self.arr[first_pos], self.arr[second_pos]) = (self.arr[second_pos], self.arr[first_pos]) def print_heap(self): print(self.arr) class Queue: def __init__(self): self.frontNode = None self.backNode = None def queue_node(self, newNode): if isinstance(newNode, GraphNode) or isinstance(newNode, Node): if self.backNode != None: self.backNode.next = newNode self.backNode = newNode if self.frontNode is None: self.frontNode = self.backNode else: return def dequeue_node(self): if self.frontNode is None: return data = self.frontNode self.frontNode = self.frontNode.next if self.frontNode is None: self.backNode = None return data def peek(self): return self.frontNode.data def is_empty(self): if self.frontNode == None: return True else: return False def print_queue(self, currNode): arr = [] while currNode != None: arr.append(currNode.data) curr_node = currNode.next print(arr) class Stack: def __init__(self): self.topNode = None def push_node(self, newNode): if isinstance(newNode, Node): if self.topNode == None: self.topNode = newNode else: newNode.next = self.topNode self.topNode = newNode else: return def pop_node(self): if self.topNode == None: return self.topNode = self.topNode.next def peek(self): return self.topNode.data def dfs(curr_node): if curr_node == None: return print(curr_node.print_node()) curr_node.visited = 1 for n in curr_node.adj: if n.visited == 0: dfs(n) def bfs(curr_node): order = queue() curr_node.visited = 1 order.queueNode(curr_node) print(curr_node.data) while order.isEmpty() != True: next_node = order.dequeueNode() next_node.visited = 1 order.printQueue(next_node) print('Dequeued ' + str(next_node.data)) for n in next_node.adj: if n.visited == 0: print('Adding ' + str(n.data) + ' to queue') n.visited = 1 order.queueNode(n)
# list(map(int, input().split())) # int(input()) def main(X, Y): cand = Y // 4 for i in range(cand, -1, -1): if i * 4 + (X - i) * 2 == Y: print('Yes') exit() else: print('No') if __name__ == '__main__': X, Y = list(map(int, input().split())) main(X, Y)
def main(X, Y): cand = Y // 4 for i in range(cand, -1, -1): if i * 4 + (X - i) * 2 == Y: print('Yes') exit() else: print('No') if __name__ == '__main__': (x, y) = list(map(int, input().split())) main(X, Y)
class Solution: def peakIndexInMountainArray(self, arr: List[int]) -> int: count = 0 for i in range(len(arr)-1): if arr[i] < arr[i+1]: count += 1 return count
class Solution: def peak_index_in_mountain_array(self, arr: List[int]) -> int: count = 0 for i in range(len(arr) - 1): if arr[i] < arr[i + 1]: count += 1 return count
def mutate_kernel_size(kernel): return None def mutate_stride(stride): return None def mutate_padding(padding): return None def mutate_filter(filter): return None
def mutate_kernel_size(kernel): return None def mutate_stride(stride): return None def mutate_padding(padding): return None def mutate_filter(filter): return None
# Check a number for prime.... a = int(input("Enter Number: ")) c = 0 for i in range(1, a+1): if a % i == 0: c += 1 if c == 2: print("Prime") else: print("Not Prime")
a = int(input('Enter Number: ')) c = 0 for i in range(1, a + 1): if a % i == 0: c += 1 if c == 2: print('Prime') else: print('Not Prime')
def readint(msg): ok = False value = 0 while True: n1 = str(input(msg)) if n1.isnumeric(): value = int(n1) ok = True else: print('\033[0;31mError! Please enter a valid number. \033[m') if ok: break return value n = readint('Enter a number: ') print(f'You just typed the number {n}')
def readint(msg): ok = False value = 0 while True: n1 = str(input(msg)) if n1.isnumeric(): value = int(n1) ok = True else: print('\x1b[0;31mError! Please enter a valid number. \x1b[m') if ok: break return value n = readint('Enter a number: ') print(f'You just typed the number {n}')
# https://leetcode.com/problems/keys-and-rooms/ class Solution: def canVisitAllRooms(self, rooms: List[List[int]]) -> bool: return self.dfs(rooms, 0, set()) def dfs(self, rooms: List[List[int]], node: int, visited: set[int]) -> bool: if node in visited: return False visited.add(node) if len(visited) == len(rooms): return True for key in rooms[node]: if self.dfs(rooms, key, visited): return True return False
class Solution: def can_visit_all_rooms(self, rooms: List[List[int]]) -> bool: return self.dfs(rooms, 0, set()) def dfs(self, rooms: List[List[int]], node: int, visited: set[int]) -> bool: if node in visited: return False visited.add(node) if len(visited) == len(rooms): return True for key in rooms[node]: if self.dfs(rooms, key, visited): return True return False
c = float(input()) n = int(input()) t=0 for each in range(n): h,w = list(map(float, input().split())) t+= h*w*c print("{:.8f}".format(t))
c = float(input()) n = int(input()) t = 0 for each in range(n): (h, w) = list(map(float, input().split())) t += h * w * c print('{:.8f}'.format(t))
class Dsu: def __init__(self, n, ranked): self.parents = [i for i in range(n)] self.ranked = ranked self.ranks = [0 for i in range(n)] self.messages = [0 for i in range(n)] self.read = [0 for i in range(n)] def find(self, v): if v == self.parents[v]: return v else: head = self.find(self.parents[v]) if head != self.parents[v]: self.messages[v] += self.messages[self.parents[v]] self.parents[v] = head return self.parents[v] def check(self, v): self.find(v) value = self.messages[v] - self.read[v] if self.parents[v] != v: value += self.messages[self.parents[v]] self.read[v] += value return value def send(self, v): a = self.find(v) self.messages[a] += 1 def union(self, a, b): a = self.find(a) b = self.find(b) if a != b: if self.ranked: if self.ranks[a] < self.ranks[b]: a, b = b, a self.parents[b] = a self.messages[b] -= self.messages[a] if self.ranks[a] == self.ranks[b]: self.ranks[a] += 1 else: self.parents[a] = b return True return False def getX(i): # return i return (i+zerg)%n n, m = map(int, input().split()) dsu = Dsu(n, True) p = int(1e6+3) zerg = 0 for i in range(m): line = input().split() if line[0] == '1': i = int(line[1]) dsu.send(getX(i)) zerg = (30 * zerg + 239) % p elif line[0] == '2': i = int(line[1]) j = int(line[2]) if dsu.union(getX(i), getX(j)): zerg = (13*zerg+11) % p else: i = int(line[1]) read = dsu.check(getX(i)) print(read) zerg = (100500*zerg+read) % p
class Dsu: def __init__(self, n, ranked): self.parents = [i for i in range(n)] self.ranked = ranked self.ranks = [0 for i in range(n)] self.messages = [0 for i in range(n)] self.read = [0 for i in range(n)] def find(self, v): if v == self.parents[v]: return v else: head = self.find(self.parents[v]) if head != self.parents[v]: self.messages[v] += self.messages[self.parents[v]] self.parents[v] = head return self.parents[v] def check(self, v): self.find(v) value = self.messages[v] - self.read[v] if self.parents[v] != v: value += self.messages[self.parents[v]] self.read[v] += value return value def send(self, v): a = self.find(v) self.messages[a] += 1 def union(self, a, b): a = self.find(a) b = self.find(b) if a != b: if self.ranked: if self.ranks[a] < self.ranks[b]: (a, b) = (b, a) self.parents[b] = a self.messages[b] -= self.messages[a] if self.ranks[a] == self.ranks[b]: self.ranks[a] += 1 else: self.parents[a] = b return True return False def get_x(i): return (i + zerg) % n (n, m) = map(int, input().split()) dsu = dsu(n, True) p = int(1000000.0 + 3) zerg = 0 for i in range(m): line = input().split() if line[0] == '1': i = int(line[1]) dsu.send(get_x(i)) zerg = (30 * zerg + 239) % p elif line[0] == '2': i = int(line[1]) j = int(line[2]) if dsu.union(get_x(i), get_x(j)): zerg = (13 * zerg + 11) % p else: i = int(line[1]) read = dsu.check(get_x(i)) print(read) zerg = (100500 * zerg + read) % p
''' A simple exercie sript to find out total pay by multiplying hours worked with rate per hour. ''' hr1 = input('Enter Hours: ') rate1 = input('Enter Rate: ') # made failure proof so if user inputs values other than number it won't crash # and through an error. so the program will just quit with following warning # to the user try: hrs = float(hr1) rate = float(rate1) # scrip can be made much better by adding 'continue' instead of 'quit()' in a # while loop so that by printing failure message it just asks user for other # input instead of quiting except: print('Failure: Enter Integers Only') quit() pay = float(hrs * rate) print('Pay:', pay)
""" A simple exercie sript to find out total pay by multiplying hours worked with rate per hour. """ hr1 = input('Enter Hours: ') rate1 = input('Enter Rate: ') try: hrs = float(hr1) rate = float(rate1) except: print('Failure: Enter Integers Only') quit() pay = float(hrs * rate) print('Pay:', pay)
spark = SparkSession \ .builder \ .appName("exercise_eighteen") \ .getOrCreate() (df.select("id", "first_name", "last_name", "gender", "country", "birthdate", "salary") .filter(df["country"] == "United States") .orderBy(df["gender"].asc(), df["salary"].asc()) .show()) df.select("id", "first_name", "last_name", "gender", "country", "birthdate", "salary") \ .filter(df["country"] == "United States") \ .orderBy(df["gender"].asc(), df["salary"].asc()) \ .show()
spark = SparkSession.builder.appName('exercise_eighteen').getOrCreate() df.select('id', 'first_name', 'last_name', 'gender', 'country', 'birthdate', 'salary').filter(df['country'] == 'United States').orderBy(df['gender'].asc(), df['salary'].asc()).show() df.select('id', 'first_name', 'last_name', 'gender', 'country', 'birthdate', 'salary').filter(df['country'] == 'United States').orderBy(df['gender'].asc(), df['salary'].asc()).show()
#personaldetails print("NAME: Jaskeerat Singh \nE-MAIL: jsing322@uwo.ca \nSLACK USERNAME: @jass \nBIOSTACK: Genomics \nTwitter Handle: @jsin") def hamming_distance(a,b): count=0 for i in range(len(a)): if a[i] != b[i]: count +=1 return count print(hamming_distance('@jass','@jsin'))
print('NAME: Jaskeerat Singh \nE-MAIL: jsing322@uwo.ca \nSLACK USERNAME: @jass \nBIOSTACK: Genomics \nTwitter Handle: @jsin') def hamming_distance(a, b): count = 0 for i in range(len(a)): if a[i] != b[i]: count += 1 return count print(hamming_distance('@jass', '@jsin'))
class Interface(object): def __init__(self, name, idx, addrwidth, datawidth, lite=False): self.name = name self.idx = idx self.datawidth = datawidth self.addrwidth = addrwidth self.lite = lite def __repr__(self): ret = [] ret.append('(') ret.append(self.__class__.__name__) ret.append(' ') ret.append('NAME:') ret.append(str(self.name)) ret.append(' ') ret.append('ID:') ret.append(str(self.idx)) ret.append(' ') ret.append('ADDR_WIDTH:') ret.append(str(self.addrwidth)) ret.append(' ') ret.append('DATA_WIDTH:') ret.append(str(self.datawidth)) ret.append(' ') ret.append('LITE:') ret.append(str(self.lite)) ret.append(')') return ''.join(ret) class MasterMemory(Interface): pass class SlaveMemory(Interface): pass
class Interface(object): def __init__(self, name, idx, addrwidth, datawidth, lite=False): self.name = name self.idx = idx self.datawidth = datawidth self.addrwidth = addrwidth self.lite = lite def __repr__(self): ret = [] ret.append('(') ret.append(self.__class__.__name__) ret.append(' ') ret.append('NAME:') ret.append(str(self.name)) ret.append(' ') ret.append('ID:') ret.append(str(self.idx)) ret.append(' ') ret.append('ADDR_WIDTH:') ret.append(str(self.addrwidth)) ret.append(' ') ret.append('DATA_WIDTH:') ret.append(str(self.datawidth)) ret.append(' ') ret.append('LITE:') ret.append(str(self.lite)) ret.append(')') return ''.join(ret) class Mastermemory(Interface): pass class Slavememory(Interface): pass
{ 'includes': [ 'deps/common.gypi', ], 'variables': { 'gtest%': 0, 'gtest_static_libs%': [], 'glfw%': 0, 'glfw_static_libs%': [], 'mason_platform': 'osx', }, 'targets': [ { 'target_name': 'geojsonvt', 'product_name': 'geojsonvt', 'type': 'static_library', 'standalone_static_library': 1, 'include_dirs': [ 'include', ], 'sources': [ 'include/mapbox/geojsonvt.hpp', 'include/mapbox/geojsonvt/clip.hpp', 'include/mapbox/geojsonvt/convert.hpp', 'include/mapbox/geojsonvt/simplify.hpp', 'include/mapbox/geojsonvt/transform.hpp', 'include/mapbox/geojsonvt/tile.hpp', 'include/mapbox/geojsonvt/types.hpp', 'include/mapbox/geojsonvt/wrap.hpp', 'src/geojsonvt.cpp', 'src/clip.cpp', 'src/convert.cpp', 'src/simplify.cpp', 'src/transform.cpp', 'src/tile.cpp', 'src/wrap.cpp', ], 'variables': { 'cflags_cc': [ '<@(variant_cflags)', '<@(rapidjson_cflags)', ], 'ldflags': [], 'libraries': [], }, 'conditions': [ ['OS == "mac"', { 'xcode_settings': { 'OTHER_CPLUSPLUSFLAGS': [ '<@(cflags_cc)' ], }, }, { 'cflags_cc': [ '<@(cflags_cc)' ], }], ], 'link_settings': { 'conditions': [ ['OS == "mac"', { 'libraries': [ '<@(libraries)' ], 'xcode_settings': { 'OTHER_LDFLAGS': [ '<@(ldflags)' ] } }, { 'libraries': [ '<@(libraries)', '<@(ldflags)' ], }] ], }, 'direct_dependent_settings': { 'include_dirs': [ 'include', ], }, }, { 'target_name': 'install', 'type': 'none', 'hard_dependency': 1, 'dependencies': [ 'geojsonvt', ], 'copies': [ { 'files': [ '<(PRODUCT_DIR)/libgeojsonvt.a' ], 'destination': '<(install_prefix)/lib' }, { 'files': [ '<!@(find include/mapbox/geojsonvt -name "*.hpp")' ], 'destination': '<(install_prefix)/include/mapbox/geojsonvt' }, { 'files': [ 'include/mapbox/geojsonvt.hpp' ], 'destination': '<(install_prefix)/include/mapbox' }, ], }, ], 'conditions': [ ['gtest', { 'targets': [ { 'target_name': 'test', 'product_name': 'test', 'type': 'executable', 'dependencies': [ 'geojsonvt', ], 'include_dirs': [ 'src', ], 'sources': [ 'test/test.cpp', 'test/util.hpp', 'test/util.cpp', 'test/test_clip.cpp', 'test/test_full.cpp', 'test/test_get_tile.cpp', 'test/test_simplify.cpp', ], 'variables': { 'cflags_cc': [ '<@(rapidjson_cflags)', '<@(variant_cflags)', '<@(gtest_cflags)', ], 'ldflags': [ '<@(gtest_ldflags)' ], 'libraries': [ '<@(gtest_static_libs)', ], }, 'conditions': [ ['OS == "mac"', { 'libraries': [ '<@(libraries)' ], 'xcode_settings': { 'OTHER_CPLUSPLUSFLAGS': [ '<@(cflags_cc)' ], 'OTHER_LDFLAGS': [ '<@(ldflags)' ], } }, { 'cflags_cc': [ '<@(cflags_cc)' ], 'libraries': [ '<@(libraries)', '<@(ldflags)' ], }] ], }, ], }], ['glfw', { 'targets': [ { 'target_name': 'debug', 'product_name': 'debug', 'type': 'executable', 'dependencies': [ 'geojsonvt', ], 'include_dirs': [ 'src', ], 'sources': [ 'debug/debug.cpp', ], 'variables': { 'cflags_cc': [ '<@(variant_cflags)', '<@(glfw_cflags)', ], 'ldflags': [ '<@(glfw_ldflags)' ], 'libraries': [ '<@(glfw_static_libs)', ], }, 'conditions': [ ['OS == "mac"', { 'libraries': [ '<@(libraries)' ], 'xcode_settings': { 'OTHER_CPLUSPLUSFLAGS': [ '<@(cflags_cc)' ], 'OTHER_LDFLAGS': [ '<@(ldflags)' ], } }, { 'cflags_cc': [ '<@(cflags_cc)' ], 'libraries': [ '<@(libraries)', '<@(ldflags)' ], }] ], }, ], }], ], }
{'includes': ['deps/common.gypi'], 'variables': {'gtest%': 0, 'gtest_static_libs%': [], 'glfw%': 0, 'glfw_static_libs%': [], 'mason_platform': 'osx'}, 'targets': [{'target_name': 'geojsonvt', 'product_name': 'geojsonvt', 'type': 'static_library', 'standalone_static_library': 1, 'include_dirs': ['include'], 'sources': ['include/mapbox/geojsonvt.hpp', 'include/mapbox/geojsonvt/clip.hpp', 'include/mapbox/geojsonvt/convert.hpp', 'include/mapbox/geojsonvt/simplify.hpp', 'include/mapbox/geojsonvt/transform.hpp', 'include/mapbox/geojsonvt/tile.hpp', 'include/mapbox/geojsonvt/types.hpp', 'include/mapbox/geojsonvt/wrap.hpp', 'src/geojsonvt.cpp', 'src/clip.cpp', 'src/convert.cpp', 'src/simplify.cpp', 'src/transform.cpp', 'src/tile.cpp', 'src/wrap.cpp'], 'variables': {'cflags_cc': ['<@(variant_cflags)', '<@(rapidjson_cflags)'], 'ldflags': [], 'libraries': []}, 'conditions': [['OS == "mac"', {'xcode_settings': {'OTHER_CPLUSPLUSFLAGS': ['<@(cflags_cc)']}}, {'cflags_cc': ['<@(cflags_cc)']}]], 'link_settings': {'conditions': [['OS == "mac"', {'libraries': ['<@(libraries)'], 'xcode_settings': {'OTHER_LDFLAGS': ['<@(ldflags)']}}, {'libraries': ['<@(libraries)', '<@(ldflags)']}]]}, 'direct_dependent_settings': {'include_dirs': ['include']}}, {'target_name': 'install', 'type': 'none', 'hard_dependency': 1, 'dependencies': ['geojsonvt'], 'copies': [{'files': ['<(PRODUCT_DIR)/libgeojsonvt.a'], 'destination': '<(install_prefix)/lib'}, {'files': ['<!@(find include/mapbox/geojsonvt -name "*.hpp")'], 'destination': '<(install_prefix)/include/mapbox/geojsonvt'}, {'files': ['include/mapbox/geojsonvt.hpp'], 'destination': '<(install_prefix)/include/mapbox'}]}], 'conditions': [['gtest', {'targets': [{'target_name': 'test', 'product_name': 'test', 'type': 'executable', 'dependencies': ['geojsonvt'], 'include_dirs': ['src'], 'sources': ['test/test.cpp', 'test/util.hpp', 'test/util.cpp', 'test/test_clip.cpp', 'test/test_full.cpp', 'test/test_get_tile.cpp', 'test/test_simplify.cpp'], 'variables': {'cflags_cc': ['<@(rapidjson_cflags)', '<@(variant_cflags)', '<@(gtest_cflags)'], 'ldflags': ['<@(gtest_ldflags)'], 'libraries': ['<@(gtest_static_libs)']}, 'conditions': [['OS == "mac"', {'libraries': ['<@(libraries)'], 'xcode_settings': {'OTHER_CPLUSPLUSFLAGS': ['<@(cflags_cc)'], 'OTHER_LDFLAGS': ['<@(ldflags)']}}, {'cflags_cc': ['<@(cflags_cc)'], 'libraries': ['<@(libraries)', '<@(ldflags)']}]]}]}], ['glfw', {'targets': [{'target_name': 'debug', 'product_name': 'debug', 'type': 'executable', 'dependencies': ['geojsonvt'], 'include_dirs': ['src'], 'sources': ['debug/debug.cpp'], 'variables': {'cflags_cc': ['<@(variant_cflags)', '<@(glfw_cflags)'], 'ldflags': ['<@(glfw_ldflags)'], 'libraries': ['<@(glfw_static_libs)']}, 'conditions': [['OS == "mac"', {'libraries': ['<@(libraries)'], 'xcode_settings': {'OTHER_CPLUSPLUSFLAGS': ['<@(cflags_cc)'], 'OTHER_LDFLAGS': ['<@(ldflags)']}}, {'cflags_cc': ['<@(cflags_cc)'], 'libraries': ['<@(libraries)', '<@(ldflags)']}]]}]}]]}
print(True) print(False) print("True") print("False") print(5 == 1) print(5 != 1) print("Ham" == "Ham") print("ham " == "ham") print(5 == 5.0) print(5 < 1) print(5 >= 5) print(5 < 8 <= 7)
print(True) print(False) print('True') print('False') print(5 == 1) print(5 != 1) print('Ham' == 'Ham') print('ham ' == 'ham') print(5 == 5.0) print(5 < 1) print(5 >= 5) print(5 < 8 <= 7)
class Animal: def __init__(self, leg_count=4): # Constructor, initializes the new obj # Print("constructor called!") self.leg_count = leg_count self.likes_food = True def get_leg_count(self): # getter return self.leg_count def set_leg_count(self, leg_count): # setter self.leg_count = leg_count # Objects, AKA instances cat = Animal() # Construct a new Animal, Instantiate a new Animal dog = Animal() # Construct a new Animal centipede = Animal(100) # Make a list of Animals rabbits = [ Animal(4), Animal(4), Animal(4) ] rabbits[1].leg_count = 3 # leg_count is an "attribute" on the object print(f"rabbit 0's leg count: {rabbits[0].leg_count}") print(f"rabbit 1's leg count: {rabbits[1].leg_count}") print(f"rabbit 2's leg count: {rabbits[2].leg_count}") # "cat" is an instance of an Animal # "cat" is an Animal # print(f"cat's leg count: {cat.leg_count}") # cat.leg_count = 4 # print(f"cat's leg count: {cat.leg_count}") # print(f"dog's leg count: {dog.leg_count}") print(cat.get_leg_count()) cat.set_leg_count(3) print(cat.get_leg_count())
class Animal: def __init__(self, leg_count=4): self.leg_count = leg_count self.likes_food = True def get_leg_count(self): return self.leg_count def set_leg_count(self, leg_count): self.leg_count = leg_count cat = animal() dog = animal() centipede = animal(100) rabbits = [animal(4), animal(4), animal(4)] rabbits[1].leg_count = 3 print(f"rabbit 0's leg count: {rabbits[0].leg_count}") print(f"rabbit 1's leg count: {rabbits[1].leg_count}") print(f"rabbit 2's leg count: {rabbits[2].leg_count}") print(cat.get_leg_count()) cat.set_leg_count(3) print(cat.get_leg_count())
a = float(input()) b = float(input()) peso_nota_a = 3.5 peso_nota_b = 7.5 media = (a * peso_nota_a + b * peso_nota_b) / (peso_nota_a + peso_nota_b) print(f"MEDIA = {media:.5f}")
a = float(input()) b = float(input()) peso_nota_a = 3.5 peso_nota_b = 7.5 media = (a * peso_nota_a + b * peso_nota_b) / (peso_nota_a + peso_nota_b) print(f'MEDIA = {media:.5f}')
class Node(object): def __init__(self, data): self.data = data self.left = None self.right = None def __str__(self): return str(self.data) class AVL_Tree(object): def height(self,root): if not root: return -1 else: hl = self.height(root.left) hr = self.height(root.right) if hl>hr: return hl+1 else: return hr+1 def insert(self,root,data): if root is None: root = Node(data) else: fp = None p = root while p : fp = p p = p.left if data<p.data else p.right if data < fp.data: fp.left = Node(data) else: fp.right = Node(data) # printTree90(root) if not self.isBalance(root): print("Not Balance, Rebalance!") root = self.reBalance(root) return root def isBalance(self,root): out = self._isBalance(root) return True if out == 1 else False def _isBalance(self,root): if not root : return 1 else: if abs(self.height(root.left)-self.height(root.right))>=2: return 0 else: return 1*self._isBalance(root.left)*self._isBalance(root.right) def reBalance(self,root): if not root : pass # print("basecase reached") else: print("recurrrr") printTree90(root) if self.height(root.left)-self.height(root.right)<=-2: root.right = self.reBalance(root.right) if self.height(root.left)-self.height(root.right)<=-2: root = self.Rleftchild(root) elif self.height(root.left)-self.height(root.right)>=2: root = self.Rrightchild(root) elif self.height(root.left)-self.height(root.right)>=2: root.left = self.reBalance(root.left) if self.height(root.left)-self.height(root.right)<=-2: root = self.Rleftchild(root) elif self.height(root.left)-self.height(root.right)>=2: root = self.Rrightchild(root) if not self.isBalance(root): root.right = self.reBalance(root.right) root.left = self.reBalance(root.left) return root def Rleftchild(self,root): newr = root.right root.right = newr.left newr.left = root return newr def Rrightchild(self,root): newr = root.left root.left = newr.right newr.right = root return newr def printTree90(node, level = 0): if node != None: printTree90(node.right, level + 1) print(' ' * level, node) printTree90(node.left, level + 1) myTree = AVL_Tree() root = None data = input("Enter Input : ").split() for e in data: print("insert :",e) root = myTree.insert(root, int(e)) printTree90(root) print("===============")
class Node(object): def __init__(self, data): self.data = data self.left = None self.right = None def __str__(self): return str(self.data) class Avl_Tree(object): def height(self, root): if not root: return -1 else: hl = self.height(root.left) hr = self.height(root.right) if hl > hr: return hl + 1 else: return hr + 1 def insert(self, root, data): if root is None: root = node(data) else: fp = None p = root while p: fp = p p = p.left if data < p.data else p.right if data < fp.data: fp.left = node(data) else: fp.right = node(data) if not self.isBalance(root): print('Not Balance, Rebalance!') root = self.reBalance(root) return root def is_balance(self, root): out = self._isBalance(root) return True if out == 1 else False def _is_balance(self, root): if not root: return 1 elif abs(self.height(root.left) - self.height(root.right)) >= 2: return 0 else: return 1 * self._isBalance(root.left) * self._isBalance(root.right) def re_balance(self, root): if not root: pass else: print('recurrrr') print_tree90(root) if self.height(root.left) - self.height(root.right) <= -2: root.right = self.reBalance(root.right) if self.height(root.left) - self.height(root.right) <= -2: root = self.Rleftchild(root) elif self.height(root.left) - self.height(root.right) >= 2: root = self.Rrightchild(root) elif self.height(root.left) - self.height(root.right) >= 2: root.left = self.reBalance(root.left) if self.height(root.left) - self.height(root.right) <= -2: root = self.Rleftchild(root) elif self.height(root.left) - self.height(root.right) >= 2: root = self.Rrightchild(root) if not self.isBalance(root): root.right = self.reBalance(root.right) root.left = self.reBalance(root.left) return root def rleftchild(self, root): newr = root.right root.right = newr.left newr.left = root return newr def rrightchild(self, root): newr = root.left root.left = newr.right newr.right = root return newr def print_tree90(node, level=0): if node != None: print_tree90(node.right, level + 1) print(' ' * level, node) print_tree90(node.left, level + 1) my_tree = avl__tree() root = None data = input('Enter Input : ').split() for e in data: print('insert :', e) root = myTree.insert(root, int(e)) print_tree90(root) print('===============')
# enter the Chocolate Rooom ownername = "Daw Hla" playerlives = 2 chocolate = 2 print("Welcome to the Chocolate Room. I am the owner of this sweet shop, my name is " + ownername) print("You must answer this question.") # add an input statement to ask the question on the next line and store the response in a variable called answer # "Which of the following could be used as a good password" # "1. Your pet's name. 2. Password123 3. A random collection of numbers and letters?" # HINT : User answer = int(input(.......)) print("Which of the following could be used as a good password") print("1. Your pet's name. 2. Password123 3. A random collection of numbers and letters?") answer = int(input("Please Choose 1,2,3: ")) if answer == 3: chocolatebar = int(input("Do you want chocolate bar 1 or 2? ")) if chocolatebar == 1: print("Hard luck, you lse a life and there is no information in the wrapper") playerlives = playerlives - 1 # add code to check if the chocolate bar is equal to 1 # ---> add code to print this message to the user "Hard luck, you lse a life and there is no information in the wrapper" # ---> add code to subtract 1 from the player lives elif chocolatebar == 2: print("OK - you can have the chocolate bar and the letter in the wrapper is T") else: print("Wrong answer - you lose a life and all of your chocolate") chocolate = 0 playerlives = playerlives - 1 # add code to set the chocolate value to 0 # add code to subtract 1 from player lives
ownername = 'Daw Hla' playerlives = 2 chocolate = 2 print('Welcome to the Chocolate Room. I am the owner of this sweet shop, my name is ' + ownername) print('You must answer this question.') print('Which of the following could be used as a good password') print("1. Your pet's name. 2. Password123 3. A random collection of numbers and letters?") answer = int(input('Please Choose 1,2,3: ')) if answer == 3: chocolatebar = int(input('Do you want chocolate bar 1 or 2? ')) if chocolatebar == 1: print('Hard luck, you lse a life and there is no information in the wrapper') playerlives = playerlives - 1 elif chocolatebar == 2: print('OK - you can have the chocolate bar and the letter in the wrapper is T') else: print('Wrong answer - you lose a life and all of your chocolate') chocolate = 0 playerlives = playerlives - 1
''' https://leetcode.com/contest/weekly-contest-150/problems/as-far-from-land-as-possible/ ''' diffs = [(1, 0), (0, 1), (-1, 0), (0, -1)] class Cell: def __init__(self, x, y, dist=0): self.dist = dist self.x, self.y = x, y class Solver: def __init__(self, grid): self.g = grid self.l, self.w = len(self.g), len(self.g[0]) self.inf = 1000 self.dists = [[Cell(j, i, dist=self.inf) for i in range(self.w)] for j in range(self.l)] def solve(self): q, qi = [], 0 lands = 0 for i in range(self.l): for j in range(self.w): if self.g[i][j] == 1: self.dists[i][j].dist = 0 q.append(self.dists[i][j]) lands += 1 if lands == 0 or lands == self.l * self.w: return -1 while len(q) - qi > 0: f = q[qi]; qi += 1 for diff in diffs: x, y = f.x + diff[0], f.y + diff[1] if self.valid_xy(x, y) and self.makes_sense_to_q(x, y, f.dist + 1): c = self.dists[x][y] c.dist = f.dist + 1 q.append(c) return self.find_farthest_water() def find_farthest_water(self): max_dist = 0 for i in range(self.l): for j in range(self.w): if self.g[i][j] == 0: # water max_dist = max(max_dist, self.dists[i][j].dist) if max_dist == self.inf: return -1 return max_dist def makes_sense_to_q(self, x, y, d): return self.dists[x][y].dist > d def valid_xy(self, x, y): return x >= 0 and y >= 0 and x < self.l and y < self.w class Solution: def maxDistance(self, grid: List[List[int]]) -> int: return Solver(grid).solve()
""" https://leetcode.com/contest/weekly-contest-150/problems/as-far-from-land-as-possible/ """ diffs = [(1, 0), (0, 1), (-1, 0), (0, -1)] class Cell: def __init__(self, x, y, dist=0): self.dist = dist (self.x, self.y) = (x, y) class Solver: def __init__(self, grid): self.g = grid (self.l, self.w) = (len(self.g), len(self.g[0])) self.inf = 1000 self.dists = [[cell(j, i, dist=self.inf) for i in range(self.w)] for j in range(self.l)] def solve(self): (q, qi) = ([], 0) lands = 0 for i in range(self.l): for j in range(self.w): if self.g[i][j] == 1: self.dists[i][j].dist = 0 q.append(self.dists[i][j]) lands += 1 if lands == 0 or lands == self.l * self.w: return -1 while len(q) - qi > 0: f = q[qi] qi += 1 for diff in diffs: (x, y) = (f.x + diff[0], f.y + diff[1]) if self.valid_xy(x, y) and self.makes_sense_to_q(x, y, f.dist + 1): c = self.dists[x][y] c.dist = f.dist + 1 q.append(c) return self.find_farthest_water() def find_farthest_water(self): max_dist = 0 for i in range(self.l): for j in range(self.w): if self.g[i][j] == 0: max_dist = max(max_dist, self.dists[i][j].dist) if max_dist == self.inf: return -1 return max_dist def makes_sense_to_q(self, x, y, d): return self.dists[x][y].dist > d def valid_xy(self, x, y): return x >= 0 and y >= 0 and (x < self.l) and (y < self.w) class Solution: def max_distance(self, grid: List[List[int]]) -> int: return solver(grid).solve()
f=str(input('Digite uma frase: ')).strip().upper() print('Tem {} A na frase.'.format(f.count('A'))) print('O primeiro A esta em {} letra.'.format(f.find('A')+1)) print('O ultimo A esta em {} letra.'.format(f.rfind('A')+1))
f = str(input('Digite uma frase: ')).strip().upper() print('Tem {} A na frase.'.format(f.count('A'))) print('O primeiro A esta em {} letra.'.format(f.find('A') + 1)) print('O ultimo A esta em {} letra.'.format(f.rfind('A') + 1))
def start_room(): return "room1"
def start_room(): return 'room1'
node = S(input, "application/json") childNode = node.prop("orderDetails") property = childNode.prop("article") value = property.stringValue()
node = s(input, 'application/json') child_node = node.prop('orderDetails') property = childNode.prop('article') value = property.stringValue()
bit_list = [19, 17, 16, 18, 26, 24, 22, 21, 23, 25] value = 5808 for bit in bit_list: new_value = value + 2 ** bit print(value, new_value-1) value = new_value
bit_list = [19, 17, 16, 18, 26, 24, 22, 21, 23, 25] value = 5808 for bit in bit_list: new_value = value + 2 ** bit print(value, new_value - 1) value = new_value
class Solution: # @return a string def minWindow(self, S, T): s = S t = T d = {} td = {} for c in t: td[c] = td.get(c, 0) + 1 left = 0 right = 0 lefts = [] rights = [] for i, c in enumerate(s): if c in td: d[c] = d.get(c, 0) + 1 if self.contains(d, td): # Contains all characters right = i # Move left pointers cc = s[left] while left <= right and (cc not in d or d[cc] > td[cc]): if cc in d: d[cc] -= 1 left += 1 cc = s[left] lefts.append(left) rights.append(right) if not lefts: return '' res_left = lefts[0] res_right = rights[0] n = len(lefts) for i in range(1, n): if rights[i] - lefts[i] < res_right - res_left: res_left = lefts[i] res_right = rights[i] return s[res_left:res_right + 1] def contains(self, d, td): for k in td: if k not in d or d[k] < td[k]: return False return True
class Solution: def min_window(self, S, T): s = S t = T d = {} td = {} for c in t: td[c] = td.get(c, 0) + 1 left = 0 right = 0 lefts = [] rights = [] for (i, c) in enumerate(s): if c in td: d[c] = d.get(c, 0) + 1 if self.contains(d, td): right = i cc = s[left] while left <= right and (cc not in d or d[cc] > td[cc]): if cc in d: d[cc] -= 1 left += 1 cc = s[left] lefts.append(left) rights.append(right) if not lefts: return '' res_left = lefts[0] res_right = rights[0] n = len(lefts) for i in range(1, n): if rights[i] - lefts[i] < res_right - res_left: res_left = lefts[i] res_right = rights[i] return s[res_left:res_right + 1] def contains(self, d, td): for k in td: if k not in d or d[k] < td[k]: return False return True
class Solution: def canJump(self, nums: List[int]) -> bool: if not nums or len(nums) == 0: return False target = len(nums) - 1 for i in range(len(nums) - 1, -1, -1): if (nums[i] + i >= target): target = i return target == 0
class Solution: def can_jump(self, nums: List[int]) -> bool: if not nums or len(nums) == 0: return False target = len(nums) - 1 for i in range(len(nums) - 1, -1, -1): if nums[i] + i >= target: target = i return target == 0
print ("How old are you?"), age = input() print ("How tall are you?"), height = input() print ("How much do you weigh?"), weight = input() print ("So you are %r old, %r tall and %r heavy!"%(age,weight,height) )
(print('How old are you?'),) age = input() (print('How tall are you?'),) height = input() (print('How much do you weigh?'),) weight = input() print('So you are %r old, %r tall and %r heavy!' % (age, weight, height))
a=int(input("enter number:")) b=int(input("enter number:")) c=int(input("enter number:")) d=int(input("enter number:")) total=a+b+c+d average=total/4 print("total=",total) print("average=",average)
a = int(input('enter number:')) b = int(input('enter number:')) c = int(input('enter number:')) d = int(input('enter number:')) total = a + b + c + d average = total / 4 print('total=', total) print('average=', average)
# test decorators def dec(f): print('dec') return f def dec_arg(x): print(x) return lambda f:f # plain decorator @dec def f(): pass # decorator with arg @dec_arg('dec_arg') def g(): pass # decorator of class @dec class A: pass print("PASS")
def dec(f): print('dec') return f def dec_arg(x): print(x) return lambda f: f @dec def f(): pass @dec_arg('dec_arg') def g(): pass @dec class A: pass print('PASS')
def read_E_matrix(): # # physical distance # E = [[1, 1, 0, 0, 1, 1], # [1, 1, 1, 1, 1, 0], # [0, 1, 1, 1, 0, 0], # [0, 1, 1, 1, 0, 0], # [1, 1, 0, 0, 1, 0], # [1, 0, 0, 0, 0, 1] # ] # fully connected # E = [[1, 1, 1, 1, 1, 1], # [1, 1, 1, 1, 1, 1], # [1, 1, 1, 1, 1, 1], # [1, 1, 1, 1, 1, 1], # [1, 1, 1, 1, 1, 1], # [1, 1, 1, 1, 1, 1] # ] # view similarity connections. # E = [[1, 0, 0, 0, 0, 1], # [0, 1, 0, 1, 0, 0], # [0, 0, 1, 1, 0, 1], # [0, 1, 1, 1, 0, 0], # [0, 0, 0, 0, 1, 1], # [1, 0, 1, 0, 1, 1] # ] # view sim new graph E= [[1, 0, 1, 0, 1, 1], [0, 1, 0, 0, 0, 1], [1, 0, 1, 0, 0, 1], [0, 0, 0, 1, 1, 0], [1, 0, 0, 1, 1, 0], [1, 1, 1, 0, 0, 1]] # E = graph_p2(5) # E = graph_p3(5) # E = graph_p4(5) # E = graph_p5(5) # E = graph_p6(5) # E = graph_p7(5) # E = graph_p8(5) # E = graph_p9(5) # E = graph_random(14) return E def graph_random(i): if i == 6: E= [[1, 1, 1, 0, 0, 0], [1, 1, 1, 0, 0, 1], [1, 1, 1, 0, 0, 0], [0, 0, 0, 1, 1, 0], [0, 0, 0, 1, 1, 1], [0, 1, 0, 0, 1, 1]] if i == 7: E= [[1, 1, 1, 0, 0, 0], [1, 1, 1, 0, 0, 1], [1, 1, 1, 1, 0, 0], [0, 0, 1, 1, 1, 0], [0, 0, 0, 1, 1, 1], [0, 1, 0, 0, 1, 1]] if i == 8: E= [[1, 1, 1, 0, 1, 0], [1, 1, 1, 0, 0, 1], [1, 1, 1, 1, 0, 0], [0, 0, 1, 1, 1, 0], [1, 0, 0, 1, 1, 1], [0, 1, 0, 0, 1, 1]] if i == 9: E= [[1, 1, 1, 0, 1, 0], [1, 1, 1, 1, 0, 1], [1, 1, 1, 1, 0, 0], [0, 1, 1, 1, 1, 0], [1, 0, 0, 1, 1, 1], [0, 1, 0, 0, 1, 1]] if i == 10: E= [[1, 1, 1, 1, 1, 0], [1, 1, 1, 1, 0, 1], [1, 1, 1, 1, 0, 0], [1, 1, 1, 1, 1, 0], [1, 0, 0, 1, 1, 1], [0, 1, 0, 0, 1, 1]] if i == 11: E= [[1, 1, 1, 1, 1, 0], [1, 1, 1, 1, 0, 1], [1, 1, 1, 1, 0, 0], [1, 1, 1, 1, 1, 1], [1, 0, 0, 1, 1, 1], [0, 1, 0, 1, 1, 1]] if i == 12: E= [[1, 1, 1, 1, 1, 0], [1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 0, 0], [1, 1, 1, 1, 1, 1], [1, 1, 0, 1, 1, 1], [0, 1, 0, 1, 1, 1]] if i == 13: E= [[1, 1, 1, 1, 1, 0], [1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 0, 1], [1, 1, 1, 1, 1, 1], [1, 1, 0, 1, 1, 1], [0, 1, 1, 1, 1, 1]] if i == 14: E= [[1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 0, 1], [1, 1, 1, 1, 1, 1], [1, 1, 0, 1, 1, 1], [1, 1, 1, 1, 1, 1]] return E def graph_p9(i): if i == 1: # 0510 E= [[1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 0, 0], [1, 1, 1, 1, 1, 0], [1, 1, 1, 1, 1, 1], [1, 0, 1, 1, 1, 1], [1, 0, 0, 1, 1, 1]] if i == 2: # 0511 E= [[0, 1, 1, 1, 1, 1], [1, 0, 1, 1, 0, 1], [1, 1, 0, 1, 1, 1], [1, 1, 1, 0, 1, 1], [1, 0, 1, 1, 0, 1], [1, 1, 1, 1, 1, 0]] if i == 3: # 0511 E= [[0, 1, 1, 1, 1, 0], [1, 0, 1, 0, 1, 1], [1, 1, 0, 1, 1, 1], [1, 0, 1, 0, 1, 1], [1, 1, 1, 1, 0, 1], [0, 1, 1, 1, 1, 0]] if i == 4: # 0511 E= [[0, 1, 1, 1, 1, 1], [1, 0, 1, 1, 1, 1], [1, 1, 0, 1, 1, 1], [1, 1, 1, 0, 0, 1], [1, 1, 1, 0, 0, 0], [1, 1, 1, 1, 0, 0]] if i == 5: # 0511 E= [[0, 1, 0, 1, 1, 1], [1, 0, 1, 1, 1, 1], [0, 1, 0, 1, 1, 1], [1, 1, 1, 0, 1, 1], [1, 1, 1, 1, 0, 1], [1, 1, 1, 1, 1, 0]] return E def graph_p8(i): if i == 1: # 0510 E = [[1, 0, 1, 1, 1, 0], [0, 1, 0, 1, 0, 1], [1, 0, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1], [1, 0, 1, 1, 1, 1], [0, 1, 1, 1, 1, 1]] if i == 2: # 0511 E= [[1, 1, 1, 1, 0, 0], [1, 1, 0, 1, 1, 1], [1, 0, 1, 1, 1, 1], [1, 1, 1, 1, 0, 1], [0, 1, 1, 0, 1, 1], [0, 1, 1, 1, 1, 1]] if i == 3: # 0511 E= [[1, 0, 1, 1, 1, 0], [0, 1, 1, 0, 1, 1], [1, 1, 1, 1, 1, 1], [1, 0, 1, 1, 0, 1], [1, 1, 1, 0, 1, 0], [0, 1, 1, 1, 0, 1]] if i == 4: # 0511 E= [[0, 1, 0, 0, 1, 1], [1, 0, 1, 1, 1, 1], [0, 1, 0, 1, 1, 1], [0, 1, 1, 0, 1, 1], [1, 1, 1, 1, 0, 1], [1, 1, 1, 1, 1, 0]] if i == 5: # 0511 E= [[0, 1, 1, 1, 1, 0], [1, 0, 1, 1, 0, 1], [1, 1, 0, 1, 1, 1], [1, 1, 1, 0, 1, 1], [1, 0, 1, 1, 0, 0], [0, 1, 1, 1, 0, 0]] return E def graph_p7(i): if i == 1: # 0510 E= [[1, 1, 1, 1, 0, 0], [1, 1, 1, 1, 1, 0], [1, 1, 1, 1, 0, 1], [1, 1, 1, 1, 1, 0], [0, 1, 0, 1, 1, 1], [0, 0, 1, 0, 1, 1]] if i == 2: # 0511 E= [[1, 0, 0, 1, 1, 0], [0, 1, 1, 1, 0, 1], [0, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1], [1, 0, 1, 1, 1, 1], [0, 1, 1, 1, 1, 1]] if i == 3: # 0511 E= [[1, 0, 1, 1, 0, 1], [0, 1, 1, 0, 0, 1], [1, 1, 1, 0, 1, 0], [1, 0, 0, 1, 1, 1], [0, 0, 1, 1, 1, 0], [1, 1, 0, 1, 0, 1]] if i == 4: # 0511 E= [[1, 1, 0, 1, 0, 0], [1, 1, 0, 1, 1, 1], [0, 0, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1], [0, 1, 1, 1, 1, 0], [0, 1, 1, 1, 0, 1]] if i == 5: # 0511 E= [[1, 1, 0, 1, 1, 1], [1, 1, 1, 1, 0, 1], [0, 1, 1, 0, 1, 1], [1, 1, 0, 1, 0, 0], [1, 0, 1, 0, 1, 0], [1, 1, 1, 0, 0, 1]] return E def graph_p6(i): if i == 1: # 0510 E= [[1, 0, 1, 1, 1, 0], [0, 1, 0, 0, 1, 0], [1, 0, 1, 1, 1, 0], [1, 0, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1], [0, 0, 0, 1, 1, 1]] if i == 2: # 0511 E= [[1, 0, 1, 1, 1, 1], [0, 1, 1, 1, 1, 0], [1, 1, 1, 1, 1, 0], [1, 1, 1, 1, 0, 1], [1, 1, 1, 0, 1, 0], [1, 0, 0, 1, 0, 1]] if i == 3: # 0511 E= [[1, 0, 1, 1, 0, 1], [0, 1, 0, 0, 1, 1], [1, 0, 1, 0, 1, 1], [1, 0, 0, 1, 1, 0], [0, 1, 1, 1, 1, 0], [1, 1, 1, 0, 0, 1]] if i == 4: # 0511 E= [[1, 1, 1, 0, 1, 0], [1, 1, 0, 1, 1, 1], [1, 0, 1, 1, 0, 1], [0, 1, 1, 1, 0, 0], [1, 1, 0, 0, 1, 1], [0, 1, 1, 0, 1, 1]] if i == 5: # 0511 E= [[1, 1, 1, 1, 1, 1], [1, 1, 1, 0, 1, 1], [1, 1, 1, 0, 1, 1], [1, 0, 0, 1, 0, 1], [1, 1, 1, 0, 1, 1], [1, 1, 1, 1, 1, 1]] return E def graph_p5(i): if i == 1: # 0510 E= [[1, 1, 0, 0, 0, 0], [1, 1, 1, 0, 0, 1], [0, 1, 1, 1, 1, 1], [0, 0, 1, 1, 1, 1], [0, 0, 1, 1, 1, 0], [0, 1, 1, 1, 0, 1]] if i == 2: # 0511 E= [[1, 1, 0, 0, 1, 0], [1, 1, 1, 0, 1, 1], [0, 1, 1, 1, 1, 0], [0, 0, 1, 1, 1, 1], [1, 1, 1, 1, 1, 0], [0, 1, 0, 1, 0, 1]] if i == 3: # 0511 E= [[1, 1, 1, 1, 0, 0], [1, 1, 1, 0, 1, 1], [1, 1, 1, 0, 1, 0], [1, 0, 0, 1, 0, 1], [0, 1, 1, 0, 1, 0], [0, 1, 0, 1, 0, 1]] if i == 4: # 0511 E= [[1, 0, 1, 1, 1, 0], [0, 1, 1, 1, 1, 1], [1, 1, 1, 1, 0, 0], [1, 1, 1, 1, 0, 0], [1, 1, 0, 0, 1, 0], [0, 1, 0, 0, 0, 1]] if i == 5: # 0511 E= [[1, 0, 0, 0, 1, 1], [0, 1, 1, 0, 0, 0], [0, 1, 1, 1, 1, 1], [0, 0, 1, 1, 1, 1], [1, 0, 1, 1, 1, 1], [1, 0, 1, 1, 1, 1]] return E def graph_p4(i): if i == 1: # 0510 E= [[1, 0, 1, 1, 1, 0], [0, 1, 1, 0, 1, 0], [1, 1, 1, 1, 0, 1], [1, 0, 1, 1, 0, 0], [1, 1, 0, 0, 1, 0], [0, 0, 1, 0, 0, 1]] if i == 2: # 0511 E= [[1, 1, 0, 1, 1, 0], [1, 1, 1, 1, 0, 0], [0, 1, 1, 1, 1, 0], [1, 1, 1, 1, 0, 0], [1, 0, 1, 0, 1, 1], [0, 0, 0, 0, 1, 1]] if i == 3: # 0511 E= [[1, 0, 0, 0, 0, 1], [0, 1, 1, 1, 0, 0], [0, 1, 1, 0, 1, 0], [0, 1, 0, 1, 1, 1], [0, 0, 1, 1, 1, 1], [1, 0, 0, 1, 1, 1]] if i == 4: # 0511 E= [[1, 1, 1, 0, 1, 1], [1, 1, 1, 0, 0, 0], [1, 1, 1, 0, 0, 1], [0, 0, 0, 1, 1, 0], [1, 0, 0, 1, 1, 0], [1, 0, 1, 0, 0, 1]] if i == 5: # 0511 E= [[1, 1, 0, 1, 1, 1], [1, 1, 0, 1, 0, 1], [0, 0, 1, 0, 0, 1], [1, 1, 0, 1, 0, 0], [1, 0, 0, 0, 1, 0], [1, 1, 1, 0, 0, 1]] return E def graph_p3(i): if i == 1: # 0510 E= [[1, 0, 1, 0, 0, 1], [0, 1, 0, 0, 1, 1], [1, 0, 1, 1, 0, 0], [0, 0, 1, 1, 0, 1], [0, 1, 0, 0, 1, 0], [1, 1, 0, 1, 0, 1]] if i == 2: # 0511 E= [[1, 0, 1, 0, 1, 1], [0, 1, 0, 0, 0, 1], [1, 0, 1, 0, 0, 1], [0, 0, 0, 1, 1, 0], [1, 0, 0, 1, 1, 0], [1, 1, 1, 0, 0, 1]] if i == 3: # 0511 E= [[1, 1, 0, 1, 0, 0], [1, 1, 0, 0, 1, 0], [0, 0, 1, 1, 0, 1], [1, 0, 1, 1, 1, 0], [0, 1, 0, 1, 1, 1], [0, 0, 1, 0, 1, 1]] if i == 4: # 0511 E= [[1, 1, 1, 0, 1, 0], [1, 1, 1, 0, 0, 1], [1, 1, 1, 0, 0, 0], [0, 0, 0, 1, 1, 0], [1, 0, 0, 1, 1, 0], [0, 1, 0, 0, 0, 1]] if i == 5: # 0511 E= [[1, 0, 0, 0, 0, 1], [0, 1, 1, 1, 0, 0], [0, 1, 1, 0, 1, 1], [0, 1, 0, 1, 0, 1], [0, 0, 1, 0, 1, 0], [1, 0, 1, 1, 0, 1]] return E def graph_p2(i): if i == 1: # 0510 E= [[1, 1, 1, 0, 1, 0], [1, 1, 0, 0, 0, 0], [1, 0, 1, 1, 0, 1], [0, 0, 1, 1, 0, 0], [1, 0, 0, 0, 1, 0], [0, 0, 1, 0, 0, 1]] if i == 2: # 0511 E= [[1, 0, 0, 0, 0, 1], [0, 1, 0, 1, 0, 0], [0, 0, 1, 1, 1, 0], [0, 1, 1, 1, 0, 0], [0, 0, 1, 0, 1, 1], [1, 0, 0, 0, 1, 1]] if i == 3: # 0511 E= [[1, 0, 1, 0, 0, 0], [0, 1, 1, 0, 1, 1], [1, 1, 1, 1, 0, 0], [0, 0, 1, 1, 0, 0], [0, 1, 0, 0, 1, 0], [0, 1, 0, 0, 0, 1]] if i == 4: # 0511 E= [[1, 1, 1, 0, 0, 0], [1, 1, 1, 0, 0, 0], [1, 1, 1, 0, 1, 1], [0, 0, 0, 1, 0, 1], [0, 0, 1, 0, 1, 0], [0, 0, 1, 1, 0, 1]] if i == 5: # 0511 E= [[1, 0, 0, 1, 0, 0], [0, 1, 0, 1, 0, 0], [0, 0, 1, 1, 1, 0], [1, 1, 1, 1, 0, 1], [0, 0, 1, 0, 1, 0], [0, 0, 0, 1, 0, 1]] return E
def read_e_matrix(): e = [[1, 0, 1, 0, 1, 1], [0, 1, 0, 0, 0, 1], [1, 0, 1, 0, 0, 1], [0, 0, 0, 1, 1, 0], [1, 0, 0, 1, 1, 0], [1, 1, 1, 0, 0, 1]] return E def graph_random(i): if i == 6: e = [[1, 1, 1, 0, 0, 0], [1, 1, 1, 0, 0, 1], [1, 1, 1, 0, 0, 0], [0, 0, 0, 1, 1, 0], [0, 0, 0, 1, 1, 1], [0, 1, 0, 0, 1, 1]] if i == 7: e = [[1, 1, 1, 0, 0, 0], [1, 1, 1, 0, 0, 1], [1, 1, 1, 1, 0, 0], [0, 0, 1, 1, 1, 0], [0, 0, 0, 1, 1, 1], [0, 1, 0, 0, 1, 1]] if i == 8: e = [[1, 1, 1, 0, 1, 0], [1, 1, 1, 0, 0, 1], [1, 1, 1, 1, 0, 0], [0, 0, 1, 1, 1, 0], [1, 0, 0, 1, 1, 1], [0, 1, 0, 0, 1, 1]] if i == 9: e = [[1, 1, 1, 0, 1, 0], [1, 1, 1, 1, 0, 1], [1, 1, 1, 1, 0, 0], [0, 1, 1, 1, 1, 0], [1, 0, 0, 1, 1, 1], [0, 1, 0, 0, 1, 1]] if i == 10: e = [[1, 1, 1, 1, 1, 0], [1, 1, 1, 1, 0, 1], [1, 1, 1, 1, 0, 0], [1, 1, 1, 1, 1, 0], [1, 0, 0, 1, 1, 1], [0, 1, 0, 0, 1, 1]] if i == 11: e = [[1, 1, 1, 1, 1, 0], [1, 1, 1, 1, 0, 1], [1, 1, 1, 1, 0, 0], [1, 1, 1, 1, 1, 1], [1, 0, 0, 1, 1, 1], [0, 1, 0, 1, 1, 1]] if i == 12: e = [[1, 1, 1, 1, 1, 0], [1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 0, 0], [1, 1, 1, 1, 1, 1], [1, 1, 0, 1, 1, 1], [0, 1, 0, 1, 1, 1]] if i == 13: e = [[1, 1, 1, 1, 1, 0], [1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 0, 1], [1, 1, 1, 1, 1, 1], [1, 1, 0, 1, 1, 1], [0, 1, 1, 1, 1, 1]] if i == 14: e = [[1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 0, 1], [1, 1, 1, 1, 1, 1], [1, 1, 0, 1, 1, 1], [1, 1, 1, 1, 1, 1]] return E def graph_p9(i): if i == 1: e = [[1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 0, 0], [1, 1, 1, 1, 1, 0], [1, 1, 1, 1, 1, 1], [1, 0, 1, 1, 1, 1], [1, 0, 0, 1, 1, 1]] if i == 2: e = [[0, 1, 1, 1, 1, 1], [1, 0, 1, 1, 0, 1], [1, 1, 0, 1, 1, 1], [1, 1, 1, 0, 1, 1], [1, 0, 1, 1, 0, 1], [1, 1, 1, 1, 1, 0]] if i == 3: e = [[0, 1, 1, 1, 1, 0], [1, 0, 1, 0, 1, 1], [1, 1, 0, 1, 1, 1], [1, 0, 1, 0, 1, 1], [1, 1, 1, 1, 0, 1], [0, 1, 1, 1, 1, 0]] if i == 4: e = [[0, 1, 1, 1, 1, 1], [1, 0, 1, 1, 1, 1], [1, 1, 0, 1, 1, 1], [1, 1, 1, 0, 0, 1], [1, 1, 1, 0, 0, 0], [1, 1, 1, 1, 0, 0]] if i == 5: e = [[0, 1, 0, 1, 1, 1], [1, 0, 1, 1, 1, 1], [0, 1, 0, 1, 1, 1], [1, 1, 1, 0, 1, 1], [1, 1, 1, 1, 0, 1], [1, 1, 1, 1, 1, 0]] return E def graph_p8(i): if i == 1: e = [[1, 0, 1, 1, 1, 0], [0, 1, 0, 1, 0, 1], [1, 0, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1], [1, 0, 1, 1, 1, 1], [0, 1, 1, 1, 1, 1]] if i == 2: e = [[1, 1, 1, 1, 0, 0], [1, 1, 0, 1, 1, 1], [1, 0, 1, 1, 1, 1], [1, 1, 1, 1, 0, 1], [0, 1, 1, 0, 1, 1], [0, 1, 1, 1, 1, 1]] if i == 3: e = [[1, 0, 1, 1, 1, 0], [0, 1, 1, 0, 1, 1], [1, 1, 1, 1, 1, 1], [1, 0, 1, 1, 0, 1], [1, 1, 1, 0, 1, 0], [0, 1, 1, 1, 0, 1]] if i == 4: e = [[0, 1, 0, 0, 1, 1], [1, 0, 1, 1, 1, 1], [0, 1, 0, 1, 1, 1], [0, 1, 1, 0, 1, 1], [1, 1, 1, 1, 0, 1], [1, 1, 1, 1, 1, 0]] if i == 5: e = [[0, 1, 1, 1, 1, 0], [1, 0, 1, 1, 0, 1], [1, 1, 0, 1, 1, 1], [1, 1, 1, 0, 1, 1], [1, 0, 1, 1, 0, 0], [0, 1, 1, 1, 0, 0]] return E def graph_p7(i): if i == 1: e = [[1, 1, 1, 1, 0, 0], [1, 1, 1, 1, 1, 0], [1, 1, 1, 1, 0, 1], [1, 1, 1, 1, 1, 0], [0, 1, 0, 1, 1, 1], [0, 0, 1, 0, 1, 1]] if i == 2: e = [[1, 0, 0, 1, 1, 0], [0, 1, 1, 1, 0, 1], [0, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1], [1, 0, 1, 1, 1, 1], [0, 1, 1, 1, 1, 1]] if i == 3: e = [[1, 0, 1, 1, 0, 1], [0, 1, 1, 0, 0, 1], [1, 1, 1, 0, 1, 0], [1, 0, 0, 1, 1, 1], [0, 0, 1, 1, 1, 0], [1, 1, 0, 1, 0, 1]] if i == 4: e = [[1, 1, 0, 1, 0, 0], [1, 1, 0, 1, 1, 1], [0, 0, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1], [0, 1, 1, 1, 1, 0], [0, 1, 1, 1, 0, 1]] if i == 5: e = [[1, 1, 0, 1, 1, 1], [1, 1, 1, 1, 0, 1], [0, 1, 1, 0, 1, 1], [1, 1, 0, 1, 0, 0], [1, 0, 1, 0, 1, 0], [1, 1, 1, 0, 0, 1]] return E def graph_p6(i): if i == 1: e = [[1, 0, 1, 1, 1, 0], [0, 1, 0, 0, 1, 0], [1, 0, 1, 1, 1, 0], [1, 0, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1], [0, 0, 0, 1, 1, 1]] if i == 2: e = [[1, 0, 1, 1, 1, 1], [0, 1, 1, 1, 1, 0], [1, 1, 1, 1, 1, 0], [1, 1, 1, 1, 0, 1], [1, 1, 1, 0, 1, 0], [1, 0, 0, 1, 0, 1]] if i == 3: e = [[1, 0, 1, 1, 0, 1], [0, 1, 0, 0, 1, 1], [1, 0, 1, 0, 1, 1], [1, 0, 0, 1, 1, 0], [0, 1, 1, 1, 1, 0], [1, 1, 1, 0, 0, 1]] if i == 4: e = [[1, 1, 1, 0, 1, 0], [1, 1, 0, 1, 1, 1], [1, 0, 1, 1, 0, 1], [0, 1, 1, 1, 0, 0], [1, 1, 0, 0, 1, 1], [0, 1, 1, 0, 1, 1]] if i == 5: e = [[1, 1, 1, 1, 1, 1], [1, 1, 1, 0, 1, 1], [1, 1, 1, 0, 1, 1], [1, 0, 0, 1, 0, 1], [1, 1, 1, 0, 1, 1], [1, 1, 1, 1, 1, 1]] return E def graph_p5(i): if i == 1: e = [[1, 1, 0, 0, 0, 0], [1, 1, 1, 0, 0, 1], [0, 1, 1, 1, 1, 1], [0, 0, 1, 1, 1, 1], [0, 0, 1, 1, 1, 0], [0, 1, 1, 1, 0, 1]] if i == 2: e = [[1, 1, 0, 0, 1, 0], [1, 1, 1, 0, 1, 1], [0, 1, 1, 1, 1, 0], [0, 0, 1, 1, 1, 1], [1, 1, 1, 1, 1, 0], [0, 1, 0, 1, 0, 1]] if i == 3: e = [[1, 1, 1, 1, 0, 0], [1, 1, 1, 0, 1, 1], [1, 1, 1, 0, 1, 0], [1, 0, 0, 1, 0, 1], [0, 1, 1, 0, 1, 0], [0, 1, 0, 1, 0, 1]] if i == 4: e = [[1, 0, 1, 1, 1, 0], [0, 1, 1, 1, 1, 1], [1, 1, 1, 1, 0, 0], [1, 1, 1, 1, 0, 0], [1, 1, 0, 0, 1, 0], [0, 1, 0, 0, 0, 1]] if i == 5: e = [[1, 0, 0, 0, 1, 1], [0, 1, 1, 0, 0, 0], [0, 1, 1, 1, 1, 1], [0, 0, 1, 1, 1, 1], [1, 0, 1, 1, 1, 1], [1, 0, 1, 1, 1, 1]] return E def graph_p4(i): if i == 1: e = [[1, 0, 1, 1, 1, 0], [0, 1, 1, 0, 1, 0], [1, 1, 1, 1, 0, 1], [1, 0, 1, 1, 0, 0], [1, 1, 0, 0, 1, 0], [0, 0, 1, 0, 0, 1]] if i == 2: e = [[1, 1, 0, 1, 1, 0], [1, 1, 1, 1, 0, 0], [0, 1, 1, 1, 1, 0], [1, 1, 1, 1, 0, 0], [1, 0, 1, 0, 1, 1], [0, 0, 0, 0, 1, 1]] if i == 3: e = [[1, 0, 0, 0, 0, 1], [0, 1, 1, 1, 0, 0], [0, 1, 1, 0, 1, 0], [0, 1, 0, 1, 1, 1], [0, 0, 1, 1, 1, 1], [1, 0, 0, 1, 1, 1]] if i == 4: e = [[1, 1, 1, 0, 1, 1], [1, 1, 1, 0, 0, 0], [1, 1, 1, 0, 0, 1], [0, 0, 0, 1, 1, 0], [1, 0, 0, 1, 1, 0], [1, 0, 1, 0, 0, 1]] if i == 5: e = [[1, 1, 0, 1, 1, 1], [1, 1, 0, 1, 0, 1], [0, 0, 1, 0, 0, 1], [1, 1, 0, 1, 0, 0], [1, 0, 0, 0, 1, 0], [1, 1, 1, 0, 0, 1]] return E def graph_p3(i): if i == 1: e = [[1, 0, 1, 0, 0, 1], [0, 1, 0, 0, 1, 1], [1, 0, 1, 1, 0, 0], [0, 0, 1, 1, 0, 1], [0, 1, 0, 0, 1, 0], [1, 1, 0, 1, 0, 1]] if i == 2: e = [[1, 0, 1, 0, 1, 1], [0, 1, 0, 0, 0, 1], [1, 0, 1, 0, 0, 1], [0, 0, 0, 1, 1, 0], [1, 0, 0, 1, 1, 0], [1, 1, 1, 0, 0, 1]] if i == 3: e = [[1, 1, 0, 1, 0, 0], [1, 1, 0, 0, 1, 0], [0, 0, 1, 1, 0, 1], [1, 0, 1, 1, 1, 0], [0, 1, 0, 1, 1, 1], [0, 0, 1, 0, 1, 1]] if i == 4: e = [[1, 1, 1, 0, 1, 0], [1, 1, 1, 0, 0, 1], [1, 1, 1, 0, 0, 0], [0, 0, 0, 1, 1, 0], [1, 0, 0, 1, 1, 0], [0, 1, 0, 0, 0, 1]] if i == 5: e = [[1, 0, 0, 0, 0, 1], [0, 1, 1, 1, 0, 0], [0, 1, 1, 0, 1, 1], [0, 1, 0, 1, 0, 1], [0, 0, 1, 0, 1, 0], [1, 0, 1, 1, 0, 1]] return E def graph_p2(i): if i == 1: e = [[1, 1, 1, 0, 1, 0], [1, 1, 0, 0, 0, 0], [1, 0, 1, 1, 0, 1], [0, 0, 1, 1, 0, 0], [1, 0, 0, 0, 1, 0], [0, 0, 1, 0, 0, 1]] if i == 2: e = [[1, 0, 0, 0, 0, 1], [0, 1, 0, 1, 0, 0], [0, 0, 1, 1, 1, 0], [0, 1, 1, 1, 0, 0], [0, 0, 1, 0, 1, 1], [1, 0, 0, 0, 1, 1]] if i == 3: e = [[1, 0, 1, 0, 0, 0], [0, 1, 1, 0, 1, 1], [1, 1, 1, 1, 0, 0], [0, 0, 1, 1, 0, 0], [0, 1, 0, 0, 1, 0], [0, 1, 0, 0, 0, 1]] if i == 4: e = [[1, 1, 1, 0, 0, 0], [1, 1, 1, 0, 0, 0], [1, 1, 1, 0, 1, 1], [0, 0, 0, 1, 0, 1], [0, 0, 1, 0, 1, 0], [0, 0, 1, 1, 0, 1]] if i == 5: e = [[1, 0, 0, 1, 0, 0], [0, 1, 0, 1, 0, 0], [0, 0, 1, 1, 1, 0], [1, 1, 1, 1, 0, 1], [0, 0, 1, 0, 1, 0], [0, 0, 0, 1, 0, 1]] return E
# color mixer print("Red, blue, and yellow are primary colors.") print() # ask user to choose two primary colors to mix color1 = input("Enter the primary color 1 (red,blue, or yellow): ") color2 = input("Enter the primary color 2 (red,blue, or yellow): ") if color1 == "red" and color2 == "blue": print("The secondary color is purple.") elif color1 == "blue" and color2 == "red": print("The secondary color is purple.") elif color1 == "red" and color2 == "yellow": print("The secondary color is orange.") elif color1 == "red" and color2 == "yellow": print("The secondary color is orange.") elif color1 == "blue" and color2 == "yellow": print("The secondary color is green.") elif color1 == "yellow" and color2 == "blue": print("The secondary color is green.") else: print("ERROR")
print('Red, blue, and yellow are primary colors.') print() color1 = input('Enter the primary color 1 (red,blue, or yellow): ') color2 = input('Enter the primary color 2 (red,blue, or yellow): ') if color1 == 'red' and color2 == 'blue': print('The secondary color is purple.') elif color1 == 'blue' and color2 == 'red': print('The secondary color is purple.') elif color1 == 'red' and color2 == 'yellow': print('The secondary color is orange.') elif color1 == 'red' and color2 == 'yellow': print('The secondary color is orange.') elif color1 == 'blue' and color2 == 'yellow': print('The secondary color is green.') elif color1 == 'yellow' and color2 == 'blue': print('The secondary color is green.') else: print('ERROR')
# Non-MacOS users can change it to Chrome/Firefox. BROWSER = "Chrome" # can be Chrome/Safari/Firefox MATCH_URL = "http://www.espncricinfo.com/series/8039/commentary/1144506/afghanistan-vs-england-24th-match-icc-cricket-world-cup-2019" MESSAGE_BOX_CLASS_NAME = "_3u328" SEND_BUTTON_CLASS_NAME = "_3M-N-" # Match start timings according to where the script is being run. MATCH_START_HOURS = 13 MATCH_START_MINUTES = 30 MATCH_END_HOURS = 23 MATCH_END_MINUTES = 0 SCRIPT_LOG_FILE_NAME = '../logs/script_logs.log' ERROR_LOG_FILE_NAME = '../logs/error_logs.log' # This tells whether the script is running in test mode or not. If yes, the actual data sent is less, for better debugging. IS_TEST_MODE = False
browser = 'Chrome' match_url = 'http://www.espncricinfo.com/series/8039/commentary/1144506/afghanistan-vs-england-24th-match-icc-cricket-world-cup-2019' message_box_class_name = '_3u328' send_button_class_name = '_3M-N-' match_start_hours = 13 match_start_minutes = 30 match_end_hours = 23 match_end_minutes = 0 script_log_file_name = '../logs/script_logs.log' error_log_file_name = '../logs/error_logs.log' is_test_mode = False
# REST API server related constants USERNAME = "asdfg" PASSWORD = "asdfg" HOST = "http://127.0.0.1:8000" AUTH_URL: str = f"{HOST}/auth/" LOCATIONS_URL: str = f"{HOST}/api/locations/" PANIC_URL: str = f"{HOST}/api/panic/" # Format constants DATETIME_FORMAT = "%Y-%m-%dT%H:%M:%S.%fZ" PRECISION = 6 # Job scheduling constants TIME_PANIC = 1 # TODO: Change to 60 TIME_NO_PANIC = 5 # TODO: Change to 1800 TIME_CHECK_PANIC = 3 # TODO: Change to 300 # Logging constants LOG_FILE = "gps_tracker.log" # TODO: move to /var/log/ LOG_FORMAT = "%(asctime)s - %(levelname)s - %(message)s" PENDING_FILE = "pending_locations.json" # TODO: move to /usr/local/share/gps_tracker/
username = 'asdfg' password = 'asdfg' host = 'http://127.0.0.1:8000' auth_url: str = f'{HOST}/auth/' locations_url: str = f'{HOST}/api/locations/' panic_url: str = f'{HOST}/api/panic/' datetime_format = '%Y-%m-%dT%H:%M:%S.%fZ' precision = 6 time_panic = 1 time_no_panic = 5 time_check_panic = 3 log_file = 'gps_tracker.log' log_format = '%(asctime)s - %(levelname)s - %(message)s' pending_file = 'pending_locations.json'
LOCK = False RELEASE = True VERSION = "19.99.0" VERSION_AGAIN = "19.99.0" STRICT_VERSION = "19.99.0" UNRELATED_STRING = "apple"
lock = False release = True version = '19.99.0' version_again = '19.99.0' strict_version = '19.99.0' unrelated_string = 'apple'
def dec_to_bin(dec): bin_num = '' while dec > 0: bin_num = str(dec % 2) + bin_num dec //= 2 return bin_num if __name__ == "__main__": dec_num = int(input()) print(dec_to_bin(dec_num))
def dec_to_bin(dec): bin_num = '' while dec > 0: bin_num = str(dec % 2) + bin_num dec //= 2 return bin_num if __name__ == '__main__': dec_num = int(input()) print(dec_to_bin(dec_num))
#! /usr/bin/env python # -*- coding: utf-8 -*- # author: ouyangshaokun # date: print(44444444444) print("fsfasfaa") print(22222222) print("fsfasfa") print(123214) print(22222222) print(22222222) print(22222222) print(22222222) print(22222222) print(22222222) print(42342)
print(44444444444) print('fsfasfaa') print(22222222) print('fsfasfa') print(123214) print(22222222) print(22222222) print(22222222) print(22222222) print(22222222) print(22222222) print(42342)
def add_elem(lst,ele): lst.append(ele) my_lst=[1,2,3] print(my_lst) add_elem(my_lst,5) print(my_lst)
def add_elem(lst, ele): lst.append(ele) my_lst = [1, 2, 3] print(my_lst) add_elem(my_lst, 5) print(my_lst)
print("Welcome to the GPA calculator") print("Please enter all your letter grades, one per line.") print("Enter a blank line to designate the end.") # map from letter grade to point value points = { 'A+': 4.0, 'A': 3.8, 'A-': 3.67, 'B+': 3.33, 'B': 3.0, 'B-': 2.67, 'C+': 2.33, 'C': 2.0, 'C-': 1.67, 'D': 1.0, 'F': 0.0, } num_courses = 0 total_points = 0 done = False while not done: # readline from user input grade = input() if grade == '': # empty line was entered done = True elif grade not in points: print("Unknow grade '{0}' being ignored".format(grade)) else: num_courses += 1 total_points += points[grade] if num_courses > 0: # avoid division by print("Your GPA is {0:.3}".format(total_points / num_courses))
print('Welcome to the GPA calculator') print('Please enter all your letter grades, one per line.') print('Enter a blank line to designate the end.') points = {'A+': 4.0, 'A': 3.8, 'A-': 3.67, 'B+': 3.33, 'B': 3.0, 'B-': 2.67, 'C+': 2.33, 'C': 2.0, 'C-': 1.67, 'D': 1.0, 'F': 0.0} num_courses = 0 total_points = 0 done = False while not done: grade = input() if grade == '': done = True elif grade not in points: print("Unknow grade '{0}' being ignored".format(grade)) else: num_courses += 1 total_points += points[grade] if num_courses > 0: print('Your GPA is {0:.3}'.format(total_points / num_courses))
class Logger(object): def log(self, str): print("Log: {}".format(str)) def error(self, str): print("Error: {}".format(str)) def message(self, str): print("Message: {}".format(str))
class Logger(object): def log(self, str): print('Log: {}'.format(str)) def error(self, str): print('Error: {}'.format(str)) def message(self, str): print('Message: {}'.format(str))
FAIL_ON_ANY = 'any' FAIL_ON_NEW = 'new' # Identifies that a comment came from Lintly. This is used to aid in automatically # deleting old PR comments/reviews. This is valid Markdown that is hidden from # users in GitHub and GitLab. LINTLY_IDENTIFIER = '<!-- Automatically posted by Lintly -->'
fail_on_any = 'any' fail_on_new = 'new' lintly_identifier = '<!-- Automatically posted by Lintly -->'
# # PySNMP MIB module ADSL-LINE-EXT-MIB (http://snmplabs.com/pysmi) # ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/ADSL-LINE-EXT-MIB # Produced by pysmi-0.3.4 at Wed May 1 11:13:46 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) # adslLineConfProfileEntry, adslAturPerfDataEntry, adslLineAlarmConfProfileEntry, adslLineEntry, adslAturIntervalEntry, adslAtucPerfDataEntry, adslAtucIntervalEntry, adslMIB = mibBuilder.importSymbols("ADSL-LINE-MIB", "adslLineConfProfileEntry", "adslAturPerfDataEntry", "adslLineAlarmConfProfileEntry", "adslLineEntry", "adslAturIntervalEntry", "adslAtucPerfDataEntry", "adslAtucIntervalEntry", "adslMIB") AdslPerfPrevDayCount, AdslPerfCurrDayCount = mibBuilder.importSymbols("ADSL-TC-MIB", "AdslPerfPrevDayCount", "AdslPerfCurrDayCount") OctetString, Integer, ObjectIdentifier = mibBuilder.importSymbols("ASN1", "OctetString", "Integer", "ObjectIdentifier") NamedValues, = mibBuilder.importSymbols("ASN1-ENUMERATION", "NamedValues") ConstraintsIntersection, ValueRangeConstraint, SingleValueConstraint, ConstraintsUnion, ValueSizeConstraint = mibBuilder.importSymbols("ASN1-REFINEMENT", "ConstraintsIntersection", "ValueRangeConstraint", "SingleValueConstraint", "ConstraintsUnion", "ValueSizeConstraint") PerfCurrentCount, PerfIntervalCount = mibBuilder.importSymbols("PerfHist-TC-MIB", "PerfCurrentCount", "PerfIntervalCount") SnmpAdminString, = mibBuilder.importSymbols("SNMP-FRAMEWORK-MIB", "SnmpAdminString") NotificationGroup, ModuleCompliance, ObjectGroup = mibBuilder.importSymbols("SNMPv2-CONF", "NotificationGroup", "ModuleCompliance", "ObjectGroup") Counter32, Bits, MibIdentifier, TimeTicks, ModuleIdentity, Integer32, IpAddress, Unsigned32, MibScalar, MibTable, MibTableRow, MibTableColumn, ObjectIdentity, iso, NotificationType, Counter64, Gauge32 = mibBuilder.importSymbols("SNMPv2-SMI", "Counter32", "Bits", "MibIdentifier", "TimeTicks", "ModuleIdentity", "Integer32", "IpAddress", "Unsigned32", "MibScalar", "MibTable", "MibTableRow", "MibTableColumn", "ObjectIdentity", "iso", "NotificationType", "Counter64", "Gauge32") TextualConvention, DisplayString = mibBuilder.importSymbols("SNMPv2-TC", "TextualConvention", "DisplayString") adslExtMIB = ModuleIdentity((1, 3, 6, 1, 2, 1, 10, 94, 3)) adslExtMIB.setRevisions(('2002-12-10 00:00',)) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): if mibBuilder.loadTexts: adslExtMIB.setRevisionsDescriptions(('Initial Version, published as RFC 3440. This MIB module supplements the ADSL-LINE-MIB [RFC2662].',)) if mibBuilder.loadTexts: adslExtMIB.setLastUpdated('200212100000Z') if mibBuilder.loadTexts: adslExtMIB.setOrganization('IETF ADSL MIB Working Group') if mibBuilder.loadTexts: adslExtMIB.setContactInfo(' Faye Ly Pedestal Networks 6503 Dumbarton Circle, Fremont, CA 94555 Tel: +1 510-578-0158 Fax: +1 510-744-5152 E-Mail: faye@pedestalnetworks.com Gregory Bathrick Nokia Networks 2235 Mercury Way, Fax: +1 707-535-7300 E-Mail: greg.bathrick@nokia.com General Discussion:adslmib@ietf.org To Subscribe: https://www1.ietf.org/mailman/listinfo/adslmib Archive: https://www1.ietf.org/mailman/listinfo/adslmib ') if mibBuilder.loadTexts: adslExtMIB.setDescription('Copyright (C) The Internet Society (2002). This version of this MIB module is part of RFC 3440; see the RFC itself for full legal notices. This MIB Module is a supplement to the ADSL-LINE-MIB [RFC2662].') adslExtMibObjects = MibIdentifier((1, 3, 6, 1, 2, 1, 10, 94, 3, 1)) class AdslTransmissionModeType(TextualConvention, Bits): description = 'A set of ADSL line transmission modes, with one bit per mode. The notes (F) and (L) denote Full-Rate and G.Lite respectively: Bit 00 : Regional Std. (ANSI T1.413) (F) Bit 01 : Regional Std. (ETSI DTS/TM06006) (F) Bit 02 : G.992.1 POTS non-overlapped (F) Bit 03 : G.992.1 POTS overlapped (F) Bit 04 : G.992.1 ISDN non-overlapped (F) Bit 05 : G.992.1 ISDN overlapped (F) Bit 06 : G.992.1 TCM-ISDN non-overlapped (F) Bit 07 : G.992.1 TCM-ISDN overlapped (F) Bit 08 : G.992.2 POTS non-overlapped (L) Bit 09 : G.992.2 POTS overlapped (L) Bit 10 : G.992.2 with TCM-ISDN non-overlapped (L) Bit 11 : G.992.2 with TCM-ISDN overlapped (L) Bit 12 : G.992.1 TCM-ISDN symmetric (F) ' status = 'current' namedValues = NamedValues(("ansit1413", 0), ("etsi", 1), ("q9921PotsNonOverlapped", 2), ("q9921PotsOverlapped", 3), ("q9921IsdnNonOverlapped", 4), ("q9921isdnOverlapped", 5), ("q9921tcmIsdnNonOverlapped", 6), ("q9921tcmIsdnOverlapped", 7), ("q9922potsNonOverlapeed", 8), ("q9922potsOverlapped", 9), ("q9922tcmIsdnNonOverlapped", 10), ("q9922tcmIsdnOverlapped", 11), ("q9921tcmIsdnSymmetric", 12)) adslLineExtTable = MibTable((1, 3, 6, 1, 2, 1, 10, 94, 3, 1, 17), ) if mibBuilder.loadTexts: adslLineExtTable.setStatus('current') if mibBuilder.loadTexts: adslLineExtTable.setDescription("This table is an extension of RFC 2662. It contains ADSL line configuration and monitoring information. This includes the ADSL line's capabilities and actual ADSL transmission system.") adslLineExtEntry = MibTableRow((1, 3, 6, 1, 2, 1, 10, 94, 3, 1, 17, 1), ) adslLineEntry.registerAugmentions(("ADSL-LINE-EXT-MIB", "adslLineExtEntry")) adslLineExtEntry.setIndexNames(*adslLineEntry.getIndexNames()) if mibBuilder.loadTexts: adslLineExtEntry.setStatus('current') if mibBuilder.loadTexts: adslLineExtEntry.setDescription('An entry extends the adslLineEntry defined in [RFC2662]. Each entry corresponds to an ADSL line.') adslLineTransAtucCap = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 94, 3, 1, 17, 1, 1), AdslTransmissionModeType()).setMaxAccess("readonly") if mibBuilder.loadTexts: adslLineTransAtucCap.setReference('Section 7.3.2 ITU G.997.1') if mibBuilder.loadTexts: adslLineTransAtucCap.setStatus('current') if mibBuilder.loadTexts: adslLineTransAtucCap.setDescription('The transmission modes, represented by a bitmask that the ATU-C is capable of supporting. The modes available are limited by the design of the equipment.') adslLineTransAtucConfig = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 94, 3, 1, 17, 1, 2), AdslTransmissionModeType()).setMaxAccess("readwrite") if mibBuilder.loadTexts: adslLineTransAtucConfig.setReference('Section 7.3.2 ITU G.997.1') if mibBuilder.loadTexts: adslLineTransAtucConfig.setStatus('current') if mibBuilder.loadTexts: adslLineTransAtucConfig.setDescription("The transmission modes, represented by a bitmask, currently enabled by the ATU-C. The manager can only set those modes that are supported by the ATU-C. An ATU-C's supported modes are provided by AdslLineTransAtucCap.") adslLineTransAtucActual = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 94, 3, 1, 17, 1, 3), AdslTransmissionModeType()).setMaxAccess("readonly") if mibBuilder.loadTexts: adslLineTransAtucActual.setReference('Section 7.3.2 ITU G.997.1 ') if mibBuilder.loadTexts: adslLineTransAtucActual.setStatus('current') if mibBuilder.loadTexts: adslLineTransAtucActual.setDescription("The actual transmission mode of the ATU-C. During ADSL line initialization, the ADSL Transceiver Unit - Remote terminal end (ATU-R) will determine the mode used for the link. This value will be limited a single transmission mode that is a subset of those modes enabled by the ATU-C and denoted by adslLineTransAtucConfig. After an initialization has occurred, its mode is saved as the 'Current' mode and is persistence should the link go down. This object returns 0 (i.e. BITS with no mode bit set) if the mode is not known.") adslLineGlitePowerState = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 94, 3, 1, 17, 1, 4), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4))).clone(namedValues=NamedValues(("none", 1), ("l0", 2), ("l1", 3), ("l3", 4)))).setMaxAccess("readonly") if mibBuilder.loadTexts: adslLineGlitePowerState.setStatus('current') if mibBuilder.loadTexts: adslLineGlitePowerState.setDescription('The value of this object specifies the power state of this interface. L0 is power on, L1 is power on but reduced and L3 is power off. Power state cannot be configured by an operator but it can be viewed via the ifOperStatus object for the managed ADSL interface. The value of the object ifOperStatus is set to down(2) if the ADSL interface is in power state L3 and is set to up(1) if the ADSL line interface is in power state L0 or L1. If the object adslLineTransAtucActual is set to a G.992.2 (G.Lite)-type transmission mode, the value of this object will be one of the valid power states: L0(2), L1(3), or L3(4). Otherwise, its value will be none(1).') adslLineConfProfileDualLite = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 94, 3, 1, 17, 1, 5), SnmpAdminString()).setMaxAccess("readwrite") if mibBuilder.loadTexts: adslLineConfProfileDualLite.setReference('Section 5.4 Profiles, RFC 2662') if mibBuilder.loadTexts: adslLineConfProfileDualLite.setStatus('current') if mibBuilder.loadTexts: adslLineConfProfileDualLite.setDescription("This object extends the definition an ADSL line and associated channels (when applicable) for cases when it is configured in dual mode, and operating in a G.Lite-type mode as denoted by adslLineTransAtucActual. Dual mode exists when the object, adslLineTransAtucConfig, is configured with one or more full-rate modes and one or more G.Lite modes simultaneously. When 'dynamic' profiles are implemented, the value of object is equal to the index of the applicable row in the ADSL Line Configuration Profile Table, AdslLineConfProfileTable defined in ADSL-MIB [RFC2662]. In the case when dual-mode has not been enabled, the value of the object will be equal to the value of the object adslLineConfProfile [RFC2662]. When `static' profiles are implemented, in much like the case of the object, adslLineConfProfileName [RFC2662], this object's value will need to algorithmically represent the characteristics of the line. In this case, the value of the line's ifIndex plus a value indicating the line mode type (e.g., G.Lite, Full-rate) will be used. Therefore, the profile's name is a string concatenating the ifIndex and one of the follow values: Full or Lite. This string will be fixed-length (i.e., 14) with leading zero(s). For example, the profile name for ifIndex that equals '15' and is a full rate line, it will be '0000000015Full'.") adslAtucPerfDataExtTable = MibTable((1, 3, 6, 1, 2, 1, 10, 94, 3, 1, 18), ) if mibBuilder.loadTexts: adslAtucPerfDataExtTable.setStatus('current') if mibBuilder.loadTexts: adslAtucPerfDataExtTable.setDescription('This table extends adslAtucPerfDataTable [RFC2662] with additional ADSL physical line counter information such as unavailable seconds-line and severely errored seconds-line.') adslAtucPerfDataExtEntry = MibTableRow((1, 3, 6, 1, 2, 1, 10, 94, 3, 1, 18, 1), ) adslAtucPerfDataEntry.registerAugmentions(("ADSL-LINE-EXT-MIB", "adslAtucPerfDataExtEntry")) adslAtucPerfDataExtEntry.setIndexNames(*adslAtucPerfDataEntry.getIndexNames()) if mibBuilder.loadTexts: adslAtucPerfDataExtEntry.setStatus('current') if mibBuilder.loadTexts: adslAtucPerfDataExtEntry.setDescription('An entry extends the adslAtucPerfDataEntry defined in [RFC2662]. Each entry corresponds to an ADSL line.') adslAtucPerfStatFastR = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 94, 3, 1, 18, 1, 1), Counter32()).setUnits('line retrains').setMaxAccess("readonly") if mibBuilder.loadTexts: adslAtucPerfStatFastR.setReference('ITU G.997.1 Section 7.4.15.1 ') if mibBuilder.loadTexts: adslAtucPerfStatFastR.setStatus('current') if mibBuilder.loadTexts: adslAtucPerfStatFastR.setDescription('The value of this object reports the count of the number of fast line bs since last agent reset.') adslAtucPerfStatFailedFastR = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 94, 3, 1, 18, 1, 2), Counter32()).setUnits('line retrains').setMaxAccess("readonly") if mibBuilder.loadTexts: adslAtucPerfStatFailedFastR.setReference('ITU G.997.1 Section 7.4.15.2 ') if mibBuilder.loadTexts: adslAtucPerfStatFailedFastR.setStatus('current') if mibBuilder.loadTexts: adslAtucPerfStatFailedFastR.setDescription('The value of this object reports the count of the number of failed fast line retrains since last agent reset.') adslAtucPerfStatSesL = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 94, 3, 1, 18, 1, 3), Counter32()).setUnits('seconds').setMaxAccess("readonly") if mibBuilder.loadTexts: adslAtucPerfStatSesL.setReference('ITU G.997.1 Section 7.2.1.1.7 ') if mibBuilder.loadTexts: adslAtucPerfStatSesL.setStatus('current') if mibBuilder.loadTexts: adslAtucPerfStatSesL.setDescription('The value of this object reports the count of the number of severely errored seconds-line since last agent reset.') adslAtucPerfStatUasL = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 94, 3, 1, 18, 1, 4), Counter32()).setUnits('seconds').setMaxAccess("readonly") if mibBuilder.loadTexts: adslAtucPerfStatUasL.setReference('ITU G.997.1 Section 7.2.1.1.9 ') if mibBuilder.loadTexts: adslAtucPerfStatUasL.setStatus('current') if mibBuilder.loadTexts: adslAtucPerfStatUasL.setDescription('The value of this object reports the count of the number of unavailable seconds-line since last agent reset.') adslAtucPerfCurr15MinFastR = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 94, 3, 1, 18, 1, 5), PerfCurrentCount()).setUnits('seconds').setMaxAccess("readonly") if mibBuilder.loadTexts: adslAtucPerfCurr15MinFastR.setReference('ITU G.997.1 Section 7.4.15.1 ') if mibBuilder.loadTexts: adslAtucPerfCurr15MinFastR.setStatus('current') if mibBuilder.loadTexts: adslAtucPerfCurr15MinFastR.setDescription('For the current 15-minute interval, adslAtucPerfCurr15MinFastR reports the current number of seconds during which there have been fast retrains.') adslAtucPerfCurr15MinFailedFastR = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 94, 3, 1, 18, 1, 6), PerfCurrentCount()).setUnits('seconds').setMaxAccess("readonly") if mibBuilder.loadTexts: adslAtucPerfCurr15MinFailedFastR.setReference('ITU G.997.1 Section 7.4.15.2 ') if mibBuilder.loadTexts: adslAtucPerfCurr15MinFailedFastR.setStatus('current') if mibBuilder.loadTexts: adslAtucPerfCurr15MinFailedFastR.setDescription('For the current 15-minute interval, adslAtucPerfCurr15MinFailedFastR reports the current number of seconds during which there have been failed fast retrains.') adslAtucPerfCurr15MinSesL = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 94, 3, 1, 18, 1, 7), PerfCurrentCount()).setUnits('seconds').setMaxAccess("readonly") if mibBuilder.loadTexts: adslAtucPerfCurr15MinSesL.setReference('ITU G.997.1 Section 7.2.1.1.7 ') if mibBuilder.loadTexts: adslAtucPerfCurr15MinSesL.setStatus('current') if mibBuilder.loadTexts: adslAtucPerfCurr15MinSesL.setDescription('For the current 15-minute interval, adslAtucPerfCurr15MinSesL reports the current number of seconds during which there have been severely errored seconds-line.') adslAtucPerfCurr15MinUasL = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 94, 3, 1, 18, 1, 8), PerfCurrentCount()).setUnits('seconds').setMaxAccess("readonly") if mibBuilder.loadTexts: adslAtucPerfCurr15MinUasL.setReference('ITU G.997.1 Section 7.2.1.1.9 ') if mibBuilder.loadTexts: adslAtucPerfCurr15MinUasL.setStatus('current') if mibBuilder.loadTexts: adslAtucPerfCurr15MinUasL.setDescription('For the current 15-minute interval, adslAtucPerfCurr15MinUasL reports the current number of seconds during which there have been unavailable seconds-line.') adslAtucPerfCurr1DayFastR = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 94, 3, 1, 18, 1, 9), AdslPerfCurrDayCount()).setUnits('seconds').setMaxAccess("readonly") if mibBuilder.loadTexts: adslAtucPerfCurr1DayFastR.setReference('ITU G.997.1 Section 7.4.15.1 ') if mibBuilder.loadTexts: adslAtucPerfCurr1DayFastR.setStatus('current') if mibBuilder.loadTexts: adslAtucPerfCurr1DayFastR.setDescription('For the current day as measured by adslAtucPerfCurr1DayTimeElapsed [RFC2662], adslAtucPerfCurr1DayFastR reports the number of seconds during which there have been fast retrains.') adslAtucPerfCurr1DayFailedFastR = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 94, 3, 1, 18, 1, 10), AdslPerfCurrDayCount()).setUnits('seconds').setMaxAccess("readonly") if mibBuilder.loadTexts: adslAtucPerfCurr1DayFailedFastR.setReference('ITU G.997.1 Section 7.4.15.2 ') if mibBuilder.loadTexts: adslAtucPerfCurr1DayFailedFastR.setStatus('current') if mibBuilder.loadTexts: adslAtucPerfCurr1DayFailedFastR.setDescription('For the current day as measured by adslAtucPerfCurr1DayTimeElapsed [RFC2662], adslAtucPerfCurr1DayFailedFastR reports the number of seconds during which there have been failed fast retrains.') adslAtucPerfCurr1DaySesL = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 94, 3, 1, 18, 1, 11), AdslPerfCurrDayCount()).setUnits('seconds').setMaxAccess("readonly") if mibBuilder.loadTexts: adslAtucPerfCurr1DaySesL.setReference('ITU G.997.1 Section 7.2.1.1.7 ') if mibBuilder.loadTexts: adslAtucPerfCurr1DaySesL.setStatus('current') if mibBuilder.loadTexts: adslAtucPerfCurr1DaySesL.setDescription('For the current day as measured by adslAtucPerfCurr1DayTimeElapsed [RFC2662], adslAtucPerfCurr1DaySesL reports the number of seconds during which there have been severely errored seconds-line.') adslAtucPerfCurr1DayUasL = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 94, 3, 1, 18, 1, 12), AdslPerfCurrDayCount()).setUnits('seconds').setMaxAccess("readonly") if mibBuilder.loadTexts: adslAtucPerfCurr1DayUasL.setReference('ITU G.997.1 Section 7.2.1.1.9 ') if mibBuilder.loadTexts: adslAtucPerfCurr1DayUasL.setStatus('current') if mibBuilder.loadTexts: adslAtucPerfCurr1DayUasL.setDescription('For the current day as measured by adslAtucPerfCurr1DayTimeElapsed [RFC2662], adslAtucPerfCurr1DayUasL reports the number of seconds during which there have been unavailable seconds-line.') adslAtucPerfPrev1DayFastR = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 94, 3, 1, 18, 1, 13), AdslPerfPrevDayCount()).setUnits('seconds').setMaxAccess("readonly") if mibBuilder.loadTexts: adslAtucPerfPrev1DayFastR.setReference('ITU G.997.1 Section 7.4.15.1 ') if mibBuilder.loadTexts: adslAtucPerfPrev1DayFastR.setStatus('current') if mibBuilder.loadTexts: adslAtucPerfPrev1DayFastR.setDescription('For the previous day, adslAtucPerfPrev1DayFastR reports the number of seconds during which there were fast retrains.') adslAtucPerfPrev1DayFailedFastR = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 94, 3, 1, 18, 1, 14), AdslPerfPrevDayCount()).setUnits('seconds').setMaxAccess("readonly") if mibBuilder.loadTexts: adslAtucPerfPrev1DayFailedFastR.setReference('ITU G.997.1 Section 7.4.15.2 ') if mibBuilder.loadTexts: adslAtucPerfPrev1DayFailedFastR.setStatus('current') if mibBuilder.loadTexts: adslAtucPerfPrev1DayFailedFastR.setDescription('For the previous day, adslAtucPerfPrev1DayFailedFastR reports the number of seconds during which there were failed fast retrains.') adslAtucPerfPrev1DaySesL = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 94, 3, 1, 18, 1, 15), AdslPerfPrevDayCount()).setUnits('seconds').setMaxAccess("readonly") if mibBuilder.loadTexts: adslAtucPerfPrev1DaySesL.setReference('ITU G.997.1 Section 7.2.1.1.7 ') if mibBuilder.loadTexts: adslAtucPerfPrev1DaySesL.setStatus('current') if mibBuilder.loadTexts: adslAtucPerfPrev1DaySesL.setDescription('For the previous day, adslAtucPerfPrev1DaySesL reports the number of seconds during which there were severely errored seconds-line.') adslAtucPerfPrev1DayUasL = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 94, 3, 1, 18, 1, 16), AdslPerfPrevDayCount()).setUnits('seconds').setMaxAccess("readonly") if mibBuilder.loadTexts: adslAtucPerfPrev1DayUasL.setReference('ITU G.997.1 Section 7.2.1.1.9 ') if mibBuilder.loadTexts: adslAtucPerfPrev1DayUasL.setStatus('current') if mibBuilder.loadTexts: adslAtucPerfPrev1DayUasL.setDescription('For the previous day, adslAtucPerfPrev1DayUasL reports the number of seconds during which there were unavailable seconds-line.') adslAtucIntervalExtTable = MibTable((1, 3, 6, 1, 2, 1, 10, 94, 3, 1, 19), ) if mibBuilder.loadTexts: adslAtucIntervalExtTable.setStatus('current') if mibBuilder.loadTexts: adslAtucIntervalExtTable.setDescription("This table provides one row for each ATU-C performance data collection interval for ADSL physical interfaces whose IfEntries' ifType is equal to adsl(94).") adslAtucIntervalExtEntry = MibTableRow((1, 3, 6, 1, 2, 1, 10, 94, 3, 1, 19, 1), ) adslAtucIntervalEntry.registerAugmentions(("ADSL-LINE-EXT-MIB", "adslAtucIntervalExtEntry")) adslAtucIntervalExtEntry.setIndexNames(*adslAtucIntervalEntry.getIndexNames()) if mibBuilder.loadTexts: adslAtucIntervalExtEntry.setStatus('current') if mibBuilder.loadTexts: adslAtucIntervalExtEntry.setDescription('An entry in the adslAtucIntervalExtTable.') adslAtucIntervalFastR = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 94, 3, 1, 19, 1, 1), PerfIntervalCount()).setUnits('seconds').setMaxAccess("readonly") if mibBuilder.loadTexts: adslAtucIntervalFastR.setStatus('current') if mibBuilder.loadTexts: adslAtucIntervalFastR.setDescription('For the current interval, adslAtucIntervalFastR reports the current number of seconds during which there have been fast retrains.') adslAtucIntervalFailedFastR = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 94, 3, 1, 19, 1, 2), PerfIntervalCount()).setUnits('seconds').setMaxAccess("readonly") if mibBuilder.loadTexts: adslAtucIntervalFailedFastR.setStatus('current') if mibBuilder.loadTexts: adslAtucIntervalFailedFastR.setDescription('For the each interval, adslAtucIntervalFailedFastR reports the number of seconds during which there have been failed fast retrains.') adslAtucIntervalSesL = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 94, 3, 1, 19, 1, 3), PerfIntervalCount()).setUnits('seconds').setMaxAccess("readonly") if mibBuilder.loadTexts: adslAtucIntervalSesL.setStatus('current') if mibBuilder.loadTexts: adslAtucIntervalSesL.setDescription('For the each interval, adslAtucIntervalSesL reports the number of seconds during which there have been severely errored seconds-line.') adslAtucIntervalUasL = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 94, 3, 1, 19, 1, 4), PerfIntervalCount()).setUnits('seconds').setMaxAccess("readonly") if mibBuilder.loadTexts: adslAtucIntervalUasL.setStatus('current') if mibBuilder.loadTexts: adslAtucIntervalUasL.setDescription('For the each interval, adslAtucIntervalUasL reports the number of seconds during which there have been unavailable seconds-line.') adslAturPerfDataExtTable = MibTable((1, 3, 6, 1, 2, 1, 10, 94, 3, 1, 20), ) if mibBuilder.loadTexts: adslAturPerfDataExtTable.setStatus('current') if mibBuilder.loadTexts: adslAturPerfDataExtTable.setDescription('This table contains ADSL physical line counters not defined in the adslAturPerfDataTable from the ADSL-LINE-MIB [RFC2662].') adslAturPerfDataExtEntry = MibTableRow((1, 3, 6, 1, 2, 1, 10, 94, 3, 1, 20, 1), ) adslAturPerfDataEntry.registerAugmentions(("ADSL-LINE-EXT-MIB", "adslAturPerfDataExtEntry")) adslAturPerfDataExtEntry.setIndexNames(*adslAturPerfDataEntry.getIndexNames()) if mibBuilder.loadTexts: adslAturPerfDataExtEntry.setStatus('current') if mibBuilder.loadTexts: adslAturPerfDataExtEntry.setDescription('An entry extends the adslAturPerfDataEntry defined in [RFC2662]. Each entry corresponds to an ADSL line.') adslAturPerfStatSesL = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 94, 3, 1, 20, 1, 1), Counter32()).setUnits('seconds').setMaxAccess("readonly") if mibBuilder.loadTexts: adslAturPerfStatSesL.setReference('ITU G.997.1 Section 7.2.1.1.7 ') if mibBuilder.loadTexts: adslAturPerfStatSesL.setStatus('current') if mibBuilder.loadTexts: adslAturPerfStatSesL.setDescription('The value of this object reports the count of severely errored second-line since the last agent reset.') adslAturPerfStatUasL = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 94, 3, 1, 20, 1, 2), Counter32()).setUnits('seconds').setMaxAccess("readonly") if mibBuilder.loadTexts: adslAturPerfStatUasL.setReference('ITU G.997.1 Section 7.2.1.2.9 ') if mibBuilder.loadTexts: adslAturPerfStatUasL.setStatus('current') if mibBuilder.loadTexts: adslAturPerfStatUasL.setDescription('The value of this object reports the count of unavailable seconds-line since the last agent reset.') adslAturPerfCurr15MinSesL = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 94, 3, 1, 20, 1, 3), PerfCurrentCount()).setUnits('seconds').setMaxAccess("readonly") if mibBuilder.loadTexts: adslAturPerfCurr15MinSesL.setReference('ITU G.997.1 Section 7.2.1.2.7 ') if mibBuilder.loadTexts: adslAturPerfCurr15MinSesL.setStatus('current') if mibBuilder.loadTexts: adslAturPerfCurr15MinSesL.setDescription('For the current 15-minute interval, adslAturPerfCurr15MinSesL reports the current number of seconds during which there have been severely errored seconds-line.') adslAturPerfCurr15MinUasL = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 94, 3, 1, 20, 1, 4), PerfCurrentCount()).setUnits('seconds').setMaxAccess("readonly") if mibBuilder.loadTexts: adslAturPerfCurr15MinUasL.setReference('ITU G.997.1 Section 7.2.1.2.9 ') if mibBuilder.loadTexts: adslAturPerfCurr15MinUasL.setStatus('current') if mibBuilder.loadTexts: adslAturPerfCurr15MinUasL.setDescription('For the current 15-minute interval, adslAturPerfCurr15MinUasL reports the current number of seconds during which there have been available seconds-line.') adslAturPerfCurr1DaySesL = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 94, 3, 1, 20, 1, 5), AdslPerfCurrDayCount()).setUnits('seconds').setMaxAccess("readonly") if mibBuilder.loadTexts: adslAturPerfCurr1DaySesL.setReference('ITU G.997.1 Section 7.2.1.2.7 ') if mibBuilder.loadTexts: adslAturPerfCurr1DaySesL.setStatus('current') if mibBuilder.loadTexts: adslAturPerfCurr1DaySesL.setDescription('For the current day as measured by adslAturPerfCurr1DayTimeElapsed [RFC2662], adslAturPerfCurr1DaySesL reports the number of seconds during which there have been severely errored seconds-line.') adslAturPerfCurr1DayUasL = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 94, 3, 1, 20, 1, 6), AdslPerfCurrDayCount()).setUnits('seconds').setMaxAccess("readonly") if mibBuilder.loadTexts: adslAturPerfCurr1DayUasL.setReference('ITU G.997.1 Section 7.2.1.2.9 ') if mibBuilder.loadTexts: adslAturPerfCurr1DayUasL.setStatus('current') if mibBuilder.loadTexts: adslAturPerfCurr1DayUasL.setDescription('For the current day as measured by adslAturPerfCurr1DayTimeElapsed [RFC2662], adslAturPerfCurr1DayUasL reports the number of seconds during which there have been unavailable seconds-line.') adslAturPerfPrev1DaySesL = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 94, 3, 1, 20, 1, 7), AdslPerfPrevDayCount()).setUnits('seconds').setMaxAccess("readonly") if mibBuilder.loadTexts: adslAturPerfPrev1DaySesL.setReference('ITU G.997.1 Section 7.2.1.2.7 ') if mibBuilder.loadTexts: adslAturPerfPrev1DaySesL.setStatus('current') if mibBuilder.loadTexts: adslAturPerfPrev1DaySesL.setDescription('For the previous day, adslAturPerfPrev1DaySesL reports the number of seconds during which there were severely errored seconds-line.') adslAturPerfPrev1DayUasL = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 94, 3, 1, 20, 1, 8), AdslPerfPrevDayCount()).setUnits('seconds').setMaxAccess("readonly") if mibBuilder.loadTexts: adslAturPerfPrev1DayUasL.setReference('ITU G.997.1 Section 7.2.1.2.9 ') if mibBuilder.loadTexts: adslAturPerfPrev1DayUasL.setStatus('current') if mibBuilder.loadTexts: adslAturPerfPrev1DayUasL.setDescription('For the previous day, adslAturPerfPrev1DayUasL reports the number of seconds during which there were severely errored seconds-line.') adslAturIntervalExtTable = MibTable((1, 3, 6, 1, 2, 1, 10, 94, 3, 1, 21), ) if mibBuilder.loadTexts: adslAturIntervalExtTable.setStatus('current') if mibBuilder.loadTexts: adslAturIntervalExtTable.setDescription("This table provides one row for each ATU-R performance data collection interval for ADSL physical interfaces whose IfEntries' ifType is equal to adsl(94).") adslAturIntervalExtEntry = MibTableRow((1, 3, 6, 1, 2, 1, 10, 94, 3, 1, 21, 1), ) adslAturIntervalEntry.registerAugmentions(("ADSL-LINE-EXT-MIB", "adslAturIntervalExtEntry")) adslAturIntervalExtEntry.setIndexNames(*adslAturIntervalEntry.getIndexNames()) if mibBuilder.loadTexts: adslAturIntervalExtEntry.setStatus('current') if mibBuilder.loadTexts: adslAturIntervalExtEntry.setDescription('An entry in the adslAturIntervalExtTable.') adslAturIntervalSesL = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 94, 3, 1, 21, 1, 1), PerfIntervalCount()).setUnits('seconds').setMaxAccess("readonly") if mibBuilder.loadTexts: adslAturIntervalSesL.setStatus('current') if mibBuilder.loadTexts: adslAturIntervalSesL.setDescription('For the each interval, adslAturIntervalSesL reports the number of seconds during which there have been severely errored seconds-line.') adslAturIntervalUasL = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 94, 3, 1, 21, 1, 2), PerfIntervalCount()).setUnits('seconds').setMaxAccess("readonly") if mibBuilder.loadTexts: adslAturIntervalUasL.setStatus('current') if mibBuilder.loadTexts: adslAturIntervalUasL.setDescription('For the each interval, adslAturIntervalUasL reports the number of seconds during which there have been unavailable seconds-line.') adslConfProfileExtTable = MibTable((1, 3, 6, 1, 2, 1, 10, 94, 3, 1, 22), ) if mibBuilder.loadTexts: adslConfProfileExtTable.setStatus('current') if mibBuilder.loadTexts: adslConfProfileExtTable.setDescription('The adslConfProfileExtTable extends the ADSL line profile configuration information in the adslLineConfProfileTable from the ADSL-LINE-MIB [RFC2662] by adding the ability to configure the ADSL physical line mode.') adslConfProfileExtEntry = MibTableRow((1, 3, 6, 1, 2, 1, 10, 94, 3, 1, 22, 1), ) adslLineConfProfileEntry.registerAugmentions(("ADSL-LINE-EXT-MIB", "adslConfProfileExtEntry")) adslConfProfileExtEntry.setIndexNames(*adslLineConfProfileEntry.getIndexNames()) if mibBuilder.loadTexts: adslConfProfileExtEntry.setStatus('current') if mibBuilder.loadTexts: adslConfProfileExtEntry.setDescription('An entry extends the adslLineConfProfileEntry defined in [RFC2662]. Each entry corresponds to an ADSL line profile.') adslConfProfileLineType = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 94, 3, 1, 22, 1, 1), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4, 5))).clone(namedValues=NamedValues(("noChannel", 1), ("fastOnly", 2), ("interleavedOnly", 3), ("fastOrInterleaved", 4), ("fastAndInterleaved", 5))).clone('fastOnly')).setMaxAccess("readcreate") if mibBuilder.loadTexts: adslConfProfileLineType.setStatus('current') if mibBuilder.loadTexts: adslConfProfileLineType.setDescription('This object is used to configure the ADSL physical line mode. It has following valid values: noChannel(1), when no channels exist. fastOnly(2), when only fast channel exists. interleavedOnly(3), when only interleaved channel exist. fastOrInterleaved(4), when either fast or interleaved channels can exist, but only one at any time. fastAndInterleaved(5), when both the fast channel and the interleaved channel exist. In the case when no value has been set, the default Value is noChannel(1). ') adslAlarmConfProfileExtTable = MibTable((1, 3, 6, 1, 2, 1, 10, 94, 3, 1, 23), ) if mibBuilder.loadTexts: adslAlarmConfProfileExtTable.setStatus('current') if mibBuilder.loadTexts: adslAlarmConfProfileExtTable.setDescription('This table extends the adslLineAlarmConfProfileTable and provides threshold parameters for all the counters defined in this MIB module.') adslAlarmConfProfileExtEntry = MibTableRow((1, 3, 6, 1, 2, 1, 10, 94, 3, 1, 23, 1), ) adslLineAlarmConfProfileEntry.registerAugmentions(("ADSL-LINE-EXT-MIB", "adslAlarmConfProfileExtEntry")) adslAlarmConfProfileExtEntry.setIndexNames(*adslLineAlarmConfProfileEntry.getIndexNames()) if mibBuilder.loadTexts: adslAlarmConfProfileExtEntry.setStatus('current') if mibBuilder.loadTexts: adslAlarmConfProfileExtEntry.setDescription('An entry extends the adslLineAlarmConfProfileTable defined in [RFC2662]. Each entry corresponds to an ADSL alarm profile.') adslAtucThreshold15MinFailedFastR = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 94, 3, 1, 23, 1, 1), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 900))).setUnits('seconds').setMaxAccess("readcreate") if mibBuilder.loadTexts: adslAtucThreshold15MinFailedFastR.setStatus('current') if mibBuilder.loadTexts: adslAtucThreshold15MinFailedFastR.setDescription("The first time the value of the corresponding instance of adslAtucPerfCurr15MinFailedFastR reaches or exceeds this value within a given 15-minute performance data collection period, an adslAtucFailedFastRThreshTrap notification will be generated. The value '0' will disable the notification. The default value of this object is '0'.") adslAtucThreshold15MinSesL = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 94, 3, 1, 23, 1, 2), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 900))).setUnits('seconds').setMaxAccess("readcreate") if mibBuilder.loadTexts: adslAtucThreshold15MinSesL.setStatus('current') if mibBuilder.loadTexts: adslAtucThreshold15MinSesL.setDescription("The first time the value of the corresponding instance of adslAtucPerf15MinSesL reaches or exceeds this value within a given 15-minute performance data collection period, an adslAtucSesLThreshTrap notification will be generated. The value '0' will disable the notification. The default value of this object is '0'.") adslAtucThreshold15MinUasL = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 94, 3, 1, 23, 1, 3), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 900))).setUnits('seconds').setMaxAccess("readcreate") if mibBuilder.loadTexts: adslAtucThreshold15MinUasL.setStatus('current') if mibBuilder.loadTexts: adslAtucThreshold15MinUasL.setDescription("The first time the value of the corresponding instance of adslAtucPerf15MinUasL reaches or exceeds this value within a given 15-minute performance data collection period, an adslAtucUasLThreshTrap notification will be generated. The value '0' will disable the notification. The default value of this object is '0'.") adslAturThreshold15MinSesL = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 94, 3, 1, 23, 1, 4), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 900))).setUnits('seconds').setMaxAccess("readcreate") if mibBuilder.loadTexts: adslAturThreshold15MinSesL.setStatus('current') if mibBuilder.loadTexts: adslAturThreshold15MinSesL.setDescription("The first time the value of the corresponding instance of adslAturPerf15MinSesL reaches or exceeds this value within a given 15-minute performance data collection period, an adslAturSesLThreshTrap notification will be generated. The value '0' will disable the notification. The default value of this object is '0'.") adslAturThreshold15MinUasL = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 94, 3, 1, 23, 1, 5), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 900))).setUnits('seconds').setMaxAccess("readcreate") if mibBuilder.loadTexts: adslAturThreshold15MinUasL.setStatus('current') if mibBuilder.loadTexts: adslAturThreshold15MinUasL.setDescription("The first time the value of the corresponding instance of adslAturPerf15MinUasL reaches or exceeds this value within a given 15-minute performance data collection period, an adslAturUasLThreshTrap notification will be generated. The value '0' will disable the notification. The default value of this object is '0'.") adslExtTraps = MibIdentifier((1, 3, 6, 1, 2, 1, 10, 94, 3, 1, 24)) adslExtAtucTraps = MibIdentifier((1, 3, 6, 1, 2, 1, 10, 94, 3, 1, 24, 1)) adslExtAtucTrapsPrefix = MibIdentifier((1, 3, 6, 1, 2, 1, 10, 94, 3, 1, 24, 1, 0)) adslAtucFailedFastRThreshTrap = NotificationType((1, 3, 6, 1, 2, 1, 10, 94, 3, 1, 24, 1, 0, 1)).setObjects(("ADSL-LINE-EXT-MIB", "adslAtucPerfCurr15MinFailedFastR")) if mibBuilder.loadTexts: adslAtucFailedFastRThreshTrap.setStatus('current') if mibBuilder.loadTexts: adslAtucFailedFastRThreshTrap.setDescription('Failed Fast Retrains 15-minute threshold reached.') adslAtucSesLThreshTrap = NotificationType((1, 3, 6, 1, 2, 1, 10, 94, 3, 1, 24, 1, 0, 2)).setObjects(("ADSL-LINE-EXT-MIB", "adslAtucPerfCurr15MinSesL")) if mibBuilder.loadTexts: adslAtucSesLThreshTrap.setStatus('current') if mibBuilder.loadTexts: adslAtucSesLThreshTrap.setDescription('Severely errored seconds-line 15-minute threshold reached.') adslAtucUasLThreshTrap = NotificationType((1, 3, 6, 1, 2, 1, 10, 94, 3, 1, 24, 1, 0, 3)).setObjects(("ADSL-LINE-EXT-MIB", "adslAtucPerfCurr15MinUasL")) if mibBuilder.loadTexts: adslAtucUasLThreshTrap.setStatus('current') if mibBuilder.loadTexts: adslAtucUasLThreshTrap.setDescription('Unavailable seconds-line 15-minute threshold reached.') adslExtAturTraps = MibIdentifier((1, 3, 6, 1, 2, 1, 10, 94, 3, 1, 24, 2)) adslExtAturTrapsPrefix = MibIdentifier((1, 3, 6, 1, 2, 1, 10, 94, 3, 1, 24, 2, 0)) adslAturSesLThreshTrap = NotificationType((1, 3, 6, 1, 2, 1, 10, 94, 3, 1, 24, 2, 0, 1)).setObjects(("ADSL-LINE-EXT-MIB", "adslAturPerfCurr15MinSesL")) if mibBuilder.loadTexts: adslAturSesLThreshTrap.setStatus('current') if mibBuilder.loadTexts: adslAturSesLThreshTrap.setDescription('Severely errored seconds-line 15-minute threshold reached.') adslAturUasLThreshTrap = NotificationType((1, 3, 6, 1, 2, 1, 10, 94, 3, 1, 24, 2, 0, 2)).setObjects(("ADSL-LINE-EXT-MIB", "adslAturPerfCurr15MinUasL")) if mibBuilder.loadTexts: adslAturUasLThreshTrap.setStatus('current') if mibBuilder.loadTexts: adslAturUasLThreshTrap.setDescription('Unavailable seconds-line 15-minute threshold reached.') adslExtConformance = MibIdentifier((1, 3, 6, 1, 2, 1, 10, 94, 3, 2)) adslExtGroups = MibIdentifier((1, 3, 6, 1, 2, 1, 10, 94, 3, 2, 1)) adslExtCompliances = MibIdentifier((1, 3, 6, 1, 2, 1, 10, 94, 3, 2, 2)) adslExtLineMibAtucCompliance = ModuleCompliance((1, 3, 6, 1, 2, 1, 10, 94, 3, 2, 2, 1)).setObjects(("ADSL-LINE-EXT-MIB", "adslExtLineGroup"), ("ADSL-LINE-EXT-MIB", "adslExtLineConfProfileControlGroup"), ("ADSL-LINE-EXT-MIB", "adslExtLineAlarmConfProfileGroup"), ("ADSL-LINE-EXT-MIB", "adslExtAtucPhysPerfCounterGroup"), ("ADSL-LINE-EXT-MIB", "adslExtAturPhysPerfCounterGroup"), ("ADSL-LINE-EXT-MIB", "adslExtNotificationsGroup")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): adslExtLineMibAtucCompliance = adslExtLineMibAtucCompliance.setStatus('current') if mibBuilder.loadTexts: adslExtLineMibAtucCompliance.setDescription('The compliance statement for SNMP entities which represent ADSL ATU-C interfaces.') adslExtLineGroup = ObjectGroup((1, 3, 6, 1, 2, 1, 10, 94, 3, 2, 1, 1)).setObjects(("ADSL-LINE-EXT-MIB", "adslLineConfProfileDualLite"), ("ADSL-LINE-EXT-MIB", "adslLineTransAtucCap"), ("ADSL-LINE-EXT-MIB", "adslLineTransAtucConfig"), ("ADSL-LINE-EXT-MIB", "adslLineTransAtucActual"), ("ADSL-LINE-EXT-MIB", "adslLineGlitePowerState")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): adslExtLineGroup = adslExtLineGroup.setStatus('current') if mibBuilder.loadTexts: adslExtLineGroup.setDescription('A collection of objects providing extended configuration information about an ADSL Line.') adslExtAtucPhysPerfCounterGroup = ObjectGroup((1, 3, 6, 1, 2, 1, 10, 94, 3, 2, 1, 2)).setObjects(("ADSL-LINE-EXT-MIB", "adslAtucPerfStatFastR"), ("ADSL-LINE-EXT-MIB", "adslAtucPerfStatFailedFastR"), ("ADSL-LINE-EXT-MIB", "adslAtucPerfCurr15MinFastR"), ("ADSL-LINE-EXT-MIB", "adslAtucPerfCurr15MinFailedFastR"), ("ADSL-LINE-EXT-MIB", "adslAtucPerfCurr1DayFastR"), ("ADSL-LINE-EXT-MIB", "adslAtucPerfCurr1DayFailedFastR"), ("ADSL-LINE-EXT-MIB", "adslAtucPerfPrev1DayFastR"), ("ADSL-LINE-EXT-MIB", "adslAtucPerfPrev1DayFailedFastR"), ("ADSL-LINE-EXT-MIB", "adslAtucPerfStatSesL"), ("ADSL-LINE-EXT-MIB", "adslAtucPerfStatUasL"), ("ADSL-LINE-EXT-MIB", "adslAtucPerfCurr15MinSesL"), ("ADSL-LINE-EXT-MIB", "adslAtucPerfCurr15MinUasL"), ("ADSL-LINE-EXT-MIB", "adslAtucPerfCurr1DaySesL"), ("ADSL-LINE-EXT-MIB", "adslAtucPerfCurr1DayUasL"), ("ADSL-LINE-EXT-MIB", "adslAtucPerfPrev1DaySesL"), ("ADSL-LINE-EXT-MIB", "adslAtucPerfPrev1DayUasL"), ("ADSL-LINE-EXT-MIB", "adslAtucIntervalFastR"), ("ADSL-LINE-EXT-MIB", "adslAtucIntervalFailedFastR"), ("ADSL-LINE-EXT-MIB", "adslAtucIntervalSesL"), ("ADSL-LINE-EXT-MIB", "adslAtucIntervalUasL")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): adslExtAtucPhysPerfCounterGroup = adslExtAtucPhysPerfCounterGroup.setStatus('current') if mibBuilder.loadTexts: adslExtAtucPhysPerfCounterGroup.setDescription('A collection of objects providing raw performance counts on an ADSL Line (ATU-C end).') adslExtAturPhysPerfCounterGroup = ObjectGroup((1, 3, 6, 1, 2, 1, 10, 94, 3, 2, 1, 3)).setObjects(("ADSL-LINE-EXT-MIB", "adslAturPerfStatSesL"), ("ADSL-LINE-EXT-MIB", "adslAturPerfStatUasL"), ("ADSL-LINE-EXT-MIB", "adslAturPerfCurr15MinSesL"), ("ADSL-LINE-EXT-MIB", "adslAturPerfCurr15MinUasL"), ("ADSL-LINE-EXT-MIB", "adslAturPerfCurr1DaySesL"), ("ADSL-LINE-EXT-MIB", "adslAturPerfCurr1DayUasL"), ("ADSL-LINE-EXT-MIB", "adslAturPerfPrev1DaySesL"), ("ADSL-LINE-EXT-MIB", "adslAturPerfPrev1DayUasL"), ("ADSL-LINE-EXT-MIB", "adslAturIntervalSesL"), ("ADSL-LINE-EXT-MIB", "adslAturIntervalUasL")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): adslExtAturPhysPerfCounterGroup = adslExtAturPhysPerfCounterGroup.setStatus('current') if mibBuilder.loadTexts: adslExtAturPhysPerfCounterGroup.setDescription('A collection of objects providing raw performance counts on an ADSL Line (ATU-C end).') adslExtLineConfProfileControlGroup = ObjectGroup((1, 3, 6, 1, 2, 1, 10, 94, 3, 2, 1, 4)).setObjects(("ADSL-LINE-EXT-MIB", "adslConfProfileLineType")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): adslExtLineConfProfileControlGroup = adslExtLineConfProfileControlGroup.setStatus('current') if mibBuilder.loadTexts: adslExtLineConfProfileControlGroup.setDescription('A collection of objects providing profile control for the ADSL system.') adslExtLineAlarmConfProfileGroup = ObjectGroup((1, 3, 6, 1, 2, 1, 10, 94, 3, 2, 1, 5)).setObjects(("ADSL-LINE-EXT-MIB", "adslAtucThreshold15MinFailedFastR"), ("ADSL-LINE-EXT-MIB", "adslAtucThreshold15MinSesL"), ("ADSL-LINE-EXT-MIB", "adslAtucThreshold15MinUasL"), ("ADSL-LINE-EXT-MIB", "adslAturThreshold15MinSesL"), ("ADSL-LINE-EXT-MIB", "adslAturThreshold15MinUasL")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): adslExtLineAlarmConfProfileGroup = adslExtLineAlarmConfProfileGroup.setStatus('current') if mibBuilder.loadTexts: adslExtLineAlarmConfProfileGroup.setDescription('A collection of objects providing alarm profile control for the ADSL system.') adslExtNotificationsGroup = NotificationGroup((1, 3, 6, 1, 2, 1, 10, 94, 3, 2, 1, 6)).setObjects(("ADSL-LINE-EXT-MIB", "adslAtucFailedFastRThreshTrap"), ("ADSL-LINE-EXT-MIB", "adslAtucSesLThreshTrap"), ("ADSL-LINE-EXT-MIB", "adslAtucUasLThreshTrap"), ("ADSL-LINE-EXT-MIB", "adslAturSesLThreshTrap"), ("ADSL-LINE-EXT-MIB", "adslAturUasLThreshTrap")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): adslExtNotificationsGroup = adslExtNotificationsGroup.setStatus('current') if mibBuilder.loadTexts: adslExtNotificationsGroup.setDescription('The collection of ADSL extension notifications.') mibBuilder.exportSymbols("ADSL-LINE-EXT-MIB", adslAturPerfDataExtTable=adslAturPerfDataExtTable, adslExtAturTraps=adslExtAturTraps, AdslTransmissionModeType=AdslTransmissionModeType, adslAturIntervalExtTable=adslAturIntervalExtTable, adslAtucIntervalSesL=adslAtucIntervalSesL, adslAturPerfStatUasL=adslAturPerfStatUasL, adslAturThreshold15MinSesL=adslAturThreshold15MinSesL, adslAtucPerfPrev1DayFastR=adslAtucPerfPrev1DayFastR, adslAtucFailedFastRThreshTrap=adslAtucFailedFastRThreshTrap, adslExtLineConfProfileControlGroup=adslExtLineConfProfileControlGroup, adslAtucPerfPrev1DayUasL=adslAtucPerfPrev1DayUasL, adslAturPerfCurr15MinSesL=adslAturPerfCurr15MinSesL, adslExtAtucTrapsPrefix=adslExtAtucTrapsPrefix, adslAtucPerfStatFastR=adslAtucPerfStatFastR, adslAturUasLThreshTrap=adslAturUasLThreshTrap, adslAtucPerfPrev1DaySesL=adslAtucPerfPrev1DaySesL, adslAtucPerfDataExtTable=adslAtucPerfDataExtTable, adslAturSesLThreshTrap=adslAturSesLThreshTrap, adslExtMibObjects=adslExtMibObjects, adslAtucPerfStatFailedFastR=adslAtucPerfStatFailedFastR, adslAturPerfPrev1DaySesL=adslAturPerfPrev1DaySesL, adslExtAturPhysPerfCounterGroup=adslExtAturPhysPerfCounterGroup, PYSNMP_MODULE_ID=adslExtMIB, adslLineConfProfileDualLite=adslLineConfProfileDualLite, adslConfProfileExtEntry=adslConfProfileExtEntry, adslConfProfileLineType=adslConfProfileLineType, adslExtTraps=adslExtTraps, adslLineTransAtucConfig=adslLineTransAtucConfig, adslAtucIntervalFastR=adslAtucIntervalFastR, adslExtNotificationsGroup=adslExtNotificationsGroup, adslExtLineGroup=adslExtLineGroup, adslLineExtTable=adslLineExtTable, adslAtucPerfCurr1DayFailedFastR=adslAtucPerfCurr1DayFailedFastR, adslAtucPerfCurr15MinSesL=adslAtucPerfCurr15MinSesL, adslAturThreshold15MinUasL=adslAturThreshold15MinUasL, adslAtucIntervalExtTable=adslAtucIntervalExtTable, adslLineExtEntry=adslLineExtEntry, adslAtucPerfCurr1DaySesL=adslAtucPerfCurr1DaySesL, adslExtMIB=adslExtMIB, adslLineTransAtucActual=adslLineTransAtucActual, adslExtConformance=adslExtConformance, adslLineTransAtucCap=adslLineTransAtucCap, adslAturPerfPrev1DayUasL=adslAturPerfPrev1DayUasL, adslExtAtucTraps=adslExtAtucTraps, adslAturPerfDataExtEntry=adslAturPerfDataExtEntry, adslAlarmConfProfileExtEntry=adslAlarmConfProfileExtEntry, adslAturPerfCurr15MinUasL=adslAturPerfCurr15MinUasL, adslAtucPerfStatSesL=adslAtucPerfStatSesL, adslLineGlitePowerState=adslLineGlitePowerState, adslAtucIntervalUasL=adslAtucIntervalUasL, adslAtucThreshold15MinUasL=adslAtucThreshold15MinUasL, adslAtucIntervalExtEntry=adslAtucIntervalExtEntry, adslExtAtucPhysPerfCounterGroup=adslExtAtucPhysPerfCounterGroup, adslAtucPerfCurr15MinUasL=adslAtucPerfCurr15MinUasL, adslAlarmConfProfileExtTable=adslAlarmConfProfileExtTable, adslAtucThreshold15MinSesL=adslAtucThreshold15MinSesL, adslAturPerfCurr1DayUasL=adslAturPerfCurr1DayUasL, adslExtLineMibAtucCompliance=adslExtLineMibAtucCompliance, adslExtGroups=adslExtGroups, adslAtucIntervalFailedFastR=adslAtucIntervalFailedFastR, adslAturIntervalExtEntry=adslAturIntervalExtEntry, adslAtucThreshold15MinFailedFastR=adslAtucThreshold15MinFailedFastR, adslAtucPerfCurr1DayUasL=adslAtucPerfCurr1DayUasL, adslAtucPerfCurr15MinFastR=adslAtucPerfCurr15MinFastR, adslAtucUasLThreshTrap=adslAtucUasLThreshTrap, adslAturPerfStatSesL=adslAturPerfStatSesL, adslExtAturTrapsPrefix=adslExtAturTrapsPrefix, adslAtucPerfPrev1DayFailedFastR=adslAtucPerfPrev1DayFailedFastR, adslAturIntervalUasL=adslAturIntervalUasL, adslConfProfileExtTable=adslConfProfileExtTable, adslAturIntervalSesL=adslAturIntervalSesL, adslAtucPerfDataExtEntry=adslAtucPerfDataExtEntry, adslAtucPerfStatUasL=adslAtucPerfStatUasL, adslAturPerfCurr1DaySesL=adslAturPerfCurr1DaySesL, adslAtucPerfCurr1DayFastR=adslAtucPerfCurr1DayFastR, adslAtucSesLThreshTrap=adslAtucSesLThreshTrap, adslExtLineAlarmConfProfileGroup=adslExtLineAlarmConfProfileGroup, adslExtCompliances=adslExtCompliances, adslAtucPerfCurr15MinFailedFastR=adslAtucPerfCurr15MinFailedFastR)
(adsl_line_conf_profile_entry, adsl_atur_perf_data_entry, adsl_line_alarm_conf_profile_entry, adsl_line_entry, adsl_atur_interval_entry, adsl_atuc_perf_data_entry, adsl_atuc_interval_entry, adsl_mib) = mibBuilder.importSymbols('ADSL-LINE-MIB', 'adslLineConfProfileEntry', 'adslAturPerfDataEntry', 'adslLineAlarmConfProfileEntry', 'adslLineEntry', 'adslAturIntervalEntry', 'adslAtucPerfDataEntry', 'adslAtucIntervalEntry', 'adslMIB') (adsl_perf_prev_day_count, adsl_perf_curr_day_count) = mibBuilder.importSymbols('ADSL-TC-MIB', 'AdslPerfPrevDayCount', 'AdslPerfCurrDayCount') (octet_string, integer, object_identifier) = mibBuilder.importSymbols('ASN1', 'OctetString', 'Integer', 'ObjectIdentifier') (named_values,) = mibBuilder.importSymbols('ASN1-ENUMERATION', 'NamedValues') (constraints_intersection, value_range_constraint, single_value_constraint, constraints_union, value_size_constraint) = mibBuilder.importSymbols('ASN1-REFINEMENT', 'ConstraintsIntersection', 'ValueRangeConstraint', 'SingleValueConstraint', 'ConstraintsUnion', 'ValueSizeConstraint') (perf_current_count, perf_interval_count) = mibBuilder.importSymbols('PerfHist-TC-MIB', 'PerfCurrentCount', 'PerfIntervalCount') (snmp_admin_string,) = mibBuilder.importSymbols('SNMP-FRAMEWORK-MIB', 'SnmpAdminString') (notification_group, module_compliance, object_group) = mibBuilder.importSymbols('SNMPv2-CONF', 'NotificationGroup', 'ModuleCompliance', 'ObjectGroup') (counter32, bits, mib_identifier, time_ticks, module_identity, integer32, ip_address, unsigned32, mib_scalar, mib_table, mib_table_row, mib_table_column, object_identity, iso, notification_type, counter64, gauge32) = mibBuilder.importSymbols('SNMPv2-SMI', 'Counter32', 'Bits', 'MibIdentifier', 'TimeTicks', 'ModuleIdentity', 'Integer32', 'IpAddress', 'Unsigned32', 'MibScalar', 'MibTable', 'MibTableRow', 'MibTableColumn', 'ObjectIdentity', 'iso', 'NotificationType', 'Counter64', 'Gauge32') (textual_convention, display_string) = mibBuilder.importSymbols('SNMPv2-TC', 'TextualConvention', 'DisplayString') adsl_ext_mib = module_identity((1, 3, 6, 1, 2, 1, 10, 94, 3)) adslExtMIB.setRevisions(('2002-12-10 00:00',)) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): if mibBuilder.loadTexts: adslExtMIB.setRevisionsDescriptions(('Initial Version, published as RFC 3440. This MIB module supplements the ADSL-LINE-MIB [RFC2662].',)) if mibBuilder.loadTexts: adslExtMIB.setLastUpdated('200212100000Z') if mibBuilder.loadTexts: adslExtMIB.setOrganization('IETF ADSL MIB Working Group') if mibBuilder.loadTexts: adslExtMIB.setContactInfo(' Faye Ly Pedestal Networks 6503 Dumbarton Circle, Fremont, CA 94555 Tel: +1 510-578-0158 Fax: +1 510-744-5152 E-Mail: faye@pedestalnetworks.com Gregory Bathrick Nokia Networks 2235 Mercury Way, Fax: +1 707-535-7300 E-Mail: greg.bathrick@nokia.com General Discussion:adslmib@ietf.org To Subscribe: https://www1.ietf.org/mailman/listinfo/adslmib Archive: https://www1.ietf.org/mailman/listinfo/adslmib ') if mibBuilder.loadTexts: adslExtMIB.setDescription('Copyright (C) The Internet Society (2002). This version of this MIB module is part of RFC 3440; see the RFC itself for full legal notices. This MIB Module is a supplement to the ADSL-LINE-MIB [RFC2662].') adsl_ext_mib_objects = mib_identifier((1, 3, 6, 1, 2, 1, 10, 94, 3, 1)) class Adsltransmissionmodetype(TextualConvention, Bits): description = 'A set of ADSL line transmission modes, with one bit per mode. The notes (F) and (L) denote Full-Rate and G.Lite respectively: Bit 00 : Regional Std. (ANSI T1.413) (F) Bit 01 : Regional Std. (ETSI DTS/TM06006) (F) Bit 02 : G.992.1 POTS non-overlapped (F) Bit 03 : G.992.1 POTS overlapped (F) Bit 04 : G.992.1 ISDN non-overlapped (F) Bit 05 : G.992.1 ISDN overlapped (F) Bit 06 : G.992.1 TCM-ISDN non-overlapped (F) Bit 07 : G.992.1 TCM-ISDN overlapped (F) Bit 08 : G.992.2 POTS non-overlapped (L) Bit 09 : G.992.2 POTS overlapped (L) Bit 10 : G.992.2 with TCM-ISDN non-overlapped (L) Bit 11 : G.992.2 with TCM-ISDN overlapped (L) Bit 12 : G.992.1 TCM-ISDN symmetric (F) ' status = 'current' named_values = named_values(('ansit1413', 0), ('etsi', 1), ('q9921PotsNonOverlapped', 2), ('q9921PotsOverlapped', 3), ('q9921IsdnNonOverlapped', 4), ('q9921isdnOverlapped', 5), ('q9921tcmIsdnNonOverlapped', 6), ('q9921tcmIsdnOverlapped', 7), ('q9922potsNonOverlapeed', 8), ('q9922potsOverlapped', 9), ('q9922tcmIsdnNonOverlapped', 10), ('q9922tcmIsdnOverlapped', 11), ('q9921tcmIsdnSymmetric', 12)) adsl_line_ext_table = mib_table((1, 3, 6, 1, 2, 1, 10, 94, 3, 1, 17)) if mibBuilder.loadTexts: adslLineExtTable.setStatus('current') if mibBuilder.loadTexts: adslLineExtTable.setDescription("This table is an extension of RFC 2662. It contains ADSL line configuration and monitoring information. This includes the ADSL line's capabilities and actual ADSL transmission system.") adsl_line_ext_entry = mib_table_row((1, 3, 6, 1, 2, 1, 10, 94, 3, 1, 17, 1)) adslLineEntry.registerAugmentions(('ADSL-LINE-EXT-MIB', 'adslLineExtEntry')) adslLineExtEntry.setIndexNames(*adslLineEntry.getIndexNames()) if mibBuilder.loadTexts: adslLineExtEntry.setStatus('current') if mibBuilder.loadTexts: adslLineExtEntry.setDescription('An entry extends the adslLineEntry defined in [RFC2662]. Each entry corresponds to an ADSL line.') adsl_line_trans_atuc_cap = mib_table_column((1, 3, 6, 1, 2, 1, 10, 94, 3, 1, 17, 1, 1), adsl_transmission_mode_type()).setMaxAccess('readonly') if mibBuilder.loadTexts: adslLineTransAtucCap.setReference('Section 7.3.2 ITU G.997.1') if mibBuilder.loadTexts: adslLineTransAtucCap.setStatus('current') if mibBuilder.loadTexts: adslLineTransAtucCap.setDescription('The transmission modes, represented by a bitmask that the ATU-C is capable of supporting. The modes available are limited by the design of the equipment.') adsl_line_trans_atuc_config = mib_table_column((1, 3, 6, 1, 2, 1, 10, 94, 3, 1, 17, 1, 2), adsl_transmission_mode_type()).setMaxAccess('readwrite') if mibBuilder.loadTexts: adslLineTransAtucConfig.setReference('Section 7.3.2 ITU G.997.1') if mibBuilder.loadTexts: adslLineTransAtucConfig.setStatus('current') if mibBuilder.loadTexts: adslLineTransAtucConfig.setDescription("The transmission modes, represented by a bitmask, currently enabled by the ATU-C. The manager can only set those modes that are supported by the ATU-C. An ATU-C's supported modes are provided by AdslLineTransAtucCap.") adsl_line_trans_atuc_actual = mib_table_column((1, 3, 6, 1, 2, 1, 10, 94, 3, 1, 17, 1, 3), adsl_transmission_mode_type()).setMaxAccess('readonly') if mibBuilder.loadTexts: adslLineTransAtucActual.setReference('Section 7.3.2 ITU G.997.1 ') if mibBuilder.loadTexts: adslLineTransAtucActual.setStatus('current') if mibBuilder.loadTexts: adslLineTransAtucActual.setDescription("The actual transmission mode of the ATU-C. During ADSL line initialization, the ADSL Transceiver Unit - Remote terminal end (ATU-R) will determine the mode used for the link. This value will be limited a single transmission mode that is a subset of those modes enabled by the ATU-C and denoted by adslLineTransAtucConfig. After an initialization has occurred, its mode is saved as the 'Current' mode and is persistence should the link go down. This object returns 0 (i.e. BITS with no mode bit set) if the mode is not known.") adsl_line_glite_power_state = mib_table_column((1, 3, 6, 1, 2, 1, 10, 94, 3, 1, 17, 1, 4), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3, 4))).clone(namedValues=named_values(('none', 1), ('l0', 2), ('l1', 3), ('l3', 4)))).setMaxAccess('readonly') if mibBuilder.loadTexts: adslLineGlitePowerState.setStatus('current') if mibBuilder.loadTexts: adslLineGlitePowerState.setDescription('The value of this object specifies the power state of this interface. L0 is power on, L1 is power on but reduced and L3 is power off. Power state cannot be configured by an operator but it can be viewed via the ifOperStatus object for the managed ADSL interface. The value of the object ifOperStatus is set to down(2) if the ADSL interface is in power state L3 and is set to up(1) if the ADSL line interface is in power state L0 or L1. If the object adslLineTransAtucActual is set to a G.992.2 (G.Lite)-type transmission mode, the value of this object will be one of the valid power states: L0(2), L1(3), or L3(4). Otherwise, its value will be none(1).') adsl_line_conf_profile_dual_lite = mib_table_column((1, 3, 6, 1, 2, 1, 10, 94, 3, 1, 17, 1, 5), snmp_admin_string()).setMaxAccess('readwrite') if mibBuilder.loadTexts: adslLineConfProfileDualLite.setReference('Section 5.4 Profiles, RFC 2662') if mibBuilder.loadTexts: adslLineConfProfileDualLite.setStatus('current') if mibBuilder.loadTexts: adslLineConfProfileDualLite.setDescription("This object extends the definition an ADSL line and associated channels (when applicable) for cases when it is configured in dual mode, and operating in a G.Lite-type mode as denoted by adslLineTransAtucActual. Dual mode exists when the object, adslLineTransAtucConfig, is configured with one or more full-rate modes and one or more G.Lite modes simultaneously. When 'dynamic' profiles are implemented, the value of object is equal to the index of the applicable row in the ADSL Line Configuration Profile Table, AdslLineConfProfileTable defined in ADSL-MIB [RFC2662]. In the case when dual-mode has not been enabled, the value of the object will be equal to the value of the object adslLineConfProfile [RFC2662]. When `static' profiles are implemented, in much like the case of the object, adslLineConfProfileName [RFC2662], this object's value will need to algorithmically represent the characteristics of the line. In this case, the value of the line's ifIndex plus a value indicating the line mode type (e.g., G.Lite, Full-rate) will be used. Therefore, the profile's name is a string concatenating the ifIndex and one of the follow values: Full or Lite. This string will be fixed-length (i.e., 14) with leading zero(s). For example, the profile name for ifIndex that equals '15' and is a full rate line, it will be '0000000015Full'.") adsl_atuc_perf_data_ext_table = mib_table((1, 3, 6, 1, 2, 1, 10, 94, 3, 1, 18)) if mibBuilder.loadTexts: adslAtucPerfDataExtTable.setStatus('current') if mibBuilder.loadTexts: adslAtucPerfDataExtTable.setDescription('This table extends adslAtucPerfDataTable [RFC2662] with additional ADSL physical line counter information such as unavailable seconds-line and severely errored seconds-line.') adsl_atuc_perf_data_ext_entry = mib_table_row((1, 3, 6, 1, 2, 1, 10, 94, 3, 1, 18, 1)) adslAtucPerfDataEntry.registerAugmentions(('ADSL-LINE-EXT-MIB', 'adslAtucPerfDataExtEntry')) adslAtucPerfDataExtEntry.setIndexNames(*adslAtucPerfDataEntry.getIndexNames()) if mibBuilder.loadTexts: adslAtucPerfDataExtEntry.setStatus('current') if mibBuilder.loadTexts: adslAtucPerfDataExtEntry.setDescription('An entry extends the adslAtucPerfDataEntry defined in [RFC2662]. Each entry corresponds to an ADSL line.') adsl_atuc_perf_stat_fast_r = mib_table_column((1, 3, 6, 1, 2, 1, 10, 94, 3, 1, 18, 1, 1), counter32()).setUnits('line retrains').setMaxAccess('readonly') if mibBuilder.loadTexts: adslAtucPerfStatFastR.setReference('ITU G.997.1 Section 7.4.15.1 ') if mibBuilder.loadTexts: adslAtucPerfStatFastR.setStatus('current') if mibBuilder.loadTexts: adslAtucPerfStatFastR.setDescription('The value of this object reports the count of the number of fast line bs since last agent reset.') adsl_atuc_perf_stat_failed_fast_r = mib_table_column((1, 3, 6, 1, 2, 1, 10, 94, 3, 1, 18, 1, 2), counter32()).setUnits('line retrains').setMaxAccess('readonly') if mibBuilder.loadTexts: adslAtucPerfStatFailedFastR.setReference('ITU G.997.1 Section 7.4.15.2 ') if mibBuilder.loadTexts: adslAtucPerfStatFailedFastR.setStatus('current') if mibBuilder.loadTexts: adslAtucPerfStatFailedFastR.setDescription('The value of this object reports the count of the number of failed fast line retrains since last agent reset.') adsl_atuc_perf_stat_ses_l = mib_table_column((1, 3, 6, 1, 2, 1, 10, 94, 3, 1, 18, 1, 3), counter32()).setUnits('seconds').setMaxAccess('readonly') if mibBuilder.loadTexts: adslAtucPerfStatSesL.setReference('ITU G.997.1 Section 7.2.1.1.7 ') if mibBuilder.loadTexts: adslAtucPerfStatSesL.setStatus('current') if mibBuilder.loadTexts: adslAtucPerfStatSesL.setDescription('The value of this object reports the count of the number of severely errored seconds-line since last agent reset.') adsl_atuc_perf_stat_uas_l = mib_table_column((1, 3, 6, 1, 2, 1, 10, 94, 3, 1, 18, 1, 4), counter32()).setUnits('seconds').setMaxAccess('readonly') if mibBuilder.loadTexts: adslAtucPerfStatUasL.setReference('ITU G.997.1 Section 7.2.1.1.9 ') if mibBuilder.loadTexts: adslAtucPerfStatUasL.setStatus('current') if mibBuilder.loadTexts: adslAtucPerfStatUasL.setDescription('The value of this object reports the count of the number of unavailable seconds-line since last agent reset.') adsl_atuc_perf_curr15_min_fast_r = mib_table_column((1, 3, 6, 1, 2, 1, 10, 94, 3, 1, 18, 1, 5), perf_current_count()).setUnits('seconds').setMaxAccess('readonly') if mibBuilder.loadTexts: adslAtucPerfCurr15MinFastR.setReference('ITU G.997.1 Section 7.4.15.1 ') if mibBuilder.loadTexts: adslAtucPerfCurr15MinFastR.setStatus('current') if mibBuilder.loadTexts: adslAtucPerfCurr15MinFastR.setDescription('For the current 15-minute interval, adslAtucPerfCurr15MinFastR reports the current number of seconds during which there have been fast retrains.') adsl_atuc_perf_curr15_min_failed_fast_r = mib_table_column((1, 3, 6, 1, 2, 1, 10, 94, 3, 1, 18, 1, 6), perf_current_count()).setUnits('seconds').setMaxAccess('readonly') if mibBuilder.loadTexts: adslAtucPerfCurr15MinFailedFastR.setReference('ITU G.997.1 Section 7.4.15.2 ') if mibBuilder.loadTexts: adslAtucPerfCurr15MinFailedFastR.setStatus('current') if mibBuilder.loadTexts: adslAtucPerfCurr15MinFailedFastR.setDescription('For the current 15-minute interval, adslAtucPerfCurr15MinFailedFastR reports the current number of seconds during which there have been failed fast retrains.') adsl_atuc_perf_curr15_min_ses_l = mib_table_column((1, 3, 6, 1, 2, 1, 10, 94, 3, 1, 18, 1, 7), perf_current_count()).setUnits('seconds').setMaxAccess('readonly') if mibBuilder.loadTexts: adslAtucPerfCurr15MinSesL.setReference('ITU G.997.1 Section 7.2.1.1.7 ') if mibBuilder.loadTexts: adslAtucPerfCurr15MinSesL.setStatus('current') if mibBuilder.loadTexts: adslAtucPerfCurr15MinSesL.setDescription('For the current 15-minute interval, adslAtucPerfCurr15MinSesL reports the current number of seconds during which there have been severely errored seconds-line.') adsl_atuc_perf_curr15_min_uas_l = mib_table_column((1, 3, 6, 1, 2, 1, 10, 94, 3, 1, 18, 1, 8), perf_current_count()).setUnits('seconds').setMaxAccess('readonly') if mibBuilder.loadTexts: adslAtucPerfCurr15MinUasL.setReference('ITU G.997.1 Section 7.2.1.1.9 ') if mibBuilder.loadTexts: adslAtucPerfCurr15MinUasL.setStatus('current') if mibBuilder.loadTexts: adslAtucPerfCurr15MinUasL.setDescription('For the current 15-minute interval, adslAtucPerfCurr15MinUasL reports the current number of seconds during which there have been unavailable seconds-line.') adsl_atuc_perf_curr1_day_fast_r = mib_table_column((1, 3, 6, 1, 2, 1, 10, 94, 3, 1, 18, 1, 9), adsl_perf_curr_day_count()).setUnits('seconds').setMaxAccess('readonly') if mibBuilder.loadTexts: adslAtucPerfCurr1DayFastR.setReference('ITU G.997.1 Section 7.4.15.1 ') if mibBuilder.loadTexts: adslAtucPerfCurr1DayFastR.setStatus('current') if mibBuilder.loadTexts: adslAtucPerfCurr1DayFastR.setDescription('For the current day as measured by adslAtucPerfCurr1DayTimeElapsed [RFC2662], adslAtucPerfCurr1DayFastR reports the number of seconds during which there have been fast retrains.') adsl_atuc_perf_curr1_day_failed_fast_r = mib_table_column((1, 3, 6, 1, 2, 1, 10, 94, 3, 1, 18, 1, 10), adsl_perf_curr_day_count()).setUnits('seconds').setMaxAccess('readonly') if mibBuilder.loadTexts: adslAtucPerfCurr1DayFailedFastR.setReference('ITU G.997.1 Section 7.4.15.2 ') if mibBuilder.loadTexts: adslAtucPerfCurr1DayFailedFastR.setStatus('current') if mibBuilder.loadTexts: adslAtucPerfCurr1DayFailedFastR.setDescription('For the current day as measured by adslAtucPerfCurr1DayTimeElapsed [RFC2662], adslAtucPerfCurr1DayFailedFastR reports the number of seconds during which there have been failed fast retrains.') adsl_atuc_perf_curr1_day_ses_l = mib_table_column((1, 3, 6, 1, 2, 1, 10, 94, 3, 1, 18, 1, 11), adsl_perf_curr_day_count()).setUnits('seconds').setMaxAccess('readonly') if mibBuilder.loadTexts: adslAtucPerfCurr1DaySesL.setReference('ITU G.997.1 Section 7.2.1.1.7 ') if mibBuilder.loadTexts: adslAtucPerfCurr1DaySesL.setStatus('current') if mibBuilder.loadTexts: adslAtucPerfCurr1DaySesL.setDescription('For the current day as measured by adslAtucPerfCurr1DayTimeElapsed [RFC2662], adslAtucPerfCurr1DaySesL reports the number of seconds during which there have been severely errored seconds-line.') adsl_atuc_perf_curr1_day_uas_l = mib_table_column((1, 3, 6, 1, 2, 1, 10, 94, 3, 1, 18, 1, 12), adsl_perf_curr_day_count()).setUnits('seconds').setMaxAccess('readonly') if mibBuilder.loadTexts: adslAtucPerfCurr1DayUasL.setReference('ITU G.997.1 Section 7.2.1.1.9 ') if mibBuilder.loadTexts: adslAtucPerfCurr1DayUasL.setStatus('current') if mibBuilder.loadTexts: adslAtucPerfCurr1DayUasL.setDescription('For the current day as measured by adslAtucPerfCurr1DayTimeElapsed [RFC2662], adslAtucPerfCurr1DayUasL reports the number of seconds during which there have been unavailable seconds-line.') adsl_atuc_perf_prev1_day_fast_r = mib_table_column((1, 3, 6, 1, 2, 1, 10, 94, 3, 1, 18, 1, 13), adsl_perf_prev_day_count()).setUnits('seconds').setMaxAccess('readonly') if mibBuilder.loadTexts: adslAtucPerfPrev1DayFastR.setReference('ITU G.997.1 Section 7.4.15.1 ') if mibBuilder.loadTexts: adslAtucPerfPrev1DayFastR.setStatus('current') if mibBuilder.loadTexts: adslAtucPerfPrev1DayFastR.setDescription('For the previous day, adslAtucPerfPrev1DayFastR reports the number of seconds during which there were fast retrains.') adsl_atuc_perf_prev1_day_failed_fast_r = mib_table_column((1, 3, 6, 1, 2, 1, 10, 94, 3, 1, 18, 1, 14), adsl_perf_prev_day_count()).setUnits('seconds').setMaxAccess('readonly') if mibBuilder.loadTexts: adslAtucPerfPrev1DayFailedFastR.setReference('ITU G.997.1 Section 7.4.15.2 ') if mibBuilder.loadTexts: adslAtucPerfPrev1DayFailedFastR.setStatus('current') if mibBuilder.loadTexts: adslAtucPerfPrev1DayFailedFastR.setDescription('For the previous day, adslAtucPerfPrev1DayFailedFastR reports the number of seconds during which there were failed fast retrains.') adsl_atuc_perf_prev1_day_ses_l = mib_table_column((1, 3, 6, 1, 2, 1, 10, 94, 3, 1, 18, 1, 15), adsl_perf_prev_day_count()).setUnits('seconds').setMaxAccess('readonly') if mibBuilder.loadTexts: adslAtucPerfPrev1DaySesL.setReference('ITU G.997.1 Section 7.2.1.1.7 ') if mibBuilder.loadTexts: adslAtucPerfPrev1DaySesL.setStatus('current') if mibBuilder.loadTexts: adslAtucPerfPrev1DaySesL.setDescription('For the previous day, adslAtucPerfPrev1DaySesL reports the number of seconds during which there were severely errored seconds-line.') adsl_atuc_perf_prev1_day_uas_l = mib_table_column((1, 3, 6, 1, 2, 1, 10, 94, 3, 1, 18, 1, 16), adsl_perf_prev_day_count()).setUnits('seconds').setMaxAccess('readonly') if mibBuilder.loadTexts: adslAtucPerfPrev1DayUasL.setReference('ITU G.997.1 Section 7.2.1.1.9 ') if mibBuilder.loadTexts: adslAtucPerfPrev1DayUasL.setStatus('current') if mibBuilder.loadTexts: adslAtucPerfPrev1DayUasL.setDescription('For the previous day, adslAtucPerfPrev1DayUasL reports the number of seconds during which there were unavailable seconds-line.') adsl_atuc_interval_ext_table = mib_table((1, 3, 6, 1, 2, 1, 10, 94, 3, 1, 19)) if mibBuilder.loadTexts: adslAtucIntervalExtTable.setStatus('current') if mibBuilder.loadTexts: adslAtucIntervalExtTable.setDescription("This table provides one row for each ATU-C performance data collection interval for ADSL physical interfaces whose IfEntries' ifType is equal to adsl(94).") adsl_atuc_interval_ext_entry = mib_table_row((1, 3, 6, 1, 2, 1, 10, 94, 3, 1, 19, 1)) adslAtucIntervalEntry.registerAugmentions(('ADSL-LINE-EXT-MIB', 'adslAtucIntervalExtEntry')) adslAtucIntervalExtEntry.setIndexNames(*adslAtucIntervalEntry.getIndexNames()) if mibBuilder.loadTexts: adslAtucIntervalExtEntry.setStatus('current') if mibBuilder.loadTexts: adslAtucIntervalExtEntry.setDescription('An entry in the adslAtucIntervalExtTable.') adsl_atuc_interval_fast_r = mib_table_column((1, 3, 6, 1, 2, 1, 10, 94, 3, 1, 19, 1, 1), perf_interval_count()).setUnits('seconds').setMaxAccess('readonly') if mibBuilder.loadTexts: adslAtucIntervalFastR.setStatus('current') if mibBuilder.loadTexts: adslAtucIntervalFastR.setDescription('For the current interval, adslAtucIntervalFastR reports the current number of seconds during which there have been fast retrains.') adsl_atuc_interval_failed_fast_r = mib_table_column((1, 3, 6, 1, 2, 1, 10, 94, 3, 1, 19, 1, 2), perf_interval_count()).setUnits('seconds').setMaxAccess('readonly') if mibBuilder.loadTexts: adslAtucIntervalFailedFastR.setStatus('current') if mibBuilder.loadTexts: adslAtucIntervalFailedFastR.setDescription('For the each interval, adslAtucIntervalFailedFastR reports the number of seconds during which there have been failed fast retrains.') adsl_atuc_interval_ses_l = mib_table_column((1, 3, 6, 1, 2, 1, 10, 94, 3, 1, 19, 1, 3), perf_interval_count()).setUnits('seconds').setMaxAccess('readonly') if mibBuilder.loadTexts: adslAtucIntervalSesL.setStatus('current') if mibBuilder.loadTexts: adslAtucIntervalSesL.setDescription('For the each interval, adslAtucIntervalSesL reports the number of seconds during which there have been severely errored seconds-line.') adsl_atuc_interval_uas_l = mib_table_column((1, 3, 6, 1, 2, 1, 10, 94, 3, 1, 19, 1, 4), perf_interval_count()).setUnits('seconds').setMaxAccess('readonly') if mibBuilder.loadTexts: adslAtucIntervalUasL.setStatus('current') if mibBuilder.loadTexts: adslAtucIntervalUasL.setDescription('For the each interval, adslAtucIntervalUasL reports the number of seconds during which there have been unavailable seconds-line.') adsl_atur_perf_data_ext_table = mib_table((1, 3, 6, 1, 2, 1, 10, 94, 3, 1, 20)) if mibBuilder.loadTexts: adslAturPerfDataExtTable.setStatus('current') if mibBuilder.loadTexts: adslAturPerfDataExtTable.setDescription('This table contains ADSL physical line counters not defined in the adslAturPerfDataTable from the ADSL-LINE-MIB [RFC2662].') adsl_atur_perf_data_ext_entry = mib_table_row((1, 3, 6, 1, 2, 1, 10, 94, 3, 1, 20, 1)) adslAturPerfDataEntry.registerAugmentions(('ADSL-LINE-EXT-MIB', 'adslAturPerfDataExtEntry')) adslAturPerfDataExtEntry.setIndexNames(*adslAturPerfDataEntry.getIndexNames()) if mibBuilder.loadTexts: adslAturPerfDataExtEntry.setStatus('current') if mibBuilder.loadTexts: adslAturPerfDataExtEntry.setDescription('An entry extends the adslAturPerfDataEntry defined in [RFC2662]. Each entry corresponds to an ADSL line.') adsl_atur_perf_stat_ses_l = mib_table_column((1, 3, 6, 1, 2, 1, 10, 94, 3, 1, 20, 1, 1), counter32()).setUnits('seconds').setMaxAccess('readonly') if mibBuilder.loadTexts: adslAturPerfStatSesL.setReference('ITU G.997.1 Section 7.2.1.1.7 ') if mibBuilder.loadTexts: adslAturPerfStatSesL.setStatus('current') if mibBuilder.loadTexts: adslAturPerfStatSesL.setDescription('The value of this object reports the count of severely errored second-line since the last agent reset.') adsl_atur_perf_stat_uas_l = mib_table_column((1, 3, 6, 1, 2, 1, 10, 94, 3, 1, 20, 1, 2), counter32()).setUnits('seconds').setMaxAccess('readonly') if mibBuilder.loadTexts: adslAturPerfStatUasL.setReference('ITU G.997.1 Section 7.2.1.2.9 ') if mibBuilder.loadTexts: adslAturPerfStatUasL.setStatus('current') if mibBuilder.loadTexts: adslAturPerfStatUasL.setDescription('The value of this object reports the count of unavailable seconds-line since the last agent reset.') adsl_atur_perf_curr15_min_ses_l = mib_table_column((1, 3, 6, 1, 2, 1, 10, 94, 3, 1, 20, 1, 3), perf_current_count()).setUnits('seconds').setMaxAccess('readonly') if mibBuilder.loadTexts: adslAturPerfCurr15MinSesL.setReference('ITU G.997.1 Section 7.2.1.2.7 ') if mibBuilder.loadTexts: adslAturPerfCurr15MinSesL.setStatus('current') if mibBuilder.loadTexts: adslAturPerfCurr15MinSesL.setDescription('For the current 15-minute interval, adslAturPerfCurr15MinSesL reports the current number of seconds during which there have been severely errored seconds-line.') adsl_atur_perf_curr15_min_uas_l = mib_table_column((1, 3, 6, 1, 2, 1, 10, 94, 3, 1, 20, 1, 4), perf_current_count()).setUnits('seconds').setMaxAccess('readonly') if mibBuilder.loadTexts: adslAturPerfCurr15MinUasL.setReference('ITU G.997.1 Section 7.2.1.2.9 ') if mibBuilder.loadTexts: adslAturPerfCurr15MinUasL.setStatus('current') if mibBuilder.loadTexts: adslAturPerfCurr15MinUasL.setDescription('For the current 15-minute interval, adslAturPerfCurr15MinUasL reports the current number of seconds during which there have been available seconds-line.') adsl_atur_perf_curr1_day_ses_l = mib_table_column((1, 3, 6, 1, 2, 1, 10, 94, 3, 1, 20, 1, 5), adsl_perf_curr_day_count()).setUnits('seconds').setMaxAccess('readonly') if mibBuilder.loadTexts: adslAturPerfCurr1DaySesL.setReference('ITU G.997.1 Section 7.2.1.2.7 ') if mibBuilder.loadTexts: adslAturPerfCurr1DaySesL.setStatus('current') if mibBuilder.loadTexts: adslAturPerfCurr1DaySesL.setDescription('For the current day as measured by adslAturPerfCurr1DayTimeElapsed [RFC2662], adslAturPerfCurr1DaySesL reports the number of seconds during which there have been severely errored seconds-line.') adsl_atur_perf_curr1_day_uas_l = mib_table_column((1, 3, 6, 1, 2, 1, 10, 94, 3, 1, 20, 1, 6), adsl_perf_curr_day_count()).setUnits('seconds').setMaxAccess('readonly') if mibBuilder.loadTexts: adslAturPerfCurr1DayUasL.setReference('ITU G.997.1 Section 7.2.1.2.9 ') if mibBuilder.loadTexts: adslAturPerfCurr1DayUasL.setStatus('current') if mibBuilder.loadTexts: adslAturPerfCurr1DayUasL.setDescription('For the current day as measured by adslAturPerfCurr1DayTimeElapsed [RFC2662], adslAturPerfCurr1DayUasL reports the number of seconds during which there have been unavailable seconds-line.') adsl_atur_perf_prev1_day_ses_l = mib_table_column((1, 3, 6, 1, 2, 1, 10, 94, 3, 1, 20, 1, 7), adsl_perf_prev_day_count()).setUnits('seconds').setMaxAccess('readonly') if mibBuilder.loadTexts: adslAturPerfPrev1DaySesL.setReference('ITU G.997.1 Section 7.2.1.2.7 ') if mibBuilder.loadTexts: adslAturPerfPrev1DaySesL.setStatus('current') if mibBuilder.loadTexts: adslAturPerfPrev1DaySesL.setDescription('For the previous day, adslAturPerfPrev1DaySesL reports the number of seconds during which there were severely errored seconds-line.') adsl_atur_perf_prev1_day_uas_l = mib_table_column((1, 3, 6, 1, 2, 1, 10, 94, 3, 1, 20, 1, 8), adsl_perf_prev_day_count()).setUnits('seconds').setMaxAccess('readonly') if mibBuilder.loadTexts: adslAturPerfPrev1DayUasL.setReference('ITU G.997.1 Section 7.2.1.2.9 ') if mibBuilder.loadTexts: adslAturPerfPrev1DayUasL.setStatus('current') if mibBuilder.loadTexts: adslAturPerfPrev1DayUasL.setDescription('For the previous day, adslAturPerfPrev1DayUasL reports the number of seconds during which there were severely errored seconds-line.') adsl_atur_interval_ext_table = mib_table((1, 3, 6, 1, 2, 1, 10, 94, 3, 1, 21)) if mibBuilder.loadTexts: adslAturIntervalExtTable.setStatus('current') if mibBuilder.loadTexts: adslAturIntervalExtTable.setDescription("This table provides one row for each ATU-R performance data collection interval for ADSL physical interfaces whose IfEntries' ifType is equal to adsl(94).") adsl_atur_interval_ext_entry = mib_table_row((1, 3, 6, 1, 2, 1, 10, 94, 3, 1, 21, 1)) adslAturIntervalEntry.registerAugmentions(('ADSL-LINE-EXT-MIB', 'adslAturIntervalExtEntry')) adslAturIntervalExtEntry.setIndexNames(*adslAturIntervalEntry.getIndexNames()) if mibBuilder.loadTexts: adslAturIntervalExtEntry.setStatus('current') if mibBuilder.loadTexts: adslAturIntervalExtEntry.setDescription('An entry in the adslAturIntervalExtTable.') adsl_atur_interval_ses_l = mib_table_column((1, 3, 6, 1, 2, 1, 10, 94, 3, 1, 21, 1, 1), perf_interval_count()).setUnits('seconds').setMaxAccess('readonly') if mibBuilder.loadTexts: adslAturIntervalSesL.setStatus('current') if mibBuilder.loadTexts: adslAturIntervalSesL.setDescription('For the each interval, adslAturIntervalSesL reports the number of seconds during which there have been severely errored seconds-line.') adsl_atur_interval_uas_l = mib_table_column((1, 3, 6, 1, 2, 1, 10, 94, 3, 1, 21, 1, 2), perf_interval_count()).setUnits('seconds').setMaxAccess('readonly') if mibBuilder.loadTexts: adslAturIntervalUasL.setStatus('current') if mibBuilder.loadTexts: adslAturIntervalUasL.setDescription('For the each interval, adslAturIntervalUasL reports the number of seconds during which there have been unavailable seconds-line.') adsl_conf_profile_ext_table = mib_table((1, 3, 6, 1, 2, 1, 10, 94, 3, 1, 22)) if mibBuilder.loadTexts: adslConfProfileExtTable.setStatus('current') if mibBuilder.loadTexts: adslConfProfileExtTable.setDescription('The adslConfProfileExtTable extends the ADSL line profile configuration information in the adslLineConfProfileTable from the ADSL-LINE-MIB [RFC2662] by adding the ability to configure the ADSL physical line mode.') adsl_conf_profile_ext_entry = mib_table_row((1, 3, 6, 1, 2, 1, 10, 94, 3, 1, 22, 1)) adslLineConfProfileEntry.registerAugmentions(('ADSL-LINE-EXT-MIB', 'adslConfProfileExtEntry')) adslConfProfileExtEntry.setIndexNames(*adslLineConfProfileEntry.getIndexNames()) if mibBuilder.loadTexts: adslConfProfileExtEntry.setStatus('current') if mibBuilder.loadTexts: adslConfProfileExtEntry.setDescription('An entry extends the adslLineConfProfileEntry defined in [RFC2662]. Each entry corresponds to an ADSL line profile.') adsl_conf_profile_line_type = mib_table_column((1, 3, 6, 1, 2, 1, 10, 94, 3, 1, 22, 1, 1), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3, 4, 5))).clone(namedValues=named_values(('noChannel', 1), ('fastOnly', 2), ('interleavedOnly', 3), ('fastOrInterleaved', 4), ('fastAndInterleaved', 5))).clone('fastOnly')).setMaxAccess('readcreate') if mibBuilder.loadTexts: adslConfProfileLineType.setStatus('current') if mibBuilder.loadTexts: adslConfProfileLineType.setDescription('This object is used to configure the ADSL physical line mode. It has following valid values: noChannel(1), when no channels exist. fastOnly(2), when only fast channel exists. interleavedOnly(3), when only interleaved channel exist. fastOrInterleaved(4), when either fast or interleaved channels can exist, but only one at any time. fastAndInterleaved(5), when both the fast channel and the interleaved channel exist. In the case when no value has been set, the default Value is noChannel(1). ') adsl_alarm_conf_profile_ext_table = mib_table((1, 3, 6, 1, 2, 1, 10, 94, 3, 1, 23)) if mibBuilder.loadTexts: adslAlarmConfProfileExtTable.setStatus('current') if mibBuilder.loadTexts: adslAlarmConfProfileExtTable.setDescription('This table extends the adslLineAlarmConfProfileTable and provides threshold parameters for all the counters defined in this MIB module.') adsl_alarm_conf_profile_ext_entry = mib_table_row((1, 3, 6, 1, 2, 1, 10, 94, 3, 1, 23, 1)) adslLineAlarmConfProfileEntry.registerAugmentions(('ADSL-LINE-EXT-MIB', 'adslAlarmConfProfileExtEntry')) adslAlarmConfProfileExtEntry.setIndexNames(*adslLineAlarmConfProfileEntry.getIndexNames()) if mibBuilder.loadTexts: adslAlarmConfProfileExtEntry.setStatus('current') if mibBuilder.loadTexts: adslAlarmConfProfileExtEntry.setDescription('An entry extends the adslLineAlarmConfProfileTable defined in [RFC2662]. Each entry corresponds to an ADSL alarm profile.') adsl_atuc_threshold15_min_failed_fast_r = mib_table_column((1, 3, 6, 1, 2, 1, 10, 94, 3, 1, 23, 1, 1), integer32().subtype(subtypeSpec=value_range_constraint(0, 900))).setUnits('seconds').setMaxAccess('readcreate') if mibBuilder.loadTexts: adslAtucThreshold15MinFailedFastR.setStatus('current') if mibBuilder.loadTexts: adslAtucThreshold15MinFailedFastR.setDescription("The first time the value of the corresponding instance of adslAtucPerfCurr15MinFailedFastR reaches or exceeds this value within a given 15-minute performance data collection period, an adslAtucFailedFastRThreshTrap notification will be generated. The value '0' will disable the notification. The default value of this object is '0'.") adsl_atuc_threshold15_min_ses_l = mib_table_column((1, 3, 6, 1, 2, 1, 10, 94, 3, 1, 23, 1, 2), integer32().subtype(subtypeSpec=value_range_constraint(0, 900))).setUnits('seconds').setMaxAccess('readcreate') if mibBuilder.loadTexts: adslAtucThreshold15MinSesL.setStatus('current') if mibBuilder.loadTexts: adslAtucThreshold15MinSesL.setDescription("The first time the value of the corresponding instance of adslAtucPerf15MinSesL reaches or exceeds this value within a given 15-minute performance data collection period, an adslAtucSesLThreshTrap notification will be generated. The value '0' will disable the notification. The default value of this object is '0'.") adsl_atuc_threshold15_min_uas_l = mib_table_column((1, 3, 6, 1, 2, 1, 10, 94, 3, 1, 23, 1, 3), integer32().subtype(subtypeSpec=value_range_constraint(0, 900))).setUnits('seconds').setMaxAccess('readcreate') if mibBuilder.loadTexts: adslAtucThreshold15MinUasL.setStatus('current') if mibBuilder.loadTexts: adslAtucThreshold15MinUasL.setDescription("The first time the value of the corresponding instance of adslAtucPerf15MinUasL reaches or exceeds this value within a given 15-minute performance data collection period, an adslAtucUasLThreshTrap notification will be generated. The value '0' will disable the notification. The default value of this object is '0'.") adsl_atur_threshold15_min_ses_l = mib_table_column((1, 3, 6, 1, 2, 1, 10, 94, 3, 1, 23, 1, 4), integer32().subtype(subtypeSpec=value_range_constraint(0, 900))).setUnits('seconds').setMaxAccess('readcreate') if mibBuilder.loadTexts: adslAturThreshold15MinSesL.setStatus('current') if mibBuilder.loadTexts: adslAturThreshold15MinSesL.setDescription("The first time the value of the corresponding instance of adslAturPerf15MinSesL reaches or exceeds this value within a given 15-minute performance data collection period, an adslAturSesLThreshTrap notification will be generated. The value '0' will disable the notification. The default value of this object is '0'.") adsl_atur_threshold15_min_uas_l = mib_table_column((1, 3, 6, 1, 2, 1, 10, 94, 3, 1, 23, 1, 5), integer32().subtype(subtypeSpec=value_range_constraint(0, 900))).setUnits('seconds').setMaxAccess('readcreate') if mibBuilder.loadTexts: adslAturThreshold15MinUasL.setStatus('current') if mibBuilder.loadTexts: adslAturThreshold15MinUasL.setDescription("The first time the value of the corresponding instance of adslAturPerf15MinUasL reaches or exceeds this value within a given 15-minute performance data collection period, an adslAturUasLThreshTrap notification will be generated. The value '0' will disable the notification. The default value of this object is '0'.") adsl_ext_traps = mib_identifier((1, 3, 6, 1, 2, 1, 10, 94, 3, 1, 24)) adsl_ext_atuc_traps = mib_identifier((1, 3, 6, 1, 2, 1, 10, 94, 3, 1, 24, 1)) adsl_ext_atuc_traps_prefix = mib_identifier((1, 3, 6, 1, 2, 1, 10, 94, 3, 1, 24, 1, 0)) adsl_atuc_failed_fast_r_thresh_trap = notification_type((1, 3, 6, 1, 2, 1, 10, 94, 3, 1, 24, 1, 0, 1)).setObjects(('ADSL-LINE-EXT-MIB', 'adslAtucPerfCurr15MinFailedFastR')) if mibBuilder.loadTexts: adslAtucFailedFastRThreshTrap.setStatus('current') if mibBuilder.loadTexts: adslAtucFailedFastRThreshTrap.setDescription('Failed Fast Retrains 15-minute threshold reached.') adsl_atuc_ses_l_thresh_trap = notification_type((1, 3, 6, 1, 2, 1, 10, 94, 3, 1, 24, 1, 0, 2)).setObjects(('ADSL-LINE-EXT-MIB', 'adslAtucPerfCurr15MinSesL')) if mibBuilder.loadTexts: adslAtucSesLThreshTrap.setStatus('current') if mibBuilder.loadTexts: adslAtucSesLThreshTrap.setDescription('Severely errored seconds-line 15-minute threshold reached.') adsl_atuc_uas_l_thresh_trap = notification_type((1, 3, 6, 1, 2, 1, 10, 94, 3, 1, 24, 1, 0, 3)).setObjects(('ADSL-LINE-EXT-MIB', 'adslAtucPerfCurr15MinUasL')) if mibBuilder.loadTexts: adslAtucUasLThreshTrap.setStatus('current') if mibBuilder.loadTexts: adslAtucUasLThreshTrap.setDescription('Unavailable seconds-line 15-minute threshold reached.') adsl_ext_atur_traps = mib_identifier((1, 3, 6, 1, 2, 1, 10, 94, 3, 1, 24, 2)) adsl_ext_atur_traps_prefix = mib_identifier((1, 3, 6, 1, 2, 1, 10, 94, 3, 1, 24, 2, 0)) adsl_atur_ses_l_thresh_trap = notification_type((1, 3, 6, 1, 2, 1, 10, 94, 3, 1, 24, 2, 0, 1)).setObjects(('ADSL-LINE-EXT-MIB', 'adslAturPerfCurr15MinSesL')) if mibBuilder.loadTexts: adslAturSesLThreshTrap.setStatus('current') if mibBuilder.loadTexts: adslAturSesLThreshTrap.setDescription('Severely errored seconds-line 15-minute threshold reached.') adsl_atur_uas_l_thresh_trap = notification_type((1, 3, 6, 1, 2, 1, 10, 94, 3, 1, 24, 2, 0, 2)).setObjects(('ADSL-LINE-EXT-MIB', 'adslAturPerfCurr15MinUasL')) if mibBuilder.loadTexts: adslAturUasLThreshTrap.setStatus('current') if mibBuilder.loadTexts: adslAturUasLThreshTrap.setDescription('Unavailable seconds-line 15-minute threshold reached.') adsl_ext_conformance = mib_identifier((1, 3, 6, 1, 2, 1, 10, 94, 3, 2)) adsl_ext_groups = mib_identifier((1, 3, 6, 1, 2, 1, 10, 94, 3, 2, 1)) adsl_ext_compliances = mib_identifier((1, 3, 6, 1, 2, 1, 10, 94, 3, 2, 2)) adsl_ext_line_mib_atuc_compliance = module_compliance((1, 3, 6, 1, 2, 1, 10, 94, 3, 2, 2, 1)).setObjects(('ADSL-LINE-EXT-MIB', 'adslExtLineGroup'), ('ADSL-LINE-EXT-MIB', 'adslExtLineConfProfileControlGroup'), ('ADSL-LINE-EXT-MIB', 'adslExtLineAlarmConfProfileGroup'), ('ADSL-LINE-EXT-MIB', 'adslExtAtucPhysPerfCounterGroup'), ('ADSL-LINE-EXT-MIB', 'adslExtAturPhysPerfCounterGroup'), ('ADSL-LINE-EXT-MIB', 'adslExtNotificationsGroup')) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): adsl_ext_line_mib_atuc_compliance = adslExtLineMibAtucCompliance.setStatus('current') if mibBuilder.loadTexts: adslExtLineMibAtucCompliance.setDescription('The compliance statement for SNMP entities which represent ADSL ATU-C interfaces.') adsl_ext_line_group = object_group((1, 3, 6, 1, 2, 1, 10, 94, 3, 2, 1, 1)).setObjects(('ADSL-LINE-EXT-MIB', 'adslLineConfProfileDualLite'), ('ADSL-LINE-EXT-MIB', 'adslLineTransAtucCap'), ('ADSL-LINE-EXT-MIB', 'adslLineTransAtucConfig'), ('ADSL-LINE-EXT-MIB', 'adslLineTransAtucActual'), ('ADSL-LINE-EXT-MIB', 'adslLineGlitePowerState')) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): adsl_ext_line_group = adslExtLineGroup.setStatus('current') if mibBuilder.loadTexts: adslExtLineGroup.setDescription('A collection of objects providing extended configuration information about an ADSL Line.') adsl_ext_atuc_phys_perf_counter_group = object_group((1, 3, 6, 1, 2, 1, 10, 94, 3, 2, 1, 2)).setObjects(('ADSL-LINE-EXT-MIB', 'adslAtucPerfStatFastR'), ('ADSL-LINE-EXT-MIB', 'adslAtucPerfStatFailedFastR'), ('ADSL-LINE-EXT-MIB', 'adslAtucPerfCurr15MinFastR'), ('ADSL-LINE-EXT-MIB', 'adslAtucPerfCurr15MinFailedFastR'), ('ADSL-LINE-EXT-MIB', 'adslAtucPerfCurr1DayFastR'), ('ADSL-LINE-EXT-MIB', 'adslAtucPerfCurr1DayFailedFastR'), ('ADSL-LINE-EXT-MIB', 'adslAtucPerfPrev1DayFastR'), ('ADSL-LINE-EXT-MIB', 'adslAtucPerfPrev1DayFailedFastR'), ('ADSL-LINE-EXT-MIB', 'adslAtucPerfStatSesL'), ('ADSL-LINE-EXT-MIB', 'adslAtucPerfStatUasL'), ('ADSL-LINE-EXT-MIB', 'adslAtucPerfCurr15MinSesL'), ('ADSL-LINE-EXT-MIB', 'adslAtucPerfCurr15MinUasL'), ('ADSL-LINE-EXT-MIB', 'adslAtucPerfCurr1DaySesL'), ('ADSL-LINE-EXT-MIB', 'adslAtucPerfCurr1DayUasL'), ('ADSL-LINE-EXT-MIB', 'adslAtucPerfPrev1DaySesL'), ('ADSL-LINE-EXT-MIB', 'adslAtucPerfPrev1DayUasL'), ('ADSL-LINE-EXT-MIB', 'adslAtucIntervalFastR'), ('ADSL-LINE-EXT-MIB', 'adslAtucIntervalFailedFastR'), ('ADSL-LINE-EXT-MIB', 'adslAtucIntervalSesL'), ('ADSL-LINE-EXT-MIB', 'adslAtucIntervalUasL')) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): adsl_ext_atuc_phys_perf_counter_group = adslExtAtucPhysPerfCounterGroup.setStatus('current') if mibBuilder.loadTexts: adslExtAtucPhysPerfCounterGroup.setDescription('A collection of objects providing raw performance counts on an ADSL Line (ATU-C end).') adsl_ext_atur_phys_perf_counter_group = object_group((1, 3, 6, 1, 2, 1, 10, 94, 3, 2, 1, 3)).setObjects(('ADSL-LINE-EXT-MIB', 'adslAturPerfStatSesL'), ('ADSL-LINE-EXT-MIB', 'adslAturPerfStatUasL'), ('ADSL-LINE-EXT-MIB', 'adslAturPerfCurr15MinSesL'), ('ADSL-LINE-EXT-MIB', 'adslAturPerfCurr15MinUasL'), ('ADSL-LINE-EXT-MIB', 'adslAturPerfCurr1DaySesL'), ('ADSL-LINE-EXT-MIB', 'adslAturPerfCurr1DayUasL'), ('ADSL-LINE-EXT-MIB', 'adslAturPerfPrev1DaySesL'), ('ADSL-LINE-EXT-MIB', 'adslAturPerfPrev1DayUasL'), ('ADSL-LINE-EXT-MIB', 'adslAturIntervalSesL'), ('ADSL-LINE-EXT-MIB', 'adslAturIntervalUasL')) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): adsl_ext_atur_phys_perf_counter_group = adslExtAturPhysPerfCounterGroup.setStatus('current') if mibBuilder.loadTexts: adslExtAturPhysPerfCounterGroup.setDescription('A collection of objects providing raw performance counts on an ADSL Line (ATU-C end).') adsl_ext_line_conf_profile_control_group = object_group((1, 3, 6, 1, 2, 1, 10, 94, 3, 2, 1, 4)).setObjects(('ADSL-LINE-EXT-MIB', 'adslConfProfileLineType')) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): adsl_ext_line_conf_profile_control_group = adslExtLineConfProfileControlGroup.setStatus('current') if mibBuilder.loadTexts: adslExtLineConfProfileControlGroup.setDescription('A collection of objects providing profile control for the ADSL system.') adsl_ext_line_alarm_conf_profile_group = object_group((1, 3, 6, 1, 2, 1, 10, 94, 3, 2, 1, 5)).setObjects(('ADSL-LINE-EXT-MIB', 'adslAtucThreshold15MinFailedFastR'), ('ADSL-LINE-EXT-MIB', 'adslAtucThreshold15MinSesL'), ('ADSL-LINE-EXT-MIB', 'adslAtucThreshold15MinUasL'), ('ADSL-LINE-EXT-MIB', 'adslAturThreshold15MinSesL'), ('ADSL-LINE-EXT-MIB', 'adslAturThreshold15MinUasL')) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): adsl_ext_line_alarm_conf_profile_group = adslExtLineAlarmConfProfileGroup.setStatus('current') if mibBuilder.loadTexts: adslExtLineAlarmConfProfileGroup.setDescription('A collection of objects providing alarm profile control for the ADSL system.') adsl_ext_notifications_group = notification_group((1, 3, 6, 1, 2, 1, 10, 94, 3, 2, 1, 6)).setObjects(('ADSL-LINE-EXT-MIB', 'adslAtucFailedFastRThreshTrap'), ('ADSL-LINE-EXT-MIB', 'adslAtucSesLThreshTrap'), ('ADSL-LINE-EXT-MIB', 'adslAtucUasLThreshTrap'), ('ADSL-LINE-EXT-MIB', 'adslAturSesLThreshTrap'), ('ADSL-LINE-EXT-MIB', 'adslAturUasLThreshTrap')) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): adsl_ext_notifications_group = adslExtNotificationsGroup.setStatus('current') if mibBuilder.loadTexts: adslExtNotificationsGroup.setDescription('The collection of ADSL extension notifications.') mibBuilder.exportSymbols('ADSL-LINE-EXT-MIB', adslAturPerfDataExtTable=adslAturPerfDataExtTable, adslExtAturTraps=adslExtAturTraps, AdslTransmissionModeType=AdslTransmissionModeType, adslAturIntervalExtTable=adslAturIntervalExtTable, adslAtucIntervalSesL=adslAtucIntervalSesL, adslAturPerfStatUasL=adslAturPerfStatUasL, adslAturThreshold15MinSesL=adslAturThreshold15MinSesL, adslAtucPerfPrev1DayFastR=adslAtucPerfPrev1DayFastR, adslAtucFailedFastRThreshTrap=adslAtucFailedFastRThreshTrap, adslExtLineConfProfileControlGroup=adslExtLineConfProfileControlGroup, adslAtucPerfPrev1DayUasL=adslAtucPerfPrev1DayUasL, adslAturPerfCurr15MinSesL=adslAturPerfCurr15MinSesL, adslExtAtucTrapsPrefix=adslExtAtucTrapsPrefix, adslAtucPerfStatFastR=adslAtucPerfStatFastR, adslAturUasLThreshTrap=adslAturUasLThreshTrap, adslAtucPerfPrev1DaySesL=adslAtucPerfPrev1DaySesL, adslAtucPerfDataExtTable=adslAtucPerfDataExtTable, adslAturSesLThreshTrap=adslAturSesLThreshTrap, adslExtMibObjects=adslExtMibObjects, adslAtucPerfStatFailedFastR=adslAtucPerfStatFailedFastR, adslAturPerfPrev1DaySesL=adslAturPerfPrev1DaySesL, adslExtAturPhysPerfCounterGroup=adslExtAturPhysPerfCounterGroup, PYSNMP_MODULE_ID=adslExtMIB, adslLineConfProfileDualLite=adslLineConfProfileDualLite, adslConfProfileExtEntry=adslConfProfileExtEntry, adslConfProfileLineType=adslConfProfileLineType, adslExtTraps=adslExtTraps, adslLineTransAtucConfig=adslLineTransAtucConfig, adslAtucIntervalFastR=adslAtucIntervalFastR, adslExtNotificationsGroup=adslExtNotificationsGroup, adslExtLineGroup=adslExtLineGroup, adslLineExtTable=adslLineExtTable, adslAtucPerfCurr1DayFailedFastR=adslAtucPerfCurr1DayFailedFastR, adslAtucPerfCurr15MinSesL=adslAtucPerfCurr15MinSesL, adslAturThreshold15MinUasL=adslAturThreshold15MinUasL, adslAtucIntervalExtTable=adslAtucIntervalExtTable, adslLineExtEntry=adslLineExtEntry, adslAtucPerfCurr1DaySesL=adslAtucPerfCurr1DaySesL, adslExtMIB=adslExtMIB, adslLineTransAtucActual=adslLineTransAtucActual, adslExtConformance=adslExtConformance, adslLineTransAtucCap=adslLineTransAtucCap, adslAturPerfPrev1DayUasL=adslAturPerfPrev1DayUasL, adslExtAtucTraps=adslExtAtucTraps, adslAturPerfDataExtEntry=adslAturPerfDataExtEntry, adslAlarmConfProfileExtEntry=adslAlarmConfProfileExtEntry, adslAturPerfCurr15MinUasL=adslAturPerfCurr15MinUasL, adslAtucPerfStatSesL=adslAtucPerfStatSesL, adslLineGlitePowerState=adslLineGlitePowerState, adslAtucIntervalUasL=adslAtucIntervalUasL, adslAtucThreshold15MinUasL=adslAtucThreshold15MinUasL, adslAtucIntervalExtEntry=adslAtucIntervalExtEntry, adslExtAtucPhysPerfCounterGroup=adslExtAtucPhysPerfCounterGroup, adslAtucPerfCurr15MinUasL=adslAtucPerfCurr15MinUasL, adslAlarmConfProfileExtTable=adslAlarmConfProfileExtTable, adslAtucThreshold15MinSesL=adslAtucThreshold15MinSesL, adslAturPerfCurr1DayUasL=adslAturPerfCurr1DayUasL, adslExtLineMibAtucCompliance=adslExtLineMibAtucCompliance, adslExtGroups=adslExtGroups, adslAtucIntervalFailedFastR=adslAtucIntervalFailedFastR, adslAturIntervalExtEntry=adslAturIntervalExtEntry, adslAtucThreshold15MinFailedFastR=adslAtucThreshold15MinFailedFastR, adslAtucPerfCurr1DayUasL=adslAtucPerfCurr1DayUasL, adslAtucPerfCurr15MinFastR=adslAtucPerfCurr15MinFastR, adslAtucUasLThreshTrap=adslAtucUasLThreshTrap, adslAturPerfStatSesL=adslAturPerfStatSesL, adslExtAturTrapsPrefix=adslExtAturTrapsPrefix, adslAtucPerfPrev1DayFailedFastR=adslAtucPerfPrev1DayFailedFastR, adslAturIntervalUasL=adslAturIntervalUasL, adslConfProfileExtTable=adslConfProfileExtTable, adslAturIntervalSesL=adslAturIntervalSesL, adslAtucPerfDataExtEntry=adslAtucPerfDataExtEntry, adslAtucPerfStatUasL=adslAtucPerfStatUasL, adslAturPerfCurr1DaySesL=adslAturPerfCurr1DaySesL, adslAtucPerfCurr1DayFastR=adslAtucPerfCurr1DayFastR, adslAtucSesLThreshTrap=adslAtucSesLThreshTrap, adslExtLineAlarmConfProfileGroup=adslExtLineAlarmConfProfileGroup, adslExtCompliances=adslExtCompliances, adslAtucPerfCurr15MinFailedFastR=adslAtucPerfCurr15MinFailedFastR)
errors_find = { 'ServerError': { 'response': "Some thing went wrong. Please try after some time.", 'status': 500, }, 'BadRequest': { 'response': "Request must be valid", 'status': 400 }, } #Code to store error types based on status code.
errors_find = {'ServerError': {'response': 'Some thing went wrong. Please try after some time.', 'status': 500}, 'BadRequest': {'response': 'Request must be valid', 'status': 400}}
# fml_parsetab.py # This file is automatically generated. Do not edit. _tabversion = '3.10' _lr_method = 'LALR' _lr_signature = 'bofx eofx newline tab interpolant lce rce string\n\tstart \t: \tbofx\n\t\t\t|\tstart eofx\n\t\t\t|\tstart code\n\t\n\tcode \t: \tnewline \n\t\n\tcode \t: \ttab\n\t\n\tcode \t: \tstring\n\t\n\tcode \t: \tlce\n\t\n\tcode \t: \trce\n\t\n\tcode \t: \tinterpolant\n\t' _lr_action_items = {'bofx':([0,],[1,]),'$end':([1,2,3,4,5,6,7,8,9,10,],[-1,0,-9,-6,-2,-7,-3,-8,-5,-4,]),'interpolant':([1,2,3,4,5,6,7,8,9,10,],[-1,3,-9,-6,-2,-7,-3,-8,-5,-4,]),'tab':([1,2,3,4,5,6,7,8,9,10,],[-1,9,-9,-6,-2,-7,-3,-8,-5,-4,]),'lce':([1,2,3,4,5,6,7,8,9,10,],[-1,6,-9,-6,-2,-7,-3,-8,-5,-4,]),'string':([1,2,3,4,5,6,7,8,9,10,],[-1,4,-9,-6,-2,-7,-3,-8,-5,-4,]),'rce':([1,2,3,4,5,6,7,8,9,10,],[-1,8,-9,-6,-2,-7,-3,-8,-5,-4,]),'eofx':([1,2,3,4,5,6,7,8,9,10,],[-1,5,-9,-6,-2,-7,-3,-8,-5,-4,]),'newline':([1,2,3,4,5,6,7,8,9,10,],[-1,10,-9,-6,-2,-7,-3,-8,-5,-4,]),} _lr_action = {} for _k, _v in _lr_action_items.items(): for _x,_y in zip(_v[0],_v[1]): if not _x in _lr_action: _lr_action[_x] = {} _lr_action[_x][_k] = _y del _lr_action_items _lr_goto_items = {'start':([0,],[2,]),'code':([2,],[7,]),} _lr_goto = {} for _k, _v in _lr_goto_items.items(): for _x, _y in zip(_v[0], _v[1]): if not _x in _lr_goto: _lr_goto[_x] = {} _lr_goto[_x][_k] = _y del _lr_goto_items _lr_productions = [ ("S' -> start","S'",1,None,None,None), ('start -> bofx','start',1,'p_bofx','fml_yacc.py',7), ('start -> start eofx','start',2,'p_bofx','fml_yacc.py',8), ('start -> start code','start',2,'p_bofx','fml_yacc.py',9), ('code -> newline','code',1,'p_newline','fml_yacc.py',15), ('code -> tab','code',1,'p_tab','fml_yacc.py',22), ('code -> string','code',1,'p_string','fml_yacc.py',29), ('code -> lce','code',1,'p_lce','fml_yacc.py',36), ('code -> rce','code',1,'p_rce','fml_yacc.py',43), ('code -> interpolant','code',1,'p_interpolant','fml_yacc.py',50), ]
_tabversion = '3.10' _lr_method = 'LALR' _lr_signature = 'bofx eofx newline tab interpolant lce rce string\n\tstart \t: \tbofx\n\t\t\t|\tstart eofx\n\t\t\t|\tstart code\n\t\n\tcode \t: \tnewline \n\t\n\tcode \t: \ttab\n\t\n\tcode \t: \tstring\n\t\n\tcode \t: \tlce\n\t\n\tcode \t: \trce\n\t\n\tcode \t: \tinterpolant\n\t' _lr_action_items = {'bofx': ([0], [1]), '$end': ([1, 2, 3, 4, 5, 6, 7, 8, 9, 10], [-1, 0, -9, -6, -2, -7, -3, -8, -5, -4]), 'interpolant': ([1, 2, 3, 4, 5, 6, 7, 8, 9, 10], [-1, 3, -9, -6, -2, -7, -3, -8, -5, -4]), 'tab': ([1, 2, 3, 4, 5, 6, 7, 8, 9, 10], [-1, 9, -9, -6, -2, -7, -3, -8, -5, -4]), 'lce': ([1, 2, 3, 4, 5, 6, 7, 8, 9, 10], [-1, 6, -9, -6, -2, -7, -3, -8, -5, -4]), 'string': ([1, 2, 3, 4, 5, 6, 7, 8, 9, 10], [-1, 4, -9, -6, -2, -7, -3, -8, -5, -4]), 'rce': ([1, 2, 3, 4, 5, 6, 7, 8, 9, 10], [-1, 8, -9, -6, -2, -7, -3, -8, -5, -4]), 'eofx': ([1, 2, 3, 4, 5, 6, 7, 8, 9, 10], [-1, 5, -9, -6, -2, -7, -3, -8, -5, -4]), 'newline': ([1, 2, 3, 4, 5, 6, 7, 8, 9, 10], [-1, 10, -9, -6, -2, -7, -3, -8, -5, -4])} _lr_action = {} for (_k, _v) in _lr_action_items.items(): for (_x, _y) in zip(_v[0], _v[1]): if not _x in _lr_action: _lr_action[_x] = {} _lr_action[_x][_k] = _y del _lr_action_items _lr_goto_items = {'start': ([0], [2]), 'code': ([2], [7])} _lr_goto = {} for (_k, _v) in _lr_goto_items.items(): for (_x, _y) in zip(_v[0], _v[1]): if not _x in _lr_goto: _lr_goto[_x] = {} _lr_goto[_x][_k] = _y del _lr_goto_items _lr_productions = [("S' -> start", "S'", 1, None, None, None), ('start -> bofx', 'start', 1, 'p_bofx', 'fml_yacc.py', 7), ('start -> start eofx', 'start', 2, 'p_bofx', 'fml_yacc.py', 8), ('start -> start code', 'start', 2, 'p_bofx', 'fml_yacc.py', 9), ('code -> newline', 'code', 1, 'p_newline', 'fml_yacc.py', 15), ('code -> tab', 'code', 1, 'p_tab', 'fml_yacc.py', 22), ('code -> string', 'code', 1, 'p_string', 'fml_yacc.py', 29), ('code -> lce', 'code', 1, 'p_lce', 'fml_yacc.py', 36), ('code -> rce', 'code', 1, 'p_rce', 'fml_yacc.py', 43), ('code -> interpolant', 'code', 1, 'p_interpolant', 'fml_yacc.py', 50)]
RAW_SUBTOMOGRAMS = "volumes/raw" LABELED_SUBTOMOGRAMS = "volumes/labels/" PREDICTED_SEGMENTATION_SUBTOMOGRAMS = "volumes/predictions/" CLUSTERING_LABELS = "volumes/cluster_labels/" HDF_INTERNAL_PATH = "MDF/images/0/image"
raw_subtomograms = 'volumes/raw' labeled_subtomograms = 'volumes/labels/' predicted_segmentation_subtomograms = 'volumes/predictions/' clustering_labels = 'volumes/cluster_labels/' hdf_internal_path = 'MDF/images/0/image'
fp=open("list-11\\readme.txt","r") sentence=fp.read() words=sentence.split() d = dict() for c in words: if c not in d: d[c] = 1 else: d[c] += 1 #dictionary values a=d.values() b=max(a) for i in d: if(d[i]==b): print("frequent word:",i,";","count:",b)
fp = open('list-11\\readme.txt', 'r') sentence = fp.read() words = sentence.split() d = dict() for c in words: if c not in d: d[c] = 1 else: d[c] += 1 a = d.values() b = max(a) for i in d: if d[i] == b: print('frequent word:', i, ';', 'count:', b)
class fracao(object): def __init__(self, num, den): self.num = num self.den = den def somar_fracao(self, b): f = fracao(self.num*b.den + b.num*self.den, self.den*b.den) #f.num = #f.den = fracao.simplificar_fracao(f) return f def subtrair_fracao(self, b): pass def multiplicar_fracao(self, b): pass def dividir_fracao(self, b): pass def simplifica_fracao(self): m = fracao.mdc(self.num, self.den) self.num=self.num/m self.den=self.den/m print('Resultado: ', self.num, ' / ' , self.den) #input() return @staticmethod def simplificar_fracao(self): m = fracao.mdc(self.num, self.den) self.num=self.num/m self.den=self.den/m print('Resultado: ', self.num, ' / ' , self.den) input() return def exibir_fracao(self): print(self.num, ' / ' , self.den) return @staticmethod def mdc(a,b): if a<b: return fracao.mdc(b,a) else: if b==0: return a else: return fracao.mdc(b, a % b) a = fracao(2,3) b = fracao(3,4) c = fracao(12,24) c.simplifica_fracao() a.exibir_fracao() b.exibir_fracao() c.exibir_fracao() c = a.somar_fracao(b) c.exibir_fracao() d = a.somar_fracao(fracao(1,3))
class Fracao(object): def __init__(self, num, den): self.num = num self.den = den def somar_fracao(self, b): f = fracao(self.num * b.den + b.num * self.den, self.den * b.den) fracao.simplificar_fracao(f) return f def subtrair_fracao(self, b): pass def multiplicar_fracao(self, b): pass def dividir_fracao(self, b): pass def simplifica_fracao(self): m = fracao.mdc(self.num, self.den) self.num = self.num / m self.den = self.den / m print('Resultado: ', self.num, ' / ', self.den) return @staticmethod def simplificar_fracao(self): m = fracao.mdc(self.num, self.den) self.num = self.num / m self.den = self.den / m print('Resultado: ', self.num, ' / ', self.den) input() return def exibir_fracao(self): print(self.num, ' / ', self.den) return @staticmethod def mdc(a, b): if a < b: return fracao.mdc(b, a) elif b == 0: return a else: return fracao.mdc(b, a % b) a = fracao(2, 3) b = fracao(3, 4) c = fracao(12, 24) c.simplifica_fracao() a.exibir_fracao() b.exibir_fracao() c.exibir_fracao() c = a.somar_fracao(b) c.exibir_fracao() d = a.somar_fracao(fracao(1, 3))
#!/usr/bin/python3 def inherits_from(obj, a_class): if isinstance(obj, a_class) and type(obj) is not a_class: return True else: return False
def inherits_from(obj, a_class): if isinstance(obj, a_class) and type(obj) is not a_class: return True else: return False
# # A Rangoli Generator # # Author: Jeremy Pedersen # Date: 2019-02-18 # License: "the unlicense" (Google it) # # Define letters for use in rangoli alphabet = 'a b c d e f g h i j k l m n o p q r s t u v w x y z'.split() # Read in rangoli size size = int(input("Set size of rangoli: ")) # Calculate maximum linewidth (how much fill do we need per line) maxWidth = size*2 - 1 + (size - 1)*2 # Generate rangoli for i in list(range(size-1,0,-1)) + list(range(0,size)): left = alphabet[1+i:size] left.reverse() right = alphabet[0+i:size] center = '-'.join(left + right) padding = '-'*((maxWidth - len(center))//2) print(padding+center+padding)
alphabet = 'a b c d e f g h i j k l m n o p q r s t u v w x y z'.split() size = int(input('Set size of rangoli: ')) max_width = size * 2 - 1 + (size - 1) * 2 for i in list(range(size - 1, 0, -1)) + list(range(0, size)): left = alphabet[1 + i:size] left.reverse() right = alphabet[0 + i:size] center = '-'.join(left + right) padding = '-' * ((maxWidth - len(center)) // 2) print(padding + center + padding)
calls = 0 def call(): global calls calls += 1 def reset(): global calls calls = 0
calls = 0 def call(): global calls calls += 1 def reset(): global calls calls = 0
def iterPower(base,exp): ans=1 while exp>0: ans=ans*base exp-=1 return ans
def iter_power(base, exp): ans = 1 while exp > 0: ans = ans * base exp -= 1 return ans
#Environment related constants ENV_PRODUCTION = 'PRODUCTION' #Staging is used for testing by replicating the same production remote env ENV_STAGING = 'STAGING' #Development local env ENV_DEVELOPMENT = 'DEV' #Automated tests local env ENV_TESTING = 'TEST' ENVIRONMENT_CHOICES = [ ENV_PRODUCTION, ENV_STAGING, ENV_DEVELOPMENT, ENV_TESTING, ] PAGE_SIZE = 20 EMAIL_REGEXP = "^[a-zA-Z0-9'._-]+@[a-zA-Z0-9._-]+.[a-zA-Z]{2,6}$" OAUTH2_SCOPES = 'https://www.googleapis.com/auth/userinfo.email ' \ 'https://www.googleapis.com/auth/email.migration ' \ 'https://apps-apis.google.com/a/feeds/emailsettings/2.0/ ' \ 'https://www.googleapis.com/auth/drive' MENU_ITEMS = [ ('admin_index', 'Home'), ('settings','Settings') ] IMAP_SERVER = 'imap.gmail.com' IMAP_PORT = 993 IMAP_ALL_LABEL_ES = '[Gmail]/Todos' IMAP_ALL_LABEL_EN = '[Gmail]/All Mail' IMAP_TRASH_LABEL_EN = '[Gmail]/Trash' IMAP_TRASH_LABEL_ES = '[Gmail]/Papelera' GMAIL_TRASH_KEY = '(\\HasNoChildren \\Trash)' GMAIL_ALL_KEY = '(\\HasNoChildren \\All)' USER_CONNECTION_LIMIT = 7 MESSAGE_BATCH_SIZE = 500 STARTED = 'STARTED' FINISHED = 'FINISHED' FAILED = 'FAILED' STATUS_CHOICES = [ STARTED, FINISHED, FAILED ] DUPLICATED = 'DUPLICATED' MIGRATED = 'MIGRATED' CLEANING_STATUS_CHOICES = [ STARTED, DUPLICATED, MIGRATED, FINISHED ] ATTACHMENT_FOLDER = 'Adjuntos' GMAIL_PROPERTIES = [ {'\\\\Inbox': 'isInbox'}, {'\\\\Sent': 'isSent'}, {'\\\\Starred': 'isStarred'}, {'\\\\Draft': 'isDraft'}, {'\\\\Unread': 'isUnread'} ] GMAIL_PROPERTY_NAMES = [ '\\\\Inbox', '\\\\Sent', '\\\\Starred', '\\\\Draft', '\\\\Unread', '\\\\Important' ] MAX_RETRIES = 3 MAX_CLEAN_RETRIES = 1 CLEAN_LABEL = 'Migrados' SERVICE_ACCOUNT_ID = "" GMAIL_API_SCOPES = "" SERVICE_ACCOUNT_KEY_PATH = ""
env_production = 'PRODUCTION' env_staging = 'STAGING' env_development = 'DEV' env_testing = 'TEST' environment_choices = [ENV_PRODUCTION, ENV_STAGING, ENV_DEVELOPMENT, ENV_TESTING] page_size = 20 email_regexp = "^[a-zA-Z0-9'._-]+@[a-zA-Z0-9._-]+.[a-zA-Z]{2,6}$" oauth2_scopes = 'https://www.googleapis.com/auth/userinfo.email https://www.googleapis.com/auth/email.migration https://apps-apis.google.com/a/feeds/emailsettings/2.0/ https://www.googleapis.com/auth/drive' menu_items = [('admin_index', 'Home'), ('settings', 'Settings')] imap_server = 'imap.gmail.com' imap_port = 993 imap_all_label_es = '[Gmail]/Todos' imap_all_label_en = '[Gmail]/All Mail' imap_trash_label_en = '[Gmail]/Trash' imap_trash_label_es = '[Gmail]/Papelera' gmail_trash_key = '(\\HasNoChildren \\Trash)' gmail_all_key = '(\\HasNoChildren \\All)' user_connection_limit = 7 message_batch_size = 500 started = 'STARTED' finished = 'FINISHED' failed = 'FAILED' status_choices = [STARTED, FINISHED, FAILED] duplicated = 'DUPLICATED' migrated = 'MIGRATED' cleaning_status_choices = [STARTED, DUPLICATED, MIGRATED, FINISHED] attachment_folder = 'Adjuntos' gmail_properties = [{'\\\\Inbox': 'isInbox'}, {'\\\\Sent': 'isSent'}, {'\\\\Starred': 'isStarred'}, {'\\\\Draft': 'isDraft'}, {'\\\\Unread': 'isUnread'}] gmail_property_names = ['\\\\Inbox', '\\\\Sent', '\\\\Starred', '\\\\Draft', '\\\\Unread', '\\\\Important'] max_retries = 3 max_clean_retries = 1 clean_label = 'Migrados' service_account_id = '' gmail_api_scopes = '' service_account_key_path = ''
name = input("Please enter your name:") age = int(input("Please enter your age:")) if type(name) == str: if type(age) == int: print(f"{name} you are {age} years old and you will be 100 after {100 - age} years") else: print("Please enter a valid number") else: print("please enter your name")
name = input('Please enter your name:') age = int(input('Please enter your age:')) if type(name) == str: if type(age) == int: print(f'{name} you are {age} years old and you will be 100 after {100 - age} years') else: print('Please enter a valid number') else: print('please enter your name')
seq = [0, 1] def create_sequence(n): global seq if n == 0: return [] elif n == 1: return [0] else: seq = [0, 1] for i in range(2, n): seq.append(seq[-1] + seq[-2]) return seq def locate(x): if x in seq: return f"The number - {x} is at index {seq.index(x)}" else: return f"The number {x} is not in the sequence"
seq = [0, 1] def create_sequence(n): global seq if n == 0: return [] elif n == 1: return [0] else: seq = [0, 1] for i in range(2, n): seq.append(seq[-1] + seq[-2]) return seq def locate(x): if x in seq: return f'The number - {x} is at index {seq.index(x)}' else: return f'The number {x} is not in the sequence'
d1 = dict() print(d1) # DI1 print(type(d1)) d2 = dict({1:'a',2:'b',3:'c'}) print(d2) # DI2 d3 = dict([(1,"python"),(2,"is"),(3,"awesome")]) print(d3) # DI3 d4 = dict(((1,"python"),(2,"is"),(3,"awesome"))) print(d4) # DI4 d5 = dict({(1,"python"),(2,"is"),(3,"awesome")}) print(d5) # DI5 d6 = dict({[1,"python"],[2,"is"],[3,"awesome"]}) print(d6) # DI6
d1 = dict() print(d1) print(type(d1)) d2 = dict({1: 'a', 2: 'b', 3: 'c'}) print(d2) d3 = dict([(1, 'python'), (2, 'is'), (3, 'awesome')]) print(d3) d4 = dict(((1, 'python'), (2, 'is'), (3, 'awesome'))) print(d4) d5 = dict({(1, 'python'), (2, 'is'), (3, 'awesome')}) print(d5) d6 = dict({[1, 'python'], [2, 'is'], [3, 'awesome']}) print(d6)
def parse_array(tokenstream): _ = tokenstream.pop_next() assert _ == "[" result = [] while True: token = tokenstream.pop_next() if token == "]": break result.append(token) return result def parse_varfunction(tokenstream, identifier, scene): identifier_type = tokenstream.pop_next()[1:-1] params = {} while tokenstream.peek()[0] == "\"": type_and_name = tokenstream.pop_next()[1:-1] if tokenstream.peek() == "[": params[type_and_name] = parse_array(tokenstream) else: params[type_and_name] = tokenstream.pop_next() return [identifier,identifier_type,params]
def parse_array(tokenstream): _ = tokenstream.pop_next() assert _ == '[' result = [] while True: token = tokenstream.pop_next() if token == ']': break result.append(token) return result def parse_varfunction(tokenstream, identifier, scene): identifier_type = tokenstream.pop_next()[1:-1] params = {} while tokenstream.peek()[0] == '"': type_and_name = tokenstream.pop_next()[1:-1] if tokenstream.peek() == '[': params[type_and_name] = parse_array(tokenstream) else: params[type_and_name] = tokenstream.pop_next() return [identifier, identifier_type, params]
class Solution: def lengthoflongestsubstring(self, s): sls = len(set(s)) slen = len(s) if slen < 1: return 0 else: max_len = 1 for i in range(slen): for j in range(i+max_len+1, i+sls+1): curr = s[i:j] curr_len = len(curr) if len(set(curr)) != curr_len: break else: if curr_len > max_len: max_len = curr_len return max_len
class Solution: def lengthoflongestsubstring(self, s): sls = len(set(s)) slen = len(s) if slen < 1: return 0 else: max_len = 1 for i in range(slen): for j in range(i + max_len + 1, i + sls + 1): curr = s[i:j] curr_len = len(curr) if len(set(curr)) != curr_len: break elif curr_len > max_len: max_len = curr_len return max_len
print("Input: ",end="") str = input() def rev(str): str = str.split(" ") stack = [] for i in str: stack.append(i) while len(stack) > 0: print(stack[-1], end = " ") del stack[-1] print("Output: ",end="") rev(str)
print('Input: ', end='') str = input() def rev(str): str = str.split(' ') stack = [] for i in str: stack.append(i) while len(stack) > 0: print(stack[-1], end=' ') del stack[-1] print('Output: ', end='') rev(str)
def compare_reverse_number(A, B): rev_A, rev_B = '', '' for i in range(len(A) - 1, -1, -1): rev_A += A[i] for j in range(len(B) - 1, -1, -1): rev_B += B[j] if rev_A > rev_B: return rev_A else: return rev_B def main(): A, B = input().split() answer = compare_reverse_number(A, B) print(answer) if __name__ == "__main__": main()
def compare_reverse_number(A, B): (rev_a, rev_b) = ('', '') for i in range(len(A) - 1, -1, -1): rev_a += A[i] for j in range(len(B) - 1, -1, -1): rev_b += B[j] if rev_A > rev_B: return rev_A else: return rev_B def main(): (a, b) = input().split() answer = compare_reverse_number(A, B) print(answer) if __name__ == '__main__': main()
TASK = "task" TASK_INSTANCE = "task_instance" X = "X" Y = "Y" MAHOZ = "MAHOZ" XY = f"{X}/{Y}"
task = 'task' task_instance = 'task_instance' x = 'X' y = 'Y' mahoz = 'MAHOZ' xy = f'{X}/{Y}'
# # PySNMP MIB module RDN-CABLE-SPECTRUM-MIB (http://snmplabs.com/pysmi) # ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/RDN-CABLE-SPECTRUM-MIB # Produced by pysmi-0.3.4 at Wed May 1 14:54: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) # Integer, ObjectIdentifier, OctetString = mibBuilder.importSymbols("ASN1", "Integer", "ObjectIdentifier", "OctetString") NamedValues, = mibBuilder.importSymbols("ASN1-ENUMERATION", "NamedValues") ValueRangeConstraint, SingleValueConstraint, ValueSizeConstraint, ConstraintsUnion, ConstraintsIntersection = mibBuilder.importSymbols("ASN1-REFINEMENT", "ValueRangeConstraint", "SingleValueConstraint", "ValueSizeConstraint", "ConstraintsUnion", "ConstraintsIntersection") InterfaceIndex, ifAdminStatus, ifOperStatus, ifIndex = mibBuilder.importSymbols("IF-MIB", "InterfaceIndex", "ifAdminStatus", "ifOperStatus", "ifIndex") riverdelta, = mibBuilder.importSymbols("RDN-MIB", "riverdelta") ModuleCompliance, NotificationGroup, ObjectGroup = mibBuilder.importSymbols("SNMPv2-CONF", "ModuleCompliance", "NotificationGroup", "ObjectGroup") MibIdentifier, ObjectIdentity, Counter32, ModuleIdentity, Integer32, Unsigned32, Bits, IpAddress, TimeTicks, iso, Counter64, NotificationType, Gauge32, MibScalar, MibTable, MibTableRow, MibTableColumn = mibBuilder.importSymbols("SNMPv2-SMI", "MibIdentifier", "ObjectIdentity", "Counter32", "ModuleIdentity", "Integer32", "Unsigned32", "Bits", "IpAddress", "TimeTicks", "iso", "Counter64", "NotificationType", "Gauge32", "MibScalar", "MibTable", "MibTableRow", "MibTableColumn") DateAndTime, MacAddress, TextualConvention, RowStatus, DisplayString = mibBuilder.importSymbols("SNMPv2-TC", "DateAndTime", "MacAddress", "TextualConvention", "RowStatus", "DisplayString") rdnCableSpectrum = ModuleIdentity((1, 3, 6, 1, 4, 1, 4981, 6)) if mibBuilder.loadTexts: rdnCableSpectrum.setLastUpdated('200206250000Z') if mibBuilder.loadTexts: rdnCableSpectrum.setOrganization('Motorola') if mibBuilder.loadTexts: rdnCableSpectrum.setContactInfo(' Motorola Customer Service Postal: Motorola Three Highwood Dr east Tewksbury, MA 01876 U.S.A. Tel: ') if mibBuilder.loadTexts: rdnCableSpectrum.setDescription('This is the MIB Module for Cable Spectrum Management for MCNS compliant Cable Modem Termination Systems (CMTS). ') rdnCableSpectrumObjects = MibIdentifier((1, 3, 6, 1, 4, 1, 4981, 6, 1)) rdnFlapObjects = MibIdentifier((1, 3, 6, 1, 4, 1, 4981, 6, 1, 1)) rdnFlapCmCmtsStatusTable = MibTable((1, 3, 6, 1, 4, 1, 4981, 6, 1, 1, 1), ) if mibBuilder.loadTexts: rdnFlapCmCmtsStatusTable.setStatus('current') if mibBuilder.loadTexts: rdnFlapCmCmtsStatusTable.setDescription('This table keeps the status of the flap modems for per CMTS.') rdnFlapCmCmtsStatusEntry = MibTableRow((1, 3, 6, 1, 4, 1, 4981, 6, 1, 1, 1, 1), ).setIndexNames((0, "RDN-CABLE-SPECTRUM-MIB", "flapCmCmtsIfIndex")) if mibBuilder.loadTexts: rdnFlapCmCmtsStatusEntry.setStatus('current') if mibBuilder.loadTexts: rdnFlapCmCmtsStatusEntry.setDescription('List of attributes for an entry in the rdnFlapCmCmtsStatusTable.') flapCmCmtsIfIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 4981, 6, 1, 1, 1, 1, 1), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 16))) if mibBuilder.loadTexts: flapCmCmtsIfIndex.setStatus('current') if mibBuilder.loadTexts: flapCmCmtsIfIndex.setDescription('The CMTS Interface Index.') flapListMaxSize = MibTableColumn((1, 3, 6, 1, 4, 1, 4981, 6, 1, 1, 1, 1, 2), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 8191)).clone(100)).setUnits('modems').setMaxAccess("readwrite") if mibBuilder.loadTexts: flapListMaxSize.setStatus('current') if mibBuilder.loadTexts: flapListMaxSize.setDescription('The maximum number of flap modems. The user could configure this number according to the number of downstreams and the number of modem line cards in the CMTS. The number can range from 1 to 8191. The default value is 100. When the number of modems exceeds the max flap list size, the additional modems are ignored.') flapListCurrentSize = MibTableColumn((1, 3, 6, 1, 4, 1, 4981, 6, 1, 1, 1, 1, 3), Gauge32().subtype(subtypeSpec=ValueRangeConstraint(0, 8191))).setUnits('modems').setMaxAccess("readonly") if mibBuilder.loadTexts: flapListCurrentSize.setStatus('current') if mibBuilder.loadTexts: flapListCurrentSize.setDescription('The current number of modems in the flap list. Its value will be less than or equal to flapListMaxSize.') flapAgingOutTime = MibTableColumn((1, 3, 6, 1, 4, 1, 4981, 6, 1, 1, 1, 1, 4), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 86400)).clone(1440)).setUnits('minutes').setMaxAccess("readwrite") if mibBuilder.loadTexts: flapAgingOutTime.setStatus('current') if mibBuilder.loadTexts: flapAgingOutTime.setDescription('The age out time in minutes for modems in the flap table. The number of minutes range from 1 to 86400. The default value is 1440.') flapInsertionTime = MibTableColumn((1, 3, 6, 1, 4, 1, 4981, 6, 1, 1, 1, 1, 5), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 86400)).clone(60)).setUnits('seconds').setMaxAccess("readwrite") if mibBuilder.loadTexts: flapInsertionTime.setStatus('current') if mibBuilder.loadTexts: flapInsertionTime.setDescription('The interval of time that begins when the cable modem initially ranges, reboots, and ends when it starts initial maintenance again. If the interval of time is less than what is specified in flapInsertionTime, the flapCmInsertionFails and cmFlapCounts will increment. The valid range is from 1 to 86400 seconds. The default value is 60.') flapMissThreshold = MibTableColumn((1, 3, 6, 1, 4, 1, 4981, 6, 1, 1, 1, 1, 6), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 12)).clone(6)).setUnits('modem').setMaxAccess("readwrite") if mibBuilder.loadTexts: flapMissThreshold.setStatus('current') if mibBuilder.loadTexts: flapMissThreshold.setDescription('Specifies the maximum threshold for the number of consecutive miss counts during a polling cycle. If the flap miss counts goes over this threshold, the modem will be added into the flap list. Polling is maintained between the CMTS and the cable modem every 10 seconds. The flapMissThreshold specifies the maximum number of consecutive missed counts during one station maintenance poll interval. If there are more than 16 consecutive miss counts during one polling cycle, the modem will de-insert and attempt to range again. The value ranges from 1 to 12 consecutive counts. The default value is 6.') flapPowerAdjThreshold = MibTableColumn((1, 3, 6, 1, 4, 1, 4981, 6, 1, 1, 1, 1, 7), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 10)).clone(2)).setUnits('dB').setMaxAccess("readwrite") if mibBuilder.loadTexts: flapPowerAdjThreshold.setStatus('current') if mibBuilder.loadTexts: flapPowerAdjThreshold.setDescription(" The power adjustment threshold for a CM to raise and lower it's transmit power during normal operation. When a modem's power adjustment goes above or below the flapPowerAdjThreshold the CM will be added into the flap list. The flapCmPowerAdjustments and cmFlapCounts will be incremented as well. flapPowerAdjThreshold values of 2 dB and below are low enough to continuously increment the flapCmPowerAdjustments under normal conditions. The values range from 1 to 10. The default is 2. ") flapListPercentageThreshold = MibTableColumn((1, 3, 6, 1, 4, 1, 4981, 6, 1, 1, 1, 1, 8), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 100)).clone(10)).setMaxAccess("readwrite") if mibBuilder.loadTexts: flapListPercentageThreshold.setStatus('current') if mibBuilder.loadTexts: flapListPercentageThreshold.setDescription(' The percentage CM miss threshold. If CM miss percentage goes over this threshold and flapListTrapEnable is set, a flap list trap will be send out to notify this event ') flapListTrapEnable = MibTableColumn((1, 3, 6, 1, 4, 1, 4981, 6, 1, 1, 1, 1, 9), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("enabled", 1), ("disabled", 2))).clone('enabled')).setMaxAccess("readwrite") if mibBuilder.loadTexts: flapListTrapEnable.setStatus('current') if mibBuilder.loadTexts: flapListTrapEnable.setDescription('This object controls flap list trap. If its value is set to enabled(1), a trap will be sent out when the CM miss percentage goes over the flapListPercentageThreshold; Otherwise no flap list trap will be sent out. By default, this object has the value enabled(1). ') rdnFlapCmTable = MibTable((1, 3, 6, 1, 4, 1, 4981, 6, 1, 1, 2), ) if mibBuilder.loadTexts: rdnFlapCmTable.setStatus('current') if mibBuilder.loadTexts: rdnFlapCmTable.setDescription('This table keeps the records of modem state changes. An entry can be deleted from the table but can not be added to the table.') rdnFlapCmEntry = MibTableRow((1, 3, 6, 1, 4, 1, 4981, 6, 1, 1, 2, 1), ).setIndexNames((0, "RDN-CABLE-SPECTRUM-MIB", "flapCmIndex")) if mibBuilder.loadTexts: rdnFlapCmEntry.setStatus('current') if mibBuilder.loadTexts: rdnFlapCmEntry.setDescription('List of attributes for an entry in the rdnFlapTable.') flapCmIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 4981, 6, 1, 1, 2, 1, 1), InterfaceIndex()) if mibBuilder.loadTexts: flapCmIndex.setStatus('current') if mibBuilder.loadTexts: flapCmIndex.setDescription(' Index for Cable Modem.') cmtsIfIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 4981, 6, 1, 1, 2, 1, 2), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 16))).setMaxAccess("readonly") if mibBuilder.loadTexts: cmtsIfIndex.setStatus('current') if mibBuilder.loadTexts: cmtsIfIndex.setDescription('The CMTS Interface Index.') flapCmMacAddress = MibTableColumn((1, 3, 6, 1, 4, 1, 4981, 6, 1, 1, 2, 1, 3), MacAddress()).setMaxAccess("readonly") if mibBuilder.loadTexts: flapCmMacAddress.setStatus('current') if mibBuilder.loadTexts: flapCmMacAddress.setDescription("MAC address of the Cable Modem's Cable interface. Identifies a flap-list entry for a flapping Cable Modem.") flapCmUpstreamIfIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 4981, 6, 1, 1, 2, 1, 4), InterfaceIndex()).setMaxAccess("readonly") if mibBuilder.loadTexts: flapCmUpstreamIfIndex.setStatus('current') if mibBuilder.loadTexts: flapCmUpstreamIfIndex.setDescription('The ifIndex of the Cable upstream interface whose ifType is docsCableUpstream(129). The CMTS detects a flapping Cable Modem from its Cable upstream interface.') flapCmDownstreamIfIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 4981, 6, 1, 1, 2, 1, 5), InterfaceIndex()).setMaxAccess("readonly") if mibBuilder.loadTexts: flapCmDownstreamIfIndex.setStatus('current') if mibBuilder.loadTexts: flapCmDownstreamIfIndex.setDescription('The ifIndex of the Cable downstream interface whose ifType is docsCableDownstream(128).') flapCmInsertionFails = MibTableColumn((1, 3, 6, 1, 4, 1, 4981, 6, 1, 1, 2, 1, 6), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: flapCmInsertionFails.setReference('Data over Cable Radio Frequency Interface specification, Section 7.2.') if mibBuilder.loadTexts: flapCmInsertionFails.setStatus('current') if mibBuilder.loadTexts: flapCmInsertionFails.setDescription('When the Cable Modem initially ranges, reboots and initially ranges again within the specified insertion time, this counter will increment. The cmFlapCounts increment along with this counter.') flapCmHits = MibTableColumn((1, 3, 6, 1, 4, 1, 4981, 6, 1, 1, 2, 1, 7), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: flapCmHits.setStatus('current') if mibBuilder.loadTexts: flapCmHits.setDescription('The number of times the CMTS receives the Ranging request from the Cable Modem.') flapCmMisses = MibTableColumn((1, 3, 6, 1, 4, 1, 4981, 6, 1, 1, 2, 1, 8), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: flapCmMisses.setStatus('current') if mibBuilder.loadTexts: flapCmMisses.setDescription('The number of times the CMTS misses the Ranging request from the Cable Modem. The CMTS can check up to 16 consecutive times for a ranging request message during one polling cycle. Misses are not desirable since this is usually an indication of a return path problem; however, having a small number of misses is normal. Ideally, the Hit should be much greater than the Miss counts.') flapCmPowerAdjustments = MibTableColumn((1, 3, 6, 1, 4, 1, 4981, 6, 1, 1, 2, 1, 9), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: flapCmPowerAdjustments.setReference('Data over Cable Radio Frequency Interface specification, Section 7.2.') if mibBuilder.loadTexts: flapCmPowerAdjustments.setStatus('current') if mibBuilder.loadTexts: flapCmPowerAdjustments.setDescription(' When the power adjustment changed above or below the power adjustment threshold this counter will increment. The Flap Count (cmFlapCounts) will increment when this counter increments.') cmFlapCounts = MibTableColumn((1, 3, 6, 1, 4, 1, 4981, 6, 1, 1, 2, 1, 10), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: cmFlapCounts.setReference('Data over Cable Radio Frequency Interface specification, Appendix B.') if mibBuilder.loadTexts: cmFlapCounts.setStatus('current') if mibBuilder.loadTexts: cmFlapCounts.setDescription('The total number of times a CM flaps Under following three situations, this counter will increase: (1) When flapCmInsertionFails is increased the flap counts will increase. (2) When the CMTS receives the number of consecutive misses specified in the flapMissThreshold, the flap counts will increase. (3) When flapPowerAdjustments is increased the flap counts will increase.') cmLastFlapTime = MibTableColumn((1, 3, 6, 1, 4, 1, 4981, 6, 1, 1, 2, 1, 11), DateAndTime()).setMaxAccess("readonly") if mibBuilder.loadTexts: cmLastFlapTime.setStatus('current') if mibBuilder.loadTexts: cmLastFlapTime.setDescription('The last time stamp cm flaps') cmFlapCreateTime = MibTableColumn((1, 3, 6, 1, 4, 1, 4981, 6, 1, 1, 2, 1, 12), DateAndTime()).setMaxAccess("readonly") if mibBuilder.loadTexts: cmFlapCreateTime.setStatus('current') if mibBuilder.loadTexts: cmFlapCreateTime.setDescription('The time stamp when new flap CM is added to the table. ') cmFlapRowStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 4981, 6, 1, 1, 2, 1, 13), RowStatus()).setMaxAccess("readwrite") if mibBuilder.loadTexts: cmFlapRowStatus.setStatus('current') if mibBuilder.loadTexts: cmFlapRowStatus.setDescription('Controls and reflects the status of rows in this table. When a new flap cable modem is detected, and does not exist in flap list and flapListCurrentSize is less than flapListMaxSize, an entry will be created in this table. The instance of this object will be set to active(1). All flapping modems have the status of active(1). Active entries are removed from the table if they are aged out. The age out time is defined in flapAgingOutTime When a row is set to destroy(6), it will remove the entry immediately. To prevent an entry from being aged out, the entry should be set to notInService(2). The entry will remain in the table until this instance is set to destroy. The user is allowed set an entry from active to notInService or from notInService to destroy A user is not allowed to change a notInService entry to active. createAndGo(4) and createAndWait(5) are not supported.') flapListTrap = NotificationType((1, 3, 6, 1, 4, 1, 4981, 6, 1, 1, 3)).setObjects(("IF-MIB", "ifIndex"), ("IF-MIB", "ifAdminStatus"), ("IF-MIB", "ifOperStatus")) if mibBuilder.loadTexts: flapListTrap.setStatus('current') if mibBuilder.loadTexts: flapListTrap.setDescription('a flap list trap signifies that SNMPv2 entity, acting in an agent role, has detected that the percentage of flap cm for one of the cmts board has gone over the flapListPercentageThreshold ') flapTrapType = MibScalar((1, 3, 6, 1, 4, 1, 4981, 6, 1, 1, 4), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3))).clone(namedValues=NamedValues(("power", 1), ("ranging", 2), ("insertion", 3)))).setMaxAccess("readonly") if mibBuilder.loadTexts: flapTrapType.setStatus('current') if mibBuilder.loadTexts: flapTrapType.setDescription('Reason for flapping power - The power threshold was exceeded. ranging - Missing ranging requests went beyond threshold insertion - Modem re-ranged within insertion time threshold. This is a place holder for the reason parameter for the modem to go into flap list. This should return ZERO when read. This just allows us to include a flapping reason in the modem flap trap varbind. ') flapModemTrap = NotificationType((1, 3, 6, 1, 4, 1, 4981, 6, 1, 1, 5)).setObjects(("RDN-CABLE-SPECTRUM-MIB", "flapCmMacAddress"), ("RDN-CABLE-SPECTRUM-MIB", "flapTrapType")) if mibBuilder.loadTexts: flapModemTrap.setStatus('current') if mibBuilder.loadTexts: flapModemTrap.setDescription("This Trap will be sent whenever the modem goes into the flapping list for some reason. 'flapCmMacAddress' gives the Mac Address of the modem. 'flapTrapType' gives the cause for the modem to go into the flap list. ") rdnCableSpectrumNotificationPrefix = MibIdentifier((1, 3, 6, 1, 4, 1, 4981, 6, 2)) cableSpectrumMIBNotifications = MibIdentifier((1, 3, 6, 1, 4, 1, 4981, 6, 2, 0)) rdnCableSpectrumConformance = MibIdentifier((1, 3, 6, 1, 4, 1, 4981, 6, 3)) rdnCableSpectrumCompliances = MibIdentifier((1, 3, 6, 1, 4, 1, 4981, 6, 3, 1)) rdnCableSpectrumGroups = MibIdentifier((1, 3, 6, 1, 4, 1, 4981, 6, 3, 2)) compliance = ModuleCompliance((1, 3, 6, 1, 4, 1, 4981, 6, 3, 1, 1)).setObjects(("RDN-CABLE-SPECTRUM-MIB", "flapGroup")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): compliance = compliance.setStatus('current') if mibBuilder.loadTexts: compliance.setDescription('The compliance statement for devices that implement MCNS compliant Radio Frequency Interfaces and Spectrum Management features.') rdnFlapGroup = ObjectGroup((1, 3, 6, 1, 4, 1, 4981, 6, 3, 2, 1)).setObjects(("RDN-CABLE-SPECTRUM-MIB", "flapListMaxSize"), ("RDN-CABLE-SPECTRUM-MIB", "flapListCurrentSize"), ("RDN-CABLE-SPECTRUM-MIB", "flapAgingOutTime"), ("RDN-CABLE-SPECTRUM-MIB", "flapInsertionTime"), ("RDN-CABLE-SPECTRUM-MIB", "flapMissThreshold"), ("RDN-CABLE-SPECTRUM-MIB", "flapPowerAdjThreshold"), ("RDN-CABLE-SPECTRUM-MIB", "cmtsIfIndex"), ("RDN-CABLE-SPECTRUM-MIB", "flapCmMacAddress"), ("RDN-CABLE-SPECTRUM-MIB", "flapCmUpstreamIfIndex"), ("RDN-CABLE-SPECTRUM-MIB", "flapCmDownstreamIfIndex"), ("RDN-CABLE-SPECTRUM-MIB", "flapCmInsertionFails"), ("RDN-CABLE-SPECTRUM-MIB", "flapCmHits"), ("RDN-CABLE-SPECTRUM-MIB", "flapCmMisses"), ("RDN-CABLE-SPECTRUM-MIB", "flapCmPowerAdjustments"), ("RDN-CABLE-SPECTRUM-MIB", "cmFlapCounts"), ("RDN-CABLE-SPECTRUM-MIB", "cmLastFlapTime"), ("RDN-CABLE-SPECTRUM-MIB", "cmFlapCreateTime"), ("RDN-CABLE-SPECTRUM-MIB", "cmFlapRowStatus"), ("RDN-CABLE-SPECTRUM-MIB", "flapListPercentageThreshold"), ("RDN-CABLE-SPECTRUM-MIB", "flapListTrapEnable")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): rdnFlapGroup = rdnFlapGroup.setStatus('current') if mibBuilder.loadTexts: rdnFlapGroup.setDescription('Group of objects implemented in Cable Modem Termination Systems providing Flap List information.') mibBuilder.exportSymbols("RDN-CABLE-SPECTRUM-MIB", flapListMaxSize=flapListMaxSize, cmLastFlapTime=cmLastFlapTime, flapListCurrentSize=flapListCurrentSize, flapCmUpstreamIfIndex=flapCmUpstreamIfIndex, flapCmMisses=flapCmMisses, compliance=compliance, rdnFlapCmEntry=rdnFlapCmEntry, flapMissThreshold=flapMissThreshold, rdnCableSpectrumConformance=rdnCableSpectrumConformance, rdnFlapCmTable=rdnFlapCmTable, rdnFlapObjects=rdnFlapObjects, PYSNMP_MODULE_ID=rdnCableSpectrum, rdnCableSpectrumGroups=rdnCableSpectrumGroups, cmFlapRowStatus=cmFlapRowStatus, flapCmDownstreamIfIndex=flapCmDownstreamIfIndex, rdnCableSpectrumObjects=rdnCableSpectrumObjects, flapPowerAdjThreshold=flapPowerAdjThreshold, flapListTrapEnable=flapListTrapEnable, rdnCableSpectrumCompliances=rdnCableSpectrumCompliances, flapCmIndex=flapCmIndex, flapModemTrap=flapModemTrap, flapInsertionTime=flapInsertionTime, rdnCableSpectrumNotificationPrefix=rdnCableSpectrumNotificationPrefix, flapCmCmtsIfIndex=flapCmCmtsIfIndex, rdnFlapCmCmtsStatusEntry=rdnFlapCmCmtsStatusEntry, flapAgingOutTime=flapAgingOutTime, cmFlapCreateTime=cmFlapCreateTime, flapCmHits=flapCmHits, rdnFlapCmCmtsStatusTable=rdnFlapCmCmtsStatusTable, cmtsIfIndex=cmtsIfIndex, flapListTrap=flapListTrap, flapTrapType=flapTrapType, rdnFlapGroup=rdnFlapGroup, cmFlapCounts=cmFlapCounts, flapListPercentageThreshold=flapListPercentageThreshold, rdnCableSpectrum=rdnCableSpectrum, flapCmMacAddress=flapCmMacAddress, flapCmInsertionFails=flapCmInsertionFails, cableSpectrumMIBNotifications=cableSpectrumMIBNotifications, flapCmPowerAdjustments=flapCmPowerAdjustments)
(integer, object_identifier, octet_string) = mibBuilder.importSymbols('ASN1', 'Integer', 'ObjectIdentifier', 'OctetString') (named_values,) = mibBuilder.importSymbols('ASN1-ENUMERATION', 'NamedValues') (value_range_constraint, single_value_constraint, value_size_constraint, constraints_union, constraints_intersection) = mibBuilder.importSymbols('ASN1-REFINEMENT', 'ValueRangeConstraint', 'SingleValueConstraint', 'ValueSizeConstraint', 'ConstraintsUnion', 'ConstraintsIntersection') (interface_index, if_admin_status, if_oper_status, if_index) = mibBuilder.importSymbols('IF-MIB', 'InterfaceIndex', 'ifAdminStatus', 'ifOperStatus', 'ifIndex') (riverdelta,) = mibBuilder.importSymbols('RDN-MIB', 'riverdelta') (module_compliance, notification_group, object_group) = mibBuilder.importSymbols('SNMPv2-CONF', 'ModuleCompliance', 'NotificationGroup', 'ObjectGroup') (mib_identifier, object_identity, counter32, module_identity, integer32, unsigned32, bits, ip_address, time_ticks, iso, counter64, notification_type, gauge32, mib_scalar, mib_table, mib_table_row, mib_table_column) = mibBuilder.importSymbols('SNMPv2-SMI', 'MibIdentifier', 'ObjectIdentity', 'Counter32', 'ModuleIdentity', 'Integer32', 'Unsigned32', 'Bits', 'IpAddress', 'TimeTicks', 'iso', 'Counter64', 'NotificationType', 'Gauge32', 'MibScalar', 'MibTable', 'MibTableRow', 'MibTableColumn') (date_and_time, mac_address, textual_convention, row_status, display_string) = mibBuilder.importSymbols('SNMPv2-TC', 'DateAndTime', 'MacAddress', 'TextualConvention', 'RowStatus', 'DisplayString') rdn_cable_spectrum = module_identity((1, 3, 6, 1, 4, 1, 4981, 6)) if mibBuilder.loadTexts: rdnCableSpectrum.setLastUpdated('200206250000Z') if mibBuilder.loadTexts: rdnCableSpectrum.setOrganization('Motorola') if mibBuilder.loadTexts: rdnCableSpectrum.setContactInfo(' Motorola Customer Service Postal: Motorola Three Highwood Dr east Tewksbury, MA 01876 U.S.A. Tel: ') if mibBuilder.loadTexts: rdnCableSpectrum.setDescription('This is the MIB Module for Cable Spectrum Management for MCNS compliant Cable Modem Termination Systems (CMTS). ') rdn_cable_spectrum_objects = mib_identifier((1, 3, 6, 1, 4, 1, 4981, 6, 1)) rdn_flap_objects = mib_identifier((1, 3, 6, 1, 4, 1, 4981, 6, 1, 1)) rdn_flap_cm_cmts_status_table = mib_table((1, 3, 6, 1, 4, 1, 4981, 6, 1, 1, 1)) if mibBuilder.loadTexts: rdnFlapCmCmtsStatusTable.setStatus('current') if mibBuilder.loadTexts: rdnFlapCmCmtsStatusTable.setDescription('This table keeps the status of the flap modems for per CMTS.') rdn_flap_cm_cmts_status_entry = mib_table_row((1, 3, 6, 1, 4, 1, 4981, 6, 1, 1, 1, 1)).setIndexNames((0, 'RDN-CABLE-SPECTRUM-MIB', 'flapCmCmtsIfIndex')) if mibBuilder.loadTexts: rdnFlapCmCmtsStatusEntry.setStatus('current') if mibBuilder.loadTexts: rdnFlapCmCmtsStatusEntry.setDescription('List of attributes for an entry in the rdnFlapCmCmtsStatusTable.') flap_cm_cmts_if_index = mib_table_column((1, 3, 6, 1, 4, 1, 4981, 6, 1, 1, 1, 1, 1), integer32().subtype(subtypeSpec=value_range_constraint(1, 16))) if mibBuilder.loadTexts: flapCmCmtsIfIndex.setStatus('current') if mibBuilder.loadTexts: flapCmCmtsIfIndex.setDescription('The CMTS Interface Index.') flap_list_max_size = mib_table_column((1, 3, 6, 1, 4, 1, 4981, 6, 1, 1, 1, 1, 2), integer32().subtype(subtypeSpec=value_range_constraint(1, 8191)).clone(100)).setUnits('modems').setMaxAccess('readwrite') if mibBuilder.loadTexts: flapListMaxSize.setStatus('current') if mibBuilder.loadTexts: flapListMaxSize.setDescription('The maximum number of flap modems. The user could configure this number according to the number of downstreams and the number of modem line cards in the CMTS. The number can range from 1 to 8191. The default value is 100. When the number of modems exceeds the max flap list size, the additional modems are ignored.') flap_list_current_size = mib_table_column((1, 3, 6, 1, 4, 1, 4981, 6, 1, 1, 1, 1, 3), gauge32().subtype(subtypeSpec=value_range_constraint(0, 8191))).setUnits('modems').setMaxAccess('readonly') if mibBuilder.loadTexts: flapListCurrentSize.setStatus('current') if mibBuilder.loadTexts: flapListCurrentSize.setDescription('The current number of modems in the flap list. Its value will be less than or equal to flapListMaxSize.') flap_aging_out_time = mib_table_column((1, 3, 6, 1, 4, 1, 4981, 6, 1, 1, 1, 1, 4), integer32().subtype(subtypeSpec=value_range_constraint(1, 86400)).clone(1440)).setUnits('minutes').setMaxAccess('readwrite') if mibBuilder.loadTexts: flapAgingOutTime.setStatus('current') if mibBuilder.loadTexts: flapAgingOutTime.setDescription('The age out time in minutes for modems in the flap table. The number of minutes range from 1 to 86400. The default value is 1440.') flap_insertion_time = mib_table_column((1, 3, 6, 1, 4, 1, 4981, 6, 1, 1, 1, 1, 5), integer32().subtype(subtypeSpec=value_range_constraint(1, 86400)).clone(60)).setUnits('seconds').setMaxAccess('readwrite') if mibBuilder.loadTexts: flapInsertionTime.setStatus('current') if mibBuilder.loadTexts: flapInsertionTime.setDescription('The interval of time that begins when the cable modem initially ranges, reboots, and ends when it starts initial maintenance again. If the interval of time is less than what is specified in flapInsertionTime, the flapCmInsertionFails and cmFlapCounts will increment. The valid range is from 1 to 86400 seconds. The default value is 60.') flap_miss_threshold = mib_table_column((1, 3, 6, 1, 4, 1, 4981, 6, 1, 1, 1, 1, 6), integer32().subtype(subtypeSpec=value_range_constraint(1, 12)).clone(6)).setUnits('modem').setMaxAccess('readwrite') if mibBuilder.loadTexts: flapMissThreshold.setStatus('current') if mibBuilder.loadTexts: flapMissThreshold.setDescription('Specifies the maximum threshold for the number of consecutive miss counts during a polling cycle. If the flap miss counts goes over this threshold, the modem will be added into the flap list. Polling is maintained between the CMTS and the cable modem every 10 seconds. The flapMissThreshold specifies the maximum number of consecutive missed counts during one station maintenance poll interval. If there are more than 16 consecutive miss counts during one polling cycle, the modem will de-insert and attempt to range again. The value ranges from 1 to 12 consecutive counts. The default value is 6.') flap_power_adj_threshold = mib_table_column((1, 3, 6, 1, 4, 1, 4981, 6, 1, 1, 1, 1, 7), integer32().subtype(subtypeSpec=value_range_constraint(1, 10)).clone(2)).setUnits('dB').setMaxAccess('readwrite') if mibBuilder.loadTexts: flapPowerAdjThreshold.setStatus('current') if mibBuilder.loadTexts: flapPowerAdjThreshold.setDescription(" The power adjustment threshold for a CM to raise and lower it's transmit power during normal operation. When a modem's power adjustment goes above or below the flapPowerAdjThreshold the CM will be added into the flap list. The flapCmPowerAdjustments and cmFlapCounts will be incremented as well. flapPowerAdjThreshold values of 2 dB and below are low enough to continuously increment the flapCmPowerAdjustments under normal conditions. The values range from 1 to 10. The default is 2. ") flap_list_percentage_threshold = mib_table_column((1, 3, 6, 1, 4, 1, 4981, 6, 1, 1, 1, 1, 8), integer32().subtype(subtypeSpec=value_range_constraint(1, 100)).clone(10)).setMaxAccess('readwrite') if mibBuilder.loadTexts: flapListPercentageThreshold.setStatus('current') if mibBuilder.loadTexts: flapListPercentageThreshold.setDescription(' The percentage CM miss threshold. If CM miss percentage goes over this threshold and flapListTrapEnable is set, a flap list trap will be send out to notify this event ') flap_list_trap_enable = mib_table_column((1, 3, 6, 1, 4, 1, 4981, 6, 1, 1, 1, 1, 9), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2))).clone(namedValues=named_values(('enabled', 1), ('disabled', 2))).clone('enabled')).setMaxAccess('readwrite') if mibBuilder.loadTexts: flapListTrapEnable.setStatus('current') if mibBuilder.loadTexts: flapListTrapEnable.setDescription('This object controls flap list trap. If its value is set to enabled(1), a trap will be sent out when the CM miss percentage goes over the flapListPercentageThreshold; Otherwise no flap list trap will be sent out. By default, this object has the value enabled(1). ') rdn_flap_cm_table = mib_table((1, 3, 6, 1, 4, 1, 4981, 6, 1, 1, 2)) if mibBuilder.loadTexts: rdnFlapCmTable.setStatus('current') if mibBuilder.loadTexts: rdnFlapCmTable.setDescription('This table keeps the records of modem state changes. An entry can be deleted from the table but can not be added to the table.') rdn_flap_cm_entry = mib_table_row((1, 3, 6, 1, 4, 1, 4981, 6, 1, 1, 2, 1)).setIndexNames((0, 'RDN-CABLE-SPECTRUM-MIB', 'flapCmIndex')) if mibBuilder.loadTexts: rdnFlapCmEntry.setStatus('current') if mibBuilder.loadTexts: rdnFlapCmEntry.setDescription('List of attributes for an entry in the rdnFlapTable.') flap_cm_index = mib_table_column((1, 3, 6, 1, 4, 1, 4981, 6, 1, 1, 2, 1, 1), interface_index()) if mibBuilder.loadTexts: flapCmIndex.setStatus('current') if mibBuilder.loadTexts: flapCmIndex.setDescription(' Index for Cable Modem.') cmts_if_index = mib_table_column((1, 3, 6, 1, 4, 1, 4981, 6, 1, 1, 2, 1, 2), integer32().subtype(subtypeSpec=value_range_constraint(1, 16))).setMaxAccess('readonly') if mibBuilder.loadTexts: cmtsIfIndex.setStatus('current') if mibBuilder.loadTexts: cmtsIfIndex.setDescription('The CMTS Interface Index.') flap_cm_mac_address = mib_table_column((1, 3, 6, 1, 4, 1, 4981, 6, 1, 1, 2, 1, 3), mac_address()).setMaxAccess('readonly') if mibBuilder.loadTexts: flapCmMacAddress.setStatus('current') if mibBuilder.loadTexts: flapCmMacAddress.setDescription("MAC address of the Cable Modem's Cable interface. Identifies a flap-list entry for a flapping Cable Modem.") flap_cm_upstream_if_index = mib_table_column((1, 3, 6, 1, 4, 1, 4981, 6, 1, 1, 2, 1, 4), interface_index()).setMaxAccess('readonly') if mibBuilder.loadTexts: flapCmUpstreamIfIndex.setStatus('current') if mibBuilder.loadTexts: flapCmUpstreamIfIndex.setDescription('The ifIndex of the Cable upstream interface whose ifType is docsCableUpstream(129). The CMTS detects a flapping Cable Modem from its Cable upstream interface.') flap_cm_downstream_if_index = mib_table_column((1, 3, 6, 1, 4, 1, 4981, 6, 1, 1, 2, 1, 5), interface_index()).setMaxAccess('readonly') if mibBuilder.loadTexts: flapCmDownstreamIfIndex.setStatus('current') if mibBuilder.loadTexts: flapCmDownstreamIfIndex.setDescription('The ifIndex of the Cable downstream interface whose ifType is docsCableDownstream(128).') flap_cm_insertion_fails = mib_table_column((1, 3, 6, 1, 4, 1, 4981, 6, 1, 1, 2, 1, 6), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: flapCmInsertionFails.setReference('Data over Cable Radio Frequency Interface specification, Section 7.2.') if mibBuilder.loadTexts: flapCmInsertionFails.setStatus('current') if mibBuilder.loadTexts: flapCmInsertionFails.setDescription('When the Cable Modem initially ranges, reboots and initially ranges again within the specified insertion time, this counter will increment. The cmFlapCounts increment along with this counter.') flap_cm_hits = mib_table_column((1, 3, 6, 1, 4, 1, 4981, 6, 1, 1, 2, 1, 7), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: flapCmHits.setStatus('current') if mibBuilder.loadTexts: flapCmHits.setDescription('The number of times the CMTS receives the Ranging request from the Cable Modem.') flap_cm_misses = mib_table_column((1, 3, 6, 1, 4, 1, 4981, 6, 1, 1, 2, 1, 8), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: flapCmMisses.setStatus('current') if mibBuilder.loadTexts: flapCmMisses.setDescription('The number of times the CMTS misses the Ranging request from the Cable Modem. The CMTS can check up to 16 consecutive times for a ranging request message during one polling cycle. Misses are not desirable since this is usually an indication of a return path problem; however, having a small number of misses is normal. Ideally, the Hit should be much greater than the Miss counts.') flap_cm_power_adjustments = mib_table_column((1, 3, 6, 1, 4, 1, 4981, 6, 1, 1, 2, 1, 9), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: flapCmPowerAdjustments.setReference('Data over Cable Radio Frequency Interface specification, Section 7.2.') if mibBuilder.loadTexts: flapCmPowerAdjustments.setStatus('current') if mibBuilder.loadTexts: flapCmPowerAdjustments.setDescription(' When the power adjustment changed above or below the power adjustment threshold this counter will increment. The Flap Count (cmFlapCounts) will increment when this counter increments.') cm_flap_counts = mib_table_column((1, 3, 6, 1, 4, 1, 4981, 6, 1, 1, 2, 1, 10), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: cmFlapCounts.setReference('Data over Cable Radio Frequency Interface specification, Appendix B.') if mibBuilder.loadTexts: cmFlapCounts.setStatus('current') if mibBuilder.loadTexts: cmFlapCounts.setDescription('The total number of times a CM flaps Under following three situations, this counter will increase: (1) When flapCmInsertionFails is increased the flap counts will increase. (2) When the CMTS receives the number of consecutive misses specified in the flapMissThreshold, the flap counts will increase. (3) When flapPowerAdjustments is increased the flap counts will increase.') cm_last_flap_time = mib_table_column((1, 3, 6, 1, 4, 1, 4981, 6, 1, 1, 2, 1, 11), date_and_time()).setMaxAccess('readonly') if mibBuilder.loadTexts: cmLastFlapTime.setStatus('current') if mibBuilder.loadTexts: cmLastFlapTime.setDescription('The last time stamp cm flaps') cm_flap_create_time = mib_table_column((1, 3, 6, 1, 4, 1, 4981, 6, 1, 1, 2, 1, 12), date_and_time()).setMaxAccess('readonly') if mibBuilder.loadTexts: cmFlapCreateTime.setStatus('current') if mibBuilder.loadTexts: cmFlapCreateTime.setDescription('The time stamp when new flap CM is added to the table. ') cm_flap_row_status = mib_table_column((1, 3, 6, 1, 4, 1, 4981, 6, 1, 1, 2, 1, 13), row_status()).setMaxAccess('readwrite') if mibBuilder.loadTexts: cmFlapRowStatus.setStatus('current') if mibBuilder.loadTexts: cmFlapRowStatus.setDescription('Controls and reflects the status of rows in this table. When a new flap cable modem is detected, and does not exist in flap list and flapListCurrentSize is less than flapListMaxSize, an entry will be created in this table. The instance of this object will be set to active(1). All flapping modems have the status of active(1). Active entries are removed from the table if they are aged out. The age out time is defined in flapAgingOutTime When a row is set to destroy(6), it will remove the entry immediately. To prevent an entry from being aged out, the entry should be set to notInService(2). The entry will remain in the table until this instance is set to destroy. The user is allowed set an entry from active to notInService or from notInService to destroy A user is not allowed to change a notInService entry to active. createAndGo(4) and createAndWait(5) are not supported.') flap_list_trap = notification_type((1, 3, 6, 1, 4, 1, 4981, 6, 1, 1, 3)).setObjects(('IF-MIB', 'ifIndex'), ('IF-MIB', 'ifAdminStatus'), ('IF-MIB', 'ifOperStatus')) if mibBuilder.loadTexts: flapListTrap.setStatus('current') if mibBuilder.loadTexts: flapListTrap.setDescription('a flap list trap signifies that SNMPv2 entity, acting in an agent role, has detected that the percentage of flap cm for one of the cmts board has gone over the flapListPercentageThreshold ') flap_trap_type = mib_scalar((1, 3, 6, 1, 4, 1, 4981, 6, 1, 1, 4), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3))).clone(namedValues=named_values(('power', 1), ('ranging', 2), ('insertion', 3)))).setMaxAccess('readonly') if mibBuilder.loadTexts: flapTrapType.setStatus('current') if mibBuilder.loadTexts: flapTrapType.setDescription('Reason for flapping power - The power threshold was exceeded. ranging - Missing ranging requests went beyond threshold insertion - Modem re-ranged within insertion time threshold. This is a place holder for the reason parameter for the modem to go into flap list. This should return ZERO when read. This just allows us to include a flapping reason in the modem flap trap varbind. ') flap_modem_trap = notification_type((1, 3, 6, 1, 4, 1, 4981, 6, 1, 1, 5)).setObjects(('RDN-CABLE-SPECTRUM-MIB', 'flapCmMacAddress'), ('RDN-CABLE-SPECTRUM-MIB', 'flapTrapType')) if mibBuilder.loadTexts: flapModemTrap.setStatus('current') if mibBuilder.loadTexts: flapModemTrap.setDescription("This Trap will be sent whenever the modem goes into the flapping list for some reason. 'flapCmMacAddress' gives the Mac Address of the modem. 'flapTrapType' gives the cause for the modem to go into the flap list. ") rdn_cable_spectrum_notification_prefix = mib_identifier((1, 3, 6, 1, 4, 1, 4981, 6, 2)) cable_spectrum_mib_notifications = mib_identifier((1, 3, 6, 1, 4, 1, 4981, 6, 2, 0)) rdn_cable_spectrum_conformance = mib_identifier((1, 3, 6, 1, 4, 1, 4981, 6, 3)) rdn_cable_spectrum_compliances = mib_identifier((1, 3, 6, 1, 4, 1, 4981, 6, 3, 1)) rdn_cable_spectrum_groups = mib_identifier((1, 3, 6, 1, 4, 1, 4981, 6, 3, 2)) compliance = module_compliance((1, 3, 6, 1, 4, 1, 4981, 6, 3, 1, 1)).setObjects(('RDN-CABLE-SPECTRUM-MIB', 'flapGroup')) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): compliance = compliance.setStatus('current') if mibBuilder.loadTexts: compliance.setDescription('The compliance statement for devices that implement MCNS compliant Radio Frequency Interfaces and Spectrum Management features.') rdn_flap_group = object_group((1, 3, 6, 1, 4, 1, 4981, 6, 3, 2, 1)).setObjects(('RDN-CABLE-SPECTRUM-MIB', 'flapListMaxSize'), ('RDN-CABLE-SPECTRUM-MIB', 'flapListCurrentSize'), ('RDN-CABLE-SPECTRUM-MIB', 'flapAgingOutTime'), ('RDN-CABLE-SPECTRUM-MIB', 'flapInsertionTime'), ('RDN-CABLE-SPECTRUM-MIB', 'flapMissThreshold'), ('RDN-CABLE-SPECTRUM-MIB', 'flapPowerAdjThreshold'), ('RDN-CABLE-SPECTRUM-MIB', 'cmtsIfIndex'), ('RDN-CABLE-SPECTRUM-MIB', 'flapCmMacAddress'), ('RDN-CABLE-SPECTRUM-MIB', 'flapCmUpstreamIfIndex'), ('RDN-CABLE-SPECTRUM-MIB', 'flapCmDownstreamIfIndex'), ('RDN-CABLE-SPECTRUM-MIB', 'flapCmInsertionFails'), ('RDN-CABLE-SPECTRUM-MIB', 'flapCmHits'), ('RDN-CABLE-SPECTRUM-MIB', 'flapCmMisses'), ('RDN-CABLE-SPECTRUM-MIB', 'flapCmPowerAdjustments'), ('RDN-CABLE-SPECTRUM-MIB', 'cmFlapCounts'), ('RDN-CABLE-SPECTRUM-MIB', 'cmLastFlapTime'), ('RDN-CABLE-SPECTRUM-MIB', 'cmFlapCreateTime'), ('RDN-CABLE-SPECTRUM-MIB', 'cmFlapRowStatus'), ('RDN-CABLE-SPECTRUM-MIB', 'flapListPercentageThreshold'), ('RDN-CABLE-SPECTRUM-MIB', 'flapListTrapEnable')) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): rdn_flap_group = rdnFlapGroup.setStatus('current') if mibBuilder.loadTexts: rdnFlapGroup.setDescription('Group of objects implemented in Cable Modem Termination Systems providing Flap List information.') mibBuilder.exportSymbols('RDN-CABLE-SPECTRUM-MIB', flapListMaxSize=flapListMaxSize, cmLastFlapTime=cmLastFlapTime, flapListCurrentSize=flapListCurrentSize, flapCmUpstreamIfIndex=flapCmUpstreamIfIndex, flapCmMisses=flapCmMisses, compliance=compliance, rdnFlapCmEntry=rdnFlapCmEntry, flapMissThreshold=flapMissThreshold, rdnCableSpectrumConformance=rdnCableSpectrumConformance, rdnFlapCmTable=rdnFlapCmTable, rdnFlapObjects=rdnFlapObjects, PYSNMP_MODULE_ID=rdnCableSpectrum, rdnCableSpectrumGroups=rdnCableSpectrumGroups, cmFlapRowStatus=cmFlapRowStatus, flapCmDownstreamIfIndex=flapCmDownstreamIfIndex, rdnCableSpectrumObjects=rdnCableSpectrumObjects, flapPowerAdjThreshold=flapPowerAdjThreshold, flapListTrapEnable=flapListTrapEnable, rdnCableSpectrumCompliances=rdnCableSpectrumCompliances, flapCmIndex=flapCmIndex, flapModemTrap=flapModemTrap, flapInsertionTime=flapInsertionTime, rdnCableSpectrumNotificationPrefix=rdnCableSpectrumNotificationPrefix, flapCmCmtsIfIndex=flapCmCmtsIfIndex, rdnFlapCmCmtsStatusEntry=rdnFlapCmCmtsStatusEntry, flapAgingOutTime=flapAgingOutTime, cmFlapCreateTime=cmFlapCreateTime, flapCmHits=flapCmHits, rdnFlapCmCmtsStatusTable=rdnFlapCmCmtsStatusTable, cmtsIfIndex=cmtsIfIndex, flapListTrap=flapListTrap, flapTrapType=flapTrapType, rdnFlapGroup=rdnFlapGroup, cmFlapCounts=cmFlapCounts, flapListPercentageThreshold=flapListPercentageThreshold, rdnCableSpectrum=rdnCableSpectrum, flapCmMacAddress=flapCmMacAddress, flapCmInsertionFails=flapCmInsertionFails, cableSpectrumMIBNotifications=cableSpectrumMIBNotifications, flapCmPowerAdjustments=flapCmPowerAdjustments)
t=int(input("")) for i in range(0,t): a,b=tuple(map(int,input("").split(" "))) d=abs(a-b) print((int(d/10))if(d%10==0)else(int((d+9)/10)))
t = int(input('')) for i in range(0, t): (a, b) = tuple(map(int, input('').split(' '))) d = abs(a - b) print(int(d / 10) if d % 10 == 0 else int((d + 9) / 10))
def repeat(n): def decorator(func): def wrapper(*args, **kwargs): for _ in range(n): func(*args, **kwargs) return wrapper return decorator @repeat(4) def say_hi(): print("Hello") say_hi()
def repeat(n): def decorator(func): def wrapper(*args, **kwargs): for _ in range(n): func(*args, **kwargs) return wrapper return decorator @repeat(4) def say_hi(): print('Hello') say_hi()
if __name__ == "__main__": my_tuple = (1, 2, 3) print('my_tuple:', my_tuple) a, b, c = my_tuple print('a', a) print('b', b) print('c', c) print('my_tuple[0]:', my_tuple[0]) print('my_tuple[1]:', my_tuple[1]) print('my_tuple[1:3]:', my_tuple[1:3]) # my_tuple[0] = 1 # error , tuple read only
if __name__ == '__main__': my_tuple = (1, 2, 3) print('my_tuple:', my_tuple) (a, b, c) = my_tuple print('a', a) print('b', b) print('c', c) print('my_tuple[0]:', my_tuple[0]) print('my_tuple[1]:', my_tuple[1]) print('my_tuple[1:3]:', my_tuple[1:3])
#Bitonic sequence Dynamic programming # Java code https://github.com/mission-peace/interview/blob/master/src/com/interview/dynamic/BitonicSequence.java def bitonic_sequence( input ): lis = [1]*len(input) lds = [1]*len(input) for i in range(1, len(input)): for j in range(0, i): if input[i] > input[j]: lis[i] = max(lis[i], lis[j] + 1) for i in range(len(input)-2,-1,-1): for j in range(len(input)-1,i,-1): if input[i] > input[j]: lds[i] = max(lds[i], lds[j] + 1) maxVal = 0 for i in range(len(input)): if lis[i] + lds[i] - 1 > maxVal: maxVal = lis[i] + lds[i] -1; return maxVal; maxVal= bitonic_sequence([1,4,3,7,2,1,8,11,13,0]) print("Max bitonic sequence", maxVal)
def bitonic_sequence(input): lis = [1] * len(input) lds = [1] * len(input) for i in range(1, len(input)): for j in range(0, i): if input[i] > input[j]: lis[i] = max(lis[i], lis[j] + 1) for i in range(len(input) - 2, -1, -1): for j in range(len(input) - 1, i, -1): if input[i] > input[j]: lds[i] = max(lds[i], lds[j] + 1) max_val = 0 for i in range(len(input)): if lis[i] + lds[i] - 1 > maxVal: max_val = lis[i] + lds[i] - 1 return maxVal max_val = bitonic_sequence([1, 4, 3, 7, 2, 1, 8, 11, 13, 0]) print('Max bitonic sequence', maxVal)
class API_Slack_Dialog(): def __init__(self): self.title = "" self.callback_id = "" self.submit_label = "Submit" self.state = "#3AA3E3" self.elements = [] self.notify_on_cancel = True # def add_button(self, name, text, value, style = 'default'): # self.actions.append({ # "name" : name , # "text" : text , # "type" : "button" , # "value" : value , # "style" : style }) # return self # # def set_callback_id(self, callback_id): # self.callback_id = callback_id # return self # # def set_text(self, text): # self.text = text # return self def add_element_text(self, label, name, value = None, optional = False, hint = None, placeholder = None): element = { "type" : "text" , "label" : label , "name" : name , "value" : value , "optional" : optional , "hint" : hint , "placeholder" : placeholder } self.elements.append(element) def add_element_textarea(self, label, name, value = None, optional = False, hint = None, placeholder = None): element = { "type" : "textarea" , "label" : label , "name" : name , "value" : value , "optional" : optional , "hint" : hint , "placeholder" : placeholder } self.elements.append(element) def add_element_select(self, label, name, options, value = None): element = { "type" : "select" , "label" : label , "name" : name , "value" : value , "options" : [] } for item in options: element['options'].append({"label": item[0], "value": item[1]}) self.elements.append(element) def add_element_select_external(self, label, name, placeholder = None, optional = False): element = { "type" : "select" , "label" : label , "name" : name , "data_source" : "external" , "placeholder" : placeholder , "optional" : optional , "options" : [] #"min_query_length" : 3 , } self.elements.append(element) def test_render(self): self.callback_id = 'issue-suggestion' self.title = 'This is a test' self.add_element_text ("label 1", "name_1", "value 1", "hint 1", "placeholder 1") #self.add_element_text ("label 2", "name-2", "value 2", "hint 2", "placeholder 2") self.add_element_text ("label 3", "name-3",) self.add_element_textarea ("label 4", "name-4", "value 4", "hint 4", "placeholder 4") self.add_element_select ("label 5", "name-5" ,[("label-1", "value-1"), ("label-2", "value-2")], "value-2") self.add_element_select_external("label 6", "name-6") return self.render() def render(self): return { "callback_id" : self.callback_id , "title" : self.title , "submit_label" : self.submit_label , "notify_on_cancel" : self.notify_on_cancel, "elements" : self.elements }
class Api_Slack_Dialog: def __init__(self): self.title = '' self.callback_id = '' self.submit_label = 'Submit' self.state = '#3AA3E3' self.elements = [] self.notify_on_cancel = True def add_element_text(self, label, name, value=None, optional=False, hint=None, placeholder=None): element = {'type': 'text', 'label': label, 'name': name, 'value': value, 'optional': optional, 'hint': hint, 'placeholder': placeholder} self.elements.append(element) def add_element_textarea(self, label, name, value=None, optional=False, hint=None, placeholder=None): element = {'type': 'textarea', 'label': label, 'name': name, 'value': value, 'optional': optional, 'hint': hint, 'placeholder': placeholder} self.elements.append(element) def add_element_select(self, label, name, options, value=None): element = {'type': 'select', 'label': label, 'name': name, 'value': value, 'options': []} for item in options: element['options'].append({'label': item[0], 'value': item[1]}) self.elements.append(element) def add_element_select_external(self, label, name, placeholder=None, optional=False): element = {'type': 'select', 'label': label, 'name': name, 'data_source': 'external', 'placeholder': placeholder, 'optional': optional, 'options': []} self.elements.append(element) def test_render(self): self.callback_id = 'issue-suggestion' self.title = 'This is a test' self.add_element_text('label 1', 'name_1', 'value 1', 'hint 1', 'placeholder 1') self.add_element_text('label 3', 'name-3') self.add_element_textarea('label 4', 'name-4', 'value 4', 'hint 4', 'placeholder 4') self.add_element_select('label 5', 'name-5', [('label-1', 'value-1'), ('label-2', 'value-2')], 'value-2') self.add_element_select_external('label 6', 'name-6') return self.render() def render(self): return {'callback_id': self.callback_id, 'title': self.title, 'submit_label': self.submit_label, 'notify_on_cancel': self.notify_on_cancel, 'elements': self.elements}