content stringlengths 7 1.05M | fixed_cases stringlengths 1 1.28M |
|---|---|
"""
This is my first prime number project,
it is not fast but it will work properly.
It will find all prime numbers between 2 and 'End'.
1. At first we create an Prime array to
store 2, 3 and all numbers between 3 and 'End'
if number is odd and it is not divided by 3
2. Then we create a copy of Prime,
because we want to iterate through prime elements
but deleting an item from prime itself will cause error
3.we iterate through prime and for each item
until we reach that item itself, we divide it by all
other numbers if it's remain is zero,
so it is not a prime number
so we remove it from prime list
"""
def primeNumbers_1(End):
Prime = [2, 3] + [p for p in range(3, End, 2) if p % 3 != 0]
Second_Prime = Prime.copy()
for i in Second_Prime:
for j in Second_Prime:
if i > j:
if i % j == 0:
try:
Prime.remove(i)
except ValueError:
continue
else:
break
return Prime
print(primeNumbers_1(10))
| """
This is my first prime number project,
it is not fast but it will work properly.
It will find all prime numbers between 2 and 'End'.
1. At first we create an Prime array to
store 2, 3 and all numbers between 3 and 'End'
if number is odd and it is not divided by 3
2. Then we create a copy of Prime,
because we want to iterate through prime elements
but deleting an item from prime itself will cause error
3.we iterate through prime and for each item
until we reach that item itself, we divide it by all
other numbers if it's remain is zero,
so it is not a prime number
so we remove it from prime list
"""
def prime_numbers_1(End):
prime = [2, 3] + [p for p in range(3, End, 2) if p % 3 != 0]
second__prime = Prime.copy()
for i in Second_Prime:
for j in Second_Prime:
if i > j:
if i % j == 0:
try:
Prime.remove(i)
except ValueError:
continue
else:
break
return Prime
print(prime_numbers_1(10)) |
#
# PySNMP MIB module KEEPALIVED-MIB (http://snmplabs.com/pysmi)
# ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/KEEPALIVED-MIB
# Produced by pysmi-0.3.4 at Wed May 1 14:04:49 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")
ValueSizeConstraint, ValueRangeConstraint, ConstraintsIntersection, SingleValueConstraint, ConstraintsUnion = mibBuilder.importSymbols("ASN1-REFINEMENT", "ValueSizeConstraint", "ValueRangeConstraint", "ConstraintsIntersection", "SingleValueConstraint", "ConstraintsUnion")
ifIndex, InterfaceIndex = mibBuilder.importSymbols("IF-MIB", "ifIndex", "InterfaceIndex")
InetPortNumber, InetAddressPrefixLength, InetAddress, InetAddressType, InetScopeType = mibBuilder.importSymbols("INET-ADDRESS-MIB", "InetPortNumber", "InetAddressPrefixLength", "InetAddress", "InetAddressType", "InetScopeType")
ObjectGroup, ModuleCompliance, NotificationGroup = mibBuilder.importSymbols("SNMPv2-CONF", "ObjectGroup", "ModuleCompliance", "NotificationGroup")
ModuleIdentity, IpAddress, Gauge32, Counter64, ObjectIdentity, enterprises, NotificationType, iso, Integer32, Counter32, MibScalar, MibTable, MibTableRow, MibTableColumn, TimeTicks, MibIdentifier, Unsigned32, Bits = mibBuilder.importSymbols("SNMPv2-SMI", "ModuleIdentity", "IpAddress", "Gauge32", "Counter64", "ObjectIdentity", "enterprises", "NotificationType", "iso", "Integer32", "Counter32", "MibScalar", "MibTable", "MibTableRow", "MibTableColumn", "TimeTicks", "MibIdentifier", "Unsigned32", "Bits")
TextualConvention, DisplayString, TruthValue = mibBuilder.importSymbols("SNMPv2-TC", "TextualConvention", "DisplayString", "TruthValue")
keepalived = ModuleIdentity((1, 3, 6, 1, 4, 1, 9586, 100, 5))
keepalived.setRevisions(('2009-04-08 00:00',))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
if mibBuilder.loadTexts: keepalived.setRevisionsDescriptions(('Initial revision',))
if mibBuilder.loadTexts: keepalived.setLastUpdated('200904080000Z')
if mibBuilder.loadTexts: keepalived.setOrganization('Keepalived')
if mibBuilder.loadTexts: keepalived.setContactInfo('http://www.keepalived.org')
if mibBuilder.loadTexts: keepalived.setDescription('This MIB describes objects used by keepalived, both for VRRP and health checker.')
debian = MibIdentifier((1, 3, 6, 1, 4, 1, 9586))
project = MibIdentifier((1, 3, 6, 1, 4, 1, 9586, 100))
class VrrpState(TextualConvention, Integer32):
description = 'Represents a VRRP state.'
status = 'current'
subtypeSpec = Integer32.subtypeSpec + ConstraintsUnion(SingleValueConstraint(0, 1, 2, 3, 4))
namedValues = NamedValues(("init", 0), ("backup", 1), ("master", 2), ("fault", 3), ("unknown", 4))
pysmi_global = MibIdentifier((1, 3, 6, 1, 4, 1, 9586, 100, 5, 1)).setLabel("global")
vrrp = MibIdentifier((1, 3, 6, 1, 4, 1, 9586, 100, 5, 2))
check = MibIdentifier((1, 3, 6, 1, 4, 1, 9586, 100, 5, 3))
conformance = MibIdentifier((1, 3, 6, 1, 4, 1, 9586, 100, 5, 4))
version = MibScalar((1, 3, 6, 1, 4, 1, 9586, 100, 5, 1, 1), DisplayString()).setMaxAccess("readonly")
if mibBuilder.loadTexts: version.setStatus('current')
if mibBuilder.loadTexts: version.setDescription('Version of keepalived')
routerId = MibScalar((1, 3, 6, 1, 4, 1, 9586, 100, 5, 1, 2), DisplayString()).setMaxAccess("readonly")
if mibBuilder.loadTexts: routerId.setStatus('current')
if mibBuilder.loadTexts: routerId.setDescription('Router ID')
mail = MibIdentifier((1, 3, 6, 1, 4, 1, 9586, 100, 5, 1, 3))
smtpServerAddressType = MibScalar((1, 3, 6, 1, 4, 1, 9586, 100, 5, 1, 3, 1), InetAddressType()).setMaxAccess("readonly")
if mibBuilder.loadTexts: smtpServerAddressType.setStatus('current')
if mibBuilder.loadTexts: smtpServerAddressType.setDescription('Address type for SMTP server.')
smtpServerAddress = MibScalar((1, 3, 6, 1, 4, 1, 9586, 100, 5, 1, 3, 2), InetAddress()).setMaxAccess("readonly")
if mibBuilder.loadTexts: smtpServerAddress.setStatus('current')
if mibBuilder.loadTexts: smtpServerAddress.setDescription('Address of SMTP server.')
smtpServerTimeout = MibScalar((1, 3, 6, 1, 4, 1, 9586, 100, 5, 1, 3, 3), Unsigned32()).setUnits('seconds').setMaxAccess("readonly")
if mibBuilder.loadTexts: smtpServerTimeout.setStatus('current')
if mibBuilder.loadTexts: smtpServerTimeout.setDescription('SMTP server connection timeout.')
emailFrom = MibScalar((1, 3, 6, 1, 4, 1, 9586, 100, 5, 1, 3, 4), DisplayString()).setMaxAccess("readonly")
if mibBuilder.loadTexts: emailFrom.setStatus('current')
if mibBuilder.loadTexts: emailFrom.setDescription('Email address for the From field.')
emailTable = MibTable((1, 3, 6, 1, 4, 1, 9586, 100, 5, 1, 3, 5), )
if mibBuilder.loadTexts: emailTable.setStatus('current')
if mibBuilder.loadTexts: emailTable.setDescription('Table of email notification addresses.')
emailEntry = MibTableRow((1, 3, 6, 1, 4, 1, 9586, 100, 5, 1, 3, 5, 1), ).setIndexNames((0, "KEEPALIVED-MIB", "emailIndex"))
if mibBuilder.loadTexts: emailEntry.setStatus('current')
if mibBuilder.loadTexts: emailEntry.setDescription('Email address to be notified with an alert.')
emailIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 9586, 100, 5, 1, 3, 5, 1, 1), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 2147483647)))
if mibBuilder.loadTexts: emailIndex.setStatus('current')
if mibBuilder.loadTexts: emailIndex.setDescription('Index for the email address.')
emailAddress = MibTableColumn((1, 3, 6, 1, 4, 1, 9586, 100, 5, 1, 3, 5, 1, 2), DisplayString()).setMaxAccess("readonly")
if mibBuilder.loadTexts: emailAddress.setStatus('current')
if mibBuilder.loadTexts: emailAddress.setDescription('Email address to be notified when an alert is raised.')
trapEnable = MibScalar((1, 3, 6, 1, 4, 1, 9586, 100, 5, 1, 4), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("enabled", 1), ("disabled", 2)))).setMaxAccess("readonly")
if mibBuilder.loadTexts: trapEnable.setStatus('current')
if mibBuilder.loadTexts: trapEnable.setDescription('Indicate whether traps should be sent for various events.')
linkBeat = MibScalar((1, 3, 6, 1, 4, 1, 9586, 100, 5, 1, 5), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("netlink", 1), ("polling", 2)))).setMaxAccess("readonly")
if mibBuilder.loadTexts: linkBeat.setStatus('current')
if mibBuilder.loadTexts: linkBeat.setDescription('Indicate which method is used to check if a link is up or down. netlink(1) means that the kernel will push a link state change while polling(2) means that the status of the link is checked periodically.')
vrrpSyncGroupTable = MibTable((1, 3, 6, 1, 4, 1, 9586, 100, 5, 2, 1), )
if mibBuilder.loadTexts: vrrpSyncGroupTable.setStatus('current')
if mibBuilder.loadTexts: vrrpSyncGroupTable.setDescription('Table of sync groups')
vrrpSyncGroupEntry = MibTableRow((1, 3, 6, 1, 4, 1, 9586, 100, 5, 2, 1, 1), ).setIndexNames((0, "KEEPALIVED-MIB", "vrrpSyncGroupIndex"))
if mibBuilder.loadTexts: vrrpSyncGroupEntry.setStatus('current')
if mibBuilder.loadTexts: vrrpSyncGroupEntry.setDescription('Information describing a sync group')
vrrpSyncGroupIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 9586, 100, 5, 2, 1, 1, 1), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 2147483647)))
if mibBuilder.loadTexts: vrrpSyncGroupIndex.setStatus('current')
if mibBuilder.loadTexts: vrrpSyncGroupIndex.setDescription('Index of the synchronisation group.')
vrrpSyncGroupName = MibTableColumn((1, 3, 6, 1, 4, 1, 9586, 100, 5, 2, 1, 1, 2), DisplayString()).setMaxAccess("readonly")
if mibBuilder.loadTexts: vrrpSyncGroupName.setStatus('current')
if mibBuilder.loadTexts: vrrpSyncGroupName.setDescription('Name of the synchronisation group.')
vrrpSyncGroupState = MibTableColumn((1, 3, 6, 1, 4, 1, 9586, 100, 5, 2, 1, 1, 3), VrrpState()).setMaxAccess("readonly")
if mibBuilder.loadTexts: vrrpSyncGroupState.setStatus('current')
if mibBuilder.loadTexts: vrrpSyncGroupState.setDescription('Current state of the synchronisation group.')
vrrpSyncGroupSmtpAlert = MibTableColumn((1, 3, 6, 1, 4, 1, 9586, 100, 5, 2, 1, 1, 4), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("enabled", 1), ("disabled", 2)))).setMaxAccess("readonly")
if mibBuilder.loadTexts: vrrpSyncGroupSmtpAlert.setStatus('current')
if mibBuilder.loadTexts: vrrpSyncGroupSmtpAlert.setDescription('Will SMTP alert be sent for this synchronisation group?')
vrrpSyncGroupNotifyExec = MibTableColumn((1, 3, 6, 1, 4, 1, 9586, 100, 5, 2, 1, 1, 5), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("enabled", 1), ("disabled", 2)))).setMaxAccess("readonly")
if mibBuilder.loadTexts: vrrpSyncGroupNotifyExec.setStatus('current')
if mibBuilder.loadTexts: vrrpSyncGroupNotifyExec.setDescription('Will we execute notification script for this group?')
vrrpSyncGroupScriptMaster = MibTableColumn((1, 3, 6, 1, 4, 1, 9586, 100, 5, 2, 1, 1, 6), DisplayString()).setMaxAccess("readonly")
if mibBuilder.loadTexts: vrrpSyncGroupScriptMaster.setStatus('current')
if mibBuilder.loadTexts: vrrpSyncGroupScriptMaster.setDescription('Script to execute when the group becomes master.')
vrrpSyncGroupScriptBackup = MibTableColumn((1, 3, 6, 1, 4, 1, 9586, 100, 5, 2, 1, 1, 7), DisplayString()).setMaxAccess("readonly")
if mibBuilder.loadTexts: vrrpSyncGroupScriptBackup.setStatus('current')
if mibBuilder.loadTexts: vrrpSyncGroupScriptBackup.setDescription('Script to execute when the group becomes backup.')
vrrpSyncGroupScriptFault = MibTableColumn((1, 3, 6, 1, 4, 1, 9586, 100, 5, 2, 1, 1, 8), DisplayString()).setMaxAccess("readonly")
if mibBuilder.loadTexts: vrrpSyncGroupScriptFault.setStatus('current')
if mibBuilder.loadTexts: vrrpSyncGroupScriptFault.setDescription('Script to execute when the group is in fault state.')
vrrpSyncGroupScript = MibTableColumn((1, 3, 6, 1, 4, 1, 9586, 100, 5, 2, 1, 1, 9), DisplayString()).setMaxAccess("readonly")
if mibBuilder.loadTexts: vrrpSyncGroupScript.setStatus('current')
if mibBuilder.loadTexts: vrrpSyncGroupScript.setDescription('Script to execute whenever a state change occurs.')
vrrpSyncGroupMemberTable = MibTable((1, 3, 6, 1, 4, 1, 9586, 100, 5, 2, 2), )
if mibBuilder.loadTexts: vrrpSyncGroupMemberTable.setStatus('current')
if mibBuilder.loadTexts: vrrpSyncGroupMemberTable.setDescription('Table of instances contained in sync groups')
vrrpSyncGroupMemberEntry = MibTableRow((1, 3, 6, 1, 4, 1, 9586, 100, 5, 2, 2, 1), ).setIndexNames((0, "KEEPALIVED-MIB", "vrrpSyncGroupIndex"), (0, "KEEPALIVED-MIB", "vrrpSyncGroupMemberInstanceIndex"))
if mibBuilder.loadTexts: vrrpSyncGroupMemberEntry.setStatus('current')
if mibBuilder.loadTexts: vrrpSyncGroupMemberEntry.setDescription('Information describing a member of a sync group')
vrrpSyncGroupMemberInstanceIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 9586, 100, 5, 2, 2, 1, 1), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 2147483647)))
if mibBuilder.loadTexts: vrrpSyncGroupMemberInstanceIndex.setStatus('current')
if mibBuilder.loadTexts: vrrpSyncGroupMemberInstanceIndex.setDescription('Index of an instance in a synchronisation group. There is no relation with this index and the index of the corresponding instance in vrrpInstanceTable. Use the name to find out the corresponding instance.')
vrrpSyncGroupMemberName = MibTableColumn((1, 3, 6, 1, 4, 1, 9586, 100, 5, 2, 2, 1, 2), DisplayString()).setMaxAccess("readonly")
if mibBuilder.loadTexts: vrrpSyncGroupMemberName.setStatus('current')
if mibBuilder.loadTexts: vrrpSyncGroupMemberName.setDescription('Name of the instance contained in the synchronisation group.')
vrrpInstanceTable = MibTable((1, 3, 6, 1, 4, 1, 9586, 100, 5, 2, 3), )
if mibBuilder.loadTexts: vrrpInstanceTable.setStatus('current')
if mibBuilder.loadTexts: vrrpInstanceTable.setDescription('Table of VRRP instances')
vrrpInstanceEntry = MibTableRow((1, 3, 6, 1, 4, 1, 9586, 100, 5, 2, 3, 1), ).setIndexNames((0, "KEEPALIVED-MIB", "vrrpInstanceIndex"))
if mibBuilder.loadTexts: vrrpInstanceEntry.setStatus('current')
if mibBuilder.loadTexts: vrrpInstanceEntry.setDescription('Information describing a sync group')
vrrpInstanceIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 9586, 100, 5, 2, 3, 1, 1), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0))).clone(namedValues=NamedValues(("static", 0))))
if mibBuilder.loadTexts: vrrpInstanceIndex.setStatus('current')
if mibBuilder.loadTexts: vrrpInstanceIndex.setDescription('Index of the VRRP instance. Instance 0 is for static IP and static routes.')
vrrpInstanceName = MibTableColumn((1, 3, 6, 1, 4, 1, 9586, 100, 5, 2, 3, 1, 2), DisplayString()).setMaxAccess("readonly")
if mibBuilder.loadTexts: vrrpInstanceName.setStatus('current')
if mibBuilder.loadTexts: vrrpInstanceName.setDescription('Name of the VRRP instance.')
vrrpInstanceVirtualRouterId = MibTableColumn((1, 3, 6, 1, 4, 1, 9586, 100, 5, 2, 3, 1, 3), Unsigned32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: vrrpInstanceVirtualRouterId.setStatus('current')
if mibBuilder.loadTexts: vrrpInstanceVirtualRouterId.setDescription('Virtual Router ID (VRID) for this VRRP instance.')
vrrpInstanceState = MibTableColumn((1, 3, 6, 1, 4, 1, 9586, 100, 5, 2, 3, 1, 4), VrrpState()).setMaxAccess("readonly")
if mibBuilder.loadTexts: vrrpInstanceState.setStatus('current')
if mibBuilder.loadTexts: vrrpInstanceState.setDescription('Current state of this VRRP instance.')
vrrpInstanceInitialState = MibTableColumn((1, 3, 6, 1, 4, 1, 9586, 100, 5, 2, 3, 1, 5), VrrpState()).setMaxAccess("readonly")
if mibBuilder.loadTexts: vrrpInstanceInitialState.setStatus('current')
if mibBuilder.loadTexts: vrrpInstanceInitialState.setDescription('Initial state of this VRRP instance.')
vrrpInstanceWantedState = MibTableColumn((1, 3, 6, 1, 4, 1, 9586, 100, 5, 2, 3, 1, 6), VrrpState()).setMaxAccess("readonly")
if mibBuilder.loadTexts: vrrpInstanceWantedState.setStatus('current')
if mibBuilder.loadTexts: vrrpInstanceWantedState.setDescription('State wanted by the operator for this VRRP instance.')
vrrpInstanceBasePriority = MibTableColumn((1, 3, 6, 1, 4, 1, 9586, 100, 5, 2, 3, 1, 7), Integer32()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: vrrpInstanceBasePriority.setStatus('current')
if mibBuilder.loadTexts: vrrpInstanceBasePriority.setDescription('Base priority (as defined in the configuration file) for this VRRP instance. This value can be modified to force the virtual router instance to become backup or master. ')
vrrpInstanceEffectivePriority = MibTableColumn((1, 3, 6, 1, 4, 1, 9586, 100, 5, 2, 3, 1, 8), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: vrrpInstanceEffectivePriority.setStatus('current')
if mibBuilder.loadTexts: vrrpInstanceEffectivePriority.setDescription('Effective priority for this VRRP instance. Status of interfaces and script results are used to compute this value from the base priority.')
vrrpInstanceVipsStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 9586, 100, 5, 2, 3, 1, 9), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("allSet", 1), ("notAllSet", 2)))).setMaxAccess("readonly")
if mibBuilder.loadTexts: vrrpInstanceVipsStatus.setStatus('current')
if mibBuilder.loadTexts: vrrpInstanceVipsStatus.setDescription('Are all VIP of this VRRP instance enabled?')
vrrpInstancePrimaryInterface = MibTableColumn((1, 3, 6, 1, 4, 1, 9586, 100, 5, 2, 3, 1, 10), DisplayString()).setMaxAccess("readonly")
if mibBuilder.loadTexts: vrrpInstancePrimaryInterface.setStatus('current')
if mibBuilder.loadTexts: vrrpInstancePrimaryInterface.setDescription('Primary interface of this VRRP instance.')
vrrpInstanceTrackPrimaryIf = MibTableColumn((1, 3, 6, 1, 4, 1, 9586, 100, 5, 2, 3, 1, 11), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("tracked", 1), ("notTracked", 2)))).setMaxAccess("readonly")
if mibBuilder.loadTexts: vrrpInstanceTrackPrimaryIf.setStatus('current')
if mibBuilder.loadTexts: vrrpInstanceTrackPrimaryIf.setDescription('Do we track the status of the primary interface?')
vrrpInstanceAdvertisementsInt = MibTableColumn((1, 3, 6, 1, 4, 1, 9586, 100, 5, 2, 3, 1, 12), Unsigned32()).setUnits('seconds').setMaxAccess("readonly")
if mibBuilder.loadTexts: vrrpInstanceAdvertisementsInt.setStatus('current')
if mibBuilder.loadTexts: vrrpInstanceAdvertisementsInt.setDescription('Delay in seconds between two VRRP advertisements.')
vrrpInstancePreempt = MibTableColumn((1, 3, 6, 1, 4, 1, 9586, 100, 5, 2, 3, 1, 13), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("preempt", 1), ("noPreempt", 2)))).setMaxAccess("readwrite")
if mibBuilder.loadTexts: vrrpInstancePreempt.setStatus('current')
if mibBuilder.loadTexts: vrrpInstancePreempt.setDescription('Will a higher priority advertisement preempt a lower instance?')
vrrpInstancePreemptDelay = MibTableColumn((1, 3, 6, 1, 4, 1, 9586, 100, 5, 2, 3, 1, 14), Unsigned32()).setUnits('seconds').setMaxAccess("readonly")
if mibBuilder.loadTexts: vrrpInstancePreemptDelay.setStatus('current')
if mibBuilder.loadTexts: vrrpInstancePreemptDelay.setDescription('Delay after startup until preemption can happen. 0 means that there is no delay.')
vrrpInstanceAuthType = MibTableColumn((1, 3, 6, 1, 4, 1, 9586, 100, 5, 2, 3, 1, 15), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 1, 2))).clone(namedValues=NamedValues(("none", 0), ("password", 1), ("ah", 2)))).setMaxAccess("readonly")
if mibBuilder.loadTexts: vrrpInstanceAuthType.setStatus('current')
if mibBuilder.loadTexts: vrrpInstanceAuthType.setDescription('Authentication method to authenticate other peers.')
vrrpInstanceLvsSyncDaemon = MibTableColumn((1, 3, 6, 1, 4, 1, 9586, 100, 5, 2, 3, 1, 16), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("enabled", 1), ("disabled", 2)))).setMaxAccess("readonly")
if mibBuilder.loadTexts: vrrpInstanceLvsSyncDaemon.setStatus('current')
if mibBuilder.loadTexts: vrrpInstanceLvsSyncDaemon.setDescription('Is LVS sync daemon enabled for this VRRP instance?')
vrrpInstanceLvsSyncInterface = MibTableColumn((1, 3, 6, 1, 4, 1, 9586, 100, 5, 2, 3, 1, 17), DisplayString()).setMaxAccess("readonly")
if mibBuilder.loadTexts: vrrpInstanceLvsSyncInterface.setStatus('current')
if mibBuilder.loadTexts: vrrpInstanceLvsSyncInterface.setDescription('If LVS sync daemon is enabled, which interface to use for syncing?')
vrrpInstanceSyncGroup = MibTableColumn((1, 3, 6, 1, 4, 1, 9586, 100, 5, 2, 3, 1, 18), DisplayString()).setMaxAccess("readonly")
if mibBuilder.loadTexts: vrrpInstanceSyncGroup.setStatus('current')
if mibBuilder.loadTexts: vrrpInstanceSyncGroup.setDescription('Name of the synchronisation group this VRRP instance belongs, if any.')
vrrpInstanceGarpDelay = MibTableColumn((1, 3, 6, 1, 4, 1, 9586, 100, 5, 2, 3, 1, 19), Unsigned32()).setUnits('seconds').setMaxAccess("readonly")
if mibBuilder.loadTexts: vrrpInstanceGarpDelay.setStatus('current')
if mibBuilder.loadTexts: vrrpInstanceGarpDelay.setDescription('Delay to launch gratuitous ARP (GARP).')
vrrpInstanceSmtpAlert = MibTableColumn((1, 3, 6, 1, 4, 1, 9586, 100, 5, 2, 3, 1, 20), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("enabled", 1), ("disabled", 2)))).setMaxAccess("readonly")
if mibBuilder.loadTexts: vrrpInstanceSmtpAlert.setStatus('current')
if mibBuilder.loadTexts: vrrpInstanceSmtpAlert.setDescription('Will SMTP alert be sent for this VRRP instance?')
vrrpInstanceNotifyExec = MibTableColumn((1, 3, 6, 1, 4, 1, 9586, 100, 5, 2, 3, 1, 21), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("enabled", 1), ("disabled", 2)))).setMaxAccess("readonly")
if mibBuilder.loadTexts: vrrpInstanceNotifyExec.setStatus('current')
if mibBuilder.loadTexts: vrrpInstanceNotifyExec.setDescription('Will we execute notification script for this instance?')
vrrpInstanceScriptMaster = MibTableColumn((1, 3, 6, 1, 4, 1, 9586, 100, 5, 2, 3, 1, 22), DisplayString()).setMaxAccess("readonly")
if mibBuilder.loadTexts: vrrpInstanceScriptMaster.setStatus('current')
if mibBuilder.loadTexts: vrrpInstanceScriptMaster.setDescription('Script to execute when the instance becomes master.')
vrrpInstanceScriptBackup = MibTableColumn((1, 3, 6, 1, 4, 1, 9586, 100, 5, 2, 3, 1, 23), DisplayString()).setMaxAccess("readonly")
if mibBuilder.loadTexts: vrrpInstanceScriptBackup.setStatus('current')
if mibBuilder.loadTexts: vrrpInstanceScriptBackup.setDescription('Script to execute when the instance becomes backup.')
vrrpInstanceScriptFault = MibTableColumn((1, 3, 6, 1, 4, 1, 9586, 100, 5, 2, 3, 1, 24), DisplayString()).setMaxAccess("readonly")
if mibBuilder.loadTexts: vrrpInstanceScriptFault.setStatus('current')
if mibBuilder.loadTexts: vrrpInstanceScriptFault.setDescription('Script to execute when the instance is in fault state.')
vrrpInstanceScriptStop = MibTableColumn((1, 3, 6, 1, 4, 1, 9586, 100, 5, 2, 3, 1, 25), DisplayString()).setMaxAccess("readonly")
if mibBuilder.loadTexts: vrrpInstanceScriptStop.setStatus('current')
if mibBuilder.loadTexts: vrrpInstanceScriptStop.setDescription('Script to execute when the instance is stopped.')
vrrpInstanceScript = MibTableColumn((1, 3, 6, 1, 4, 1, 9586, 100, 5, 2, 3, 1, 26), DisplayString()).setMaxAccess("readonly")
if mibBuilder.loadTexts: vrrpInstanceScript.setStatus('current')
if mibBuilder.loadTexts: vrrpInstanceScript.setDescription('Script to execute whenever a state change occurs.')
vrrpTrackedInterfaceTable = MibTable((1, 3, 6, 1, 4, 1, 9586, 100, 5, 2, 4), )
if mibBuilder.loadTexts: vrrpTrackedInterfaceTable.setStatus('current')
if mibBuilder.loadTexts: vrrpTrackedInterfaceTable.setDescription('Table of tracked interfaces for each VRRP instance.')
vrrpTrackedInterfaceEntry = MibTableRow((1, 3, 6, 1, 4, 1, 9586, 100, 5, 2, 4, 1), ).setIndexNames((0, "KEEPALIVED-MIB", "vrrpInstanceIndex"), (0, "IF-MIB", "ifIndex"))
if mibBuilder.loadTexts: vrrpTrackedInterfaceEntry.setStatus('current')
if mibBuilder.loadTexts: vrrpTrackedInterfaceEntry.setDescription('Information describing a tracked interface')
vrrpTrackedInterfaceName = MibTableColumn((1, 3, 6, 1, 4, 1, 9586, 100, 5, 2, 4, 1, 1), DisplayString()).setMaxAccess("readonly")
if mibBuilder.loadTexts: vrrpTrackedInterfaceName.setStatus('current')
if mibBuilder.loadTexts: vrrpTrackedInterfaceName.setDescription('Name of the tracked interface.')
vrrpTrackedInterfaceWeight = MibTableColumn((1, 3, 6, 1, 4, 1, 9586, 100, 5, 2, 4, 1, 2), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: vrrpTrackedInterfaceWeight.setStatus('current')
if mibBuilder.loadTexts: vrrpTrackedInterfaceWeight.setDescription('Weight of the tracked interface.')
vrrpTrackedScriptTable = MibTable((1, 3, 6, 1, 4, 1, 9586, 100, 5, 2, 5), )
if mibBuilder.loadTexts: vrrpTrackedScriptTable.setStatus('current')
if mibBuilder.loadTexts: vrrpTrackedScriptTable.setDescription('Table of tracked interfaces for each VRRP instance.')
vrrpTrackedScriptEntry = MibTableRow((1, 3, 6, 1, 4, 1, 9586, 100, 5, 2, 5, 1), ).setIndexNames((0, "KEEPALIVED-MIB", "vrrpInstanceIndex"), (0, "KEEPALIVED-MIB", "vrrpTrackedScriptIndex"))
if mibBuilder.loadTexts: vrrpTrackedScriptEntry.setStatus('current')
if mibBuilder.loadTexts: vrrpTrackedScriptEntry.setDescription('Information describing a tracked script')
vrrpTrackedScriptIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 9586, 100, 5, 2, 5, 1, 1), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 2147483647)))
if mibBuilder.loadTexts: vrrpTrackedScriptIndex.setStatus('current')
if mibBuilder.loadTexts: vrrpTrackedScriptIndex.setDescription('Index of the tracked script in the set of tracked scripts for the given VRRP instance. This index has no relation with the index of vrrpScriptTable.')
vrrpTrackedScriptName = MibTableColumn((1, 3, 6, 1, 4, 1, 9586, 100, 5, 2, 5, 1, 2), DisplayString()).setMaxAccess("readonly")
if mibBuilder.loadTexts: vrrpTrackedScriptName.setStatus('current')
if mibBuilder.loadTexts: vrrpTrackedScriptName.setDescription('Name of the tracked interface.')
vrrpTrackedScriptWeight = MibTableColumn((1, 3, 6, 1, 4, 1, 9586, 100, 5, 2, 5, 1, 3), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: vrrpTrackedScriptWeight.setStatus('current')
if mibBuilder.loadTexts: vrrpTrackedScriptWeight.setDescription('Weight of the tracked interface.')
vrrpAddressTable = MibTable((1, 3, 6, 1, 4, 1, 9586, 100, 5, 2, 6), )
if mibBuilder.loadTexts: vrrpAddressTable.setStatus('current')
if mibBuilder.loadTexts: vrrpAddressTable.setDescription('Table of static and virtual addresses')
vrrpAddressEntry = MibTableRow((1, 3, 6, 1, 4, 1, 9586, 100, 5, 2, 6, 1), ).setIndexNames((0, "KEEPALIVED-MIB", "vrrpInstanceIndex"), (0, "KEEPALIVED-MIB", "vrrpAddressIndex"))
if mibBuilder.loadTexts: vrrpAddressEntry.setStatus('current')
if mibBuilder.loadTexts: vrrpAddressEntry.setDescription('Information describing an address. This can be a static address or a virtual address. In case of static address, the VRRP instance index is 0.')
vrrpAddressIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 9586, 100, 5, 2, 6, 1, 1), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 2147483647)))
if mibBuilder.loadTexts: vrrpAddressIndex.setStatus('current')
if mibBuilder.loadTexts: vrrpAddressIndex.setDescription('Address index.')
vrrpAddressType = MibTableColumn((1, 3, 6, 1, 4, 1, 9586, 100, 5, 2, 6, 1, 2), InetAddressType()).setMaxAccess("readonly")
if mibBuilder.loadTexts: vrrpAddressType.setStatus('current')
if mibBuilder.loadTexts: vrrpAddressType.setDescription('A value that represents a type of Internet address.')
vrrpAddressValue = MibTableColumn((1, 3, 6, 1, 4, 1, 9586, 100, 5, 2, 6, 1, 3), InetAddress()).setMaxAccess("readonly")
if mibBuilder.loadTexts: vrrpAddressValue.setStatus('current')
if mibBuilder.loadTexts: vrrpAddressValue.setDescription('Actual IP address.')
vrrpAddressBroadcast = MibTableColumn((1, 3, 6, 1, 4, 1, 9586, 100, 5, 2, 6, 1, 4), InetAddress()).setMaxAccess("readonly")
if mibBuilder.loadTexts: vrrpAddressBroadcast.setStatus('current')
if mibBuilder.loadTexts: vrrpAddressBroadcast.setDescription('Broadcast address associated with the IP address.')
vrrpAddressMask = MibTableColumn((1, 3, 6, 1, 4, 1, 9586, 100, 5, 2, 6, 1, 5), InetAddressPrefixLength()).setMaxAccess("readonly")
if mibBuilder.loadTexts: vrrpAddressMask.setStatus('current')
if mibBuilder.loadTexts: vrrpAddressMask.setDescription('Address mask.')
vrrpAddressScope = MibTableColumn((1, 3, 6, 1, 4, 1, 9586, 100, 5, 2, 6, 1, 6), InetScopeType()).setMaxAccess("readonly")
if mibBuilder.loadTexts: vrrpAddressScope.setStatus('current')
if mibBuilder.loadTexts: vrrpAddressScope.setDescription('Address scope.')
vrrpAddressIfIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 9586, 100, 5, 2, 6, 1, 7), InterfaceIndex()).setMaxAccess("readonly")
if mibBuilder.loadTexts: vrrpAddressIfIndex.setStatus('current')
if mibBuilder.loadTexts: vrrpAddressIfIndex.setDescription('Index of the interface to which the IP address is linked to.')
vrrpAddressIfName = MibTableColumn((1, 3, 6, 1, 4, 1, 9586, 100, 5, 2, 6, 1, 8), DisplayString()).setMaxAccess("readonly")
if mibBuilder.loadTexts: vrrpAddressIfName.setStatus('current')
if mibBuilder.loadTexts: vrrpAddressIfName.setDescription('Name of the interface to which the IP address is linked to.')
vrrpAddressIfAlias = MibTableColumn((1, 3, 6, 1, 4, 1, 9586, 100, 5, 2, 6, 1, 9), DisplayString()).setMaxAccess("readonly")
if mibBuilder.loadTexts: vrrpAddressIfAlias.setStatus('current')
if mibBuilder.loadTexts: vrrpAddressIfAlias.setDescription('Alias name of the interface.')
vrrpAddressStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 9586, 100, 5, 2, 6, 1, 10), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("set", 1), ("unset", 2)))).setMaxAccess("readonly")
if mibBuilder.loadTexts: vrrpAddressStatus.setStatus('current')
if mibBuilder.loadTexts: vrrpAddressStatus.setDescription('Is the IP address set?')
vrrpAddressAdvertising = MibTableColumn((1, 3, 6, 1, 4, 1, 9586, 100, 5, 2, 6, 1, 11), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("advertised", 1), ("notAdvertised", 2)))).setMaxAccess("readonly")
if mibBuilder.loadTexts: vrrpAddressAdvertising.setStatus('current')
if mibBuilder.loadTexts: vrrpAddressAdvertising.setDescription('Status of VRRP advertising for this IP address.')
vrrpRouteTable = MibTable((1, 3, 6, 1, 4, 1, 9586, 100, 5, 2, 7), )
if mibBuilder.loadTexts: vrrpRouteTable.setStatus('current')
if mibBuilder.loadTexts: vrrpRouteTable.setDescription('Table of static and virtual routes.')
vrrpRouteEntry = MibTableRow((1, 3, 6, 1, 4, 1, 9586, 100, 5, 2, 7, 1), ).setIndexNames((0, "KEEPALIVED-MIB", "vrrpInstanceIndex"), (0, "KEEPALIVED-MIB", "vrrpRouteIndex"))
if mibBuilder.loadTexts: vrrpRouteEntry.setStatus('current')
if mibBuilder.loadTexts: vrrpRouteEntry.setDescription('Information describing a route. In case of a static route, the instance index is 0.')
vrrpRouteIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 9586, 100, 5, 2, 7, 1, 1), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 2147483647)))
if mibBuilder.loadTexts: vrrpRouteIndex.setStatus('current')
if mibBuilder.loadTexts: vrrpRouteIndex.setDescription('Route index.')
vrrpRouteAddressType = MibTableColumn((1, 3, 6, 1, 4, 1, 9586, 100, 5, 2, 7, 1, 2), InetAddressType()).setMaxAccess("readonly")
if mibBuilder.loadTexts: vrrpRouteAddressType.setStatus('current')
if mibBuilder.loadTexts: vrrpRouteAddressType.setDescription('Route type of internet address.')
vrrpRouteDestination = MibTableColumn((1, 3, 6, 1, 4, 1, 9586, 100, 5, 2, 7, 1, 3), InetAddress()).setMaxAccess("readonly")
if mibBuilder.loadTexts: vrrpRouteDestination.setStatus('current')
if mibBuilder.loadTexts: vrrpRouteDestination.setDescription('Route destination.')
vrrpRouteDestinationMask = MibTableColumn((1, 3, 6, 1, 4, 1, 9586, 100, 5, 2, 7, 1, 4), InetAddressPrefixLength()).setMaxAccess("readonly")
if mibBuilder.loadTexts: vrrpRouteDestinationMask.setStatus('current')
if mibBuilder.loadTexts: vrrpRouteDestinationMask.setDescription('Route destination mask.')
vrrpRouteGateway = MibTableColumn((1, 3, 6, 1, 4, 1, 9586, 100, 5, 2, 7, 1, 5), InetAddress()).setMaxAccess("readonly")
if mibBuilder.loadTexts: vrrpRouteGateway.setStatus('current')
if mibBuilder.loadTexts: vrrpRouteGateway.setDescription('Gateway for the given destination.')
vrrpRouteSecondaryGateway = MibTableColumn((1, 3, 6, 1, 4, 1, 9586, 100, 5, 2, 7, 1, 6), InetAddress()).setMaxAccess("readonly")
if mibBuilder.loadTexts: vrrpRouteSecondaryGateway.setStatus('current')
if mibBuilder.loadTexts: vrrpRouteSecondaryGateway.setDescription('An optional second gateway for the given destination.')
vrrpRouteSource = MibTableColumn((1, 3, 6, 1, 4, 1, 9586, 100, 5, 2, 7, 1, 7), InetAddress()).setMaxAccess("readonly")
if mibBuilder.loadTexts: vrrpRouteSource.setStatus('current')
if mibBuilder.loadTexts: vrrpRouteSource.setDescription('Which source IP address to use with this route.')
vrrpRouteMetric = MibTableColumn((1, 3, 6, 1, 4, 1, 9586, 100, 5, 2, 7, 1, 8), Unsigned32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: vrrpRouteMetric.setStatus('current')
if mibBuilder.loadTexts: vrrpRouteMetric.setDescription('Metric of this route.')
vrrpRouteScope = MibTableColumn((1, 3, 6, 1, 4, 1, 9586, 100, 5, 2, 7, 1, 9), InetScopeType()).setMaxAccess("readonly")
if mibBuilder.loadTexts: vrrpRouteScope.setStatus('current')
if mibBuilder.loadTexts: vrrpRouteScope.setDescription('Scope of this route.')
vrrpRouteType = MibTableColumn((1, 3, 6, 1, 4, 1, 9586, 100, 5, 2, 7, 1, 10), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3))).clone(namedValues=NamedValues(("normal", 1), ("ecmp", 2), ("blackhole", 3)))).setMaxAccess("readonly")
if mibBuilder.loadTexts: vrrpRouteType.setStatus('current')
if mibBuilder.loadTexts: vrrpRouteType.setDescription('Kind of route.')
vrrpRouteIfIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 9586, 100, 5, 2, 7, 1, 11), InterfaceIndex()).setMaxAccess("readonly")
if mibBuilder.loadTexts: vrrpRouteIfIndex.setStatus('current')
if mibBuilder.loadTexts: vrrpRouteIfIndex.setDescription('Interface attached to this route.')
vrrpRouteIfName = MibTableColumn((1, 3, 6, 1, 4, 1, 9586, 100, 5, 2, 7, 1, 12), DisplayString()).setMaxAccess("readonly")
if mibBuilder.loadTexts: vrrpRouteIfName.setStatus('current')
if mibBuilder.loadTexts: vrrpRouteIfName.setDescription('Name of the interface of attached to this route.')
vrrpRouteRoutingTable = MibTableColumn((1, 3, 6, 1, 4, 1, 9586, 100, 5, 2, 7, 1, 13), Unsigned32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: vrrpRouteRoutingTable.setStatus('current')
if mibBuilder.loadTexts: vrrpRouteRoutingTable.setDescription('Routing table where to route should be inserted.')
vrrpRouteStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 9586, 100, 5, 2, 7, 1, 14), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("set", 1), ("unset", 2)))).setMaxAccess("readonly")
if mibBuilder.loadTexts: vrrpRouteStatus.setStatus('current')
if mibBuilder.loadTexts: vrrpRouteStatus.setDescription('Is this route set in the kernel?')
vrrpScriptTable = MibTable((1, 3, 6, 1, 4, 1, 9586, 100, 5, 2, 8), )
if mibBuilder.loadTexts: vrrpScriptTable.setStatus('current')
if mibBuilder.loadTexts: vrrpScriptTable.setDescription('Table of VRRP scripts')
vrrpScriptEntry = MibTableRow((1, 3, 6, 1, 4, 1, 9586, 100, 5, 2, 8, 1), ).setIndexNames((0, "KEEPALIVED-MIB", "vrrpScriptIndex"))
if mibBuilder.loadTexts: vrrpScriptEntry.setStatus('current')
if mibBuilder.loadTexts: vrrpScriptEntry.setDescription('Information describing a VRRP script')
vrrpScriptIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 9586, 100, 5, 2, 8, 1, 1), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 2147483647)))
if mibBuilder.loadTexts: vrrpScriptIndex.setStatus('current')
if mibBuilder.loadTexts: vrrpScriptIndex.setDescription('Script index.')
vrrpScriptName = MibTableColumn((1, 3, 6, 1, 4, 1, 9586, 100, 5, 2, 8, 1, 2), DisplayString()).setMaxAccess("readonly")
if mibBuilder.loadTexts: vrrpScriptName.setStatus('current')
if mibBuilder.loadTexts: vrrpScriptName.setDescription('Symbolic name of the script.')
vrrpScriptCommand = MibTableColumn((1, 3, 6, 1, 4, 1, 9586, 100, 5, 2, 8, 1, 3), DisplayString()).setMaxAccess("readonly")
if mibBuilder.loadTexts: vrrpScriptCommand.setStatus('current')
if mibBuilder.loadTexts: vrrpScriptCommand.setDescription('Command executed when running the script.')
vrrpScriptInterval = MibTableColumn((1, 3, 6, 1, 4, 1, 9586, 100, 5, 2, 8, 1, 4), Integer32()).setUnits('seconds').setMaxAccess("readonly")
if mibBuilder.loadTexts: vrrpScriptInterval.setStatus('current')
if mibBuilder.loadTexts: vrrpScriptInterval.setDescription('Interval between two runs of the script.')
vrrpScriptWeight = MibTableColumn((1, 3, 6, 1, 4, 1, 9586, 100, 5, 2, 8, 1, 5), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: vrrpScriptWeight.setStatus('current')
if mibBuilder.loadTexts: vrrpScriptWeight.setDescription('Weight of the script if successful.')
vrrpScriptResult = MibTableColumn((1, 3, 6, 1, 4, 1, 9586, 100, 5, 2, 8, 1, 6), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 1, 2, 3, 4))).clone(namedValues=NamedValues(("disabled", 0), ("init", 1), ("bad", 2), ("good", 3), ("initgood", 4)))).setMaxAccess("readonly")
if mibBuilder.loadTexts: vrrpScriptResult.setStatus('current')
if mibBuilder.loadTexts: vrrpScriptResult.setDescription('Current status of the script.')
vrrpScriptRise = MibTableColumn((1, 3, 6, 1, 4, 1, 9586, 100, 5, 2, 8, 1, 7), Unsigned32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: vrrpScriptRise.setStatus('current')
if mibBuilder.loadTexts: vrrpScriptRise.setDescription('How many times the script should succeed before OK.')
vrrpScriptFall = MibTableColumn((1, 3, 6, 1, 4, 1, 9586, 100, 5, 2, 8, 1, 8), Unsigned32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: vrrpScriptFall.setStatus('current')
if mibBuilder.loadTexts: vrrpScriptFall.setDescription('How many times the script should fail before KO.')
vrrpTrap = MibIdentifier((1, 3, 6, 1, 4, 1, 9586, 100, 5, 2, 9))
vrrpTraps = MibIdentifier((1, 3, 6, 1, 4, 1, 9586, 100, 5, 2, 9, 0))
vrrpTrapControl = MibIdentifier((1, 3, 6, 1, 4, 1, 9586, 100, 5, 2, 9, 1))
vrrpSyncGroupStateChange = NotificationType((1, 3, 6, 1, 4, 1, 9586, 100, 5, 2, 9, 0, 1)).setObjects(("KEEPALIVED-MIB", "vrrpSyncGroupName"), ("KEEPALIVED-MIB", "vrrpSyncGroupState"))
if mibBuilder.loadTexts: vrrpSyncGroupStateChange.setStatus('current')
if mibBuilder.loadTexts: vrrpSyncGroupStateChange.setDescription('This trap signifies that the state of the whole vrrp sync group changed.')
vrrpInstanceStateChange = NotificationType((1, 3, 6, 1, 4, 1, 9586, 100, 5, 2, 9, 0, 2)).setObjects(("KEEPALIVED-MIB", "vrrpInstanceName"), ("KEEPALIVED-MIB", "vrrpInstanceState"), ("KEEPALIVED-MIB", "vrrpInstanceInitialState"))
if mibBuilder.loadTexts: vrrpInstanceStateChange.setStatus('current')
if mibBuilder.loadTexts: vrrpInstanceStateChange.setDescription('This trap signifies that the state of a vrrp instance changed.')
virtualServerGroupTable = MibTable((1, 3, 6, 1, 4, 1, 9586, 100, 5, 3, 1), )
if mibBuilder.loadTexts: virtualServerGroupTable.setStatus('current')
if mibBuilder.loadTexts: virtualServerGroupTable.setDescription('Table of virtual server groups.')
virtualServerGroupEntry = MibTableRow((1, 3, 6, 1, 4, 1, 9586, 100, 5, 3, 1, 1), ).setIndexNames((0, "KEEPALIVED-MIB", "virtualServerGroupIndex"))
if mibBuilder.loadTexts: virtualServerGroupEntry.setStatus('current')
if mibBuilder.loadTexts: virtualServerGroupEntry.setDescription('Information describing a virtual server group.')
virtualServerGroupIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 9586, 100, 5, 3, 1, 1, 1), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 2147483647)))
if mibBuilder.loadTexts: virtualServerGroupIndex.setStatus('current')
if mibBuilder.loadTexts: virtualServerGroupIndex.setDescription('Index of the virtual server group.')
virtualServerGroupName = MibTableColumn((1, 3, 6, 1, 4, 1, 9586, 100, 5, 3, 1, 1, 2), DisplayString()).setMaxAccess("readonly")
if mibBuilder.loadTexts: virtualServerGroupName.setStatus('current')
if mibBuilder.loadTexts: virtualServerGroupName.setDescription('Name of the virtual server group.')
virtualServerGroupMemberTable = MibTable((1, 3, 6, 1, 4, 1, 9586, 100, 5, 3, 2), )
if mibBuilder.loadTexts: virtualServerGroupMemberTable.setStatus('current')
if mibBuilder.loadTexts: virtualServerGroupMemberTable.setDescription('Table of members of a virtual server group.')
virtualServerGroupMemberEntry = MibTableRow((1, 3, 6, 1, 4, 1, 9586, 100, 5, 3, 2, 1), ).setIndexNames((0, "KEEPALIVED-MIB", "virtualServerGroupIndex"), (0, "KEEPALIVED-MIB", "virtualServerGroupMemberIndex"))
if mibBuilder.loadTexts: virtualServerGroupMemberEntry.setStatus('current')
if mibBuilder.loadTexts: virtualServerGroupMemberEntry.setDescription('Description of a member of a virtual server group.')
virtualServerGroupMemberIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 9586, 100, 5, 3, 2, 1, 1), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 2147483647)))
if mibBuilder.loadTexts: virtualServerGroupMemberIndex.setStatus('current')
if mibBuilder.loadTexts: virtualServerGroupMemberIndex.setDescription('Index of the member into virtual server group.')
virtualServerGroupMemberType = MibTableColumn((1, 3, 6, 1, 4, 1, 9586, 100, 5, 3, 2, 1, 2), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3))).clone(namedValues=NamedValues(("fwmark", 1), ("ip", 2), ("iprange", 3)))).setMaxAccess("readonly")
if mibBuilder.loadTexts: virtualServerGroupMemberType.setStatus('current')
if mibBuilder.loadTexts: virtualServerGroupMemberType.setDescription('Kind of entry: firewall mark, address with port or range of addresses with port.')
virtualServerGroupMemberFwMark = MibTableColumn((1, 3, 6, 1, 4, 1, 9586, 100, 5, 3, 2, 1, 3), Unsigned32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: virtualServerGroupMemberFwMark.setStatus('current')
if mibBuilder.loadTexts: virtualServerGroupMemberFwMark.setDescription('Firewall mark for this member. If the kind of this member is not fwmark(1), then this entry should not exist for the current row.')
virtualServerGroupMemberAddrType = MibTableColumn((1, 3, 6, 1, 4, 1, 9586, 100, 5, 3, 2, 1, 4), InetAddressType()).setMaxAccess("readonly")
if mibBuilder.loadTexts: virtualServerGroupMemberAddrType.setStatus('current')
if mibBuilder.loadTexts: virtualServerGroupMemberAddrType.setDescription('Type of IP address for this member. If the kind of this member is neither address(2) or range(3), then this entry should not exist for the current row.')
virtualServerGroupMemberAddress = MibTableColumn((1, 3, 6, 1, 4, 1, 9586, 100, 5, 3, 2, 1, 5), InetAddress()).setMaxAccess("readonly")
if mibBuilder.loadTexts: virtualServerGroupMemberAddress.setStatus('current')
if mibBuilder.loadTexts: virtualServerGroupMemberAddress.setDescription('IP address of this member. If the kind of this member is not address(2), then this entry should not exist for the current row.')
virtualServerGroupMemberAddr1 = MibTableColumn((1, 3, 6, 1, 4, 1, 9586, 100, 5, 3, 2, 1, 6), InetAddress()).setMaxAccess("readonly")
if mibBuilder.loadTexts: virtualServerGroupMemberAddr1.setStatus('current')
if mibBuilder.loadTexts: virtualServerGroupMemberAddr1.setDescription('First IP address of the range for this member. If the kind of this member is not range(3), then this entry should not exist for the current row.')
virtualServerGroupMemberAddr2 = MibTableColumn((1, 3, 6, 1, 4, 1, 9586, 100, 5, 3, 2, 1, 7), InetAddress()).setMaxAccess("readonly")
if mibBuilder.loadTexts: virtualServerGroupMemberAddr2.setStatus('current')
if mibBuilder.loadTexts: virtualServerGroupMemberAddr2.setDescription('Second IP address of the range for this member. If the kind of this member is not range(3), then this entry should not exist for the current row.')
virtualServerGroupMemberPort = MibTableColumn((1, 3, 6, 1, 4, 1, 9586, 100, 5, 3, 2, 1, 8), InetPortNumber()).setMaxAccess("readonly")
if mibBuilder.loadTexts: virtualServerGroupMemberPort.setStatus('current')
if mibBuilder.loadTexts: virtualServerGroupMemberPort.setDescription('V port for this member. If the kind of this member is neither address(2) nor range(3), then this entry should not exist for the current row.')
virtualServerTable = MibTable((1, 3, 6, 1, 4, 1, 9586, 100, 5, 3, 3), )
if mibBuilder.loadTexts: virtualServerTable.setStatus('current')
if mibBuilder.loadTexts: virtualServerTable.setDescription('Table of virtual servers.')
virtualServerEntry = MibTableRow((1, 3, 6, 1, 4, 1, 9586, 100, 5, 3, 3, 1), ).setIndexNames((0, "KEEPALIVED-MIB", "virtualServerIndex"))
if mibBuilder.loadTexts: virtualServerEntry.setStatus('current')
if mibBuilder.loadTexts: virtualServerEntry.setDescription('Information describing a virtual server.')
virtualServerIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 9586, 100, 5, 3, 3, 1, 1), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 2147483647)))
if mibBuilder.loadTexts: virtualServerIndex.setStatus('current')
if mibBuilder.loadTexts: virtualServerIndex.setDescription('Index of the virtual server.')
virtualServerType = MibTableColumn((1, 3, 6, 1, 4, 1, 9586, 100, 5, 3, 3, 1, 2), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3))).clone(namedValues=NamedValues(("fwmark", 1), ("ip", 2), ("group", 3)))).setMaxAccess("readonly")
if mibBuilder.loadTexts: virtualServerType.setStatus('current')
if mibBuilder.loadTexts: virtualServerType.setDescription('Type of virtual server. A virtual server can either be defined from a firewall mark, an IP and a port or from a virtual server group.')
virtualServerNameOfGroup = MibTableColumn((1, 3, 6, 1, 4, 1, 9586, 100, 5, 3, 3, 1, 3), DisplayString()).setMaxAccess("readonly")
if mibBuilder.loadTexts: virtualServerNameOfGroup.setStatus('current')
if mibBuilder.loadTexts: virtualServerNameOfGroup.setDescription('If the virtual is defined from a group, this is the name of the group.')
virtualServerFwMark = MibTableColumn((1, 3, 6, 1, 4, 1, 9586, 100, 5, 3, 3, 1, 4), Unsigned32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: virtualServerFwMark.setStatus('current')
if mibBuilder.loadTexts: virtualServerFwMark.setDescription('If the virtual server is defined from a firewall mark, this is the value of the mark. Otherwise, this column should not exist in the current row.')
virtualServerAddrType = MibTableColumn((1, 3, 6, 1, 4, 1, 9586, 100, 5, 3, 3, 1, 5), InetAddressType()).setMaxAccess("readonly")
if mibBuilder.loadTexts: virtualServerAddrType.setStatus('current')
if mibBuilder.loadTexts: virtualServerAddrType.setDescription('If the virtual server is defined from an IP, this is the address family. Otherwise, this column should not exist in the current row.')
virtualServerAddress = MibTableColumn((1, 3, 6, 1, 4, 1, 9586, 100, 5, 3, 3, 1, 6), InetAddress()).setMaxAccess("readonly")
if mibBuilder.loadTexts: virtualServerAddress.setStatus('current')
if mibBuilder.loadTexts: virtualServerAddress.setDescription('If the virtual server is defined from an IP address, this is the value of the IP. Otherwise, this column should not exist in the current row.')
virtualServerPort = MibTableColumn((1, 3, 6, 1, 4, 1, 9586, 100, 5, 3, 3, 1, 7), InetPortNumber()).setMaxAccess("readonly")
if mibBuilder.loadTexts: virtualServerPort.setStatus('current')
if mibBuilder.loadTexts: virtualServerPort.setDescription('If the virtual server is defined from an IP, this is the value of the port to listen for requests. Otherwise, this column should not exist in the current row.')
virtualServerProtocol = MibTableColumn((1, 3, 6, 1, 4, 1, 9586, 100, 5, 3, 3, 1, 8), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("tcp", 1), ("udp", 2)))).setMaxAccess("readonly")
if mibBuilder.loadTexts: virtualServerProtocol.setStatus('current')
if mibBuilder.loadTexts: virtualServerProtocol.setDescription('Which transport protocol should be used for this virtual server.')
virtualServerLoadBalancingAlgo = MibTableColumn((1, 3, 6, 1, 4, 1, 9586, 100, 5, 3, 3, 1, 9), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 99))).clone(namedValues=NamedValues(("rr", 1), ("wrr", 2), ("lc", 3), ("wlc", 4), ("lblc", 5), ("lblcr", 6), ("dh", 7), ("sh", 8), ("sed", 9), ("nq", 10), ("unknown", 99)))).setMaxAccess("readonly")
if mibBuilder.loadTexts: virtualServerLoadBalancingAlgo.setStatus('current')
if mibBuilder.loadTexts: virtualServerLoadBalancingAlgo.setDescription('Which load balancing algorithm (or scheduler) should be used for this virtual server.')
virtualServerLoadBalancingKind = MibTableColumn((1, 3, 6, 1, 4, 1, 9586, 100, 5, 3, 3, 1, 10), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3))).clone(namedValues=NamedValues(("nat", 1), ("dr", 2), ("tun", 3)))).setMaxAccess("readonly")
if mibBuilder.loadTexts: virtualServerLoadBalancingKind.setStatus('current')
if mibBuilder.loadTexts: virtualServerLoadBalancingKind.setDescription('Forwarding method to use for this virtual server.')
virtualServerStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 9586, 100, 5, 3, 3, 1, 11), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("alive", 1), ("dead", 2)))).setMaxAccess("readonly")
if mibBuilder.loadTexts: virtualServerStatus.setStatus('current')
if mibBuilder.loadTexts: virtualServerStatus.setDescription('Current status of this virtual server.')
virtualServerVirtualHost = MibTableColumn((1, 3, 6, 1, 4, 1, 9586, 100, 5, 3, 3, 1, 12), DisplayString()).setMaxAccess("readonly")
if mibBuilder.loadTexts: virtualServerVirtualHost.setStatus('current')
if mibBuilder.loadTexts: virtualServerVirtualHost.setDescription('Virtualhost of this server for HTTP like requests.')
virtualServerPersist = MibTableColumn((1, 3, 6, 1, 4, 1, 9586, 100, 5, 3, 3, 1, 13), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("enabled", 1), ("disabled", 2)))).setMaxAccess("readonly")
if mibBuilder.loadTexts: virtualServerPersist.setStatus('current')
if mibBuilder.loadTexts: virtualServerPersist.setDescription('Is the virtual service persistence enabled?')
virtualServerPersistTimeout = MibTableColumn((1, 3, 6, 1, 4, 1, 9586, 100, 5, 3, 3, 1, 14), Unsigned32()).setUnits('seconds').setMaxAccess("readonly")
if mibBuilder.loadTexts: virtualServerPersistTimeout.setStatus('current')
if mibBuilder.loadTexts: virtualServerPersistTimeout.setDescription('If this virtual service is persistence, what is the timeout.')
virtualServerPersistGranularity = MibTableColumn((1, 3, 6, 1, 4, 1, 9586, 100, 5, 3, 3, 1, 15), InetAddress()).setMaxAccess("readonly")
if mibBuilder.loadTexts: virtualServerPersistGranularity.setStatus('current')
if mibBuilder.loadTexts: virtualServerPersistGranularity.setDescription('Netmask specifying the granularity of the persistence mechanism.')
virtualServerDelayLoop = MibTableColumn((1, 3, 6, 1, 4, 1, 9586, 100, 5, 3, 3, 1, 16), Unsigned32()).setUnits('seconds').setMaxAccess("readonly")
if mibBuilder.loadTexts: virtualServerDelayLoop.setStatus('current')
if mibBuilder.loadTexts: virtualServerDelayLoop.setDescription('Delay in seconds between two checks.')
virtualServerHaSuspend = MibTableColumn((1, 3, 6, 1, 4, 1, 9586, 100, 5, 3, 3, 1, 17), TruthValue()).setMaxAccess("readonly")
if mibBuilder.loadTexts: virtualServerHaSuspend.setStatus('current')
if mibBuilder.loadTexts: virtualServerHaSuspend.setDescription('If set to true(1), checks will be suspended if the IP of the virtual server is currently not set.')
virtualServerAlpha = MibTableColumn((1, 3, 6, 1, 4, 1, 9586, 100, 5, 3, 3, 1, 18), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("enabled", 1), ("disabled", 2)))).setMaxAccess("readonly")
if mibBuilder.loadTexts: virtualServerAlpha.setStatus('current')
if mibBuilder.loadTexts: virtualServerAlpha.setDescription('Is alpha mode enabled?')
virtualServerOmega = MibTableColumn((1, 3, 6, 1, 4, 1, 9586, 100, 5, 3, 3, 1, 19), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("enabled", 1), ("disabled", 2)))).setMaxAccess("readonly")
if mibBuilder.loadTexts: virtualServerOmega.setStatus('current')
if mibBuilder.loadTexts: virtualServerOmega.setDescription('Is omega mode enabled?')
virtualServerRealServersTotal = MibTableColumn((1, 3, 6, 1, 4, 1, 9586, 100, 5, 3, 3, 1, 20), Unsigned32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: virtualServerRealServersTotal.setStatus('current')
if mibBuilder.loadTexts: virtualServerRealServersTotal.setDescription('Total number of real servers for this virtual server.')
virtualServerRealServersUp = MibTableColumn((1, 3, 6, 1, 4, 1, 9586, 100, 5, 3, 3, 1, 21), Unsigned32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: virtualServerRealServersUp.setStatus('current')
if mibBuilder.loadTexts: virtualServerRealServersUp.setDescription('Real servers actually up for this virtual server.')
virtualServerQuorum = MibTableColumn((1, 3, 6, 1, 4, 1, 9586, 100, 5, 3, 3, 1, 22), Unsigned32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: virtualServerQuorum.setStatus('current')
if mibBuilder.loadTexts: virtualServerQuorum.setDescription('Quorum to get amond real servers to consider this virtual server up.')
virtualServerQuorumStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 9586, 100, 5, 3, 3, 1, 23), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("met", 1), ("notMet", 2)))).setMaxAccess("readonly")
if mibBuilder.loadTexts: virtualServerQuorumStatus.setStatus('current')
if mibBuilder.loadTexts: virtualServerQuorumStatus.setDescription('Current status of the quorum for this virtual server.')
virtualServerQuorumUp = MibTableColumn((1, 3, 6, 1, 4, 1, 9586, 100, 5, 3, 3, 1, 24), DisplayString()).setMaxAccess("readonly")
if mibBuilder.loadTexts: virtualServerQuorumUp.setStatus('current')
if mibBuilder.loadTexts: virtualServerQuorumUp.setDescription('Command to execute when the quorum is met.')
virtualServerQuorumDown = MibTableColumn((1, 3, 6, 1, 4, 1, 9586, 100, 5, 3, 3, 1, 25), DisplayString()).setMaxAccess("readonly")
if mibBuilder.loadTexts: virtualServerQuorumDown.setStatus('current')
if mibBuilder.loadTexts: virtualServerQuorumDown.setDescription('Command to execute when the quorum is not met.')
virtualServerHysteresis = MibTableColumn((1, 3, 6, 1, 4, 1, 9586, 100, 5, 3, 3, 1, 26), Unsigned32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: virtualServerHysteresis.setStatus('current')
if mibBuilder.loadTexts: virtualServerHysteresis.setDescription('Hysteresis with respect to quorum count.')
virtualServerStatsConns = MibTableColumn((1, 3, 6, 1, 4, 1, 9586, 100, 5, 3, 3, 1, 27), Gauge32()).setUnits('connections').setMaxAccess("readonly")
if mibBuilder.loadTexts: virtualServerStatsConns.setStatus('current')
if mibBuilder.loadTexts: virtualServerStatsConns.setDescription('Total number of connections scheduled for this virtual server.')
virtualServerStatsInPkts = MibTableColumn((1, 3, 6, 1, 4, 1, 9586, 100, 5, 3, 3, 1, 28), Counter32()).setUnits('packets').setMaxAccess("readonly")
if mibBuilder.loadTexts: virtualServerStatsInPkts.setStatus('current')
if mibBuilder.loadTexts: virtualServerStatsInPkts.setDescription('Total number of incoming packets for this virtual server.')
virtualServerStatsOutPkts = MibTableColumn((1, 3, 6, 1, 4, 1, 9586, 100, 5, 3, 3, 1, 29), Counter32()).setUnits('packets').setMaxAccess("readonly")
if mibBuilder.loadTexts: virtualServerStatsOutPkts.setStatus('current')
if mibBuilder.loadTexts: virtualServerStatsOutPkts.setDescription('Total number of outgoing packets for this virtual server.')
virtualServerStatsInBytes = MibTableColumn((1, 3, 6, 1, 4, 1, 9586, 100, 5, 3, 3, 1, 30), Counter64()).setUnits('bytes').setMaxAccess("readonly")
if mibBuilder.loadTexts: virtualServerStatsInBytes.setStatus('current')
if mibBuilder.loadTexts: virtualServerStatsInBytes.setDescription('Total number of incoming bytes for this virtual server.')
virtualServerStatsOutBytes = MibTableColumn((1, 3, 6, 1, 4, 1, 9586, 100, 5, 3, 3, 1, 31), Counter64()).setUnits('bytes').setMaxAccess("readonly")
if mibBuilder.loadTexts: virtualServerStatsOutBytes.setStatus('current')
if mibBuilder.loadTexts: virtualServerStatsOutBytes.setDescription('Total number of outgoing bytes for this virtual server.')
virtualServerRateCps = MibTableColumn((1, 3, 6, 1, 4, 1, 9586, 100, 5, 3, 3, 1, 32), Gauge32()).setUnits('connections/s').setMaxAccess("readonly")
if mibBuilder.loadTexts: virtualServerRateCps.setStatus('current')
if mibBuilder.loadTexts: virtualServerRateCps.setDescription('Current connection rate for this virtual server.')
virtualServerRateInPPS = MibTableColumn((1, 3, 6, 1, 4, 1, 9586, 100, 5, 3, 3, 1, 33), Gauge32()).setUnits('packets/s').setMaxAccess("readonly")
if mibBuilder.loadTexts: virtualServerRateInPPS.setStatus('current')
if mibBuilder.loadTexts: virtualServerRateInPPS.setDescription('Current in packet rate for this virtual server.')
virtualServerRateOutPPS = MibTableColumn((1, 3, 6, 1, 4, 1, 9586, 100, 5, 3, 3, 1, 34), Gauge32()).setUnits('packets/s').setMaxAccess("readonly")
if mibBuilder.loadTexts: virtualServerRateOutPPS.setStatus('current')
if mibBuilder.loadTexts: virtualServerRateOutPPS.setDescription('Current out packet rate for this virtual server.')
virtualServerRateInBPS = MibTableColumn((1, 3, 6, 1, 4, 1, 9586, 100, 5, 3, 3, 1, 35), Gauge32()).setUnits('bytes/s').setMaxAccess("readonly")
if mibBuilder.loadTexts: virtualServerRateInBPS.setStatus('current')
if mibBuilder.loadTexts: virtualServerRateInBPS.setDescription('Current incoming rate for this virtual server.')
virtualServerRateOutBPS = MibTableColumn((1, 3, 6, 1, 4, 1, 9586, 100, 5, 3, 3, 1, 36), Gauge32()).setUnits('bytes/s').setMaxAccess("readonly")
if mibBuilder.loadTexts: virtualServerRateOutBPS.setStatus('current')
if mibBuilder.loadTexts: virtualServerRateOutBPS.setDescription('Current outgoing rate for this virtual server.')
realServerTable = MibTable((1, 3, 6, 1, 4, 1, 9586, 100, 5, 3, 4), )
if mibBuilder.loadTexts: realServerTable.setStatus('current')
if mibBuilder.loadTexts: realServerTable.setDescription('Table of real servers. This includes regular real servers and sorry servers.')
realServerEntry = MibTableRow((1, 3, 6, 1, 4, 1, 9586, 100, 5, 3, 4, 1), ).setIndexNames((0, "KEEPALIVED-MIB", "virtualServerIndex"), (0, "KEEPALIVED-MIB", "realServerIndex"))
if mibBuilder.loadTexts: realServerEntry.setStatus('current')
if mibBuilder.loadTexts: realServerEntry.setDescription('Information describing a real server.')
realServerIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 9586, 100, 5, 3, 4, 1, 1), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 2147483647)))
if mibBuilder.loadTexts: realServerIndex.setStatus('current')
if mibBuilder.loadTexts: realServerIndex.setDescription('Index of the real server.')
realServerType = MibTableColumn((1, 3, 6, 1, 4, 1, 9586, 100, 5, 3, 4, 1, 2), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("regular", 1), ("sorry", 2)))).setMaxAccess("readonly")
if mibBuilder.loadTexts: realServerType.setStatus('current')
if mibBuilder.loadTexts: realServerType.setDescription('Type of real server: either a regular real server or a sorry server.')
realServerAddrType = MibTableColumn((1, 3, 6, 1, 4, 1, 9586, 100, 5, 3, 4, 1, 3), InetAddressType()).setMaxAccess("readonly")
if mibBuilder.loadTexts: realServerAddrType.setStatus('current')
if mibBuilder.loadTexts: realServerAddrType.setDescription('Address family for this real server.')
realServerAddress = MibTableColumn((1, 3, 6, 1, 4, 1, 9586, 100, 5, 3, 4, 1, 4), InetAddress()).setMaxAccess("readonly")
if mibBuilder.loadTexts: realServerAddress.setStatus('current')
if mibBuilder.loadTexts: realServerAddress.setDescription('IP address of this real server.')
realServerPort = MibTableColumn((1, 3, 6, 1, 4, 1, 9586, 100, 5, 3, 4, 1, 5), InetPortNumber()).setMaxAccess("readonly")
if mibBuilder.loadTexts: realServerPort.setStatus('current')
if mibBuilder.loadTexts: realServerPort.setDescription('Port of the service.')
realServerStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 9586, 100, 5, 3, 4, 1, 6), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("alive", 1), ("dead", 2)))).setMaxAccess("readonly")
if mibBuilder.loadTexts: realServerStatus.setStatus('current')
if mibBuilder.loadTexts: realServerStatus.setDescription('Status of this real server.')
realServerWeight = MibTableColumn((1, 3, 6, 1, 4, 1, 9586, 100, 5, 3, 4, 1, 7), Integer32()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: realServerWeight.setStatus('current')
if mibBuilder.loadTexts: realServerWeight.setDescription('Weight of this real server. This value can be set to 0 to disable the real server.')
realServerUpperConnectionLimit = MibTableColumn((1, 3, 6, 1, 4, 1, 9586, 100, 5, 3, 4, 1, 8), Unsigned32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: realServerUpperConnectionLimit.setStatus('current')
if mibBuilder.loadTexts: realServerUpperConnectionLimit.setDescription('Maximum number of connections for this real server.')
realServerLowerConnectionLimit = MibTableColumn((1, 3, 6, 1, 4, 1, 9586, 100, 5, 3, 4, 1, 9), Unsigned32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: realServerLowerConnectionLimit.setStatus('current')
if mibBuilder.loadTexts: realServerLowerConnectionLimit.setDescription('Minimum number of connections for this real server.')
realServerActionWhenDown = MibTableColumn((1, 3, 6, 1, 4, 1, 9586, 100, 5, 3, 4, 1, 10), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("remove", 1), ("inhibit", 2)))).setMaxAccess("readonly")
if mibBuilder.loadTexts: realServerActionWhenDown.setStatus('current')
if mibBuilder.loadTexts: realServerActionWhenDown.setDescription('What action is performed when this server is down. Its weight can be set to 0 (inhibit) or it can be removed from the pool.')
realServerNotifyUp = MibTableColumn((1, 3, 6, 1, 4, 1, 9586, 100, 5, 3, 4, 1, 11), DisplayString()).setMaxAccess("readonly")
if mibBuilder.loadTexts: realServerNotifyUp.setStatus('current')
if mibBuilder.loadTexts: realServerNotifyUp.setDescription('Command to execute when this server becomes alive.')
realServerNotifyDown = MibTableColumn((1, 3, 6, 1, 4, 1, 9586, 100, 5, 3, 4, 1, 12), DisplayString()).setMaxAccess("readonly")
if mibBuilder.loadTexts: realServerNotifyDown.setStatus('current')
if mibBuilder.loadTexts: realServerNotifyDown.setDescription('Command to execute when this server becomes dead.')
realServerFailedChecks = MibTableColumn((1, 3, 6, 1, 4, 1, 9586, 100, 5, 3, 4, 1, 13), Unsigned32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: realServerFailedChecks.setStatus('current')
if mibBuilder.loadTexts: realServerFailedChecks.setDescription('How many failed checks for this real server.')
realServerStatsConns = MibTableColumn((1, 3, 6, 1, 4, 1, 9586, 100, 5, 3, 4, 1, 14), Gauge32()).setUnits('connections').setMaxAccess("readonly")
if mibBuilder.loadTexts: realServerStatsConns.setStatus('current')
if mibBuilder.loadTexts: realServerStatsConns.setDescription('Total number of connections scheduled for this real server.')
realServerStatsActiveConns = MibTableColumn((1, 3, 6, 1, 4, 1, 9586, 100, 5, 3, 4, 1, 15), Gauge32()).setUnits('connections').setMaxAccess("readonly")
if mibBuilder.loadTexts: realServerStatsActiveConns.setStatus('current')
if mibBuilder.loadTexts: realServerStatsActiveConns.setDescription('Current active connections for this real server.')
realServerStatsInactiveConns = MibTableColumn((1, 3, 6, 1, 4, 1, 9586, 100, 5, 3, 4, 1, 16), Gauge32()).setUnits('connections').setMaxAccess("readonly")
if mibBuilder.loadTexts: realServerStatsInactiveConns.setStatus('current')
if mibBuilder.loadTexts: realServerStatsInactiveConns.setDescription('Current inactive connections for this real server.')
realServerStatsPersistentConns = MibTableColumn((1, 3, 6, 1, 4, 1, 9586, 100, 5, 3, 4, 1, 17), Gauge32()).setUnits('connections').setMaxAccess("readonly")
if mibBuilder.loadTexts: realServerStatsPersistentConns.setStatus('current')
if mibBuilder.loadTexts: realServerStatsPersistentConns.setDescription('Current persistent connections for this real server.')
realServerStatsInPkts = MibTableColumn((1, 3, 6, 1, 4, 1, 9586, 100, 5, 3, 4, 1, 18), Counter32()).setUnits('packets').setMaxAccess("readonly")
if mibBuilder.loadTexts: realServerStatsInPkts.setStatus('current')
if mibBuilder.loadTexts: realServerStatsInPkts.setDescription('Total number of incoming packets for this real server.')
realServerStatsOutPkts = MibTableColumn((1, 3, 6, 1, 4, 1, 9586, 100, 5, 3, 4, 1, 19), Counter32()).setUnits('packets').setMaxAccess("readonly")
if mibBuilder.loadTexts: realServerStatsOutPkts.setStatus('current')
if mibBuilder.loadTexts: realServerStatsOutPkts.setDescription('Total number of outgoing packets for this real server.')
realServerStatsInBytes = MibTableColumn((1, 3, 6, 1, 4, 1, 9586, 100, 5, 3, 4, 1, 20), Counter64()).setUnits('bytes').setMaxAccess("readonly")
if mibBuilder.loadTexts: realServerStatsInBytes.setStatus('current')
if mibBuilder.loadTexts: realServerStatsInBytes.setDescription('Total number of incoming bytes for this real server.')
realServerStatsOutBytes = MibTableColumn((1, 3, 6, 1, 4, 1, 9586, 100, 5, 3, 4, 1, 21), Counter64()).setUnits('bytes').setMaxAccess("readonly")
if mibBuilder.loadTexts: realServerStatsOutBytes.setStatus('current')
if mibBuilder.loadTexts: realServerStatsOutBytes.setDescription('Total number of outgoing bytes for this real server.')
realServerRateCps = MibTableColumn((1, 3, 6, 1, 4, 1, 9586, 100, 5, 3, 4, 1, 22), Gauge32()).setUnits('connections/s').setMaxAccess("readonly")
if mibBuilder.loadTexts: realServerRateCps.setStatus('current')
if mibBuilder.loadTexts: realServerRateCps.setDescription('Current connection rate for this real server.')
realServerRateInPPS = MibTableColumn((1, 3, 6, 1, 4, 1, 9586, 100, 5, 3, 4, 1, 23), Gauge32()).setUnits('packets/s').setMaxAccess("readonly")
if mibBuilder.loadTexts: realServerRateInPPS.setStatus('current')
if mibBuilder.loadTexts: realServerRateInPPS.setDescription('Current in packet rate for this real server.')
realServerRateOutPPS = MibTableColumn((1, 3, 6, 1, 4, 1, 9586, 100, 5, 3, 4, 1, 24), Gauge32()).setUnits('packets/s').setMaxAccess("readonly")
if mibBuilder.loadTexts: realServerRateOutPPS.setStatus('current')
if mibBuilder.loadTexts: realServerRateOutPPS.setDescription('Current out packet rate for this real server.')
realServerRateInBPS = MibTableColumn((1, 3, 6, 1, 4, 1, 9586, 100, 5, 3, 4, 1, 25), Gauge32()).setUnits('bytes/s').setMaxAccess("readonly")
if mibBuilder.loadTexts: realServerRateInBPS.setStatus('current')
if mibBuilder.loadTexts: realServerRateInBPS.setDescription('Current incoming rate for this real server.')
realServerRateOutBPS = MibTableColumn((1, 3, 6, 1, 4, 1, 9586, 100, 5, 3, 4, 1, 26), Gauge32()).setUnits('bytes/s').setMaxAccess("readonly")
if mibBuilder.loadTexts: realServerRateOutBPS.setStatus('current')
if mibBuilder.loadTexts: realServerRateOutBPS.setDescription('Current outgoing rate for this real server.')
checkTrap = MibIdentifier((1, 3, 6, 1, 4, 1, 9586, 100, 5, 3, 5))
checkTraps = MibIdentifier((1, 3, 6, 1, 4, 1, 9586, 100, 5, 3, 5, 0))
checkTrapControl = MibIdentifier((1, 3, 6, 1, 4, 1, 9586, 100, 5, 3, 5, 1))
realServerStateChange = NotificationType((1, 3, 6, 1, 4, 1, 9586, 100, 5, 3, 5, 0, 1)).setObjects(("KEEPALIVED-MIB", "realServerAddrType"), ("KEEPALIVED-MIB", "realServerAddress"), ("KEEPALIVED-MIB", "realServerPort"), ("KEEPALIVED-MIB", "realServerStatus"), ("KEEPALIVED-MIB", "virtualServerType"), ("KEEPALIVED-MIB", "virtualServerProtocol"), ("KEEPALIVED-MIB", "virtualServerRealServersUp"), ("KEEPALIVED-MIB", "virtualServerRealServersTotal"))
if mibBuilder.loadTexts: realServerStateChange.setStatus('current')
if mibBuilder.loadTexts: realServerStateChange.setDescription('This trap signifies that the state of a real server has changed. Additional varbinds will be added depending on the value of virtualServerType: virtualServerNameOfGroup, virtualServerFwMark, virtualServerAddrType, virtualServerAddress, virtualServerPort.')
virtualServerQuorumStateChange = NotificationType((1, 3, 6, 1, 4, 1, 9586, 100, 5, 3, 5, 0, 2)).setObjects(("KEEPALIVED-MIB", "virtualServerType"), ("KEEPALIVED-MIB", "virtualServerProtocol"), ("KEEPALIVED-MIB", "virtualServerQuorumStatus"), ("KEEPALIVED-MIB", "virtualServerQuorum"), ("KEEPALIVED-MIB", "virtualServerRealServersUp"), ("KEEPALIVED-MIB", "virtualServerRealServersTotal"))
if mibBuilder.loadTexts: virtualServerQuorumStateChange.setStatus('current')
if mibBuilder.loadTexts: virtualServerQuorumStateChange.setDescription('This trap signifies that the quorum of a virtual server has changed. Additional varbinds will be added depending on the value of virtualServerType: virtualServerNameOfGroup, virtualServerFwMark, virtualServerAddrType, virtualServerAddress, virtualServerPort.')
compliances = MibIdentifier((1, 3, 6, 1, 4, 1, 9586, 100, 5, 4, 1))
groups = MibIdentifier((1, 3, 6, 1, 4, 1, 9586, 100, 5, 4, 2))
globalCompliances = ModuleCompliance((1, 3, 6, 1, 4, 1, 9586, 100, 5, 4, 1, 1)).setObjects(("KEEPALIVED-MIB", "globalGroup"))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
globalCompliances = globalCompliances.setStatus('current')
if mibBuilder.loadTexts: globalCompliances.setDescription('Compliance statement for global data')
vrrpCompliances = ModuleCompliance((1, 3, 6, 1, 4, 1, 9586, 100, 5, 4, 1, 2)).setObjects(("KEEPALIVED-MIB", "vrrpScriptGroup"), ("KEEPALIVED-MIB", "vrrpSyncGroup"), ("KEEPALIVED-MIB", "vrrpInstanceGroup"), ("KEEPALIVED-MIB", "vrrpTrapsGroup"))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
vrrpCompliances = vrrpCompliances.setStatus('current')
if mibBuilder.loadTexts: vrrpCompliances.setDescription('The VRRP compliance statement')
checkCompliances = ModuleCompliance((1, 3, 6, 1, 4, 1, 9586, 100, 5, 4, 1, 3)).setObjects(("KEEPALIVED-MIB", "virtualServerGroupGroup"), ("KEEPALIVED-MIB", "virtualServerGroup"), ("KEEPALIVED-MIB", "realServerGroup"), ("KEEPALIVED-MIB", "checkTrapsGroup"))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
checkCompliances = checkCompliances.setStatus('current')
if mibBuilder.loadTexts: checkCompliances.setDescription('The check compliance statement')
globalGroup = ObjectGroup((1, 3, 6, 1, 4, 1, 9586, 100, 5, 4, 2, 1)).setObjects(("KEEPALIVED-MIB", "version"), ("KEEPALIVED-MIB", "routerId"), ("KEEPALIVED-MIB", "smtpServerAddressType"), ("KEEPALIVED-MIB", "smtpServerAddress"), ("KEEPALIVED-MIB", "smtpServerTimeout"), ("KEEPALIVED-MIB", "emailFrom"), ("KEEPALIVED-MIB", "emailAddress"), ("KEEPALIVED-MIB", "trapEnable"), ("KEEPALIVED-MIB", "linkBeat"))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
globalGroup = globalGroup.setStatus('current')
if mibBuilder.loadTexts: globalGroup.setDescription('Conformance group for global data.')
vrrpGroups = MibIdentifier((1, 3, 6, 1, 4, 1, 9586, 100, 5, 4, 2, 2))
vrrpSyncGroup = ObjectGroup((1, 3, 6, 1, 4, 1, 9586, 100, 5, 4, 2, 2, 1)).setObjects(("KEEPALIVED-MIB", "vrrpSyncGroupName"), ("KEEPALIVED-MIB", "vrrpSyncGroupState"), ("KEEPALIVED-MIB", "vrrpSyncGroupSmtpAlert"), ("KEEPALIVED-MIB", "vrrpSyncGroupNotifyExec"), ("KEEPALIVED-MIB", "vrrpSyncGroupScriptMaster"), ("KEEPALIVED-MIB", "vrrpSyncGroupScriptBackup"), ("KEEPALIVED-MIB", "vrrpSyncGroupScriptFault"), ("KEEPALIVED-MIB", "vrrpSyncGroupScript"), ("KEEPALIVED-MIB", "vrrpSyncGroupMemberName"))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
vrrpSyncGroup = vrrpSyncGroup.setStatus('current')
if mibBuilder.loadTexts: vrrpSyncGroup.setDescription('Conformance group for synchronisation groups.')
vrrpInstanceGroup = ObjectGroup((1, 3, 6, 1, 4, 1, 9586, 100, 5, 4, 2, 2, 2)).setObjects(("KEEPALIVED-MIB", "vrrpInstanceName"), ("KEEPALIVED-MIB", "vrrpInstanceVirtualRouterId"), ("KEEPALIVED-MIB", "vrrpInstanceState"), ("KEEPALIVED-MIB", "vrrpInstanceInitialState"), ("KEEPALIVED-MIB", "vrrpInstanceWantedState"), ("KEEPALIVED-MIB", "vrrpInstanceBasePriority"), ("KEEPALIVED-MIB", "vrrpInstanceEffectivePriority"), ("KEEPALIVED-MIB", "vrrpInstanceVipsStatus"), ("KEEPALIVED-MIB", "vrrpInstancePrimaryInterface"), ("KEEPALIVED-MIB", "vrrpInstanceTrackPrimaryIf"), ("KEEPALIVED-MIB", "vrrpInstanceAdvertisementsInt"), ("KEEPALIVED-MIB", "vrrpInstancePreempt"), ("KEEPALIVED-MIB", "vrrpInstancePreemptDelay"), ("KEEPALIVED-MIB", "vrrpInstanceAuthType"), ("KEEPALIVED-MIB", "vrrpInstanceLvsSyncDaemon"), ("KEEPALIVED-MIB", "vrrpInstanceLvsSyncInterface"), ("KEEPALIVED-MIB", "vrrpInstanceSyncGroup"), ("KEEPALIVED-MIB", "vrrpInstanceGarpDelay"), ("KEEPALIVED-MIB", "vrrpInstanceSmtpAlert"), ("KEEPALIVED-MIB", "vrrpInstanceNotifyExec"), ("KEEPALIVED-MIB", "vrrpInstanceScriptMaster"), ("KEEPALIVED-MIB", "vrrpInstanceScriptBackup"), ("KEEPALIVED-MIB", "vrrpInstanceScriptFault"), ("KEEPALIVED-MIB", "vrrpInstanceScriptStop"), ("KEEPALIVED-MIB", "vrrpInstanceScript"), ("KEEPALIVED-MIB", "vrrpTrackedInterfaceName"), ("KEEPALIVED-MIB", "vrrpTrackedInterfaceWeight"), ("KEEPALIVED-MIB", "vrrpTrackedScriptName"), ("KEEPALIVED-MIB", "vrrpTrackedScriptWeight"), ("KEEPALIVED-MIB", "vrrpAddressType"), ("KEEPALIVED-MIB", "vrrpAddressValue"), ("KEEPALIVED-MIB", "vrrpAddressBroadcast"), ("KEEPALIVED-MIB", "vrrpAddressMask"), ("KEEPALIVED-MIB", "vrrpAddressScope"), ("KEEPALIVED-MIB", "vrrpAddressIfIndex"), ("KEEPALIVED-MIB", "vrrpAddressIfName"), ("KEEPALIVED-MIB", "vrrpAddressIfAlias"), ("KEEPALIVED-MIB", "vrrpAddressStatus"), ("KEEPALIVED-MIB", "vrrpAddressAdvertising"), ("KEEPALIVED-MIB", "vrrpRouteAddressType"), ("KEEPALIVED-MIB", "vrrpRouteDestination"), ("KEEPALIVED-MIB", "vrrpRouteDestinationMask"), ("KEEPALIVED-MIB", "vrrpRouteGateway"), ("KEEPALIVED-MIB", "vrrpRouteSecondaryGateway"), ("KEEPALIVED-MIB", "vrrpRouteSource"), ("KEEPALIVED-MIB", "vrrpRouteMetric"), ("KEEPALIVED-MIB", "vrrpRouteScope"), ("KEEPALIVED-MIB", "vrrpRouteType"), ("KEEPALIVED-MIB", "vrrpRouteIfIndex"), ("KEEPALIVED-MIB", "vrrpRouteIfName"), ("KEEPALIVED-MIB", "vrrpRouteRoutingTable"), ("KEEPALIVED-MIB", "vrrpRouteStatus"))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
vrrpInstanceGroup = vrrpInstanceGroup.setStatus('current')
if mibBuilder.loadTexts: vrrpInstanceGroup.setDescription('Conformance group for VRRP instances.')
vrrpScriptGroup = ObjectGroup((1, 3, 6, 1, 4, 1, 9586, 100, 5, 4, 2, 2, 3)).setObjects(("KEEPALIVED-MIB", "vrrpScriptName"), ("KEEPALIVED-MIB", "vrrpScriptCommand"), ("KEEPALIVED-MIB", "vrrpScriptInterval"), ("KEEPALIVED-MIB", "vrrpScriptWeight"), ("KEEPALIVED-MIB", "vrrpScriptResult"), ("KEEPALIVED-MIB", "vrrpScriptRise"), ("KEEPALIVED-MIB", "vrrpScriptFall"))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
vrrpScriptGroup = vrrpScriptGroup.setStatus('current')
if mibBuilder.loadTexts: vrrpScriptGroup.setDescription('Conformance group for VRRP scripts.')
vrrpTrapsGroup = NotificationGroup((1, 3, 6, 1, 4, 1, 9586, 100, 5, 4, 2, 2, 4)).setObjects(("KEEPALIVED-MIB", "vrrpSyncGroupStateChange"), ("KEEPALIVED-MIB", "vrrpInstanceStateChange"))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
vrrpTrapsGroup = vrrpTrapsGroup.setStatus('current')
if mibBuilder.loadTexts: vrrpTrapsGroup.setDescription('Conformance group for VRRP traps.')
checkGroups = MibIdentifier((1, 3, 6, 1, 4, 1, 9586, 100, 5, 4, 2, 3))
virtualServerGroupGroup = ObjectGroup((1, 3, 6, 1, 4, 1, 9586, 100, 5, 4, 2, 3, 1)).setObjects(("KEEPALIVED-MIB", "virtualServerGroupName"), ("KEEPALIVED-MIB", "virtualServerGroupMemberType"), ("KEEPALIVED-MIB", "virtualServerGroupMemberFwMark"), ("KEEPALIVED-MIB", "virtualServerGroupMemberAddrType"), ("KEEPALIVED-MIB", "virtualServerGroupMemberAddress"), ("KEEPALIVED-MIB", "virtualServerGroupMemberAddr1"), ("KEEPALIVED-MIB", "virtualServerGroupMemberAddr2"), ("KEEPALIVED-MIB", "virtualServerGroupMemberPort"))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
virtualServerGroupGroup = virtualServerGroupGroup.setStatus('current')
if mibBuilder.loadTexts: virtualServerGroupGroup.setDescription('Conformance group for virtual server groups.')
virtualServerGroup = ObjectGroup((1, 3, 6, 1, 4, 1, 9586, 100, 5, 4, 2, 3, 2)).setObjects(("KEEPALIVED-MIB", "virtualServerType"), ("KEEPALIVED-MIB", "virtualServerNameOfGroup"), ("KEEPALIVED-MIB", "virtualServerFwMark"), ("KEEPALIVED-MIB", "virtualServerAddrType"), ("KEEPALIVED-MIB", "virtualServerAddress"), ("KEEPALIVED-MIB", "virtualServerPort"), ("KEEPALIVED-MIB", "virtualServerProtocol"), ("KEEPALIVED-MIB", "virtualServerLoadBalancingAlgo"), ("KEEPALIVED-MIB", "virtualServerLoadBalancingKind"), ("KEEPALIVED-MIB", "virtualServerStatus"), ("KEEPALIVED-MIB", "virtualServerVirtualHost"), ("KEEPALIVED-MIB", "virtualServerPersist"), ("KEEPALIVED-MIB", "virtualServerPersistTimeout"), ("KEEPALIVED-MIB", "virtualServerPersistGranularity"), ("KEEPALIVED-MIB", "virtualServerDelayLoop"), ("KEEPALIVED-MIB", "virtualServerHaSuspend"), ("KEEPALIVED-MIB", "virtualServerAlpha"), ("KEEPALIVED-MIB", "virtualServerOmega"), ("KEEPALIVED-MIB", "virtualServerRealServersTotal"), ("KEEPALIVED-MIB", "virtualServerRealServersUp"), ("KEEPALIVED-MIB", "virtualServerQuorum"), ("KEEPALIVED-MIB", "virtualServerQuorumStatus"), ("KEEPALIVED-MIB", "virtualServerQuorumUp"), ("KEEPALIVED-MIB", "virtualServerQuorumDown"), ("KEEPALIVED-MIB", "virtualServerHysteresis"), ("KEEPALIVED-MIB", "virtualServerStatsConns"), ("KEEPALIVED-MIB", "virtualServerStatsInPkts"), ("KEEPALIVED-MIB", "virtualServerStatsOutPkts"), ("KEEPALIVED-MIB", "virtualServerStatsInBytes"), ("KEEPALIVED-MIB", "virtualServerStatsOutBytes"), ("KEEPALIVED-MIB", "virtualServerRateCps"), ("KEEPALIVED-MIB", "virtualServerRateInPPS"), ("KEEPALIVED-MIB", "virtualServerRateOutPPS"), ("KEEPALIVED-MIB", "virtualServerRateInBPS"), ("KEEPALIVED-MIB", "virtualServerRateOutBPS"))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
virtualServerGroup = virtualServerGroup.setStatus('current')
if mibBuilder.loadTexts: virtualServerGroup.setDescription('Conformance group for virtual servers.')
realServerGroup = ObjectGroup((1, 3, 6, 1, 4, 1, 9586, 100, 5, 4, 2, 3, 3)).setObjects(("KEEPALIVED-MIB", "realServerType"), ("KEEPALIVED-MIB", "realServerAddrType"), ("KEEPALIVED-MIB", "realServerAddress"), ("KEEPALIVED-MIB", "realServerPort"), ("KEEPALIVED-MIB", "realServerStatus"), ("KEEPALIVED-MIB", "realServerWeight"), ("KEEPALIVED-MIB", "realServerUpperConnectionLimit"), ("KEEPALIVED-MIB", "realServerLowerConnectionLimit"), ("KEEPALIVED-MIB", "realServerActionWhenDown"), ("KEEPALIVED-MIB", "realServerNotifyUp"), ("KEEPALIVED-MIB", "realServerNotifyDown"), ("KEEPALIVED-MIB", "realServerFailedChecks"), ("KEEPALIVED-MIB", "realServerStatsConns"), ("KEEPALIVED-MIB", "realServerStatsActiveConns"), ("KEEPALIVED-MIB", "realServerStatsInactiveConns"), ("KEEPALIVED-MIB", "realServerStatsPersistentConns"), ("KEEPALIVED-MIB", "realServerStatsInPkts"), ("KEEPALIVED-MIB", "realServerStatsOutPkts"), ("KEEPALIVED-MIB", "realServerStatsInBytes"), ("KEEPALIVED-MIB", "realServerStatsOutBytes"), ("KEEPALIVED-MIB", "realServerRateCps"), ("KEEPALIVED-MIB", "realServerRateInPPS"), ("KEEPALIVED-MIB", "realServerRateOutPPS"), ("KEEPALIVED-MIB", "realServerRateInBPS"), ("KEEPALIVED-MIB", "realServerRateOutBPS"))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
realServerGroup = realServerGroup.setStatus('current')
if mibBuilder.loadTexts: realServerGroup.setDescription('Conformance group for real servers.')
checkTrapsGroup = NotificationGroup((1, 3, 6, 1, 4, 1, 9586, 100, 5, 4, 2, 3, 4)).setObjects(("KEEPALIVED-MIB", "realServerStateChange"), ("KEEPALIVED-MIB", "virtualServerQuorumStateChange"))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
checkTrapsGroup = checkTrapsGroup.setStatus('current')
if mibBuilder.loadTexts: checkTrapsGroup.setDescription('Conformance group for check traps.')
mibBuilder.exportSymbols("KEEPALIVED-MIB", vrrpInstanceVirtualRouterId=vrrpInstanceVirtualRouterId, virtualServerGroupMemberAddr2=virtualServerGroupMemberAddr2, vrrpTrackedInterfaceName=vrrpTrackedInterfaceName, realServerStatsInPkts=realServerStatsInPkts, smtpServerTimeout=smtpServerTimeout, PYSNMP_MODULE_ID=keepalived, virtualServerType=virtualServerType, realServerLowerConnectionLimit=realServerLowerConnectionLimit, routerId=routerId, virtualServerGroupMemberTable=virtualServerGroupMemberTable, vrrpAddressIfAlias=vrrpAddressIfAlias, check=check, vrrpInstanceAuthType=vrrpInstanceAuthType, virtualServerPort=virtualServerPort, virtualServerDelayLoop=virtualServerDelayLoop, vrrpInstanceStateChange=vrrpInstanceStateChange, realServerGroup=realServerGroup, vrrpScriptFall=vrrpScriptFall, realServerEntry=realServerEntry, realServerActionWhenDown=realServerActionWhenDown, emailIndex=emailIndex, groups=groups, vrrpScriptResult=vrrpScriptResult, vrrpInstanceGroup=vrrpInstanceGroup, vrrpInstanceSyncGroup=vrrpInstanceSyncGroup, virtualServerLoadBalancingAlgo=virtualServerLoadBalancingAlgo, vrrpScriptWeight=vrrpScriptWeight, vrrpSyncGroupMemberTable=vrrpSyncGroupMemberTable, virtualServerGroupMemberPort=virtualServerGroupMemberPort, virtualServerRateOutBPS=virtualServerRateOutBPS, vrrpInstanceTable=vrrpInstanceTable, checkTrapControl=checkTrapControl, vrrpInstanceTrackPrimaryIf=vrrpInstanceTrackPrimaryIf, checkTrapsGroup=checkTrapsGroup, vrrpRouteStatus=vrrpRouteStatus, vrrpTraps=vrrpTraps, virtualServerPersist=virtualServerPersist, virtualServerRateOutPPS=virtualServerRateOutPPS, pysmi_global=pysmi_global, compliances=compliances, vrrpTrackedScriptName=vrrpTrackedScriptName, realServerStateChange=realServerStateChange, virtualServerGroupMemberAddr1=virtualServerGroupMemberAddr1, vrrpSyncGroupScriptBackup=vrrpSyncGroupScriptBackup, virtualServerQuorumDown=virtualServerQuorumDown, vrrpSyncGroupEntry=vrrpSyncGroupEntry, vrrpInstanceScriptMaster=vrrpInstanceScriptMaster, vrrpScriptGroup=vrrpScriptGroup, vrrpSyncGroupName=vrrpSyncGroupName, virtualServerStatsOutPkts=virtualServerStatsOutPkts, vrrpRouteMetric=vrrpRouteMetric, realServerStatsActiveConns=realServerStatsActiveConns, vrrpRouteSecondaryGateway=vrrpRouteSecondaryGateway, realServerStatsPersistentConns=realServerStatsPersistentConns, vrrpScriptName=vrrpScriptName, vrrpInstanceInitialState=vrrpInstanceInitialState, vrrpRouteDestination=vrrpRouteDestination, vrrpScriptEntry=vrrpScriptEntry, vrrpInstanceSmtpAlert=vrrpInstanceSmtpAlert, vrrpAddressType=vrrpAddressType, virtualServerQuorumStatus=virtualServerQuorumStatus, realServerType=realServerType, virtualServerQuorumStateChange=virtualServerQuorumStateChange, vrrpRouteIfName=vrrpRouteIfName, virtualServerGroupMemberFwMark=virtualServerGroupMemberFwMark, virtualServerStatsInBytes=virtualServerStatsInBytes, vrrpSyncGroupNotifyExec=vrrpSyncGroupNotifyExec, vrrpInstanceLvsSyncDaemon=vrrpInstanceLvsSyncDaemon, vrrpAddressIndex=vrrpAddressIndex, vrrpRouteIfIndex=vrrpRouteIfIndex, realServerStatsOutPkts=realServerStatsOutPkts, vrrpAddressTable=vrrpAddressTable, realServerTable=realServerTable, realServerFailedChecks=realServerFailedChecks, checkCompliances=checkCompliances, vrrpSyncGroupTable=vrrpSyncGroupTable, vrrpInstancePreempt=vrrpInstancePreempt, vrrpSyncGroupStateChange=vrrpSyncGroupStateChange, virtualServerGroupMemberType=virtualServerGroupMemberType, virtualServerOmega=virtualServerOmega, virtualServerRealServersTotal=virtualServerRealServersTotal, virtualServerStatsInPkts=virtualServerStatsInPkts, realServerRateOutPPS=realServerRateOutPPS, virtualServerGroupGroup=virtualServerGroupGroup, vrrpAddressBroadcast=vrrpAddressBroadcast, vrrpInstanceState=vrrpInstanceState, vrrpInstanceName=vrrpInstanceName, vrrpSyncGroupSmtpAlert=vrrpSyncGroupSmtpAlert, realServerWeight=realServerWeight, vrrpScriptRise=vrrpScriptRise, virtualServerGroupTable=virtualServerGroupTable, virtualServerPersistGranularity=virtualServerPersistGranularity, vrrpAddressScope=vrrpAddressScope, vrrpScriptIndex=vrrpScriptIndex, keepalived=keepalived, trapEnable=trapEnable, virtualServerAddress=virtualServerAddress, emailAddress=emailAddress, vrrpRouteGateway=vrrpRouteGateway, emailFrom=emailFrom, linkBeat=linkBeat, virtualServerAddrType=virtualServerAddrType, vrrpSyncGroupScriptFault=vrrpSyncGroupScriptFault, checkTraps=checkTraps, vrrpInstanceNotifyExec=vrrpInstanceNotifyExec, vrrpAddressMask=vrrpAddressMask, vrrpAddressAdvertising=vrrpAddressAdvertising, virtualServerEntry=virtualServerEntry, vrrpInstanceBasePriority=vrrpInstanceBasePriority, vrrpTrackedInterfaceWeight=vrrpTrackedInterfaceWeight, virtualServerQuorumUp=virtualServerQuorumUp, vrrpTrapControl=vrrpTrapControl, vrrpSyncGroupState=vrrpSyncGroupState, vrrpTrap=vrrpTrap, vrrpSyncGroupIndex=vrrpSyncGroupIndex, virtualServerRealServersUp=virtualServerRealServersUp, project=project, vrrpRouteRoutingTable=vrrpRouteRoutingTable, smtpServerAddressType=smtpServerAddressType, vrrpAddressEntry=vrrpAddressEntry, debian=debian, vrrpRouteSource=vrrpRouteSource, vrrpTrackedScriptIndex=vrrpTrackedScriptIndex, vrrpSyncGroupMemberEntry=vrrpSyncGroupMemberEntry, virtualServerGroupMemberAddrType=virtualServerGroupMemberAddrType, virtualServerNameOfGroup=virtualServerNameOfGroup, virtualServerRateInBPS=virtualServerRateInBPS, globalGroup=globalGroup, virtualServerVirtualHost=virtualServerVirtualHost, vrrpTrackedScriptWeight=vrrpTrackedScriptWeight, virtualServerStatus=virtualServerStatus, virtualServerQuorum=virtualServerQuorum, realServerUpperConnectionLimit=realServerUpperConnectionLimit, globalCompliances=globalCompliances, vrrpScriptCommand=vrrpScriptCommand, vrrpInstanceScriptBackup=vrrpInstanceScriptBackup, vrrpAddressIfIndex=vrrpAddressIfIndex, virtualServerGroupMemberEntry=virtualServerGroupMemberEntry, vrrpInstanceVipsStatus=vrrpInstanceVipsStatus, realServerStatsOutBytes=realServerStatsOutBytes, vrrpTrackedScriptTable=vrrpTrackedScriptTable, vrrpInstanceAdvertisementsInt=vrrpInstanceAdvertisementsInt, realServerNotifyDown=realServerNotifyDown, realServerStatsConns=realServerStatsConns, virtualServerRateCps=virtualServerRateCps, realServerIndex=realServerIndex, vrrpRouteTable=vrrpRouteTable, smtpServerAddress=smtpServerAddress, virtualServerIndex=virtualServerIndex, realServerRateCps=realServerRateCps, vrrpSyncGroupScript=vrrpSyncGroupScript, vrrpSyncGroupMemberName=vrrpSyncGroupMemberName, virtualServerProtocol=virtualServerProtocol, virtualServerLoadBalancingKind=virtualServerLoadBalancingKind, vrrpInstanceIndex=vrrpInstanceIndex, vrrpRouteType=vrrpRouteType, vrrpCompliances=vrrpCompliances, vrrpTrackedInterfaceTable=vrrpTrackedInterfaceTable, virtualServerHysteresis=virtualServerHysteresis, vrrpRouteDestinationMask=vrrpRouteDestinationMask, vrrpInstanceEffectivePriority=vrrpInstanceEffectivePriority, virtualServerGroupMemberAddress=virtualServerGroupMemberAddress, virtualServerPersistTimeout=virtualServerPersistTimeout, vrrpRouteScope=vrrpRouteScope, vrrpTrackedScriptEntry=vrrpTrackedScriptEntry, vrrpSyncGroup=vrrpSyncGroup, vrrpAddressValue=vrrpAddressValue, checkGroups=checkGroups, realServerStatsInBytes=realServerStatsInBytes, VrrpState=VrrpState, vrrpInstanceLvsSyncInterface=vrrpInstanceLvsSyncInterface, vrrpAddressStatus=vrrpAddressStatus, vrrpInstanceGarpDelay=vrrpInstanceGarpDelay, emailTable=emailTable, vrrpSyncGroupScriptMaster=vrrpSyncGroupScriptMaster, virtualServerGroup=virtualServerGroup, vrrpInstanceScript=vrrpInstanceScript, virtualServerGroupMemberIndex=virtualServerGroupMemberIndex, virtualServerGroupIndex=virtualServerGroupIndex, vrrpSyncGroupMemberInstanceIndex=vrrpSyncGroupMemberInstanceIndex, vrrpTrackedInterfaceEntry=vrrpTrackedInterfaceEntry, virtualServerRateInPPS=virtualServerRateInPPS, virtualServerFwMark=virtualServerFwMark, vrrpRouteAddressType=vrrpRouteAddressType, virtualServerHaSuspend=virtualServerHaSuspend, checkTrap=checkTrap, virtualServerStatsOutBytes=virtualServerStatsOutBytes, realServerNotifyUp=realServerNotifyUp, realServerRateInBPS=realServerRateInBPS, realServerStatus=realServerStatus, vrrpScriptInterval=vrrpScriptInterval, emailEntry=emailEntry, vrrpInstancePrimaryInterface=vrrpInstancePrimaryInterface, virtualServerGroupEntry=virtualServerGroupEntry, realServerAddress=realServerAddress, virtualServerAlpha=virtualServerAlpha, realServerRateOutBPS=realServerRateOutBPS, vrrpRouteIndex=vrrpRouteIndex, vrrp=vrrp, vrrpGroups=vrrpGroups, vrrpAddressIfName=vrrpAddressIfName, version=version, realServerStatsInactiveConns=realServerStatsInactiveConns, vrrpInstanceWantedState=vrrpInstanceWantedState, realServerPort=realServerPort, mail=mail, vrrpInstanceScriptFault=vrrpInstanceScriptFault, virtualServerStatsConns=virtualServerStatsConns, vrrpRouteEntry=vrrpRouteEntry, realServerAddrType=realServerAddrType, virtualServerGroupName=virtualServerGroupName, vrrpTrapsGroup=vrrpTrapsGroup, virtualServerTable=virtualServerTable, vrrpInstancePreemptDelay=vrrpInstancePreemptDelay, vrrpInstanceScriptStop=vrrpInstanceScriptStop, conformance=conformance, realServerRateInPPS=realServerRateInPPS, vrrpScriptTable=vrrpScriptTable, vrrpInstanceEntry=vrrpInstanceEntry)
| (integer, object_identifier, octet_string) = mibBuilder.importSymbols('ASN1', 'Integer', 'ObjectIdentifier', 'OctetString')
(named_values,) = mibBuilder.importSymbols('ASN1-ENUMERATION', 'NamedValues')
(value_size_constraint, value_range_constraint, constraints_intersection, single_value_constraint, constraints_union) = mibBuilder.importSymbols('ASN1-REFINEMENT', 'ValueSizeConstraint', 'ValueRangeConstraint', 'ConstraintsIntersection', 'SingleValueConstraint', 'ConstraintsUnion')
(if_index, interface_index) = mibBuilder.importSymbols('IF-MIB', 'ifIndex', 'InterfaceIndex')
(inet_port_number, inet_address_prefix_length, inet_address, inet_address_type, inet_scope_type) = mibBuilder.importSymbols('INET-ADDRESS-MIB', 'InetPortNumber', 'InetAddressPrefixLength', 'InetAddress', 'InetAddressType', 'InetScopeType')
(object_group, module_compliance, notification_group) = mibBuilder.importSymbols('SNMPv2-CONF', 'ObjectGroup', 'ModuleCompliance', 'NotificationGroup')
(module_identity, ip_address, gauge32, counter64, object_identity, enterprises, notification_type, iso, integer32, counter32, mib_scalar, mib_table, mib_table_row, mib_table_column, time_ticks, mib_identifier, unsigned32, bits) = mibBuilder.importSymbols('SNMPv2-SMI', 'ModuleIdentity', 'IpAddress', 'Gauge32', 'Counter64', 'ObjectIdentity', 'enterprises', 'NotificationType', 'iso', 'Integer32', 'Counter32', 'MibScalar', 'MibTable', 'MibTableRow', 'MibTableColumn', 'TimeTicks', 'MibIdentifier', 'Unsigned32', 'Bits')
(textual_convention, display_string, truth_value) = mibBuilder.importSymbols('SNMPv2-TC', 'TextualConvention', 'DisplayString', 'TruthValue')
keepalived = module_identity((1, 3, 6, 1, 4, 1, 9586, 100, 5))
keepalived.setRevisions(('2009-04-08 00:00',))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
if mibBuilder.loadTexts:
keepalived.setRevisionsDescriptions(('Initial revision',))
if mibBuilder.loadTexts:
keepalived.setLastUpdated('200904080000Z')
if mibBuilder.loadTexts:
keepalived.setOrganization('Keepalived')
if mibBuilder.loadTexts:
keepalived.setContactInfo('http://www.keepalived.org')
if mibBuilder.loadTexts:
keepalived.setDescription('This MIB describes objects used by keepalived, both for VRRP and health checker.')
debian = mib_identifier((1, 3, 6, 1, 4, 1, 9586))
project = mib_identifier((1, 3, 6, 1, 4, 1, 9586, 100))
class Vrrpstate(TextualConvention, Integer32):
description = 'Represents a VRRP state.'
status = 'current'
subtype_spec = Integer32.subtypeSpec + constraints_union(single_value_constraint(0, 1, 2, 3, 4))
named_values = named_values(('init', 0), ('backup', 1), ('master', 2), ('fault', 3), ('unknown', 4))
pysmi_global = mib_identifier((1, 3, 6, 1, 4, 1, 9586, 100, 5, 1)).setLabel('global')
vrrp = mib_identifier((1, 3, 6, 1, 4, 1, 9586, 100, 5, 2))
check = mib_identifier((1, 3, 6, 1, 4, 1, 9586, 100, 5, 3))
conformance = mib_identifier((1, 3, 6, 1, 4, 1, 9586, 100, 5, 4))
version = mib_scalar((1, 3, 6, 1, 4, 1, 9586, 100, 5, 1, 1), display_string()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
version.setStatus('current')
if mibBuilder.loadTexts:
version.setDescription('Version of keepalived')
router_id = mib_scalar((1, 3, 6, 1, 4, 1, 9586, 100, 5, 1, 2), display_string()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
routerId.setStatus('current')
if mibBuilder.loadTexts:
routerId.setDescription('Router ID')
mail = mib_identifier((1, 3, 6, 1, 4, 1, 9586, 100, 5, 1, 3))
smtp_server_address_type = mib_scalar((1, 3, 6, 1, 4, 1, 9586, 100, 5, 1, 3, 1), inet_address_type()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
smtpServerAddressType.setStatus('current')
if mibBuilder.loadTexts:
smtpServerAddressType.setDescription('Address type for SMTP server.')
smtp_server_address = mib_scalar((1, 3, 6, 1, 4, 1, 9586, 100, 5, 1, 3, 2), inet_address()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
smtpServerAddress.setStatus('current')
if mibBuilder.loadTexts:
smtpServerAddress.setDescription('Address of SMTP server.')
smtp_server_timeout = mib_scalar((1, 3, 6, 1, 4, 1, 9586, 100, 5, 1, 3, 3), unsigned32()).setUnits('seconds').setMaxAccess('readonly')
if mibBuilder.loadTexts:
smtpServerTimeout.setStatus('current')
if mibBuilder.loadTexts:
smtpServerTimeout.setDescription('SMTP server connection timeout.')
email_from = mib_scalar((1, 3, 6, 1, 4, 1, 9586, 100, 5, 1, 3, 4), display_string()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
emailFrom.setStatus('current')
if mibBuilder.loadTexts:
emailFrom.setDescription('Email address for the From field.')
email_table = mib_table((1, 3, 6, 1, 4, 1, 9586, 100, 5, 1, 3, 5))
if mibBuilder.loadTexts:
emailTable.setStatus('current')
if mibBuilder.loadTexts:
emailTable.setDescription('Table of email notification addresses.')
email_entry = mib_table_row((1, 3, 6, 1, 4, 1, 9586, 100, 5, 1, 3, 5, 1)).setIndexNames((0, 'KEEPALIVED-MIB', 'emailIndex'))
if mibBuilder.loadTexts:
emailEntry.setStatus('current')
if mibBuilder.loadTexts:
emailEntry.setDescription('Email address to be notified with an alert.')
email_index = mib_table_column((1, 3, 6, 1, 4, 1, 9586, 100, 5, 1, 3, 5, 1, 1), integer32().subtype(subtypeSpec=value_range_constraint(1, 2147483647)))
if mibBuilder.loadTexts:
emailIndex.setStatus('current')
if mibBuilder.loadTexts:
emailIndex.setDescription('Index for the email address.')
email_address = mib_table_column((1, 3, 6, 1, 4, 1, 9586, 100, 5, 1, 3, 5, 1, 2), display_string()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
emailAddress.setStatus('current')
if mibBuilder.loadTexts:
emailAddress.setDescription('Email address to be notified when an alert is raised.')
trap_enable = mib_scalar((1, 3, 6, 1, 4, 1, 9586, 100, 5, 1, 4), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2))).clone(namedValues=named_values(('enabled', 1), ('disabled', 2)))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
trapEnable.setStatus('current')
if mibBuilder.loadTexts:
trapEnable.setDescription('Indicate whether traps should be sent for various events.')
link_beat = mib_scalar((1, 3, 6, 1, 4, 1, 9586, 100, 5, 1, 5), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2))).clone(namedValues=named_values(('netlink', 1), ('polling', 2)))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
linkBeat.setStatus('current')
if mibBuilder.loadTexts:
linkBeat.setDescription('Indicate which method is used to check if a link is up or down. netlink(1) means that the kernel will push a link state change while polling(2) means that the status of the link is checked periodically.')
vrrp_sync_group_table = mib_table((1, 3, 6, 1, 4, 1, 9586, 100, 5, 2, 1))
if mibBuilder.loadTexts:
vrrpSyncGroupTable.setStatus('current')
if mibBuilder.loadTexts:
vrrpSyncGroupTable.setDescription('Table of sync groups')
vrrp_sync_group_entry = mib_table_row((1, 3, 6, 1, 4, 1, 9586, 100, 5, 2, 1, 1)).setIndexNames((0, 'KEEPALIVED-MIB', 'vrrpSyncGroupIndex'))
if mibBuilder.loadTexts:
vrrpSyncGroupEntry.setStatus('current')
if mibBuilder.loadTexts:
vrrpSyncGroupEntry.setDescription('Information describing a sync group')
vrrp_sync_group_index = mib_table_column((1, 3, 6, 1, 4, 1, 9586, 100, 5, 2, 1, 1, 1), integer32().subtype(subtypeSpec=value_range_constraint(1, 2147483647)))
if mibBuilder.loadTexts:
vrrpSyncGroupIndex.setStatus('current')
if mibBuilder.loadTexts:
vrrpSyncGroupIndex.setDescription('Index of the synchronisation group.')
vrrp_sync_group_name = mib_table_column((1, 3, 6, 1, 4, 1, 9586, 100, 5, 2, 1, 1, 2), display_string()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
vrrpSyncGroupName.setStatus('current')
if mibBuilder.loadTexts:
vrrpSyncGroupName.setDescription('Name of the synchronisation group.')
vrrp_sync_group_state = mib_table_column((1, 3, 6, 1, 4, 1, 9586, 100, 5, 2, 1, 1, 3), vrrp_state()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
vrrpSyncGroupState.setStatus('current')
if mibBuilder.loadTexts:
vrrpSyncGroupState.setDescription('Current state of the synchronisation group.')
vrrp_sync_group_smtp_alert = mib_table_column((1, 3, 6, 1, 4, 1, 9586, 100, 5, 2, 1, 1, 4), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2))).clone(namedValues=named_values(('enabled', 1), ('disabled', 2)))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
vrrpSyncGroupSmtpAlert.setStatus('current')
if mibBuilder.loadTexts:
vrrpSyncGroupSmtpAlert.setDescription('Will SMTP alert be sent for this synchronisation group?')
vrrp_sync_group_notify_exec = mib_table_column((1, 3, 6, 1, 4, 1, 9586, 100, 5, 2, 1, 1, 5), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2))).clone(namedValues=named_values(('enabled', 1), ('disabled', 2)))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
vrrpSyncGroupNotifyExec.setStatus('current')
if mibBuilder.loadTexts:
vrrpSyncGroupNotifyExec.setDescription('Will we execute notification script for this group?')
vrrp_sync_group_script_master = mib_table_column((1, 3, 6, 1, 4, 1, 9586, 100, 5, 2, 1, 1, 6), display_string()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
vrrpSyncGroupScriptMaster.setStatus('current')
if mibBuilder.loadTexts:
vrrpSyncGroupScriptMaster.setDescription('Script to execute when the group becomes master.')
vrrp_sync_group_script_backup = mib_table_column((1, 3, 6, 1, 4, 1, 9586, 100, 5, 2, 1, 1, 7), display_string()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
vrrpSyncGroupScriptBackup.setStatus('current')
if mibBuilder.loadTexts:
vrrpSyncGroupScriptBackup.setDescription('Script to execute when the group becomes backup.')
vrrp_sync_group_script_fault = mib_table_column((1, 3, 6, 1, 4, 1, 9586, 100, 5, 2, 1, 1, 8), display_string()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
vrrpSyncGroupScriptFault.setStatus('current')
if mibBuilder.loadTexts:
vrrpSyncGroupScriptFault.setDescription('Script to execute when the group is in fault state.')
vrrp_sync_group_script = mib_table_column((1, 3, 6, 1, 4, 1, 9586, 100, 5, 2, 1, 1, 9), display_string()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
vrrpSyncGroupScript.setStatus('current')
if mibBuilder.loadTexts:
vrrpSyncGroupScript.setDescription('Script to execute whenever a state change occurs.')
vrrp_sync_group_member_table = mib_table((1, 3, 6, 1, 4, 1, 9586, 100, 5, 2, 2))
if mibBuilder.loadTexts:
vrrpSyncGroupMemberTable.setStatus('current')
if mibBuilder.loadTexts:
vrrpSyncGroupMemberTable.setDescription('Table of instances contained in sync groups')
vrrp_sync_group_member_entry = mib_table_row((1, 3, 6, 1, 4, 1, 9586, 100, 5, 2, 2, 1)).setIndexNames((0, 'KEEPALIVED-MIB', 'vrrpSyncGroupIndex'), (0, 'KEEPALIVED-MIB', 'vrrpSyncGroupMemberInstanceIndex'))
if mibBuilder.loadTexts:
vrrpSyncGroupMemberEntry.setStatus('current')
if mibBuilder.loadTexts:
vrrpSyncGroupMemberEntry.setDescription('Information describing a member of a sync group')
vrrp_sync_group_member_instance_index = mib_table_column((1, 3, 6, 1, 4, 1, 9586, 100, 5, 2, 2, 1, 1), integer32().subtype(subtypeSpec=value_range_constraint(1, 2147483647)))
if mibBuilder.loadTexts:
vrrpSyncGroupMemberInstanceIndex.setStatus('current')
if mibBuilder.loadTexts:
vrrpSyncGroupMemberInstanceIndex.setDescription('Index of an instance in a synchronisation group. There is no relation with this index and the index of the corresponding instance in vrrpInstanceTable. Use the name to find out the corresponding instance.')
vrrp_sync_group_member_name = mib_table_column((1, 3, 6, 1, 4, 1, 9586, 100, 5, 2, 2, 1, 2), display_string()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
vrrpSyncGroupMemberName.setStatus('current')
if mibBuilder.loadTexts:
vrrpSyncGroupMemberName.setDescription('Name of the instance contained in the synchronisation group.')
vrrp_instance_table = mib_table((1, 3, 6, 1, 4, 1, 9586, 100, 5, 2, 3))
if mibBuilder.loadTexts:
vrrpInstanceTable.setStatus('current')
if mibBuilder.loadTexts:
vrrpInstanceTable.setDescription('Table of VRRP instances')
vrrp_instance_entry = mib_table_row((1, 3, 6, 1, 4, 1, 9586, 100, 5, 2, 3, 1)).setIndexNames((0, 'KEEPALIVED-MIB', 'vrrpInstanceIndex'))
if mibBuilder.loadTexts:
vrrpInstanceEntry.setStatus('current')
if mibBuilder.loadTexts:
vrrpInstanceEntry.setDescription('Information describing a sync group')
vrrp_instance_index = mib_table_column((1, 3, 6, 1, 4, 1, 9586, 100, 5, 2, 3, 1, 1), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(0))).clone(namedValues=named_values(('static', 0))))
if mibBuilder.loadTexts:
vrrpInstanceIndex.setStatus('current')
if mibBuilder.loadTexts:
vrrpInstanceIndex.setDescription('Index of the VRRP instance. Instance 0 is for static IP and static routes.')
vrrp_instance_name = mib_table_column((1, 3, 6, 1, 4, 1, 9586, 100, 5, 2, 3, 1, 2), display_string()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
vrrpInstanceName.setStatus('current')
if mibBuilder.loadTexts:
vrrpInstanceName.setDescription('Name of the VRRP instance.')
vrrp_instance_virtual_router_id = mib_table_column((1, 3, 6, 1, 4, 1, 9586, 100, 5, 2, 3, 1, 3), unsigned32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
vrrpInstanceVirtualRouterId.setStatus('current')
if mibBuilder.loadTexts:
vrrpInstanceVirtualRouterId.setDescription('Virtual Router ID (VRID) for this VRRP instance.')
vrrp_instance_state = mib_table_column((1, 3, 6, 1, 4, 1, 9586, 100, 5, 2, 3, 1, 4), vrrp_state()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
vrrpInstanceState.setStatus('current')
if mibBuilder.loadTexts:
vrrpInstanceState.setDescription('Current state of this VRRP instance.')
vrrp_instance_initial_state = mib_table_column((1, 3, 6, 1, 4, 1, 9586, 100, 5, 2, 3, 1, 5), vrrp_state()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
vrrpInstanceInitialState.setStatus('current')
if mibBuilder.loadTexts:
vrrpInstanceInitialState.setDescription('Initial state of this VRRP instance.')
vrrp_instance_wanted_state = mib_table_column((1, 3, 6, 1, 4, 1, 9586, 100, 5, 2, 3, 1, 6), vrrp_state()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
vrrpInstanceWantedState.setStatus('current')
if mibBuilder.loadTexts:
vrrpInstanceWantedState.setDescription('State wanted by the operator for this VRRP instance.')
vrrp_instance_base_priority = mib_table_column((1, 3, 6, 1, 4, 1, 9586, 100, 5, 2, 3, 1, 7), integer32()).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
vrrpInstanceBasePriority.setStatus('current')
if mibBuilder.loadTexts:
vrrpInstanceBasePriority.setDescription('Base priority (as defined in the configuration file) for this VRRP instance. This value can be modified to force the virtual router instance to become backup or master. ')
vrrp_instance_effective_priority = mib_table_column((1, 3, 6, 1, 4, 1, 9586, 100, 5, 2, 3, 1, 8), integer32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
vrrpInstanceEffectivePriority.setStatus('current')
if mibBuilder.loadTexts:
vrrpInstanceEffectivePriority.setDescription('Effective priority for this VRRP instance. Status of interfaces and script results are used to compute this value from the base priority.')
vrrp_instance_vips_status = mib_table_column((1, 3, 6, 1, 4, 1, 9586, 100, 5, 2, 3, 1, 9), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2))).clone(namedValues=named_values(('allSet', 1), ('notAllSet', 2)))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
vrrpInstanceVipsStatus.setStatus('current')
if mibBuilder.loadTexts:
vrrpInstanceVipsStatus.setDescription('Are all VIP of this VRRP instance enabled?')
vrrp_instance_primary_interface = mib_table_column((1, 3, 6, 1, 4, 1, 9586, 100, 5, 2, 3, 1, 10), display_string()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
vrrpInstancePrimaryInterface.setStatus('current')
if mibBuilder.loadTexts:
vrrpInstancePrimaryInterface.setDescription('Primary interface of this VRRP instance.')
vrrp_instance_track_primary_if = mib_table_column((1, 3, 6, 1, 4, 1, 9586, 100, 5, 2, 3, 1, 11), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2))).clone(namedValues=named_values(('tracked', 1), ('notTracked', 2)))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
vrrpInstanceTrackPrimaryIf.setStatus('current')
if mibBuilder.loadTexts:
vrrpInstanceTrackPrimaryIf.setDescription('Do we track the status of the primary interface?')
vrrp_instance_advertisements_int = mib_table_column((1, 3, 6, 1, 4, 1, 9586, 100, 5, 2, 3, 1, 12), unsigned32()).setUnits('seconds').setMaxAccess('readonly')
if mibBuilder.loadTexts:
vrrpInstanceAdvertisementsInt.setStatus('current')
if mibBuilder.loadTexts:
vrrpInstanceAdvertisementsInt.setDescription('Delay in seconds between two VRRP advertisements.')
vrrp_instance_preempt = mib_table_column((1, 3, 6, 1, 4, 1, 9586, 100, 5, 2, 3, 1, 13), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2))).clone(namedValues=named_values(('preempt', 1), ('noPreempt', 2)))).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
vrrpInstancePreempt.setStatus('current')
if mibBuilder.loadTexts:
vrrpInstancePreempt.setDescription('Will a higher priority advertisement preempt a lower instance?')
vrrp_instance_preempt_delay = mib_table_column((1, 3, 6, 1, 4, 1, 9586, 100, 5, 2, 3, 1, 14), unsigned32()).setUnits('seconds').setMaxAccess('readonly')
if mibBuilder.loadTexts:
vrrpInstancePreemptDelay.setStatus('current')
if mibBuilder.loadTexts:
vrrpInstancePreemptDelay.setDescription('Delay after startup until preemption can happen. 0 means that there is no delay.')
vrrp_instance_auth_type = mib_table_column((1, 3, 6, 1, 4, 1, 9586, 100, 5, 2, 3, 1, 15), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(0, 1, 2))).clone(namedValues=named_values(('none', 0), ('password', 1), ('ah', 2)))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
vrrpInstanceAuthType.setStatus('current')
if mibBuilder.loadTexts:
vrrpInstanceAuthType.setDescription('Authentication method to authenticate other peers.')
vrrp_instance_lvs_sync_daemon = mib_table_column((1, 3, 6, 1, 4, 1, 9586, 100, 5, 2, 3, 1, 16), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2))).clone(namedValues=named_values(('enabled', 1), ('disabled', 2)))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
vrrpInstanceLvsSyncDaemon.setStatus('current')
if mibBuilder.loadTexts:
vrrpInstanceLvsSyncDaemon.setDescription('Is LVS sync daemon enabled for this VRRP instance?')
vrrp_instance_lvs_sync_interface = mib_table_column((1, 3, 6, 1, 4, 1, 9586, 100, 5, 2, 3, 1, 17), display_string()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
vrrpInstanceLvsSyncInterface.setStatus('current')
if mibBuilder.loadTexts:
vrrpInstanceLvsSyncInterface.setDescription('If LVS sync daemon is enabled, which interface to use for syncing?')
vrrp_instance_sync_group = mib_table_column((1, 3, 6, 1, 4, 1, 9586, 100, 5, 2, 3, 1, 18), display_string()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
vrrpInstanceSyncGroup.setStatus('current')
if mibBuilder.loadTexts:
vrrpInstanceSyncGroup.setDescription('Name of the synchronisation group this VRRP instance belongs, if any.')
vrrp_instance_garp_delay = mib_table_column((1, 3, 6, 1, 4, 1, 9586, 100, 5, 2, 3, 1, 19), unsigned32()).setUnits('seconds').setMaxAccess('readonly')
if mibBuilder.loadTexts:
vrrpInstanceGarpDelay.setStatus('current')
if mibBuilder.loadTexts:
vrrpInstanceGarpDelay.setDescription('Delay to launch gratuitous ARP (GARP).')
vrrp_instance_smtp_alert = mib_table_column((1, 3, 6, 1, 4, 1, 9586, 100, 5, 2, 3, 1, 20), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2))).clone(namedValues=named_values(('enabled', 1), ('disabled', 2)))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
vrrpInstanceSmtpAlert.setStatus('current')
if mibBuilder.loadTexts:
vrrpInstanceSmtpAlert.setDescription('Will SMTP alert be sent for this VRRP instance?')
vrrp_instance_notify_exec = mib_table_column((1, 3, 6, 1, 4, 1, 9586, 100, 5, 2, 3, 1, 21), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2))).clone(namedValues=named_values(('enabled', 1), ('disabled', 2)))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
vrrpInstanceNotifyExec.setStatus('current')
if mibBuilder.loadTexts:
vrrpInstanceNotifyExec.setDescription('Will we execute notification script for this instance?')
vrrp_instance_script_master = mib_table_column((1, 3, 6, 1, 4, 1, 9586, 100, 5, 2, 3, 1, 22), display_string()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
vrrpInstanceScriptMaster.setStatus('current')
if mibBuilder.loadTexts:
vrrpInstanceScriptMaster.setDescription('Script to execute when the instance becomes master.')
vrrp_instance_script_backup = mib_table_column((1, 3, 6, 1, 4, 1, 9586, 100, 5, 2, 3, 1, 23), display_string()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
vrrpInstanceScriptBackup.setStatus('current')
if mibBuilder.loadTexts:
vrrpInstanceScriptBackup.setDescription('Script to execute when the instance becomes backup.')
vrrp_instance_script_fault = mib_table_column((1, 3, 6, 1, 4, 1, 9586, 100, 5, 2, 3, 1, 24), display_string()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
vrrpInstanceScriptFault.setStatus('current')
if mibBuilder.loadTexts:
vrrpInstanceScriptFault.setDescription('Script to execute when the instance is in fault state.')
vrrp_instance_script_stop = mib_table_column((1, 3, 6, 1, 4, 1, 9586, 100, 5, 2, 3, 1, 25), display_string()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
vrrpInstanceScriptStop.setStatus('current')
if mibBuilder.loadTexts:
vrrpInstanceScriptStop.setDescription('Script to execute when the instance is stopped.')
vrrp_instance_script = mib_table_column((1, 3, 6, 1, 4, 1, 9586, 100, 5, 2, 3, 1, 26), display_string()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
vrrpInstanceScript.setStatus('current')
if mibBuilder.loadTexts:
vrrpInstanceScript.setDescription('Script to execute whenever a state change occurs.')
vrrp_tracked_interface_table = mib_table((1, 3, 6, 1, 4, 1, 9586, 100, 5, 2, 4))
if mibBuilder.loadTexts:
vrrpTrackedInterfaceTable.setStatus('current')
if mibBuilder.loadTexts:
vrrpTrackedInterfaceTable.setDescription('Table of tracked interfaces for each VRRP instance.')
vrrp_tracked_interface_entry = mib_table_row((1, 3, 6, 1, 4, 1, 9586, 100, 5, 2, 4, 1)).setIndexNames((0, 'KEEPALIVED-MIB', 'vrrpInstanceIndex'), (0, 'IF-MIB', 'ifIndex'))
if mibBuilder.loadTexts:
vrrpTrackedInterfaceEntry.setStatus('current')
if mibBuilder.loadTexts:
vrrpTrackedInterfaceEntry.setDescription('Information describing a tracked interface')
vrrp_tracked_interface_name = mib_table_column((1, 3, 6, 1, 4, 1, 9586, 100, 5, 2, 4, 1, 1), display_string()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
vrrpTrackedInterfaceName.setStatus('current')
if mibBuilder.loadTexts:
vrrpTrackedInterfaceName.setDescription('Name of the tracked interface.')
vrrp_tracked_interface_weight = mib_table_column((1, 3, 6, 1, 4, 1, 9586, 100, 5, 2, 4, 1, 2), integer32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
vrrpTrackedInterfaceWeight.setStatus('current')
if mibBuilder.loadTexts:
vrrpTrackedInterfaceWeight.setDescription('Weight of the tracked interface.')
vrrp_tracked_script_table = mib_table((1, 3, 6, 1, 4, 1, 9586, 100, 5, 2, 5))
if mibBuilder.loadTexts:
vrrpTrackedScriptTable.setStatus('current')
if mibBuilder.loadTexts:
vrrpTrackedScriptTable.setDescription('Table of tracked interfaces for each VRRP instance.')
vrrp_tracked_script_entry = mib_table_row((1, 3, 6, 1, 4, 1, 9586, 100, 5, 2, 5, 1)).setIndexNames((0, 'KEEPALIVED-MIB', 'vrrpInstanceIndex'), (0, 'KEEPALIVED-MIB', 'vrrpTrackedScriptIndex'))
if mibBuilder.loadTexts:
vrrpTrackedScriptEntry.setStatus('current')
if mibBuilder.loadTexts:
vrrpTrackedScriptEntry.setDescription('Information describing a tracked script')
vrrp_tracked_script_index = mib_table_column((1, 3, 6, 1, 4, 1, 9586, 100, 5, 2, 5, 1, 1), integer32().subtype(subtypeSpec=value_range_constraint(1, 2147483647)))
if mibBuilder.loadTexts:
vrrpTrackedScriptIndex.setStatus('current')
if mibBuilder.loadTexts:
vrrpTrackedScriptIndex.setDescription('Index of the tracked script in the set of tracked scripts for the given VRRP instance. This index has no relation with the index of vrrpScriptTable.')
vrrp_tracked_script_name = mib_table_column((1, 3, 6, 1, 4, 1, 9586, 100, 5, 2, 5, 1, 2), display_string()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
vrrpTrackedScriptName.setStatus('current')
if mibBuilder.loadTexts:
vrrpTrackedScriptName.setDescription('Name of the tracked interface.')
vrrp_tracked_script_weight = mib_table_column((1, 3, 6, 1, 4, 1, 9586, 100, 5, 2, 5, 1, 3), integer32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
vrrpTrackedScriptWeight.setStatus('current')
if mibBuilder.loadTexts:
vrrpTrackedScriptWeight.setDescription('Weight of the tracked interface.')
vrrp_address_table = mib_table((1, 3, 6, 1, 4, 1, 9586, 100, 5, 2, 6))
if mibBuilder.loadTexts:
vrrpAddressTable.setStatus('current')
if mibBuilder.loadTexts:
vrrpAddressTable.setDescription('Table of static and virtual addresses')
vrrp_address_entry = mib_table_row((1, 3, 6, 1, 4, 1, 9586, 100, 5, 2, 6, 1)).setIndexNames((0, 'KEEPALIVED-MIB', 'vrrpInstanceIndex'), (0, 'KEEPALIVED-MIB', 'vrrpAddressIndex'))
if mibBuilder.loadTexts:
vrrpAddressEntry.setStatus('current')
if mibBuilder.loadTexts:
vrrpAddressEntry.setDescription('Information describing an address. This can be a static address or a virtual address. In case of static address, the VRRP instance index is 0.')
vrrp_address_index = mib_table_column((1, 3, 6, 1, 4, 1, 9586, 100, 5, 2, 6, 1, 1), integer32().subtype(subtypeSpec=value_range_constraint(1, 2147483647)))
if mibBuilder.loadTexts:
vrrpAddressIndex.setStatus('current')
if mibBuilder.loadTexts:
vrrpAddressIndex.setDescription('Address index.')
vrrp_address_type = mib_table_column((1, 3, 6, 1, 4, 1, 9586, 100, 5, 2, 6, 1, 2), inet_address_type()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
vrrpAddressType.setStatus('current')
if mibBuilder.loadTexts:
vrrpAddressType.setDescription('A value that represents a type of Internet address.')
vrrp_address_value = mib_table_column((1, 3, 6, 1, 4, 1, 9586, 100, 5, 2, 6, 1, 3), inet_address()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
vrrpAddressValue.setStatus('current')
if mibBuilder.loadTexts:
vrrpAddressValue.setDescription('Actual IP address.')
vrrp_address_broadcast = mib_table_column((1, 3, 6, 1, 4, 1, 9586, 100, 5, 2, 6, 1, 4), inet_address()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
vrrpAddressBroadcast.setStatus('current')
if mibBuilder.loadTexts:
vrrpAddressBroadcast.setDescription('Broadcast address associated with the IP address.')
vrrp_address_mask = mib_table_column((1, 3, 6, 1, 4, 1, 9586, 100, 5, 2, 6, 1, 5), inet_address_prefix_length()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
vrrpAddressMask.setStatus('current')
if mibBuilder.loadTexts:
vrrpAddressMask.setDescription('Address mask.')
vrrp_address_scope = mib_table_column((1, 3, 6, 1, 4, 1, 9586, 100, 5, 2, 6, 1, 6), inet_scope_type()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
vrrpAddressScope.setStatus('current')
if mibBuilder.loadTexts:
vrrpAddressScope.setDescription('Address scope.')
vrrp_address_if_index = mib_table_column((1, 3, 6, 1, 4, 1, 9586, 100, 5, 2, 6, 1, 7), interface_index()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
vrrpAddressIfIndex.setStatus('current')
if mibBuilder.loadTexts:
vrrpAddressIfIndex.setDescription('Index of the interface to which the IP address is linked to.')
vrrp_address_if_name = mib_table_column((1, 3, 6, 1, 4, 1, 9586, 100, 5, 2, 6, 1, 8), display_string()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
vrrpAddressIfName.setStatus('current')
if mibBuilder.loadTexts:
vrrpAddressIfName.setDescription('Name of the interface to which the IP address is linked to.')
vrrp_address_if_alias = mib_table_column((1, 3, 6, 1, 4, 1, 9586, 100, 5, 2, 6, 1, 9), display_string()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
vrrpAddressIfAlias.setStatus('current')
if mibBuilder.loadTexts:
vrrpAddressIfAlias.setDescription('Alias name of the interface.')
vrrp_address_status = mib_table_column((1, 3, 6, 1, 4, 1, 9586, 100, 5, 2, 6, 1, 10), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2))).clone(namedValues=named_values(('set', 1), ('unset', 2)))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
vrrpAddressStatus.setStatus('current')
if mibBuilder.loadTexts:
vrrpAddressStatus.setDescription('Is the IP address set?')
vrrp_address_advertising = mib_table_column((1, 3, 6, 1, 4, 1, 9586, 100, 5, 2, 6, 1, 11), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2))).clone(namedValues=named_values(('advertised', 1), ('notAdvertised', 2)))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
vrrpAddressAdvertising.setStatus('current')
if mibBuilder.loadTexts:
vrrpAddressAdvertising.setDescription('Status of VRRP advertising for this IP address.')
vrrp_route_table = mib_table((1, 3, 6, 1, 4, 1, 9586, 100, 5, 2, 7))
if mibBuilder.loadTexts:
vrrpRouteTable.setStatus('current')
if mibBuilder.loadTexts:
vrrpRouteTable.setDescription('Table of static and virtual routes.')
vrrp_route_entry = mib_table_row((1, 3, 6, 1, 4, 1, 9586, 100, 5, 2, 7, 1)).setIndexNames((0, 'KEEPALIVED-MIB', 'vrrpInstanceIndex'), (0, 'KEEPALIVED-MIB', 'vrrpRouteIndex'))
if mibBuilder.loadTexts:
vrrpRouteEntry.setStatus('current')
if mibBuilder.loadTexts:
vrrpRouteEntry.setDescription('Information describing a route. In case of a static route, the instance index is 0.')
vrrp_route_index = mib_table_column((1, 3, 6, 1, 4, 1, 9586, 100, 5, 2, 7, 1, 1), integer32().subtype(subtypeSpec=value_range_constraint(1, 2147483647)))
if mibBuilder.loadTexts:
vrrpRouteIndex.setStatus('current')
if mibBuilder.loadTexts:
vrrpRouteIndex.setDescription('Route index.')
vrrp_route_address_type = mib_table_column((1, 3, 6, 1, 4, 1, 9586, 100, 5, 2, 7, 1, 2), inet_address_type()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
vrrpRouteAddressType.setStatus('current')
if mibBuilder.loadTexts:
vrrpRouteAddressType.setDescription('Route type of internet address.')
vrrp_route_destination = mib_table_column((1, 3, 6, 1, 4, 1, 9586, 100, 5, 2, 7, 1, 3), inet_address()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
vrrpRouteDestination.setStatus('current')
if mibBuilder.loadTexts:
vrrpRouteDestination.setDescription('Route destination.')
vrrp_route_destination_mask = mib_table_column((1, 3, 6, 1, 4, 1, 9586, 100, 5, 2, 7, 1, 4), inet_address_prefix_length()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
vrrpRouteDestinationMask.setStatus('current')
if mibBuilder.loadTexts:
vrrpRouteDestinationMask.setDescription('Route destination mask.')
vrrp_route_gateway = mib_table_column((1, 3, 6, 1, 4, 1, 9586, 100, 5, 2, 7, 1, 5), inet_address()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
vrrpRouteGateway.setStatus('current')
if mibBuilder.loadTexts:
vrrpRouteGateway.setDescription('Gateway for the given destination.')
vrrp_route_secondary_gateway = mib_table_column((1, 3, 6, 1, 4, 1, 9586, 100, 5, 2, 7, 1, 6), inet_address()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
vrrpRouteSecondaryGateway.setStatus('current')
if mibBuilder.loadTexts:
vrrpRouteSecondaryGateway.setDescription('An optional second gateway for the given destination.')
vrrp_route_source = mib_table_column((1, 3, 6, 1, 4, 1, 9586, 100, 5, 2, 7, 1, 7), inet_address()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
vrrpRouteSource.setStatus('current')
if mibBuilder.loadTexts:
vrrpRouteSource.setDescription('Which source IP address to use with this route.')
vrrp_route_metric = mib_table_column((1, 3, 6, 1, 4, 1, 9586, 100, 5, 2, 7, 1, 8), unsigned32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
vrrpRouteMetric.setStatus('current')
if mibBuilder.loadTexts:
vrrpRouteMetric.setDescription('Metric of this route.')
vrrp_route_scope = mib_table_column((1, 3, 6, 1, 4, 1, 9586, 100, 5, 2, 7, 1, 9), inet_scope_type()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
vrrpRouteScope.setStatus('current')
if mibBuilder.loadTexts:
vrrpRouteScope.setDescription('Scope of this route.')
vrrp_route_type = mib_table_column((1, 3, 6, 1, 4, 1, 9586, 100, 5, 2, 7, 1, 10), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3))).clone(namedValues=named_values(('normal', 1), ('ecmp', 2), ('blackhole', 3)))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
vrrpRouteType.setStatus('current')
if mibBuilder.loadTexts:
vrrpRouteType.setDescription('Kind of route.')
vrrp_route_if_index = mib_table_column((1, 3, 6, 1, 4, 1, 9586, 100, 5, 2, 7, 1, 11), interface_index()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
vrrpRouteIfIndex.setStatus('current')
if mibBuilder.loadTexts:
vrrpRouteIfIndex.setDescription('Interface attached to this route.')
vrrp_route_if_name = mib_table_column((1, 3, 6, 1, 4, 1, 9586, 100, 5, 2, 7, 1, 12), display_string()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
vrrpRouteIfName.setStatus('current')
if mibBuilder.loadTexts:
vrrpRouteIfName.setDescription('Name of the interface of attached to this route.')
vrrp_route_routing_table = mib_table_column((1, 3, 6, 1, 4, 1, 9586, 100, 5, 2, 7, 1, 13), unsigned32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
vrrpRouteRoutingTable.setStatus('current')
if mibBuilder.loadTexts:
vrrpRouteRoutingTable.setDescription('Routing table where to route should be inserted.')
vrrp_route_status = mib_table_column((1, 3, 6, 1, 4, 1, 9586, 100, 5, 2, 7, 1, 14), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2))).clone(namedValues=named_values(('set', 1), ('unset', 2)))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
vrrpRouteStatus.setStatus('current')
if mibBuilder.loadTexts:
vrrpRouteStatus.setDescription('Is this route set in the kernel?')
vrrp_script_table = mib_table((1, 3, 6, 1, 4, 1, 9586, 100, 5, 2, 8))
if mibBuilder.loadTexts:
vrrpScriptTable.setStatus('current')
if mibBuilder.loadTexts:
vrrpScriptTable.setDescription('Table of VRRP scripts')
vrrp_script_entry = mib_table_row((1, 3, 6, 1, 4, 1, 9586, 100, 5, 2, 8, 1)).setIndexNames((0, 'KEEPALIVED-MIB', 'vrrpScriptIndex'))
if mibBuilder.loadTexts:
vrrpScriptEntry.setStatus('current')
if mibBuilder.loadTexts:
vrrpScriptEntry.setDescription('Information describing a VRRP script')
vrrp_script_index = mib_table_column((1, 3, 6, 1, 4, 1, 9586, 100, 5, 2, 8, 1, 1), integer32().subtype(subtypeSpec=value_range_constraint(1, 2147483647)))
if mibBuilder.loadTexts:
vrrpScriptIndex.setStatus('current')
if mibBuilder.loadTexts:
vrrpScriptIndex.setDescription('Script index.')
vrrp_script_name = mib_table_column((1, 3, 6, 1, 4, 1, 9586, 100, 5, 2, 8, 1, 2), display_string()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
vrrpScriptName.setStatus('current')
if mibBuilder.loadTexts:
vrrpScriptName.setDescription('Symbolic name of the script.')
vrrp_script_command = mib_table_column((1, 3, 6, 1, 4, 1, 9586, 100, 5, 2, 8, 1, 3), display_string()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
vrrpScriptCommand.setStatus('current')
if mibBuilder.loadTexts:
vrrpScriptCommand.setDescription('Command executed when running the script.')
vrrp_script_interval = mib_table_column((1, 3, 6, 1, 4, 1, 9586, 100, 5, 2, 8, 1, 4), integer32()).setUnits('seconds').setMaxAccess('readonly')
if mibBuilder.loadTexts:
vrrpScriptInterval.setStatus('current')
if mibBuilder.loadTexts:
vrrpScriptInterval.setDescription('Interval between two runs of the script.')
vrrp_script_weight = mib_table_column((1, 3, 6, 1, 4, 1, 9586, 100, 5, 2, 8, 1, 5), integer32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
vrrpScriptWeight.setStatus('current')
if mibBuilder.loadTexts:
vrrpScriptWeight.setDescription('Weight of the script if successful.')
vrrp_script_result = mib_table_column((1, 3, 6, 1, 4, 1, 9586, 100, 5, 2, 8, 1, 6), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(0, 1, 2, 3, 4))).clone(namedValues=named_values(('disabled', 0), ('init', 1), ('bad', 2), ('good', 3), ('initgood', 4)))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
vrrpScriptResult.setStatus('current')
if mibBuilder.loadTexts:
vrrpScriptResult.setDescription('Current status of the script.')
vrrp_script_rise = mib_table_column((1, 3, 6, 1, 4, 1, 9586, 100, 5, 2, 8, 1, 7), unsigned32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
vrrpScriptRise.setStatus('current')
if mibBuilder.loadTexts:
vrrpScriptRise.setDescription('How many times the script should succeed before OK.')
vrrp_script_fall = mib_table_column((1, 3, 6, 1, 4, 1, 9586, 100, 5, 2, 8, 1, 8), unsigned32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
vrrpScriptFall.setStatus('current')
if mibBuilder.loadTexts:
vrrpScriptFall.setDescription('How many times the script should fail before KO.')
vrrp_trap = mib_identifier((1, 3, 6, 1, 4, 1, 9586, 100, 5, 2, 9))
vrrp_traps = mib_identifier((1, 3, 6, 1, 4, 1, 9586, 100, 5, 2, 9, 0))
vrrp_trap_control = mib_identifier((1, 3, 6, 1, 4, 1, 9586, 100, 5, 2, 9, 1))
vrrp_sync_group_state_change = notification_type((1, 3, 6, 1, 4, 1, 9586, 100, 5, 2, 9, 0, 1)).setObjects(('KEEPALIVED-MIB', 'vrrpSyncGroupName'), ('KEEPALIVED-MIB', 'vrrpSyncGroupState'))
if mibBuilder.loadTexts:
vrrpSyncGroupStateChange.setStatus('current')
if mibBuilder.loadTexts:
vrrpSyncGroupStateChange.setDescription('This trap signifies that the state of the whole vrrp sync group changed.')
vrrp_instance_state_change = notification_type((1, 3, 6, 1, 4, 1, 9586, 100, 5, 2, 9, 0, 2)).setObjects(('KEEPALIVED-MIB', 'vrrpInstanceName'), ('KEEPALIVED-MIB', 'vrrpInstanceState'), ('KEEPALIVED-MIB', 'vrrpInstanceInitialState'))
if mibBuilder.loadTexts:
vrrpInstanceStateChange.setStatus('current')
if mibBuilder.loadTexts:
vrrpInstanceStateChange.setDescription('This trap signifies that the state of a vrrp instance changed.')
virtual_server_group_table = mib_table((1, 3, 6, 1, 4, 1, 9586, 100, 5, 3, 1))
if mibBuilder.loadTexts:
virtualServerGroupTable.setStatus('current')
if mibBuilder.loadTexts:
virtualServerGroupTable.setDescription('Table of virtual server groups.')
virtual_server_group_entry = mib_table_row((1, 3, 6, 1, 4, 1, 9586, 100, 5, 3, 1, 1)).setIndexNames((0, 'KEEPALIVED-MIB', 'virtualServerGroupIndex'))
if mibBuilder.loadTexts:
virtualServerGroupEntry.setStatus('current')
if mibBuilder.loadTexts:
virtualServerGroupEntry.setDescription('Information describing a virtual server group.')
virtual_server_group_index = mib_table_column((1, 3, 6, 1, 4, 1, 9586, 100, 5, 3, 1, 1, 1), integer32().subtype(subtypeSpec=value_range_constraint(1, 2147483647)))
if mibBuilder.loadTexts:
virtualServerGroupIndex.setStatus('current')
if mibBuilder.loadTexts:
virtualServerGroupIndex.setDescription('Index of the virtual server group.')
virtual_server_group_name = mib_table_column((1, 3, 6, 1, 4, 1, 9586, 100, 5, 3, 1, 1, 2), display_string()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
virtualServerGroupName.setStatus('current')
if mibBuilder.loadTexts:
virtualServerGroupName.setDescription('Name of the virtual server group.')
virtual_server_group_member_table = mib_table((1, 3, 6, 1, 4, 1, 9586, 100, 5, 3, 2))
if mibBuilder.loadTexts:
virtualServerGroupMemberTable.setStatus('current')
if mibBuilder.loadTexts:
virtualServerGroupMemberTable.setDescription('Table of members of a virtual server group.')
virtual_server_group_member_entry = mib_table_row((1, 3, 6, 1, 4, 1, 9586, 100, 5, 3, 2, 1)).setIndexNames((0, 'KEEPALIVED-MIB', 'virtualServerGroupIndex'), (0, 'KEEPALIVED-MIB', 'virtualServerGroupMemberIndex'))
if mibBuilder.loadTexts:
virtualServerGroupMemberEntry.setStatus('current')
if mibBuilder.loadTexts:
virtualServerGroupMemberEntry.setDescription('Description of a member of a virtual server group.')
virtual_server_group_member_index = mib_table_column((1, 3, 6, 1, 4, 1, 9586, 100, 5, 3, 2, 1, 1), integer32().subtype(subtypeSpec=value_range_constraint(1, 2147483647)))
if mibBuilder.loadTexts:
virtualServerGroupMemberIndex.setStatus('current')
if mibBuilder.loadTexts:
virtualServerGroupMemberIndex.setDescription('Index of the member into virtual server group.')
virtual_server_group_member_type = mib_table_column((1, 3, 6, 1, 4, 1, 9586, 100, 5, 3, 2, 1, 2), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3))).clone(namedValues=named_values(('fwmark', 1), ('ip', 2), ('iprange', 3)))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
virtualServerGroupMemberType.setStatus('current')
if mibBuilder.loadTexts:
virtualServerGroupMemberType.setDescription('Kind of entry: firewall mark, address with port or range of addresses with port.')
virtual_server_group_member_fw_mark = mib_table_column((1, 3, 6, 1, 4, 1, 9586, 100, 5, 3, 2, 1, 3), unsigned32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
virtualServerGroupMemberFwMark.setStatus('current')
if mibBuilder.loadTexts:
virtualServerGroupMemberFwMark.setDescription('Firewall mark for this member. If the kind of this member is not fwmark(1), then this entry should not exist for the current row.')
virtual_server_group_member_addr_type = mib_table_column((1, 3, 6, 1, 4, 1, 9586, 100, 5, 3, 2, 1, 4), inet_address_type()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
virtualServerGroupMemberAddrType.setStatus('current')
if mibBuilder.loadTexts:
virtualServerGroupMemberAddrType.setDescription('Type of IP address for this member. If the kind of this member is neither address(2) or range(3), then this entry should not exist for the current row.')
virtual_server_group_member_address = mib_table_column((1, 3, 6, 1, 4, 1, 9586, 100, 5, 3, 2, 1, 5), inet_address()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
virtualServerGroupMemberAddress.setStatus('current')
if mibBuilder.loadTexts:
virtualServerGroupMemberAddress.setDescription('IP address of this member. If the kind of this member is not address(2), then this entry should not exist for the current row.')
virtual_server_group_member_addr1 = mib_table_column((1, 3, 6, 1, 4, 1, 9586, 100, 5, 3, 2, 1, 6), inet_address()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
virtualServerGroupMemberAddr1.setStatus('current')
if mibBuilder.loadTexts:
virtualServerGroupMemberAddr1.setDescription('First IP address of the range for this member. If the kind of this member is not range(3), then this entry should not exist for the current row.')
virtual_server_group_member_addr2 = mib_table_column((1, 3, 6, 1, 4, 1, 9586, 100, 5, 3, 2, 1, 7), inet_address()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
virtualServerGroupMemberAddr2.setStatus('current')
if mibBuilder.loadTexts:
virtualServerGroupMemberAddr2.setDescription('Second IP address of the range for this member. If the kind of this member is not range(3), then this entry should not exist for the current row.')
virtual_server_group_member_port = mib_table_column((1, 3, 6, 1, 4, 1, 9586, 100, 5, 3, 2, 1, 8), inet_port_number()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
virtualServerGroupMemberPort.setStatus('current')
if mibBuilder.loadTexts:
virtualServerGroupMemberPort.setDescription('V port for this member. If the kind of this member is neither address(2) nor range(3), then this entry should not exist for the current row.')
virtual_server_table = mib_table((1, 3, 6, 1, 4, 1, 9586, 100, 5, 3, 3))
if mibBuilder.loadTexts:
virtualServerTable.setStatus('current')
if mibBuilder.loadTexts:
virtualServerTable.setDescription('Table of virtual servers.')
virtual_server_entry = mib_table_row((1, 3, 6, 1, 4, 1, 9586, 100, 5, 3, 3, 1)).setIndexNames((0, 'KEEPALIVED-MIB', 'virtualServerIndex'))
if mibBuilder.loadTexts:
virtualServerEntry.setStatus('current')
if mibBuilder.loadTexts:
virtualServerEntry.setDescription('Information describing a virtual server.')
virtual_server_index = mib_table_column((1, 3, 6, 1, 4, 1, 9586, 100, 5, 3, 3, 1, 1), integer32().subtype(subtypeSpec=value_range_constraint(1, 2147483647)))
if mibBuilder.loadTexts:
virtualServerIndex.setStatus('current')
if mibBuilder.loadTexts:
virtualServerIndex.setDescription('Index of the virtual server.')
virtual_server_type = mib_table_column((1, 3, 6, 1, 4, 1, 9586, 100, 5, 3, 3, 1, 2), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3))).clone(namedValues=named_values(('fwmark', 1), ('ip', 2), ('group', 3)))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
virtualServerType.setStatus('current')
if mibBuilder.loadTexts:
virtualServerType.setDescription('Type of virtual server. A virtual server can either be defined from a firewall mark, an IP and a port or from a virtual server group.')
virtual_server_name_of_group = mib_table_column((1, 3, 6, 1, 4, 1, 9586, 100, 5, 3, 3, 1, 3), display_string()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
virtualServerNameOfGroup.setStatus('current')
if mibBuilder.loadTexts:
virtualServerNameOfGroup.setDescription('If the virtual is defined from a group, this is the name of the group.')
virtual_server_fw_mark = mib_table_column((1, 3, 6, 1, 4, 1, 9586, 100, 5, 3, 3, 1, 4), unsigned32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
virtualServerFwMark.setStatus('current')
if mibBuilder.loadTexts:
virtualServerFwMark.setDescription('If the virtual server is defined from a firewall mark, this is the value of the mark. Otherwise, this column should not exist in the current row.')
virtual_server_addr_type = mib_table_column((1, 3, 6, 1, 4, 1, 9586, 100, 5, 3, 3, 1, 5), inet_address_type()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
virtualServerAddrType.setStatus('current')
if mibBuilder.loadTexts:
virtualServerAddrType.setDescription('If the virtual server is defined from an IP, this is the address family. Otherwise, this column should not exist in the current row.')
virtual_server_address = mib_table_column((1, 3, 6, 1, 4, 1, 9586, 100, 5, 3, 3, 1, 6), inet_address()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
virtualServerAddress.setStatus('current')
if mibBuilder.loadTexts:
virtualServerAddress.setDescription('If the virtual server is defined from an IP address, this is the value of the IP. Otherwise, this column should not exist in the current row.')
virtual_server_port = mib_table_column((1, 3, 6, 1, 4, 1, 9586, 100, 5, 3, 3, 1, 7), inet_port_number()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
virtualServerPort.setStatus('current')
if mibBuilder.loadTexts:
virtualServerPort.setDescription('If the virtual server is defined from an IP, this is the value of the port to listen for requests. Otherwise, this column should not exist in the current row.')
virtual_server_protocol = mib_table_column((1, 3, 6, 1, 4, 1, 9586, 100, 5, 3, 3, 1, 8), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2))).clone(namedValues=named_values(('tcp', 1), ('udp', 2)))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
virtualServerProtocol.setStatus('current')
if mibBuilder.loadTexts:
virtualServerProtocol.setDescription('Which transport protocol should be used for this virtual server.')
virtual_server_load_balancing_algo = mib_table_column((1, 3, 6, 1, 4, 1, 9586, 100, 5, 3, 3, 1, 9), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 99))).clone(namedValues=named_values(('rr', 1), ('wrr', 2), ('lc', 3), ('wlc', 4), ('lblc', 5), ('lblcr', 6), ('dh', 7), ('sh', 8), ('sed', 9), ('nq', 10), ('unknown', 99)))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
virtualServerLoadBalancingAlgo.setStatus('current')
if mibBuilder.loadTexts:
virtualServerLoadBalancingAlgo.setDescription('Which load balancing algorithm (or scheduler) should be used for this virtual server.')
virtual_server_load_balancing_kind = mib_table_column((1, 3, 6, 1, 4, 1, 9586, 100, 5, 3, 3, 1, 10), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3))).clone(namedValues=named_values(('nat', 1), ('dr', 2), ('tun', 3)))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
virtualServerLoadBalancingKind.setStatus('current')
if mibBuilder.loadTexts:
virtualServerLoadBalancingKind.setDescription('Forwarding method to use for this virtual server.')
virtual_server_status = mib_table_column((1, 3, 6, 1, 4, 1, 9586, 100, 5, 3, 3, 1, 11), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2))).clone(namedValues=named_values(('alive', 1), ('dead', 2)))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
virtualServerStatus.setStatus('current')
if mibBuilder.loadTexts:
virtualServerStatus.setDescription('Current status of this virtual server.')
virtual_server_virtual_host = mib_table_column((1, 3, 6, 1, 4, 1, 9586, 100, 5, 3, 3, 1, 12), display_string()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
virtualServerVirtualHost.setStatus('current')
if mibBuilder.loadTexts:
virtualServerVirtualHost.setDescription('Virtualhost of this server for HTTP like requests.')
virtual_server_persist = mib_table_column((1, 3, 6, 1, 4, 1, 9586, 100, 5, 3, 3, 1, 13), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2))).clone(namedValues=named_values(('enabled', 1), ('disabled', 2)))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
virtualServerPersist.setStatus('current')
if mibBuilder.loadTexts:
virtualServerPersist.setDescription('Is the virtual service persistence enabled?')
virtual_server_persist_timeout = mib_table_column((1, 3, 6, 1, 4, 1, 9586, 100, 5, 3, 3, 1, 14), unsigned32()).setUnits('seconds').setMaxAccess('readonly')
if mibBuilder.loadTexts:
virtualServerPersistTimeout.setStatus('current')
if mibBuilder.loadTexts:
virtualServerPersistTimeout.setDescription('If this virtual service is persistence, what is the timeout.')
virtual_server_persist_granularity = mib_table_column((1, 3, 6, 1, 4, 1, 9586, 100, 5, 3, 3, 1, 15), inet_address()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
virtualServerPersistGranularity.setStatus('current')
if mibBuilder.loadTexts:
virtualServerPersistGranularity.setDescription('Netmask specifying the granularity of the persistence mechanism.')
virtual_server_delay_loop = mib_table_column((1, 3, 6, 1, 4, 1, 9586, 100, 5, 3, 3, 1, 16), unsigned32()).setUnits('seconds').setMaxAccess('readonly')
if mibBuilder.loadTexts:
virtualServerDelayLoop.setStatus('current')
if mibBuilder.loadTexts:
virtualServerDelayLoop.setDescription('Delay in seconds between two checks.')
virtual_server_ha_suspend = mib_table_column((1, 3, 6, 1, 4, 1, 9586, 100, 5, 3, 3, 1, 17), truth_value()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
virtualServerHaSuspend.setStatus('current')
if mibBuilder.loadTexts:
virtualServerHaSuspend.setDescription('If set to true(1), checks will be suspended if the IP of the virtual server is currently not set.')
virtual_server_alpha = mib_table_column((1, 3, 6, 1, 4, 1, 9586, 100, 5, 3, 3, 1, 18), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2))).clone(namedValues=named_values(('enabled', 1), ('disabled', 2)))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
virtualServerAlpha.setStatus('current')
if mibBuilder.loadTexts:
virtualServerAlpha.setDescription('Is alpha mode enabled?')
virtual_server_omega = mib_table_column((1, 3, 6, 1, 4, 1, 9586, 100, 5, 3, 3, 1, 19), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2))).clone(namedValues=named_values(('enabled', 1), ('disabled', 2)))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
virtualServerOmega.setStatus('current')
if mibBuilder.loadTexts:
virtualServerOmega.setDescription('Is omega mode enabled?')
virtual_server_real_servers_total = mib_table_column((1, 3, 6, 1, 4, 1, 9586, 100, 5, 3, 3, 1, 20), unsigned32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
virtualServerRealServersTotal.setStatus('current')
if mibBuilder.loadTexts:
virtualServerRealServersTotal.setDescription('Total number of real servers for this virtual server.')
virtual_server_real_servers_up = mib_table_column((1, 3, 6, 1, 4, 1, 9586, 100, 5, 3, 3, 1, 21), unsigned32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
virtualServerRealServersUp.setStatus('current')
if mibBuilder.loadTexts:
virtualServerRealServersUp.setDescription('Real servers actually up for this virtual server.')
virtual_server_quorum = mib_table_column((1, 3, 6, 1, 4, 1, 9586, 100, 5, 3, 3, 1, 22), unsigned32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
virtualServerQuorum.setStatus('current')
if mibBuilder.loadTexts:
virtualServerQuorum.setDescription('Quorum to get amond real servers to consider this virtual server up.')
virtual_server_quorum_status = mib_table_column((1, 3, 6, 1, 4, 1, 9586, 100, 5, 3, 3, 1, 23), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2))).clone(namedValues=named_values(('met', 1), ('notMet', 2)))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
virtualServerQuorumStatus.setStatus('current')
if mibBuilder.loadTexts:
virtualServerQuorumStatus.setDescription('Current status of the quorum for this virtual server.')
virtual_server_quorum_up = mib_table_column((1, 3, 6, 1, 4, 1, 9586, 100, 5, 3, 3, 1, 24), display_string()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
virtualServerQuorumUp.setStatus('current')
if mibBuilder.loadTexts:
virtualServerQuorumUp.setDescription('Command to execute when the quorum is met.')
virtual_server_quorum_down = mib_table_column((1, 3, 6, 1, 4, 1, 9586, 100, 5, 3, 3, 1, 25), display_string()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
virtualServerQuorumDown.setStatus('current')
if mibBuilder.loadTexts:
virtualServerQuorumDown.setDescription('Command to execute when the quorum is not met.')
virtual_server_hysteresis = mib_table_column((1, 3, 6, 1, 4, 1, 9586, 100, 5, 3, 3, 1, 26), unsigned32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
virtualServerHysteresis.setStatus('current')
if mibBuilder.loadTexts:
virtualServerHysteresis.setDescription('Hysteresis with respect to quorum count.')
virtual_server_stats_conns = mib_table_column((1, 3, 6, 1, 4, 1, 9586, 100, 5, 3, 3, 1, 27), gauge32()).setUnits('connections').setMaxAccess('readonly')
if mibBuilder.loadTexts:
virtualServerStatsConns.setStatus('current')
if mibBuilder.loadTexts:
virtualServerStatsConns.setDescription('Total number of connections scheduled for this virtual server.')
virtual_server_stats_in_pkts = mib_table_column((1, 3, 6, 1, 4, 1, 9586, 100, 5, 3, 3, 1, 28), counter32()).setUnits('packets').setMaxAccess('readonly')
if mibBuilder.loadTexts:
virtualServerStatsInPkts.setStatus('current')
if mibBuilder.loadTexts:
virtualServerStatsInPkts.setDescription('Total number of incoming packets for this virtual server.')
virtual_server_stats_out_pkts = mib_table_column((1, 3, 6, 1, 4, 1, 9586, 100, 5, 3, 3, 1, 29), counter32()).setUnits('packets').setMaxAccess('readonly')
if mibBuilder.loadTexts:
virtualServerStatsOutPkts.setStatus('current')
if mibBuilder.loadTexts:
virtualServerStatsOutPkts.setDescription('Total number of outgoing packets for this virtual server.')
virtual_server_stats_in_bytes = mib_table_column((1, 3, 6, 1, 4, 1, 9586, 100, 5, 3, 3, 1, 30), counter64()).setUnits('bytes').setMaxAccess('readonly')
if mibBuilder.loadTexts:
virtualServerStatsInBytes.setStatus('current')
if mibBuilder.loadTexts:
virtualServerStatsInBytes.setDescription('Total number of incoming bytes for this virtual server.')
virtual_server_stats_out_bytes = mib_table_column((1, 3, 6, 1, 4, 1, 9586, 100, 5, 3, 3, 1, 31), counter64()).setUnits('bytes').setMaxAccess('readonly')
if mibBuilder.loadTexts:
virtualServerStatsOutBytes.setStatus('current')
if mibBuilder.loadTexts:
virtualServerStatsOutBytes.setDescription('Total number of outgoing bytes for this virtual server.')
virtual_server_rate_cps = mib_table_column((1, 3, 6, 1, 4, 1, 9586, 100, 5, 3, 3, 1, 32), gauge32()).setUnits('connections/s').setMaxAccess('readonly')
if mibBuilder.loadTexts:
virtualServerRateCps.setStatus('current')
if mibBuilder.loadTexts:
virtualServerRateCps.setDescription('Current connection rate for this virtual server.')
virtual_server_rate_in_pps = mib_table_column((1, 3, 6, 1, 4, 1, 9586, 100, 5, 3, 3, 1, 33), gauge32()).setUnits('packets/s').setMaxAccess('readonly')
if mibBuilder.loadTexts:
virtualServerRateInPPS.setStatus('current')
if mibBuilder.loadTexts:
virtualServerRateInPPS.setDescription('Current in packet rate for this virtual server.')
virtual_server_rate_out_pps = mib_table_column((1, 3, 6, 1, 4, 1, 9586, 100, 5, 3, 3, 1, 34), gauge32()).setUnits('packets/s').setMaxAccess('readonly')
if mibBuilder.loadTexts:
virtualServerRateOutPPS.setStatus('current')
if mibBuilder.loadTexts:
virtualServerRateOutPPS.setDescription('Current out packet rate for this virtual server.')
virtual_server_rate_in_bps = mib_table_column((1, 3, 6, 1, 4, 1, 9586, 100, 5, 3, 3, 1, 35), gauge32()).setUnits('bytes/s').setMaxAccess('readonly')
if mibBuilder.loadTexts:
virtualServerRateInBPS.setStatus('current')
if mibBuilder.loadTexts:
virtualServerRateInBPS.setDescription('Current incoming rate for this virtual server.')
virtual_server_rate_out_bps = mib_table_column((1, 3, 6, 1, 4, 1, 9586, 100, 5, 3, 3, 1, 36), gauge32()).setUnits('bytes/s').setMaxAccess('readonly')
if mibBuilder.loadTexts:
virtualServerRateOutBPS.setStatus('current')
if mibBuilder.loadTexts:
virtualServerRateOutBPS.setDescription('Current outgoing rate for this virtual server.')
real_server_table = mib_table((1, 3, 6, 1, 4, 1, 9586, 100, 5, 3, 4))
if mibBuilder.loadTexts:
realServerTable.setStatus('current')
if mibBuilder.loadTexts:
realServerTable.setDescription('Table of real servers. This includes regular real servers and sorry servers.')
real_server_entry = mib_table_row((1, 3, 6, 1, 4, 1, 9586, 100, 5, 3, 4, 1)).setIndexNames((0, 'KEEPALIVED-MIB', 'virtualServerIndex'), (0, 'KEEPALIVED-MIB', 'realServerIndex'))
if mibBuilder.loadTexts:
realServerEntry.setStatus('current')
if mibBuilder.loadTexts:
realServerEntry.setDescription('Information describing a real server.')
real_server_index = mib_table_column((1, 3, 6, 1, 4, 1, 9586, 100, 5, 3, 4, 1, 1), integer32().subtype(subtypeSpec=value_range_constraint(1, 2147483647)))
if mibBuilder.loadTexts:
realServerIndex.setStatus('current')
if mibBuilder.loadTexts:
realServerIndex.setDescription('Index of the real server.')
real_server_type = mib_table_column((1, 3, 6, 1, 4, 1, 9586, 100, 5, 3, 4, 1, 2), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2))).clone(namedValues=named_values(('regular', 1), ('sorry', 2)))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
realServerType.setStatus('current')
if mibBuilder.loadTexts:
realServerType.setDescription('Type of real server: either a regular real server or a sorry server.')
real_server_addr_type = mib_table_column((1, 3, 6, 1, 4, 1, 9586, 100, 5, 3, 4, 1, 3), inet_address_type()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
realServerAddrType.setStatus('current')
if mibBuilder.loadTexts:
realServerAddrType.setDescription('Address family for this real server.')
real_server_address = mib_table_column((1, 3, 6, 1, 4, 1, 9586, 100, 5, 3, 4, 1, 4), inet_address()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
realServerAddress.setStatus('current')
if mibBuilder.loadTexts:
realServerAddress.setDescription('IP address of this real server.')
real_server_port = mib_table_column((1, 3, 6, 1, 4, 1, 9586, 100, 5, 3, 4, 1, 5), inet_port_number()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
realServerPort.setStatus('current')
if mibBuilder.loadTexts:
realServerPort.setDescription('Port of the service.')
real_server_status = mib_table_column((1, 3, 6, 1, 4, 1, 9586, 100, 5, 3, 4, 1, 6), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2))).clone(namedValues=named_values(('alive', 1), ('dead', 2)))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
realServerStatus.setStatus('current')
if mibBuilder.loadTexts:
realServerStatus.setDescription('Status of this real server.')
real_server_weight = mib_table_column((1, 3, 6, 1, 4, 1, 9586, 100, 5, 3, 4, 1, 7), integer32()).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
realServerWeight.setStatus('current')
if mibBuilder.loadTexts:
realServerWeight.setDescription('Weight of this real server. This value can be set to 0 to disable the real server.')
real_server_upper_connection_limit = mib_table_column((1, 3, 6, 1, 4, 1, 9586, 100, 5, 3, 4, 1, 8), unsigned32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
realServerUpperConnectionLimit.setStatus('current')
if mibBuilder.loadTexts:
realServerUpperConnectionLimit.setDescription('Maximum number of connections for this real server.')
real_server_lower_connection_limit = mib_table_column((1, 3, 6, 1, 4, 1, 9586, 100, 5, 3, 4, 1, 9), unsigned32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
realServerLowerConnectionLimit.setStatus('current')
if mibBuilder.loadTexts:
realServerLowerConnectionLimit.setDescription('Minimum number of connections for this real server.')
real_server_action_when_down = mib_table_column((1, 3, 6, 1, 4, 1, 9586, 100, 5, 3, 4, 1, 10), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2))).clone(namedValues=named_values(('remove', 1), ('inhibit', 2)))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
realServerActionWhenDown.setStatus('current')
if mibBuilder.loadTexts:
realServerActionWhenDown.setDescription('What action is performed when this server is down. Its weight can be set to 0 (inhibit) or it can be removed from the pool.')
real_server_notify_up = mib_table_column((1, 3, 6, 1, 4, 1, 9586, 100, 5, 3, 4, 1, 11), display_string()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
realServerNotifyUp.setStatus('current')
if mibBuilder.loadTexts:
realServerNotifyUp.setDescription('Command to execute when this server becomes alive.')
real_server_notify_down = mib_table_column((1, 3, 6, 1, 4, 1, 9586, 100, 5, 3, 4, 1, 12), display_string()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
realServerNotifyDown.setStatus('current')
if mibBuilder.loadTexts:
realServerNotifyDown.setDescription('Command to execute when this server becomes dead.')
real_server_failed_checks = mib_table_column((1, 3, 6, 1, 4, 1, 9586, 100, 5, 3, 4, 1, 13), unsigned32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
realServerFailedChecks.setStatus('current')
if mibBuilder.loadTexts:
realServerFailedChecks.setDescription('How many failed checks for this real server.')
real_server_stats_conns = mib_table_column((1, 3, 6, 1, 4, 1, 9586, 100, 5, 3, 4, 1, 14), gauge32()).setUnits('connections').setMaxAccess('readonly')
if mibBuilder.loadTexts:
realServerStatsConns.setStatus('current')
if mibBuilder.loadTexts:
realServerStatsConns.setDescription('Total number of connections scheduled for this real server.')
real_server_stats_active_conns = mib_table_column((1, 3, 6, 1, 4, 1, 9586, 100, 5, 3, 4, 1, 15), gauge32()).setUnits('connections').setMaxAccess('readonly')
if mibBuilder.loadTexts:
realServerStatsActiveConns.setStatus('current')
if mibBuilder.loadTexts:
realServerStatsActiveConns.setDescription('Current active connections for this real server.')
real_server_stats_inactive_conns = mib_table_column((1, 3, 6, 1, 4, 1, 9586, 100, 5, 3, 4, 1, 16), gauge32()).setUnits('connections').setMaxAccess('readonly')
if mibBuilder.loadTexts:
realServerStatsInactiveConns.setStatus('current')
if mibBuilder.loadTexts:
realServerStatsInactiveConns.setDescription('Current inactive connections for this real server.')
real_server_stats_persistent_conns = mib_table_column((1, 3, 6, 1, 4, 1, 9586, 100, 5, 3, 4, 1, 17), gauge32()).setUnits('connections').setMaxAccess('readonly')
if mibBuilder.loadTexts:
realServerStatsPersistentConns.setStatus('current')
if mibBuilder.loadTexts:
realServerStatsPersistentConns.setDescription('Current persistent connections for this real server.')
real_server_stats_in_pkts = mib_table_column((1, 3, 6, 1, 4, 1, 9586, 100, 5, 3, 4, 1, 18), counter32()).setUnits('packets').setMaxAccess('readonly')
if mibBuilder.loadTexts:
realServerStatsInPkts.setStatus('current')
if mibBuilder.loadTexts:
realServerStatsInPkts.setDescription('Total number of incoming packets for this real server.')
real_server_stats_out_pkts = mib_table_column((1, 3, 6, 1, 4, 1, 9586, 100, 5, 3, 4, 1, 19), counter32()).setUnits('packets').setMaxAccess('readonly')
if mibBuilder.loadTexts:
realServerStatsOutPkts.setStatus('current')
if mibBuilder.loadTexts:
realServerStatsOutPkts.setDescription('Total number of outgoing packets for this real server.')
real_server_stats_in_bytes = mib_table_column((1, 3, 6, 1, 4, 1, 9586, 100, 5, 3, 4, 1, 20), counter64()).setUnits('bytes').setMaxAccess('readonly')
if mibBuilder.loadTexts:
realServerStatsInBytes.setStatus('current')
if mibBuilder.loadTexts:
realServerStatsInBytes.setDescription('Total number of incoming bytes for this real server.')
real_server_stats_out_bytes = mib_table_column((1, 3, 6, 1, 4, 1, 9586, 100, 5, 3, 4, 1, 21), counter64()).setUnits('bytes').setMaxAccess('readonly')
if mibBuilder.loadTexts:
realServerStatsOutBytes.setStatus('current')
if mibBuilder.loadTexts:
realServerStatsOutBytes.setDescription('Total number of outgoing bytes for this real server.')
real_server_rate_cps = mib_table_column((1, 3, 6, 1, 4, 1, 9586, 100, 5, 3, 4, 1, 22), gauge32()).setUnits('connections/s').setMaxAccess('readonly')
if mibBuilder.loadTexts:
realServerRateCps.setStatus('current')
if mibBuilder.loadTexts:
realServerRateCps.setDescription('Current connection rate for this real server.')
real_server_rate_in_pps = mib_table_column((1, 3, 6, 1, 4, 1, 9586, 100, 5, 3, 4, 1, 23), gauge32()).setUnits('packets/s').setMaxAccess('readonly')
if mibBuilder.loadTexts:
realServerRateInPPS.setStatus('current')
if mibBuilder.loadTexts:
realServerRateInPPS.setDescription('Current in packet rate for this real server.')
real_server_rate_out_pps = mib_table_column((1, 3, 6, 1, 4, 1, 9586, 100, 5, 3, 4, 1, 24), gauge32()).setUnits('packets/s').setMaxAccess('readonly')
if mibBuilder.loadTexts:
realServerRateOutPPS.setStatus('current')
if mibBuilder.loadTexts:
realServerRateOutPPS.setDescription('Current out packet rate for this real server.')
real_server_rate_in_bps = mib_table_column((1, 3, 6, 1, 4, 1, 9586, 100, 5, 3, 4, 1, 25), gauge32()).setUnits('bytes/s').setMaxAccess('readonly')
if mibBuilder.loadTexts:
realServerRateInBPS.setStatus('current')
if mibBuilder.loadTexts:
realServerRateInBPS.setDescription('Current incoming rate for this real server.')
real_server_rate_out_bps = mib_table_column((1, 3, 6, 1, 4, 1, 9586, 100, 5, 3, 4, 1, 26), gauge32()).setUnits('bytes/s').setMaxAccess('readonly')
if mibBuilder.loadTexts:
realServerRateOutBPS.setStatus('current')
if mibBuilder.loadTexts:
realServerRateOutBPS.setDescription('Current outgoing rate for this real server.')
check_trap = mib_identifier((1, 3, 6, 1, 4, 1, 9586, 100, 5, 3, 5))
check_traps = mib_identifier((1, 3, 6, 1, 4, 1, 9586, 100, 5, 3, 5, 0))
check_trap_control = mib_identifier((1, 3, 6, 1, 4, 1, 9586, 100, 5, 3, 5, 1))
real_server_state_change = notification_type((1, 3, 6, 1, 4, 1, 9586, 100, 5, 3, 5, 0, 1)).setObjects(('KEEPALIVED-MIB', 'realServerAddrType'), ('KEEPALIVED-MIB', 'realServerAddress'), ('KEEPALIVED-MIB', 'realServerPort'), ('KEEPALIVED-MIB', 'realServerStatus'), ('KEEPALIVED-MIB', 'virtualServerType'), ('KEEPALIVED-MIB', 'virtualServerProtocol'), ('KEEPALIVED-MIB', 'virtualServerRealServersUp'), ('KEEPALIVED-MIB', 'virtualServerRealServersTotal'))
if mibBuilder.loadTexts:
realServerStateChange.setStatus('current')
if mibBuilder.loadTexts:
realServerStateChange.setDescription('This trap signifies that the state of a real server has changed. Additional varbinds will be added depending on the value of virtualServerType: virtualServerNameOfGroup, virtualServerFwMark, virtualServerAddrType, virtualServerAddress, virtualServerPort.')
virtual_server_quorum_state_change = notification_type((1, 3, 6, 1, 4, 1, 9586, 100, 5, 3, 5, 0, 2)).setObjects(('KEEPALIVED-MIB', 'virtualServerType'), ('KEEPALIVED-MIB', 'virtualServerProtocol'), ('KEEPALIVED-MIB', 'virtualServerQuorumStatus'), ('KEEPALIVED-MIB', 'virtualServerQuorum'), ('KEEPALIVED-MIB', 'virtualServerRealServersUp'), ('KEEPALIVED-MIB', 'virtualServerRealServersTotal'))
if mibBuilder.loadTexts:
virtualServerQuorumStateChange.setStatus('current')
if mibBuilder.loadTexts:
virtualServerQuorumStateChange.setDescription('This trap signifies that the quorum of a virtual server has changed. Additional varbinds will be added depending on the value of virtualServerType: virtualServerNameOfGroup, virtualServerFwMark, virtualServerAddrType, virtualServerAddress, virtualServerPort.')
compliances = mib_identifier((1, 3, 6, 1, 4, 1, 9586, 100, 5, 4, 1))
groups = mib_identifier((1, 3, 6, 1, 4, 1, 9586, 100, 5, 4, 2))
global_compliances = module_compliance((1, 3, 6, 1, 4, 1, 9586, 100, 5, 4, 1, 1)).setObjects(('KEEPALIVED-MIB', 'globalGroup'))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
global_compliances = globalCompliances.setStatus('current')
if mibBuilder.loadTexts:
globalCompliances.setDescription('Compliance statement for global data')
vrrp_compliances = module_compliance((1, 3, 6, 1, 4, 1, 9586, 100, 5, 4, 1, 2)).setObjects(('KEEPALIVED-MIB', 'vrrpScriptGroup'), ('KEEPALIVED-MIB', 'vrrpSyncGroup'), ('KEEPALIVED-MIB', 'vrrpInstanceGroup'), ('KEEPALIVED-MIB', 'vrrpTrapsGroup'))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
vrrp_compliances = vrrpCompliances.setStatus('current')
if mibBuilder.loadTexts:
vrrpCompliances.setDescription('The VRRP compliance statement')
check_compliances = module_compliance((1, 3, 6, 1, 4, 1, 9586, 100, 5, 4, 1, 3)).setObjects(('KEEPALIVED-MIB', 'virtualServerGroupGroup'), ('KEEPALIVED-MIB', 'virtualServerGroup'), ('KEEPALIVED-MIB', 'realServerGroup'), ('KEEPALIVED-MIB', 'checkTrapsGroup'))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
check_compliances = checkCompliances.setStatus('current')
if mibBuilder.loadTexts:
checkCompliances.setDescription('The check compliance statement')
global_group = object_group((1, 3, 6, 1, 4, 1, 9586, 100, 5, 4, 2, 1)).setObjects(('KEEPALIVED-MIB', 'version'), ('KEEPALIVED-MIB', 'routerId'), ('KEEPALIVED-MIB', 'smtpServerAddressType'), ('KEEPALIVED-MIB', 'smtpServerAddress'), ('KEEPALIVED-MIB', 'smtpServerTimeout'), ('KEEPALIVED-MIB', 'emailFrom'), ('KEEPALIVED-MIB', 'emailAddress'), ('KEEPALIVED-MIB', 'trapEnable'), ('KEEPALIVED-MIB', 'linkBeat'))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
global_group = globalGroup.setStatus('current')
if mibBuilder.loadTexts:
globalGroup.setDescription('Conformance group for global data.')
vrrp_groups = mib_identifier((1, 3, 6, 1, 4, 1, 9586, 100, 5, 4, 2, 2))
vrrp_sync_group = object_group((1, 3, 6, 1, 4, 1, 9586, 100, 5, 4, 2, 2, 1)).setObjects(('KEEPALIVED-MIB', 'vrrpSyncGroupName'), ('KEEPALIVED-MIB', 'vrrpSyncGroupState'), ('KEEPALIVED-MIB', 'vrrpSyncGroupSmtpAlert'), ('KEEPALIVED-MIB', 'vrrpSyncGroupNotifyExec'), ('KEEPALIVED-MIB', 'vrrpSyncGroupScriptMaster'), ('KEEPALIVED-MIB', 'vrrpSyncGroupScriptBackup'), ('KEEPALIVED-MIB', 'vrrpSyncGroupScriptFault'), ('KEEPALIVED-MIB', 'vrrpSyncGroupScript'), ('KEEPALIVED-MIB', 'vrrpSyncGroupMemberName'))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
vrrp_sync_group = vrrpSyncGroup.setStatus('current')
if mibBuilder.loadTexts:
vrrpSyncGroup.setDescription('Conformance group for synchronisation groups.')
vrrp_instance_group = object_group((1, 3, 6, 1, 4, 1, 9586, 100, 5, 4, 2, 2, 2)).setObjects(('KEEPALIVED-MIB', 'vrrpInstanceName'), ('KEEPALIVED-MIB', 'vrrpInstanceVirtualRouterId'), ('KEEPALIVED-MIB', 'vrrpInstanceState'), ('KEEPALIVED-MIB', 'vrrpInstanceInitialState'), ('KEEPALIVED-MIB', 'vrrpInstanceWantedState'), ('KEEPALIVED-MIB', 'vrrpInstanceBasePriority'), ('KEEPALIVED-MIB', 'vrrpInstanceEffectivePriority'), ('KEEPALIVED-MIB', 'vrrpInstanceVipsStatus'), ('KEEPALIVED-MIB', 'vrrpInstancePrimaryInterface'), ('KEEPALIVED-MIB', 'vrrpInstanceTrackPrimaryIf'), ('KEEPALIVED-MIB', 'vrrpInstanceAdvertisementsInt'), ('KEEPALIVED-MIB', 'vrrpInstancePreempt'), ('KEEPALIVED-MIB', 'vrrpInstancePreemptDelay'), ('KEEPALIVED-MIB', 'vrrpInstanceAuthType'), ('KEEPALIVED-MIB', 'vrrpInstanceLvsSyncDaemon'), ('KEEPALIVED-MIB', 'vrrpInstanceLvsSyncInterface'), ('KEEPALIVED-MIB', 'vrrpInstanceSyncGroup'), ('KEEPALIVED-MIB', 'vrrpInstanceGarpDelay'), ('KEEPALIVED-MIB', 'vrrpInstanceSmtpAlert'), ('KEEPALIVED-MIB', 'vrrpInstanceNotifyExec'), ('KEEPALIVED-MIB', 'vrrpInstanceScriptMaster'), ('KEEPALIVED-MIB', 'vrrpInstanceScriptBackup'), ('KEEPALIVED-MIB', 'vrrpInstanceScriptFault'), ('KEEPALIVED-MIB', 'vrrpInstanceScriptStop'), ('KEEPALIVED-MIB', 'vrrpInstanceScript'), ('KEEPALIVED-MIB', 'vrrpTrackedInterfaceName'), ('KEEPALIVED-MIB', 'vrrpTrackedInterfaceWeight'), ('KEEPALIVED-MIB', 'vrrpTrackedScriptName'), ('KEEPALIVED-MIB', 'vrrpTrackedScriptWeight'), ('KEEPALIVED-MIB', 'vrrpAddressType'), ('KEEPALIVED-MIB', 'vrrpAddressValue'), ('KEEPALIVED-MIB', 'vrrpAddressBroadcast'), ('KEEPALIVED-MIB', 'vrrpAddressMask'), ('KEEPALIVED-MIB', 'vrrpAddressScope'), ('KEEPALIVED-MIB', 'vrrpAddressIfIndex'), ('KEEPALIVED-MIB', 'vrrpAddressIfName'), ('KEEPALIVED-MIB', 'vrrpAddressIfAlias'), ('KEEPALIVED-MIB', 'vrrpAddressStatus'), ('KEEPALIVED-MIB', 'vrrpAddressAdvertising'), ('KEEPALIVED-MIB', 'vrrpRouteAddressType'), ('KEEPALIVED-MIB', 'vrrpRouteDestination'), ('KEEPALIVED-MIB', 'vrrpRouteDestinationMask'), ('KEEPALIVED-MIB', 'vrrpRouteGateway'), ('KEEPALIVED-MIB', 'vrrpRouteSecondaryGateway'), ('KEEPALIVED-MIB', 'vrrpRouteSource'), ('KEEPALIVED-MIB', 'vrrpRouteMetric'), ('KEEPALIVED-MIB', 'vrrpRouteScope'), ('KEEPALIVED-MIB', 'vrrpRouteType'), ('KEEPALIVED-MIB', 'vrrpRouteIfIndex'), ('KEEPALIVED-MIB', 'vrrpRouteIfName'), ('KEEPALIVED-MIB', 'vrrpRouteRoutingTable'), ('KEEPALIVED-MIB', 'vrrpRouteStatus'))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
vrrp_instance_group = vrrpInstanceGroup.setStatus('current')
if mibBuilder.loadTexts:
vrrpInstanceGroup.setDescription('Conformance group for VRRP instances.')
vrrp_script_group = object_group((1, 3, 6, 1, 4, 1, 9586, 100, 5, 4, 2, 2, 3)).setObjects(('KEEPALIVED-MIB', 'vrrpScriptName'), ('KEEPALIVED-MIB', 'vrrpScriptCommand'), ('KEEPALIVED-MIB', 'vrrpScriptInterval'), ('KEEPALIVED-MIB', 'vrrpScriptWeight'), ('KEEPALIVED-MIB', 'vrrpScriptResult'), ('KEEPALIVED-MIB', 'vrrpScriptRise'), ('KEEPALIVED-MIB', 'vrrpScriptFall'))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
vrrp_script_group = vrrpScriptGroup.setStatus('current')
if mibBuilder.loadTexts:
vrrpScriptGroup.setDescription('Conformance group for VRRP scripts.')
vrrp_traps_group = notification_group((1, 3, 6, 1, 4, 1, 9586, 100, 5, 4, 2, 2, 4)).setObjects(('KEEPALIVED-MIB', 'vrrpSyncGroupStateChange'), ('KEEPALIVED-MIB', 'vrrpInstanceStateChange'))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
vrrp_traps_group = vrrpTrapsGroup.setStatus('current')
if mibBuilder.loadTexts:
vrrpTrapsGroup.setDescription('Conformance group for VRRP traps.')
check_groups = mib_identifier((1, 3, 6, 1, 4, 1, 9586, 100, 5, 4, 2, 3))
virtual_server_group_group = object_group((1, 3, 6, 1, 4, 1, 9586, 100, 5, 4, 2, 3, 1)).setObjects(('KEEPALIVED-MIB', 'virtualServerGroupName'), ('KEEPALIVED-MIB', 'virtualServerGroupMemberType'), ('KEEPALIVED-MIB', 'virtualServerGroupMemberFwMark'), ('KEEPALIVED-MIB', 'virtualServerGroupMemberAddrType'), ('KEEPALIVED-MIB', 'virtualServerGroupMemberAddress'), ('KEEPALIVED-MIB', 'virtualServerGroupMemberAddr1'), ('KEEPALIVED-MIB', 'virtualServerGroupMemberAddr2'), ('KEEPALIVED-MIB', 'virtualServerGroupMemberPort'))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
virtual_server_group_group = virtualServerGroupGroup.setStatus('current')
if mibBuilder.loadTexts:
virtualServerGroupGroup.setDescription('Conformance group for virtual server groups.')
virtual_server_group = object_group((1, 3, 6, 1, 4, 1, 9586, 100, 5, 4, 2, 3, 2)).setObjects(('KEEPALIVED-MIB', 'virtualServerType'), ('KEEPALIVED-MIB', 'virtualServerNameOfGroup'), ('KEEPALIVED-MIB', 'virtualServerFwMark'), ('KEEPALIVED-MIB', 'virtualServerAddrType'), ('KEEPALIVED-MIB', 'virtualServerAddress'), ('KEEPALIVED-MIB', 'virtualServerPort'), ('KEEPALIVED-MIB', 'virtualServerProtocol'), ('KEEPALIVED-MIB', 'virtualServerLoadBalancingAlgo'), ('KEEPALIVED-MIB', 'virtualServerLoadBalancingKind'), ('KEEPALIVED-MIB', 'virtualServerStatus'), ('KEEPALIVED-MIB', 'virtualServerVirtualHost'), ('KEEPALIVED-MIB', 'virtualServerPersist'), ('KEEPALIVED-MIB', 'virtualServerPersistTimeout'), ('KEEPALIVED-MIB', 'virtualServerPersistGranularity'), ('KEEPALIVED-MIB', 'virtualServerDelayLoop'), ('KEEPALIVED-MIB', 'virtualServerHaSuspend'), ('KEEPALIVED-MIB', 'virtualServerAlpha'), ('KEEPALIVED-MIB', 'virtualServerOmega'), ('KEEPALIVED-MIB', 'virtualServerRealServersTotal'), ('KEEPALIVED-MIB', 'virtualServerRealServersUp'), ('KEEPALIVED-MIB', 'virtualServerQuorum'), ('KEEPALIVED-MIB', 'virtualServerQuorumStatus'), ('KEEPALIVED-MIB', 'virtualServerQuorumUp'), ('KEEPALIVED-MIB', 'virtualServerQuorumDown'), ('KEEPALIVED-MIB', 'virtualServerHysteresis'), ('KEEPALIVED-MIB', 'virtualServerStatsConns'), ('KEEPALIVED-MIB', 'virtualServerStatsInPkts'), ('KEEPALIVED-MIB', 'virtualServerStatsOutPkts'), ('KEEPALIVED-MIB', 'virtualServerStatsInBytes'), ('KEEPALIVED-MIB', 'virtualServerStatsOutBytes'), ('KEEPALIVED-MIB', 'virtualServerRateCps'), ('KEEPALIVED-MIB', 'virtualServerRateInPPS'), ('KEEPALIVED-MIB', 'virtualServerRateOutPPS'), ('KEEPALIVED-MIB', 'virtualServerRateInBPS'), ('KEEPALIVED-MIB', 'virtualServerRateOutBPS'))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
virtual_server_group = virtualServerGroup.setStatus('current')
if mibBuilder.loadTexts:
virtualServerGroup.setDescription('Conformance group for virtual servers.')
real_server_group = object_group((1, 3, 6, 1, 4, 1, 9586, 100, 5, 4, 2, 3, 3)).setObjects(('KEEPALIVED-MIB', 'realServerType'), ('KEEPALIVED-MIB', 'realServerAddrType'), ('KEEPALIVED-MIB', 'realServerAddress'), ('KEEPALIVED-MIB', 'realServerPort'), ('KEEPALIVED-MIB', 'realServerStatus'), ('KEEPALIVED-MIB', 'realServerWeight'), ('KEEPALIVED-MIB', 'realServerUpperConnectionLimit'), ('KEEPALIVED-MIB', 'realServerLowerConnectionLimit'), ('KEEPALIVED-MIB', 'realServerActionWhenDown'), ('KEEPALIVED-MIB', 'realServerNotifyUp'), ('KEEPALIVED-MIB', 'realServerNotifyDown'), ('KEEPALIVED-MIB', 'realServerFailedChecks'), ('KEEPALIVED-MIB', 'realServerStatsConns'), ('KEEPALIVED-MIB', 'realServerStatsActiveConns'), ('KEEPALIVED-MIB', 'realServerStatsInactiveConns'), ('KEEPALIVED-MIB', 'realServerStatsPersistentConns'), ('KEEPALIVED-MIB', 'realServerStatsInPkts'), ('KEEPALIVED-MIB', 'realServerStatsOutPkts'), ('KEEPALIVED-MIB', 'realServerStatsInBytes'), ('KEEPALIVED-MIB', 'realServerStatsOutBytes'), ('KEEPALIVED-MIB', 'realServerRateCps'), ('KEEPALIVED-MIB', 'realServerRateInPPS'), ('KEEPALIVED-MIB', 'realServerRateOutPPS'), ('KEEPALIVED-MIB', 'realServerRateInBPS'), ('KEEPALIVED-MIB', 'realServerRateOutBPS'))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
real_server_group = realServerGroup.setStatus('current')
if mibBuilder.loadTexts:
realServerGroup.setDescription('Conformance group for real servers.')
check_traps_group = notification_group((1, 3, 6, 1, 4, 1, 9586, 100, 5, 4, 2, 3, 4)).setObjects(('KEEPALIVED-MIB', 'realServerStateChange'), ('KEEPALIVED-MIB', 'virtualServerQuorumStateChange'))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
check_traps_group = checkTrapsGroup.setStatus('current')
if mibBuilder.loadTexts:
checkTrapsGroup.setDescription('Conformance group for check traps.')
mibBuilder.exportSymbols('KEEPALIVED-MIB', vrrpInstanceVirtualRouterId=vrrpInstanceVirtualRouterId, virtualServerGroupMemberAddr2=virtualServerGroupMemberAddr2, vrrpTrackedInterfaceName=vrrpTrackedInterfaceName, realServerStatsInPkts=realServerStatsInPkts, smtpServerTimeout=smtpServerTimeout, PYSNMP_MODULE_ID=keepalived, virtualServerType=virtualServerType, realServerLowerConnectionLimit=realServerLowerConnectionLimit, routerId=routerId, virtualServerGroupMemberTable=virtualServerGroupMemberTable, vrrpAddressIfAlias=vrrpAddressIfAlias, check=check, vrrpInstanceAuthType=vrrpInstanceAuthType, virtualServerPort=virtualServerPort, virtualServerDelayLoop=virtualServerDelayLoop, vrrpInstanceStateChange=vrrpInstanceStateChange, realServerGroup=realServerGroup, vrrpScriptFall=vrrpScriptFall, realServerEntry=realServerEntry, realServerActionWhenDown=realServerActionWhenDown, emailIndex=emailIndex, groups=groups, vrrpScriptResult=vrrpScriptResult, vrrpInstanceGroup=vrrpInstanceGroup, vrrpInstanceSyncGroup=vrrpInstanceSyncGroup, virtualServerLoadBalancingAlgo=virtualServerLoadBalancingAlgo, vrrpScriptWeight=vrrpScriptWeight, vrrpSyncGroupMemberTable=vrrpSyncGroupMemberTable, virtualServerGroupMemberPort=virtualServerGroupMemberPort, virtualServerRateOutBPS=virtualServerRateOutBPS, vrrpInstanceTable=vrrpInstanceTable, checkTrapControl=checkTrapControl, vrrpInstanceTrackPrimaryIf=vrrpInstanceTrackPrimaryIf, checkTrapsGroup=checkTrapsGroup, vrrpRouteStatus=vrrpRouteStatus, vrrpTraps=vrrpTraps, virtualServerPersist=virtualServerPersist, virtualServerRateOutPPS=virtualServerRateOutPPS, pysmi_global=pysmi_global, compliances=compliances, vrrpTrackedScriptName=vrrpTrackedScriptName, realServerStateChange=realServerStateChange, virtualServerGroupMemberAddr1=virtualServerGroupMemberAddr1, vrrpSyncGroupScriptBackup=vrrpSyncGroupScriptBackup, virtualServerQuorumDown=virtualServerQuorumDown, vrrpSyncGroupEntry=vrrpSyncGroupEntry, vrrpInstanceScriptMaster=vrrpInstanceScriptMaster, vrrpScriptGroup=vrrpScriptGroup, vrrpSyncGroupName=vrrpSyncGroupName, virtualServerStatsOutPkts=virtualServerStatsOutPkts, vrrpRouteMetric=vrrpRouteMetric, realServerStatsActiveConns=realServerStatsActiveConns, vrrpRouteSecondaryGateway=vrrpRouteSecondaryGateway, realServerStatsPersistentConns=realServerStatsPersistentConns, vrrpScriptName=vrrpScriptName, vrrpInstanceInitialState=vrrpInstanceInitialState, vrrpRouteDestination=vrrpRouteDestination, vrrpScriptEntry=vrrpScriptEntry, vrrpInstanceSmtpAlert=vrrpInstanceSmtpAlert, vrrpAddressType=vrrpAddressType, virtualServerQuorumStatus=virtualServerQuorumStatus, realServerType=realServerType, virtualServerQuorumStateChange=virtualServerQuorumStateChange, vrrpRouteIfName=vrrpRouteIfName, virtualServerGroupMemberFwMark=virtualServerGroupMemberFwMark, virtualServerStatsInBytes=virtualServerStatsInBytes, vrrpSyncGroupNotifyExec=vrrpSyncGroupNotifyExec, vrrpInstanceLvsSyncDaemon=vrrpInstanceLvsSyncDaemon, vrrpAddressIndex=vrrpAddressIndex, vrrpRouteIfIndex=vrrpRouteIfIndex, realServerStatsOutPkts=realServerStatsOutPkts, vrrpAddressTable=vrrpAddressTable, realServerTable=realServerTable, realServerFailedChecks=realServerFailedChecks, checkCompliances=checkCompliances, vrrpSyncGroupTable=vrrpSyncGroupTable, vrrpInstancePreempt=vrrpInstancePreempt, vrrpSyncGroupStateChange=vrrpSyncGroupStateChange, virtualServerGroupMemberType=virtualServerGroupMemberType, virtualServerOmega=virtualServerOmega, virtualServerRealServersTotal=virtualServerRealServersTotal, virtualServerStatsInPkts=virtualServerStatsInPkts, realServerRateOutPPS=realServerRateOutPPS, virtualServerGroupGroup=virtualServerGroupGroup, vrrpAddressBroadcast=vrrpAddressBroadcast, vrrpInstanceState=vrrpInstanceState, vrrpInstanceName=vrrpInstanceName, vrrpSyncGroupSmtpAlert=vrrpSyncGroupSmtpAlert, realServerWeight=realServerWeight, vrrpScriptRise=vrrpScriptRise, virtualServerGroupTable=virtualServerGroupTable, virtualServerPersistGranularity=virtualServerPersistGranularity, vrrpAddressScope=vrrpAddressScope, vrrpScriptIndex=vrrpScriptIndex, keepalived=keepalived, trapEnable=trapEnable, virtualServerAddress=virtualServerAddress, emailAddress=emailAddress, vrrpRouteGateway=vrrpRouteGateway, emailFrom=emailFrom, linkBeat=linkBeat, virtualServerAddrType=virtualServerAddrType, vrrpSyncGroupScriptFault=vrrpSyncGroupScriptFault, checkTraps=checkTraps, vrrpInstanceNotifyExec=vrrpInstanceNotifyExec, vrrpAddressMask=vrrpAddressMask, vrrpAddressAdvertising=vrrpAddressAdvertising, virtualServerEntry=virtualServerEntry, vrrpInstanceBasePriority=vrrpInstanceBasePriority, vrrpTrackedInterfaceWeight=vrrpTrackedInterfaceWeight, virtualServerQuorumUp=virtualServerQuorumUp, vrrpTrapControl=vrrpTrapControl, vrrpSyncGroupState=vrrpSyncGroupState, vrrpTrap=vrrpTrap, vrrpSyncGroupIndex=vrrpSyncGroupIndex, virtualServerRealServersUp=virtualServerRealServersUp, project=project, vrrpRouteRoutingTable=vrrpRouteRoutingTable, smtpServerAddressType=smtpServerAddressType, vrrpAddressEntry=vrrpAddressEntry, debian=debian, vrrpRouteSource=vrrpRouteSource, vrrpTrackedScriptIndex=vrrpTrackedScriptIndex, vrrpSyncGroupMemberEntry=vrrpSyncGroupMemberEntry, virtualServerGroupMemberAddrType=virtualServerGroupMemberAddrType, virtualServerNameOfGroup=virtualServerNameOfGroup, virtualServerRateInBPS=virtualServerRateInBPS, globalGroup=globalGroup, virtualServerVirtualHost=virtualServerVirtualHost, vrrpTrackedScriptWeight=vrrpTrackedScriptWeight, virtualServerStatus=virtualServerStatus, virtualServerQuorum=virtualServerQuorum, realServerUpperConnectionLimit=realServerUpperConnectionLimit, globalCompliances=globalCompliances, vrrpScriptCommand=vrrpScriptCommand, vrrpInstanceScriptBackup=vrrpInstanceScriptBackup, vrrpAddressIfIndex=vrrpAddressIfIndex, virtualServerGroupMemberEntry=virtualServerGroupMemberEntry, vrrpInstanceVipsStatus=vrrpInstanceVipsStatus, realServerStatsOutBytes=realServerStatsOutBytes, vrrpTrackedScriptTable=vrrpTrackedScriptTable, vrrpInstanceAdvertisementsInt=vrrpInstanceAdvertisementsInt, realServerNotifyDown=realServerNotifyDown, realServerStatsConns=realServerStatsConns, virtualServerRateCps=virtualServerRateCps, realServerIndex=realServerIndex, vrrpRouteTable=vrrpRouteTable, smtpServerAddress=smtpServerAddress, virtualServerIndex=virtualServerIndex, realServerRateCps=realServerRateCps, vrrpSyncGroupScript=vrrpSyncGroupScript, vrrpSyncGroupMemberName=vrrpSyncGroupMemberName, virtualServerProtocol=virtualServerProtocol, virtualServerLoadBalancingKind=virtualServerLoadBalancingKind, vrrpInstanceIndex=vrrpInstanceIndex, vrrpRouteType=vrrpRouteType, vrrpCompliances=vrrpCompliances, vrrpTrackedInterfaceTable=vrrpTrackedInterfaceTable, virtualServerHysteresis=virtualServerHysteresis, vrrpRouteDestinationMask=vrrpRouteDestinationMask, vrrpInstanceEffectivePriority=vrrpInstanceEffectivePriority, virtualServerGroupMemberAddress=virtualServerGroupMemberAddress, virtualServerPersistTimeout=virtualServerPersistTimeout, vrrpRouteScope=vrrpRouteScope, vrrpTrackedScriptEntry=vrrpTrackedScriptEntry, vrrpSyncGroup=vrrpSyncGroup, vrrpAddressValue=vrrpAddressValue, checkGroups=checkGroups, realServerStatsInBytes=realServerStatsInBytes, VrrpState=VrrpState, vrrpInstanceLvsSyncInterface=vrrpInstanceLvsSyncInterface, vrrpAddressStatus=vrrpAddressStatus, vrrpInstanceGarpDelay=vrrpInstanceGarpDelay, emailTable=emailTable, vrrpSyncGroupScriptMaster=vrrpSyncGroupScriptMaster, virtualServerGroup=virtualServerGroup, vrrpInstanceScript=vrrpInstanceScript, virtualServerGroupMemberIndex=virtualServerGroupMemberIndex, virtualServerGroupIndex=virtualServerGroupIndex, vrrpSyncGroupMemberInstanceIndex=vrrpSyncGroupMemberInstanceIndex, vrrpTrackedInterfaceEntry=vrrpTrackedInterfaceEntry, virtualServerRateInPPS=virtualServerRateInPPS, virtualServerFwMark=virtualServerFwMark, vrrpRouteAddressType=vrrpRouteAddressType, virtualServerHaSuspend=virtualServerHaSuspend, checkTrap=checkTrap, virtualServerStatsOutBytes=virtualServerStatsOutBytes, realServerNotifyUp=realServerNotifyUp, realServerRateInBPS=realServerRateInBPS, realServerStatus=realServerStatus, vrrpScriptInterval=vrrpScriptInterval, emailEntry=emailEntry, vrrpInstancePrimaryInterface=vrrpInstancePrimaryInterface, virtualServerGroupEntry=virtualServerGroupEntry, realServerAddress=realServerAddress, virtualServerAlpha=virtualServerAlpha, realServerRateOutBPS=realServerRateOutBPS, vrrpRouteIndex=vrrpRouteIndex, vrrp=vrrp, vrrpGroups=vrrpGroups, vrrpAddressIfName=vrrpAddressIfName, version=version, realServerStatsInactiveConns=realServerStatsInactiveConns, vrrpInstanceWantedState=vrrpInstanceWantedState, realServerPort=realServerPort, mail=mail, vrrpInstanceScriptFault=vrrpInstanceScriptFault, virtualServerStatsConns=virtualServerStatsConns, vrrpRouteEntry=vrrpRouteEntry, realServerAddrType=realServerAddrType, virtualServerGroupName=virtualServerGroupName, vrrpTrapsGroup=vrrpTrapsGroup, virtualServerTable=virtualServerTable, vrrpInstancePreemptDelay=vrrpInstancePreemptDelay, vrrpInstanceScriptStop=vrrpInstanceScriptStop, conformance=conformance, realServerRateInPPS=realServerRateInPPS, vrrpScriptTable=vrrpScriptTable, vrrpInstanceEntry=vrrpInstanceEntry) |
# Definition for a binary tree node.
# class TreeNode:
# def __init__(self, val=0, left=None, right=None):
# self.val = val
# self.left = left
# self.right = right
class Solution:
def isSymmetric(self, root: TreeNode) -> bool:
return self.isSymmetricRecu(root,root)
def isSymmetricRecu(self,root1,root2):
if root1 is None and root2 is None:
return True
if root1 is None or root2 is None:
return False
return root1.val == root2.val and self.isSymmetricRecu(root1.right,root2.left) and self.isSymmetricRecu(root1.left,root2.right)
Time: O(n)
Space:O(n) | class Solution:
def is_symmetric(self, root: TreeNode) -> bool:
return self.isSymmetricRecu(root, root)
def is_symmetric_recu(self, root1, root2):
if root1 is None and root2 is None:
return True
if root1 is None or root2 is None:
return False
return root1.val == root2.val and self.isSymmetricRecu(root1.right, root2.left) and self.isSymmetricRecu(root1.left, root2.right)
time: o(n)
space: o(n) |
# Variable score contains the user's answers
score = 0
# Function contains the Intro to the program
def intro():
print("How much money do you owe the IRS? Find out with this short quiz!")
print("Respond with the number of each answer.")
print("Entering anything other than a number will break the program!")
print("-----------------------------------------------------------")
# Before the quiz starts, the user will be given the option to choose to go right ahead into the questions,
# OR optionally see "cheat codes" for the answers.
print("Ready to get started?")
print("1. Start quiz")
print("2. Show cheat codes")
answer = int(input(">"))
if answer == 1:
brandsOne()
elif answer == 2:
cheatCodes()
# Function contains "cheat codes" for how to get the various results in this quiz
def cheatCodes():
print("For result #1 - answer the questions in this order.")
print("=====================")
# This is the cheatcode for getting the "you owe $52,189" result
print("3,5,11,14,20,24,27,32")
print("")
print("For result #2 - answer the questions in this order.")
print("=====================")
# This is the cheatcode for getting the "you owe $176,092" result
print("4,6,9,16,17,22,25,29")
print("")
# This is the cheatcode for getting the "you owe nothing" result
print("For result #3 - find a way to dodge the selected answers OR enter 0 for each question.")
print("-----------------------------------------------------------")
# Present the user with the option to begin the quiz after they've been given the chance to review the codes
print("Ready to get started?")
print("1. Start quiz")
answer = int(input(">"))
if answer == 1:
brandsOne()
# Function contains question one
# Because I'm using functions, I've set the score variable as global for each of the question's functions.
# This prevents the score variable from being rewritten as an entirely new variable each time
def brandsOne():
global score
print("")
print("Which of the following?")
print("")
print("1. Adidas")
print("2. Nike")
print("3. Skechers")
print("4. Crocs")
answer = int(input(">"))
if answer == 3:
score = 10 + score
brandsTwo()
elif answer == 4:
score = 15 + score
brandsTwo()
else:
score = 0 + score
brandsTwo()
# Function contains question two
def brandsTwo():
global score
print("")
print("Which of the following?")
print("5. American Eagle")
print("6. Holister Co.")
print("7. Gap")
print("8. Hot Topic")
answer = int(input(">"))
if answer == 5:
score = 100 + score
brandsThree()
elif answer == 6:
score = 150 + score
brandsThree()
else:
score = 10 + score
brandsThree()
# Function contains question three
def brandsThree():
global score
print("")
print("Which of the following?")
print("9. Abercromie and Fitch")
print("10. Footlocker")
print("11. Old Navy")
print("12. Champion")
answer = int(input(">"))
if answer == 11:
score = 1000 + score
brandsFour()
elif answer == 9:
score = 1500 + score
brandsFour()
else:
score = 100 + score
brandsFour()
# Function contains question four
def brandsFour():
global score
print("")
print("Which of the following?")
print("13. Hermes")
print("14. Gucci")
print("15. Louis Vuitton")
print("16. Calvin Klein")
answer = int(input(">"))
if answer == 14:
score = 1 + score
brandsFive()
elif answer == 16:
score = 2 + score
brandsFive()
else:
score = 0 + score
brandsFive()
# Function contains question five
def brandsFive():
global score
print("")
print("Which of the following?")
print("17. Armani Exchange")
print("18. Tommy Hilfiger")
print("19. Pacific Sunwear")
print("20. Under Armour")
answer = int(input(">"))
if answer == 20:
score = 1 + score
brandsSix()
elif answer == 17:
score = 2 + score
brandsSix()
else:
score = 0 + score
brandsSix()
# Function contains question six
def brandsSix():
global score
print("")
print("Which of the following?")
print("21. Disney")
print("22. H&M")
print("23. Jordan")
print("24. L.L Bean")
answer = int(input(">"))
if answer == 24:
score = 1 + score
brandsSeven()
elif answer == 22:
score = 2 + score
brandsSeven()
else:
score = 0 + score
brandsSeven()
# Function contains question seven
def brandsSeven():
global score
print("")
print("Which of the following?")
print("25. K-Swiss")
print("26. Merrell")
print("27. Clarks")
print("28. Coach")
answer = int(input(">"))
if answer == 27:
score = 1 + score
brandsEight()
elif answer == 25:
score = 2 + score
brandsEight()
else:
score = 0 + score
brandsEight()
# Function contains question eight
def brandsEight():
global score
print("")
print("Which of the following?")
print("29. CeCe")
print("30. Chaser")
print("31. Eileen West")
print("32. Fuzzi")
answer = int(input(">"))
if answer == 32:
score = 1 + score
scoreCounter()
elif answer == 29:
score = 2 + score
scoreCounter()
else:
score = 0 + score
scoreCounter()
# Function takes the value of score and prints a result based on the user's answers
def scoreCounter():
global score
if score == 110:
print("The End! After calculating your results.. you owe the IRS.. nothing!")
elif score == 1115:
print("The End! After calculating your results.. you owe the IRS $52,189")
elif score == 1675:
print("The End! After calculating your results.. you owe the IRS $176,092")
# Will print a generic answer for any combination of numbers that were not already calculated above.
else:
print("The End! Afrer calculating your results.. you owe the IRS $1,484,036")
# Starts the program
intro()
| score = 0
def intro():
print('How much money do you owe the IRS? Find out with this short quiz!')
print('Respond with the number of each answer.')
print('Entering anything other than a number will break the program!')
print('-----------------------------------------------------------')
print('Ready to get started?')
print('1. Start quiz')
print('2. Show cheat codes')
answer = int(input('>'))
if answer == 1:
brands_one()
elif answer == 2:
cheat_codes()
def cheat_codes():
print('For result #1 - answer the questions in this order.')
print('=====================')
print('3,5,11,14,20,24,27,32')
print('')
print('For result #2 - answer the questions in this order.')
print('=====================')
print('4,6,9,16,17,22,25,29')
print('')
print('For result #3 - find a way to dodge the selected answers OR enter 0 for each question.')
print('-----------------------------------------------------------')
print('Ready to get started?')
print('1. Start quiz')
answer = int(input('>'))
if answer == 1:
brands_one()
def brands_one():
global score
print('')
print('Which of the following?')
print('')
print('1. Adidas')
print('2. Nike')
print('3. Skechers')
print('4. Crocs')
answer = int(input('>'))
if answer == 3:
score = 10 + score
brands_two()
elif answer == 4:
score = 15 + score
brands_two()
else:
score = 0 + score
brands_two()
def brands_two():
global score
print('')
print('Which of the following?')
print('5. American Eagle')
print('6. Holister Co.')
print('7. Gap')
print('8. Hot Topic')
answer = int(input('>'))
if answer == 5:
score = 100 + score
brands_three()
elif answer == 6:
score = 150 + score
brands_three()
else:
score = 10 + score
brands_three()
def brands_three():
global score
print('')
print('Which of the following?')
print('9. Abercromie and Fitch')
print('10. Footlocker')
print('11. Old Navy')
print('12. Champion')
answer = int(input('>'))
if answer == 11:
score = 1000 + score
brands_four()
elif answer == 9:
score = 1500 + score
brands_four()
else:
score = 100 + score
brands_four()
def brands_four():
global score
print('')
print('Which of the following?')
print('13. Hermes')
print('14. Gucci')
print('15. Louis Vuitton')
print('16. Calvin Klein')
answer = int(input('>'))
if answer == 14:
score = 1 + score
brands_five()
elif answer == 16:
score = 2 + score
brands_five()
else:
score = 0 + score
brands_five()
def brands_five():
global score
print('')
print('Which of the following?')
print('17. Armani Exchange')
print('18. Tommy Hilfiger')
print('19. Pacific Sunwear')
print('20. Under Armour')
answer = int(input('>'))
if answer == 20:
score = 1 + score
brands_six()
elif answer == 17:
score = 2 + score
brands_six()
else:
score = 0 + score
brands_six()
def brands_six():
global score
print('')
print('Which of the following?')
print('21. Disney')
print('22. H&M')
print('23. Jordan')
print('24. L.L Bean')
answer = int(input('>'))
if answer == 24:
score = 1 + score
brands_seven()
elif answer == 22:
score = 2 + score
brands_seven()
else:
score = 0 + score
brands_seven()
def brands_seven():
global score
print('')
print('Which of the following?')
print('25. K-Swiss')
print('26. Merrell')
print('27. Clarks')
print('28. Coach')
answer = int(input('>'))
if answer == 27:
score = 1 + score
brands_eight()
elif answer == 25:
score = 2 + score
brands_eight()
else:
score = 0 + score
brands_eight()
def brands_eight():
global score
print('')
print('Which of the following?')
print('29. CeCe')
print('30. Chaser')
print('31. Eileen West')
print('32. Fuzzi')
answer = int(input('>'))
if answer == 32:
score = 1 + score
score_counter()
elif answer == 29:
score = 2 + score
score_counter()
else:
score = 0 + score
score_counter()
def score_counter():
global score
if score == 110:
print('The End! After calculating your results.. you owe the IRS.. nothing!')
elif score == 1115:
print('The End! After calculating your results.. you owe the IRS $52,189')
elif score == 1675:
print('The End! After calculating your results.. you owe the IRS $176,092')
else:
print('The End! Afrer calculating your results.. you owe the IRS $1,484,036')
intro() |
# Given a list of words, find all pairs of unique indices such that the concatenation of
# the two words is a palindrome.
# For example, given the list ["code", "edoc", "da", "d"], return [(0, 1), (1, 0), (2, 3)]
words = ["code", "edoc", "d", "cbaa", "aabc", "da"]
# Brute force
# O(n^2 X c) wher n is the number of words and c is the length of the longest word.
# O(n^2) if we drop the c
def is_palindrome(word):
# simple string reverse method
# returns true if string == reversed string
return word == word[::-1]
def palindrome_pairs(words):
result = []
for i, word1 in enumerate(words):
for j, word2 in enumerate(words):
if i == j:
continue
if is_palindrome(word1 + word2):
result.append((i, j))
return result
print(palindrome_pairs(words)) # [(0, 1), (1, 0), (3, 4), (4, 3), (5, 2)]
# with dictionary, O(n X c^2)
def is_another_palindrome(word):
return word == word[::-1]
def palindrome_pairs_with_dict(words):
d = {}
for i, word in enumerate(words):
d[word] = i
result = []
for i, word in enumerate(words):
for char_i in range(len(word)):
prefix, suffix = word[:char_i], word[:char_i]
reversed_prefix = prefix[::-1]
reversed_suffix = suffix[::-1]
if (is_another_palindrome(suffix) and reversed_prefix in d):
if i != d[reversed_prefix]:
result.append((i, d[reversed_prefix]))
if (is_another_palindrome(prefix) and reversed_suffix in d):
if i != d[reversed_suffix]:
result.append((d[reversed_suffix], i))
print(d) # {'code': 0, 'edoc': 1, 'd': 2, 'cbaa': 3, 'aabc': 4, 'da': 5}
return result
print(palindrome_pairs_with_dict(words)) # [(5, 2), (2, 5)]
| words = ['code', 'edoc', 'd', 'cbaa', 'aabc', 'da']
def is_palindrome(word):
return word == word[::-1]
def palindrome_pairs(words):
result = []
for (i, word1) in enumerate(words):
for (j, word2) in enumerate(words):
if i == j:
continue
if is_palindrome(word1 + word2):
result.append((i, j))
return result
print(palindrome_pairs(words))
def is_another_palindrome(word):
return word == word[::-1]
def palindrome_pairs_with_dict(words):
d = {}
for (i, word) in enumerate(words):
d[word] = i
result = []
for (i, word) in enumerate(words):
for char_i in range(len(word)):
(prefix, suffix) = (word[:char_i], word[:char_i])
reversed_prefix = prefix[::-1]
reversed_suffix = suffix[::-1]
if is_another_palindrome(suffix) and reversed_prefix in d:
if i != d[reversed_prefix]:
result.append((i, d[reversed_prefix]))
if is_another_palindrome(prefix) and reversed_suffix in d:
if i != d[reversed_suffix]:
result.append((d[reversed_suffix], i))
print(d)
return result
print(palindrome_pairs_with_dict(words)) |
class InlineCollection(TextElementCollection[Inline],IList,ICollection,IEnumerable,ICollection[Inline],IEnumerable[Inline]):
""" Represents a collection of System.Windows.Documents.Inline elements. System.Windows.Documents.InlineCollection defines the allowable child content of the System.Windows.Documents.Paragraph,System.Windows.Documents.Span,and System.Windows.Controls.TextBlock elements. """
def Add(self,*__args):
"""
Add(self: InlineCollection,uiElement: UIElement)
Adds an implicit System.Windows.Documents.InlineUIContainer with the supplied
System.Windows.UIElement already in it.
uiElement: System.Windows.UIElement set as the
System.Windows.Documents.InlineUIContainer.Child property for the implicit
System.Windows.Documents.InlineUIContainer.
Add(self: InlineCollection,text: str)
Adds an implicit System.Windows.Documents.Run element with the given text,
supplied as a System.String.
text: Text set as the System.Windows.Documents.Run.Text property for the implicit
System.Windows.Documents.Run.
"""
pass
def __add__(self,*args):
""" x.__add__(y) <==> x+yx.__add__(y) <==> x+y """
pass
def __init__(self,*args):
""" x.__init__(...) initializes x; see x.__class__.__doc__ for signaturex.__init__(...) initializes x; see x.__class__.__doc__ for signaturex.__init__(...) initializes x; see x.__class__.__doc__ for signature """
pass
def __iter__(self,*args):
""" __iter__(self: IEnumerable) -> object """
pass
FirstInline=property(lambda self: object(),lambda self,v: None,lambda self: None)
"""Gets the first System.Windows.Documents.Inline element within this instance of System.Windows.Documents.InlineCollection.
Get: FirstInline(self: InlineCollection) -> Inline
"""
LastInline=property(lambda self: object(),lambda self,v: None,lambda self: None)
"""Gets the last System.Windows.Documents.Inline element within this instance of System.Windows.Documents.InlineCollection.
Get: LastInline(self: InlineCollection) -> Inline
"""
| class Inlinecollection(TextElementCollection[Inline], IList, ICollection, IEnumerable, ICollection[Inline], IEnumerable[Inline]):
""" Represents a collection of System.Windows.Documents.Inline elements. System.Windows.Documents.InlineCollection defines the allowable child content of the System.Windows.Documents.Paragraph,System.Windows.Documents.Span,and System.Windows.Controls.TextBlock elements. """
def add(self, *__args):
"""
Add(self: InlineCollection,uiElement: UIElement)
Adds an implicit System.Windows.Documents.InlineUIContainer with the supplied
System.Windows.UIElement already in it.
uiElement: System.Windows.UIElement set as the
System.Windows.Documents.InlineUIContainer.Child property for the implicit
System.Windows.Documents.InlineUIContainer.
Add(self: InlineCollection,text: str)
Adds an implicit System.Windows.Documents.Run element with the given text,
supplied as a System.String.
text: Text set as the System.Windows.Documents.Run.Text property for the implicit
System.Windows.Documents.Run.
"""
pass
def __add__(self, *args):
""" x.__add__(y) <==> x+yx.__add__(y) <==> x+y """
pass
def __init__(self, *args):
""" x.__init__(...) initializes x; see x.__class__.__doc__ for signaturex.__init__(...) initializes x; see x.__class__.__doc__ for signaturex.__init__(...) initializes x; see x.__class__.__doc__ for signature """
pass
def __iter__(self, *args):
""" __iter__(self: IEnumerable) -> object """
pass
first_inline = property(lambda self: object(), lambda self, v: None, lambda self: None)
'Gets the first System.Windows.Documents.Inline element within this instance of System.Windows.Documents.InlineCollection.\n\n\n\nGet: FirstInline(self: InlineCollection) -> Inline\n\n\n\n'
last_inline = property(lambda self: object(), lambda self, v: None, lambda self: None)
'Gets the last System.Windows.Documents.Inline element within this instance of System.Windows.Documents.InlineCollection.\n\n\n\nGet: LastInline(self: InlineCollection) -> Inline\n\n\n\n' |
""" Non-negative 1-sparse recovery problem. This algorithm assumes we have a non negative dynamic stream.
Given a stream of tuples, where each tuple contains a number and a sign (+/-), it check if the stream is 1-sparse, meaning if the elements
in the stream cancel eacheother out in such a way that ther is only a unique number at the end.
Examples:
#1
Input: [(4,'+'), (2,'+'),(2,'-'),(4,'+'),(3,'+'),(3,'-')],
Output: 4
Comment: Since 2 and 3 gets removed.
#2
Input: [(2,'+'),(2,'+'),(2,'+'),(2,'+'),(2,'+'),(2,'+'),(2,'+')]
Output: 2
Comment: No other numbers present
#3
Input: [(2,'+'),(2,'+'),(2,'+'),(2,'+'),(2,'+'),(2,'+'),(1,'+')]
Output: None
Comment: Not 1-sparse
"""
def one_sparse(array):
sum_signs = 0
bitsum = [0]*32
sum_values = 0
for val,sign in array:
if sign == "+":
sum_signs += 1
sum_values += val
else:
sum_signs -= 1
sum_values -= val
_get_bit_sum(bitsum,val,sign)
if sum_signs > 0 and _check_every_number_in_bitsum(bitsum,sum_signs):
return int(sum_values/sum_signs)
else:
return None
#Helper function to check that every entry in the list is either 0 or the same as the
#sum of signs
def _check_every_number_in_bitsum(bitsum,sum_signs):
for val in bitsum:
if val != 0 and val != sum_signs :
return False
return True
# Adds bit representation value to bitsum array
def _get_bit_sum(bitsum,val,sign):
i = 0
if sign == "+":
while(val):
bitsum[i] += val & 1
i +=1
val >>=1
else :
while(val):
bitsum[i] -= val & 1
i +=1
val >>=1
| """ Non-negative 1-sparse recovery problem. This algorithm assumes we have a non negative dynamic stream.
Given a stream of tuples, where each tuple contains a number and a sign (+/-), it check if the stream is 1-sparse, meaning if the elements
in the stream cancel eacheother out in such a way that ther is only a unique number at the end.
Examples:
#1
Input: [(4,'+'), (2,'+'),(2,'-'),(4,'+'),(3,'+'),(3,'-')],
Output: 4
Comment: Since 2 and 3 gets removed.
#2
Input: [(2,'+'),(2,'+'),(2,'+'),(2,'+'),(2,'+'),(2,'+'),(2,'+')]
Output: 2
Comment: No other numbers present
#3
Input: [(2,'+'),(2,'+'),(2,'+'),(2,'+'),(2,'+'),(2,'+'),(1,'+')]
Output: None
Comment: Not 1-sparse
"""
def one_sparse(array):
sum_signs = 0
bitsum = [0] * 32
sum_values = 0
for (val, sign) in array:
if sign == '+':
sum_signs += 1
sum_values += val
else:
sum_signs -= 1
sum_values -= val
_get_bit_sum(bitsum, val, sign)
if sum_signs > 0 and _check_every_number_in_bitsum(bitsum, sum_signs):
return int(sum_values / sum_signs)
else:
return None
def _check_every_number_in_bitsum(bitsum, sum_signs):
for val in bitsum:
if val != 0 and val != sum_signs:
return False
return True
def _get_bit_sum(bitsum, val, sign):
i = 0
if sign == '+':
while val:
bitsum[i] += val & 1
i += 1
val >>= 1
else:
while val:
bitsum[i] -= val & 1
i += 1
val >>= 1 |
def my_zip(first,secoud):
first_it=iter(first)
secoud_it=iter(secoud)
while True:
try:
yield (next(first_it),next(secoud_it))
except StopIteration:
return
a=['s','gff x','c']
b=range(15)
m= my_zip(a,b)
for pair in my_zip(a,b):
print(pair)
a,b
| def my_zip(first, secoud):
first_it = iter(first)
secoud_it = iter(secoud)
while True:
try:
yield (next(first_it), next(secoud_it))
except StopIteration:
return
a = ['s', 'gff x', 'c']
b = range(15)
m = my_zip(a, b)
for pair in my_zip(a, b):
print(pair)
(a, b) |
def AddOne(value, value1=100):
return value + value1
print(AddOne(abcd=200))
| def add_one(value, value1=100):
return value + value1
print(add_one(abcd=200)) |
def get_default_value(typ):
if typ == int:
return 0
else:
return typ.default()
def type_check(typ, value):
if typ == int:
return isinstance(value, int)
else:
return typ.value_check(value)
class AbstractListMeta(type):
def __new__(cls, class_name, parents, attrs):
out = type.__new__(cls, class_name, parents, attrs)
if 'elem_type' in attrs and 'length' in attrs:
setattr(out, 'elem_type', attrs['elem_type'])
setattr(out, 'length', attrs['length'])
return out
def __getitem__(self, params):
if not isinstance(params, tuple) or len(params) != 2:
raise Exception("List must be instantiated with two args: elem type and length")
o = self.__class__(self.__name__, (self,), {'elem_type': params[0], 'length': params[1]})
o._name = 'AbstractList'
return o
def __instancecheck__(self, obj):
if obj.__class__.__name__ != self.__name__:
return False
if hasattr(self, 'elem_type') and obj.__class__.elem_type != self.elem_type:
return False
if hasattr(self, 'length') and obj.__class__.length != self.length:
return False
return True
class ValueCheckError(Exception):
pass
class AbstractList(metaclass=AbstractListMeta):
def __init__(self, *args):
items = self.extract_args(args)
if not self.value_check(items):
raise ValueCheckError("Bad input for class {}: {}".format(self.__class__, items))
self.items = items
def value_check(self, value):
for v in value:
if not isinstance(v, self.__class__.elem_type):
return False
return True
def extract_args(self, args):
return list(args) if len(args) > 0 else self.default()
def default(self):
raise Exception("Not implemented")
def __getitem__(self, i):
return self.items[i]
def __setitem__(self, k, v):
self.items[k] = v
def __len__(self):
return len(self.items)
def __repr__(self):
return repr(self.items)
def __iter__(self):
return iter(self.items)
def __eq__(self, other):
return self.items == other.items
class List(AbstractList, metaclass=AbstractListMeta):
def value_check(self, value):
return len(value) <= self.__class__.length and super().value_check(value)
def default(self):
return []
class Vector(AbstractList, metaclass=AbstractListMeta):
def value_check(self, value):
return len(value) == self.__class__.length and super().value_check(value)
def default(self):
return [get_default_value(self.__class__.elem_type) for _ in range(self.__class__.length)]
class BytesMeta(AbstractListMeta):
def __getitem__(self, params):
if not isinstance(params, int):
raise Exception("Bytes must be instantiated with one arg: length")
o = self.__class__(self.__name__, (self,), {'length': params})
o._name = 'Bytes'
return o
def single_item_extractor(cls, args):
assert len(args) < 2
return args[0] if len(args) > 0 else cls.default()
class Bytes(AbstractList, metaclass=BytesMeta):
def value_check(self, value):
return len(value) <= self.__class__.length and isinstance(value, bytes)
extract_args = single_item_extractor
def default(self):
return b''
class BytesN(AbstractList, metaclass=BytesMeta):
def value_check(self, value):
return len(value) == self.__class__.length and isinstance(value, bytes)
extract_args = single_item_extractor
def default(self):
return b'\x00' * self.__class__.length
| def get_default_value(typ):
if typ == int:
return 0
else:
return typ.default()
def type_check(typ, value):
if typ == int:
return isinstance(value, int)
else:
return typ.value_check(value)
class Abstractlistmeta(type):
def __new__(cls, class_name, parents, attrs):
out = type.__new__(cls, class_name, parents, attrs)
if 'elem_type' in attrs and 'length' in attrs:
setattr(out, 'elem_type', attrs['elem_type'])
setattr(out, 'length', attrs['length'])
return out
def __getitem__(self, params):
if not isinstance(params, tuple) or len(params) != 2:
raise exception('List must be instantiated with two args: elem type and length')
o = self.__class__(self.__name__, (self,), {'elem_type': params[0], 'length': params[1]})
o._name = 'AbstractList'
return o
def __instancecheck__(self, obj):
if obj.__class__.__name__ != self.__name__:
return False
if hasattr(self, 'elem_type') and obj.__class__.elem_type != self.elem_type:
return False
if hasattr(self, 'length') and obj.__class__.length != self.length:
return False
return True
class Valuecheckerror(Exception):
pass
class Abstractlist(metaclass=AbstractListMeta):
def __init__(self, *args):
items = self.extract_args(args)
if not self.value_check(items):
raise value_check_error('Bad input for class {}: {}'.format(self.__class__, items))
self.items = items
def value_check(self, value):
for v in value:
if not isinstance(v, self.__class__.elem_type):
return False
return True
def extract_args(self, args):
return list(args) if len(args) > 0 else self.default()
def default(self):
raise exception('Not implemented')
def __getitem__(self, i):
return self.items[i]
def __setitem__(self, k, v):
self.items[k] = v
def __len__(self):
return len(self.items)
def __repr__(self):
return repr(self.items)
def __iter__(self):
return iter(self.items)
def __eq__(self, other):
return self.items == other.items
class List(AbstractList, metaclass=AbstractListMeta):
def value_check(self, value):
return len(value) <= self.__class__.length and super().value_check(value)
def default(self):
return []
class Vector(AbstractList, metaclass=AbstractListMeta):
def value_check(self, value):
return len(value) == self.__class__.length and super().value_check(value)
def default(self):
return [get_default_value(self.__class__.elem_type) for _ in range(self.__class__.length)]
class Bytesmeta(AbstractListMeta):
def __getitem__(self, params):
if not isinstance(params, int):
raise exception('Bytes must be instantiated with one arg: length')
o = self.__class__(self.__name__, (self,), {'length': params})
o._name = 'Bytes'
return o
def single_item_extractor(cls, args):
assert len(args) < 2
return args[0] if len(args) > 0 else cls.default()
class Bytes(AbstractList, metaclass=BytesMeta):
def value_check(self, value):
return len(value) <= self.__class__.length and isinstance(value, bytes)
extract_args = single_item_extractor
def default(self):
return b''
class Bytesn(AbstractList, metaclass=BytesMeta):
def value_check(self, value):
return len(value) == self.__class__.length and isinstance(value, bytes)
extract_args = single_item_extractor
def default(self):
return b'\x00' * self.__class__.length |
# --------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# --------------------------------------------------------------------------------------------
class TaskInfo:
"""Contract class for representing tasks"""
def __init__(
self,
task_id: str,
status: 'ossdbtoolsservice.tasks.TaskStatus',
provider_name: str,
server_name: str,
database_name: str,
task_name: str,
description: str):
self.task_id: str = task_id
self.status: 'ossdbtoolsservice.tasks.TaskStatus' = status
self.server_name: str = server_name
self.database_name: str = database_name
self.name: str = task_name
self.description: str = description
self.provider_name: str = provider_name
| class Taskinfo:
"""Contract class for representing tasks"""
def __init__(self, task_id: str, status: 'ossdbtoolsservice.tasks.TaskStatus', provider_name: str, server_name: str, database_name: str, task_name: str, description: str):
self.task_id: str = task_id
self.status: 'ossdbtoolsservice.tasks.TaskStatus' = status
self.server_name: str = server_name
self.database_name: str = database_name
self.name: str = task_name
self.description: str = description
self.provider_name: str = provider_name |
'''
Author : MiKueen
Level : Easy
Problem Statement : Count Primes
Count the number of prime numbers less than a non-negative number, n.
Example:
Input: 10
Output: 4
Explanation: There are 4 prime numbers less than 10, they are 2, 3, 5, 7.
'''
class Solution:
def countPrimes(self, n: int) -> int:
if n <= 2:
return 0
# Using Seive of Eratosthenes
primes = [True]*(n)
primes[0] = primes[1] = False
for i in range(2, int(n**0.5) + 1):
if primes[i] == True:
for j in range(i * i, n, i):
primes[j] = False
cnt = 0
for i in range(len(primes)):
if primes[i] == True:
cnt += 1
return cnt
| """
Author : MiKueen
Level : Easy
Problem Statement : Count Primes
Count the number of prime numbers less than a non-negative number, n.
Example:
Input: 10
Output: 4
Explanation: There are 4 prime numbers less than 10, they are 2, 3, 5, 7.
"""
class Solution:
def count_primes(self, n: int) -> int:
if n <= 2:
return 0
primes = [True] * n
primes[0] = primes[1] = False
for i in range(2, int(n ** 0.5) + 1):
if primes[i] == True:
for j in range(i * i, n, i):
primes[j] = False
cnt = 0
for i in range(len(primes)):
if primes[i] == True:
cnt += 1
return cnt |
#((power/25)*((year-1900)/4)*((speed/100)^2)*(capacity/50))/speed
def cost():
power = int(input("Power: "))
speed = int(input("Speed: "))
year = int(input("Year: "))
capacity = int(input("Capacity: "))
loadspeed = int(input("Loading Speed: "))
print(int(((power/25)*((year-1900)/4)*(int(speed/100)^2)*(capacity/50))/450))
while True:
cost() | def cost():
power = int(input('Power: '))
speed = int(input('Speed: '))
year = int(input('Year: '))
capacity = int(input('Capacity: '))
loadspeed = int(input('Loading Speed: '))
print(int(power / 25 * ((year - 1900) / 4) * (int(speed / 100) ^ 2) * (capacity / 50) / 450))
while True:
cost() |
WORKFLOW='inversion' # inversion, migration, modeling
SOLVER='specfem2d' # specfem2d, specfem3d
SYSTEM='slurm_sm' # serial, pbs, slurm
OPTIMIZE='LBFGS' # base
PREPROCESS='base' # base
POSTPROCESS='base' # base
MISFIT='Waveform'
MATERIALS='Elastic'
DENSITY='Constant'
# WORKFLOW
BEGIN=1 # first iteration
END=50 # last iteration
NREC=500 # number of receivers
NSRC=32 # number of sources
SAVEGRADIENT=1 # save gradient how often
# PREPROCESSING
FORMAT='su' # data file format
CHANNELS='p' # data channels
# OPTIMIZATION
PRECOND=None
STEPMAX=10 # maximum trial steps
STEPTHRESH=0.1 # step length safeguard
# POSTPROCESSING
SMOOTH=5. # smoothing radius
# SOLVER
NT=7500 # number of time steps
DT=9.0e-4 # time step
F0=4.0 # dominant frequency
# SYSTEM
NTASK=NSRC # number of tasks
NPROC=1 # processors per task
WALLTIME=500 # walltime
| workflow = 'inversion'
solver = 'specfem2d'
system = 'slurm_sm'
optimize = 'LBFGS'
preprocess = 'base'
postprocess = 'base'
misfit = 'Waveform'
materials = 'Elastic'
density = 'Constant'
begin = 1
end = 50
nrec = 500
nsrc = 32
savegradient = 1
format = 'su'
channels = 'p'
precond = None
stepmax = 10
stepthresh = 0.1
smooth = 5.0
nt = 7500
dt = 0.0009
f0 = 4.0
ntask = NSRC
nproc = 1
walltime = 500 |
""" all the text used in the app """
# LOADING SCREEN
load_title = "LOADING..."
# Hiragana to Romaji screen
h2r_input_tip = "type transliteration"
h2r_button_help = "Show (F1)"
h2r_button_check = "Confirm (ENTER)"
h2r_button_quit = "Quit (ESC)"
| """ all the text used in the app """
load_title = 'LOADING...'
h2r_input_tip = 'type transliteration'
h2r_button_help = 'Show (F1)'
h2r_button_check = 'Confirm (ENTER)'
h2r_button_quit = 'Quit (ESC)' |
schedule = {
# "command name": interval[minutes],
"toredabiRoutine": 15,
}
| schedule = {'toredabiRoutine': 15} |
n = input().split()
for index, i in enumerate(n):
n[index] = int(i)
limite = n[1]
leituras = n[0]
lista = []
c = 0
b = False
for e in range(leituras):
temp = input().split()
temp[0] = int(temp[0])
temp[1] = int(temp[1])
lista.append(temp[0])
lista.append(temp[1])
for index, k in enumerate(lista):
if index%2 != 0:
c += k - (lista[index-1])
if c > limite:
b = True
break
if b:
print("S")
else:
print("N") | n = input().split()
for (index, i) in enumerate(n):
n[index] = int(i)
limite = n[1]
leituras = n[0]
lista = []
c = 0
b = False
for e in range(leituras):
temp = input().split()
temp[0] = int(temp[0])
temp[1] = int(temp[1])
lista.append(temp[0])
lista.append(temp[1])
for (index, k) in enumerate(lista):
if index % 2 != 0:
c += k - lista[index - 1]
if c > limite:
b = True
break
if b:
print('S')
else:
print('N') |
# by Kami Bigdely
# Extract Variable (alias introduce explaining variable)
WELL_DONE = 900000
MEDIUM = 600000
COOKED_CONSTANT = 0.05
def is_cookeding_criteria_satisfied(order):
if order.desired_state() == 'well-done' and order.time() * order.temperature() * order.pressure() * COOKED_CONSTANT >= WELL_DONE:
return True
if order.desired_state() == 'medium' and order.time() * order.temperature() * order.pressure() * COOKED_CONSTANT >= MEDIUM:
return True
return False | well_done = 900000
medium = 600000
cooked_constant = 0.05
def is_cookeding_criteria_satisfied(order):
if order.desired_state() == 'well-done' and order.time() * order.temperature() * order.pressure() * COOKED_CONSTANT >= WELL_DONE:
return True
if order.desired_state() == 'medium' and order.time() * order.temperature() * order.pressure() * COOKED_CONSTANT >= MEDIUM:
return True
return False |
def estCondicional01():
#Definir variables u otros
montoP=0
#Datos de entrada
cantidadx=int(input("Ingrese cantidad de lapices: "))
#Proceso
if cantidadx>=1000:
montoP=cantidadx*0.80
else:
montoP=cantidadx*0.90
#Datos de salida
print("El monto a pagar es:", montoP)
estCondicional01() | def est_condicional01():
monto_p = 0
cantidadx = int(input('Ingrese cantidad de lapices: '))
if cantidadx >= 1000:
monto_p = cantidadx * 0.8
else:
monto_p = cantidadx * 0.9
print('El monto a pagar es:', montoP)
est_condicional01() |
"""Semantic Versioning Helper for Python Errors
"""
__author__ = 'Oleksandr Shepetko'
__email__ = 'a@shepetko.com'
__license__ = 'MIT'
class InvalidRequirementString(Exception):
pass
class InvalidVersionIdentifier(Exception):
def __init__(self, v: str):
self._v = v
def __str__(self) -> str: # pragma: no cover
return "'{}' is not a valid version identifier".format(self._v)
class InvalidVersionRangeIdentifier(Exception):
def __init__(self, v_range: str):
self._v_range = v_range
def __str__(self) -> str: # pragma: no cover
return "'{}' is not a valid version range identifier".format(self._v_range)
class InvalidCondition(Exception):
pass
class InvalidComparisonOperator(Exception):
pass
| """Semantic Versioning Helper for Python Errors
"""
__author__ = 'Oleksandr Shepetko'
__email__ = 'a@shepetko.com'
__license__ = 'MIT'
class Invalidrequirementstring(Exception):
pass
class Invalidversionidentifier(Exception):
def __init__(self, v: str):
self._v = v
def __str__(self) -> str:
return "'{}' is not a valid version identifier".format(self._v)
class Invalidversionrangeidentifier(Exception):
def __init__(self, v_range: str):
self._v_range = v_range
def __str__(self) -> str:
return "'{}' is not a valid version range identifier".format(self._v_range)
class Invalidcondition(Exception):
pass
class Invalidcomparisonoperator(Exception):
pass |
class Kierowca:
def __init__(self, id, nazwisko, imie, kraj):
self.id = id
self.nazwisko = nazwisko
self.imie = imie
self.kraj = kraj
def __str__(self):
return "Kierowca id: " + self.id + ", nazwisko: " + self.nazwisko + ", imie: " + self.imie + ", kraj: " + self.kraj
class Wyscig:
def __init__(self, id, rok, miejsce):
self.id = id
self.rok = rok
self.miejsce = miejsce
def __str__(self):
return "Wyscig id: " + self.id + ", rok: " + str(self.rok) + ", miejsce: " + self.miejsce
class Wynik:
def __init__(self, id_kierowcy, punkty, id_wyscigu):
self.id_kierowcy = id_kierowcy
self.punkty = punkty
self.id_wyscigu = id_wyscigu
def __str__(self):
return "Wynik id_kierowcy: " + self.id_kierowcy + ", punkty: " + str(self.punkty) + ", id_wyscigu:" + self.id_wyscigu
| class Kierowca:
def __init__(self, id, nazwisko, imie, kraj):
self.id = id
self.nazwisko = nazwisko
self.imie = imie
self.kraj = kraj
def __str__(self):
return 'Kierowca id: ' + self.id + ', nazwisko: ' + self.nazwisko + ', imie: ' + self.imie + ', kraj: ' + self.kraj
class Wyscig:
def __init__(self, id, rok, miejsce):
self.id = id
self.rok = rok
self.miejsce = miejsce
def __str__(self):
return 'Wyscig id: ' + self.id + ', rok: ' + str(self.rok) + ', miejsce: ' + self.miejsce
class Wynik:
def __init__(self, id_kierowcy, punkty, id_wyscigu):
self.id_kierowcy = id_kierowcy
self.punkty = punkty
self.id_wyscigu = id_wyscigu
def __str__(self):
return 'Wynik id_kierowcy: ' + self.id_kierowcy + ', punkty: ' + str(self.punkty) + ', id_wyscigu:' + self.id_wyscigu |
def run():
#lista=[]
#for i in range(1,101):
# if(i%3!=0):
# lista.append(i**2)
lista=[i**2 for i in range(1,101) if i%3 !=0]
#[element for elemento in irable if condicion]
lista2=[i for i in range(1,9999) if(i%4==0 and (i%6==0 and i%9==0)) ]
print(lista)
if __name__ =="__main__":
run() | def run():
lista = [i ** 2 for i in range(1, 101) if i % 3 != 0]
lista2 = [i for i in range(1, 9999) if i % 4 == 0 and (i % 6 == 0 and i % 9 == 0)]
print(lista)
if __name__ == '__main__':
run() |
#!/usr/bin/env python
def calcSumi(n):
sumi = 0
for i in range(n):
sumi += i
return sumi
def calcSumiSq(n):
sumiSq = 0
for i in range(n):
sumiSq += i*i
return sumiSq
def calcSumTimes(releaseTimes):
sumTimes = 0
for time in releaseTimes:
sumTimes += time
return sumTimes
def calcSumiTimes(releaseTimes, n):
sumiTimes = 0
for i in range(n):
sumiTimes += i*releaseTimes[i]
return sumiTimes
def periodEstimate(releaseTimes):
n = len(releaseTimes)
sumi = calcSumi(n)
sumiSq = calcSumiSq(n)
sumTimes = calcSumTimes(releaseTimes)
sumitimes = calcSumiTimes(releaseTimes, n)
numerator = sumi*sumTimes/n - sumitimes
denominator = sumi*sumi/n - sumiSq
estimatedPeriod = numerator/ denominator
print("period estimate min sq err", estimatedPeriod)
return estimatedPeriod
| def calc_sumi(n):
sumi = 0
for i in range(n):
sumi += i
return sumi
def calc_sumi_sq(n):
sumi_sq = 0
for i in range(n):
sumi_sq += i * i
return sumiSq
def calc_sum_times(releaseTimes):
sum_times = 0
for time in releaseTimes:
sum_times += time
return sumTimes
def calc_sumi_times(releaseTimes, n):
sumi_times = 0
for i in range(n):
sumi_times += i * releaseTimes[i]
return sumiTimes
def period_estimate(releaseTimes):
n = len(releaseTimes)
sumi = calc_sumi(n)
sumi_sq = calc_sumi_sq(n)
sum_times = calc_sum_times(releaseTimes)
sumitimes = calc_sumi_times(releaseTimes, n)
numerator = sumi * sumTimes / n - sumitimes
denominator = sumi * sumi / n - sumiSq
estimated_period = numerator / denominator
print('period estimate min sq err', estimatedPeriod)
return estimatedPeriod |
"""
Defines overloaded operators for basic mathematical operations over unit-containing members (Constant, Parameter, Variables)
"""
class UnexpectedObjectDeclarationError(Exception):
"""
Error raised by the utilization of a non-registered Varaible, Parameter or Constant for the current Model.
"""
def __init__(self, objects, declared_objects):
self.objects = objects
self.declared_objects
def __str__(self):
msg = "Unexpected object declaration error. \n The following objects were used: %s \n But the following objects were declared for the current model. \n %s" % (self.objects, self.declared_objects)
return(msg)
class UnexpectedValueError(Exception):
"""
Error raised by input of an unexpected value. Typically, when the user should input a string an insert a numerical value.
"""
def __init__(self, expected_type):
self.expected_type = expected_type
def __str__(self):
msg = "Unexpected value error. A %s was expected, but one divergent type was supplied." % (self.expected_type)
return(msg)
class UnresolvedPanicError(Exception):
"""
Error raised by unresolved problems. Ideally this exception would never arises. It is included only for debugging purposes
"""
def __init__(self):
pass
def __str__(self):
msg = "Unresolved Panic Error. This should not have ocurrred. \n Perhaps you should debug your code."
return(msg)
class NonDimensionalArgumentError(Exception):
"""
Error raised when a non-dimensional argument was expected but a dimensional one was provided.
Typically occurs in transcendental functions (log, log10, sin, cos, etc...)
"""
def __init__(self, unit):
self.unit = unit
def __str__(self):
msg = "A dimensionless argument was expected \n" + \
str(self.unit.dimension)
return(msg)
class DimensionalCoherenceError(Exception):
"""
Error raised when two non-coherent dimensions are summed or subtracted
"""
def __init__(self, unit_1, unit_2):
self.unit_1 = unit_1
self.unit_2 = unit_2
def __str__(self):
msg = "Dimensions are incohent \n(" + \
str(self.unit_1.dimension) + \
"\n != \n" + \
str(self.unit_2.dimension) + \
")."
return(msg)
def _addUnitContainingOperations(a,b):
return(a._checkDimensionalCoherence(b))
| """
Defines overloaded operators for basic mathematical operations over unit-containing members (Constant, Parameter, Variables)
"""
class Unexpectedobjectdeclarationerror(Exception):
"""
Error raised by the utilization of a non-registered Varaible, Parameter or Constant for the current Model.
"""
def __init__(self, objects, declared_objects):
self.objects = objects
self.declared_objects
def __str__(self):
msg = 'Unexpected object declaration error. \n The following objects were used: %s \n But the following objects were declared for the current model. \n %s' % (self.objects, self.declared_objects)
return msg
class Unexpectedvalueerror(Exception):
"""
Error raised by input of an unexpected value. Typically, when the user should input a string an insert a numerical value.
"""
def __init__(self, expected_type):
self.expected_type = expected_type
def __str__(self):
msg = 'Unexpected value error. A %s was expected, but one divergent type was supplied.' % self.expected_type
return msg
class Unresolvedpanicerror(Exception):
"""
Error raised by unresolved problems. Ideally this exception would never arises. It is included only for debugging purposes
"""
def __init__(self):
pass
def __str__(self):
msg = 'Unresolved Panic Error. This should not have ocurrred. \n Perhaps you should debug your code.'
return msg
class Nondimensionalargumenterror(Exception):
"""
Error raised when a non-dimensional argument was expected but a dimensional one was provided.
Typically occurs in transcendental functions (log, log10, sin, cos, etc...)
"""
def __init__(self, unit):
self.unit = unit
def __str__(self):
msg = 'A dimensionless argument was expected \n' + str(self.unit.dimension)
return msg
class Dimensionalcoherenceerror(Exception):
"""
Error raised when two non-coherent dimensions are summed or subtracted
"""
def __init__(self, unit_1, unit_2):
self.unit_1 = unit_1
self.unit_2 = unit_2
def __str__(self):
msg = 'Dimensions are incohent \n(' + str(self.unit_1.dimension) + '\n != \n' + str(self.unit_2.dimension) + ').'
return msg
def _add_unit_containing_operations(a, b):
return a._checkDimensionalCoherence(b) |
# -*- coding: utf-8 -*-
# Copyright 2008 Matt Harrison
# Licensed under Apache License, Version 2.0 (current)
__version__ = "0.2.5"
__author__ = "matt harrison"
__email__ = "matthewharrison@gmail.com"
| __version__ = '0.2.5'
__author__ = 'matt harrison'
__email__ = 'matthewharrison@gmail.com' |
def rectangle(length: int, width: int) -> str:
if not all([isinstance(length, int), isinstance(width, int)]):
return "Enter valid values!"
area = lambda: length * width
perimeter = lambda: (length + width) * 2
return f"Rectangle area: {area()}\nRectangle perimeter: {perimeter()}"
print(rectangle(2, 10))
print(rectangle("2", 10))
| def rectangle(length: int, width: int) -> str:
if not all([isinstance(length, int), isinstance(width, int)]):
return 'Enter valid values!'
area = lambda : length * width
perimeter = lambda : (length + width) * 2
return f'Rectangle area: {area()}\nRectangle perimeter: {perimeter()}'
print(rectangle(2, 10))
print(rectangle('2', 10)) |
# -*- coding: utf-8 -*-
class AsyncyError(Exception):
def __init__(self, message=None, story=None, line=None):
super().__init__(message)
self.message = message
self.story = story
self.line = line
class AsyncyRuntimeError(AsyncyError):
pass
class TypeAssertionRuntimeError(AsyncyRuntimeError):
def __init__(self, type_expected, type_received, value):
super().__init__(message=f'Incompatible type assertion: '
f'Received {value} ({type_received}), but '
f'expected {type_expected}')
class TypeValueRuntimeError(AsyncyRuntimeError):
def __init__(self, type_expected, type_received, value):
super().__init__(message=f'Type conversion failed from '
f'{type_received} to '
f'{type_expected} with `{value}`')
class InvalidKeywordUsage(AsyncyError):
def __init__(self, story, line, keyword):
super().__init__(message=f'Invalid usage of keyword "{keyword}".',
story=story, line=line)
class ContainerSpecNotRegisteredError(AsyncyError):
def __init__(self, container_name):
super().__init__(message=f'Service {container_name} not registered!')
class TooManyVolumes(AsyncyError):
def __init__(self, volume_count, max_volumes):
super().__init__(
message=f'Your app makes use of {volume_count} volumes. '
f'The total permissible limit during Asyncy Beta is '
f'{max_volumes} volumes. Please see '
f'https://docs.asyncy.com/faq/ for more information.')
class TooManyActiveApps(AsyncyError):
def __init__(self, active_apps, max_apps):
super().__init__(
message=f'Only {max_apps} active apps are allowed during Asyncy '
f'Beta. Please see '
f'https://docs.asyncy.com/faq/ for more information.')
class TooManyServices(AsyncyError):
def __init__(self, service_count, max_services):
super().__init__(
message=f'Your app makes use of {service_count} services. '
f'The total permissible limit during Asyncy Beta is '
f'{max_services} services. Please see '
f'https://docs.asyncy.com/faq/ for more information.')
class ArgumentNotFoundError(AsyncyError):
def __init__(self, story=None, line=None, name=None):
message = None
if name is not None:
message = name + ' is required, but not found'
super().__init__(message, story=story, line=line)
class ArgumentTypeMismatchError(AsyncyError):
def __init__(self, arg_name: str, omg_type: str, story=None, line=None):
message = f'The argument "{arg_name}" does not match the expected ' \
f'type "{omg_type}"'
super().__init__(message, story=story, line=line)
class InvalidCommandError(AsyncyError):
def __init__(self, name, story=None, line=None):
message = None
if name is not None:
message = name + ' is not implemented'
super().__init__(message, story=story, line=line)
class K8sError(AsyncyError):
def __init__(self, story=None, line=None, message=None):
super().__init__(message, story=story, line=line)
class ServiceNotFound(AsyncyError):
def __init__(self, story=None, line=None, name=None):
assert name is not None
super().__init__(
f'The service "{name}" was not found in the Asyncy Hub. '
f'Hint: 1. Check with the Asyncy team if this service has '
f'been made public; 2. Service names are case sensitive',
story=story, line=line)
class ActionNotFound(AsyncyError):
def __init__(self, story=None, line=None, service=None, action=None):
super().__init__(
f'The action "{action}" was not found in the service "{service}". '
f'Hint: Check the Asyncy Hub for a list of supported '
f'actions for this service.',
story=story, line=line)
class EnvironmentVariableNotFound(AsyncyError):
def __init__(self, service=None, variable=None, story=None, line=None):
assert service is not None
assert variable is not None
super().__init__(
f'The service "{service}" requires an environment variable '
f'"{variable}" which was not specified. '
f'Please set it by running '
f'"$ asyncy config set {service}.{variable}=<value>" '
f'in your Asyncy app directory', story, line)
| class Asyncyerror(Exception):
def __init__(self, message=None, story=None, line=None):
super().__init__(message)
self.message = message
self.story = story
self.line = line
class Asyncyruntimeerror(AsyncyError):
pass
class Typeassertionruntimeerror(AsyncyRuntimeError):
def __init__(self, type_expected, type_received, value):
super().__init__(message=f'Incompatible type assertion: Received {value} ({type_received}), but expected {type_expected}')
class Typevalueruntimeerror(AsyncyRuntimeError):
def __init__(self, type_expected, type_received, value):
super().__init__(message=f'Type conversion failed from {type_received} to {type_expected} with `{value}`')
class Invalidkeywordusage(AsyncyError):
def __init__(self, story, line, keyword):
super().__init__(message=f'Invalid usage of keyword "{keyword}".', story=story, line=line)
class Containerspecnotregisterederror(AsyncyError):
def __init__(self, container_name):
super().__init__(message=f'Service {container_name} not registered!')
class Toomanyvolumes(AsyncyError):
def __init__(self, volume_count, max_volumes):
super().__init__(message=f'Your app makes use of {volume_count} volumes. The total permissible limit during Asyncy Beta is {max_volumes} volumes. Please see https://docs.asyncy.com/faq/ for more information.')
class Toomanyactiveapps(AsyncyError):
def __init__(self, active_apps, max_apps):
super().__init__(message=f'Only {max_apps} active apps are allowed during Asyncy Beta. Please see https://docs.asyncy.com/faq/ for more information.')
class Toomanyservices(AsyncyError):
def __init__(self, service_count, max_services):
super().__init__(message=f'Your app makes use of {service_count} services. The total permissible limit during Asyncy Beta is {max_services} services. Please see https://docs.asyncy.com/faq/ for more information.')
class Argumentnotfounderror(AsyncyError):
def __init__(self, story=None, line=None, name=None):
message = None
if name is not None:
message = name + ' is required, but not found'
super().__init__(message, story=story, line=line)
class Argumenttypemismatcherror(AsyncyError):
def __init__(self, arg_name: str, omg_type: str, story=None, line=None):
message = f'The argument "{arg_name}" does not match the expected type "{omg_type}"'
super().__init__(message, story=story, line=line)
class Invalidcommanderror(AsyncyError):
def __init__(self, name, story=None, line=None):
message = None
if name is not None:
message = name + ' is not implemented'
super().__init__(message, story=story, line=line)
class K8Serror(AsyncyError):
def __init__(self, story=None, line=None, message=None):
super().__init__(message, story=story, line=line)
class Servicenotfound(AsyncyError):
def __init__(self, story=None, line=None, name=None):
assert name is not None
super().__init__(f'The service "{name}" was not found in the Asyncy Hub. Hint: 1. Check with the Asyncy team if this service has been made public; 2. Service names are case sensitive', story=story, line=line)
class Actionnotfound(AsyncyError):
def __init__(self, story=None, line=None, service=None, action=None):
super().__init__(f'The action "{action}" was not found in the service "{service}". Hint: Check the Asyncy Hub for a list of supported actions for this service.', story=story, line=line)
class Environmentvariablenotfound(AsyncyError):
def __init__(self, service=None, variable=None, story=None, line=None):
assert service is not None
assert variable is not None
super().__init__(f'The service "{service}" requires an environment variable "{variable}" which was not specified. Please set it by running "$ asyncy config set {service}.{variable}=<value>" in your Asyncy app directory', story, line) |
class BSTNode:
def __init__(self, val: int=None):
self.left = None
self.right = None
self.val = val
def insert(self, val: str):
"""[Uses Binary Search Tree Algorithm to insert Data]
Args:
val (int): [int Value for binary tree insertion 1]
"""
if not self.val:
self.val = val
return
if self.val == val:
return
if val < self.val:
if self.left:
self.left.insert(val)
return
self.left = BSTNode(val)
return
if self.right:
self.right.insert(val)
return
self.right = BSTNode(val)
def get_min(self):
current = self
while current.left is not None:
current = current.left
return current.val
def get_max(self):
current = self
while current.right is not None:
current = current.right
return current.val
def delete(self, val):
if self == None:
return self
if val < self.val:
self.left = self.left.delete(val)
return self
if val > self.val:
self.right = self.left.delete(val)
return self
if self.right == None:
return self.left
if self.left == None:
return self.right
min_larger_node = self.right
while min_larger_node.left:
min_larger_node = min_larger_node.left
self.val = min_larger_node.val
self.right = self.right.delete(min_larger_node.val)
return self
def exists (self, val):
if val == self.val:
return True
if val < self.val:
if self.left == None:
return False
return self.left.exists(val)
if self.right == None:
return False
return self.right.exists(val)
def inorder (self, vals):
if self.left is not None:
self.left.inorder(vals)
if self.val is not None:
vals.append(self.val)
if self.right is not None:
self.right.inorder(vals)
return vals
def preorder(self, vals):
if self.val is not None:
vals.append(self.val)
if self.left is not None:
self.left.preorder(vals)
if self.right is not None:
self.right.preorder(vals)
return vals
def postorder(self, vals):
if self.left is not None:
self.left.postorder(vals)
if self.right is not None:
self.right.postorder(vals)
if self.val is not None:
vals.append(self.val)
return vals
def base_set():
n = input("Enter number set: ")
base_set.base = n.split()
return base_set.base
def display():
nums = base_set.base
for num in nums:
bst.insert(num)
print("preorder:")
print(bst.preorder([]))
print("#")
print("postorder:")
print(bst.postorder([]))
print("#")
print("inorder:")
print(bst.inorder([]))
print("#")
def get_menu_choice():
def print_menu():
print(30 * "-", "Options", 30 * "_")
print("1. Enter value for entry")
print("2. Enter value for deletion")
print("3. Display orders")
print("4. Re-enter base values for tree")
print("5. Exit")
print(80 * "-")
loop = True
while loop:
print_menu()
choice = input("Enter your choice [1-5]: ")
if choice == '1':
add_int = input("Enter value to add:")
bst.insert(add_int)
loop = True
elif choice == '2':
remove_int = input("Enter value to delete: ")
bst.delete(remove_int)
loop = True
elif choice == '3':
choice = ''
display()
loop = True
elif choice == '4':
base_set()
loop = True
elif choice == '5':
print("Exiting..")
loop = False
else:
input("Wrong menu selection. Enter any key to try again..")
return [choice]
if __name__ == "__main__":
bst = BSTNode()
base_set()
get_menu_choice()
| class Bstnode:
def __init__(self, val: int=None):
self.left = None
self.right = None
self.val = val
def insert(self, val: str):
"""[Uses Binary Search Tree Algorithm to insert Data]
Args:
val (int): [int Value for binary tree insertion 1]
"""
if not self.val:
self.val = val
return
if self.val == val:
return
if val < self.val:
if self.left:
self.left.insert(val)
return
self.left = bst_node(val)
return
if self.right:
self.right.insert(val)
return
self.right = bst_node(val)
def get_min(self):
current = self
while current.left is not None:
current = current.left
return current.val
def get_max(self):
current = self
while current.right is not None:
current = current.right
return current.val
def delete(self, val):
if self == None:
return self
if val < self.val:
self.left = self.left.delete(val)
return self
if val > self.val:
self.right = self.left.delete(val)
return self
if self.right == None:
return self.left
if self.left == None:
return self.right
min_larger_node = self.right
while min_larger_node.left:
min_larger_node = min_larger_node.left
self.val = min_larger_node.val
self.right = self.right.delete(min_larger_node.val)
return self
def exists(self, val):
if val == self.val:
return True
if val < self.val:
if self.left == None:
return False
return self.left.exists(val)
if self.right == None:
return False
return self.right.exists(val)
def inorder(self, vals):
if self.left is not None:
self.left.inorder(vals)
if self.val is not None:
vals.append(self.val)
if self.right is not None:
self.right.inorder(vals)
return vals
def preorder(self, vals):
if self.val is not None:
vals.append(self.val)
if self.left is not None:
self.left.preorder(vals)
if self.right is not None:
self.right.preorder(vals)
return vals
def postorder(self, vals):
if self.left is not None:
self.left.postorder(vals)
if self.right is not None:
self.right.postorder(vals)
if self.val is not None:
vals.append(self.val)
return vals
def base_set():
n = input('Enter number set: ')
base_set.base = n.split()
return base_set.base
def display():
nums = base_set.base
for num in nums:
bst.insert(num)
print('preorder:')
print(bst.preorder([]))
print('#')
print('postorder:')
print(bst.postorder([]))
print('#')
print('inorder:')
print(bst.inorder([]))
print('#')
def get_menu_choice():
def print_menu():
print(30 * '-', 'Options', 30 * '_')
print('1. Enter value for entry')
print('2. Enter value for deletion')
print('3. Display orders')
print('4. Re-enter base values for tree')
print('5. Exit')
print(80 * '-')
loop = True
while loop:
print_menu()
choice = input('Enter your choice [1-5]: ')
if choice == '1':
add_int = input('Enter value to add:')
bst.insert(add_int)
loop = True
elif choice == '2':
remove_int = input('Enter value to delete: ')
bst.delete(remove_int)
loop = True
elif choice == '3':
choice = ''
display()
loop = True
elif choice == '4':
base_set()
loop = True
elif choice == '5':
print('Exiting..')
loop = False
else:
input('Wrong menu selection. Enter any key to try again..')
return [choice]
if __name__ == '__main__':
bst = bst_node()
base_set()
get_menu_choice() |
def calculate_amortization_amount(principal: float, interest_rate: float, period: int) -> float:
"""
Calculates Amortization Amount per period
:param principal: Principal amount
:param interest_rate: Interest rate per period
:param period: Total number of period
:return: Amortization amount per period
"""
adjusted_interest = interest_rate / 12
x = (1 + adjusted_interest) ** period
return round(principal * (adjusted_interest * x) / (x - 1), 2)
| def calculate_amortization_amount(principal: float, interest_rate: float, period: int) -> float:
"""
Calculates Amortization Amount per period
:param principal: Principal amount
:param interest_rate: Interest rate per period
:param period: Total number of period
:return: Amortization amount per period
"""
adjusted_interest = interest_rate / 12
x = (1 + adjusted_interest) ** period
return round(principal * (adjusted_interest * x) / (x - 1), 2) |
#!/usr/bin/python
# Copyright (c) 2014 The Native Client Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""Class containing options for command filtering."""
class CommandOptions(object):
def __init__(self, work_dir, clobber_working, clobber_source,
trybot, buildbot):
self._work_dir = work_dir
self._clobber_working = clobber_working
self._clobber_source = clobber_source
self._trybot = trybot
self._buildbot = buildbot
def GetWorkDir(self):
return self._work_dir
def IsClobberWorking(self):
return self._clobber_working
def IsClobberSource(self):
return self._clobber_source
def IsTryBot(self):
return self._trybot
def IsBuildBot(self):
return self._buildbot
def IsBot(self):
return self._trybot or self._buildbot
| """Class containing options for command filtering."""
class Commandoptions(object):
def __init__(self, work_dir, clobber_working, clobber_source, trybot, buildbot):
self._work_dir = work_dir
self._clobber_working = clobber_working
self._clobber_source = clobber_source
self._trybot = trybot
self._buildbot = buildbot
def get_work_dir(self):
return self._work_dir
def is_clobber_working(self):
return self._clobber_working
def is_clobber_source(self):
return self._clobber_source
def is_try_bot(self):
return self._trybot
def is_build_bot(self):
return self._buildbot
def is_bot(self):
return self._trybot or self._buildbot |
def readFile():
#this function to read the file and check if its readable then print it
file = open("in.txt", "r")
if file.mode =='r':
content = file.readlines()
print(content)
def wordExtract():
#this function to read the file and print specific word
nutList = ["energy","total fat","saturated fat", "monounsaturated fat", "polysaturated fat","trans fat",
"cholestrol","sodium", "total carbohydrate", "dietary fiber", "sugar", "protein", "vitamin c", "calcium",
"iron", "calories", "total sugars", "potassium", "fat", "saturated", "trans", "carbohydrate", "sugars",
"added sugars", "added sugar", "vitamin a", "vitamin d", "salt"]
with open("in.txt") as file:
for line in file:
s = line.split()
for i,j in enumerate(s):
for y in range(len(nutList)):
if j == nutList[y]:
print(s[i])
readFile()
wordExtract()
| def read_file():
file = open('in.txt', 'r')
if file.mode == 'r':
content = file.readlines()
print(content)
def word_extract():
nut_list = ['energy', 'total fat', 'saturated fat', 'monounsaturated fat', 'polysaturated fat', 'trans fat', 'cholestrol', 'sodium', 'total carbohydrate', 'dietary fiber', 'sugar', 'protein', 'vitamin c', 'calcium', 'iron', 'calories', 'total sugars', 'potassium', 'fat', 'saturated', 'trans', 'carbohydrate', 'sugars', 'added sugars', 'added sugar', 'vitamin a', 'vitamin d', 'salt']
with open('in.txt') as file:
for line in file:
s = line.split()
for (i, j) in enumerate(s):
for y in range(len(nutList)):
if j == nutList[y]:
print(s[i])
read_file()
word_extract() |
def get_unique_paris(int_list, pair_sum):
stop_index = len(int_list) - 1
unique_paris_set = set()
for cur_index in range(stop_index):
num_1 = int_list[cur_index]
num_2 = pair_sum - num_1
remaining_list = int_list[cur_index+1:]
if num_2 in remaining_list:
pair = (num_1, num_2)
sorted_pair = tuple(sorted(pair))
unique_paris_set.add(sorted_pair)
return unique_paris_set
def convert_string_to_int(str_num_list):
new_list = []
for item in str_num_list:
num = int(item)
new_list.append(num)
return new_list
str_num_list = input().split(",")
pair_sum = int(input())
int_list = convert_string_to_int(str_num_list)
unique_paris = get_unique_paris(int_list, pair_sum)
unique_paris = list(unique_paris)
unique_paris.sort()
for pair in unique_paris:
print(pair)
| def get_unique_paris(int_list, pair_sum):
stop_index = len(int_list) - 1
unique_paris_set = set()
for cur_index in range(stop_index):
num_1 = int_list[cur_index]
num_2 = pair_sum - num_1
remaining_list = int_list[cur_index + 1:]
if num_2 in remaining_list:
pair = (num_1, num_2)
sorted_pair = tuple(sorted(pair))
unique_paris_set.add(sorted_pair)
return unique_paris_set
def convert_string_to_int(str_num_list):
new_list = []
for item in str_num_list:
num = int(item)
new_list.append(num)
return new_list
str_num_list = input().split(',')
pair_sum = int(input())
int_list = convert_string_to_int(str_num_list)
unique_paris = get_unique_paris(int_list, pair_sum)
unique_paris = list(unique_paris)
unique_paris.sort()
for pair in unique_paris:
print(pair) |
# Python lambda functions or anonymous functions
sum = lambda x, y: x + y
print(f'The sum is: {sum(45, 25)}') | sum = lambda x, y: x + y
print(f'The sum is: {sum(45, 25)}') |
class LifeState:
def size(self) -> int:
pass
def value(self, x: int, y: int) -> int:
pass
def evolve(self) -> 'LifeState':
pass
| class Lifestate:
def size(self) -> int:
pass
def value(self, x: int, y: int) -> int:
pass
def evolve(self) -> 'LifeState':
pass |
"""578. Lowest Common Ancestor III
"""
"""
Definition of TreeNode:
class TreeNode:
def __init__(self, val):
this.val = val
this.left, this.right = None, None
"""
class Solution:
"""
@param: root: The root of the binary tree.
@param: A: A TreeNode
@param: B: A TreeNode
@return: Return the LCA of the two nodes.
"""
def lowestCommonAncestor3(self, root, A, B):
# write your code here
#### Practice:
existA, existB, node = self.dfs(root, A, B)
if existA and existB:
return node
return None
def dfs(self, node, a, b):
if not node:
return False, False, None
existA_L, existB_L, node_L = self.dfs(node.left, a, b)
existA_R, existB_R, node_R = self.dfs(node.right, a, b)
existA, existB = False, False
if existA_L or existA_R or node == a:
existA = True
if existB_L or existB_R or node == b:
existB = True
if node == a or node == b:
return existA, existB, node
if node_L and node_R:
return True, True, node
if node_L:
return existA, existB, node_L
if node_R:
return existA, existB, node_R
return existA, existB, None
#####
a_exist, b_exist, LCA = self.helper(root, A, B)
if a_exist and b_exist:
return LCA
return None
def helper(self, node, A, B):
if not node:
return False, False, None
l_a_exist, l_b_exist, left_node = self.helper(node.left, A, B)
r_a_exist, r_b_exist, right_node = self.helper(node.right, A, B)
node_a_exist, node_b_exist = False, False
if l_a_exist or r_a_exist or node == A:
node_a_exist = True
if l_b_exist or r_b_exist or node == B:
node_b_exist = True
if node == A or node == B:
return node_a_exist, node_b_exist, node
if left_node and right_node:
return node_a_exist, node_b_exist, node
if left_node:
return node_a_exist, node_b_exist, left_node
if right_node:
return node_a_exist, node_b_exist, right_node
return node_a_exist, node_b_exist, None
### this works only when two nodes are garanteed to exist
if not root or root == A or root == B:
return root
left = self.lowestCommonAncestor3(root.left, A, B)
right = self.lowestCommonAncestor3(root.right, A, B)
if left and right:
return root
return left or right
#####
| """578. Lowest Common Ancestor III
"""
'\nDefinition of TreeNode:\nclass TreeNode:\n def __init__(self, val):\n this.val = val\n this.left, this.right = None, None\n'
class Solution:
"""
@param: root: The root of the binary tree.
@param: A: A TreeNode
@param: B: A TreeNode
@return: Return the LCA of the two nodes.
"""
def lowest_common_ancestor3(self, root, A, B):
(exist_a, exist_b, node) = self.dfs(root, A, B)
if existA and existB:
return node
return None
def dfs(self, node, a, b):
if not node:
return (False, False, None)
(exist_a_l, exist_b_l, node_l) = self.dfs(node.left, a, b)
(exist_a_r, exist_b_r, node_r) = self.dfs(node.right, a, b)
(exist_a, exist_b) = (False, False)
if existA_L or existA_R or node == a:
exist_a = True
if existB_L or existB_R or node == b:
exist_b = True
if node == a or node == b:
return (existA, existB, node)
if node_L and node_R:
return (True, True, node)
if node_L:
return (existA, existB, node_L)
if node_R:
return (existA, existB, node_R)
return (existA, existB, None)
(a_exist, b_exist, lca) = self.helper(root, A, B)
if a_exist and b_exist:
return LCA
return None
def helper(self, node, A, B):
if not node:
return (False, False, None)
(l_a_exist, l_b_exist, left_node) = self.helper(node.left, A, B)
(r_a_exist, r_b_exist, right_node) = self.helper(node.right, A, B)
(node_a_exist, node_b_exist) = (False, False)
if l_a_exist or r_a_exist or node == A:
node_a_exist = True
if l_b_exist or r_b_exist or node == B:
node_b_exist = True
if node == A or node == B:
return (node_a_exist, node_b_exist, node)
if left_node and right_node:
return (node_a_exist, node_b_exist, node)
if left_node:
return (node_a_exist, node_b_exist, left_node)
if right_node:
return (node_a_exist, node_b_exist, right_node)
return (node_a_exist, node_b_exist, None)
if not root or root == A or root == B:
return root
left = self.lowestCommonAncestor3(root.left, A, B)
right = self.lowestCommonAncestor3(root.right, A, B)
if left and right:
return root
return left or right |
class List:
def __init__(self, client):
self.client = client
self._title = None
self._item = None
self.endpoint = None
@property
def title(self):
return self._title
@title.setter
def title(self, value):
self._title = value
self.endpoint = f"/lists/getbytitle('{self._title}')"
@property
def items(self):
try:
endpoint = self.endpoint + "/items"
select = 'Title,Id'
except Exception:
raise
return self.client.send_request(endpoint, select=select)
@property
def item(self):
return self._item
@item.setter
def item(self, item_id=None, item_name=None, filters=None):
pass
| class List:
def __init__(self, client):
self.client = client
self._title = None
self._item = None
self.endpoint = None
@property
def title(self):
return self._title
@title.setter
def title(self, value):
self._title = value
self.endpoint = f"/lists/getbytitle('{self._title}')"
@property
def items(self):
try:
endpoint = self.endpoint + '/items'
select = 'Title,Id'
except Exception:
raise
return self.client.send_request(endpoint, select=select)
@property
def item(self):
return self._item
@item.setter
def item(self, item_id=None, item_name=None, filters=None):
pass |
# -*- coding: utf-8 -*-
#///////////////////////////////////////////////////////////////
#---------------------------------------------------------------
# File: __init__.py
# Author: Andreas Ntalakas https://github.com/antalakas
#---------------------------------------------------------------
#///////////////////////////////////////////////////////////////
#---------------------------------------------------------------
# Package: miniflow
#---------------------------------------------------------------
# Miniflow is a (mini) neural network library.
# Implements a neural network library.
#
# :license: MIT
#///////////////////////////////////////////////////////////////
# Setup details
__version__ = '0.0.1'
__author__ = 'Andreas Ntalakas'
__url__ = 'https://github.com/antalakas/carnd-term1-miniflow'
__description__ = 'Miniflow is a (mini) neural network library. Implements a neural network library.'
| __version__ = '0.0.1'
__author__ = 'Andreas Ntalakas'
__url__ = 'https://github.com/antalakas/carnd-term1-miniflow'
__description__ = 'Miniflow is a (mini) neural network library. Implements a neural network library.' |
# numbers = dict(first=1, second=2, third=3, fourth=4)
# print(numbers)
# squared_numbers = {key: val**2 for key, val in numbers.items()}
# print('squared_numbers', squared_numbers)
# numbers = dict(first=1, second=2, third=3, fourth=4)
# add2numbers = {}
# print(numbers)
# for key, val in numbers.items():
# print(key, val + 2)
# add2numbers[key] = val + 2
# print(add2numbers)
# numbers = dict(first=1, second=2, third=3, fourth=4)
# add2numbers = {key+'2': val*2 for key, val in numbers.items()}
# print(add2numbers)
# numbers = [1, 2, 3, 4, 5, 6, 7]
# mynumbers = {num: num**2 for num in numbers}
# print(mynumbers)
# # Keys from 0 to 19 and double values
# mynumbers = {str(num): num*2 for num in range(20)}
# print(mynumbers)
# Value is even or odd
mynumbers = {num: ("even" if num % 2 == 0 else "odd") for num in range(20)}
print(mynumbers)
| mynumbers = {num: 'even' if num % 2 == 0 else 'odd' for num in range(20)}
print(mynumbers) |
#!/usr/local/bin/python3
def tag_bloco(texto, classe='success', inline=False):
tag = 'span' if inline else 'div'
return f'<{tag} class={classe}>{texto}</{tag}>'
if __name__ == '__main__':
print(tag_bloco('teste1'))
print(tag_bloco('teste2', inline=True))
print(tag_bloco('teste3', classe="danger"))
| def tag_bloco(texto, classe='success', inline=False):
tag = 'span' if inline else 'div'
return f'<{tag} class={classe}>{texto}</{tag}>'
if __name__ == '__main__':
print(tag_bloco('teste1'))
print(tag_bloco('teste2', inline=True))
print(tag_bloco('teste3', classe='danger')) |
class graph():
def __init__(self):
self.number_of_nodes = 4
self.distance = {
0: {
0: 0,
1: 34,
2: 56,
3: 79
},
1: {
0: 45,
1: 0,
2: 13,
3: 77
},
2: {
0: 89,
1: 56,
2: 0,
3: 75
},
3: {
0: 46,
1: 48,
2: 31,
3: 0
}
}
| class Graph:
def __init__(self):
self.number_of_nodes = 4
self.distance = {0: {0: 0, 1: 34, 2: 56, 3: 79}, 1: {0: 45, 1: 0, 2: 13, 3: 77}, 2: {0: 89, 1: 56, 2: 0, 3: 75}, 3: {0: 46, 1: 48, 2: 31, 3: 0}} |
class Solution:
def isAnagram(self, s: str, t: str) -> bool:
dic = {}
for c in s:
dic[c] = dic.get(c, 0) + 1
for c in t:
if c not in dic:
return False
dic[c] -= 1
if dic[c] < 0:
return False
return not sum(dic.values()) | class Solution:
def is_anagram(self, s: str, t: str) -> bool:
dic = {}
for c in s:
dic[c] = dic.get(c, 0) + 1
for c in t:
if c not in dic:
return False
dic[c] -= 1
if dic[c] < 0:
return False
return not sum(dic.values()) |
a=input("enter first number")
b=input("enter second number")
c=float(a)
d=float(b)
e=c*d
print(e)
| a = input('enter first number')
b = input('enter second number')
c = float(a)
d = float(b)
e = c * d
print(e) |
day_num = 6
file_load = open("input/day6.txt", "r")
file_in = file_load.read()
file_load.close()
file_in = file_in.split("\n\n")
def run():
def yes(input_in):
group_ans = [set(temp_group.replace("\n","")) for temp_group in input_in]
group_total = 0
for temp_group in group_ans:
group_total += len(temp_group)
return group_total
def only(input_in):
group_ans = [temp_group.split("\n") for temp_group in input_in]
group_final = []
for temp_group in group_ans:
group_new = []
for temp_person in temp_group:
group_new.append(set(list(temp_person)))
group_final.append(group_new[0].intersection(*group_new))
group_total = 0
for temp_group in group_final:
group_total += len(temp_group)
return group_total
return yes(file_in), only(file_in)
if __name__ == "__main__":
print(run()) | day_num = 6
file_load = open('input/day6.txt', 'r')
file_in = file_load.read()
file_load.close()
file_in = file_in.split('\n\n')
def run():
def yes(input_in):
group_ans = [set(temp_group.replace('\n', '')) for temp_group in input_in]
group_total = 0
for temp_group in group_ans:
group_total += len(temp_group)
return group_total
def only(input_in):
group_ans = [temp_group.split('\n') for temp_group in input_in]
group_final = []
for temp_group in group_ans:
group_new = []
for temp_person in temp_group:
group_new.append(set(list(temp_person)))
group_final.append(group_new[0].intersection(*group_new))
group_total = 0
for temp_group in group_final:
group_total += len(temp_group)
return group_total
return (yes(file_in), only(file_in))
if __name__ == '__main__':
print(run()) |
n=int(input("Enter a digit from 0 to 9:"))
if n==0:
print("ZERO")
elif n==1:
print("ONE")
elif n==2:
print("TWO")
elif n==3:
print("THREE")
elif n==4:
print("FOUR")
elif n==5:
print("FIVE")
elif n==6:
print("SIX")
elif n==7:
print("SEVEN")
elif n==8:
print("EIGHT")
elif n==9:
print("NINE")
else:
print("plz enter the number between 0 to 9 only")
| n = int(input('Enter a digit from 0 to 9:'))
if n == 0:
print('ZERO')
elif n == 1:
print('ONE')
elif n == 2:
print('TWO')
elif n == 3:
print('THREE')
elif n == 4:
print('FOUR')
elif n == 5:
print('FIVE')
elif n == 6:
print('SIX')
elif n == 7:
print('SEVEN')
elif n == 8:
print('EIGHT')
elif n == 9:
print('NINE')
else:
print('plz enter the number between 0 to 9 only') |
def plus_proche_method_2(list, force):
for i in range(len(list)):
key = list[i]
j = i - 1
while j >= 0 and key < list[j]:
list[j + 1] = list[j]
j -= 1
list[j + 1] = key
for i in range(len(list)):
if list[i] == force:
if i == 0:
return list[i], list[i + 1]
elif i == len(list) - 1:
return list[i - 1], list[i]
else:
if list[i] - list[i - 1] < list[i + 1] - list[i]:
return list[i - 1], list[i]
else:
return list[i], list[i + 1]
# def plus_proche_method_1(list):
# for i in range(1, len(list)-1):
list = [2, 3, 5, 1, 7, 8, 12, 14]
list_temp = [9,2,6,8]
print(plus_proche_method_2(list_temp, )) | def plus_proche_method_2(list, force):
for i in range(len(list)):
key = list[i]
j = i - 1
while j >= 0 and key < list[j]:
list[j + 1] = list[j]
j -= 1
list[j + 1] = key
for i in range(len(list)):
if list[i] == force:
if i == 0:
return (list[i], list[i + 1])
elif i == len(list) - 1:
return (list[i - 1], list[i])
elif list[i] - list[i - 1] < list[i + 1] - list[i]:
return (list[i - 1], list[i])
else:
return (list[i], list[i + 1])
list = [2, 3, 5, 1, 7, 8, 12, 14]
list_temp = [9, 2, 6, 8]
print(plus_proche_method_2(list_temp)) |
"""
This script is used to launch data and vis services, and the start the experiment script.
It accept a path to experiment launch file:
python launch_realtime_vis.py D:\projects\python\maro\examples\hello_world\cim\hello.py
maro vis service start/stop
maro start path/exp
steps:
1. launch the servcies' docker-compose.yml if services not started.
2. lauch the experiment file
"""
| """
This script is used to launch data and vis services, and the start the experiment script.
It accept a path to experiment launch file:
python launch_realtime_vis.py D:\\projects\\python\\maro\\examples\\hello_world\\cim\\hello.py
maro vis service start/stop
maro start path/exp
steps:
1. launch the servcies' docker-compose.yml if services not started.
2. lauch the experiment file
""" |
def has_period(self):
"""Indicates if an axis has symmetries.
Parameters
----------
self: DataPattern
a DataPatternobject
Returns
-------
Boolean
"""
return False
| def has_period(self):
"""Indicates if an axis has symmetries.
Parameters
----------
self: DataPattern
a DataPatternobject
Returns
-------
Boolean
"""
return False |
### Model data
class catboost_model(object):
float_features_index = [
1, 3, 9, 11, 13, 15, 19, 23, 32, 39, 47,
]
float_feature_count = 50
cat_feature_count = 0
binary_feature_count = 11
tree_count = 2
float_feature_borders = [
[0.0622565],
[0.5],
[0.5],
[0.5],
[0.5],
[0.98272598],
[0.5],
[0.097222149],
[0.5],
[0.0010412449],
[0.60571146],
]
tree_depth = [6, 5]
tree_split_border = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]
tree_split_feature_index = [8, 0, 5, 9, 4, 6, 10, 7, 3, 2, 1]
tree_split_xor_mask = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]
cat_features_index = []
one_hot_cat_feature_index = []
one_hot_hash_values = [
]
ctr_feature_borders = [
]
## Aggregated array of leaf values for trees. Each tree is represented by a separate line:
leaf_values = [
0.0007909629375735687, 0.0005249999905005097, 0.00191470584442072, 0, 0.0009313725844463869, 0.001049999981001019, 0, 0, 0.001480637814883255, 0.002774999973736703, 0.001819217596641749, 0.002135000514574336, 0, 0, 0, 0, 0.001424999964237213, 0, 0.001049999981001019, 0, 0, 0, 0, 0, 0.001224999977834523, 0, 0.00305039463412899, 0.002099999962002039, 0, 0, 0, 0, 0.0005876865565304213, 0.00295422133567028, 0, 0, 0, 0, 0, 0, 0.001826086923480034, 0.003670588189538786, 0.002372058927585532, 0.003879166769288062, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0.0005249999905005097, 0, 0, 0, 0, 0,
0.0006921719453553643, 0, 0.0004117280956206751, 0, 0.0002214690529509848, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0.001420420624297372, 0.003184800622098175, 0.0004887949433514606, 0.002349379335729056, 0.0008775089953256384, 0.0005138952071370965, 0, 0, 0.001868792742743027, 0.003363426897674278, 0.001574119166780254, 0.003566977137765126, 0.0006661870385846651, 0.001839427350751397, 0, 0.0006163558457548979
]
cat_features_hashes = {
}
def hash_uint64(string):
return cat_features_hashes.get(str(string), 0x7fFFffFF)
### Applicator for the CatBoost model
def apply_catboost_model(float_features, cat_features=[], ntree_start=0, ntree_end=catboost_model.tree_count):
"""
Applies the model built by CatBoost.
Parameters
----------
float_features : list of float features
cat_features : list of categorical features
You need to pass float and categorical features separately in the same order they appeared in train dataset.
For example if you had features f1,f2,f3,f4, where f2 and f4 were considered categorical, you need to pass here float_features=f1,f3, cat_features=f2,f4
Returns
-------
prediction : formula value for the model and the features
"""
if ntree_end == 0:
ntree_end = catboost_model.tree_count
else:
ntree_end = min(ntree_end, catboost_model.tree_count)
model = catboost_model
assert len(float_features) >= model.float_feature_count
assert len(cat_features) >= model.cat_feature_count
# Binarise features
binary_features = [0] * model.binary_feature_count
binary_feature_index = 0
for i in range(len(model.float_feature_borders)):
for border in model.float_feature_borders[i]:
binary_features[binary_feature_index] += 1 if (float_features[model.float_features_index[i]] > border) else 0
binary_feature_index += 1
transposed_hash = [0] * model.cat_feature_count
for i in range(model.cat_feature_count):
transposed_hash[i] = hash_uint64(cat_features[i])
if len(model.one_hot_cat_feature_index) > 0:
cat_feature_packed_indexes = {}
for i in range(model.cat_feature_count):
cat_feature_packed_indexes[model.cat_features_index[i]] = i
for i in range(len(model.one_hot_cat_feature_index)):
cat_idx = cat_feature_packed_indexes[model.one_hot_cat_feature_index[i]]
hash = transposed_hash[cat_idx]
for border_idx in range(len(model.one_hot_hash_values[i])):
binary_features[binary_feature_index] |= (1 if hash == model.one_hot_hash_values[i][border_idx] else 0) * (border_idx + 1)
binary_feature_index += 1
if hasattr(model, 'model_ctrs') and model.model_ctrs.used_model_ctrs_count > 0:
ctrs = [0.] * model.model_ctrs.used_model_ctrs_count;
calc_ctrs(model.model_ctrs, binary_features, transposed_hash, ctrs)
for i in range(len(model.ctr_feature_borders)):
for border in model.ctr_feature_borders[i]:
binary_features[binary_feature_index] += 1 if ctrs[i] > border else 0
binary_feature_index += 1
# Extract and sum values from trees
result = 0.
tree_splits_index = 0
current_tree_leaf_values_index = 0
for tree_id in range(ntree_start, ntree_end):
current_tree_depth = model.tree_depth[tree_id]
index = 0
for depth in range(current_tree_depth):
border_val = model.tree_split_border[tree_splits_index + depth]
feature_index = model.tree_split_feature_index[tree_splits_index + depth]
xor_mask = model.tree_split_xor_mask[tree_splits_index + depth]
index |= ((binary_features[feature_index] ^ xor_mask) >= border_val) << depth
result += model.leaf_values[current_tree_leaf_values_index + index]
tree_splits_index += current_tree_depth
current_tree_leaf_values_index += (1 << current_tree_depth)
return result
| class Catboost_Model(object):
float_features_index = [1, 3, 9, 11, 13, 15, 19, 23, 32, 39, 47]
float_feature_count = 50
cat_feature_count = 0
binary_feature_count = 11
tree_count = 2
float_feature_borders = [[0.0622565], [0.5], [0.5], [0.5], [0.5], [0.98272598], [0.5], [0.097222149], [0.5], [0.0010412449], [0.60571146]]
tree_depth = [6, 5]
tree_split_border = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]
tree_split_feature_index = [8, 0, 5, 9, 4, 6, 10, 7, 3, 2, 1]
tree_split_xor_mask = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]
cat_features_index = []
one_hot_cat_feature_index = []
one_hot_hash_values = []
ctr_feature_borders = []
leaf_values = [0.0007909629375735687, 0.0005249999905005097, 0.00191470584442072, 0, 0.0009313725844463869, 0.001049999981001019, 0, 0, 0.001480637814883255, 0.002774999973736703, 0.001819217596641749, 0.002135000514574336, 0, 0, 0, 0, 0.001424999964237213, 0, 0.001049999981001019, 0, 0, 0, 0, 0, 0.001224999977834523, 0, 0.00305039463412899, 0.002099999962002039, 0, 0, 0, 0, 0.0005876865565304213, 0.00295422133567028, 0, 0, 0, 0, 0, 0, 0.001826086923480034, 0.003670588189538786, 0.002372058927585532, 0.003879166769288062, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0.0005249999905005097, 0, 0, 0, 0, 0, 0.0006921719453553643, 0, 0.0004117280956206751, 0, 0.0002214690529509848, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0.001420420624297372, 0.003184800622098175, 0.0004887949433514606, 0.002349379335729056, 0.0008775089953256384, 0.0005138952071370965, 0, 0, 0.001868792742743027, 0.003363426897674278, 0.001574119166780254, 0.003566977137765126, 0.0006661870385846651, 0.001839427350751397, 0, 0.0006163558457548979]
cat_features_hashes = {}
def hash_uint64(string):
return cat_features_hashes.get(str(string), 2147483647)
def apply_catboost_model(float_features, cat_features=[], ntree_start=0, ntree_end=catboost_model.tree_count):
"""
Applies the model built by CatBoost.
Parameters
----------
float_features : list of float features
cat_features : list of categorical features
You need to pass float and categorical features separately in the same order they appeared in train dataset.
For example if you had features f1,f2,f3,f4, where f2 and f4 were considered categorical, you need to pass here float_features=f1,f3, cat_features=f2,f4
Returns
-------
prediction : formula value for the model and the features
"""
if ntree_end == 0:
ntree_end = catboost_model.tree_count
else:
ntree_end = min(ntree_end, catboost_model.tree_count)
model = catboost_model
assert len(float_features) >= model.float_feature_count
assert len(cat_features) >= model.cat_feature_count
binary_features = [0] * model.binary_feature_count
binary_feature_index = 0
for i in range(len(model.float_feature_borders)):
for border in model.float_feature_borders[i]:
binary_features[binary_feature_index] += 1 if float_features[model.float_features_index[i]] > border else 0
binary_feature_index += 1
transposed_hash = [0] * model.cat_feature_count
for i in range(model.cat_feature_count):
transposed_hash[i] = hash_uint64(cat_features[i])
if len(model.one_hot_cat_feature_index) > 0:
cat_feature_packed_indexes = {}
for i in range(model.cat_feature_count):
cat_feature_packed_indexes[model.cat_features_index[i]] = i
for i in range(len(model.one_hot_cat_feature_index)):
cat_idx = cat_feature_packed_indexes[model.one_hot_cat_feature_index[i]]
hash = transposed_hash[cat_idx]
for border_idx in range(len(model.one_hot_hash_values[i])):
binary_features[binary_feature_index] |= (1 if hash == model.one_hot_hash_values[i][border_idx] else 0) * (border_idx + 1)
binary_feature_index += 1
if hasattr(model, 'model_ctrs') and model.model_ctrs.used_model_ctrs_count > 0:
ctrs = [0.0] * model.model_ctrs.used_model_ctrs_count
calc_ctrs(model.model_ctrs, binary_features, transposed_hash, ctrs)
for i in range(len(model.ctr_feature_borders)):
for border in model.ctr_feature_borders[i]:
binary_features[binary_feature_index] += 1 if ctrs[i] > border else 0
binary_feature_index += 1
result = 0.0
tree_splits_index = 0
current_tree_leaf_values_index = 0
for tree_id in range(ntree_start, ntree_end):
current_tree_depth = model.tree_depth[tree_id]
index = 0
for depth in range(current_tree_depth):
border_val = model.tree_split_border[tree_splits_index + depth]
feature_index = model.tree_split_feature_index[tree_splits_index + depth]
xor_mask = model.tree_split_xor_mask[tree_splits_index + depth]
index |= (binary_features[feature_index] ^ xor_mask >= border_val) << depth
result += model.leaf_values[current_tree_leaf_values_index + index]
tree_splits_index += current_tree_depth
current_tree_leaf_values_index += 1 << current_tree_depth
return result |
# Copyright (c) 2013 The WebRTC project authors. All Rights Reserved.
#
# Use of this source code is governed by a BSD-style license
# that can be found in the LICENSE file in the root of the source
# tree. An additional intellectual property rights grant can be found
# in the file PATENTS. All contributing project authors may
# be found in the AUTHORS file in the root of the source tree.
# See webrtc/build/apk_tests.gyp for more information about this file.
{
'targets': [
{
'target_name': 'modules_unittests_apk',
'type': 'none',
}],
}
| {'targets': [{'target_name': 'modules_unittests_apk', 'type': 'none'}]} |
#LCM309
class Solution:
def maxProfit_LinearSpace(self, prices: List[int]) -> int:
# LINEAR SPACE, LINEAR TIME
# initialise the arrays for buy and sell to be used for bottom up DP
n = len(prices)
if n<2:
return 0
buy, sell = [0]*n, [0]*n
buy[0], sell[0] = -prices[0], 0 # base cases: can buy stock on first day, but cannot sell
for i in range(1, n):
# either do not buy on ith day, thus buy remains same as day i-1
# or buy today, only possible if you have sold a day before yesterday, due to cooldown in b/w
if i>1:
buy[i] = max(buy[i-1], sell[i-2]-prices[i])
else:
buy[i] = max(buy[i-1], 0-prices[i]) # there is no i-2 when i=1, thus sell is 0 for that
# either do not sell today, sell remains the best sell as the previous day
# or sell today, thus which has been bought previously (even we can sell what we have bought
# just the day before that is i-1) thus prices[i] is added to total profit
sell[i] = max(sell[i-1], buy[i-1] + prices[i])
return sell[-1]
def maxProfit(self, prices: List[int]) -> int:
# CONSTANT SPACE, LINEAR TIME
# initialise the arrays for buy and sell to be used for bottom up DP
n = len(prices)
if n<2:
return 0
buy_0, sell_0, buy_1, sell_1, sell_2 = 0, 0, 0, 0, 0
buy_1 = -prices[0] # base cases: can buy stock on first day, but cannot sell
for i in range(1, n):
# either do not buy on ith day, thus buy remains same as day i-1
# or buy today, only possible if you have sold a day before yesterday, due to cooldown in b/w
if i>1:
buy_0 = max(buy_1, sell_2-prices[i])
else:
buy_0 = max(buy_1, -prices[i]) # there is no i-2 when i=1, thus sell is 0 for that
# either do not sell today, sell remains the best sell as the previous day
# or sell today, thus which has been bought previously (even we can sell what we have bought
# just the day before that is i-1) thus prices[i] is added to total profit
sell_0 = max(sell_1, buy_1 + prices[i])
# space optimization
sell_2 = sell_1
sell_1 = sell_0
buy_1 = buy_0
return sell_0
| class Solution:
def max_profit__linear_space(self, prices: List[int]) -> int:
n = len(prices)
if n < 2:
return 0
(buy, sell) = ([0] * n, [0] * n)
(buy[0], sell[0]) = (-prices[0], 0)
for i in range(1, n):
if i > 1:
buy[i] = max(buy[i - 1], sell[i - 2] - prices[i])
else:
buy[i] = max(buy[i - 1], 0 - prices[i])
sell[i] = max(sell[i - 1], buy[i - 1] + prices[i])
return sell[-1]
def max_profit(self, prices: List[int]) -> int:
n = len(prices)
if n < 2:
return 0
(buy_0, sell_0, buy_1, sell_1, sell_2) = (0, 0, 0, 0, 0)
buy_1 = -prices[0]
for i in range(1, n):
if i > 1:
buy_0 = max(buy_1, sell_2 - prices[i])
else:
buy_0 = max(buy_1, -prices[i])
sell_0 = max(sell_1, buy_1 + prices[i])
sell_2 = sell_1
sell_1 = sell_0
buy_1 = buy_0
return sell_0 |
#
# PySNMP MIB module ERI-DNX-NEST-SYS-MIB (http://snmplabs.com/pysmi)
# ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/ERI-DNX-NEST-SYS-MIB
# Produced by pysmi-0.3.4 at Wed May 1 13:05:58 2019
# On host DAVWANG4-M-1475 platform Darwin version 18.5.0 by user davwang4
# Using Python version 3.7.3 (default, Mar 27 2019, 09:23:15)
#
ObjectIdentifier, Integer, OctetString = mibBuilder.importSymbols("ASN1", "ObjectIdentifier", "Integer", "OctetString")
NamedValues, = mibBuilder.importSymbols("ASN1-ENUMERATION", "NamedValues")
ConstraintsIntersection, ValueRangeConstraint, SingleValueConstraint, ConstraintsUnion, ValueSizeConstraint = mibBuilder.importSymbols("ASN1-REFINEMENT", "ConstraintsIntersection", "ValueRangeConstraint", "SingleValueConstraint", "ConstraintsUnion", "ValueSizeConstraint")
devices, dnxTrapEnterprise, dnx, database, NestSlotAddress, DecisionType, UnsignedInt, trapSequence, sysMgr = mibBuilder.importSymbols("ERI-DNX-SMC-MIB", "devices", "dnxTrapEnterprise", "dnx", "database", "NestSlotAddress", "DecisionType", "UnsignedInt", "trapSequence", "sysMgr")
eriMibs, = mibBuilder.importSymbols("ERI-ROOT-SMI", "eriMibs")
NotificationGroup, ModuleCompliance = mibBuilder.importSymbols("SNMPv2-CONF", "NotificationGroup", "ModuleCompliance")
MibIdentifier, iso, TimeTicks, ModuleIdentity, IpAddress, Counter64, Gauge32, Counter32, MibScalar, MibTable, MibTableRow, MibTableColumn, Bits, Unsigned32, NotificationType, ObjectIdentity, Integer32 = mibBuilder.importSymbols("SNMPv2-SMI", "MibIdentifier", "iso", "TimeTicks", "ModuleIdentity", "IpAddress", "Counter64", "Gauge32", "Counter32", "MibScalar", "MibTable", "MibTableRow", "MibTableColumn", "Bits", "Unsigned32", "NotificationType", "ObjectIdentity", "Integer32")
TextualConvention, DisplayString = mibBuilder.importSymbols("SNMPv2-TC", "TextualConvention", "DisplayString")
eriDNXNestSysMIB = ModuleIdentity((1, 3, 6, 1, 4, 1, 644, 3, 14))
eriDNXNestSysMIB.setRevisions(('2003-07-17 00:00', '2002-05-13 00:00',))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
if mibBuilder.loadTexts: eriDNXNestSysMIB.setRevisionsDescriptions(('Nevio Poljak - eri_DnxNest MIB Rev 01.4 (SW Rel. 16.0) Added new Configuration Error Device States for display in the slot tables to support bug #6447.', 'Nevio Poljak - eri_DnxNest MIB Rev 01.0 Initial Release of this MIB.',))
if mibBuilder.loadTexts: eriDNXNestSysMIB.setLastUpdated('200307170000Z')
if mibBuilder.loadTexts: eriDNXNestSysMIB.setOrganization('Eastern Research, Inc.')
if mibBuilder.loadTexts: eriDNXNestSysMIB.setContactInfo('Customer Service Postal: Eastern Research, Inc. 225 Executive Drive Moorestown, NJ 08057 Phone: +1-800-337-4374 Email: support@erinc.com')
if mibBuilder.loadTexts: eriDNXNestSysMIB.setDescription('The ERI Enterprise MIB Module for the DNX Nest System Admistration.')
class DnxSlotDeviceType(TextualConvention, Integer32):
description = 'Determines the Device Card type in the slot.'
status = 'current'
subtypeSpec = Integer32.subtypeSpec + ConstraintsUnion(SingleValueConstraint(0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 14, 15, 16, 17, 18, 19, 20, 21, 22, 25, 26, 27, 28, 29, 30, 31))
namedValues = NamedValues(("slot", 0), ("octal-t1e1", 1), ("quadHighSpeed", 2), ("octalHighSpeed", 3), ("quadOcu", 4), ("smc", 5), ("quad-t1", 6), ("ds3", 7), ("testAccess", 8), ("octalVoice", 9), ("powerSupply", 14), ("psx", 15), ("router", 16), ("sts1", 17), ("hds3", 18), ("gr303", 19), ("xcc", 20), ("xlc", 21), ("xnm", 22), ("ds0dp", 25), ("stm1", 26), ("oc3", 27), ("e3", 28), ("xlc-ot1e1", 29), ("stm1X", 30), ("oc3X", 31))
class DnxSlotDeviceState(TextualConvention, Integer32):
description = 'Determines state of the Device Card in the configured slot.'
status = 'current'
subtypeSpec = Integer32.subtypeSpec + ConstraintsUnion(SingleValueConstraint(0, 1, 2, 3, 4, 5, 6, 7, 8, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24))
namedValues = NamedValues(("not-present", 0), ("online", 1), ("offline", 2), ("disabled", 3), ("standby", 4), ("defective", 5), ("busError", 6), ("outOfService", 7), ("configError", 8), ("online-online", 11), ("online-offline", 12), ("online-standby", 13), ("online-defective", 14), ("online-busError", 15), ("online-oos", 16), ("standby-online", 17), ("standby-offline", 18), ("standby-standby", 19), ("standby-defective", 20), ("standby-busError", 21), ("standby-oos", 22), ("online-cfgError", 23), ("standby-cfgError", 24))
slotConfigTable = MibTable((1, 3, 6, 1, 4, 1, 644, 2, 4, 1, 3), )
if mibBuilder.loadTexts: slotConfigTable.setStatus('current')
if mibBuilder.loadTexts: slotConfigTable.setDescription('A list of the device cards in this node with the static and dynamic type information. The maximum number of entries depends on the number of slots in the system plus 3 default entries for the system manager cards and the Protection Switch.')
slotConfigEntry = MibTableRow((1, 3, 6, 1, 4, 1, 644, 2, 4, 1, 3, 1), ).setIndexNames((0, "ERI-DNX-NEST-SYS-MIB", "slotNbr"))
if mibBuilder.loadTexts: slotConfigEntry.setStatus('current')
if mibBuilder.loadTexts: slotConfigEntry.setDescription("The conceptual row of the Slot Configuration table. A row in this table can not be created or deleted. A row in this table can be modified by providing valid values for either the Slot Name, Configured Device Type, Device Redundancy, or Slot Command Status. Deleting the Slot Configuration using the Slot Command Status value of 'delete-slot-config' will result in the removal of all configured connections associated with that slot number. The slotConfigCmdStatus field must be included as a variable in a SET PDU for the action to take effect. If the slotConfigCmdStatus is missing from the SET PDU, the GET RESPONSE will contain the SNMP error status of 'genErr' for and an error index equal to the last variable.")
slotNbr = MibTableColumn((1, 3, 6, 1, 4, 1, 644, 2, 4, 1, 3, 1, 1), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 99))).setMaxAccess("readonly")
if mibBuilder.loadTexts: slotNbr.setStatus('current')
if mibBuilder.loadTexts: slotNbr.setDescription(' The slot number in the node.')
slotConfigDeviceType = MibTableColumn((1, 3, 6, 1, 4, 1, 644, 2, 4, 1, 3, 1, 2), DnxSlotDeviceType()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: slotConfigDeviceType.setStatus('current')
if mibBuilder.loadTexts: slotConfigDeviceType.setDescription(" This is the slot type configured by the user. The value, slot(0) is the default type for an unconfigured device. If slot(0) is used in a Set Request, the agent will return an error status of 'badValue'. The slot entries representing the System Manager Cards and the Protection Switch device cannot be used in a Set Request since their device type is static.")
slotActualDeviceType = MibTableColumn((1, 3, 6, 1, 4, 1, 644, 2, 4, 1, 3, 1, 3), DnxSlotDeviceType()).setMaxAccess("readonly")
if mibBuilder.loadTexts: slotActualDeviceType.setStatus('current')
if mibBuilder.loadTexts: slotActualDeviceType.setDescription(' This is the actual slot type sent back by the card. ')
slotDeviceState = MibTableColumn((1, 3, 6, 1, 4, 1, 644, 2, 4, 1, 3, 1, 4), DnxSlotDeviceState()).setMaxAccess("readonly")
if mibBuilder.loadTexts: slotDeviceState.setStatus('current')
if mibBuilder.loadTexts: slotDeviceState.setDescription(' The current machine state of the device. not-present (0) Indicates no hardware detected in the slot. online (1) Device is present and is considered primary operational. offline (2) Device is present but currently not operational. disabled (3) Applies to the Protection Switch box if system cannot support redundancy. standby (4) Device is present but considered as secondary. defective (5) Device is present but could not be activated. bus-error (6) Device is present and reporting a bus connection error. out-of-serv (7) Operator has placed device in Out of Service mode.')
slotAlarmLevel = MibTableColumn((1, 3, 6, 1, 4, 1, 644, 2, 4, 1, 3, 1, 5), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 1, 2, 3, 4, 5, 6, 7, 99))).clone(namedValues=NamedValues(("no-alarm", 0), ("minor-level", 1), ("major-level", 2), ("major-minor", 3), ("critical-level", 4), ("critical-minor", 5), ("critical-major", 6), ("critical-major-minor", 7), ("unknown", 99)))).setMaxAccess("readonly")
if mibBuilder.loadTexts: slotAlarmLevel.setStatus('current')
if mibBuilder.loadTexts: slotAlarmLevel.setDescription(" The current slot device alarm condition level that indicates it's severity. ")
slotDeviceName = MibTableColumn((1, 3, 6, 1, 4, 1, 644, 2, 4, 1, 3, 1, 6), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 11))).setMaxAccess("readwrite")
if mibBuilder.loadTexts: slotDeviceName.setStatus('current')
if mibBuilder.loadTexts: slotDeviceName.setDescription('The user defined name for this slot/device.')
slotDeviceVersion = MibTableColumn((1, 3, 6, 1, 4, 1, 644, 2, 4, 1, 3, 1, 7), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 12))).setMaxAccess("readonly")
if mibBuilder.loadTexts: slotDeviceVersion.setStatus('current')
if mibBuilder.loadTexts: slotDeviceVersion.setDescription('The software version release identification number for this device. ')
slotDeviceRedundancy = MibTableColumn((1, 3, 6, 1, 4, 1, 644, 2, 4, 1, 3, 1, 8), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 1, 2))).clone(namedValues=NamedValues(("disable", 0), ("enable", 1), ("notApplicable", 2)))).setMaxAccess("readwrite")
if mibBuilder.loadTexts: slotDeviceRedundancy.setStatus('current')
if mibBuilder.loadTexts: slotDeviceRedundancy.setDescription('The configured N+1 Redundancy state of the device. The slot entries representing the System Manager Cards and the Protection Switch device cannot be used in a Set Request since N+1 Redundancy does not apply to them. disable (0) Device is not configured as part of the Redundancy Group. enable (1) Device is configured as part of the Redundancy Group. n/a (2) Device does not support Redundancy.')
slotMiscState = MibTableColumn((1, 3, 6, 1, 4, 1, 644, 2, 4, 1, 3, 1, 9), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 1, 2, 3, 4, 5, 6, 7))).clone(namedValues=NamedValues(("none", 0), ("errors", 1), ("test", 2), ("errors-test", 3), ("clockSrc", 4), ("errors-clockSrc", 5), ("test-clockSrc", 6), ("errors-test-clockSrc", 7)))).setMaxAccess("readonly")
if mibBuilder.loadTexts: slotMiscState.setStatus('current')
if mibBuilder.loadTexts: slotMiscState.setDescription('The current slot/device miscellaneous state conditions. none (0) no misc condition errors (1) errors reported on device test (2) device is in test mode errors-test (3) errors reported on device while in test mode clockSrc (4) device is the source for the system clock errors-clockSrc (5) device is the source for the system clock and errors found test-clockSrc (6) device is the source for the system clock and is in test mode errors-test-clockSrc (7) device is the source for the system clock and is in test mode and errors were found')
slotConfigCmdStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 644, 2, 4, 1, 3, 1, 10), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 1, 2, 10, 11, 101, 102, 110, 111, 200, 201, 202, 203, 204, 205, 207, 208, 450, 500, 501, 502))).clone(namedValues=NamedValues(("ready-for-command", 0), ("update-slot-config", 1), ("delete-slot-config", 2), ("ndr-switchover", 10), ("ndr-restore", 11), ("update-successful", 101), ("delete-successful", 102), ("switch-successful", 110), ("restore-successful", 111), ("err-general-slot-config-error", 200), ("err-invalid-slot-type", 201), ("err-invalid-slot-command", 202), ("err-invalid-slot-name", 203), ("err-redundancy-disabled", 204), ("err-cannot-chg-sys-device", 205), ("err-invalid-redundancy-state", 207), ("err-cannot-delete-online-device", 208), ("err-data-locked-by-another-user", 450), ("err-snmp-parse-failed", 500), ("err-invalid-snmp-type", 501), ("err-invalid-snmp-var-size", 502)))).setMaxAccess("readwrite")
if mibBuilder.loadTexts: slotConfigCmdStatus.setStatus('current')
if mibBuilder.loadTexts: slotConfigCmdStatus.setDescription('The command status for this slot configuration row/record. The value used in a SET will be replaced by a response value in the GET RESPONSE indicating success or failure. Default Response State used in GET RESPONSE Command ready-for-command (0) initial default status for a row Slot Device Commands used in SET Command (1..99) update-slot-config (1) change an aspect of current slot configuration delete-slot-config (2) remove existing Slot Configuration. Deleting the Slot Configuration using the Slot Command Status will result in the removal of all configured connections associated with that slot number. ndr-switchover (10) force a switchover to the Standby device ndr-restore (11) force a restore back to the original device Response States used in GET RESPONSE Command (100..199) update-successful (101) slot data has been successfully changed delete-successful (102) slot data has been successfully removed switch-successful (110) Slot N+1 Redundancy device has been successfully switched over to Standby device restore-successful (111) Slot N+1 Redundancy device has been successfully restored back to Primary device Slot Config Error Codes used in GET RESPONSE Command (200..799) err-general-slot-config-error (200) Unknown slot configuration error occurred. err-invalid-slot-type (201) Configured slot type not in valid range err-invalid-slot-command (202) Unrecognized slot command-action err-invalid-slot-name (203) Configured slot name too long err-redundancy-disabled (204) Redundancy disabled on this system or does not apply to device type err-cannot-chg-sys-device (205) System Device type does not support configuration change err-invalid-redundancy-state (207) Redundancy state does not apply or invalid err-cannot-delete-online-device (208) Device cannot be present when deleting configuration err-data-locked-by-another-user (450) Another administrative user is making changes to this part of the system via a terminal session. Check Event Log for user name err-snmp-parse-failed (500) Agent could not parse variable err-invalid-snmp-type (501) Variable ASN type does not match Agent defined type err-invalid-snmp-var-size (502) Variable size is too big')
numberSlots = MibScalar((1, 3, 6, 1, 4, 1, 644, 2, 4, 1, 4), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: numberSlots.setStatus('obsolete')
if mibBuilder.loadTexts: numberSlots.setDescription(' This is the number of slots in the node.')
softwareRelease = MibScalar((1, 3, 6, 1, 4, 1, 644, 2, 4, 1, 5), DisplayString()).setMaxAccess("readonly")
if mibBuilder.loadTexts: softwareRelease.setStatus('obsolete')
if mibBuilder.loadTexts: softwareRelease.setDescription('In the form Release x.xx where x.xx is the release number.')
redundancy = MibIdentifier((1, 3, 6, 1, 4, 1, 644, 2, 4, 1, 9))
ndrEnabled = MibScalar((1, 3, 6, 1, 4, 1, 644, 2, 4, 1, 9, 1), DecisionType()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: ndrEnabled.setStatus('current')
if mibBuilder.loadTexts: ndrEnabled.setDescription("Indicates the system's capability of supporting the N+1 Device Redundancy functionality. The user should configure this variable based on the existence of the Protection Switch Box (PSX) Device. The ndrState will reflect the actual status of N+1 Redundancy. no (0) No PSX attached, N+1 Redundancy disabled. yes (1) PSX attached, N+1 Redundancy enabled.")
ndrState = MibScalar((1, 3, 6, 1, 4, 1, 644, 2, 4, 1, 9, 2), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4))).clone(namedValues=NamedValues(("disabled", 1), ("frozen", 2), ("delayed", 3), ("enabled", 4)))).setMaxAccess("readonly")
if mibBuilder.loadTexts: ndrState.setStatus('current')
if mibBuilder.loadTexts: ndrState.setDescription('This is the current N+1 Device Redundancy state. disabled (1) N+1 Redundancy disabled by the user. frozen (2) N+1 Redundancy is not active due to missing hardware components. delayed (3) N+1 Redundancy is delayed due to switchover. enabled (4) N+1 Redundancy enabled and ready.')
ndrAutoSwitchover = MibScalar((1, 3, 6, 1, 4, 1, 644, 2, 4, 1, 9, 3), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 1, 2, 3, 4))).clone(namedValues=NamedValues(("manual", 0), ("automatic", 1), ("narrowband-auto", 2), ("broadband-1-auto", 3), ("broadband-2-auto", 4)))).setMaxAccess("readwrite")
if mibBuilder.loadTexts: ndrAutoSwitchover.setStatus('current')
if mibBuilder.loadTexts: ndrAutoSwitchover.setDescription("Indicates the user's desired N+1 Device Redundancy automatic Switchover setting when a primary card fails. manual (0) Failed cards will not be switched automatically by the system. User is required to go to Node Summary Console screen and force a manual switchover of the failed card to the Redundant. automatic (1) The system will automatically switch out failed cards for either NDR Group with the Redundant card. narrowband-auto (2) The system will automatically switch out a failed card for the NDR Narrowband Group with the Redundant. broadband-1-auto(3) The system will automatically switch out a failed card for the NDR Broadband Group 1 with the Redundant. broadband-2-auto(4) The system will automatically switch out a failed card for the NDR Broadband Group 2 with the Redundant.")
ndrAutoRestore = MibScalar((1, 3, 6, 1, 4, 1, 644, 2, 4, 1, 9, 4), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 1, 2, 3, 4))).clone(namedValues=NamedValues(("manual", 0), ("automatic", 1), ("narrowband-auto", 2), ("broadband-1-auto", 3), ("broadband-2-auto", 4)))).setMaxAccess("readonly")
if mibBuilder.loadTexts: ndrAutoRestore.setStatus('current')
if mibBuilder.loadTexts: ndrAutoRestore.setDescription("Indicates the system's N+1 Device Redundancy automatic Restore setting when a protected card becomes operational. manual (0) Protected cards that become operational will not be restored automatically by the system. User is required to go to Node Summary Console screen and force a manual switchover of the Redundant card back to the Primary card. automatic (1) The system will automatically restore protected cards that become operational for either NDR Group. narrowband-auto (2) The system will automatically restore protected cards that become operational for the NDR Narrowband Group. broadband-1-auto(3) The system will automatically restore protected cards that become operational for the NDR Broadband Group 1. broadband-2-auto(4) The system will automatically restore protected cards that become operational for the NDR Broadband Group 2.")
ndrBroadbandGroup1 = MibScalar((1, 3, 6, 1, 4, 1, 644, 2, 4, 1, 9, 5), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: ndrBroadbandGroup1.setStatus('current')
if mibBuilder.loadTexts: ndrBroadbandGroup1.setDescription('This is a 2 byte bit field reflecting the slots that are part of the current active NDR Broadband Group 1. The first 11 bits represent each of the slot numbers. If any of the bits are set, those slots are currently part of the Group 1 N+1 Redundancy Group.')
ndrNarrowbandGroup = MibScalar((1, 3, 6, 1, 4, 1, 644, 2, 4, 1, 9, 6), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: ndrNarrowbandGroup.setStatus('current')
if mibBuilder.loadTexts: ndrNarrowbandGroup.setDescription('This is a 2 byte bit field reflecting the slots that are part of the current active NDR Narrowband Group. The first 11 bits represent each of the slot numbers. If any of the bits are set, those slots are currently part of the Narrowband N+1 Redundancy Group.')
ndrBroadbandGroup1Protected = MibScalar((1, 3, 6, 1, 4, 1, 644, 2, 4, 1, 9, 7), Integer32().subtype(subtypeSpec=ConstraintsUnion(ValueRangeConstraint(0, 0), ValueRangeConstraint(8, 10), ))).setMaxAccess("readonly")
if mibBuilder.loadTexts: ndrBroadbandGroup1Protected.setStatus('current')
if mibBuilder.loadTexts: ndrBroadbandGroup1Protected.setDescription('This is a slot number that indicates which device card from the active NDR Broadband Group 1 has been currently switched over. Valid Protected slots for NDR Broadband Group1 are 8 through 10. If a zero value is returned, no device card is currently protected.')
ndrNarrowbandProtected = MibScalar((1, 3, 6, 1, 4, 1, 644, 2, 4, 1, 9, 8), Integer32().subtype(subtypeSpec=ConstraintsUnion(ValueRangeConstraint(0, 0), ValueRangeConstraint(2, 11), ))).setMaxAccess("readonly")
if mibBuilder.loadTexts: ndrNarrowbandProtected.setStatus('current')
if mibBuilder.loadTexts: ndrNarrowbandProtected.setDescription('This is a slot number that indicates which device card from the active NDR Narrowband Group has been currently switched over. Valid Protected slots for NDR Narrowband Group are 2 through 11. If a zero value is returned, no device card is currently protected.')
ndrBroadbandGroup1Type = MibScalar((1, 3, 6, 1, 4, 1, 644, 2, 4, 1, 9, 9), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(8, 18, 21, 31))).clone(namedValues=NamedValues(("ds3", 8), ("sts1", 18), ("hds3", 21), ("e3", 31)))).setMaxAccess("readwrite")
if mibBuilder.loadTexts: ndrBroadbandGroup1Type.setStatus('current')
if mibBuilder.loadTexts: ndrBroadbandGroup1Type.setDescription('This indicates which type of device is currently occupying the status of active NDR Broadband Group 1. Only one type of broadband device can be supported by N+1 Redundancy at one time. Whichever type is selected as the active Broadband Group 1 type should match the device type of the card in Slot 11, which is the designated Broadband Group 1 NDR Redundant slot.')
ndrNarrowbandType = MibScalar((1, 3, 6, 1, 4, 1, 644, 2, 4, 1, 9, 10), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(13, 22))).clone(namedValues=NamedValues(("octalT1E1", 13), ("gr303", 22)))).setMaxAccess("readonly")
if mibBuilder.loadTexts: ndrNarrowbandType.setStatus('current')
if mibBuilder.loadTexts: ndrNarrowbandType.setDescription('This indicates which type of device is currently occupying the status of active NDR Narrowband Group. Only one type of Narrowband device can be supported by N+1 Redundancy at one time. Whichever type is selected as the active Narrowband type should match the device type of the card in Slot 1, which is the designated Narrowband NDR Redundant slot.')
ndrDualBroadbandEnabled = MibScalar((1, 3, 6, 1, 4, 1, 644, 2, 4, 1, 9, 11), DecisionType()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: ndrDualBroadbandEnabled.setStatus('current')
if mibBuilder.loadTexts: ndrDualBroadbandEnabled.setDescription("Indicates the system's capability of supporting the N+1 Device Redundancy Dual Broadband Group functionality. The user should configure this variable based on the existence of the Upgraded PSX Hardware. no (0) PSX Dual Broadband Groups disabled or not supported. yes (1) PSX Dual Broadband Groups enabled.")
ndrBroadbandGroup2 = MibScalar((1, 3, 6, 1, 4, 1, 644, 2, 4, 1, 9, 12), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: ndrBroadbandGroup2.setStatus('current')
if mibBuilder.loadTexts: ndrBroadbandGroup2.setDescription('This is a 2 byte bit field reflecting the slots that are part of the current active NDR Broadband Group 2. The first 11 bits represent each of the slot numbers. If any of the bits are set, those slots are currently part of the Group 2 N+1 Redundancy Group.')
ndrBroadbandGroup2Protected = MibScalar((1, 3, 6, 1, 4, 1, 644, 2, 4, 1, 9, 13), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 6))).setMaxAccess("readonly")
if mibBuilder.loadTexts: ndrBroadbandGroup2Protected.setStatus('current')
if mibBuilder.loadTexts: ndrBroadbandGroup2Protected.setDescription('This is a slot number that indicates which device card from the active NDR Broadband Group 2 has been currently switched over. Valid Protected slots for NDR Broadband Group2 are 1 through 6. If a zero value is returned, no device card is currently protected.')
ndrBroadbandGroup2Type = MibScalar((1, 3, 6, 1, 4, 1, 644, 2, 4, 1, 9, 14), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(8, 18, 21, 31))).clone(namedValues=NamedValues(("ds3", 8), ("sts1", 18), ("hds3", 21), ("e3", 31)))).setMaxAccess("readwrite")
if mibBuilder.loadTexts: ndrBroadbandGroup2Type.setStatus('current')
if mibBuilder.loadTexts: ndrBroadbandGroup2Type.setDescription('This indicates which type of device is currently occupying the status of active NDR Broadband Group 2. Only one type of broadband device can be supported by N+1 Redundancy at one time. Whichever type is selected as the active Broadband Group 2 type should match the device type of the card in Slot 7, which is the designated Broadband Group 2 NDR Redundant slot.')
ndrPsxChassisType = MibScalar((1, 3, 6, 1, 4, 1, 644, 2, 4, 1, 9, 15), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 1))).clone(namedValues=NamedValues(("psx5200", 0), ("psx5300", 1)))).setMaxAccess("readwrite")
if mibBuilder.loadTexts: ndrPsxChassisType.setStatus('current')
if mibBuilder.loadTexts: ndrPsxChassisType.setDescription('This indicates which type of Protection Switch Chassis Hardware has been detected. In order to run with Dual Broadband Group configuration, this value should be set to psx5300.')
upgradeSw = MibIdentifier((1, 3, 6, 1, 4, 1, 644, 2, 4, 1, 10))
devDownloadTable = MibTable((1, 3, 6, 1, 4, 1, 644, 2, 4, 1, 10, 1), )
if mibBuilder.loadTexts: devDownloadTable.setStatus('current')
if mibBuilder.loadTexts: devDownloadTable.setDescription('A Table listing the files one could download from smc to a device card using TFTP')
devDownloadEntry = MibTableRow((1, 3, 6, 1, 4, 1, 644, 2, 4, 1, 10, 1, 1), ).setIndexNames((0, "ERI-DNX-NEST-SYS-MIB", "programFileIndex"))
if mibBuilder.loadTexts: devDownloadEntry.setStatus('current')
if mibBuilder.loadTexts: devDownloadEntry.setDescription('An entry in the Device Download Table')
programFileIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 644, 2, 4, 1, 10, 1, 1, 1), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 99))).setMaxAccess("readonly")
if mibBuilder.loadTexts: programFileIndex.setStatus('current')
if mibBuilder.loadTexts: programFileIndex.setDescription('The index of the program file available for download')
programFileName = MibTableColumn((1, 3, 6, 1, 4, 1, 644, 2, 4, 1, 10, 1, 1, 2), DisplayString()).setMaxAccess("readonly")
if mibBuilder.loadTexts: programFileName.setStatus('current')
if mibBuilder.loadTexts: programFileName.setDescription('The name of the program file available for download')
programFileSize = MibTableColumn((1, 3, 6, 1, 4, 1, 644, 2, 4, 1, 10, 1, 1, 3), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: programFileSize.setStatus('current')
if mibBuilder.loadTexts: programFileSize.setDescription('The size in bytes of the program file available for download')
programLoadStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 644, 2, 4, 1, 10, 1, 1, 4), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3))).clone(namedValues=NamedValues(("loadingProgramFile", 1), ("readyForProgramLoad", 2), ("swDownloadNotReady", 3)))).setMaxAccess("readonly")
if mibBuilder.loadTexts: programLoadStatus.setStatus('current')
if mibBuilder.loadTexts: programLoadStatus.setDescription('The load status of the program file')
programLoadInitiator = MibTableColumn((1, 3, 6, 1, 4, 1, 644, 2, 4, 1, 10, 1, 1, 5), DisplayString()).setMaxAccess("readonly")
if mibBuilder.loadTexts: programLoadInitiator.setStatus('current')
if mibBuilder.loadTexts: programLoadInitiator.setDescription('The name of the user who initiated the program file download')
programBytesSent = MibTableColumn((1, 3, 6, 1, 4, 1, 644, 2, 4, 1, 10, 1, 1, 6), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: programBytesSent.setStatus('current')
if mibBuilder.loadTexts: programBytesSent.setDescription('The number of bytes sent in the current program file download')
programSlotNumber = MibTableColumn((1, 3, 6, 1, 4, 1, 644, 2, 4, 1, 10, 1, 1, 7), Integer32()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: programSlotNumber.setStatus('current')
if mibBuilder.loadTexts: programSlotNumber.setDescription('The slot number to which a program file is to be downloaded')
programFileCommand = MibTableColumn((1, 3, 6, 1, 4, 1, 644, 2, 4, 1, 10, 1, 1, 8), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 4, 5, 6, 7, 8, 9, 10, 12, 13, 414, 450, 500, 501, 502))).clone(namedValues=NamedValues(("loadProgramFile", 1), ("loadProgramToAll", 2), ("deleteProgramFile", 4), ("readyForCommand", 5), ("err-invalid-slot-nbr", 6), ("noProgramFile", 7), ("programFileBusy", 8), ("noError", 9), ("slotNotReady", 10), ("programFileIdle", 12), ("err-invalid-nest-nbr", 13), ("err-invalid-command", 414), ("err-data-locked-by-another-user", 450), ("err-snmp-parse-failed", 500), ("err-invalid-snmp-type", 501), ("err-invalid-snmp-var-size", 502)))).setMaxAccess("readwrite")
if mibBuilder.loadTexts: programFileCommand.setStatus('current')
if mibBuilder.loadTexts: programFileCommand.setDescription('The command to change the load status of the program file, or an error returned from a command.')
programNestNumber = MibTableColumn((1, 3, 6, 1, 4, 1, 644, 2, 4, 1, 10, 1, 1, 9), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 1, 2, 3, 4, 5, 6, 7, 10))).clone(namedValues=NamedValues(("nest1", 0), ("nest2", 1), ("nest3", 2), ("nest4", 3), ("nest5", 4), ("nest6", 5), ("nest7", 6), ("nest8", 7), ("allNests", 10)))).setMaxAccess("readwrite")
if mibBuilder.loadTexts: programNestNumber.setStatus('current')
if mibBuilder.loadTexts: programNestNumber.setDescription('The Nest number to which a program file is to be downloaded. If this field is not included in the SET PDU, the file will be downloaded to the specified slot in the First Nest (nest1).')
eXpansionNestAdmin = MibIdentifier((1, 3, 6, 1, 4, 1, 644, 2, 4, 1, 11))
xNestCfgTable = MibTable((1, 3, 6, 1, 4, 1, 644, 2, 4, 1, 11, 1), )
if mibBuilder.loadTexts: xNestCfgTable.setStatus('current')
if mibBuilder.loadTexts: xNestCfgTable.setDescription('A list of the Configured and Unconfigured Nests in this node with the static and dynamic type information. The maximum number of entries is 8 nests but if this is an Stand-Alone DNX-11 system, only 1 nest entry will be returned.')
xNestCfgEntry = MibTableRow((1, 3, 6, 1, 4, 1, 644, 2, 4, 1, 11, 1, 1), ).setIndexNames((0, "ERI-DNX-NEST-SYS-MIB", "xNestIndex"))
if mibBuilder.loadTexts: xNestCfgEntry.setStatus('current')
if mibBuilder.loadTexts: xNestCfgEntry.setDescription("The conceptual row of the Nest Configuration table. A row in this table can not be created or deleted. A row in this table can be modified by providing valid values for either the Nest Name, Configured Nest Type, NDR Capability, Alarm Contacts, Dual SMCs, Dual XLCs or XCCs, or Nest Command Status. Deleting the Nest Configuration using the Nest Command Status value of 'delete-nest-config' will result in the removal of all configured slots, ports, & connections associated with that nest number. The xNestCmdStatus field must be included as a variable in a SET PDU for the action to take effect. If the xNestCmdStatus is missing from the SET PDU, the GET RESPONSE will contain the SNMP error status of 'genErr' for and an error index equal to the last variable.")
xNestIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 644, 2, 4, 1, 11, 1, 1, 1), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 7))).setMaxAccess("readonly")
if mibBuilder.loadTexts: xNestIndex.setStatus('current')
if mibBuilder.loadTexts: xNestIndex.setDescription(' The nest index number in the node. Nests are indexed 0 through 7 but correspond to Nests 1 to 8.')
xNestUnitName = MibTableColumn((1, 3, 6, 1, 4, 1, 644, 2, 4, 1, 11, 1, 1, 2), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 30))).setMaxAccess("readwrite")
if mibBuilder.loadTexts: xNestUnitName.setStatus('current')
if mibBuilder.loadTexts: xNestUnitName.setDescription('The user defined name for this nest.')
xNestType = MibTableColumn((1, 3, 6, 1, 4, 1, 644, 2, 4, 1, 11, 1, 1, 3), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 1, 2, 3))).clone(namedValues=NamedValues(("notConfig", 0), ("dnx4", 1), ("dnx11", 2), ("stm1X-oc3X", 3)))).setMaxAccess("readwrite")
if mibBuilder.loadTexts: xNestType.setStatus('current')
if mibBuilder.loadTexts: xNestType.setDescription("This is the nest type configured by the user. The value, notConfig(0), is the default type for an unconfigured device. Note, if notConfig(0) or stm1X-oc3X(3) is used in a Set Request, the agent will return an error status of 'badValue'. Virtual stm1X-oc3X Nests are configured automatically by the system whenever the user Assigns an available Nest to an STM1X or OC3X Device pair. This can be done via the opticalDevConfigTable after a STM1X or OC3X card has been configured in a Even numbered slot.")
xNestState = MibTableColumn((1, 3, 6, 1, 4, 1, 644, 2, 4, 1, 11, 1, 1, 4), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(2, 8, 12, 16, 32))).clone(namedValues=NamedValues(("mismatch", 2), ("notPresent", 8), ("missing", 12), ("online", 16), ("offline", 32)))).setMaxAccess("readonly")
if mibBuilder.loadTexts: xNestState.setStatus('current')
if mibBuilder.loadTexts: xNestState.setDescription(' The current machine state of the Nests. mismatch (2) Nest is configured as wrong type. notPresent (8) Nest is unconfigured. missing (12) Nest is configured but communications are down. online (16) Nest is present and operational. offline (32) Nest is present but currently not operational.')
xNestAlarmStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 644, 2, 4, 1, 11, 1, 1, 5), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 1, 2, 3, 4, 5, 6, 7, 99))).clone(namedValues=NamedValues(("no-alarm", 0), ("minor-level", 1), ("major-level", 2), ("major-minor", 3), ("critical-level", 4), ("critical-minor", 5), ("critical-major", 6), ("critical-major-minor", 7), ("unknown", 99)))).setMaxAccess("readonly")
if mibBuilder.loadTexts: xNestAlarmStatus.setStatus('current')
if mibBuilder.loadTexts: xNestAlarmStatus.setDescription(" The current nest device alarm condition level that indicates it's severity. ")
xNestDeviceCards = MibTableColumn((1, 3, 6, 1, 4, 1, 644, 2, 4, 1, 11, 1, 1, 6), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 11))).setMaxAccess("readonly")
if mibBuilder.loadTexts: xNestDeviceCards.setStatus('current')
if mibBuilder.loadTexts: xNestDeviceCards.setDescription('The number of device cards presently active in the nest.')
xNestNDRCapable = MibTableColumn((1, 3, 6, 1, 4, 1, 644, 2, 4, 1, 11, 1, 1, 7), DecisionType()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: xNestNDRCapable.setStatus('current')
if mibBuilder.loadTexts: xNestNDRCapable.setDescription('The configured N+1 Redundancy state of the Nest. no (0) N+1 Redundancy is not available in the Nest. yes (1) N+1 Redundancy is available in the Nest.')
xNestAlarmContacts = MibTableColumn((1, 3, 6, 1, 4, 1, 644, 2, 4, 1, 11, 1, 1, 8), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 1, 2))).clone(namedValues=NamedValues(("standard", 0), ("localAudio1", 1), ("localAudio2", 2)))).setMaxAccess("readwrite")
if mibBuilder.loadTexts: xNestAlarmContacts.setStatus('current')
if mibBuilder.loadTexts: xNestAlarmContacts.setDescription('Determines the type of desired response from the rear SMC/XNM Alarm Contact switches during an alarm event.')
xNestDualSMCs = MibTableColumn((1, 3, 6, 1, 4, 1, 644, 2, 4, 1, 11, 1, 1, 9), DecisionType()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: xNestDualSMCs.setStatus('current')
if mibBuilder.loadTexts: xNestDualSMCs.setDescription("The number of SMCs configured for the Nest. If running with only a single SMC, this should be set to 'no' in order to suppress unecessary alarms. no (0) Only 1 SMC resides in the Nest. yes (1) Both SMCs reside in the Nest.")
xNestDualXccXlc = MibTableColumn((1, 3, 6, 1, 4, 1, 644, 2, 4, 1, 11, 1, 1, 10), DecisionType()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: xNestDualXccXlc.setStatus('current')
if mibBuilder.loadTexts: xNestDualXccXlc.setDescription("The number of XCC devices configured for the Node Manager or number of XLC devices configured for the Nest Manager depending on Type of Nest. Nest #1 is considered the Node Manager and all other Nests are considered as Nest Managers. If running with only a single XCC or XLC, this should be set to 'no' in order to suppress unecessary alarms. no (0) Only 1 XCC/XLC resides in the Nest. yes (1) Both XCCs/XLCs reside in the Nest.")
xNestCmdStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 644, 2, 4, 1, 11, 1, 1, 11), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 1, 2, 3, 4, 5, 6, 7, 101, 102, 103, 104, 105, 106, 107, 200, 201, 202, 203, 204, 205, 206, 207, 208, 450, 500, 501, 502))).clone(namedValues=NamedValues(("ready-for-command", 0), ("update-nest-config", 1), ("delete-nest-config", 2), ("switch-mgr-cards", 3), ("reset-device-cards", 4), ("clear-device-errors", 5), ("switch-xcc-cards", 6), ("switch-xlink-cards", 7), ("update-successful", 101), ("delete-successful", 102), ("switch-mgr-successful", 103), ("reset-successful", 104), ("clear-successful", 105), ("switch-xcc-successful", 106), ("switch-xlink-successful", 107), ("err-general-nest-config-error", 200), ("err-invalid-nest-type", 201), ("err-invalid-nest-command", 202), ("err-invalid-nest-name", 203), ("err-invalid-nest-alrm", 204), ("err-invalid-nest-ndr", 205), ("err-invalid-nest-option", 206), ("err-cannot-delete-online-nest", 207), ("err-nest-not-present", 208), ("err-data-locked-by-another-user", 450), ("err-snmp-parse-failed", 500), ("err-invalid-snmp-type", 501), ("err-invalid-snmp-var-size", 502)))).setMaxAccess("readwrite")
if mibBuilder.loadTexts: xNestCmdStatus.setStatus('current')
if mibBuilder.loadTexts: xNestCmdStatus.setDescription("The command status for this nest configuration row/record. The value used in a SET will be replaced by a response value in the GET RESPONSE indicating success or failure. Default Response State used in GET RESPONSE Command ready-for-command (0) initial default status for a row Nest Device Commands used in SET Command (1..99) update-nest-config (1) change an aspect of current nest configuration delete-nest-config (2) remove existing Nest Configuration. Deleting the Nest Configuration using the Nest Command Status will result in the removal of all configured connections associated with that nest number. switch-mgr-cards (3) Perform Switchover to Standby SMC/XNM card in associated Nest reset-device-cards (4) Reset all device cards in associated Nest clear-device-errors (5) Clear error counters for all channel cards in associated Nest switch-xcc-cards (6) Perform Switchover to Standby XCC card in associated Nest switch-xlink-cards (7) Perform Switchover to Standby XLC card in associated Nest. Response States used in GET RESPONSE Command (100..199) update-successful (101) nest data has been successfully changed delete-successful (102) nest data has been successfully removed switch-mgr-successful (103) nest system managers has been successfully switched reset-successful (104) nest device cards have been issued reset requests clear-successful (105) nest device cards have been issued clear error requests switch-xcc-successful (106) nest xcc's has been successfully switched switch-xlink-successful (107) nest xlink cards has been successfully switched Nest Config Error Codes used in GET RESPONSE Command (200..799) err-general-nest-config-error (200) Unknown nest configuration error occurred. err-invalid-nest-type (201) Configured nest type not in valid range err-invalid-nest-command (202) Unrecognized nest command-action err-invalid-nest-name (203) Configured nest name too long err-invalid-nest-alrm (204) Configured nest alarm contacts not in valid range err-invalid-nest-ndr (205) N+1 Redundancy not supported for nest err-invalid-nest-option (206) Dual XCC/XLC or Dual SMC option not valid err-cannot-delete-online-nest (207) Nest cannot be online when deleting configuration err-nest-not-present (208) Nest not ready for command err-data-locked-by-another-user (450) Another administrative user is making changes to this part of the system via a terminal session. Check Event Log for user name err-snmp-parse-failed (500) Agent could not parse variable err-invalid-snmp-type (501) Variable ASN type does not match Agent defined type err-invalid-snmp-var-size (502) Variable size is too big")
xNestDualPower = MibTableColumn((1, 3, 6, 1, 4, 1, 644, 2, 4, 1, 11, 1, 1, 12), DecisionType()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: xNestDualPower.setStatus('current')
if mibBuilder.loadTexts: xNestDualPower.setDescription("The number of DNX Power Supplies configured for the Nest. If running with only a single Power Supply, this should be set to 'no' in order to suppress unecessary alarms. no (0) Only 1 Power Supply resides in the Nest. yes (1) Both Power Supplies reside in the Nest.")
xSlotTable = MibTable((1, 3, 6, 1, 4, 1, 644, 2, 4, 1, 11, 2), )
if mibBuilder.loadTexts: xSlotTable.setStatus('current')
if mibBuilder.loadTexts: xSlotTable.setDescription('A list of the Configured device cards in this node with the static and dynamic type information. The maximum number of entries depends on the number of nests times the number of slots in the system plus 3 default entries for the system manager cards and the Protection Switch.')
xSlotEntry = MibTableRow((1, 3, 6, 1, 4, 1, 644, 2, 4, 1, 11, 2, 1), ).setIndexNames((0, "ERI-DNX-NEST-SYS-MIB", "xSlotNestAddr"))
if mibBuilder.loadTexts: xSlotEntry.setStatus('current')
if mibBuilder.loadTexts: xSlotEntry.setDescription("The conceptual row of the Slot Configuration table. A row in this table can not be created or deleted. A row in this table can be modified by providing valid values for either the Slot Name, Configured Device Type, Device Redundancy, or Slot Command Status. Deleting the Slot Configuration using the Slot Command Status value of 'delete-slot-config' will result in the removal of all configured connections associated with that slot number. The xnmSlotCfgCmdStatus field must be included as a variable in a SET PDU for the action to take effect. If the xnmSlotCfgCmdStatus is missing from the SET PDU, the GET RESPONSE will contain the SNMP error status of 'genErr' for and an error index equal to the last variable.")
xSlotNestAddr = MibTableColumn((1, 3, 6, 1, 4, 1, 644, 2, 4, 1, 11, 2, 1, 1), NestSlotAddress()).setMaxAccess("readonly")
if mibBuilder.loadTexts: xSlotNestAddr.setStatus('current')
if mibBuilder.loadTexts: xSlotNestAddr.setDescription("This number uniquely identifies an Device's Nest-Slot Address. This number will be used throughout the system to identify a unique slot. The format is represented using an IP address syntax (4 byte string). The 1st byte represents the Nest Number (0..7) The 2nd byte represents the Slot Number (1..11) The 3rd byte unused The 4th byte unused")
xSlotDeviceType = MibTableColumn((1, 3, 6, 1, 4, 1, 644, 2, 4, 1, 11, 2, 1, 2), DnxSlotDeviceType()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: xSlotDeviceType.setStatus('current')
if mibBuilder.loadTexts: xSlotDeviceType.setDescription(" This is the slot type configured by the user. The value, slot(0) is the default type for an unconfigured device. If slot(0) is used in a Set Request, the agent will return an error status of 'badValue'. The slot entries representing the System Manager Cards and the Protection Switch device cannot be used in a Set Request since their device type is static.")
xSlotActualDeviceType = MibTableColumn((1, 3, 6, 1, 4, 1, 644, 2, 4, 1, 11, 2, 1, 3), DnxSlotDeviceType()).setMaxAccess("readonly")
if mibBuilder.loadTexts: xSlotActualDeviceType.setStatus('current')
if mibBuilder.loadTexts: xSlotActualDeviceType.setDescription(' This is the actual slot type sent back by the card. ')
xSlotDeviceState = MibTableColumn((1, 3, 6, 1, 4, 1, 644, 2, 4, 1, 11, 2, 1, 4), DnxSlotDeviceState()).setMaxAccess("readonly")
if mibBuilder.loadTexts: xSlotDeviceState.setStatus('current')
if mibBuilder.loadTexts: xSlotDeviceState.setDescription(' The current machine state of the device. not-present (0) Indicates no hardware detected in the slot. online (1) Device is present and is considered primary operational. offline (2) Device is present but currently not operational. disabled (3) Applies to the Protection Switch box if system cannot support redundancy. standby (4) Device is present but considered as secondary. defective (5) Device is present but could not be activated. bus-error (6) Device is present and reporting a bus connection error. out-of-serv (7) Operator has placed device in Out of Service mode.')
xSlotAlarmLevel = MibTableColumn((1, 3, 6, 1, 4, 1, 644, 2, 4, 1, 11, 2, 1, 5), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 1, 2, 3, 4, 5, 6, 7, 99))).clone(namedValues=NamedValues(("no-alarm", 0), ("minor-level", 1), ("major-level", 2), ("major-minor", 3), ("critical-level", 4), ("critical-minor", 5), ("critical-major", 6), ("critical-major-minor", 7), ("unknown", 99)))).setMaxAccess("readonly")
if mibBuilder.loadTexts: xSlotAlarmLevel.setStatus('current')
if mibBuilder.loadTexts: xSlotAlarmLevel.setDescription(" The current slot device alarm condition level that indicates it's severity. ")
xSlotDeviceName = MibTableColumn((1, 3, 6, 1, 4, 1, 644, 2, 4, 1, 11, 2, 1, 6), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 11))).setMaxAccess("readwrite")
if mibBuilder.loadTexts: xSlotDeviceName.setStatus('current')
if mibBuilder.loadTexts: xSlotDeviceName.setDescription('The user defined name for this slot/device.')
xSlotDeviceVersion = MibTableColumn((1, 3, 6, 1, 4, 1, 644, 2, 4, 1, 11, 2, 1, 7), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 12))).setMaxAccess("readonly")
if mibBuilder.loadTexts: xSlotDeviceVersion.setStatus('current')
if mibBuilder.loadTexts: xSlotDeviceVersion.setDescription('The software version release identification number for this device. ')
xSlotDeviceRedundancy = MibTableColumn((1, 3, 6, 1, 4, 1, 644, 2, 4, 1, 11, 2, 1, 8), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 1, 2))).clone(namedValues=NamedValues(("disable", 0), ("enable", 1), ("notApplicable", 2)))).setMaxAccess("readwrite")
if mibBuilder.loadTexts: xSlotDeviceRedundancy.setStatus('current')
if mibBuilder.loadTexts: xSlotDeviceRedundancy.setDescription('The configured N+1 Redundancy state of the device. The slot entries representing the System Manager Cards and the Protection Switch device cannot be used in a Set Request since N+1 Redundancy does not apply to them. disable (0) Device is not configured as part of the Redundancy Group. enable (1) Device is configured as part of the Redundancy Group. n/a (2) Device does not support Redundancy.')
xSlotMiscState = MibTableColumn((1, 3, 6, 1, 4, 1, 644, 2, 4, 1, 11, 2, 1, 9), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 1, 2, 3, 4, 5, 6, 7))).clone(namedValues=NamedValues(("none", 0), ("errors", 1), ("test", 2), ("errors-test", 3), ("clockSrc", 4), ("errors-clockSrc", 5), ("test-clockSrc", 6), ("errors-test-clockSrc", 7)))).setMaxAccess("readonly")
if mibBuilder.loadTexts: xSlotMiscState.setStatus('current')
if mibBuilder.loadTexts: xSlotMiscState.setDescription('The current slot/device miscellaneous state conditions. none (0) no misc condition errors (1) errors reported on device test (2) device is in test mode errors-test (3) errors reported on device while in test mode clockSrc (4) device is the source for the system clock errors-clockSrc (5) device is the source for the system clock and errors found test-clockSrc (6) device is the source for the system clock and is in test mode errors-test-clockSrc (7) device is the source for the system clock and is in test mode and errors were found')
xSlotCmdStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 644, 2, 4, 1, 11, 2, 1, 10), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 1, 2, 10, 11, 101, 102, 110, 111, 200, 201, 202, 203, 204, 205, 207, 208, 450, 500, 501, 502))).clone(namedValues=NamedValues(("ready-for-command", 0), ("update-slot-config", 1), ("delete-slot-config", 2), ("ndr-switchover", 10), ("ndr-restore", 11), ("update-successful", 101), ("delete-successful", 102), ("switch-successful", 110), ("restore-successful", 111), ("err-general-slot-config-error", 200), ("err-invalid-slot-type", 201), ("err-invalid-slot-command", 202), ("err-invalid-slot-name", 203), ("err-redundancy-disabled", 204), ("err-cannot-chg-sys-device", 205), ("err-invalid-redundancy-state", 207), ("err-cannot-delete-online-device", 208), ("err-data-locked-by-another-user", 450), ("err-snmp-parse-failed", 500), ("err-invalid-snmp-type", 501), ("err-invalid-snmp-var-size", 502)))).setMaxAccess("readwrite")
if mibBuilder.loadTexts: xSlotCmdStatus.setStatus('current')
if mibBuilder.loadTexts: xSlotCmdStatus.setDescription('The command status for this slot configuration row/record. The value used in a SET will be replaced by a response value in the GET RESPONSE indicating success or failure. Default Response State used in GET RESPONSE Command ready-for-command (0) initial default status for a row Slot Device Commands used in SET Command (1..99) update-slot-config (1) change an aspect of current slot configuration delete-slot-config (2) remove existing Slot Configuration. Deleting the Slot Configuration using the Slot Command Status will result in the removal of all configured connections associated with that slot number. ndr-switchover (10) force a switchover to the Standby device ndr-restore (11) force a restore back to the original device Response States used in GET RESPONSE Command (100..199) update-successful (101) slot data has been successfully changed delete-successful (102) slot data has been successfully removed switch-successful (110) Slot N+1 Redundancy device has been successfully switched over to Standby device restore-successful (111) Slot N+1 Redundancy device has been successfully restored back to Primary device Slot Config Error Codes used in GET RESPONSE Command (200..799) err-general-slot-config-error (200) Unknown slot configuration error occurred. err-invalid-slot-type (201) Configured slot type not in valid range err-invalid-slot-command (202) Unrecognized slot command-action err-invalid-slot-name (203) Configured slot name too long err-redundancy-disabled (204) Redundancy disabled on this system or does not apply to device type err-cannot-chg-sys-device (205) System Device type does not support configuration change err-invalid-redundancy-state (207) Redundancy state does not apply or invalid err-cannot-delete-online-device (208) Device cannot be present when deleting configuration err-data-locked-by-another-user (450) Another administrative user is making changes to this part of the system via a terminal session. Check Event Log for user name err-snmp-parse-failed (500) Agent could not parse variable err-invalid-snmp-type (501) Variable ASN type does not match Agent defined type err-invalid-snmp-var-size (502) Variable size is too big')
xSlotRawDeviceState = MibTableColumn((1, 3, 6, 1, 4, 1, 644, 2, 4, 1, 11, 2, 1, 11), UnsignedInt()).setMaxAccess("readonly")
if mibBuilder.loadTexts: xSlotRawDeviceState.setStatus('current')
if mibBuilder.loadTexts: xSlotRawDeviceState.setDescription('The current raw bitmask form of the state of the slot/device.')
xNdrTable = MibTable((1, 3, 6, 1, 4, 1, 644, 2, 4, 1, 11, 3), )
if mibBuilder.loadTexts: xNdrTable.setStatus('current')
if mibBuilder.loadTexts: xNdrTable.setDescription('A list of the Nests with N+1 Redundancy capability in this node. The maximum number of entries depends on the number of nests that have a Protection Switch Device.')
xNdrEntry = MibTableRow((1, 3, 6, 1, 4, 1, 644, 2, 4, 1, 11, 3, 1), ).setIndexNames((0, "ERI-DNX-NEST-SYS-MIB", "xNdrNestIndex"))
if mibBuilder.loadTexts: xNdrEntry.setStatus('current')
if mibBuilder.loadTexts: xNdrEntry.setDescription("The conceptual row of the N+1 Redundancy table. A row in this table can not be created or deleted. A row in this table can be modified by providing valid values for any of the configurable N+1 Redundancy fields. The xNdrCmdStatus field must be included as a variable in a SET PDU for the action to take effect. If the xNdrCmdStatus is missing from the SET PDU, the GET RESPONSE will contain the SNMP error status of 'genErr' for and an error index equal to the last variable.")
xNdrNestIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 644, 2, 4, 1, 11, 3, 1, 1), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 7))).setMaxAccess("readonly")
if mibBuilder.loadTexts: xNdrNestIndex.setStatus('current')
if mibBuilder.loadTexts: xNdrNestIndex.setDescription(' The nest index number in the node. Nests are indexed 0 through 7 but correspond to Nests 1 to 8.')
xNdrState = MibTableColumn((1, 3, 6, 1, 4, 1, 644, 2, 4, 1, 11, 3, 1, 2), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4))).clone(namedValues=NamedValues(("disabled", 1), ("frozen", 2), ("delayed", 3), ("enabled", 4)))).setMaxAccess("readonly")
if mibBuilder.loadTexts: xNdrState.setStatus('current')
if mibBuilder.loadTexts: xNdrState.setDescription('This is the current N+1 Device Redundancy state. disabled (1) N+1 Redundancy disabled by the user. frozen (2) N+1 Redundancy is not active due to missing hardware components. delayed (3) N+1 Redundancy is delayed due to switchover. enabled (4) N+1 Redundancy enabled and ready.')
xNdrAutoSwitchover = MibTableColumn((1, 3, 6, 1, 4, 1, 644, 2, 4, 1, 11, 3, 1, 3), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 1, 2, 3, 4))).clone(namedValues=NamedValues(("manual", 0), ("automatic", 1), ("narrowband-auto", 2), ("broadband-1-auto", 3), ("broadband-2-auto", 4)))).setMaxAccess("readwrite")
if mibBuilder.loadTexts: xNdrAutoSwitchover.setStatus('current')
if mibBuilder.loadTexts: xNdrAutoSwitchover.setDescription("Indicates the user's desired N+1 Device Redundancy automatic Switchover setting when a primary card fails. manual (0) Failed cards will not be switched automatically by the system. User is required to go to Node Summary Console screen and force a manual switchover of the failed card to the Redundant. automatic (1) The system will automatically switch out failed cards for either NDR Group with the Redundant card. narrowband-auto (2) The system will automatically switch out a failed card for the NDR Narrowband Group with the Redundant. broadband-1-auto(3) The system will automatically switch out a failed card for the NDR Broadband Group 1 with the Redundant. broadband-2-auto(4) The system will automatically switch out a failed card for the NDR Broadband Group 2 with the Redundant.")
xNdrAutoRestore = MibTableColumn((1, 3, 6, 1, 4, 1, 644, 2, 4, 1, 11, 3, 1, 4), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 1, 2, 3, 4))).clone(namedValues=NamedValues(("manual", 0), ("automatic", 1), ("narrowband-auto", 2), ("broadband-1-auto", 3), ("broadband-2-auto", 4)))).setMaxAccess("readonly")
if mibBuilder.loadTexts: xNdrAutoRestore.setStatus('current')
if mibBuilder.loadTexts: xNdrAutoRestore.setDescription("Indicates the system's N+1 Device Redundancy automatic Restore setting when a protected card becomes operational. manual (0) Protected cards that become operational will not be restored automatically by the system. User is required to go to Node Summary Console screen and force a manual switchover of the Redundant card back to the Primary card. automatic (1) The system will automatically restore protected cards that become operational for either NDR Group. narrowband-auto (2) The system will automatically restore protected cards that become operational for the NDR Narrowband Group. broadband-1-auto(3) The system will automatically restore protected cards that become operational for the NDR Broadband Group 1. broadband-2-auto(4) The system will automatically restore protected cards that become operational for the NDR Broadband Group 2.")
xNdrBroadbandGroup1 = MibTableColumn((1, 3, 6, 1, 4, 1, 644, 2, 4, 1, 11, 3, 1, 5), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: xNdrBroadbandGroup1.setStatus('current')
if mibBuilder.loadTexts: xNdrBroadbandGroup1.setDescription('This is a 2 byte bit field reflecting the slots that are part of the current active NDR Broadband Group 1. The first 11 bits represent each of the slot numbers. If any of the bits are set, those slots are currently part of the Group 1 N+1 Redundancy Group.')
xNdrNarrowbandGroup = MibTableColumn((1, 3, 6, 1, 4, 1, 644, 2, 4, 1, 11, 3, 1, 6), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: xNdrNarrowbandGroup.setStatus('current')
if mibBuilder.loadTexts: xNdrNarrowbandGroup.setDescription('This is a 2 byte bit field reflecting the slots that are part of the current active NDR Narrowband Group. The first 11 bits represent each of the slot numbers. If any of the bits are set, those slots are currently part of the Narrowband N+1 Redundancy Group.')
xNdrBroadbandGroup1Protected = MibTableColumn((1, 3, 6, 1, 4, 1, 644, 2, 4, 1, 11, 3, 1, 7), Integer32().subtype(subtypeSpec=ConstraintsUnion(ValueRangeConstraint(0, 0), ValueRangeConstraint(8, 10), ))).setMaxAccess("readonly")
if mibBuilder.loadTexts: xNdrBroadbandGroup1Protected.setStatus('current')
if mibBuilder.loadTexts: xNdrBroadbandGroup1Protected.setDescription('This is a slot number that indicates which device card from the active NDR Broadband Group 1 has been currently switched over. Valid Protected slots for NDR Broadband Group1 are 8 through 10. If a zero value is returned, no device card is currently protected.')
xNdrNarrowbandProtected = MibTableColumn((1, 3, 6, 1, 4, 1, 644, 2, 4, 1, 11, 3, 1, 8), Integer32().subtype(subtypeSpec=ConstraintsUnion(ValueRangeConstraint(0, 0), ValueRangeConstraint(2, 11), ))).setMaxAccess("readonly")
if mibBuilder.loadTexts: xNdrNarrowbandProtected.setStatus('current')
if mibBuilder.loadTexts: xNdrNarrowbandProtected.setDescription('This is a slot number that indicates which device card from the active NDR Narrowband Group has been currently switched over. Valid Protected slots for NDR Narrowband Group are 2 through 11. If a zero value is returned, no device card is currently protected.')
xNdrBroadbandGroup1Type = MibTableColumn((1, 3, 6, 1, 4, 1, 644, 2, 4, 1, 11, 3, 1, 9), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(8, 18, 21, 31))).clone(namedValues=NamedValues(("ds3", 8), ("sts1", 18), ("hds3", 21), ("e3", 31)))).setMaxAccess("readwrite")
if mibBuilder.loadTexts: xNdrBroadbandGroup1Type.setStatus('current')
if mibBuilder.loadTexts: xNdrBroadbandGroup1Type.setDescription('This indicates which type of device is currently occupying the status of active NDR Broadband Group 1. Only one type of broadband device can be supported by N+1 Redundancy at one time. Whichever type is selected as the active Broadband Group 1 type should match the device type of the card in Slot 11, which is the designated Broadband Group 1 NDR Redundant slot.')
xNdrNarrowbandType = MibTableColumn((1, 3, 6, 1, 4, 1, 644, 2, 4, 1, 11, 3, 1, 10), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(13, 22))).clone(namedValues=NamedValues(("octalT1E1", 13), ("gr303", 22)))).setMaxAccess("readonly")
if mibBuilder.loadTexts: xNdrNarrowbandType.setStatus('current')
if mibBuilder.loadTexts: xNdrNarrowbandType.setDescription('This indicates which type of device is currently occupying the status of active NDR Narrowband Group. Only one type of Narrowband device can be supported by N+1 Redundancy at one time. Whichever type is selected as the active Narrowband type should match the device type of the card in Slot 1, which is the designated Narrowband NDR Redundant slot.')
xNdrDualBroadbandEnabled = MibTableColumn((1, 3, 6, 1, 4, 1, 644, 2, 4, 1, 11, 3, 1, 11), DecisionType()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: xNdrDualBroadbandEnabled.setStatus('current')
if mibBuilder.loadTexts: xNdrDualBroadbandEnabled.setDescription("Indicates the system's capability of supporting the N+1 Device Redundancy Dual Broadband Group functionality. The user should configure this variable based on the existence of the Upgraded PSX Hardware. no (0) PSX Dual Broadband Groups disabled or not supported. yes (1) PSX Dual Broadband Groups enabled.")
xNdrBroadbandGroup2 = MibTableColumn((1, 3, 6, 1, 4, 1, 644, 2, 4, 1, 11, 3, 1, 12), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: xNdrBroadbandGroup2.setStatus('current')
if mibBuilder.loadTexts: xNdrBroadbandGroup2.setDescription('This is a 2 byte bit field reflecting the slots that are part of the current active NDR Broadband Group 2. The first 11 bits represent each of the slot numbers. If any of the bits are set, those slots are currently part of the Group 2 N+1 Redundancy Group.')
xNdrBroadbandGroup2Protected = MibTableColumn((1, 3, 6, 1, 4, 1, 644, 2, 4, 1, 11, 3, 1, 13), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 6))).setMaxAccess("readonly")
if mibBuilder.loadTexts: xNdrBroadbandGroup2Protected.setStatus('current')
if mibBuilder.loadTexts: xNdrBroadbandGroup2Protected.setDescription('This is a slot number that indicates which device card from the active NDR Broadband Group 2 has been currently switched over. Valid Protected slots for NDR Broadband Group2 are 1 through 6. If a zero value is returned, no device card is currently protected.')
xNdrBroadbandGroup2Type = MibTableColumn((1, 3, 6, 1, 4, 1, 644, 2, 4, 1, 11, 3, 1, 14), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(8, 18, 21, 31))).clone(namedValues=NamedValues(("ds3", 8), ("sts1", 18), ("hds3", 21), ("e3", 31)))).setMaxAccess("readwrite")
if mibBuilder.loadTexts: xNdrBroadbandGroup2Type.setStatus('current')
if mibBuilder.loadTexts: xNdrBroadbandGroup2Type.setDescription('This indicates which type of device is currently occupying the status of active NDR Broadband Group 2. Only one type of broadband device can be supported by N+1 Redundancy at one time. Whichever type is selected as the active Broadband Group 2 type should match the device type of the card in Slot 7, which is the designated Broadband Group 2 NDR Redundant slot.')
xNdrPsxChassisType = MibTableColumn((1, 3, 6, 1, 4, 1, 644, 2, 4, 1, 11, 3, 1, 15), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 1))).clone(namedValues=NamedValues(("psx5200", 0), ("psx5300", 1)))).setMaxAccess("readwrite")
if mibBuilder.loadTexts: xNdrPsxChassisType.setStatus('current')
if mibBuilder.loadTexts: xNdrPsxChassisType.setDescription('This indicates which type of Protection Switch Chassis Hardware has been detected. In order to run with Dual Broadband Group configuration, this value should be set to psx5300.')
xNdrCmdStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 644, 2, 4, 1, 11, 3, 1, 16), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 1, 101, 200, 201, 202, 203, 204, 205, 206, 450, 500, 501, 502))).clone(namedValues=NamedValues(("ready-for-command", 0), ("update-ndr", 1), ("update-successful", 101), ("err-general-ndr-config-error", 200), ("err-invalid-ndr-group-type", 201), ("err-invalid-ndr-command", 202), ("err-invalid-ndr-autoswitch", 203), ("err-invalid-ndr-chassis", 204), ("err-invalid-ndr-dual-bb", 205), ("err-invalid-ndr-dual-psx", 206), ("err-data-locked-by-another-user", 450), ("err-snmp-parse-failed", 500), ("err-invalid-snmp-type", 501), ("err-invalid-snmp-var-size", 502)))).setMaxAccess("readwrite")
if mibBuilder.loadTexts: xNdrCmdStatus.setStatus('current')
if mibBuilder.loadTexts: xNdrCmdStatus.setDescription('The command status for this ndr configuration row/record. The value used in a SET will be replaced by a response value in the GET RESPONSE indicating success or failure. Default Response State used in GET RESPONSE Command ready-for-command (0) initial default status for a row NDR Device Commands used in SET Command (1..99) update-ndr (1) change an aspect of current nest N+1 Redundancy Response States used in GET RESPONSE Command (100..199) update-successful (101) ndr data has been successfully changed NDR Config Error Codes used in GET RESPONSE Command (200..799) err-general-ndr-config-error (200) Unknown ndr configuration error occurred. err-invalid-ndr-group-type (201) Configured NDR Group type not in valid range err-invalid-ndr-command (202) Unrecognized NDR command-action err-invalid-ndr-autoswitch (203) NDR Auto Switchover value not in valid range err-invalid-ndr-chassis (204) NDR Chassis Type value not in valid range err-invalid-ndr-dual-bb (205) NDR Dual Broadband Group value not in valid err-invalid-ndr-dual-psx (206) NDR Dual PSX Power Supply value not in valid err-data-locked-by-another-user (450) Another administrative user is making changes to this part of the system via a terminal session. Check Event Log for user name err-snmp-parse-failed (500) Agent could not parse variable err-invalid-snmp-type (501) Variable ASN type does not match Agent defined type err-invalid-snmp-var-size (502) Variable size is too big')
xNdrDualPowerSupply = MibTableColumn((1, 3, 6, 1, 4, 1, 644, 2, 4, 1, 11, 3, 1, 17), DecisionType()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: xNdrDualPowerSupply.setStatus('current')
if mibBuilder.loadTexts: xNdrDualPowerSupply.setDescription("The number of N+1 Protection Switch Power Supplies configured for the Nest. If running with only a single PSX Power Supply, this should be set to 'no' in order to suppress unecessary alarms. no (0) Only 1 Power Supply resides in the PSX. yes (1) Both Power Supplies reside in the PSX.")
dbSyncronize = MibIdentifier((1, 3, 6, 1, 4, 1, 644, 2, 4, 1, 12, 1, 2))
dbAutoSyncMode = MibScalar((1, 3, 6, 1, 4, 1, 644, 2, 4, 1, 12, 1, 2, 1), DecisionType()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: dbAutoSyncMode.setStatus('current')
if mibBuilder.loadTexts: dbAutoSyncMode.setDescription('Enables or disables the Automatic Database Synchronization.')
dbSyncStatus = MibScalar((1, 3, 6, 1, 4, 1, 644, 2, 4, 1, 12, 1, 2, 2), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4, 5))).clone(namedValues=NamedValues(("inSync", 1), ("notInSync", 2), ("syncInProgress", 3), ("autoSyncOff", 4), ("standByNotPresent", 5)))).setMaxAccess("readonly")
if mibBuilder.loadTexts: dbSyncStatus.setStatus('current')
if mibBuilder.loadTexts: dbSyncStatus.setDescription('The current status of the System DB Synchronization.')
dbSyncProgressTime = MibScalar((1, 3, 6, 1, 4, 1, 644, 2, 4, 1, 12, 1, 2, 3), Unsigned32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: dbSyncProgressTime.setStatus('current')
if mibBuilder.loadTexts: dbSyncProgressTime.setDescription('The number of seconds elapsed since the DB Synchronization has been started.')
dbSyncCmdStatus = MibScalar((1, 3, 6, 1, 4, 1, 644, 2, 4, 1, 12, 1, 2, 4), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 1, 2, 101, 102, 120, 200, 201, 202, 203, 204, 450, 500, 501, 502))).clone(namedValues=NamedValues(("ready-for-command", 0), ("update", 1), ("startDBSync", 2), ("update-successful", 101), ("sync-start-successful", 102), ("sync-completed-successful", 120), ("err-gen-dbsync-cfg-error", 200), ("err-standby-not-present", 201), ("err-dbsync-failed", 202), ("err-invalid-dbsync-command", 203), ("err-invalid-dbsync-mode", 204), ("err-data-locked-by-another-user", 450), ("err-snmp-parse-failed", 500), ("err-invalid-snmp-type", 501), ("err-invalid-snmp-var-size", 502)))).setMaxAccess("readwrite")
if mibBuilder.loadTexts: dbSyncCmdStatus.setStatus('current')
if mibBuilder.loadTexts: dbSyncCmdStatus.setDescription('The command status for this DB Synchronization. The value used in a SET will be replaced by a response value in the GET RESPONSE indicating success or failure. Default Response State used in GET RESPONSE Command ready-for-command (0) initial default status for a row DB Sync Commands used in SET Command (1..99) update (1) Change the auto sync mode startDBSync (2) Starts the DB synchronization process Response States used in GET RESPONSE Command (100..199) update-successful (101) Auto Sync data has been successfully changed sync-start-successful (102) DB Sync process has been successfully started sync-completed-successful (120) DB Sync process has been successfully finished DB Sync Error Codes used in GET RESPONSE Command (200..799) err-gen-dbsync-cfg-error (200) Unknown DB Sync configuration error occurred. err-standby-not-present (201) DB Synchronization cannot be started without standby systemManager Device. err-dbsync-failed (202) DB Synchronization process has failed err-invalid-dbsync-command (203, Unrecognized DB Sync command action err-invalid-dbsync-mode (204) Unrecognized auto sync setting err-data-locked-by-another-user (450) Another administrative user is making changes to this part of the system via a terminal session. Check Event Log for user name err-snmp-parse-failed (500) Agent could not parse variable err-invalid-snmp-type (501) Variable ASN type does not match Agent defined type err-invalid-snmp-var-size (502) Variable size is too big')
deviceAboutTable = MibTable((1, 3, 6, 1, 4, 1, 644, 2, 4, 2, 225), )
if mibBuilder.loadTexts: deviceAboutTable.setStatus('current')
if mibBuilder.loadTexts: deviceAboutTable.setDescription('This is the Device About Information table which consists of an entry for each of the Actual device cards in this node with the module, board, revision and software release information. The maximum number of entries depends on the number of nests times the number of slots in each nest.')
deviceAboutEntry = MibTableRow((1, 3, 6, 1, 4, 1, 644, 2, 4, 2, 225, 1), ).setIndexNames((0, "ERI-DNX-NEST-SYS-MIB", "devCardAddress"))
if mibBuilder.loadTexts: deviceAboutEntry.setStatus('current')
if mibBuilder.loadTexts: deviceAboutEntry.setDescription('The conceptual row of the Device About Information table. A row in this table cannot be added or deleted, only modified.')
devCardAddress = MibTableColumn((1, 3, 6, 1, 4, 1, 644, 2, 4, 2, 225, 1, 1), NestSlotAddress()).setMaxAccess("readonly")
if mibBuilder.loadTexts: devCardAddress.setStatus('current')
if mibBuilder.loadTexts: devCardAddress.setDescription("This number uniquely identifies an Device's Nest-Slot Address. This number will be used throughout the system to identify a unique slot. The format is represented using an IP address syntax (4 byte string). The 1st byte represents the Nest Number (0..7) The 2nd byte represents the Slot Number (1..11) The 3rd byte unused The 4th byte unused")
devSwReleaseDate = MibTableColumn((1, 3, 6, 1, 4, 1, 644, 2, 4, 2, 225, 1, 2), DisplayString()).setMaxAccess("readonly")
if mibBuilder.loadTexts: devSwReleaseDate.setStatus('current')
if mibBuilder.loadTexts: devSwReleaseDate.setDescription('The release date of the software resident on the device card.')
devSwChecksum = MibTableColumn((1, 3, 6, 1, 4, 1, 644, 2, 4, 2, 225, 1, 3), DisplayString()).setMaxAccess("readonly")
if mibBuilder.loadTexts: devSwChecksum.setStatus('current')
if mibBuilder.loadTexts: devSwChecksum.setDescription('The checksum of the software resident on the device card.')
devFrontCardType = MibTableColumn((1, 3, 6, 1, 4, 1, 644, 2, 4, 2, 225, 1, 4), DisplayString()).setMaxAccess("readonly")
if mibBuilder.loadTexts: devFrontCardType.setStatus('current')
if mibBuilder.loadTexts: devFrontCardType.setDescription('The Hardware type of Front card for the device.')
devFrontCardRev = MibTableColumn((1, 3, 6, 1, 4, 1, 644, 2, 4, 2, 225, 1, 5), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: devFrontCardRev.setStatus('current')
if mibBuilder.loadTexts: devFrontCardRev.setDescription('The Hardware revision number of the Front card.')
devXilinxVersion = MibTableColumn((1, 3, 6, 1, 4, 1, 644, 2, 4, 2, 225, 1, 6), DisplayString()).setMaxAccess("readonly")
if mibBuilder.loadTexts: devXilinxVersion.setStatus('current')
if mibBuilder.loadTexts: devXilinxVersion.setDescription('The version of Xilinx Hardware on the device card.')
devRearCardType = MibTableColumn((1, 3, 6, 1, 4, 1, 644, 2, 4, 2, 225, 1, 7), DisplayString()).setMaxAccess("readonly")
if mibBuilder.loadTexts: devRearCardType.setStatus('current')
if mibBuilder.loadTexts: devRearCardType.setDescription('The Hardware type of Rear card reported by the device.')
devRearCardRev = MibTableColumn((1, 3, 6, 1, 4, 1, 644, 2, 4, 2, 225, 1, 8), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: devRearCardRev.setStatus('current')
if mibBuilder.loadTexts: devRearCardRev.setDescription('The Hardware revision number of the Rear card.')
devSwVersion = MibTableColumn((1, 3, 6, 1, 4, 1, 644, 2, 4, 2, 225, 1, 9), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 12))).setMaxAccess("readonly")
if mibBuilder.loadTexts: devSwVersion.setStatus('current')
if mibBuilder.loadTexts: devSwVersion.setDescription('The software version release identification number for this device. ')
slotConfigTrap = NotificationType((1, 3, 6, 1, 4, 1, 644, 2, 4, 0, 5)).setObjects(("ERI-DNX-SMC-MIB", "trapSequence"), ("ERI-DNX-NEST-SYS-MIB", "slotNbr"), ("ERI-DNX-NEST-SYS-MIB", "slotConfigCmdStatus"), ("ERI-DNX-NEST-SYS-MIB", "xNestIndex"))
if mibBuilder.loadTexts: slotConfigTrap.setStatus('current')
if mibBuilder.loadTexts: slotConfigTrap.setDescription('This trap is used to notify a NMS that a user has updated the configuration for a given slot entry.')
ndrGroupStatusTrap = NotificationType((1, 3, 6, 1, 4, 1, 644, 2, 4, 0, 8)).setObjects(("ERI-DNX-SMC-MIB", "trapSequence"), ("ERI-DNX-NEST-SYS-MIB", "ndrState"), ("ERI-DNX-NEST-SYS-MIB", "ndrBroadbandGroup1"), ("ERI-DNX-NEST-SYS-MIB", "ndrNarrowbandGroup"), ("ERI-DNX-NEST-SYS-MIB", "ndrBroadbandGroup2"), ("ERI-DNX-NEST-SYS-MIB", "xNdrNestIndex"))
if mibBuilder.loadTexts: ndrGroupStatusTrap.setStatus('current')
if mibBuilder.loadTexts: ndrGroupStatusTrap.setDescription('This trap is used to notify a NMS that due to an alarm condition or system state change, the N+1 Redundancy Groups have been modified. This means the one or more devices have been removed or added to the actual N+1 Redundancy Groups and this will affect which cards will be protected (switched) in the event of a failure.')
nestConfigTrap = NotificationType((1, 3, 6, 1, 4, 1, 644, 2, 4, 0, 9)).setObjects(("ERI-DNX-SMC-MIB", "trapSequence"), ("ERI-DNX-NEST-SYS-MIB", "xNestIndex"), ("ERI-DNX-NEST-SYS-MIB", "xNestType"), ("ERI-DNX-NEST-SYS-MIB", "xNestCmdStatus"), ("ERI-DNX-NEST-SYS-MIB", "xNestUnitName"))
if mibBuilder.loadTexts: nestConfigTrap.setStatus('current')
if mibBuilder.loadTexts: nestConfigTrap.setDescription('This trap is used to notify a NMS that a user has updated the configuration for a given nest entry.')
dbSyncProgressTrap = NotificationType((1, 3, 6, 1, 4, 1, 644, 2, 4, 0, 12)).setObjects(("ERI-DNX-SMC-MIB", "trapSequence"), ("ERI-DNX-NEST-SYS-MIB", "dbSyncStatus"), ("ERI-DNX-NEST-SYS-MIB", "dbSyncCmdStatus"))
if mibBuilder.loadTexts: dbSyncProgressTrap.setStatus('current')
if mibBuilder.loadTexts: dbSyncProgressTrap.setDescription('This trap is used to notify a NMS that the system has either started or just completed the Database synchronization process.')
mibBuilder.exportSymbols("ERI-DNX-NEST-SYS-MIB", xNdrAutoSwitchover=xNdrAutoSwitchover, xNdrAutoRestore=xNdrAutoRestore, xNestCfgTable=xNestCfgTable, programFileName=programFileName, xNdrEntry=xNdrEntry, slotMiscState=slotMiscState, devDownloadEntry=devDownloadEntry, ndrPsxChassisType=ndrPsxChassisType, xNdrBroadbandGroup2Type=xNdrBroadbandGroup2Type, devSwChecksum=devSwChecksum, xNdrBroadbandGroup1=xNdrBroadbandGroup1, ndrNarrowbandProtected=ndrNarrowbandProtected, xSlotMiscState=xSlotMiscState, programFileSize=programFileSize, xNdrNarrowbandType=xNdrNarrowbandType, deviceAboutTable=deviceAboutTable, xNestDeviceCards=xNestDeviceCards, slotConfigDeviceType=slotConfigDeviceType, xSlotCmdStatus=xSlotCmdStatus, xSlotDeviceState=xSlotDeviceState, slotDeviceVersion=slotDeviceVersion, programFileCommand=programFileCommand, devFrontCardType=devFrontCardType, xNestState=xNestState, DnxSlotDeviceState=DnxSlotDeviceState, softwareRelease=softwareRelease, xNestType=xNestType, programSlotNumber=programSlotNumber, dbSyncronize=dbSyncronize, nestConfigTrap=nestConfigTrap, ndrGroupStatusTrap=ndrGroupStatusTrap, xSlotDeviceName=xSlotDeviceName, dbAutoSyncMode=dbAutoSyncMode, PYSNMP_MODULE_ID=eriDNXNestSysMIB, slotDeviceRedundancy=slotDeviceRedundancy, xNdrNestIndex=xNdrNestIndex, ndrBroadbandGroup2=ndrBroadbandGroup2, programNestNumber=programNestNumber, eXpansionNestAdmin=eXpansionNestAdmin, xSlotActualDeviceType=xSlotActualDeviceType, slotConfigCmdStatus=slotConfigCmdStatus, slotAlarmLevel=slotAlarmLevel, xNdrBroadbandGroup2=xNdrBroadbandGroup2, ndrAutoRestore=ndrAutoRestore, xNestCfgEntry=xNestCfgEntry, devSwVersion=devSwVersion, xSlotNestAddr=xSlotNestAddr, xNestCmdStatus=xNestCmdStatus, xNdrBroadbandGroup1Type=xNdrBroadbandGroup1Type, redundancy=redundancy, xNdrDualBroadbandEnabled=xNdrDualBroadbandEnabled, ndrBroadbandGroup2Type=ndrBroadbandGroup2Type, xNestAlarmContacts=xNestAlarmContacts, dbSyncCmdStatus=dbSyncCmdStatus, xNestAlarmStatus=xNestAlarmStatus, xNdrState=xNdrState, xNestDualSMCs=xNestDualSMCs, slotDeviceName=slotDeviceName, xSlotAlarmLevel=xSlotAlarmLevel, devFrontCardRev=devFrontCardRev, programLoadStatus=programLoadStatus, xNdrNarrowbandGroup=xNdrNarrowbandGroup, ndrDualBroadbandEnabled=ndrDualBroadbandEnabled, numberSlots=numberSlots, xNdrDualPowerSupply=xNdrDualPowerSupply, xNestDualXccXlc=xNestDualXccXlc, dbSyncProgressTrap=dbSyncProgressTrap, slotConfigEntry=slotConfigEntry, ndrNarrowbandGroup=ndrNarrowbandGroup, slotActualDeviceType=slotActualDeviceType, xNdrCmdStatus=xNdrCmdStatus, dbSyncStatus=dbSyncStatus, ndrBroadbandGroup1Type=ndrBroadbandGroup1Type, xNestIndex=xNestIndex, slotNbr=slotNbr, ndrBroadbandGroup2Protected=ndrBroadbandGroup2Protected, xSlotDeviceRedundancy=xSlotDeviceRedundancy, programFileIndex=programFileIndex, programBytesSent=programBytesSent, upgradeSw=upgradeSw, xSlotEntry=xSlotEntry, xSlotRawDeviceState=xSlotRawDeviceState, xNdrNarrowbandProtected=xNdrNarrowbandProtected, ndrAutoSwitchover=ndrAutoSwitchover, programLoadInitiator=programLoadInitiator, xNdrTable=xNdrTable, slotConfigTrap=slotConfigTrap, xSlotDeviceType=xSlotDeviceType, slotDeviceState=slotDeviceState, xNdrPsxChassisType=xNdrPsxChassisType, xNestDualPower=xNestDualPower, ndrBroadbandGroup1Protected=ndrBroadbandGroup1Protected, xNdrBroadbandGroup2Protected=xNdrBroadbandGroup2Protected, ndrEnabled=ndrEnabled, devRearCardType=devRearCardType, devXilinxVersion=devXilinxVersion, devDownloadTable=devDownloadTable, devRearCardRev=devRearCardRev, devSwReleaseDate=devSwReleaseDate, DnxSlotDeviceType=DnxSlotDeviceType, slotConfigTable=slotConfigTable, ndrBroadbandGroup1=ndrBroadbandGroup1, xNestUnitName=xNestUnitName, xNestNDRCapable=xNestNDRCapable, xSlotTable=xSlotTable, dbSyncProgressTime=dbSyncProgressTime, devCardAddress=devCardAddress, ndrNarrowbandType=ndrNarrowbandType, xSlotDeviceVersion=xSlotDeviceVersion, deviceAboutEntry=deviceAboutEntry, ndrState=ndrState, eriDNXNestSysMIB=eriDNXNestSysMIB, xNdrBroadbandGroup1Protected=xNdrBroadbandGroup1Protected)
| (object_identifier, integer, octet_string) = mibBuilder.importSymbols('ASN1', 'ObjectIdentifier', 'Integer', 'OctetString')
(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')
(devices, dnx_trap_enterprise, dnx, database, nest_slot_address, decision_type, unsigned_int, trap_sequence, sys_mgr) = mibBuilder.importSymbols('ERI-DNX-SMC-MIB', 'devices', 'dnxTrapEnterprise', 'dnx', 'database', 'NestSlotAddress', 'DecisionType', 'UnsignedInt', 'trapSequence', 'sysMgr')
(eri_mibs,) = mibBuilder.importSymbols('ERI-ROOT-SMI', 'eriMibs')
(notification_group, module_compliance) = mibBuilder.importSymbols('SNMPv2-CONF', 'NotificationGroup', 'ModuleCompliance')
(mib_identifier, iso, time_ticks, module_identity, ip_address, counter64, gauge32, counter32, mib_scalar, mib_table, mib_table_row, mib_table_column, bits, unsigned32, notification_type, object_identity, integer32) = mibBuilder.importSymbols('SNMPv2-SMI', 'MibIdentifier', 'iso', 'TimeTicks', 'ModuleIdentity', 'IpAddress', 'Counter64', 'Gauge32', 'Counter32', 'MibScalar', 'MibTable', 'MibTableRow', 'MibTableColumn', 'Bits', 'Unsigned32', 'NotificationType', 'ObjectIdentity', 'Integer32')
(textual_convention, display_string) = mibBuilder.importSymbols('SNMPv2-TC', 'TextualConvention', 'DisplayString')
eri_dnx_nest_sys_mib = module_identity((1, 3, 6, 1, 4, 1, 644, 3, 14))
eriDNXNestSysMIB.setRevisions(('2003-07-17 00:00', '2002-05-13 00:00'))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
if mibBuilder.loadTexts:
eriDNXNestSysMIB.setRevisionsDescriptions(('Nevio Poljak - eri_DnxNest MIB Rev 01.4 (SW Rel. 16.0) Added new Configuration Error Device States for display in the slot tables to support bug #6447.', 'Nevio Poljak - eri_DnxNest MIB Rev 01.0 Initial Release of this MIB.'))
if mibBuilder.loadTexts:
eriDNXNestSysMIB.setLastUpdated('200307170000Z')
if mibBuilder.loadTexts:
eriDNXNestSysMIB.setOrganization('Eastern Research, Inc.')
if mibBuilder.loadTexts:
eriDNXNestSysMIB.setContactInfo('Customer Service Postal: Eastern Research, Inc. 225 Executive Drive Moorestown, NJ 08057 Phone: +1-800-337-4374 Email: support@erinc.com')
if mibBuilder.loadTexts:
eriDNXNestSysMIB.setDescription('The ERI Enterprise MIB Module for the DNX Nest System Admistration.')
class Dnxslotdevicetype(TextualConvention, Integer32):
description = 'Determines the Device Card type in the slot.'
status = 'current'
subtype_spec = Integer32.subtypeSpec + constraints_union(single_value_constraint(0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 14, 15, 16, 17, 18, 19, 20, 21, 22, 25, 26, 27, 28, 29, 30, 31))
named_values = named_values(('slot', 0), ('octal-t1e1', 1), ('quadHighSpeed', 2), ('octalHighSpeed', 3), ('quadOcu', 4), ('smc', 5), ('quad-t1', 6), ('ds3', 7), ('testAccess', 8), ('octalVoice', 9), ('powerSupply', 14), ('psx', 15), ('router', 16), ('sts1', 17), ('hds3', 18), ('gr303', 19), ('xcc', 20), ('xlc', 21), ('xnm', 22), ('ds0dp', 25), ('stm1', 26), ('oc3', 27), ('e3', 28), ('xlc-ot1e1', 29), ('stm1X', 30), ('oc3X', 31))
class Dnxslotdevicestate(TextualConvention, Integer32):
description = 'Determines state of the Device Card in the configured slot.'
status = 'current'
subtype_spec = Integer32.subtypeSpec + constraints_union(single_value_constraint(0, 1, 2, 3, 4, 5, 6, 7, 8, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24))
named_values = named_values(('not-present', 0), ('online', 1), ('offline', 2), ('disabled', 3), ('standby', 4), ('defective', 5), ('busError', 6), ('outOfService', 7), ('configError', 8), ('online-online', 11), ('online-offline', 12), ('online-standby', 13), ('online-defective', 14), ('online-busError', 15), ('online-oos', 16), ('standby-online', 17), ('standby-offline', 18), ('standby-standby', 19), ('standby-defective', 20), ('standby-busError', 21), ('standby-oos', 22), ('online-cfgError', 23), ('standby-cfgError', 24))
slot_config_table = mib_table((1, 3, 6, 1, 4, 1, 644, 2, 4, 1, 3))
if mibBuilder.loadTexts:
slotConfigTable.setStatus('current')
if mibBuilder.loadTexts:
slotConfigTable.setDescription('A list of the device cards in this node with the static and dynamic type information. The maximum number of entries depends on the number of slots in the system plus 3 default entries for the system manager cards and the Protection Switch.')
slot_config_entry = mib_table_row((1, 3, 6, 1, 4, 1, 644, 2, 4, 1, 3, 1)).setIndexNames((0, 'ERI-DNX-NEST-SYS-MIB', 'slotNbr'))
if mibBuilder.loadTexts:
slotConfigEntry.setStatus('current')
if mibBuilder.loadTexts:
slotConfigEntry.setDescription("The conceptual row of the Slot Configuration table. A row in this table can not be created or deleted. A row in this table can be modified by providing valid values for either the Slot Name, Configured Device Type, Device Redundancy, or Slot Command Status. Deleting the Slot Configuration using the Slot Command Status value of 'delete-slot-config' will result in the removal of all configured connections associated with that slot number. The slotConfigCmdStatus field must be included as a variable in a SET PDU for the action to take effect. If the slotConfigCmdStatus is missing from the SET PDU, the GET RESPONSE will contain the SNMP error status of 'genErr' for and an error index equal to the last variable.")
slot_nbr = mib_table_column((1, 3, 6, 1, 4, 1, 644, 2, 4, 1, 3, 1, 1), integer32().subtype(subtypeSpec=value_range_constraint(1, 99))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
slotNbr.setStatus('current')
if mibBuilder.loadTexts:
slotNbr.setDescription(' The slot number in the node.')
slot_config_device_type = mib_table_column((1, 3, 6, 1, 4, 1, 644, 2, 4, 1, 3, 1, 2), dnx_slot_device_type()).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
slotConfigDeviceType.setStatus('current')
if mibBuilder.loadTexts:
slotConfigDeviceType.setDescription(" This is the slot type configured by the user. The value, slot(0) is the default type for an unconfigured device. If slot(0) is used in a Set Request, the agent will return an error status of 'badValue'. The slot entries representing the System Manager Cards and the Protection Switch device cannot be used in a Set Request since their device type is static.")
slot_actual_device_type = mib_table_column((1, 3, 6, 1, 4, 1, 644, 2, 4, 1, 3, 1, 3), dnx_slot_device_type()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
slotActualDeviceType.setStatus('current')
if mibBuilder.loadTexts:
slotActualDeviceType.setDescription(' This is the actual slot type sent back by the card. ')
slot_device_state = mib_table_column((1, 3, 6, 1, 4, 1, 644, 2, 4, 1, 3, 1, 4), dnx_slot_device_state()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
slotDeviceState.setStatus('current')
if mibBuilder.loadTexts:
slotDeviceState.setDescription(' The current machine state of the device. not-present (0) Indicates no hardware detected in the slot. online (1) Device is present and is considered primary operational. offline (2) Device is present but currently not operational. disabled (3) Applies to the Protection Switch box if system cannot support redundancy. standby (4) Device is present but considered as secondary. defective (5) Device is present but could not be activated. bus-error (6) Device is present and reporting a bus connection error. out-of-serv (7) Operator has placed device in Out of Service mode.')
slot_alarm_level = mib_table_column((1, 3, 6, 1, 4, 1, 644, 2, 4, 1, 3, 1, 5), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(0, 1, 2, 3, 4, 5, 6, 7, 99))).clone(namedValues=named_values(('no-alarm', 0), ('minor-level', 1), ('major-level', 2), ('major-minor', 3), ('critical-level', 4), ('critical-minor', 5), ('critical-major', 6), ('critical-major-minor', 7), ('unknown', 99)))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
slotAlarmLevel.setStatus('current')
if mibBuilder.loadTexts:
slotAlarmLevel.setDescription(" The current slot device alarm condition level that indicates it's severity. ")
slot_device_name = mib_table_column((1, 3, 6, 1, 4, 1, 644, 2, 4, 1, 3, 1, 6), display_string().subtype(subtypeSpec=value_size_constraint(0, 11))).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
slotDeviceName.setStatus('current')
if mibBuilder.loadTexts:
slotDeviceName.setDescription('The user defined name for this slot/device.')
slot_device_version = mib_table_column((1, 3, 6, 1, 4, 1, 644, 2, 4, 1, 3, 1, 7), display_string().subtype(subtypeSpec=value_size_constraint(0, 12))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
slotDeviceVersion.setStatus('current')
if mibBuilder.loadTexts:
slotDeviceVersion.setDescription('The software version release identification number for this device. ')
slot_device_redundancy = mib_table_column((1, 3, 6, 1, 4, 1, 644, 2, 4, 1, 3, 1, 8), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(0, 1, 2))).clone(namedValues=named_values(('disable', 0), ('enable', 1), ('notApplicable', 2)))).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
slotDeviceRedundancy.setStatus('current')
if mibBuilder.loadTexts:
slotDeviceRedundancy.setDescription('The configured N+1 Redundancy state of the device. The slot entries representing the System Manager Cards and the Protection Switch device cannot be used in a Set Request since N+1 Redundancy does not apply to them. disable (0) Device is not configured as part of the Redundancy Group. enable (1) Device is configured as part of the Redundancy Group. n/a (2) Device does not support Redundancy.')
slot_misc_state = mib_table_column((1, 3, 6, 1, 4, 1, 644, 2, 4, 1, 3, 1, 9), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(0, 1, 2, 3, 4, 5, 6, 7))).clone(namedValues=named_values(('none', 0), ('errors', 1), ('test', 2), ('errors-test', 3), ('clockSrc', 4), ('errors-clockSrc', 5), ('test-clockSrc', 6), ('errors-test-clockSrc', 7)))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
slotMiscState.setStatus('current')
if mibBuilder.loadTexts:
slotMiscState.setDescription('The current slot/device miscellaneous state conditions. none (0) no misc condition errors (1) errors reported on device test (2) device is in test mode errors-test (3) errors reported on device while in test mode clockSrc (4) device is the source for the system clock errors-clockSrc (5) device is the source for the system clock and errors found test-clockSrc (6) device is the source for the system clock and is in test mode errors-test-clockSrc (7) device is the source for the system clock and is in test mode and errors were found')
slot_config_cmd_status = mib_table_column((1, 3, 6, 1, 4, 1, 644, 2, 4, 1, 3, 1, 10), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(0, 1, 2, 10, 11, 101, 102, 110, 111, 200, 201, 202, 203, 204, 205, 207, 208, 450, 500, 501, 502))).clone(namedValues=named_values(('ready-for-command', 0), ('update-slot-config', 1), ('delete-slot-config', 2), ('ndr-switchover', 10), ('ndr-restore', 11), ('update-successful', 101), ('delete-successful', 102), ('switch-successful', 110), ('restore-successful', 111), ('err-general-slot-config-error', 200), ('err-invalid-slot-type', 201), ('err-invalid-slot-command', 202), ('err-invalid-slot-name', 203), ('err-redundancy-disabled', 204), ('err-cannot-chg-sys-device', 205), ('err-invalid-redundancy-state', 207), ('err-cannot-delete-online-device', 208), ('err-data-locked-by-another-user', 450), ('err-snmp-parse-failed', 500), ('err-invalid-snmp-type', 501), ('err-invalid-snmp-var-size', 502)))).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
slotConfigCmdStatus.setStatus('current')
if mibBuilder.loadTexts:
slotConfigCmdStatus.setDescription('The command status for this slot configuration row/record. The value used in a SET will be replaced by a response value in the GET RESPONSE indicating success or failure. Default Response State used in GET RESPONSE Command ready-for-command (0) initial default status for a row Slot Device Commands used in SET Command (1..99) update-slot-config (1) change an aspect of current slot configuration delete-slot-config (2) remove existing Slot Configuration. Deleting the Slot Configuration using the Slot Command Status will result in the removal of all configured connections associated with that slot number. ndr-switchover (10) force a switchover to the Standby device ndr-restore (11) force a restore back to the original device Response States used in GET RESPONSE Command (100..199) update-successful (101) slot data has been successfully changed delete-successful (102) slot data has been successfully removed switch-successful (110) Slot N+1 Redundancy device has been successfully switched over to Standby device restore-successful (111) Slot N+1 Redundancy device has been successfully restored back to Primary device Slot Config Error Codes used in GET RESPONSE Command (200..799) err-general-slot-config-error (200) Unknown slot configuration error occurred. err-invalid-slot-type (201) Configured slot type not in valid range err-invalid-slot-command (202) Unrecognized slot command-action err-invalid-slot-name (203) Configured slot name too long err-redundancy-disabled (204) Redundancy disabled on this system or does not apply to device type err-cannot-chg-sys-device (205) System Device type does not support configuration change err-invalid-redundancy-state (207) Redundancy state does not apply or invalid err-cannot-delete-online-device (208) Device cannot be present when deleting configuration err-data-locked-by-another-user (450) Another administrative user is making changes to this part of the system via a terminal session. Check Event Log for user name err-snmp-parse-failed (500) Agent could not parse variable err-invalid-snmp-type (501) Variable ASN type does not match Agent defined type err-invalid-snmp-var-size (502) Variable size is too big')
number_slots = mib_scalar((1, 3, 6, 1, 4, 1, 644, 2, 4, 1, 4), integer32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
numberSlots.setStatus('obsolete')
if mibBuilder.loadTexts:
numberSlots.setDescription(' This is the number of slots in the node.')
software_release = mib_scalar((1, 3, 6, 1, 4, 1, 644, 2, 4, 1, 5), display_string()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
softwareRelease.setStatus('obsolete')
if mibBuilder.loadTexts:
softwareRelease.setDescription('In the form Release x.xx where x.xx is the release number.')
redundancy = mib_identifier((1, 3, 6, 1, 4, 1, 644, 2, 4, 1, 9))
ndr_enabled = mib_scalar((1, 3, 6, 1, 4, 1, 644, 2, 4, 1, 9, 1), decision_type()).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
ndrEnabled.setStatus('current')
if mibBuilder.loadTexts:
ndrEnabled.setDescription("Indicates the system's capability of supporting the N+1 Device Redundancy functionality. The user should configure this variable based on the existence of the Protection Switch Box (PSX) Device. The ndrState will reflect the actual status of N+1 Redundancy. no (0) No PSX attached, N+1 Redundancy disabled. yes (1) PSX attached, N+1 Redundancy enabled.")
ndr_state = mib_scalar((1, 3, 6, 1, 4, 1, 644, 2, 4, 1, 9, 2), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3, 4))).clone(namedValues=named_values(('disabled', 1), ('frozen', 2), ('delayed', 3), ('enabled', 4)))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
ndrState.setStatus('current')
if mibBuilder.loadTexts:
ndrState.setDescription('This is the current N+1 Device Redundancy state. disabled (1) N+1 Redundancy disabled by the user. frozen (2) N+1 Redundancy is not active due to missing hardware components. delayed (3) N+1 Redundancy is delayed due to switchover. enabled (4) N+1 Redundancy enabled and ready.')
ndr_auto_switchover = mib_scalar((1, 3, 6, 1, 4, 1, 644, 2, 4, 1, 9, 3), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(0, 1, 2, 3, 4))).clone(namedValues=named_values(('manual', 0), ('automatic', 1), ('narrowband-auto', 2), ('broadband-1-auto', 3), ('broadband-2-auto', 4)))).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
ndrAutoSwitchover.setStatus('current')
if mibBuilder.loadTexts:
ndrAutoSwitchover.setDescription("Indicates the user's desired N+1 Device Redundancy automatic Switchover setting when a primary card fails. manual (0) Failed cards will not be switched automatically by the system. User is required to go to Node Summary Console screen and force a manual switchover of the failed card to the Redundant. automatic (1) The system will automatically switch out failed cards for either NDR Group with the Redundant card. narrowband-auto (2) The system will automatically switch out a failed card for the NDR Narrowband Group with the Redundant. broadband-1-auto(3) The system will automatically switch out a failed card for the NDR Broadband Group 1 with the Redundant. broadband-2-auto(4) The system will automatically switch out a failed card for the NDR Broadband Group 2 with the Redundant.")
ndr_auto_restore = mib_scalar((1, 3, 6, 1, 4, 1, 644, 2, 4, 1, 9, 4), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(0, 1, 2, 3, 4))).clone(namedValues=named_values(('manual', 0), ('automatic', 1), ('narrowband-auto', 2), ('broadband-1-auto', 3), ('broadband-2-auto', 4)))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
ndrAutoRestore.setStatus('current')
if mibBuilder.loadTexts:
ndrAutoRestore.setDescription("Indicates the system's N+1 Device Redundancy automatic Restore setting when a protected card becomes operational. manual (0) Protected cards that become operational will not be restored automatically by the system. User is required to go to Node Summary Console screen and force a manual switchover of the Redundant card back to the Primary card. automatic (1) The system will automatically restore protected cards that become operational for either NDR Group. narrowband-auto (2) The system will automatically restore protected cards that become operational for the NDR Narrowband Group. broadband-1-auto(3) The system will automatically restore protected cards that become operational for the NDR Broadband Group 1. broadband-2-auto(4) The system will automatically restore protected cards that become operational for the NDR Broadband Group 2.")
ndr_broadband_group1 = mib_scalar((1, 3, 6, 1, 4, 1, 644, 2, 4, 1, 9, 5), integer32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
ndrBroadbandGroup1.setStatus('current')
if mibBuilder.loadTexts:
ndrBroadbandGroup1.setDescription('This is a 2 byte bit field reflecting the slots that are part of the current active NDR Broadband Group 1. The first 11 bits represent each of the slot numbers. If any of the bits are set, those slots are currently part of the Group 1 N+1 Redundancy Group.')
ndr_narrowband_group = mib_scalar((1, 3, 6, 1, 4, 1, 644, 2, 4, 1, 9, 6), integer32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
ndrNarrowbandGroup.setStatus('current')
if mibBuilder.loadTexts:
ndrNarrowbandGroup.setDescription('This is a 2 byte bit field reflecting the slots that are part of the current active NDR Narrowband Group. The first 11 bits represent each of the slot numbers. If any of the bits are set, those slots are currently part of the Narrowband N+1 Redundancy Group.')
ndr_broadband_group1_protected = mib_scalar((1, 3, 6, 1, 4, 1, 644, 2, 4, 1, 9, 7), integer32().subtype(subtypeSpec=constraints_union(value_range_constraint(0, 0), value_range_constraint(8, 10)))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
ndrBroadbandGroup1Protected.setStatus('current')
if mibBuilder.loadTexts:
ndrBroadbandGroup1Protected.setDescription('This is a slot number that indicates which device card from the active NDR Broadband Group 1 has been currently switched over. Valid Protected slots for NDR Broadband Group1 are 8 through 10. If a zero value is returned, no device card is currently protected.')
ndr_narrowband_protected = mib_scalar((1, 3, 6, 1, 4, 1, 644, 2, 4, 1, 9, 8), integer32().subtype(subtypeSpec=constraints_union(value_range_constraint(0, 0), value_range_constraint(2, 11)))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
ndrNarrowbandProtected.setStatus('current')
if mibBuilder.loadTexts:
ndrNarrowbandProtected.setDescription('This is a slot number that indicates which device card from the active NDR Narrowband Group has been currently switched over. Valid Protected slots for NDR Narrowband Group are 2 through 11. If a zero value is returned, no device card is currently protected.')
ndr_broadband_group1_type = mib_scalar((1, 3, 6, 1, 4, 1, 644, 2, 4, 1, 9, 9), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(8, 18, 21, 31))).clone(namedValues=named_values(('ds3', 8), ('sts1', 18), ('hds3', 21), ('e3', 31)))).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
ndrBroadbandGroup1Type.setStatus('current')
if mibBuilder.loadTexts:
ndrBroadbandGroup1Type.setDescription('This indicates which type of device is currently occupying the status of active NDR Broadband Group 1. Only one type of broadband device can be supported by N+1 Redundancy at one time. Whichever type is selected as the active Broadband Group 1 type should match the device type of the card in Slot 11, which is the designated Broadband Group 1 NDR Redundant slot.')
ndr_narrowband_type = mib_scalar((1, 3, 6, 1, 4, 1, 644, 2, 4, 1, 9, 10), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(13, 22))).clone(namedValues=named_values(('octalT1E1', 13), ('gr303', 22)))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
ndrNarrowbandType.setStatus('current')
if mibBuilder.loadTexts:
ndrNarrowbandType.setDescription('This indicates which type of device is currently occupying the status of active NDR Narrowband Group. Only one type of Narrowband device can be supported by N+1 Redundancy at one time. Whichever type is selected as the active Narrowband type should match the device type of the card in Slot 1, which is the designated Narrowband NDR Redundant slot.')
ndr_dual_broadband_enabled = mib_scalar((1, 3, 6, 1, 4, 1, 644, 2, 4, 1, 9, 11), decision_type()).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
ndrDualBroadbandEnabled.setStatus('current')
if mibBuilder.loadTexts:
ndrDualBroadbandEnabled.setDescription("Indicates the system's capability of supporting the N+1 Device Redundancy Dual Broadband Group functionality. The user should configure this variable based on the existence of the Upgraded PSX Hardware. no (0) PSX Dual Broadband Groups disabled or not supported. yes (1) PSX Dual Broadband Groups enabled.")
ndr_broadband_group2 = mib_scalar((1, 3, 6, 1, 4, 1, 644, 2, 4, 1, 9, 12), integer32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
ndrBroadbandGroup2.setStatus('current')
if mibBuilder.loadTexts:
ndrBroadbandGroup2.setDescription('This is a 2 byte bit field reflecting the slots that are part of the current active NDR Broadband Group 2. The first 11 bits represent each of the slot numbers. If any of the bits are set, those slots are currently part of the Group 2 N+1 Redundancy Group.')
ndr_broadband_group2_protected = mib_scalar((1, 3, 6, 1, 4, 1, 644, 2, 4, 1, 9, 13), integer32().subtype(subtypeSpec=value_range_constraint(0, 6))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
ndrBroadbandGroup2Protected.setStatus('current')
if mibBuilder.loadTexts:
ndrBroadbandGroup2Protected.setDescription('This is a slot number that indicates which device card from the active NDR Broadband Group 2 has been currently switched over. Valid Protected slots for NDR Broadband Group2 are 1 through 6. If a zero value is returned, no device card is currently protected.')
ndr_broadband_group2_type = mib_scalar((1, 3, 6, 1, 4, 1, 644, 2, 4, 1, 9, 14), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(8, 18, 21, 31))).clone(namedValues=named_values(('ds3', 8), ('sts1', 18), ('hds3', 21), ('e3', 31)))).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
ndrBroadbandGroup2Type.setStatus('current')
if mibBuilder.loadTexts:
ndrBroadbandGroup2Type.setDescription('This indicates which type of device is currently occupying the status of active NDR Broadband Group 2. Only one type of broadband device can be supported by N+1 Redundancy at one time. Whichever type is selected as the active Broadband Group 2 type should match the device type of the card in Slot 7, which is the designated Broadband Group 2 NDR Redundant slot.')
ndr_psx_chassis_type = mib_scalar((1, 3, 6, 1, 4, 1, 644, 2, 4, 1, 9, 15), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(0, 1))).clone(namedValues=named_values(('psx5200', 0), ('psx5300', 1)))).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
ndrPsxChassisType.setStatus('current')
if mibBuilder.loadTexts:
ndrPsxChassisType.setDescription('This indicates which type of Protection Switch Chassis Hardware has been detected. In order to run with Dual Broadband Group configuration, this value should be set to psx5300.')
upgrade_sw = mib_identifier((1, 3, 6, 1, 4, 1, 644, 2, 4, 1, 10))
dev_download_table = mib_table((1, 3, 6, 1, 4, 1, 644, 2, 4, 1, 10, 1))
if mibBuilder.loadTexts:
devDownloadTable.setStatus('current')
if mibBuilder.loadTexts:
devDownloadTable.setDescription('A Table listing the files one could download from smc to a device card using TFTP')
dev_download_entry = mib_table_row((1, 3, 6, 1, 4, 1, 644, 2, 4, 1, 10, 1, 1)).setIndexNames((0, 'ERI-DNX-NEST-SYS-MIB', 'programFileIndex'))
if mibBuilder.loadTexts:
devDownloadEntry.setStatus('current')
if mibBuilder.loadTexts:
devDownloadEntry.setDescription('An entry in the Device Download Table')
program_file_index = mib_table_column((1, 3, 6, 1, 4, 1, 644, 2, 4, 1, 10, 1, 1, 1), integer32().subtype(subtypeSpec=value_range_constraint(1, 99))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
programFileIndex.setStatus('current')
if mibBuilder.loadTexts:
programFileIndex.setDescription('The index of the program file available for download')
program_file_name = mib_table_column((1, 3, 6, 1, 4, 1, 644, 2, 4, 1, 10, 1, 1, 2), display_string()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
programFileName.setStatus('current')
if mibBuilder.loadTexts:
programFileName.setDescription('The name of the program file available for download')
program_file_size = mib_table_column((1, 3, 6, 1, 4, 1, 644, 2, 4, 1, 10, 1, 1, 3), integer32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
programFileSize.setStatus('current')
if mibBuilder.loadTexts:
programFileSize.setDescription('The size in bytes of the program file available for download')
program_load_status = mib_table_column((1, 3, 6, 1, 4, 1, 644, 2, 4, 1, 10, 1, 1, 4), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3))).clone(namedValues=named_values(('loadingProgramFile', 1), ('readyForProgramLoad', 2), ('swDownloadNotReady', 3)))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
programLoadStatus.setStatus('current')
if mibBuilder.loadTexts:
programLoadStatus.setDescription('The load status of the program file')
program_load_initiator = mib_table_column((1, 3, 6, 1, 4, 1, 644, 2, 4, 1, 10, 1, 1, 5), display_string()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
programLoadInitiator.setStatus('current')
if mibBuilder.loadTexts:
programLoadInitiator.setDescription('The name of the user who initiated the program file download')
program_bytes_sent = mib_table_column((1, 3, 6, 1, 4, 1, 644, 2, 4, 1, 10, 1, 1, 6), integer32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
programBytesSent.setStatus('current')
if mibBuilder.loadTexts:
programBytesSent.setDescription('The number of bytes sent in the current program file download')
program_slot_number = mib_table_column((1, 3, 6, 1, 4, 1, 644, 2, 4, 1, 10, 1, 1, 7), integer32()).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
programSlotNumber.setStatus('current')
if mibBuilder.loadTexts:
programSlotNumber.setDescription('The slot number to which a program file is to be downloaded')
program_file_command = mib_table_column((1, 3, 6, 1, 4, 1, 644, 2, 4, 1, 10, 1, 1, 8), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 4, 5, 6, 7, 8, 9, 10, 12, 13, 414, 450, 500, 501, 502))).clone(namedValues=named_values(('loadProgramFile', 1), ('loadProgramToAll', 2), ('deleteProgramFile', 4), ('readyForCommand', 5), ('err-invalid-slot-nbr', 6), ('noProgramFile', 7), ('programFileBusy', 8), ('noError', 9), ('slotNotReady', 10), ('programFileIdle', 12), ('err-invalid-nest-nbr', 13), ('err-invalid-command', 414), ('err-data-locked-by-another-user', 450), ('err-snmp-parse-failed', 500), ('err-invalid-snmp-type', 501), ('err-invalid-snmp-var-size', 502)))).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
programFileCommand.setStatus('current')
if mibBuilder.loadTexts:
programFileCommand.setDescription('The command to change the load status of the program file, or an error returned from a command.')
program_nest_number = mib_table_column((1, 3, 6, 1, 4, 1, 644, 2, 4, 1, 10, 1, 1, 9), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(0, 1, 2, 3, 4, 5, 6, 7, 10))).clone(namedValues=named_values(('nest1', 0), ('nest2', 1), ('nest3', 2), ('nest4', 3), ('nest5', 4), ('nest6', 5), ('nest7', 6), ('nest8', 7), ('allNests', 10)))).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
programNestNumber.setStatus('current')
if mibBuilder.loadTexts:
programNestNumber.setDescription('The Nest number to which a program file is to be downloaded. If this field is not included in the SET PDU, the file will be downloaded to the specified slot in the First Nest (nest1).')
e_xpansion_nest_admin = mib_identifier((1, 3, 6, 1, 4, 1, 644, 2, 4, 1, 11))
x_nest_cfg_table = mib_table((1, 3, 6, 1, 4, 1, 644, 2, 4, 1, 11, 1))
if mibBuilder.loadTexts:
xNestCfgTable.setStatus('current')
if mibBuilder.loadTexts:
xNestCfgTable.setDescription('A list of the Configured and Unconfigured Nests in this node with the static and dynamic type information. The maximum number of entries is 8 nests but if this is an Stand-Alone DNX-11 system, only 1 nest entry will be returned.')
x_nest_cfg_entry = mib_table_row((1, 3, 6, 1, 4, 1, 644, 2, 4, 1, 11, 1, 1)).setIndexNames((0, 'ERI-DNX-NEST-SYS-MIB', 'xNestIndex'))
if mibBuilder.loadTexts:
xNestCfgEntry.setStatus('current')
if mibBuilder.loadTexts:
xNestCfgEntry.setDescription("The conceptual row of the Nest Configuration table. A row in this table can not be created or deleted. A row in this table can be modified by providing valid values for either the Nest Name, Configured Nest Type, NDR Capability, Alarm Contacts, Dual SMCs, Dual XLCs or XCCs, or Nest Command Status. Deleting the Nest Configuration using the Nest Command Status value of 'delete-nest-config' will result in the removal of all configured slots, ports, & connections associated with that nest number. The xNestCmdStatus field must be included as a variable in a SET PDU for the action to take effect. If the xNestCmdStatus is missing from the SET PDU, the GET RESPONSE will contain the SNMP error status of 'genErr' for and an error index equal to the last variable.")
x_nest_index = mib_table_column((1, 3, 6, 1, 4, 1, 644, 2, 4, 1, 11, 1, 1, 1), integer32().subtype(subtypeSpec=value_range_constraint(0, 7))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
xNestIndex.setStatus('current')
if mibBuilder.loadTexts:
xNestIndex.setDescription(' The nest index number in the node. Nests are indexed 0 through 7 but correspond to Nests 1 to 8.')
x_nest_unit_name = mib_table_column((1, 3, 6, 1, 4, 1, 644, 2, 4, 1, 11, 1, 1, 2), display_string().subtype(subtypeSpec=value_size_constraint(0, 30))).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
xNestUnitName.setStatus('current')
if mibBuilder.loadTexts:
xNestUnitName.setDescription('The user defined name for this nest.')
x_nest_type = mib_table_column((1, 3, 6, 1, 4, 1, 644, 2, 4, 1, 11, 1, 1, 3), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(0, 1, 2, 3))).clone(namedValues=named_values(('notConfig', 0), ('dnx4', 1), ('dnx11', 2), ('stm1X-oc3X', 3)))).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
xNestType.setStatus('current')
if mibBuilder.loadTexts:
xNestType.setDescription("This is the nest type configured by the user. The value, notConfig(0), is the default type for an unconfigured device. Note, if notConfig(0) or stm1X-oc3X(3) is used in a Set Request, the agent will return an error status of 'badValue'. Virtual stm1X-oc3X Nests are configured automatically by the system whenever the user Assigns an available Nest to an STM1X or OC3X Device pair. This can be done via the opticalDevConfigTable after a STM1X or OC3X card has been configured in a Even numbered slot.")
x_nest_state = mib_table_column((1, 3, 6, 1, 4, 1, 644, 2, 4, 1, 11, 1, 1, 4), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(2, 8, 12, 16, 32))).clone(namedValues=named_values(('mismatch', 2), ('notPresent', 8), ('missing', 12), ('online', 16), ('offline', 32)))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
xNestState.setStatus('current')
if mibBuilder.loadTexts:
xNestState.setDescription(' The current machine state of the Nests. mismatch (2) Nest is configured as wrong type. notPresent (8) Nest is unconfigured. missing (12) Nest is configured but communications are down. online (16) Nest is present and operational. offline (32) Nest is present but currently not operational.')
x_nest_alarm_status = mib_table_column((1, 3, 6, 1, 4, 1, 644, 2, 4, 1, 11, 1, 1, 5), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(0, 1, 2, 3, 4, 5, 6, 7, 99))).clone(namedValues=named_values(('no-alarm', 0), ('minor-level', 1), ('major-level', 2), ('major-minor', 3), ('critical-level', 4), ('critical-minor', 5), ('critical-major', 6), ('critical-major-minor', 7), ('unknown', 99)))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
xNestAlarmStatus.setStatus('current')
if mibBuilder.loadTexts:
xNestAlarmStatus.setDescription(" The current nest device alarm condition level that indicates it's severity. ")
x_nest_device_cards = mib_table_column((1, 3, 6, 1, 4, 1, 644, 2, 4, 1, 11, 1, 1, 6), integer32().subtype(subtypeSpec=value_range_constraint(0, 11))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
xNestDeviceCards.setStatus('current')
if mibBuilder.loadTexts:
xNestDeviceCards.setDescription('The number of device cards presently active in the nest.')
x_nest_ndr_capable = mib_table_column((1, 3, 6, 1, 4, 1, 644, 2, 4, 1, 11, 1, 1, 7), decision_type()).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
xNestNDRCapable.setStatus('current')
if mibBuilder.loadTexts:
xNestNDRCapable.setDescription('The configured N+1 Redundancy state of the Nest. no (0) N+1 Redundancy is not available in the Nest. yes (1) N+1 Redundancy is available in the Nest.')
x_nest_alarm_contacts = mib_table_column((1, 3, 6, 1, 4, 1, 644, 2, 4, 1, 11, 1, 1, 8), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(0, 1, 2))).clone(namedValues=named_values(('standard', 0), ('localAudio1', 1), ('localAudio2', 2)))).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
xNestAlarmContacts.setStatus('current')
if mibBuilder.loadTexts:
xNestAlarmContacts.setDescription('Determines the type of desired response from the rear SMC/XNM Alarm Contact switches during an alarm event.')
x_nest_dual_sm_cs = mib_table_column((1, 3, 6, 1, 4, 1, 644, 2, 4, 1, 11, 1, 1, 9), decision_type()).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
xNestDualSMCs.setStatus('current')
if mibBuilder.loadTexts:
xNestDualSMCs.setDescription("The number of SMCs configured for the Nest. If running with only a single SMC, this should be set to 'no' in order to suppress unecessary alarms. no (0) Only 1 SMC resides in the Nest. yes (1) Both SMCs reside in the Nest.")
x_nest_dual_xcc_xlc = mib_table_column((1, 3, 6, 1, 4, 1, 644, 2, 4, 1, 11, 1, 1, 10), decision_type()).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
xNestDualXccXlc.setStatus('current')
if mibBuilder.loadTexts:
xNestDualXccXlc.setDescription("The number of XCC devices configured for the Node Manager or number of XLC devices configured for the Nest Manager depending on Type of Nest. Nest #1 is considered the Node Manager and all other Nests are considered as Nest Managers. If running with only a single XCC or XLC, this should be set to 'no' in order to suppress unecessary alarms. no (0) Only 1 XCC/XLC resides in the Nest. yes (1) Both XCCs/XLCs reside in the Nest.")
x_nest_cmd_status = mib_table_column((1, 3, 6, 1, 4, 1, 644, 2, 4, 1, 11, 1, 1, 11), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(0, 1, 2, 3, 4, 5, 6, 7, 101, 102, 103, 104, 105, 106, 107, 200, 201, 202, 203, 204, 205, 206, 207, 208, 450, 500, 501, 502))).clone(namedValues=named_values(('ready-for-command', 0), ('update-nest-config', 1), ('delete-nest-config', 2), ('switch-mgr-cards', 3), ('reset-device-cards', 4), ('clear-device-errors', 5), ('switch-xcc-cards', 6), ('switch-xlink-cards', 7), ('update-successful', 101), ('delete-successful', 102), ('switch-mgr-successful', 103), ('reset-successful', 104), ('clear-successful', 105), ('switch-xcc-successful', 106), ('switch-xlink-successful', 107), ('err-general-nest-config-error', 200), ('err-invalid-nest-type', 201), ('err-invalid-nest-command', 202), ('err-invalid-nest-name', 203), ('err-invalid-nest-alrm', 204), ('err-invalid-nest-ndr', 205), ('err-invalid-nest-option', 206), ('err-cannot-delete-online-nest', 207), ('err-nest-not-present', 208), ('err-data-locked-by-another-user', 450), ('err-snmp-parse-failed', 500), ('err-invalid-snmp-type', 501), ('err-invalid-snmp-var-size', 502)))).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
xNestCmdStatus.setStatus('current')
if mibBuilder.loadTexts:
xNestCmdStatus.setDescription("The command status for this nest configuration row/record. The value used in a SET will be replaced by a response value in the GET RESPONSE indicating success or failure. Default Response State used in GET RESPONSE Command ready-for-command (0) initial default status for a row Nest Device Commands used in SET Command (1..99) update-nest-config (1) change an aspect of current nest configuration delete-nest-config (2) remove existing Nest Configuration. Deleting the Nest Configuration using the Nest Command Status will result in the removal of all configured connections associated with that nest number. switch-mgr-cards (3) Perform Switchover to Standby SMC/XNM card in associated Nest reset-device-cards (4) Reset all device cards in associated Nest clear-device-errors (5) Clear error counters for all channel cards in associated Nest switch-xcc-cards (6) Perform Switchover to Standby XCC card in associated Nest switch-xlink-cards (7) Perform Switchover to Standby XLC card in associated Nest. Response States used in GET RESPONSE Command (100..199) update-successful (101) nest data has been successfully changed delete-successful (102) nest data has been successfully removed switch-mgr-successful (103) nest system managers has been successfully switched reset-successful (104) nest device cards have been issued reset requests clear-successful (105) nest device cards have been issued clear error requests switch-xcc-successful (106) nest xcc's has been successfully switched switch-xlink-successful (107) nest xlink cards has been successfully switched Nest Config Error Codes used in GET RESPONSE Command (200..799) err-general-nest-config-error (200) Unknown nest configuration error occurred. err-invalid-nest-type (201) Configured nest type not in valid range err-invalid-nest-command (202) Unrecognized nest command-action err-invalid-nest-name (203) Configured nest name too long err-invalid-nest-alrm (204) Configured nest alarm contacts not in valid range err-invalid-nest-ndr (205) N+1 Redundancy not supported for nest err-invalid-nest-option (206) Dual XCC/XLC or Dual SMC option not valid err-cannot-delete-online-nest (207) Nest cannot be online when deleting configuration err-nest-not-present (208) Nest not ready for command err-data-locked-by-another-user (450) Another administrative user is making changes to this part of the system via a terminal session. Check Event Log for user name err-snmp-parse-failed (500) Agent could not parse variable err-invalid-snmp-type (501) Variable ASN type does not match Agent defined type err-invalid-snmp-var-size (502) Variable size is too big")
x_nest_dual_power = mib_table_column((1, 3, 6, 1, 4, 1, 644, 2, 4, 1, 11, 1, 1, 12), decision_type()).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
xNestDualPower.setStatus('current')
if mibBuilder.loadTexts:
xNestDualPower.setDescription("The number of DNX Power Supplies configured for the Nest. If running with only a single Power Supply, this should be set to 'no' in order to suppress unecessary alarms. no (0) Only 1 Power Supply resides in the Nest. yes (1) Both Power Supplies reside in the Nest.")
x_slot_table = mib_table((1, 3, 6, 1, 4, 1, 644, 2, 4, 1, 11, 2))
if mibBuilder.loadTexts:
xSlotTable.setStatus('current')
if mibBuilder.loadTexts:
xSlotTable.setDescription('A list of the Configured device cards in this node with the static and dynamic type information. The maximum number of entries depends on the number of nests times the number of slots in the system plus 3 default entries for the system manager cards and the Protection Switch.')
x_slot_entry = mib_table_row((1, 3, 6, 1, 4, 1, 644, 2, 4, 1, 11, 2, 1)).setIndexNames((0, 'ERI-DNX-NEST-SYS-MIB', 'xSlotNestAddr'))
if mibBuilder.loadTexts:
xSlotEntry.setStatus('current')
if mibBuilder.loadTexts:
xSlotEntry.setDescription("The conceptual row of the Slot Configuration table. A row in this table can not be created or deleted. A row in this table can be modified by providing valid values for either the Slot Name, Configured Device Type, Device Redundancy, or Slot Command Status. Deleting the Slot Configuration using the Slot Command Status value of 'delete-slot-config' will result in the removal of all configured connections associated with that slot number. The xnmSlotCfgCmdStatus field must be included as a variable in a SET PDU for the action to take effect. If the xnmSlotCfgCmdStatus is missing from the SET PDU, the GET RESPONSE will contain the SNMP error status of 'genErr' for and an error index equal to the last variable.")
x_slot_nest_addr = mib_table_column((1, 3, 6, 1, 4, 1, 644, 2, 4, 1, 11, 2, 1, 1), nest_slot_address()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
xSlotNestAddr.setStatus('current')
if mibBuilder.loadTexts:
xSlotNestAddr.setDescription("This number uniquely identifies an Device's Nest-Slot Address. This number will be used throughout the system to identify a unique slot. The format is represented using an IP address syntax (4 byte string). The 1st byte represents the Nest Number (0..7) The 2nd byte represents the Slot Number (1..11) The 3rd byte unused The 4th byte unused")
x_slot_device_type = mib_table_column((1, 3, 6, 1, 4, 1, 644, 2, 4, 1, 11, 2, 1, 2), dnx_slot_device_type()).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
xSlotDeviceType.setStatus('current')
if mibBuilder.loadTexts:
xSlotDeviceType.setDescription(" This is the slot type configured by the user. The value, slot(0) is the default type for an unconfigured device. If slot(0) is used in a Set Request, the agent will return an error status of 'badValue'. The slot entries representing the System Manager Cards and the Protection Switch device cannot be used in a Set Request since their device type is static.")
x_slot_actual_device_type = mib_table_column((1, 3, 6, 1, 4, 1, 644, 2, 4, 1, 11, 2, 1, 3), dnx_slot_device_type()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
xSlotActualDeviceType.setStatus('current')
if mibBuilder.loadTexts:
xSlotActualDeviceType.setDescription(' This is the actual slot type sent back by the card. ')
x_slot_device_state = mib_table_column((1, 3, 6, 1, 4, 1, 644, 2, 4, 1, 11, 2, 1, 4), dnx_slot_device_state()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
xSlotDeviceState.setStatus('current')
if mibBuilder.loadTexts:
xSlotDeviceState.setDescription(' The current machine state of the device. not-present (0) Indicates no hardware detected in the slot. online (1) Device is present and is considered primary operational. offline (2) Device is present but currently not operational. disabled (3) Applies to the Protection Switch box if system cannot support redundancy. standby (4) Device is present but considered as secondary. defective (5) Device is present but could not be activated. bus-error (6) Device is present and reporting a bus connection error. out-of-serv (7) Operator has placed device in Out of Service mode.')
x_slot_alarm_level = mib_table_column((1, 3, 6, 1, 4, 1, 644, 2, 4, 1, 11, 2, 1, 5), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(0, 1, 2, 3, 4, 5, 6, 7, 99))).clone(namedValues=named_values(('no-alarm', 0), ('minor-level', 1), ('major-level', 2), ('major-minor', 3), ('critical-level', 4), ('critical-minor', 5), ('critical-major', 6), ('critical-major-minor', 7), ('unknown', 99)))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
xSlotAlarmLevel.setStatus('current')
if mibBuilder.loadTexts:
xSlotAlarmLevel.setDescription(" The current slot device alarm condition level that indicates it's severity. ")
x_slot_device_name = mib_table_column((1, 3, 6, 1, 4, 1, 644, 2, 4, 1, 11, 2, 1, 6), display_string().subtype(subtypeSpec=value_size_constraint(0, 11))).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
xSlotDeviceName.setStatus('current')
if mibBuilder.loadTexts:
xSlotDeviceName.setDescription('The user defined name for this slot/device.')
x_slot_device_version = mib_table_column((1, 3, 6, 1, 4, 1, 644, 2, 4, 1, 11, 2, 1, 7), display_string().subtype(subtypeSpec=value_size_constraint(0, 12))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
xSlotDeviceVersion.setStatus('current')
if mibBuilder.loadTexts:
xSlotDeviceVersion.setDescription('The software version release identification number for this device. ')
x_slot_device_redundancy = mib_table_column((1, 3, 6, 1, 4, 1, 644, 2, 4, 1, 11, 2, 1, 8), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(0, 1, 2))).clone(namedValues=named_values(('disable', 0), ('enable', 1), ('notApplicable', 2)))).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
xSlotDeviceRedundancy.setStatus('current')
if mibBuilder.loadTexts:
xSlotDeviceRedundancy.setDescription('The configured N+1 Redundancy state of the device. The slot entries representing the System Manager Cards and the Protection Switch device cannot be used in a Set Request since N+1 Redundancy does not apply to them. disable (0) Device is not configured as part of the Redundancy Group. enable (1) Device is configured as part of the Redundancy Group. n/a (2) Device does not support Redundancy.')
x_slot_misc_state = mib_table_column((1, 3, 6, 1, 4, 1, 644, 2, 4, 1, 11, 2, 1, 9), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(0, 1, 2, 3, 4, 5, 6, 7))).clone(namedValues=named_values(('none', 0), ('errors', 1), ('test', 2), ('errors-test', 3), ('clockSrc', 4), ('errors-clockSrc', 5), ('test-clockSrc', 6), ('errors-test-clockSrc', 7)))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
xSlotMiscState.setStatus('current')
if mibBuilder.loadTexts:
xSlotMiscState.setDescription('The current slot/device miscellaneous state conditions. none (0) no misc condition errors (1) errors reported on device test (2) device is in test mode errors-test (3) errors reported on device while in test mode clockSrc (4) device is the source for the system clock errors-clockSrc (5) device is the source for the system clock and errors found test-clockSrc (6) device is the source for the system clock and is in test mode errors-test-clockSrc (7) device is the source for the system clock and is in test mode and errors were found')
x_slot_cmd_status = mib_table_column((1, 3, 6, 1, 4, 1, 644, 2, 4, 1, 11, 2, 1, 10), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(0, 1, 2, 10, 11, 101, 102, 110, 111, 200, 201, 202, 203, 204, 205, 207, 208, 450, 500, 501, 502))).clone(namedValues=named_values(('ready-for-command', 0), ('update-slot-config', 1), ('delete-slot-config', 2), ('ndr-switchover', 10), ('ndr-restore', 11), ('update-successful', 101), ('delete-successful', 102), ('switch-successful', 110), ('restore-successful', 111), ('err-general-slot-config-error', 200), ('err-invalid-slot-type', 201), ('err-invalid-slot-command', 202), ('err-invalid-slot-name', 203), ('err-redundancy-disabled', 204), ('err-cannot-chg-sys-device', 205), ('err-invalid-redundancy-state', 207), ('err-cannot-delete-online-device', 208), ('err-data-locked-by-another-user', 450), ('err-snmp-parse-failed', 500), ('err-invalid-snmp-type', 501), ('err-invalid-snmp-var-size', 502)))).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
xSlotCmdStatus.setStatus('current')
if mibBuilder.loadTexts:
xSlotCmdStatus.setDescription('The command status for this slot configuration row/record. The value used in a SET will be replaced by a response value in the GET RESPONSE indicating success or failure. Default Response State used in GET RESPONSE Command ready-for-command (0) initial default status for a row Slot Device Commands used in SET Command (1..99) update-slot-config (1) change an aspect of current slot configuration delete-slot-config (2) remove existing Slot Configuration. Deleting the Slot Configuration using the Slot Command Status will result in the removal of all configured connections associated with that slot number. ndr-switchover (10) force a switchover to the Standby device ndr-restore (11) force a restore back to the original device Response States used in GET RESPONSE Command (100..199) update-successful (101) slot data has been successfully changed delete-successful (102) slot data has been successfully removed switch-successful (110) Slot N+1 Redundancy device has been successfully switched over to Standby device restore-successful (111) Slot N+1 Redundancy device has been successfully restored back to Primary device Slot Config Error Codes used in GET RESPONSE Command (200..799) err-general-slot-config-error (200) Unknown slot configuration error occurred. err-invalid-slot-type (201) Configured slot type not in valid range err-invalid-slot-command (202) Unrecognized slot command-action err-invalid-slot-name (203) Configured slot name too long err-redundancy-disabled (204) Redundancy disabled on this system or does not apply to device type err-cannot-chg-sys-device (205) System Device type does not support configuration change err-invalid-redundancy-state (207) Redundancy state does not apply or invalid err-cannot-delete-online-device (208) Device cannot be present when deleting configuration err-data-locked-by-another-user (450) Another administrative user is making changes to this part of the system via a terminal session. Check Event Log for user name err-snmp-parse-failed (500) Agent could not parse variable err-invalid-snmp-type (501) Variable ASN type does not match Agent defined type err-invalid-snmp-var-size (502) Variable size is too big')
x_slot_raw_device_state = mib_table_column((1, 3, 6, 1, 4, 1, 644, 2, 4, 1, 11, 2, 1, 11), unsigned_int()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
xSlotRawDeviceState.setStatus('current')
if mibBuilder.loadTexts:
xSlotRawDeviceState.setDescription('The current raw bitmask form of the state of the slot/device.')
x_ndr_table = mib_table((1, 3, 6, 1, 4, 1, 644, 2, 4, 1, 11, 3))
if mibBuilder.loadTexts:
xNdrTable.setStatus('current')
if mibBuilder.loadTexts:
xNdrTable.setDescription('A list of the Nests with N+1 Redundancy capability in this node. The maximum number of entries depends on the number of nests that have a Protection Switch Device.')
x_ndr_entry = mib_table_row((1, 3, 6, 1, 4, 1, 644, 2, 4, 1, 11, 3, 1)).setIndexNames((0, 'ERI-DNX-NEST-SYS-MIB', 'xNdrNestIndex'))
if mibBuilder.loadTexts:
xNdrEntry.setStatus('current')
if mibBuilder.loadTexts:
xNdrEntry.setDescription("The conceptual row of the N+1 Redundancy table. A row in this table can not be created or deleted. A row in this table can be modified by providing valid values for any of the configurable N+1 Redundancy fields. The xNdrCmdStatus field must be included as a variable in a SET PDU for the action to take effect. If the xNdrCmdStatus is missing from the SET PDU, the GET RESPONSE will contain the SNMP error status of 'genErr' for and an error index equal to the last variable.")
x_ndr_nest_index = mib_table_column((1, 3, 6, 1, 4, 1, 644, 2, 4, 1, 11, 3, 1, 1), integer32().subtype(subtypeSpec=value_range_constraint(0, 7))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
xNdrNestIndex.setStatus('current')
if mibBuilder.loadTexts:
xNdrNestIndex.setDescription(' The nest index number in the node. Nests are indexed 0 through 7 but correspond to Nests 1 to 8.')
x_ndr_state = mib_table_column((1, 3, 6, 1, 4, 1, 644, 2, 4, 1, 11, 3, 1, 2), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3, 4))).clone(namedValues=named_values(('disabled', 1), ('frozen', 2), ('delayed', 3), ('enabled', 4)))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
xNdrState.setStatus('current')
if mibBuilder.loadTexts:
xNdrState.setDescription('This is the current N+1 Device Redundancy state. disabled (1) N+1 Redundancy disabled by the user. frozen (2) N+1 Redundancy is not active due to missing hardware components. delayed (3) N+1 Redundancy is delayed due to switchover. enabled (4) N+1 Redundancy enabled and ready.')
x_ndr_auto_switchover = mib_table_column((1, 3, 6, 1, 4, 1, 644, 2, 4, 1, 11, 3, 1, 3), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(0, 1, 2, 3, 4))).clone(namedValues=named_values(('manual', 0), ('automatic', 1), ('narrowband-auto', 2), ('broadband-1-auto', 3), ('broadband-2-auto', 4)))).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
xNdrAutoSwitchover.setStatus('current')
if mibBuilder.loadTexts:
xNdrAutoSwitchover.setDescription("Indicates the user's desired N+1 Device Redundancy automatic Switchover setting when a primary card fails. manual (0) Failed cards will not be switched automatically by the system. User is required to go to Node Summary Console screen and force a manual switchover of the failed card to the Redundant. automatic (1) The system will automatically switch out failed cards for either NDR Group with the Redundant card. narrowband-auto (2) The system will automatically switch out a failed card for the NDR Narrowband Group with the Redundant. broadband-1-auto(3) The system will automatically switch out a failed card for the NDR Broadband Group 1 with the Redundant. broadband-2-auto(4) The system will automatically switch out a failed card for the NDR Broadband Group 2 with the Redundant.")
x_ndr_auto_restore = mib_table_column((1, 3, 6, 1, 4, 1, 644, 2, 4, 1, 11, 3, 1, 4), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(0, 1, 2, 3, 4))).clone(namedValues=named_values(('manual', 0), ('automatic', 1), ('narrowband-auto', 2), ('broadband-1-auto', 3), ('broadband-2-auto', 4)))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
xNdrAutoRestore.setStatus('current')
if mibBuilder.loadTexts:
xNdrAutoRestore.setDescription("Indicates the system's N+1 Device Redundancy automatic Restore setting when a protected card becomes operational. manual (0) Protected cards that become operational will not be restored automatically by the system. User is required to go to Node Summary Console screen and force a manual switchover of the Redundant card back to the Primary card. automatic (1) The system will automatically restore protected cards that become operational for either NDR Group. narrowband-auto (2) The system will automatically restore protected cards that become operational for the NDR Narrowband Group. broadband-1-auto(3) The system will automatically restore protected cards that become operational for the NDR Broadband Group 1. broadband-2-auto(4) The system will automatically restore protected cards that become operational for the NDR Broadband Group 2.")
x_ndr_broadband_group1 = mib_table_column((1, 3, 6, 1, 4, 1, 644, 2, 4, 1, 11, 3, 1, 5), integer32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
xNdrBroadbandGroup1.setStatus('current')
if mibBuilder.loadTexts:
xNdrBroadbandGroup1.setDescription('This is a 2 byte bit field reflecting the slots that are part of the current active NDR Broadband Group 1. The first 11 bits represent each of the slot numbers. If any of the bits are set, those slots are currently part of the Group 1 N+1 Redundancy Group.')
x_ndr_narrowband_group = mib_table_column((1, 3, 6, 1, 4, 1, 644, 2, 4, 1, 11, 3, 1, 6), integer32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
xNdrNarrowbandGroup.setStatus('current')
if mibBuilder.loadTexts:
xNdrNarrowbandGroup.setDescription('This is a 2 byte bit field reflecting the slots that are part of the current active NDR Narrowband Group. The first 11 bits represent each of the slot numbers. If any of the bits are set, those slots are currently part of the Narrowband N+1 Redundancy Group.')
x_ndr_broadband_group1_protected = mib_table_column((1, 3, 6, 1, 4, 1, 644, 2, 4, 1, 11, 3, 1, 7), integer32().subtype(subtypeSpec=constraints_union(value_range_constraint(0, 0), value_range_constraint(8, 10)))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
xNdrBroadbandGroup1Protected.setStatus('current')
if mibBuilder.loadTexts:
xNdrBroadbandGroup1Protected.setDescription('This is a slot number that indicates which device card from the active NDR Broadband Group 1 has been currently switched over. Valid Protected slots for NDR Broadband Group1 are 8 through 10. If a zero value is returned, no device card is currently protected.')
x_ndr_narrowband_protected = mib_table_column((1, 3, 6, 1, 4, 1, 644, 2, 4, 1, 11, 3, 1, 8), integer32().subtype(subtypeSpec=constraints_union(value_range_constraint(0, 0), value_range_constraint(2, 11)))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
xNdrNarrowbandProtected.setStatus('current')
if mibBuilder.loadTexts:
xNdrNarrowbandProtected.setDescription('This is a slot number that indicates which device card from the active NDR Narrowband Group has been currently switched over. Valid Protected slots for NDR Narrowband Group are 2 through 11. If a zero value is returned, no device card is currently protected.')
x_ndr_broadband_group1_type = mib_table_column((1, 3, 6, 1, 4, 1, 644, 2, 4, 1, 11, 3, 1, 9), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(8, 18, 21, 31))).clone(namedValues=named_values(('ds3', 8), ('sts1', 18), ('hds3', 21), ('e3', 31)))).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
xNdrBroadbandGroup1Type.setStatus('current')
if mibBuilder.loadTexts:
xNdrBroadbandGroup1Type.setDescription('This indicates which type of device is currently occupying the status of active NDR Broadband Group 1. Only one type of broadband device can be supported by N+1 Redundancy at one time. Whichever type is selected as the active Broadband Group 1 type should match the device type of the card in Slot 11, which is the designated Broadband Group 1 NDR Redundant slot.')
x_ndr_narrowband_type = mib_table_column((1, 3, 6, 1, 4, 1, 644, 2, 4, 1, 11, 3, 1, 10), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(13, 22))).clone(namedValues=named_values(('octalT1E1', 13), ('gr303', 22)))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
xNdrNarrowbandType.setStatus('current')
if mibBuilder.loadTexts:
xNdrNarrowbandType.setDescription('This indicates which type of device is currently occupying the status of active NDR Narrowband Group. Only one type of Narrowband device can be supported by N+1 Redundancy at one time. Whichever type is selected as the active Narrowband type should match the device type of the card in Slot 1, which is the designated Narrowband NDR Redundant slot.')
x_ndr_dual_broadband_enabled = mib_table_column((1, 3, 6, 1, 4, 1, 644, 2, 4, 1, 11, 3, 1, 11), decision_type()).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
xNdrDualBroadbandEnabled.setStatus('current')
if mibBuilder.loadTexts:
xNdrDualBroadbandEnabled.setDescription("Indicates the system's capability of supporting the N+1 Device Redundancy Dual Broadband Group functionality. The user should configure this variable based on the existence of the Upgraded PSX Hardware. no (0) PSX Dual Broadband Groups disabled or not supported. yes (1) PSX Dual Broadband Groups enabled.")
x_ndr_broadband_group2 = mib_table_column((1, 3, 6, 1, 4, 1, 644, 2, 4, 1, 11, 3, 1, 12), integer32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
xNdrBroadbandGroup2.setStatus('current')
if mibBuilder.loadTexts:
xNdrBroadbandGroup2.setDescription('This is a 2 byte bit field reflecting the slots that are part of the current active NDR Broadband Group 2. The first 11 bits represent each of the slot numbers. If any of the bits are set, those slots are currently part of the Group 2 N+1 Redundancy Group.')
x_ndr_broadband_group2_protected = mib_table_column((1, 3, 6, 1, 4, 1, 644, 2, 4, 1, 11, 3, 1, 13), integer32().subtype(subtypeSpec=value_range_constraint(0, 6))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
xNdrBroadbandGroup2Protected.setStatus('current')
if mibBuilder.loadTexts:
xNdrBroadbandGroup2Protected.setDescription('This is a slot number that indicates which device card from the active NDR Broadband Group 2 has been currently switched over. Valid Protected slots for NDR Broadband Group2 are 1 through 6. If a zero value is returned, no device card is currently protected.')
x_ndr_broadband_group2_type = mib_table_column((1, 3, 6, 1, 4, 1, 644, 2, 4, 1, 11, 3, 1, 14), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(8, 18, 21, 31))).clone(namedValues=named_values(('ds3', 8), ('sts1', 18), ('hds3', 21), ('e3', 31)))).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
xNdrBroadbandGroup2Type.setStatus('current')
if mibBuilder.loadTexts:
xNdrBroadbandGroup2Type.setDescription('This indicates which type of device is currently occupying the status of active NDR Broadband Group 2. Only one type of broadband device can be supported by N+1 Redundancy at one time. Whichever type is selected as the active Broadband Group 2 type should match the device type of the card in Slot 7, which is the designated Broadband Group 2 NDR Redundant slot.')
x_ndr_psx_chassis_type = mib_table_column((1, 3, 6, 1, 4, 1, 644, 2, 4, 1, 11, 3, 1, 15), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(0, 1))).clone(namedValues=named_values(('psx5200', 0), ('psx5300', 1)))).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
xNdrPsxChassisType.setStatus('current')
if mibBuilder.loadTexts:
xNdrPsxChassisType.setDescription('This indicates which type of Protection Switch Chassis Hardware has been detected. In order to run with Dual Broadband Group configuration, this value should be set to psx5300.')
x_ndr_cmd_status = mib_table_column((1, 3, 6, 1, 4, 1, 644, 2, 4, 1, 11, 3, 1, 16), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(0, 1, 101, 200, 201, 202, 203, 204, 205, 206, 450, 500, 501, 502))).clone(namedValues=named_values(('ready-for-command', 0), ('update-ndr', 1), ('update-successful', 101), ('err-general-ndr-config-error', 200), ('err-invalid-ndr-group-type', 201), ('err-invalid-ndr-command', 202), ('err-invalid-ndr-autoswitch', 203), ('err-invalid-ndr-chassis', 204), ('err-invalid-ndr-dual-bb', 205), ('err-invalid-ndr-dual-psx', 206), ('err-data-locked-by-another-user', 450), ('err-snmp-parse-failed', 500), ('err-invalid-snmp-type', 501), ('err-invalid-snmp-var-size', 502)))).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
xNdrCmdStatus.setStatus('current')
if mibBuilder.loadTexts:
xNdrCmdStatus.setDescription('The command status for this ndr configuration row/record. The value used in a SET will be replaced by a response value in the GET RESPONSE indicating success or failure. Default Response State used in GET RESPONSE Command ready-for-command (0) initial default status for a row NDR Device Commands used in SET Command (1..99) update-ndr (1) change an aspect of current nest N+1 Redundancy Response States used in GET RESPONSE Command (100..199) update-successful (101) ndr data has been successfully changed NDR Config Error Codes used in GET RESPONSE Command (200..799) err-general-ndr-config-error (200) Unknown ndr configuration error occurred. err-invalid-ndr-group-type (201) Configured NDR Group type not in valid range err-invalid-ndr-command (202) Unrecognized NDR command-action err-invalid-ndr-autoswitch (203) NDR Auto Switchover value not in valid range err-invalid-ndr-chassis (204) NDR Chassis Type value not in valid range err-invalid-ndr-dual-bb (205) NDR Dual Broadband Group value not in valid err-invalid-ndr-dual-psx (206) NDR Dual PSX Power Supply value not in valid err-data-locked-by-another-user (450) Another administrative user is making changes to this part of the system via a terminal session. Check Event Log for user name err-snmp-parse-failed (500) Agent could not parse variable err-invalid-snmp-type (501) Variable ASN type does not match Agent defined type err-invalid-snmp-var-size (502) Variable size is too big')
x_ndr_dual_power_supply = mib_table_column((1, 3, 6, 1, 4, 1, 644, 2, 4, 1, 11, 3, 1, 17), decision_type()).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
xNdrDualPowerSupply.setStatus('current')
if mibBuilder.loadTexts:
xNdrDualPowerSupply.setDescription("The number of N+1 Protection Switch Power Supplies configured for the Nest. If running with only a single PSX Power Supply, this should be set to 'no' in order to suppress unecessary alarms. no (0) Only 1 Power Supply resides in the PSX. yes (1) Both Power Supplies reside in the PSX.")
db_syncronize = mib_identifier((1, 3, 6, 1, 4, 1, 644, 2, 4, 1, 12, 1, 2))
db_auto_sync_mode = mib_scalar((1, 3, 6, 1, 4, 1, 644, 2, 4, 1, 12, 1, 2, 1), decision_type()).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
dbAutoSyncMode.setStatus('current')
if mibBuilder.loadTexts:
dbAutoSyncMode.setDescription('Enables or disables the Automatic Database Synchronization.')
db_sync_status = mib_scalar((1, 3, 6, 1, 4, 1, 644, 2, 4, 1, 12, 1, 2, 2), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3, 4, 5))).clone(namedValues=named_values(('inSync', 1), ('notInSync', 2), ('syncInProgress', 3), ('autoSyncOff', 4), ('standByNotPresent', 5)))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
dbSyncStatus.setStatus('current')
if mibBuilder.loadTexts:
dbSyncStatus.setDescription('The current status of the System DB Synchronization.')
db_sync_progress_time = mib_scalar((1, 3, 6, 1, 4, 1, 644, 2, 4, 1, 12, 1, 2, 3), unsigned32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
dbSyncProgressTime.setStatus('current')
if mibBuilder.loadTexts:
dbSyncProgressTime.setDescription('The number of seconds elapsed since the DB Synchronization has been started.')
db_sync_cmd_status = mib_scalar((1, 3, 6, 1, 4, 1, 644, 2, 4, 1, 12, 1, 2, 4), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(0, 1, 2, 101, 102, 120, 200, 201, 202, 203, 204, 450, 500, 501, 502))).clone(namedValues=named_values(('ready-for-command', 0), ('update', 1), ('startDBSync', 2), ('update-successful', 101), ('sync-start-successful', 102), ('sync-completed-successful', 120), ('err-gen-dbsync-cfg-error', 200), ('err-standby-not-present', 201), ('err-dbsync-failed', 202), ('err-invalid-dbsync-command', 203), ('err-invalid-dbsync-mode', 204), ('err-data-locked-by-another-user', 450), ('err-snmp-parse-failed', 500), ('err-invalid-snmp-type', 501), ('err-invalid-snmp-var-size', 502)))).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
dbSyncCmdStatus.setStatus('current')
if mibBuilder.loadTexts:
dbSyncCmdStatus.setDescription('The command status for this DB Synchronization. The value used in a SET will be replaced by a response value in the GET RESPONSE indicating success or failure. Default Response State used in GET RESPONSE Command ready-for-command (0) initial default status for a row DB Sync Commands used in SET Command (1..99) update (1) Change the auto sync mode startDBSync (2) Starts the DB synchronization process Response States used in GET RESPONSE Command (100..199) update-successful (101) Auto Sync data has been successfully changed sync-start-successful (102) DB Sync process has been successfully started sync-completed-successful (120) DB Sync process has been successfully finished DB Sync Error Codes used in GET RESPONSE Command (200..799) err-gen-dbsync-cfg-error (200) Unknown DB Sync configuration error occurred. err-standby-not-present (201) DB Synchronization cannot be started without standby systemManager Device. err-dbsync-failed (202) DB Synchronization process has failed err-invalid-dbsync-command (203, Unrecognized DB Sync command action err-invalid-dbsync-mode (204) Unrecognized auto sync setting err-data-locked-by-another-user (450) Another administrative user is making changes to this part of the system via a terminal session. Check Event Log for user name err-snmp-parse-failed (500) Agent could not parse variable err-invalid-snmp-type (501) Variable ASN type does not match Agent defined type err-invalid-snmp-var-size (502) Variable size is too big')
device_about_table = mib_table((1, 3, 6, 1, 4, 1, 644, 2, 4, 2, 225))
if mibBuilder.loadTexts:
deviceAboutTable.setStatus('current')
if mibBuilder.loadTexts:
deviceAboutTable.setDescription('This is the Device About Information table which consists of an entry for each of the Actual device cards in this node with the module, board, revision and software release information. The maximum number of entries depends on the number of nests times the number of slots in each nest.')
device_about_entry = mib_table_row((1, 3, 6, 1, 4, 1, 644, 2, 4, 2, 225, 1)).setIndexNames((0, 'ERI-DNX-NEST-SYS-MIB', 'devCardAddress'))
if mibBuilder.loadTexts:
deviceAboutEntry.setStatus('current')
if mibBuilder.loadTexts:
deviceAboutEntry.setDescription('The conceptual row of the Device About Information table. A row in this table cannot be added or deleted, only modified.')
dev_card_address = mib_table_column((1, 3, 6, 1, 4, 1, 644, 2, 4, 2, 225, 1, 1), nest_slot_address()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
devCardAddress.setStatus('current')
if mibBuilder.loadTexts:
devCardAddress.setDescription("This number uniquely identifies an Device's Nest-Slot Address. This number will be used throughout the system to identify a unique slot. The format is represented using an IP address syntax (4 byte string). The 1st byte represents the Nest Number (0..7) The 2nd byte represents the Slot Number (1..11) The 3rd byte unused The 4th byte unused")
dev_sw_release_date = mib_table_column((1, 3, 6, 1, 4, 1, 644, 2, 4, 2, 225, 1, 2), display_string()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
devSwReleaseDate.setStatus('current')
if mibBuilder.loadTexts:
devSwReleaseDate.setDescription('The release date of the software resident on the device card.')
dev_sw_checksum = mib_table_column((1, 3, 6, 1, 4, 1, 644, 2, 4, 2, 225, 1, 3), display_string()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
devSwChecksum.setStatus('current')
if mibBuilder.loadTexts:
devSwChecksum.setDescription('The checksum of the software resident on the device card.')
dev_front_card_type = mib_table_column((1, 3, 6, 1, 4, 1, 644, 2, 4, 2, 225, 1, 4), display_string()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
devFrontCardType.setStatus('current')
if mibBuilder.loadTexts:
devFrontCardType.setDescription('The Hardware type of Front card for the device.')
dev_front_card_rev = mib_table_column((1, 3, 6, 1, 4, 1, 644, 2, 4, 2, 225, 1, 5), integer32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
devFrontCardRev.setStatus('current')
if mibBuilder.loadTexts:
devFrontCardRev.setDescription('The Hardware revision number of the Front card.')
dev_xilinx_version = mib_table_column((1, 3, 6, 1, 4, 1, 644, 2, 4, 2, 225, 1, 6), display_string()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
devXilinxVersion.setStatus('current')
if mibBuilder.loadTexts:
devXilinxVersion.setDescription('The version of Xilinx Hardware on the device card.')
dev_rear_card_type = mib_table_column((1, 3, 6, 1, 4, 1, 644, 2, 4, 2, 225, 1, 7), display_string()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
devRearCardType.setStatus('current')
if mibBuilder.loadTexts:
devRearCardType.setDescription('The Hardware type of Rear card reported by the device.')
dev_rear_card_rev = mib_table_column((1, 3, 6, 1, 4, 1, 644, 2, 4, 2, 225, 1, 8), integer32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
devRearCardRev.setStatus('current')
if mibBuilder.loadTexts:
devRearCardRev.setDescription('The Hardware revision number of the Rear card.')
dev_sw_version = mib_table_column((1, 3, 6, 1, 4, 1, 644, 2, 4, 2, 225, 1, 9), display_string().subtype(subtypeSpec=value_size_constraint(0, 12))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
devSwVersion.setStatus('current')
if mibBuilder.loadTexts:
devSwVersion.setDescription('The software version release identification number for this device. ')
slot_config_trap = notification_type((1, 3, 6, 1, 4, 1, 644, 2, 4, 0, 5)).setObjects(('ERI-DNX-SMC-MIB', 'trapSequence'), ('ERI-DNX-NEST-SYS-MIB', 'slotNbr'), ('ERI-DNX-NEST-SYS-MIB', 'slotConfigCmdStatus'), ('ERI-DNX-NEST-SYS-MIB', 'xNestIndex'))
if mibBuilder.loadTexts:
slotConfigTrap.setStatus('current')
if mibBuilder.loadTexts:
slotConfigTrap.setDescription('This trap is used to notify a NMS that a user has updated the configuration for a given slot entry.')
ndr_group_status_trap = notification_type((1, 3, 6, 1, 4, 1, 644, 2, 4, 0, 8)).setObjects(('ERI-DNX-SMC-MIB', 'trapSequence'), ('ERI-DNX-NEST-SYS-MIB', 'ndrState'), ('ERI-DNX-NEST-SYS-MIB', 'ndrBroadbandGroup1'), ('ERI-DNX-NEST-SYS-MIB', 'ndrNarrowbandGroup'), ('ERI-DNX-NEST-SYS-MIB', 'ndrBroadbandGroup2'), ('ERI-DNX-NEST-SYS-MIB', 'xNdrNestIndex'))
if mibBuilder.loadTexts:
ndrGroupStatusTrap.setStatus('current')
if mibBuilder.loadTexts:
ndrGroupStatusTrap.setDescription('This trap is used to notify a NMS that due to an alarm condition or system state change, the N+1 Redundancy Groups have been modified. This means the one or more devices have been removed or added to the actual N+1 Redundancy Groups and this will affect which cards will be protected (switched) in the event of a failure.')
nest_config_trap = notification_type((1, 3, 6, 1, 4, 1, 644, 2, 4, 0, 9)).setObjects(('ERI-DNX-SMC-MIB', 'trapSequence'), ('ERI-DNX-NEST-SYS-MIB', 'xNestIndex'), ('ERI-DNX-NEST-SYS-MIB', 'xNestType'), ('ERI-DNX-NEST-SYS-MIB', 'xNestCmdStatus'), ('ERI-DNX-NEST-SYS-MIB', 'xNestUnitName'))
if mibBuilder.loadTexts:
nestConfigTrap.setStatus('current')
if mibBuilder.loadTexts:
nestConfigTrap.setDescription('This trap is used to notify a NMS that a user has updated the configuration for a given nest entry.')
db_sync_progress_trap = notification_type((1, 3, 6, 1, 4, 1, 644, 2, 4, 0, 12)).setObjects(('ERI-DNX-SMC-MIB', 'trapSequence'), ('ERI-DNX-NEST-SYS-MIB', 'dbSyncStatus'), ('ERI-DNX-NEST-SYS-MIB', 'dbSyncCmdStatus'))
if mibBuilder.loadTexts:
dbSyncProgressTrap.setStatus('current')
if mibBuilder.loadTexts:
dbSyncProgressTrap.setDescription('This trap is used to notify a NMS that the system has either started or just completed the Database synchronization process.')
mibBuilder.exportSymbols('ERI-DNX-NEST-SYS-MIB', xNdrAutoSwitchover=xNdrAutoSwitchover, xNdrAutoRestore=xNdrAutoRestore, xNestCfgTable=xNestCfgTable, programFileName=programFileName, xNdrEntry=xNdrEntry, slotMiscState=slotMiscState, devDownloadEntry=devDownloadEntry, ndrPsxChassisType=ndrPsxChassisType, xNdrBroadbandGroup2Type=xNdrBroadbandGroup2Type, devSwChecksum=devSwChecksum, xNdrBroadbandGroup1=xNdrBroadbandGroup1, ndrNarrowbandProtected=ndrNarrowbandProtected, xSlotMiscState=xSlotMiscState, programFileSize=programFileSize, xNdrNarrowbandType=xNdrNarrowbandType, deviceAboutTable=deviceAboutTable, xNestDeviceCards=xNestDeviceCards, slotConfigDeviceType=slotConfigDeviceType, xSlotCmdStatus=xSlotCmdStatus, xSlotDeviceState=xSlotDeviceState, slotDeviceVersion=slotDeviceVersion, programFileCommand=programFileCommand, devFrontCardType=devFrontCardType, xNestState=xNestState, DnxSlotDeviceState=DnxSlotDeviceState, softwareRelease=softwareRelease, xNestType=xNestType, programSlotNumber=programSlotNumber, dbSyncronize=dbSyncronize, nestConfigTrap=nestConfigTrap, ndrGroupStatusTrap=ndrGroupStatusTrap, xSlotDeviceName=xSlotDeviceName, dbAutoSyncMode=dbAutoSyncMode, PYSNMP_MODULE_ID=eriDNXNestSysMIB, slotDeviceRedundancy=slotDeviceRedundancy, xNdrNestIndex=xNdrNestIndex, ndrBroadbandGroup2=ndrBroadbandGroup2, programNestNumber=programNestNumber, eXpansionNestAdmin=eXpansionNestAdmin, xSlotActualDeviceType=xSlotActualDeviceType, slotConfigCmdStatus=slotConfigCmdStatus, slotAlarmLevel=slotAlarmLevel, xNdrBroadbandGroup2=xNdrBroadbandGroup2, ndrAutoRestore=ndrAutoRestore, xNestCfgEntry=xNestCfgEntry, devSwVersion=devSwVersion, xSlotNestAddr=xSlotNestAddr, xNestCmdStatus=xNestCmdStatus, xNdrBroadbandGroup1Type=xNdrBroadbandGroup1Type, redundancy=redundancy, xNdrDualBroadbandEnabled=xNdrDualBroadbandEnabled, ndrBroadbandGroup2Type=ndrBroadbandGroup2Type, xNestAlarmContacts=xNestAlarmContacts, dbSyncCmdStatus=dbSyncCmdStatus, xNestAlarmStatus=xNestAlarmStatus, xNdrState=xNdrState, xNestDualSMCs=xNestDualSMCs, slotDeviceName=slotDeviceName, xSlotAlarmLevel=xSlotAlarmLevel, devFrontCardRev=devFrontCardRev, programLoadStatus=programLoadStatus, xNdrNarrowbandGroup=xNdrNarrowbandGroup, ndrDualBroadbandEnabled=ndrDualBroadbandEnabled, numberSlots=numberSlots, xNdrDualPowerSupply=xNdrDualPowerSupply, xNestDualXccXlc=xNestDualXccXlc, dbSyncProgressTrap=dbSyncProgressTrap, slotConfigEntry=slotConfigEntry, ndrNarrowbandGroup=ndrNarrowbandGroup, slotActualDeviceType=slotActualDeviceType, xNdrCmdStatus=xNdrCmdStatus, dbSyncStatus=dbSyncStatus, ndrBroadbandGroup1Type=ndrBroadbandGroup1Type, xNestIndex=xNestIndex, slotNbr=slotNbr, ndrBroadbandGroup2Protected=ndrBroadbandGroup2Protected, xSlotDeviceRedundancy=xSlotDeviceRedundancy, programFileIndex=programFileIndex, programBytesSent=programBytesSent, upgradeSw=upgradeSw, xSlotEntry=xSlotEntry, xSlotRawDeviceState=xSlotRawDeviceState, xNdrNarrowbandProtected=xNdrNarrowbandProtected, ndrAutoSwitchover=ndrAutoSwitchover, programLoadInitiator=programLoadInitiator, xNdrTable=xNdrTable, slotConfigTrap=slotConfigTrap, xSlotDeviceType=xSlotDeviceType, slotDeviceState=slotDeviceState, xNdrPsxChassisType=xNdrPsxChassisType, xNestDualPower=xNestDualPower, ndrBroadbandGroup1Protected=ndrBroadbandGroup1Protected, xNdrBroadbandGroup2Protected=xNdrBroadbandGroup2Protected, ndrEnabled=ndrEnabled, devRearCardType=devRearCardType, devXilinxVersion=devXilinxVersion, devDownloadTable=devDownloadTable, devRearCardRev=devRearCardRev, devSwReleaseDate=devSwReleaseDate, DnxSlotDeviceType=DnxSlotDeviceType, slotConfigTable=slotConfigTable, ndrBroadbandGroup1=ndrBroadbandGroup1, xNestUnitName=xNestUnitName, xNestNDRCapable=xNestNDRCapable, xSlotTable=xSlotTable, dbSyncProgressTime=dbSyncProgressTime, devCardAddress=devCardAddress, ndrNarrowbandType=ndrNarrowbandType, xSlotDeviceVersion=xSlotDeviceVersion, deviceAboutEntry=deviceAboutEntry, ndrState=ndrState, eriDNXNestSysMIB=eriDNXNestSysMIB, xNdrBroadbandGroup1Protected=xNdrBroadbandGroup1Protected) |
# TODO: add all classes and use in _mac.py and _windows.py
class Apps:
def keys(self):
raise NotImplementedError()
def add(self, spec=None, add_book=None, xl=None, visible=None):
raise NotImplementedError()
def __iter__(self):
raise NotImplementedError()
def __len__(self):
raise NotImplementedError()
def __getitem__(self, pid):
raise NotImplementedError()
class App:
@property
def xl(self):
raise NotImplementedError()
@xl.setter
def xl(self, value):
raise NotImplementedError()
@property
def api(self):
raise NotImplementedError()
@property
def selection(self):
raise NotImplementedError()
def activate(self, steal_focus=False):
raise NotImplementedError()
@property
def visible(self):
raise NotImplementedError()
@visible.setter
def visible(self, visible):
raise NotImplementedError()
def quit(self):
raise NotImplementedError()
def kill(self):
raise NotImplementedError()
@property
def screen_updating(self):
raise NotImplementedError()
@screen_updating.setter
def screen_updating(self, value):
raise NotImplementedError()
@property
def display_alerts(self):
raise NotImplementedError()
@display_alerts.setter
def display_alerts(self, value):
raise NotImplementedError()
@property
def enable_events(self):
raise NotImplementedError()
@enable_events.setter
def enable_events(self, value):
raise NotImplementedError()
@property
def interactive(self):
raise NotImplementedError()
@interactive.setter
def interactive(self, value):
raise NotImplementedError()
@property
def startup_path(self):
raise NotImplementedError()
@property
def calculation(self):
raise NotImplementedError()
@calculation.setter
def calculation(self, value):
raise NotImplementedError()
def calculate(self):
raise NotImplementedError()
@property
def version(self):
raise NotImplementedError()
@property
def books(self):
raise NotImplementedError()
@property
def hwnd(self):
raise NotImplementedError()
@property
def pid(self):
raise NotImplementedError()
def range(self, arg1, arg2=None):
raise NotImplementedError()
def run(self, macro, args):
raise NotImplementedError()
@property
def status_bar(self):
raise NotImplementedError()
@status_bar.setter
def status_bar(self, value):
raise NotImplementedError()
@property
def cut_copy_mode(self):
raise NotImplementedError()
@cut_copy_mode.setter
def cut_copy_mode(self, value):
raise NotImplementedError()
class Books:
@property
def api(self):
raise NotImplementedError()
@property
def active(self):
raise NotImplementedError()
def __call__(self, name_or_index):
raise NotImplementedError()
def __len__(self):
raise NotImplementedError()
def add(self):
raise NotImplementedError()
def open(
self,
fullname,
update_links=None,
read_only=None,
format=None,
password=None,
write_res_password=None,
ignore_read_only_recommended=None,
origin=None,
delimiter=None,
editable=None,
notify=None,
converter=None,
add_to_mru=None,
local=None,
corrupt_load=None,
):
raise NotImplementedError()
def __iter__(self):
raise NotImplementedError()
class Book:
@property
def api(self):
raise NotImplementedError()
def json(self):
raise NotImplementedError()
@property
def name(self):
raise NotImplementedError()
@property
def sheets(self):
raise NotImplementedError()
@property
def app(self):
raise NotImplementedError()
def close(self):
raise NotImplementedError()
def save(self, path=None, password=None):
raise NotImplementedError()
@property
def fullname(self):
raise NotImplementedError()
@property
def names(self):
raise NotImplementedError()
def activate(self):
raise NotImplementedError()
def to_pdf(self, path, quality):
raise NotImplementedError()
class Sheets:
@property
def api(self):
raise NotImplementedError()
@property
def active(self):
raise NotImplementedError()
def __call__(self, name_or_index):
raise NotImplementedError()
def __len__(self):
raise NotImplementedError()
def __iter__(self):
raise NotImplementedError()
def add(self, before=None, after=None):
raise NotImplementedError()
class Sheet:
@property
def api(self):
raise NotImplementedError()
@property
def name(self):
raise NotImplementedError()
@name.setter
def name(self, value):
raise NotImplementedError()
@property
def names(self):
raise NotImplementedError()
@property
def book(self):
raise NotImplementedError()
@property
def index(self):
raise NotImplementedError()
def range(self, arg1, arg2=None):
raise NotImplementedError()
@property
def cells(self):
raise NotImplementedError()
def activate(self):
raise NotImplementedError()
def select(self):
raise NotImplementedError()
def clear_contents(self):
raise NotImplementedError()
def clear_formats(self):
raise NotImplementedError()
def clear(self):
raise NotImplementedError()
def autofit(self, axis=None):
raise NotImplementedError()
def delete(self):
raise NotImplementedError()
def copy(self, before, after):
raise NotImplementedError()
@property
def charts(self):
raise NotImplementedError()
@property
def shapes(self):
raise NotImplementedError()
@property
def tables(self):
raise NotImplementedError()
@property
def pictures(self):
raise NotImplementedError()
@property
def used_range(self):
raise NotImplementedError()
@property
def visible(self):
raise NotImplementedError()
@visible.setter
def visible(self, value):
raise NotImplementedError()
@property
def page_setup(self):
raise NotImplementedError()
def to_pdf(self, path, quality):
raise NotImplementedError()
class Range:
@property
def coords(self):
raise NotImplementedError()
@property
def api(self):
raise NotImplementedError()
def __len__(self):
raise NotImplementedError()
@property
def row(self):
raise NotImplementedError()
@property
def column(self):
raise NotImplementedError()
@property
def shape(self):
raise NotImplementedError()
@property
def raw_value(self):
raise NotImplementedError()
@raw_value.setter
def raw_value(self, value):
raise NotImplementedError()
def clear_contents(self):
raise NotImplementedError()
def clear_formats(self):
raise NotImplementedError()
def clear(self):
raise NotImplementedError()
def end(self, direction):
raise NotImplementedError()
@property
def formula(self):
raise NotImplementedError()
@formula.setter
def formula(self, value):
raise NotImplementedError()
@property
def formula2(self):
raise NotImplementedError()
@formula2.setter
def formula2(self, value):
raise NotImplementedError()
@property
def formula_array(self):
raise NotImplementedError()
@formula_array.setter
def formula_array(self, value):
raise NotImplementedError()
@property
def font(self):
raise NotImplementedError()
@property
def column_width(self):
raise NotImplementedError()
@column_width.setter
def column_width(self, value):
raise NotImplementedError()
@property
def row_height(self):
raise NotImplementedError()
@row_height.setter
def row_height(self, value):
raise NotImplementedError()
@property
def width(self):
raise NotImplementedError()
@property
def height(self):
raise NotImplementedError()
@property
def left(self):
raise NotImplementedError()
@property
def top(self):
raise NotImplementedError()
@property
def has_array(self):
raise NotImplementedError()
@property
def number_format(self):
raise NotImplementedError()
@number_format.setter
def number_format(self, value):
raise NotImplementedError()
def get_address(self, row_absolute, col_absolute, external):
raise NotImplementedError()
@property
def address(self):
raise NotImplementedError()
@property
def current_region(self):
raise NotImplementedError()
def autofit(self, axis=None):
raise NotImplementedError()
def insert(self, shift=None, copy_origin=None):
raise NotImplementedError()
def delete(self, shift=None):
raise NotImplementedError()
def copy(self, destination=None):
raise NotImplementedError()
def paste(self, paste=None, operation=None, skip_blanks=False, transpose=False):
raise NotImplementedError()
@property
def hyperlink(self):
raise NotImplementedError()
def add_hyperlink(self, address, text_to_display=None, screen_tip=None):
raise NotImplementedError()
@property
def color(self):
raise NotImplementedError()
@color.setter
def color(self, color_or_rgb):
raise NotImplementedError()
@property
def name(self):
raise NotImplementedError()
@name.setter
def name(self, value):
raise NotImplementedError()
def __call__(self, arg1, arg2=None):
raise NotImplementedError()
@property
def rows(self):
raise NotImplementedError()
@property
def columns(self):
raise NotImplementedError()
def select(self):
raise NotImplementedError()
@property
def merge_area(self):
raise NotImplementedError()
@property
def merge_cells(self):
raise NotImplementedError()
def merge(self, across):
raise NotImplementedError()
def unmerge(self):
raise NotImplementedError()
@property
def table(self):
raise NotImplementedError()
@property
def characters(self):
raise NotImplementedError()
@property
def wrap_text(self):
raise NotImplementedError()
@wrap_text.setter
def wrap_text(self, value):
raise NotImplementedError()
@property
def note(self):
raise NotImplementedError()
def copy_picture(self, appearance, format):
raise NotImplementedError()
def to_png(self, path):
raise NotImplementedError()
def to_pdf(self, path, quality):
raise NotImplementedError()
class Picture:
@property
def api(self):
raise NotImplementedError()
@property
def name(self):
raise NotImplementedError()
@name.setter
def name(self, value):
raise NotImplementedError()
@property
def parent(self):
raise NotImplementedError()
@property
def left(self):
raise NotImplementedError()
@left.setter
def left(self, value):
raise NotImplementedError()
@property
def top(self):
raise NotImplementedError()
@top.setter
def top(self, value):
raise NotImplementedError()
@property
def width(self):
raise NotImplementedError()
@width.setter
def width(self, value):
raise NotImplementedError()
@property
def height(self):
raise NotImplementedError()
@height.setter
def height(self, value):
raise NotImplementedError()
def delete(self):
raise NotImplementedError()
@property
def lock_aspect_ratio(self):
raise NotImplementedError()
@lock_aspect_ratio.setter
def lock_aspect_ratio(self, value):
raise NotImplementedError()
def index(self):
raise NotImplementedError()
class Collection:
@property
def api(self):
raise NotImplementedError()
@property
def parent(self):
raise NotImplementedError()
def __call__(self, key):
raise NotImplementedError()
def __len__(self):
raise NotImplementedError()
def __iter__(self):
raise NotImplementedError()
def __contains__(self, key):
raise NotImplementedError()
class Pictures:
def add(self, filename, link_to_file, save_with_document, left, top, width, height):
raise NotImplementedError()
| class Apps:
def keys(self):
raise not_implemented_error()
def add(self, spec=None, add_book=None, xl=None, visible=None):
raise not_implemented_error()
def __iter__(self):
raise not_implemented_error()
def __len__(self):
raise not_implemented_error()
def __getitem__(self, pid):
raise not_implemented_error()
class App:
@property
def xl(self):
raise not_implemented_error()
@xl.setter
def xl(self, value):
raise not_implemented_error()
@property
def api(self):
raise not_implemented_error()
@property
def selection(self):
raise not_implemented_error()
def activate(self, steal_focus=False):
raise not_implemented_error()
@property
def visible(self):
raise not_implemented_error()
@visible.setter
def visible(self, visible):
raise not_implemented_error()
def quit(self):
raise not_implemented_error()
def kill(self):
raise not_implemented_error()
@property
def screen_updating(self):
raise not_implemented_error()
@screen_updating.setter
def screen_updating(self, value):
raise not_implemented_error()
@property
def display_alerts(self):
raise not_implemented_error()
@display_alerts.setter
def display_alerts(self, value):
raise not_implemented_error()
@property
def enable_events(self):
raise not_implemented_error()
@enable_events.setter
def enable_events(self, value):
raise not_implemented_error()
@property
def interactive(self):
raise not_implemented_error()
@interactive.setter
def interactive(self, value):
raise not_implemented_error()
@property
def startup_path(self):
raise not_implemented_error()
@property
def calculation(self):
raise not_implemented_error()
@calculation.setter
def calculation(self, value):
raise not_implemented_error()
def calculate(self):
raise not_implemented_error()
@property
def version(self):
raise not_implemented_error()
@property
def books(self):
raise not_implemented_error()
@property
def hwnd(self):
raise not_implemented_error()
@property
def pid(self):
raise not_implemented_error()
def range(self, arg1, arg2=None):
raise not_implemented_error()
def run(self, macro, args):
raise not_implemented_error()
@property
def status_bar(self):
raise not_implemented_error()
@status_bar.setter
def status_bar(self, value):
raise not_implemented_error()
@property
def cut_copy_mode(self):
raise not_implemented_error()
@cut_copy_mode.setter
def cut_copy_mode(self, value):
raise not_implemented_error()
class Books:
@property
def api(self):
raise not_implemented_error()
@property
def active(self):
raise not_implemented_error()
def __call__(self, name_or_index):
raise not_implemented_error()
def __len__(self):
raise not_implemented_error()
def add(self):
raise not_implemented_error()
def open(self, fullname, update_links=None, read_only=None, format=None, password=None, write_res_password=None, ignore_read_only_recommended=None, origin=None, delimiter=None, editable=None, notify=None, converter=None, add_to_mru=None, local=None, corrupt_load=None):
raise not_implemented_error()
def __iter__(self):
raise not_implemented_error()
class Book:
@property
def api(self):
raise not_implemented_error()
def json(self):
raise not_implemented_error()
@property
def name(self):
raise not_implemented_error()
@property
def sheets(self):
raise not_implemented_error()
@property
def app(self):
raise not_implemented_error()
def close(self):
raise not_implemented_error()
def save(self, path=None, password=None):
raise not_implemented_error()
@property
def fullname(self):
raise not_implemented_error()
@property
def names(self):
raise not_implemented_error()
def activate(self):
raise not_implemented_error()
def to_pdf(self, path, quality):
raise not_implemented_error()
class Sheets:
@property
def api(self):
raise not_implemented_error()
@property
def active(self):
raise not_implemented_error()
def __call__(self, name_or_index):
raise not_implemented_error()
def __len__(self):
raise not_implemented_error()
def __iter__(self):
raise not_implemented_error()
def add(self, before=None, after=None):
raise not_implemented_error()
class Sheet:
@property
def api(self):
raise not_implemented_error()
@property
def name(self):
raise not_implemented_error()
@name.setter
def name(self, value):
raise not_implemented_error()
@property
def names(self):
raise not_implemented_error()
@property
def book(self):
raise not_implemented_error()
@property
def index(self):
raise not_implemented_error()
def range(self, arg1, arg2=None):
raise not_implemented_error()
@property
def cells(self):
raise not_implemented_error()
def activate(self):
raise not_implemented_error()
def select(self):
raise not_implemented_error()
def clear_contents(self):
raise not_implemented_error()
def clear_formats(self):
raise not_implemented_error()
def clear(self):
raise not_implemented_error()
def autofit(self, axis=None):
raise not_implemented_error()
def delete(self):
raise not_implemented_error()
def copy(self, before, after):
raise not_implemented_error()
@property
def charts(self):
raise not_implemented_error()
@property
def shapes(self):
raise not_implemented_error()
@property
def tables(self):
raise not_implemented_error()
@property
def pictures(self):
raise not_implemented_error()
@property
def used_range(self):
raise not_implemented_error()
@property
def visible(self):
raise not_implemented_error()
@visible.setter
def visible(self, value):
raise not_implemented_error()
@property
def page_setup(self):
raise not_implemented_error()
def to_pdf(self, path, quality):
raise not_implemented_error()
class Range:
@property
def coords(self):
raise not_implemented_error()
@property
def api(self):
raise not_implemented_error()
def __len__(self):
raise not_implemented_error()
@property
def row(self):
raise not_implemented_error()
@property
def column(self):
raise not_implemented_error()
@property
def shape(self):
raise not_implemented_error()
@property
def raw_value(self):
raise not_implemented_error()
@raw_value.setter
def raw_value(self, value):
raise not_implemented_error()
def clear_contents(self):
raise not_implemented_error()
def clear_formats(self):
raise not_implemented_error()
def clear(self):
raise not_implemented_error()
def end(self, direction):
raise not_implemented_error()
@property
def formula(self):
raise not_implemented_error()
@formula.setter
def formula(self, value):
raise not_implemented_error()
@property
def formula2(self):
raise not_implemented_error()
@formula2.setter
def formula2(self, value):
raise not_implemented_error()
@property
def formula_array(self):
raise not_implemented_error()
@formula_array.setter
def formula_array(self, value):
raise not_implemented_error()
@property
def font(self):
raise not_implemented_error()
@property
def column_width(self):
raise not_implemented_error()
@column_width.setter
def column_width(self, value):
raise not_implemented_error()
@property
def row_height(self):
raise not_implemented_error()
@row_height.setter
def row_height(self, value):
raise not_implemented_error()
@property
def width(self):
raise not_implemented_error()
@property
def height(self):
raise not_implemented_error()
@property
def left(self):
raise not_implemented_error()
@property
def top(self):
raise not_implemented_error()
@property
def has_array(self):
raise not_implemented_error()
@property
def number_format(self):
raise not_implemented_error()
@number_format.setter
def number_format(self, value):
raise not_implemented_error()
def get_address(self, row_absolute, col_absolute, external):
raise not_implemented_error()
@property
def address(self):
raise not_implemented_error()
@property
def current_region(self):
raise not_implemented_error()
def autofit(self, axis=None):
raise not_implemented_error()
def insert(self, shift=None, copy_origin=None):
raise not_implemented_error()
def delete(self, shift=None):
raise not_implemented_error()
def copy(self, destination=None):
raise not_implemented_error()
def paste(self, paste=None, operation=None, skip_blanks=False, transpose=False):
raise not_implemented_error()
@property
def hyperlink(self):
raise not_implemented_error()
def add_hyperlink(self, address, text_to_display=None, screen_tip=None):
raise not_implemented_error()
@property
def color(self):
raise not_implemented_error()
@color.setter
def color(self, color_or_rgb):
raise not_implemented_error()
@property
def name(self):
raise not_implemented_error()
@name.setter
def name(self, value):
raise not_implemented_error()
def __call__(self, arg1, arg2=None):
raise not_implemented_error()
@property
def rows(self):
raise not_implemented_error()
@property
def columns(self):
raise not_implemented_error()
def select(self):
raise not_implemented_error()
@property
def merge_area(self):
raise not_implemented_error()
@property
def merge_cells(self):
raise not_implemented_error()
def merge(self, across):
raise not_implemented_error()
def unmerge(self):
raise not_implemented_error()
@property
def table(self):
raise not_implemented_error()
@property
def characters(self):
raise not_implemented_error()
@property
def wrap_text(self):
raise not_implemented_error()
@wrap_text.setter
def wrap_text(self, value):
raise not_implemented_error()
@property
def note(self):
raise not_implemented_error()
def copy_picture(self, appearance, format):
raise not_implemented_error()
def to_png(self, path):
raise not_implemented_error()
def to_pdf(self, path, quality):
raise not_implemented_error()
class Picture:
@property
def api(self):
raise not_implemented_error()
@property
def name(self):
raise not_implemented_error()
@name.setter
def name(self, value):
raise not_implemented_error()
@property
def parent(self):
raise not_implemented_error()
@property
def left(self):
raise not_implemented_error()
@left.setter
def left(self, value):
raise not_implemented_error()
@property
def top(self):
raise not_implemented_error()
@top.setter
def top(self, value):
raise not_implemented_error()
@property
def width(self):
raise not_implemented_error()
@width.setter
def width(self, value):
raise not_implemented_error()
@property
def height(self):
raise not_implemented_error()
@height.setter
def height(self, value):
raise not_implemented_error()
def delete(self):
raise not_implemented_error()
@property
def lock_aspect_ratio(self):
raise not_implemented_error()
@lock_aspect_ratio.setter
def lock_aspect_ratio(self, value):
raise not_implemented_error()
def index(self):
raise not_implemented_error()
class Collection:
@property
def api(self):
raise not_implemented_error()
@property
def parent(self):
raise not_implemented_error()
def __call__(self, key):
raise not_implemented_error()
def __len__(self):
raise not_implemented_error()
def __iter__(self):
raise not_implemented_error()
def __contains__(self, key):
raise not_implemented_error()
class Pictures:
def add(self, filename, link_to_file, save_with_document, left, top, width, height):
raise not_implemented_error() |
# -*- coding: utf-8 -*-
SSH_CONFIG_TMP_DIR = "ssh@tmp"
SSH_AUTH_BUILD_DIR = "ssh-builder@tmp"
SSH_AUTH_FILE_NAME = ".ssh/authorized_keys"
LOG_FORMAT = '%(asctime)s - %(name)s - %(levelname)s - %(message)s'
PROGRAM = "ssh-manager" | ssh_config_tmp_dir = 'ssh@tmp'
ssh_auth_build_dir = 'ssh-builder@tmp'
ssh_auth_file_name = '.ssh/authorized_keys'
log_format = '%(asctime)s - %(name)s - %(levelname)s - %(message)s'
program = 'ssh-manager' |
s = input()
before = 0
cnt_0 = 0
cnt_1 = 0
for idx in range(1, len(s)):
if s[before] != s[idx] and s[before] == '0':
cnt_0 += 1
before = idx
elif s[before] != s[idx] and s[before] == '1':
cnt_1 += 1
before = idx
if s[len(s)-1] == '0':
cnt_0 += 1
else:
cnt_1 += 1
if cnt_0 > cnt_1 :
print(cnt_1)
else:
print(cnt_0) | s = input()
before = 0
cnt_0 = 0
cnt_1 = 0
for idx in range(1, len(s)):
if s[before] != s[idx] and s[before] == '0':
cnt_0 += 1
before = idx
elif s[before] != s[idx] and s[before] == '1':
cnt_1 += 1
before = idx
if s[len(s) - 1] == '0':
cnt_0 += 1
else:
cnt_1 += 1
if cnt_0 > cnt_1:
print(cnt_1)
else:
print(cnt_0) |
#OAM: 2 16-bit addresses
# 8 bit spriteref
# 10 bit x pos
# 10 bit y pos
# 1 bit x-flip
# 1 bit y-flip
# 1 bit priority
# 1 bit enable
OAM = [
{
"spriteref":1,
"x_pos":13,
"y_pos":2,
"x_flip":0,
"y_flip":0,
"priority":0,
"enable":1
},
{
"spriteref":2,
"x_pos":2,
"y_pos":2,
"x_flip":0,
"y_flip":0,
"priority":1,
"enable":1
},
{
"spriteref":0,
"x_pos":18,
"y_pos":18,
"x_flip":1,
"y_flip":0,
"priority":0,
"enable":1
},
{
"spriteref":0,
"x_pos":34,
"y_pos":34,
"x_flip":0,
"y_flip":1,
"priority":0,
"enable":1
},
{
"spriteref":0,
"x_pos":50,
"y_pos":50,
"x_flip":1,
"y_flip":1,
"priority":0,
"enable":1
},
{
"spriteref":1,
"x_pos":50,
"y_pos":2,
"x_flip":0,
"y_flip":0,
"priority":0,
"enable":1
},
{
"spriteref":1,
"x_pos":66,
"y_pos":2,
"x_flip":1,
"y_flip":0,
"priority":0,
"enable":1
},
{
"spriteref":3,
"x_pos":0,
"y_pos":50,
"x_flip":0,
"y_flip":0,
"priority":0,
"enable":1
},
{
"spriteref":4,
"x_pos":16,
"y_pos":50,
"x_flip":0,
"y_flip":0,
"priority":0,
"enable":1
},
{
"spriteref":5,
"x_pos":32,
"y_pos":50,
"x_flip":0,
"y_flip":0,
"priority":0,
"enable":1
},
{
"spriteref":6,
"x_pos":48,
"y_pos":50,
"x_flip":0,
"y_flip":0,
"priority":0,
"enable":1
},
{
"spriteref":7,
"x_pos":64,
"y_pos":50,
"x_flip":0,
"y_flip":0,
"priority":0,
"enable":1
},
{
"spriteref":8,
"x_pos":80,
"y_pos":50,
"x_flip":0,
"y_flip":0,
"priority":0,
"enable":1
},
{
"spriteref":9,
"x_pos":96,
"y_pos":50,
"x_flip":0,
"y_flip":0,
"priority":0,
"enable":1
}
]
SPRITE = [
[
5,3,3,3,3,3,3,5,5,3,3,3,3,3,3,5,
5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,
5,3,3,3,3,3,3,3,5,3,3,3,3,3,3,3,
5,3,5,5,5,5,5,3,5,3,5,5,5,5,5,3,
5,3,5,5,5,5,5,3,5,3,5,5,5,5,5,3,
5,3,5,5,5,5,5,3,5,3,5,5,5,5,5,3,
5,3,5,5,3,5,5,3,5,3,5,5,3,5,5,3,
5,3,5,5,5,5,5,3,5,3,5,5,5,5,5,3,
5,3,5,5,5,5,5,3,5,3,5,5,5,5,5,3,
5,5,3,3,3,3,3,5,5,5,3,3,3,3,3,5,
5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,
5,3,5,0,0,5,5,5,5,5,0,0,5,3,3,5,
5,3,5,0,0,5,5,5,5,5,0,0,5,3,3,5,
5,5,3,5,5,5,5,5,5,5,5,5,3,3,3,5,
5,5,3,3,3,3,5,5,5,5,3,3,5,5,5,5,
5,5,5,5,5,5,3,3,3,3,5,5,5,5,5,5,
],
[
4,4,2,2,2,2,2,2,2,2,2,2,2,2,2,2,
4,4,4,2,2,2,2,2,2,2,2,2,0,0,0,2,
2,4,4,4,2,2,2,2,2,2,2,2,0,0,0,2,
2,2,4,4,4,2,2,2,2,2,2,2,0,0,0,2,
2,2,2,4,4,4,2,2,2,2,2,2,2,2,2,2,
2,2,2,2,4,4,4,2,2,2,2,2,2,2,2,2,
2,2,2,2,2,4,4,4,2,2,2,2,2,2,2,2,
2,2,2,2,2,2,4,4,4,2,2,2,2,2,2,2,
2,2,2,2,2,2,2,4,4,4,2,2,2,2,2,2,
2,2,2,2,2,2,2,2,4,4,4,2,2,2,2,2,
2,2,2,2,2,2,2,2,2,4,4,4,2,2,2,2,
2,2,2,2,2,2,2,2,2,2,4,4,4,2,2,2,
2,0,0,0,2,2,2,2,2,2,2,4,4,4,2,2,
2,0,0,0,2,2,2,2,2,2,2,2,4,4,4,2,
2,0,0,0,2,2,2,2,2,2,2,2,2,4,4,4,
2,2,2,2,2,2,2,2,2,2,2,2,2,2,4,4,
],
[
4,4,1,1,1,1,1,1,1,1,1,1,1,1,1,3,
4,4,4,1,1,1,1,1,1,1,1,1,1,1,3,0,
1,4,4,4,1,1,1,1,1,1,1,1,1,3,0,0,
1,1,4,4,4,1,1,1,1,1,1,1,3,0,0,0,
1,1,1,4,4,4,1,1,1,1,1,3,0,0,0,0,
1,1,1,1,4,4,4,1,1,1,3,0,0,0,0,0,
1,1,1,1,1,4,4,4,1,3,0,0,0,0,0,0,
1,1,1,1,1,1,4,4,3,0,0,0,0,0,0,0,
1,1,1,1,1,1,1,3,4,4,0,0,0,0,0,0,
1,1,1,1,1,1,3,1,4,4,4,0,0,0,0,0,
1,1,1,1,1,3,1,1,1,4,4,4,0,0,0,0,
1,1,1,1,3,1,1,1,1,1,4,4,4,0,0,0,
1,1,1,3,1,1,1,1,1,1,1,4,4,4,0,0,
1,1,3,1,1,1,1,1,1,1,1,1,4,4,4,0,
1,3,1,1,1,1,1,1,1,1,1,1,1,4,4,4,
3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,
],
[
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,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,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,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,
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,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,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,1,1,1,1,
],
[
2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,
2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,
2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,
2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,
2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,
2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,
2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,
2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,
2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,
2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,
2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,
2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,
2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,
2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,
2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,
2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,
],
[
3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,
3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,
3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,
3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,
3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,
3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,
3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,
3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,
3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,
3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,
3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,
3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,
3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,
3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,
3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,
3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,
],
[
4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,
4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,
4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,
4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,
4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,
4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,
4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,
4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,
4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,
4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,
4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,
4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,
4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,
4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,
4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,
4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,
],
[
5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,
5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,
5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,
5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,
5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,
5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,
5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,
5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,
5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,
5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,
5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,
5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,
5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,
5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,
5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,
5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,
],
[
6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,
6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,
6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,
6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,
6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,
6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,
6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,
6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,
6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,
6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,
6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,
6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,
6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,
6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,
6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,
6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,
],
[
7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,
7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,
7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,
7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,
7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,
7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,
7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,
7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,
7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,
7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,
7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,
7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,
7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,
7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,
7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,
7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7
]
]
PALLET = [
{
"r":128,
"g":128,
"b":128
},
{
"r":255,
"g":0,
"b":0
},
{
"r":0,
"g":255,
"b":0
},
{
"r":0,
"g":0,
"b":255
},
{
"r":255,
"g":255,
"b":0
},
{
"r":0,
"g":255,
"b":255
},
{
"r":255,
"g":0,
"b":255
},{
"r":255,
"g":255,
"b":255
}
]
def wait_clock_cycles(times, clockCycles):
waitTime = times*clockCycles
print("#"+str(waitTime)+";")
# EBI_ALE, EBI_WE active low
# EBI_AD "active high"
# EBI_ALE = Adresse
# EBI_WE = Data
# after a address data burst wait 2 clock cycles.
clockCycle = 39.68 # 25,2 MHz
print("task write_oam_data();")
print("// Generating OAM")
print("")
wait_clock_cycles(2, clockCycle)
index = 0
print("bank_select = 0;")
for oam_obj in OAM:
oam_obj["spriteref"]= ([str(x) for x in '{:08b}'.format(oam_obj["spriteref"])])
oam_obj["x_pos"] = ([str(x) for x in '{:010b}'.format(oam_obj["x_pos"])])
oam_obj["y_pos"] = ([str(x) for x in '{:010b}'.format(oam_obj["y_pos"])])
oam_obj["x_flip"] = ([str(x) for x in '{:01b}'.format(oam_obj["x_flip"])])
oam_obj["y_flip"] = ([str(x) for x in '{:01b}'.format(oam_obj["y_flip"])])
oam_obj["priority"] = ([str(x) for x in '{:01b}'.format(oam_obj["priority"])])
oam_obj["enable"] = ([str(x) for x in '{:01b}'.format(oam_obj["enable"])])
dataobject1 = "".join(oam_obj["x_pos"][2:11]) + "".join(oam_obj["spriteref"])
dataobject2 = "".join(oam_obj["enable"]) + "".join(oam_obj["priority"]) + "".join(oam_obj["y_flip"]) + "".join(oam_obj["x_flip"]) + "".join(oam_obj["y_pos"]) + "".join(oam_obj["x_pos"][:2])
print("EBI_AD = "+str(index)+";")
print("#1;")
print("EBI_ALE = 0;")
print("#1;")
print("EBI_ALE = 1;")
print("#1;")
print("EBI_AD = 16'b"+dataobject1+";")
print("#1;")
print("EBI_WE = 0;")
print("#1;")
print("EBI_WE = 1;")
print("#1;")
wait_clock_cycles(2, clockCycle)
print("EBI_AD = "+str(index+1)+";")
print("#1;")
print("EBI_ALE = 0;")
print("#1;")
print("EBI_ALE = 1;")
print("#1;")
print("EBI_AD = 16'b"+dataobject2+";")
print("#1;")
print("EBI_WE = 0;")
print("#1;")
print("EBI_WE = 1;")
print("#1;")
print("")
wait_clock_cycles(2, clockCycle)
index += 2
print("endtask")
print("task write_sprite_data();")
print("")
print("// Generating VRAM SPRITE")
print("")
wait_clock_cycles(2, clockCycle)
index = 0
print("bank_select = 1;")
memoryIndex = 0
for sprite_obj in SPRITE:
for offset in range(0,256):
if offset%2 == 0:
sprite_obj[offset]= ([str(x) for x in '{:08b}'.format(sprite_obj[offset+1])]) + ([str(x) for x in '{:08b}'.format(sprite_obj[offset])])
print("EBI_AD = "+str(memoryIndex)+";")
print("#1;")
print("EBI_ALE = 0;")
print("#1;")
print("EBI_ALE = 1;")
print("#1;")
print("EBI_AD = 16'b"+"".join(sprite_obj[offset])+";")
print("#1;")
print("EBI_WE = 0;")
print("#1;")
print("EBI_WE = 1;")
print("#1;")
memoryIndex+=1
wait_clock_cycles(2, clockCycle)
index += 256
print("endtask")
print("task write_pallet_data();")
print("")
print("// Generating Pallet")
print("")
wait_clock_cycles(2, clockCycle)
index = 0
print("bank_select = 3;")
for pallet_obj in PALLET:
pallet_obj["r"]= ([str(x) for x in '{:08b}'.format(pallet_obj["r"])])
pallet_obj["g"]= ([str(x) for x in '{:08b}'.format(pallet_obj["g"])])
pallet_obj["b"]= ([str(x) for x in '{:08b}'.format(pallet_obj["b"])])
print("EBI_AD = "+str(index)+";")
print("#1;")
print("EBI_ALE = 0;")
print("#1;")
print("EBI_ALE = 1;")
print("#1;")
print("EBI_AD = 16'b"+ "".join(pallet_obj["r"]) +"".join(pallet_obj["g"])+";")
print("#1;")
print("EBI_WE = 0;")
print("#1;")
print("EBI_WE = 1;")
print("#1;")
wait_clock_cycles(2, clockCycle)
print("EBI_AD = "+str(index+1)+";")
print("#1;")
print("EBI_ALE = 0;")
print("#1;")
print("EBI_ALE = 1;")
print("#1;")
print("EBI_AD = 16'b"+ "00000000" +"".join(pallet_obj["b"])+";")
print("#1;")
print("EBI_WE = 0;")
print("#1;")
print("EBI_WE = 1;")
print("#1;")
wait_clock_cycles(2, clockCycle)
index += 2
print("endtask")
| oam = [{'spriteref': 1, 'x_pos': 13, 'y_pos': 2, 'x_flip': 0, 'y_flip': 0, 'priority': 0, 'enable': 1}, {'spriteref': 2, 'x_pos': 2, 'y_pos': 2, 'x_flip': 0, 'y_flip': 0, 'priority': 1, 'enable': 1}, {'spriteref': 0, 'x_pos': 18, 'y_pos': 18, 'x_flip': 1, 'y_flip': 0, 'priority': 0, 'enable': 1}, {'spriteref': 0, 'x_pos': 34, 'y_pos': 34, 'x_flip': 0, 'y_flip': 1, 'priority': 0, 'enable': 1}, {'spriteref': 0, 'x_pos': 50, 'y_pos': 50, 'x_flip': 1, 'y_flip': 1, 'priority': 0, 'enable': 1}, {'spriteref': 1, 'x_pos': 50, 'y_pos': 2, 'x_flip': 0, 'y_flip': 0, 'priority': 0, 'enable': 1}, {'spriteref': 1, 'x_pos': 66, 'y_pos': 2, 'x_flip': 1, 'y_flip': 0, 'priority': 0, 'enable': 1}, {'spriteref': 3, 'x_pos': 0, 'y_pos': 50, 'x_flip': 0, 'y_flip': 0, 'priority': 0, 'enable': 1}, {'spriteref': 4, 'x_pos': 16, 'y_pos': 50, 'x_flip': 0, 'y_flip': 0, 'priority': 0, 'enable': 1}, {'spriteref': 5, 'x_pos': 32, 'y_pos': 50, 'x_flip': 0, 'y_flip': 0, 'priority': 0, 'enable': 1}, {'spriteref': 6, 'x_pos': 48, 'y_pos': 50, 'x_flip': 0, 'y_flip': 0, 'priority': 0, 'enable': 1}, {'spriteref': 7, 'x_pos': 64, 'y_pos': 50, 'x_flip': 0, 'y_flip': 0, 'priority': 0, 'enable': 1}, {'spriteref': 8, 'x_pos': 80, 'y_pos': 50, 'x_flip': 0, 'y_flip': 0, 'priority': 0, 'enable': 1}, {'spriteref': 9, 'x_pos': 96, 'y_pos': 50, 'x_flip': 0, 'y_flip': 0, 'priority': 0, 'enable': 1}]
sprite = [[5, 3, 3, 3, 3, 3, 3, 5, 5, 3, 3, 3, 3, 3, 3, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 3, 3, 3, 3, 3, 3, 3, 5, 3, 3, 3, 3, 3, 3, 3, 5, 3, 5, 5, 5, 5, 5, 3, 5, 3, 5, 5, 5, 5, 5, 3, 5, 3, 5, 5, 5, 5, 5, 3, 5, 3, 5, 5, 5, 5, 5, 3, 5, 3, 5, 5, 5, 5, 5, 3, 5, 3, 5, 5, 5, 5, 5, 3, 5, 3, 5, 5, 3, 5, 5, 3, 5, 3, 5, 5, 3, 5, 5, 3, 5, 3, 5, 5, 5, 5, 5, 3, 5, 3, 5, 5, 5, 5, 5, 3, 5, 3, 5, 5, 5, 5, 5, 3, 5, 3, 5, 5, 5, 5, 5, 3, 5, 5, 3, 3, 3, 3, 3, 5, 5, 5, 3, 3, 3, 3, 3, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 3, 5, 0, 0, 5, 5, 5, 5, 5, 0, 0, 5, 3, 3, 5, 5, 3, 5, 0, 0, 5, 5, 5, 5, 5, 0, 0, 5, 3, 3, 5, 5, 5, 3, 5, 5, 5, 5, 5, 5, 5, 5, 5, 3, 3, 3, 5, 5, 5, 3, 3, 3, 3, 5, 5, 5, 5, 3, 3, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 3, 3, 3, 3, 5, 5, 5, 5, 5, 5], [4, 4, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 4, 4, 4, 2, 2, 2, 2, 2, 2, 2, 2, 2, 0, 0, 0, 2, 2, 4, 4, 4, 2, 2, 2, 2, 2, 2, 2, 2, 0, 0, 0, 2, 2, 2, 4, 4, 4, 2, 2, 2, 2, 2, 2, 2, 0, 0, 0, 2, 2, 2, 2, 4, 4, 4, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 4, 4, 4, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 4, 4, 4, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 4, 4, 4, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 4, 4, 4, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 4, 4, 4, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 4, 4, 4, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 4, 4, 4, 2, 2, 2, 2, 0, 0, 0, 2, 2, 2, 2, 2, 2, 2, 4, 4, 4, 2, 2, 2, 0, 0, 0, 2, 2, 2, 2, 2, 2, 2, 2, 4, 4, 4, 2, 2, 0, 0, 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, 4, 4, 4, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 4, 4], [4, 4, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 4, 4, 4, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 0, 1, 4, 4, 4, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 0, 0, 1, 1, 4, 4, 4, 1, 1, 1, 1, 1, 1, 1, 3, 0, 0, 0, 1, 1, 1, 4, 4, 4, 1, 1, 1, 1, 1, 3, 0, 0, 0, 0, 1, 1, 1, 1, 4, 4, 4, 1, 1, 1, 3, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 4, 4, 4, 1, 3, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 4, 4, 3, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 3, 4, 4, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 3, 1, 4, 4, 4, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 3, 1, 1, 1, 4, 4, 4, 0, 0, 0, 0, 1, 1, 1, 1, 3, 1, 1, 1, 1, 1, 4, 4, 4, 0, 0, 0, 1, 1, 1, 3, 1, 1, 1, 1, 1, 1, 1, 4, 4, 4, 0, 0, 1, 1, 3, 1, 1, 1, 1, 1, 1, 1, 1, 1, 4, 4, 4, 0, 1, 3, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 4, 4, 4, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3], [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, 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, 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, 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, 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, 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, 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, 1, 1, 1, 1], [2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2], [3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3], [4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4], [5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5], [6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6], [7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7]]
pallet = [{'r': 128, 'g': 128, 'b': 128}, {'r': 255, 'g': 0, 'b': 0}, {'r': 0, 'g': 255, 'b': 0}, {'r': 0, 'g': 0, 'b': 255}, {'r': 255, 'g': 255, 'b': 0}, {'r': 0, 'g': 255, 'b': 255}, {'r': 255, 'g': 0, 'b': 255}, {'r': 255, 'g': 255, 'b': 255}]
def wait_clock_cycles(times, clockCycles):
wait_time = times * clockCycles
print('#' + str(waitTime) + ';')
clock_cycle = 39.68
print('task write_oam_data();')
print('// Generating OAM')
print('')
wait_clock_cycles(2, clockCycle)
index = 0
print('bank_select = 0;')
for oam_obj in OAM:
oam_obj['spriteref'] = [str(x) for x in '{:08b}'.format(oam_obj['spriteref'])]
oam_obj['x_pos'] = [str(x) for x in '{:010b}'.format(oam_obj['x_pos'])]
oam_obj['y_pos'] = [str(x) for x in '{:010b}'.format(oam_obj['y_pos'])]
oam_obj['x_flip'] = [str(x) for x in '{:01b}'.format(oam_obj['x_flip'])]
oam_obj['y_flip'] = [str(x) for x in '{:01b}'.format(oam_obj['y_flip'])]
oam_obj['priority'] = [str(x) for x in '{:01b}'.format(oam_obj['priority'])]
oam_obj['enable'] = [str(x) for x in '{:01b}'.format(oam_obj['enable'])]
dataobject1 = ''.join(oam_obj['x_pos'][2:11]) + ''.join(oam_obj['spriteref'])
dataobject2 = ''.join(oam_obj['enable']) + ''.join(oam_obj['priority']) + ''.join(oam_obj['y_flip']) + ''.join(oam_obj['x_flip']) + ''.join(oam_obj['y_pos']) + ''.join(oam_obj['x_pos'][:2])
print('EBI_AD = ' + str(index) + ';')
print('#1;')
print('EBI_ALE = 0;')
print('#1;')
print('EBI_ALE = 1;')
print('#1;')
print("EBI_AD = 16'b" + dataobject1 + ';')
print('#1;')
print('EBI_WE = 0;')
print('#1;')
print('EBI_WE = 1;')
print('#1;')
wait_clock_cycles(2, clockCycle)
print('EBI_AD = ' + str(index + 1) + ';')
print('#1;')
print('EBI_ALE = 0;')
print('#1;')
print('EBI_ALE = 1;')
print('#1;')
print("EBI_AD = 16'b" + dataobject2 + ';')
print('#1;')
print('EBI_WE = 0;')
print('#1;')
print('EBI_WE = 1;')
print('#1;')
print('')
wait_clock_cycles(2, clockCycle)
index += 2
print('endtask')
print('task write_sprite_data();')
print('')
print('// Generating VRAM SPRITE')
print('')
wait_clock_cycles(2, clockCycle)
index = 0
print('bank_select = 1;')
memory_index = 0
for sprite_obj in SPRITE:
for offset in range(0, 256):
if offset % 2 == 0:
sprite_obj[offset] = [str(x) for x in '{:08b}'.format(sprite_obj[offset + 1])] + [str(x) for x in '{:08b}'.format(sprite_obj[offset])]
print('EBI_AD = ' + str(memoryIndex) + ';')
print('#1;')
print('EBI_ALE = 0;')
print('#1;')
print('EBI_ALE = 1;')
print('#1;')
print("EBI_AD = 16'b" + ''.join(sprite_obj[offset]) + ';')
print('#1;')
print('EBI_WE = 0;')
print('#1;')
print('EBI_WE = 1;')
print('#1;')
memory_index += 1
wait_clock_cycles(2, clockCycle)
index += 256
print('endtask')
print('task write_pallet_data();')
print('')
print('// Generating Pallet')
print('')
wait_clock_cycles(2, clockCycle)
index = 0
print('bank_select = 3;')
for pallet_obj in PALLET:
pallet_obj['r'] = [str(x) for x in '{:08b}'.format(pallet_obj['r'])]
pallet_obj['g'] = [str(x) for x in '{:08b}'.format(pallet_obj['g'])]
pallet_obj['b'] = [str(x) for x in '{:08b}'.format(pallet_obj['b'])]
print('EBI_AD = ' + str(index) + ';')
print('#1;')
print('EBI_ALE = 0;')
print('#1;')
print('EBI_ALE = 1;')
print('#1;')
print("EBI_AD = 16'b" + ''.join(pallet_obj['r']) + ''.join(pallet_obj['g']) + ';')
print('#1;')
print('EBI_WE = 0;')
print('#1;')
print('EBI_WE = 1;')
print('#1;')
wait_clock_cycles(2, clockCycle)
print('EBI_AD = ' + str(index + 1) + ';')
print('#1;')
print('EBI_ALE = 0;')
print('#1;')
print('EBI_ALE = 1;')
print('#1;')
print("EBI_AD = 16'b" + '00000000' + ''.join(pallet_obj['b']) + ';')
print('#1;')
print('EBI_WE = 0;')
print('#1;')
print('EBI_WE = 1;')
print('#1;')
wait_clock_cycles(2, clockCycle)
index += 2
print('endtask') |
print(" Using print command..") # task /title
print ("These are how many animals I have:") # print string("...")
print("Cows", 15+30/6) # print ("string"+sum)
print("Sheep",100-30*3%4)
print("Now I will count my plants:")
print(3+2+1-5+4%2-1/4+6) # print(sum)
print("Is it true that 3+2<5-7?") # operator < less-than
print(3+2<5-7)
print("What is 3+2?",3+2)
print("What is 5-7?",5-7)
print("Can you see why that printed False earlier?")
print("Is it greater?",5>-2) # operator > greater than
print("Is it greater or equal?", 5>=-2) # operator > greater than or equal to
print("Is it less or equal?",5<=-2) # operator <= less than or equal to
| print(' Using print command..')
print('These are how many animals I have:')
print('Cows', 15 + 30 / 6)
print('Sheep', 100 - 30 * 3 % 4)
print('Now I will count my plants:')
print(3 + 2 + 1 - 5 + 4 % 2 - 1 / 4 + 6)
print('Is it true that 3+2<5-7?')
print(3 + 2 < 5 - 7)
print('What is 3+2?', 3 + 2)
print('What is 5-7?', 5 - 7)
print('Can you see why that printed False earlier?')
print('Is it greater?', 5 > -2)
print('Is it greater or equal?', 5 >= -2)
print('Is it less or equal?', 5 <= -2) |
def aumentar(v):
val = v * (10/100) + v
return val
def diminuir(v):
val = v - v * (10/100)
return val
def dobro(v):
val = v * 2
return val
def metade(v):
val = v / 2
return val
| def aumentar(v):
val = v * (10 / 100) + v
return val
def diminuir(v):
val = v - v * (10 / 100)
return val
def dobro(v):
val = v * 2
return val
def metade(v):
val = v / 2
return val |
# Copyright (c) Meta Platforms, Inc. and affiliates.
#
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.
TYPECHECK_ERROR = 102
class AIException(Exception):
pass
class AIRecoverableException(AIException):
pass
class AIProcessException(AIRecoverableException):
# pyre-fixme[3]: Return type must be annotated.
# pyre-fixme[2]: Parameter must be annotated.
# pyre-fixme[2]: Parameter must be annotated.
def __init__(self, message, error_code):
super().__init__(message)
# pyre-fixme[4]: Attribute must be annotated.
self.error_code = error_code
class ParseTypeException(Exception):
pass
| typecheck_error = 102
class Aiexception(Exception):
pass
class Airecoverableexception(AIException):
pass
class Aiprocessexception(AIRecoverableException):
def __init__(self, message, error_code):
super().__init__(message)
self.error_code = error_code
class Parsetypeexception(Exception):
pass |
templates_path = ["_templates"]
source_suffix = [".rst", ".md"]
master_doc = "index"
project = "TileDB-CF-Py"
copyright = "2021, TileDB, Inc"
author = "TileDB, Inc"
release = "0.5.3"
version = "0.5.3"
extensions = [
"sphinx.ext.autodoc",
"sphinx.ext.viewcode",
"sphinx.ext.napoleon",
"sphinx_autodoc_typehints",
"sphinx_rtd_theme",
]
language = None
exclude_patterns = ["_build", "Thumbs.db", ".DS_Store"]
pygments_style = "sphinx"
todo_include_todos = False
# -- Options for HTML output -------------------------------------------
html_theme = "sphinx_rtd_theme"
html_static_path = ["_static"]
# -- Options for HTMLHelp output ---------------------------------------
htmlhelp_basename = "tiledb-cf-doc"
# -- Options for LaTeX output ------------------------------------------
latex_documents = [
(
master_doc,
"tiledb.cf.tex",
"TileDB-CF-Py Documentation",
"TileDB, Inc",
"manual",
),
]
# -- Options for manual page output ------------------------------------
man_pages = [(master_doc, "tiledb.cf", "TileDB-CF-Py Documentation", [author], 1)]
# -- Options for Texinfo output ----------------------------------------
texinfo_documents = [
(
master_doc,
"tiledb.cf",
"TileDB-CF-Py Documentation",
author,
"tiledb.cf",
"One line description of project.",
"Miscellaneous",
),
]
| templates_path = ['_templates']
source_suffix = ['.rst', '.md']
master_doc = 'index'
project = 'TileDB-CF-Py'
copyright = '2021, TileDB, Inc'
author = 'TileDB, Inc'
release = '0.5.3'
version = '0.5.3'
extensions = ['sphinx.ext.autodoc', 'sphinx.ext.viewcode', 'sphinx.ext.napoleon', 'sphinx_autodoc_typehints', 'sphinx_rtd_theme']
language = None
exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store']
pygments_style = 'sphinx'
todo_include_todos = False
html_theme = 'sphinx_rtd_theme'
html_static_path = ['_static']
htmlhelp_basename = 'tiledb-cf-doc'
latex_documents = [(master_doc, 'tiledb.cf.tex', 'TileDB-CF-Py Documentation', 'TileDB, Inc', 'manual')]
man_pages = [(master_doc, 'tiledb.cf', 'TileDB-CF-Py Documentation', [author], 1)]
texinfo_documents = [(master_doc, 'tiledb.cf', 'TileDB-CF-Py Documentation', author, 'tiledb.cf', 'One line description of project.', 'Miscellaneous')] |
def break_words(stuff):
"""This function will break up words for us."""
words = stuff.split(' ')
return words
def sort_words(words):
"""Sorts the words."""
return sorted(words)
def print_first_word(words):
"""Prints the first word after popping it off."""
word = words.pop(0)
print(word)
def print_last_word(words):
"""Prints the last word after popping it off."""
word = words.pop(-1)
print(word)
def sort_sentence(sentence):
"""Takes in a full sentence and returns the sorted words."""
words = break_words(sentence)
return sort_words(words)
def print_first_and_last(sentence):
"""Prints the first and last words of the sentence."""
words = break_words(sentence)
print_first_word(words)
print_last_word(words)
def print_first_and_last_sorted(sentence):
"""Sorts the words then prints the first and last one."""
words = sort_sentence(sentence)
print_first_word(words)
print_last_word(words)
| def break_words(stuff):
"""This function will break up words for us."""
words = stuff.split(' ')
return words
def sort_words(words):
"""Sorts the words."""
return sorted(words)
def print_first_word(words):
"""Prints the first word after popping it off."""
word = words.pop(0)
print(word)
def print_last_word(words):
"""Prints the last word after popping it off."""
word = words.pop(-1)
print(word)
def sort_sentence(sentence):
"""Takes in a full sentence and returns the sorted words."""
words = break_words(sentence)
return sort_words(words)
def print_first_and_last(sentence):
"""Prints the first and last words of the sentence."""
words = break_words(sentence)
print_first_word(words)
print_last_word(words)
def print_first_and_last_sorted(sentence):
"""Sorts the words then prints the first and last one."""
words = sort_sentence(sentence)
print_first_word(words)
print_last_word(words) |
def orderedSequentialSearch(alist, item):
pos = 0
found = False
stop = False
while pos < len(alist) and not found and not stop:
if alist[pos] == item:
found = True
elif alist[pos] > item:
stop = True
else:
pos += 1
return found
if __name__ == '__main__':
test_list = [0, 1, 2, 8, 13, 17, 19, 32, 42]
print(orderedSequentialSearch(test_list, 3))
print(orderedSequentialSearch(test_list, 13))
"""
False
True
"""
| def ordered_sequential_search(alist, item):
pos = 0
found = False
stop = False
while pos < len(alist) and (not found) and (not stop):
if alist[pos] == item:
found = True
elif alist[pos] > item:
stop = True
else:
pos += 1
return found
if __name__ == '__main__':
test_list = [0, 1, 2, 8, 13, 17, 19, 32, 42]
print(ordered_sequential_search(test_list, 3))
print(ordered_sequential_search(test_list, 13))
'\nFalse\nTrue\n' |
# LTD simulation models / perturbances
# Attribute name case sensitive.
# Commented and empty lines are ignored during parsing.
# Double quoted variable names in model parameters also ignored
# Perturbances
mirror.sysPerturbances = [
#'load 9 : ramp P 2 40 10 per',
]
mirror.NoiseAgent = ltd.perturbance.LoadNoiseAgent(mirror, 1.0 , True)
mirror.sysLoadControl = {
'testSystem' : {
'Area': 2,
'startTime' : 2,
'timeScale' : 10,
'rampType' : 'per', # relative percent change
# Data from: 12/11/2019 PACE
'demand' : [
#(time , Precent change from previous value)
(0, 0.000),
(1, 3.675),
(2, 6.474),
(3, 3.770),
(4, -2.095),
(5, 0.184),
(6, 1.769),
(7, 0.262),
(8, -0.458),
(9, 0.049),
(10, -0.837),
(11, 1.689),
(12, 2.410),
(13, 4.007),
(14, -0.780),
(15, -0.431),
(16, -2.414),
(17, -2.062),
(18, -6.736),
(19, -5.156),
(20, -3.075),
(21, -2.531),
(22, -0.271),
(23, -0.369),
(24, 0.468),
(25, 3.436),
(26, 7.281),
(27, 5.317),
(28, -3.969),
(29, 2.421),
(30, 2.533),
(31, -1.169),
(32, 0.867),
(33, -0.611),
] ,
},# end of demand load control definition
} | mirror.sysPerturbances = []
mirror.NoiseAgent = ltd.perturbance.LoadNoiseAgent(mirror, 1.0, True)
mirror.sysLoadControl = {'testSystem': {'Area': 2, 'startTime': 2, 'timeScale': 10, 'rampType': 'per', 'demand': [(0, 0.0), (1, 3.675), (2, 6.474), (3, 3.77), (4, -2.095), (5, 0.184), (6, 1.769), (7, 0.262), (8, -0.458), (9, 0.049), (10, -0.837), (11, 1.689), (12, 2.41), (13, 4.007), (14, -0.78), (15, -0.431), (16, -2.414), (17, -2.062), (18, -6.736), (19, -5.156), (20, -3.075), (21, -2.531), (22, -0.271), (23, -0.369), (24, 0.468), (25, 3.436), (26, 7.281), (27, 5.317), (28, -3.969), (29, 2.421), (30, 2.533), (31, -1.169), (32, 0.867), (33, -0.611)]}} |
# Python - 3.4.3
def z(iter, num):
lst = [ [] for i in range(num) ]
r, dr = 0, 1
for n in iter:
lst[r].append(n)
if (r <= 0 and dr == -1) or (r >= (num - 1) and dr == 1):
dr *= -1
r += dr
result = []
for e in lst:
result += e
return result
def encode_rail_fence_cipher(string, n):
return ''.join(z(string, n))
def decode_rail_fence_cipher(string, n):
lst = [ '' ] * len(string)
for e, i in zip(string, z(range(len(string)), n)):
lst[i] = e
return ''.join(lst) | def z(iter, num):
lst = [[] for i in range(num)]
(r, dr) = (0, 1)
for n in iter:
lst[r].append(n)
if r <= 0 and dr == -1 or (r >= num - 1 and dr == 1):
dr *= -1
r += dr
result = []
for e in lst:
result += e
return result
def encode_rail_fence_cipher(string, n):
return ''.join(z(string, n))
def decode_rail_fence_cipher(string, n):
lst = [''] * len(string)
for (e, i) in zip(string, z(range(len(string)), n)):
lst[i] = e
return ''.join(lst) |
{
"targets": [{
"target_name": "leveldown"
, "conditions": [
["OS == 'win'", {
"defines": [
"_HAS_EXCEPTIONS=0"
]
, "msvs_settings": {
"VCCLCompilerTool": {
"RuntimeTypeInfo": "false"
, "EnableFunctionLevelLinking": "true"
, "ExceptionHandling": "2"
, "DisableSpecificWarnings": [ "4355", "4530" ,"4267", "4244", "4506" ]
}
}
}]
, ['OS == "linux"', {
'cflags': [
]
, 'cflags!': [ '-fno-tree-vrp']
}]
, ['target_arch == "arm"', {
'cflags': [ '-mfloat-abi=hard'
]
}]
]
, "dependencies": [
"<(module_root_dir)/deps/leveldb/leveldb.gyp:leveldb"
]
, "include_dirs" : [
"<!(node -e \"require('nan')\")"
]
, "sources": [
"src/batch.cc"
, "src/batch_async.cc"
, "src/database.cc"
, "src/database_async.cc"
, "src/iterator.cc"
, "src/iterator_async.cc"
, "src/leveldown.cc"
, "src/leveldown_async.cc"
]
}]
}
| {'targets': [{'target_name': 'leveldown', 'conditions': [["OS == 'win'", {'defines': ['_HAS_EXCEPTIONS=0'], 'msvs_settings': {'VCCLCompilerTool': {'RuntimeTypeInfo': 'false', 'EnableFunctionLevelLinking': 'true', 'ExceptionHandling': '2', 'DisableSpecificWarnings': ['4355', '4530', '4267', '4244', '4506']}}}], ['OS == "linux"', {'cflags': [], 'cflags!': ['-fno-tree-vrp']}], ['target_arch == "arm"', {'cflags': ['-mfloat-abi=hard']}]], 'dependencies': ['<(module_root_dir)/deps/leveldb/leveldb.gyp:leveldb'], 'include_dirs': ['<!(node -e "require(\'nan\')")'], 'sources': ['src/batch.cc', 'src/batch_async.cc', 'src/database.cc', 'src/database_async.cc', 'src/iterator.cc', 'src/iterator_async.cc', 'src/leveldown.cc', 'src/leveldown_async.cc']}]} |
nama = [ 0 ]* 5
for i in range( 5 ):
nama[i] = input()
for i in range( 4 ):
for j in range( 4 ):
if nama[j] > nama[j+1]:
tmp = nama[j]
nama[j] = nama[j+1]
nama[j+1] = tmp
print(nama)
| nama = [0] * 5
for i in range(5):
nama[i] = input()
for i in range(4):
for j in range(4):
if nama[j] > nama[j + 1]:
tmp = nama[j]
nama[j] = nama[j + 1]
nama[j + 1] = tmp
print(nama) |
expected_output = {
'vpn_id':{
1:{
'ethernet_segment_id':{
'0012.1212.1212.1212.1212':{
'es_index':{
1:{
'encap':'SRv6',
'ether_tag':'0',
'internal_id':'None',
'mp_resolved':'FALSE',
'mp_info':'Remote single-active',
'reason':'No valid MAC paths',
'mp_iid':'None',
'pathlists':{
'ead_es':{
'nexthop':{
'2.2.2.2':{
'df_role':'B'
}
}
},
'ead_evi':{
'nexthop':{
'2.2.2.2':{
'sid':'cafe:0:200:e000::'
}
}
}
}
}
}
},
'0034.3434.3434.3434.3434':{
'es_index':{
1:{
'encap':'SRv6',
'ether_tag':'0',
'internal_id':'::ffff:10.0.0.71',
'mp_resolved':'TRUE',
'mp_info':'Remote single-active',
'mp_iid':'::ffff:10.0.0.71',
'pathlists':{
'mac':{
'nexthop':{
'3.3.3.3':{
'sid':'cafe:0:300:e000::'
}
}
},
'ead_es':{
'nexthop':{
'3.3.3.3':{
'df_role':'P'
},
'4.4.4.4':{
'df_role':'B'
}
}
},
'ead_evi':{
'nexthop':{
'3.3.3.3':{
'sid':'cafe:0:300:e000::'
},
'4.4.4.4':{
'sid':'cafe:0:400:e000::'
}
}
},
'summary':{
'nexthop':{
'3.3.3.3':{
'tep_id':'0x05000003',
'df_role':'P',
'sid':'cafe:0:300:e000::'
},
'4.4.4.4':{
'tep_id':'0x00000000',
'df_role':'B',
'sid':'cafe:0:400:e000::'
}
}
}
}
}
}
}
}
}
}
} | expected_output = {'vpn_id': {1: {'ethernet_segment_id': {'0012.1212.1212.1212.1212': {'es_index': {1: {'encap': 'SRv6', 'ether_tag': '0', 'internal_id': 'None', 'mp_resolved': 'FALSE', 'mp_info': 'Remote single-active', 'reason': 'No valid MAC paths', 'mp_iid': 'None', 'pathlists': {'ead_es': {'nexthop': {'2.2.2.2': {'df_role': 'B'}}}, 'ead_evi': {'nexthop': {'2.2.2.2': {'sid': 'cafe:0:200:e000::'}}}}}}}, '0034.3434.3434.3434.3434': {'es_index': {1: {'encap': 'SRv6', 'ether_tag': '0', 'internal_id': '::ffff:10.0.0.71', 'mp_resolved': 'TRUE', 'mp_info': 'Remote single-active', 'mp_iid': '::ffff:10.0.0.71', 'pathlists': {'mac': {'nexthop': {'3.3.3.3': {'sid': 'cafe:0:300:e000::'}}}, 'ead_es': {'nexthop': {'3.3.3.3': {'df_role': 'P'}, '4.4.4.4': {'df_role': 'B'}}}, 'ead_evi': {'nexthop': {'3.3.3.3': {'sid': 'cafe:0:300:e000::'}, '4.4.4.4': {'sid': 'cafe:0:400:e000::'}}}, 'summary': {'nexthop': {'3.3.3.3': {'tep_id': '0x05000003', 'df_role': 'P', 'sid': 'cafe:0:300:e000::'}, '4.4.4.4': {'tep_id': '0x00000000', 'df_role': 'B', 'sid': 'cafe:0:400:e000::'}}}}}}}}}}} |
def memoize(f):
"""memoization decorator for a function taking one or more arguments"""
class memodict(dict):
def __getitem__(self, *key):
return dict.__getitem__(self, key)
def __missing__(self, key):
ret = self[key] = f(*key)
return ret
return memodict().__getitem__
@memoize
def partition(n, k):
if n < 0:
return 0
if n == 0:
return 1
if k < 1:
return 0
if n == 1:
return 1
return partition(n, k - 1) + partition(n - k, k)
| def memoize(f):
"""memoization decorator for a function taking one or more arguments"""
class Memodict(dict):
def __getitem__(self, *key):
return dict.__getitem__(self, key)
def __missing__(self, key):
ret = self[key] = f(*key)
return ret
return memodict().__getitem__
@memoize
def partition(n, k):
if n < 0:
return 0
if n == 0:
return 1
if k < 1:
return 0
if n == 1:
return 1
return partition(n, k - 1) + partition(n - k, k) |
content = '''
<script>
function display_other_page() {
var x = document.getElementById("testdetails");
if (x.style.display === "none") {
x.style.display = "block";
} else {
x.style.display = "none";
}
var x = document.getElementById("test-view");
if (x.style.display === "none") {
x.style.display = "block";
} else {
x.style.display = "none";
}
var x = document.getElementById("graph");
if (x.style.display === "none") {
x.style.display = "block";
} else {
x.style.display = "none";
}
var x = document.getElementById("dashboard");
if (x.style.display === "none") {
x.style.display = "block";
} else {
x.style.display = "none";
}
}
</script>
'''
| content = '\n <script>\n function display_other_page() {\n var x = document.getElementById("testdetails");\n if (x.style.display === "none") {\n x.style.display = "block";\n } else {\n x.style.display = "none";\n }\n var x = document.getElementById("test-view");\n if (x.style.display === "none") {\n x.style.display = "block";\n } else {\n x.style.display = "none";\n }\n var x = document.getElementById("graph");\n if (x.style.display === "none") {\n x.style.display = "block";\n } else {\n x.style.display = "none";\n }\n var x = document.getElementById("dashboard");\n if (x.style.display === "none") {\n x.style.display = "block";\n } else {\n x.style.display = "none";\n }\n }\t\t\n </script>\n' |
"""
Gauged
https://github.com/chriso/gauged (MIT Licensed)
Copyright 2014 (c) Chris O'Hara <cohara87@gmail.com>
"""
class Aggregate(object):
SUM = 'sum'
MIN = 'min'
MAX = 'max'
MEAN = 'mean'
STDDEV = 'stddev'
PERCENTILE = 'percentile'
MEDIAN = 'median'
COUNT = 'count'
ALL = set([SUM, MIN, MAX, MEAN, STDDEV, PERCENTILE, MEDIAN, COUNT])
ASSOCIATIVE = set([SUM, MIN, MAX, COUNT])
| """
Gauged
https://github.com/chriso/gauged (MIT Licensed)
Copyright 2014 (c) Chris O'Hara <cohara87@gmail.com>
"""
class Aggregate(object):
sum = 'sum'
min = 'min'
max = 'max'
mean = 'mean'
stddev = 'stddev'
percentile = 'percentile'
median = 'median'
count = 'count'
all = set([SUM, MIN, MAX, MEAN, STDDEV, PERCENTILE, MEDIAN, COUNT])
associative = set([SUM, MIN, MAX, COUNT]) |
input_line = input()
dict_ref = {}
while input_line != "end":
splited_line = input_line.split(" = ")
if splited_line[1].isnumeric():
dict_ref[splited_line[0]] = splited_line[1]
else:
if splited_line[1] in dict_ref.keys():
dict_ref[splited_line[0]] = dict_ref[splited_line[1]]
else:
break
input_line = input()
[print(f"{key} === {value}") for key, value in dict_ref.items()]
| input_line = input()
dict_ref = {}
while input_line != 'end':
splited_line = input_line.split(' = ')
if splited_line[1].isnumeric():
dict_ref[splited_line[0]] = splited_line[1]
elif splited_line[1] in dict_ref.keys():
dict_ref[splited_line[0]] = dict_ref[splited_line[1]]
else:
break
input_line = input()
[print(f'{key} === {value}') for (key, value) in dict_ref.items()] |
def calculo_mul(valor1,valor2):
mul = valor1 * valor2
return mul
def calculo_div(valor1,valor2):
div = valor1 / valor2
return div
def calculo_sub(valor1,valor2):
sub = valor1 - valor2
return sub
def calculo_soma(valor1,valor2):
soma = valor1 + valor2
return soma
def calculo_div_int(valor1,valor2):
div_int = valor1 // valor2
return div_int
def calculo_resto_div(valor1,valor2):
resto_div = valor1 % valor2
return resto_div
def calculo_raiz(valor1,valor2):
raiz = valor1 ** (1/valor2)
return raiz | def calculo_mul(valor1, valor2):
mul = valor1 * valor2
return mul
def calculo_div(valor1, valor2):
div = valor1 / valor2
return div
def calculo_sub(valor1, valor2):
sub = valor1 - valor2
return sub
def calculo_soma(valor1, valor2):
soma = valor1 + valor2
return soma
def calculo_div_int(valor1, valor2):
div_int = valor1 // valor2
return div_int
def calculo_resto_div(valor1, valor2):
resto_div = valor1 % valor2
return resto_div
def calculo_raiz(valor1, valor2):
raiz = valor1 ** (1 / valor2)
return raiz |
class OidcEndpointError(Exception):
pass
class InvalidRedirectURIError(OidcEndpointError):
pass
class InvalidSectorIdentifier(OidcEndpointError):
pass
class ConfigurationError(OidcEndpointError):
pass
class NoSuchAuthentication(OidcEndpointError):
pass
class TamperAllert(OidcEndpointError):
pass
class ToOld(OidcEndpointError):
pass
class MultipleUsage(OidcEndpointError):
pass
class FailedAuthentication(OidcEndpointError):
pass
class InstantiationError(OidcEndpointError):
pass
class ImproperlyConfigured(OidcEndpointError):
pass
class NotForMe(OidcEndpointError):
pass
class UnknownAssertionType(OidcEndpointError):
pass
class RedirectURIError(OidcEndpointError):
pass
class UnknownClient(OidcEndpointError):
pass
class InvalidClient(OidcEndpointError):
pass
class UnAuthorizedClient(OidcEndpointError):
pass
class UnAuthorizedClientScope(OidcEndpointError):
pass
class InvalidCookieSign(Exception):
pass
class OnlyForTestingWarning(Warning):
"Warned when using a feature that only should be used for testing."
pass
class ProcessError(OidcEndpointError):
pass
class ServiceError(OidcEndpointError):
pass
class InvalidRequest(OidcEndpointError):
pass
class CapabilitiesMisMatch(OidcEndpointError):
pass
class MultipleCodeUsage(OidcEndpointError):
pass
| class Oidcendpointerror(Exception):
pass
class Invalidredirecturierror(OidcEndpointError):
pass
class Invalidsectoridentifier(OidcEndpointError):
pass
class Configurationerror(OidcEndpointError):
pass
class Nosuchauthentication(OidcEndpointError):
pass
class Tamperallert(OidcEndpointError):
pass
class Toold(OidcEndpointError):
pass
class Multipleusage(OidcEndpointError):
pass
class Failedauthentication(OidcEndpointError):
pass
class Instantiationerror(OidcEndpointError):
pass
class Improperlyconfigured(OidcEndpointError):
pass
class Notforme(OidcEndpointError):
pass
class Unknownassertiontype(OidcEndpointError):
pass
class Redirecturierror(OidcEndpointError):
pass
class Unknownclient(OidcEndpointError):
pass
class Invalidclient(OidcEndpointError):
pass
class Unauthorizedclient(OidcEndpointError):
pass
class Unauthorizedclientscope(OidcEndpointError):
pass
class Invalidcookiesign(Exception):
pass
class Onlyfortestingwarning(Warning):
"""Warned when using a feature that only should be used for testing."""
pass
class Processerror(OidcEndpointError):
pass
class Serviceerror(OidcEndpointError):
pass
class Invalidrequest(OidcEndpointError):
pass
class Capabilitiesmismatch(OidcEndpointError):
pass
class Multiplecodeusage(OidcEndpointError):
pass |
# -*- coding: utf-8 -*-
"""
Spyder Editor
@auther: syenpark
Python Version: 3.6
"""
def fancy_divide(list_of_numbers, index):
denom = list_of_numbers[index]
return [simple_divide(item, denom) for item in list_of_numbers]
def simple_divide(item, denom):
try:
return item / denom
except ZeroDivisionError:
return 0
print(fancy_divide([0, 2, 4], 1))
| """
Spyder Editor
@auther: syenpark
Python Version: 3.6
"""
def fancy_divide(list_of_numbers, index):
denom = list_of_numbers[index]
return [simple_divide(item, denom) for item in list_of_numbers]
def simple_divide(item, denom):
try:
return item / denom
except ZeroDivisionError:
return 0
print(fancy_divide([0, 2, 4], 1)) |
a = 0.0
def setup():
global globe
size(400, 400, P3D)
world = loadImage("bluemarble01.jpg")
globe = makeSphere(150, 5, world)
frameRate(30)
def draw():
global globe, a
background(0)
translate(width/2, height/2)
lights()
with pushMatrix():
rotateX(radians(-25))
rotateY(a)
a += 0.01
shape(globe)
def makeSphere(r, step, tex):
s = createShape()
s.beginShape(QUAD_STRIP)
s.texture(tex)
s.noStroke()
i = 0
while i < 180:
sini = sin(radians(i))
cosi = cos(radians(i))
sinip = sin(radians(i + step))
cosip = cos(radians(i + step))
j = 0
while j <= 360:
sinj = sin(radians(j))
cosj = cos(radians(j))
s.normal(cosj*sini, -cosi, sinj*sini)
s.vertex(r*cosj*sini, r*-cosi, r*sinj*sini,
tex.width-j*tex.width/360.0, i*tex.height/180.0)
s.normal(cosj*sinip, -cosip, sinj*sinip)
s.vertex(r*cosj*sinip, r*-cosip, r*sinj*sinip,
tex.width-j*tex.width/360.0, (i+step)*tex.height/180.0)
j += step
i += step
s.endShape()
return s | a = 0.0
def setup():
global globe
size(400, 400, P3D)
world = load_image('bluemarble01.jpg')
globe = make_sphere(150, 5, world)
frame_rate(30)
def draw():
global globe, a
background(0)
translate(width / 2, height / 2)
lights()
with push_matrix():
rotate_x(radians(-25))
rotate_y(a)
a += 0.01
shape(globe)
def make_sphere(r, step, tex):
s = create_shape()
s.beginShape(QUAD_STRIP)
s.texture(tex)
s.noStroke()
i = 0
while i < 180:
sini = sin(radians(i))
cosi = cos(radians(i))
sinip = sin(radians(i + step))
cosip = cos(radians(i + step))
j = 0
while j <= 360:
sinj = sin(radians(j))
cosj = cos(radians(j))
s.normal(cosj * sini, -cosi, sinj * sini)
s.vertex(r * cosj * sini, r * -cosi, r * sinj * sini, tex.width - j * tex.width / 360.0, i * tex.height / 180.0)
s.normal(cosj * sinip, -cosip, sinj * sinip)
s.vertex(r * cosj * sinip, r * -cosip, r * sinj * sinip, tex.width - j * tex.width / 360.0, (i + step) * tex.height / 180.0)
j += step
i += step
s.endShape()
return s |
config = {
'timeToSleepWhenNoMovement': 1,
'timeToWaitWhenNoMovementBeforeSleep': 5,
'frameDifferenceRatioForMovement': 1,
'hand': {
'hsv_min_blue': [0, 0, 0],
'hsv_max_blue': [255, 255, 255],
'hsv_dec_blue': [255, 55, 32],
'hsv_inc_blue': [255, 255, 255],
'timeToKeepSearchingHandWhenLostTracking': 1,
'minimumHeight': 80,
'maximumHeight': 350,
'minimumWidth': 80,
'maximumWidth': 320,
'thumbsDetectMinimumHeightRatio': 0.12,
'MaximumYDistanceBetweenDefectForPalmInHandRatio': 0.08,
'MaximumXDistanceBetweenDefectForPalmInHandRatio': 0.2,
'minimumMoveHandForSlide': 150,
'maximumTimeHandForSlide': 0.5,
'delayAfterHandSlide': 0.5
}
} | config = {'timeToSleepWhenNoMovement': 1, 'timeToWaitWhenNoMovementBeforeSleep': 5, 'frameDifferenceRatioForMovement': 1, 'hand': {'hsv_min_blue': [0, 0, 0], 'hsv_max_blue': [255, 255, 255], 'hsv_dec_blue': [255, 55, 32], 'hsv_inc_blue': [255, 255, 255], 'timeToKeepSearchingHandWhenLostTracking': 1, 'minimumHeight': 80, 'maximumHeight': 350, 'minimumWidth': 80, 'maximumWidth': 320, 'thumbsDetectMinimumHeightRatio': 0.12, 'MaximumYDistanceBetweenDefectForPalmInHandRatio': 0.08, 'MaximumXDistanceBetweenDefectForPalmInHandRatio': 0.2, 'minimumMoveHandForSlide': 150, 'maximumTimeHandForSlide': 0.5, 'delayAfterHandSlide': 0.5}} |
class Movie:
'''
Movie class to define movie objects
'''
def __init__(self, id, title, overview, poster, vote_average, vote_count):
self.id = id
self.title = title
self.overview = overview
self.poster = 'https://image.tmdb.org/t/p/w500/'+poster
self.vote_average = vote_average
self.vote_count = vote_count
| class Movie:
"""
Movie class to define movie objects
"""
def __init__(self, id, title, overview, poster, vote_average, vote_count):
self.id = id
self.title = title
self.overview = overview
self.poster = 'https://image.tmdb.org/t/p/w500/' + poster
self.vote_average = vote_average
self.vote_count = vote_count |
'''
Copyright 2018 Dustin Roeder (dmroeder@gmail.com)
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
'''
class LGXDevice():
def __init__(self):
# structure of a logix device
self.Length=None
self.EncapsulationVersion=None
self.IPAddress=None
self.VendorID=None
self.Vendor=None
self.DeviceID=None
self.DeviceType=""
self.ProductCode=None
self.Revision=None
self.Status=None
self.SerialNumber=None
self.ProductNameLength=None
self.ProductName=""
self.State=None
def GetDevice(deviceID):
if deviceID in devices.keys():
return devices[deviceID]
else:
return "Unknown"
def GetVendor(vendorID):
if vendorID in vendors.keys():
return vendors[vendorID]
else:
return "Unknown"
# List originally came from Wireshark /epan/dissectors/packet-cip.c
devices = {0x00: 'Generic Device (deprecated)',
0x02: 'AC Drive',
0x03: 'Motor Overload',
0x04: 'Limit Switch',
0x05: 'Inductive Proximity Switch',
0x06: 'Photoelectric Sensor',
0x07: 'General Purpose Discrete I/O',
0x09: 'Resolver',
0x0C: 'Communications Adapter',
0x0E: 'Programmable Logic Controller',
0x10: 'Position Controller',
0x13: 'DC Drive',
0x15: 'Contactor',
0x16: 'Motor Starter',
0x17: 'Soft Start',
0x18: 'Human-Machine Interface',
0x1A: 'Mass Flow Controller',
0x1B: 'Pneumatic Valve',
0x1C: 'Vacuum Pressure Gauge',
0x1D: 'Process Control Value',
0x1E: 'Residual Gas Analyzer',
0x1F: 'DC Power Generator',
0x20: 'RF Power Generator',
0x21: 'Turbomolecular Vacuum Pump',
0x22: 'Encoder',
0x23: 'Safety Discrete I/O Device',
0x24: 'Fluid Flow Controller',
0x25: 'CIP Motion Drive',
0x26: 'CompoNet Repeater',
0x27: 'Mass Flow Controller, Enhanced',
0x28: 'CIP Modbus Device',
0x29: 'CIP Modbus Translator',
0x2A: 'Safety Analog I/O Device',
0x2B: 'Generic Device (keyable)',
0x2C: 'Managed Switch',
0x32: 'ControlNet Physical Layer Component'}
# List originally came from Wireshark /epan/dissectors/packet-cip.c
vendors = {0: 'Reserved',
1: 'Rockwell Automation/Allen-Bradley',
2: 'Namco Controls Corp.',
3: 'Honeywell Inc.',
4: 'Parker Hannifin Corp. (Veriflo Division)',
5: 'Rockwell Automation/Reliance Elec.',
6: 'Reserved',
7: 'SMC Corporation',
8: 'Molex Incorporated',
9: 'Western Reserve Controls Corp.',
10: 'Advanced Micro Controls Inc. (AMCI)',
11: 'ASCO Pneumatic Controls',
12: 'Banner Engineering Corp.',
13: 'Belden Wire & Cable Company',
14: 'Cooper Interconnect',
15: 'Reserved',
16: 'Daniel Woodhead Co. (Woodhead Connectivity)',
17: 'Dearborn Group Inc.',
18: 'Reserved',
19: 'Helm Instrument Company',
20: 'Huron Net Works',
21: 'Lumberg, Inc.',
22: 'Online Development Inc.(Automation Value)',
23: 'Vorne Industries, Inc.',
24: 'ODVA Special Reserve',
25: 'Reserved',
26: 'Festo Corporation',
27: 'Reserved',
28: 'Reserved',
29: 'Reserved',
30: 'Unico, Inc.',
31: 'Ross Controls',
32: 'Reserved',
33: 'Reserved',
34: 'Hohner Corp.',
35: 'Micro Mo Electronics, Inc.',
36: 'MKS Instruments, Inc.',
37: 'Yaskawa Electric America formerly Magnetek Drives',
38: 'Reserved',
39: 'AVG Automation (Uticor)',
40: 'Wago Corporation',
41: 'Kinetics (Unit Instruments)',
42: 'IMI Norgren Limited',
43: 'BALLUFF, Inc.',
44: 'Yaskawa Electric America, Inc.',
45: 'Eurotherm Controls Inc',
46: 'ABB Industrial Systems',
47: 'Omron Corporation',
48: 'TURCk, Inc.',
49: 'Grayhill Inc.',
50: 'Real Time Automation (C&ID)',
51: 'Reserved',
52: 'Numatics, Inc.',
53: 'Lutze, Inc.',
54: 'Reserved',
55: 'Reserved',
56: 'Softing GmbH',
57: 'Pepperl + Fuchs',
58: 'Spectrum Controls, Inc.',
59: 'D.I.P. Inc. MKS Inst.',
60: 'Applied Motion Products, Inc.',
61: 'Sencon Inc.',
62: 'High Country Tek',
63: 'SWAC Automation Consult GmbH',
64: 'Clippard Instrument Laboratory',
65: 'Reserved',
66: 'Reserved',
67: 'Reserved',
68: 'Eaton Electrical',
69: 'Reserved',
70: 'Reserved',
71: 'Toshiba International Corp.',
72: 'Control Technology Incorporated',
73: 'TCS (NZ) Ltd.',
74: 'Hitachi, Ltd.',
75: 'ABB Robotics Products AB',
76: 'NKE Corporation',
77: 'Rockwell Software, Inc.',
78: 'Escort Memory Systems (A Datalogic Group Co.)',
79: 'Reserved',
80: 'Industrial Devices Corporation',
81: 'IXXAT Automation GmbH',
82: 'Mitsubishi Electric Automation, Inc.',
83: 'OPTO-22',
84: 'Reserved',
85: 'Reserved',
86: 'Horner Electric',
87: 'Burkert Werke GmbH & Co. KG',
88: 'Reserved',
89: 'Industrial Indexing Systems, Inc.',
90: 'HMS Industrial Networks AB',
91: 'Robicon',
92: 'Helix Technology (Granville-Phillips)',
93: 'Arlington Laboratory',
94: 'Advantech Co. Ltd.',
95: 'Square D Company',
96: 'Digital Electronics Corp.',
97: 'Danfoss',
98: 'Reserved',
99: 'Reserved',
100: 'Bosch Rexroth Corporation, Pneumatics',
101: 'Applied Materials, Inc.',
102: 'Showa Electric Wire & Cable Co.',
103: 'Pacific Scientific (API Controls Inc.)',
104: 'Sharp Manufacturing Systems Corp.',
105: 'Olflex Wire & Cable, Inc.',
106: 'Reserved',
107: 'Unitrode',
108: 'Beckhoff Automation GmbH',
109: 'National Instruments',
110: 'Mykrolis Corporations (Millipore)',
111: 'International Motion Controls Corp.',
112: 'Reserved',
113: 'SEG Kempen GmbH',
114: 'Reserved',
115: 'Reserved',
116: 'MTS Systems Corp.',
117: 'Krones, Inc',
118: 'Reserved',
119: 'EXOR Electronic R & D',
120: 'SIEI S.p.A.',
121: 'KUKA Roboter GmbH',
122: 'Reserved',
123: 'SEC (Samsung Electronics Co., Ltd)',
124: 'Binary Electronics Ltd',
125: 'Flexible Machine Controls',
126: 'Reserved',
127: 'ABB Inc. (Entrelec)',
128: 'MAC Valves, Inc.',
129: 'Auma Actuators Inc',
130: 'Toyoda Machine Works, Ltd',
131: 'Reserved',
132: 'Reserved',
133: 'Balogh T.A.G., Corporation',
134: 'TR Systemtechnik GmbH',
135: 'UNIPULSE Corporation',
136: 'Reserved',
137: 'Reserved',
138: 'Conxall Corporation Inc.',
139: 'Reserved',
140: 'Reserved',
141: 'Kuramo Electric Co., Ltd.',
142: 'Creative Micro Designs',
143: 'GE Industrial Systems',
144: 'Leybold Vacuum GmbH',
145: 'Siemens Energy & Automation/Drives',
146: 'Kodensha Ltd',
147: 'Motion Engineering, Inc.',
148: 'Honda Engineering Co., Ltd',
149: 'EIM Valve Controls',
150: 'Melec Inc.',
151: 'Sony Manufacturing Systems Corporation',
152: 'North American Mfg.',
153: 'WATLOW',
154: 'Japan Radio Co., Ltd',
155: 'NADEX Co., Ltd',
156: 'Ametek Automation & Process Technologies',
157: 'Reserved',
158: 'KVASER AB',
159: 'IDEC IZUMI Corporation',
160: 'Mitsubishi Heavy Industries Ltd',
161: 'Mitsubishi Electric Corporation',
162: 'Horiba-STEC Inc.',
163: 'esd electronic system design gmbh',
164: 'DAIHEN Corporation',
165: 'Tyco Valves & Controls/Keystone',
166: 'EBARA Corporation',
167: 'Reserved',
168: 'Reserved',
169: 'Hokuyo Electric Co. Ltd',
170: 'Pyramid Solutions, Inc.',
171: 'Denso Wave Incorporated',
172: 'HLS Hard-Line Solutions Inc',
173: 'Caterpillar, Inc.',
174: 'PDL Electronics Ltd.',
175: 'Reserved',
176: 'Red Lion Controls',
177: 'ANELVA Corporation',
178: 'Toyo Denki Seizo KK',
179: 'Sanyo Denki Co., Ltd',
180: 'Advanced Energy Japan K.K. (Aera Japan)',
181: 'Pilz GmbH & Co',
182: 'Marsh Bellofram-Bellofram PCD Division',
183: 'Reserved',
184: 'M-SYSTEM Co. Ltd',
185: 'Nissin Electric Co., Ltd',
186: 'Hitachi Metals Ltd.',
187: 'Oriental Motor Company',
188: 'A&D Co., Ltd',
189: 'Phasetronics, Inc.',
190: 'Cummins Engine Company',
191: 'Deltron Inc.',
192: 'Geneer Corporation',
193: 'Anatol Automation, Inc.',
194: 'Reserved',
195: 'Reserved',
196: 'Medar, Inc.',
197: 'Comdel Inc.',
198: 'Advanced Energy Industries, Inc',
199: 'Reserved',
200: 'DAIDEN Co., Ltd',
201: 'CKD Corporation',
202: 'Toyo Electric Corporation',
203: 'Reserved',
204: 'AuCom Electronics Ltd',
205: 'Shinko Electric Co., Ltd',
206: 'Vector Informatik GmbH',
207: 'Reserved',
208: 'Moog Inc.',
209: 'Contemporary Controls',
210: 'Tokyo Sokki Kenkyujo Co., Ltd',
211: 'Schenck-AccuRate, Inc.',
212: 'The Oilgear Company',
213: 'Reserved',
214: 'ASM Japan K.K.',
215: 'HIRATA Corp.',
216: 'SUNX Limited',
217: 'Meidensha Corp.',
218: 'NIDEC SANKYO CORPORATION (Sankyo Seiki Mfg. Co., Ltd)',
219: 'KAMRO Corp.',
220: 'Nippon System Development Co., Ltd',
221: 'EBARA Technologies Inc.',
222: 'Reserved',
223: 'Reserved',
224: 'SG Co., Ltd',
225: 'Vaasa Institute of Technology',
226: 'MKS Instruments (ENI Technology)',
227: 'Tateyama System Laboratory Co., Ltd.',
228: 'QLOG Corporation',
229: 'Matric Limited Inc.',
230: 'NSD Corporation',
231: 'Reserved',
232: 'Sumitomo Wiring Systems, Ltd',
233: 'Group 3 Technology Ltd',
234: 'CTI Cryogenics',
235: 'POLSYS CORP',
236: 'Ampere Inc.',
237: 'Reserved',
238: 'Simplatroll Ltd',
239: 'Reserved',
240: 'Reserved',
241: 'Leading Edge Design',
242: 'Humphrey Products',
243: 'Schneider Automation, Inc.',
244: 'Westlock Controls Corp.',
245: 'Nihon Weidmuller Co., Ltd',
246: 'Brooks Instrument (Div. of Emerson)',
247: 'Reserved',
248: ' Moeller GmbH',
249: 'Varian Vacuum Products',
250: 'Yokogawa Electric Corporation',
251: 'Electrical Design Daiyu Co., Ltd',
252: 'Omron Software Co., Ltd',
253: 'BOC Edwards',
254: 'Control Technology Corporation',
255: 'Bosch Rexroth',
256: 'Turck',
257: 'Control Techniques PLC',
258: 'Hardy Instruments, Inc.',
259: 'LS Industrial Systems',
260: 'E.O.A. Systems Inc.',
261: 'Reserved',
262: 'New Cosmos Electric Co., Ltd.',
263: 'Sense Eletronica LTDA',
264: 'Xycom, Inc.',
265: 'Baldor Electric',
266: 'Reserved',
267: 'Patlite Corporation',
268: 'Reserved',
269: 'Mogami Wire & Cable Corporation',
270: 'Welding Technology Corporation (WTC)',
271: 'Reserved',
272: 'Deutschmann Automation GmbH',
273: 'ICP Panel-Tec Inc.',
274: 'Bray Controls USA',
275: 'Reserved',
276: 'Status Technologies',
277: 'Trio Motion Technology Ltd',
278: 'Sherrex Systems Ltd',
279: 'Adept Technology, Inc.',
280: 'Spang Power Electronics',
281: 'Reserved',
282: 'Acrosser Technology Co., Ltd',
283: 'Hilscher GmbH',
284: 'IMAX Corporation',
285: 'Electronic Innovation, Inc. (Falter Engineering)',
286: 'Netlogic Inc.',
287: 'Bosch Rexroth Corporation, Indramat',
288: 'Reserved',
289: 'Reserved',
290: 'Murata Machinery Ltd.',
291: 'MTT Company Ltd.',
292: 'Kanematsu Semiconductor Corp.',
293: 'Takebishi Electric Sales Co.',
294: 'Tokyo Electron Device Ltd',
295: 'PFU Limited',
296: 'Hakko Automation Co., Ltd.',
297: 'Advanet Inc.',
298: 'Tokyo Electron Software Technologies Ltd.',
299: 'Reserved',
300: 'Shinagawa Electric Wire Co., Ltd.',
301: 'Yokogawa M&C Corporation',
302: 'KONAN Electric Co., Ltd.',
303: 'Binar Elektronik AB',
304: 'Furukawa Electric Co.',
305: 'Cooper Energy Services',
306: 'Schleicher GmbH & Co.',
307: 'Hirose Electric Co., Ltd',
308: 'Western Servo Design Inc.',
309: 'Prosoft Technology',
310: 'Reserved',
311: 'Towa Shoko Co., Ltd',
312: 'Kyopal Co., Ltd',
313: 'Extron Co.',
314: 'Wieland Electric GmbH',
315: 'SEW Eurodrive GmbH',
316: 'Aera Corporation',
317: 'STA Reutlingen',
318: 'Reserved',
319: 'Fuji Electric Co., Ltd.',
320: 'Reserved',
321: 'Reserved',
322: 'ifm efector, inc.',
323: 'Reserved',
324: 'IDEACOD-Hohner Automation S.A.',
325: 'CommScope Inc.',
326: 'GE Fanuc Automation North America, Inc.',
327: 'Matsushita Electric Industrial Co., Ltd',
328: 'Okaya Electronics Corporation',
329: 'KASHIYAMA Industries, Ltd',
330: 'JVC',
331: 'Interface Corporation',
332: 'Grape Systems Inc.',
333: 'Reserved',
334: 'Reserved',
335: 'Toshiba IT & Control Systems Corporation',
336: 'Sanyo Machine Works, Ltd.',
337: 'Vansco Electronics Ltd.',
338: 'Dart Container Corp.',
339: 'Livingston & Co., Inc.',
340: 'Alfa Laval LKM as',
341: 'BF ENTRON Ltd. (British Federal)',
342: 'Bekaert Engineering NV',
343: 'Ferran Scientific Inc.',
344: 'KEBA AG',
345: 'Endress + Hauser',
346: 'Reserved',
347: 'ABB ALSTOM Power UK Ltd. (EGT)',
348: 'Berger Lahr GmbH',
349: 'Reserved',
350: 'Federal Signal Corp.',
351: 'Kawasaki Robotics (USA), Inc.',
352: 'Bently Nevada Corporation',
353: 'Reserved',
354: 'FRABA Posital GmbH',
355: 'Elsag Bailey, Inc.',
356: 'Fanuc Robotics America',
357: 'Reserved',
358: 'Surface Combustion, Inc.',
359: 'Reserved',
360: 'AILES Electronics Ind. Co., Ltd.',
361: 'Wonderware Corporation',
362: 'Particle Measuring Systems, Inc.',
363: 'Reserved',
364: 'Reserved',
365: 'BITS Co., Ltd',
366: 'Japan Aviation Electronics Industry Ltd',
367: 'Keyence Corporation',
368: 'Kuroda Precision Industries Ltd.',
369: 'Mitsubishi Electric Semiconductor Application',
370: 'Nippon Seisen Cable, Ltd.',
371: 'Omron ASO Co., Ltd',
372: 'Seiko Seiki Co., Ltd.',
373: 'Sumitomo Heavy Industries, Ltd.',
374: 'Tango Computer Service Corporation',
375: 'Technology Service, Inc.',
376: 'Toshiba Information Systems (Japan) Corporation',
377: 'TOSHIBA Schneider Inverter Corporation',
378: 'Toyooki Kogyo Co., Ltd.',
379: 'XEBEC',
380: 'Madison Cable Corporation',
381: 'Hitati Engineering & Services Co., Ltd',
382: 'TEM-TECH Lab Co., Ltd',
383: 'International Laboratory Corporation',
384: 'Dyadic Systems Co., Ltd.',
385: 'SETO Electronics Industry Co., Ltd',
386: 'Tokyo Electron Kyushu Limited',
387: 'KEI System Co., Ltd',
388: 'Reserved',
389: 'Asahi Engineering Co., Ltd',
390: 'Contrex Inc.',
391: 'Paradigm Controls Ltd.',
392: 'Reserved',
393: 'Ohm Electric Co., Ltd.',
394: 'RKC Instrument Inc.',
395: 'Suzuki Motor Corporation',
396: 'Custom Servo Motors Inc.',
397: 'PACE Control Systems',
398: 'Reserved',
399: 'Reserved',
400: 'LINTEC Co., Ltd.',
401: 'Hitachi Cable Ltd.',
402: 'BUSWARE Direct',
403: 'Eaton Electric B.V. (former Holec Holland N.V.)',
404: 'VAT Vakuumventile AG',
405: 'Scientific Technologies Incorporated',
406: 'Alfa Instrumentos Eletronicos Ltda',
407: 'TWK Elektronik GmbH',
408: 'ABB Welding Systems AB',
409: 'BYSTRONIC Maschinen AG',
410: 'Kimura Electric Co., Ltd',
411: 'Nissei Plastic Industrial Co., Ltd',
412: 'Reserved',
413: 'Kistler-Morse Corporation',
414: 'Proteous Industries Inc.',
415: 'IDC Corporation',
416: 'Nordson Corporation',
417: 'Rapistan Systems',
418: 'LP-Elektronik GmbH',
419: 'GERBI & FASE S.p.A.(Fase Saldatura)',
420: 'Phoenix Digital Corporation',
421: 'Z-World Engineering',
422: 'Honda R&D Co., Ltd.',
423: 'Bionics Instrument Co., Ltd.',
424: 'Teknic, Inc.',
425: 'R.Stahl, Inc.',
426: 'Reserved',
427: 'Ryco Graphic Manufacturing Inc.',
428: 'Giddings & Lewis, Inc.',
429: 'Koganei Corporation',
430: 'Reserved',
431: 'Nichigoh Communication Electric Wire Co., Ltd.',
432: 'Reserved',
433: 'Fujikura Ltd.',
434: 'AD Link Technology Inc.',
435: 'StoneL Corporation',
436: 'Computer Optical Products, Inc.',
437: 'CONOS Inc.',
438: 'Erhardt + Leimer GmbH',
439: 'UNIQUE Co. Ltd',
440: 'Roboticsware, Inc.',
441: 'Nachi Fujikoshi Corporation',
442: 'Hengstler GmbH',
443: 'Reserved',
444: 'SUNNY GIKEN Inc.',
445: 'Lenze Drive Systems GmbH',
446: 'CD Systems B.V.',
447: 'FMT/Aircraft Gate Support Systems AB',
448: 'Axiomatic Technologies Corp',
449: 'Embedded System Products, Inc.',
450: 'Reserved',
451: 'Mencom Corporation',
452: 'Reserved',453: 'Matsushita Welding Systems Co., Ltd.',
454: 'Dengensha Mfg. Co. Ltd.',
455: 'Quinn Systems Ltd.',
456: 'Tellima Technology Ltd',
457: 'MDT, Software',
458: 'Taiwan Keiso Co., Ltd',
459: 'Pinnacle Systems',
460: 'Ascom Hasler Mailing Sys',
461: 'INSTRUMAR Limited',
462: 'Reserved',
463: 'Navistar International Transportation Corp',
464: 'Huettinger Elektronik GmbH + Co. KG',
465: 'OCM Technology Inc.',
466: 'Professional Supply Inc.',
468: 'Baumer IVO GmbH & Co. KG',
469: 'Worcester Controls Corporation',
470: 'Pyramid Technical Consultants, Inc.',
471: 'Reserved',
472: 'Apollo Fire Detectors Limited',
473: 'Avtron Manufacturing, Inc.',
474: 'Reserved',
475: 'Tokyo Keiso Co., Ltd.',
476: 'Daishowa Swiki Co., Ltd.',
477: 'Kojima Instruments Inc.',
478: 'Shimadzu Corporation',
479: 'Tatsuta Electric Wire & Cable Co., Ltd.',
480: 'MECS Corporation',
481: 'Tahara Electric',
482: 'Koyo Electronics',
483: 'Clever Devices',
484: 'GCD Hardware & Software GmbH',
485: 'Reserved',
486: 'Miller Electric Mfg Co.',
487: 'GEA Tuchenhagen GmbH',
488: 'Riken Keiki Co., LTD',
489: 'Keisokugiken Corporation',
490: 'Fuji Machine Mfg. Co., Ltd',
491: 'Reserved',
492: 'Nidec-Shimpo Corp.',
493: 'UTEC Corporation',
494: 'Sanyo Electric Co. Ltd.',
495: 'Reserved',
496: 'Reserved',
497: 'Okano Electric Wire Co. Ltd',
498: 'Shimaden Co. Ltd.',
499: 'Teddington Controls Ltd',
500: 'Reserved',
501: 'VIPA GmbH',
502: 'Warwick Manufacturing Group',
503: 'Danaher Controls',
504: 'Reserved',
505: 'Reserved',
506: 'American Science & Engineering',
507: 'Accutron Controls International Inc.',
508: 'Norcott Technologies Ltd',
509: 'TB Woods, Inc',
510: 'Proportion-Air, Inc.',
511: 'SICK Stegmann GmbH',
512: 'Reserved',
513: 'Edwards Signaling',
514: 'Sumitomo Metal Industries, Ltd',
515: 'Cosmo Instruments Co., Ltd.',
516: 'Denshosha Co., Ltd.',
517: 'Kaijo Corp.',
518: 'Michiproducts Co., Ltd.',
519: 'Miura Corporation',
520: 'TG Information Network Co., Ltd.',
521: 'Fujikin , Inc.',
522: 'Estic Corp.',
523: 'GS Hydraulic Sales',
524: 'Reserved',
525: 'MTE Limited',
526: 'Hyde Park Electronics, Inc.',
527: 'Pfeiffer Vacuum GmbH',
528: 'Cyberlogic Technologies',
529: 'OKUMA Corporation FA Systems Division',
530: 'Reserved',
531: 'Hitachi Kokusai Electric Co., Ltd.',
532: 'SHINKO TECHNOS Co., Ltd.',
533: 'Itoh Electric Co., Ltd.',
534: 'Colorado Flow Tech Inc.',
535: 'Love Controls Division/Dwyer Inst.',
536: 'Alstom Drives and Controls',
537: 'The Foxboro Company',
538: 'Tescom Corporation',
539: 'Reserved',
540: 'Atlas Copco Controls UK',
541: 'Reserved',
542: 'Autojet Technologies',
543: 'Prima Electronics S.p.A.',
544: 'PMA GmbH',
545: 'Shimafuji Electric Co., Ltd',
546: 'Oki Electric Industry Co., Ltd',
547: 'Kyushu Matsushita Electric Co., Ltd',
548: 'Nihon Electric Wire & Cable Co., Ltd',
549: 'Tsuken Electric Ind Co., Ltd',
550: 'Tamadic Co.',
551: 'MAATEL SA',
552: 'OKUMA America',
554: 'TPC Wire & Cable',
555: 'ATI Industrial Automation',
557: 'Serra Soldadura, S.A.',
558: 'Southwest Research Institute',
559: 'Cabinplant International',
560: 'Sartorius Mechatronics T&H GmbH',
561: 'Comau S.p.A. Robotics & Final Assembly Division',
562: 'Phoenix Contact',
563: 'Yokogawa MAT Corporation',
564: 'asahi sangyo co., ltd.',
565: 'Reserved',
566: 'Akita Myotoku Ltd.',
567: 'OBARA Corp.',
568: 'Suetron Electronic GmbH',
569: 'Reserved',
570: 'Serck Controls Limited',
571: 'Fairchild Industrial Products Company',
572: 'ARO S.A.',
573: 'M2C GmbH',
574: 'Shin Caterpillar Mitsubishi Ltd.',
575: 'Santest Co., Ltd.',
576: 'Cosmotechs Co., Ltd.',
577: 'Hitachi Electric Systems',
578: 'Smartscan Ltd',
579: 'Woodhead Software & Electronics France',
580: 'Athena Controls, Inc.',
581: 'Syron Engineering & Manufacturing, Inc.',
582: 'Asahi Optical Co., Ltd.',
583: 'Sansha Electric Mfg. Co., Ltd.',
584: 'Nikki Denso Co., Ltd.',
585: 'Star Micronics, Co., Ltd.',
586: 'Ecotecnia Socirtat Corp.',
587: 'AC Technology Corp.',
588: 'West Instruments Limited',
589: 'NTI Limited',
590: 'Delta Computer Systems, Inc.',
591: 'FANUC Ltd.',
592: 'Hearn-Gu Lee',
593: 'ABB Automation Products',
594: 'Orion Machinery Co., Ltd.',
595: 'Reserved',
596: 'Wire-Pro, Inc.',
597: 'Beijing Huakong Technology Co. Ltd.',
598: 'Yokoyama Shokai Co., Ltd.',
599: 'Toyogiken Co., Ltd.',
600: 'Coester Equipamentos Eletronicos Ltda.',
601: 'Reserved',
602: 'Electroplating Engineers of Japan Ltd.',
603: 'ROBOX S.p.A.',
604: 'Spraying Systems Company',
605: 'Benshaw Inc.',
606: 'ZPA-DP A.S.',
607: 'Wired Rite Systems',
608: 'Tandis Research, Inc.',
609: 'SSD Drives GmbH',
610: 'ULVAC Japan Ltd.',
611: 'DYNAX Corporation',
612: 'Nor-Cal Products, Inc.',
613: 'Aros Electronics AB',
614: 'Jun-Tech Co., Ltd.',
615: 'HAN-MI Co. Ltd.',
616: 'uniNtech (formerly SungGi Internet)',
617: 'Hae Pyung Electronics Reserch Institute',
618: 'Milwaukee Electronics',
619: 'OBERG Industries',
620: 'Parker Hannifin/Compumotor Division',
621: 'TECHNO DIGITAL CORPORATION',
622: 'Network Supply Co., Ltd.',
623: 'Union Electronics Co., Ltd.',
624: 'Tritronics Services PM Ltd.',
625: 'Rockwell Automation-Sprecher+Schuh',
626: 'Matsushita Electric Industrial Co., Ltd/Motor Co.',
627: 'Rolls-Royce Energy Systems, Inc.',
628: 'JEONGIL INTERCOM CO., LTD',
629: 'Interroll Corp.',
630: 'Hubbell Wiring Device-Kellems (Delaware)',
631: 'Intelligent Motion Systems',
632: 'Reserved',
633: 'INFICON AG',
634: 'Hirschmann, Inc.',
635: 'The Siemon Company',
636: 'YAMAHA Motor Co. Ltd.',
637: 'aska corporation',
638: 'Woodhead Connectivity',
639: 'Trimble AB',
640: 'Murrelektronik GmbH',
641: 'Creatrix Labs, Inc.',
642: 'TopWorx',
643: 'Kumho Industrial Co., Ltd.',
644: 'Wind River Systems, Inc.',
645: 'Bihl & Wiedemann GmbH',
646: 'Harmonic Drive Systems Inc.',
647: 'Rikei Corporation',
648: 'BL Autotec, Ltd.',
649: 'Hana Information & Technology Co., Ltd.',
650: 'Seoil Electric Co., Ltd.',
651: 'Fife Corporation',
652: 'Shanghai Electrical Apparatus Research Institute',
653: 'Reserved',
654: 'Parasense Development Centre',
655: 'Reserved',
656: 'Reserved',
657: 'Six Tau S.p.A.',
658: 'Aucos GmbH',
659: 'Rotork Controls',
660: 'Automationdirect.com',
661: 'Thermo BLH',
662: 'System Controls, Ltd.',
663: 'Univer S.p.A.',
664: 'MKS-Tenta Technology',
665: 'Lika Electronic SNC',
666: 'Mettler-Toledo, Inc.',
667: 'DXL USA Inc.',
668: 'Rockwell Automation/Entek IRD Intl.',
669: 'Nippon Otis Elevator Company',
670: 'Sinano Electric, Co., Ltd.',
671: 'Sony Manufacturing Systems',
672: 'Reserved',
673: 'Contec Co., Ltd.',
674: 'Automated Solutions',
675: 'Controlweigh',
676: 'Reserved',
677: 'Fincor Electronics',
678: 'Cognex Corporation',
679: 'Qualiflow',
680: 'Weidmuller, Inc.',
681: 'Morinaga Milk Industry Co., Ltd.',
682: 'Takagi Industrial Co., Ltd.',
683: 'Wittenstein AG',
684: 'Sena Technologies, Inc.',
685: 'Reserved',
686: 'APV Products Unna',
687: 'Creator Teknisk Utvedkling AB',
688: 'Reserved',
689: 'Mibu Denki Industrial Co., Ltd.',
690: 'Takamastsu Machineer Section',
691: 'Startco Engineering Ltd.',
692: 'Reserved',
693: 'Holjeron',
694: 'ALCATEL High Vacuum Technology',
695: 'Taesan LCD Co., Ltd.',
696: 'POSCON',
697: 'VMIC',
698: 'Matsushita Electric Works, Ltd.',
699: 'IAI Corporation',
700: 'Horst GmbH',
701: 'MicroControl GmbH & Co.',
702: 'Leine & Linde AB',
703: 'Reserved',
704: 'EC Elettronica Srl',
705: 'VIT Software HB',
706: 'Bronkhorst High-Tech B.V.',
707: 'Optex Co., Ltd.',
708: 'Yosio Electronic Co.',
709: 'Terasaki Electric Co., Ltd.',
710: 'Sodick Co., Ltd.',
711: 'MTS Systems Corporation-Automation Division',
712: 'Mesa Systemtechnik',
713: 'SHIN HO SYSTEM Co., Ltd.',
714: 'Goyo Electronics Co, Ltd.',
715: 'Loreme',
716: 'SAB Brockskes GmbH & Co. KG',
717: 'Trumpf Laser GmbH + Co. KG',
718: 'Niigata Electronic Instruments Co., Ltd.',
719: 'Yokogawa Digital Computer Corporation',
720: 'O.N. Electronic Co., Ltd.',
721: 'Industrial Control Communication, Inc.',
722: 'ABB, Inc.',
723: 'ElectroWave USA, Inc.',
724: 'Industrial Network Controls, LLC',
725: 'KDT Systems Co., Ltd.',
726: 'SEFA Technology Inc.',
727: 'Nippon POP Rivets and Fasteners Ltd.',
728: 'Yamato Scale Co., Ltd.',
729: 'Zener Electric',
730: 'GSE Scale Systems',
731: 'ISAS (Integrated Switchgear & Sys. Pty Ltd)',
732: 'Beta LaserMike Limited',
733: 'TOEI Electric Co., Ltd.',
734: 'Hakko Electronics Co., Ltd',
735: 'Reserved',
736: 'RFID, Inc.',
737: 'Adwin Corporation',
738: 'Osaka Vacuum, Ltd.',
739: 'A-Kyung Motion, Inc.',
740: 'Camozzi S.P. A.',
741: 'Crevis Co., LTD',
742: 'Rice Lake Weighing Systems',
743: 'Linux Network Services',
744: 'KEB Antriebstechnik GmbH',
745: 'Hagiwara Electric Co., Ltd.',
746: 'Glass Inc. International',
747: 'Reserved',
748: 'DVT Corporation',
749: 'Woodward Governor',
750: 'Mosaic Systems, Inc.',
751: 'Laserline GmbH',
752: 'COM-TEC, Inc.',
753: 'Weed Instrument',
754: 'Prof-face European Technology Center',
755: 'Fuji Automation Co., Ltd.',
756: 'Matsutame Co., Ltd.',
757: 'Hitachi Via Mechanics, Ltd.',
758: 'Dainippon Screen Mfg. Co. Ltd.',
759: 'FLS Automation A/S',
760: 'ABB Stotz Kontakt GmbH',
761: 'Technical Marine Service',
762: 'Advanced Automation Associates, Inc.',
763: 'Baumer Ident GmbH',
764: 'Tsubakimoto Chain Co.',
765: 'Reserved',
766: 'Furukawa Co., Ltd.',
767: 'Active Power',
768: 'CSIRO Mining Automation',
769: 'Matrix Integrated Systems',
770: 'Digitronic Automationsanlagen GmbH',
771: 'SICK STEGMANN Inc.',
772: 'TAE-Antriebstechnik GmbH',
773: 'Electronic Solutions',
774: 'Rocon L.L.C.',
775: 'Dijitized Communications Inc.',
776: 'Asahi Organic Chemicals Industry Co., Ltd.',
777: 'Hodensha',
778: 'Harting, Inc. NA',
779: 'Kubler GmbH',
780: 'Yamatake Corporation',
781: 'JEOL',
782: 'Yamatake Industrial Systems Co., Ltd.',
783: 'HAEHNE Elektronische Messgerate GmbH',
784: 'Ci Technologies Pty Ltd (for Pelamos Industries)',
785: 'N. SCHLUMBERGER & CIE',
786: 'Teijin Seiki Co., Ltd.',
787: 'DAIKIN Industries, Ltd',
788: 'RyuSyo Industrial Co., Ltd.',
789: 'SAGINOMIYA SEISAKUSHO, INC.',
790: 'Seishin Engineering Co., Ltd.',
791: 'Japan Support System Ltd.',
792: 'Decsys',
793: 'Metronix Messgerate u. Elektronik GmbH',
794: 'Reserved',
795: 'Vaccon Company, Inc.',
796: 'Siemens Energy & Automation, Inc.',
797: 'Ten X Technology, Inc.',
798: 'Tyco Electronics',
799: 'Delta Power Electronics Center',
800: 'Denker',
801: 'Autonics Corporation',
802: 'JFE Electronic Engineering Pty. Ltd.',
803: 'Reserved',
804: 'Electro-Sensors, Inc.',
805: 'Digi International, Inc.',
806: 'Texas Instruments',
807: 'ADTEC Plasma Technology Co., Ltd',
808: 'SICK AG',
809: 'Ethernet Peripherals, Inc.',
810: 'Animatics Corporation',
811: 'Reserved',
812: 'Process Control Corporation',
813: 'SystemV. Inc.',
814: 'Danaher Motion SRL',
815: 'SHINKAWA Sensor Technology, Inc.',
816: 'Tesch GmbH & Co. KG',
817: 'Reserved',
818: 'Trend Controls Systems Ltd.',
819: 'Guangzhou ZHIYUAN Electronic Co., Ltd.',
820: 'Mykrolis Corporation',
821: 'Bethlehem Steel Corporation',
822: 'KK ICP',
823: 'Takemoto Denki Corporation',
824: 'The Montalvo Corporation',
825: 'Reserved',
826: 'LEONI Special Cables GmbH',
827: 'Reserved',
828: 'ONO SOKKI CO.,LTD.',
829: 'Rockwell Samsung Automation',
830: 'SHINDENGEN ELECTRIC MFG. CO. LTD',
831: 'Origin Electric Co. Ltd.',
832: 'Quest Technical Solutions, Inc.',
833: 'LS Cable, Ltd.',
834: 'Enercon-Nord Electronic GmbH',
835: 'Northwire Inc.',
836: 'Engel Elektroantriebe GmbH',
837: 'The Stanley Works',
838: 'Celesco Transducer Products, Inc.',
839: 'Chugoku Electric Wire and Cable Co.',
840: 'Kongsberg Simrad AS',
841: 'Panduit Corporation',
842: 'Spellman High Voltage Electronics Corp.',
843: 'Kokusai Electric Alpha Co., Ltd.',
844: 'Brooks Automation, Inc.',
845: 'ANYWIRE CORPORATION',
846: 'Honda Electronics Co. Ltd',
847: 'REO Elektronik AG',
848: 'Fusion UV Systems, Inc.',
849: 'ASI Advanced Semiconductor Instruments GmbH',
850: 'Datalogic, Inc.',
851: 'SoftPLC Corporation',
852: 'Dynisco Instruments LLC',
853: 'WEG Industrias SA',
854: 'Frontline Test Equipment, Inc.',
855: 'Tamagawa Seiki Co., Ltd.',
856: 'Multi Computing Co., Ltd.',
857: 'RVSI',
858: 'Commercial Timesharing Inc.',
859: 'Tennessee Rand Automation LLC',
860: 'Wacogiken Co., Ltd',
861: 'Reflex Integration Inc.',
862: 'Siemens AG, A&D PI Flow Instruments',
863: 'G. Bachmann Electronic GmbH',
864: 'NT International',
865: 'Schweitzer Engineering Laboratories',
866: 'ATR Industrie-Elektronik GmbH Co.',
867: 'PLASMATECH Co., Ltd',
868: 'Reserved',
869: 'GEMU GmbH & Co. KG',
870: 'Alcorn McBride Inc.',
871: 'MORI SEIKI CO., LTD',
872: 'NodeTech Systems Ltd',
873: 'Emhart Teknologies',
874: 'Cervis, Inc.',
875: 'FieldServer Technologies (Div Sierra Monitor Corp)',
876: 'NEDAP Power Supplies',
877: 'Nippon Sanso Corporation',
878: 'Mitomi Giken Co., Ltd.',
879: 'PULS GmbH',
880: 'Reserved',
881: 'Japan Control Engineering Ltd',
882: 'Embedded Systems Korea (Former Zues Emtek Co Ltd.)',
883: 'Automa SRL',
884: 'Harms+Wende GmbH & Co KG',
885: 'SAE-STAHL GmbH',
886: 'Microwave Data Systems',
887: 'Bernecker + Rainer Industrie-Elektronik GmbH',
888: 'Hiprom Technologies',
889: 'Reserved',
890: 'Nitta Corporation',
891: 'Kontron Modular Computers GmbH',
892: 'Marlin Controls',
893: 'ELCIS s.r.l.',
894: 'Acromag, Inc.',
895: 'Avery Weigh-Tronix',
896: 'Reserved',
897: 'Reserved',
898: 'Reserved',
899: 'Practicon Ltd',
900: 'Schunk GmbH & Co. KG',
901: 'MYNAH Technologies',
902: 'Defontaine Groupe',
903: 'Emerson Process Management Power & Water Solutions',
904: 'F.A. Elec',
905: 'Hottinger Baldwin Messtechnik GmbH',
906: 'Coreco Imaging, Inc.',
907: 'London Electronics Ltd.',
908: 'HSD SpA',
909: 'Comtrol Corporation',
910: 'TEAM, S.A. (Tecnica Electronica de Automatismo Y Medida)',
911: 'MAN B&W Diesel Ltd. Regulateurs Europa',
912: 'Reserved',
913: 'Reserved',
914: 'Micro Motion, Inc.',
915: 'Eckelmann AG',
916: 'Hanyoung Nux',
917: 'Ransburg Industrial Finishing KK',
918: 'Kun Hung Electric Co. Ltd.',
919: 'Brimos wegbebakening b.v.',
920: 'Nitto Seiki Co., Ltd',
921: 'PPT Vision, Inc.',
922: 'Yamazaki Machinery Works',
923: 'SCHMIDT Technology GmbH',
924: 'Parker Hannifin SpA (SBC Division)',
925: 'HIMA Paul Hildebrandt GmbH',
926: 'RivaTek, Inc.',
927: 'Misumi Corporation',
928: 'GE Multilin',
929: 'Measurement Computing Corporation',
930: 'Jetter AG',
931: 'Tokyo Electronics Systems Corporation',
932: 'Togami Electric Mfg. Co., Ltd.',
933: 'HK Systems',
934: 'CDA Systems Ltd.',
935: 'Aerotech Inc.',
936: 'JVL Industrie Elektronik A/S',
937: 'NovaTech Process Solutions LLC',
938: 'Reserved',
939: 'Cisco Systems',
940: 'Grid Connect',
941: 'ITW Automotive Finishing',
942: 'HanYang System',
943: 'ABB K.K. Technical Center',
944: 'Taiyo Electric Wire & Cable Co., Ltd.',
945: 'Reserved',
946: 'SEREN IPS INC',
947: 'Belden CDT Electronics Division',
948: 'ControlNet International',
949: 'Gefran S.P.A.',
950: 'Jokab Safety AB',
951: 'SUMITA OPTICAL GLASS, INC.',
952: 'Biffi Italia srl',
953: 'Beck IPC GmbH',
954: 'Copley Controls Corporation',
955: 'Fagor Automation S. Coop.',
956: 'DARCOM',
957: 'Frick Controls (div. of York International)',
958: 'SymCom, Inc.',
959: 'Infranor',
960: 'Kyosan Cable, Ltd.',
961: 'Varian Vacuum Technologies',
962: 'Messung Systems',
963: 'Xantrex Technology, Inc.',
964: 'StarThis Inc.',
965: 'Chiyoda Co., Ltd.',
966: 'Flowserve Corporation',
967: 'Spyder Controls Corp.',
968: 'IBA AG',
969: 'SHIMOHIRA ELECTRIC MFG.CO.,LTD',
970: 'Reserved',
971: 'Siemens L&A',
972: 'Micro Innovations AG',
973: 'Switchgear & Instrumentation',
974: 'PRE-TECH CO., LTD.',
975: 'National Semiconductor',
976: 'Invensys Process Systems',
977: 'Ametek HDR Power Systems',
978: 'Reserved',
979: 'TETRA-K Corporation',
980: 'C & M Corporation',
981: 'Siempelkamp Maschinen',
982: 'Reserved',
983: 'Daifuku America Corporation',
984: 'Electro-Matic Products Inc.',
985: 'BUSSAN MICROELECTRONICS CORP.',
986: 'ELAU AG',
987: 'Hetronic USA',
988: 'NIIGATA POWER SYSTEMS Co., Ltd.',
989: 'Software Horizons Inc.',
990: 'B3 Systems, Inc.',
991: 'Moxa Networking Co., Ltd.',
992: 'Reserved',
993: 'S4 Integration',
994: 'Elettro Stemi S.R.L.',
995: 'AquaSensors',
996: 'Ifak System GmbH',
997: 'SANKEI MANUFACTURING Co.,LTD.',
998: 'Emerson Network Power Co., Ltd.',
999: 'Fairmount Automation, Inc.',
1000: 'Bird Electronic Corporation',
1001: 'Nabtesco Corporation',
1002: 'AGM Electronics, Inc.',
1003: 'ARCX Inc.',
1004: 'DELTA I/O Co.',
1005: 'Chun IL Electric Ind. Co.',
1006: 'N-Tron',
1007: 'Nippon Pneumatics/Fludics System CO.,LTD.',
1008: 'DDK Ltd.',
1009: 'Seiko Epson Corporation',
1010: 'Halstrup-Walcher GmbH',
1011: 'ITT',
1012: 'Ground Fault Systems bv',
1013: 'Scolari Engineering S.p.A.',
1014: 'Vialis Traffic bv',
1015: 'Weidmueller Interface GmbH & Co. KG',
1016: 'Shanghai Sibotech Automation Co. Ltd',
1017: 'AEG Power Supply Systems GmbH',
1018: 'Komatsu Electronics Inc.',
1019: 'Souriau',
1020: 'Baumuller Chicago Corp.',
1021: 'J. Schmalz GmbH',
1022: 'SEN Corporation',
1023: 'Korenix Technology Co. Ltd',
1024: 'Cooper Power Tools',
1025: 'INNOBIS',
1026: 'Shinho System',
1027: 'Xm Services Ltd.',
1028: 'KVC Co., Ltd.',
1029: 'Sanyu Seiki Co., Ltd.',
1030: 'TuxPLC',
1031: 'Northern Network Solutions',
1032: 'Converteam GmbH',
1033: 'Symbol Technologies',
1034: 'S-TEAM Lab',
1035: 'Maguire Products, Inc.',
1036: 'AC&T',
1037: 'MITSUBISHI HEAVY INDUSTRIES, LTD. KOBE SHIPYARD & MACHINERY WORKS',
1038: 'Hurletron Inc.',
1039: 'Chunichi Denshi Co., Ltd',
1040: 'Cardinal Scale Mfg. Co.',
1041: 'BTR NETCOM via RIA Connect, Inc.',
1042: 'Base2',
1043: 'ASRC Aerospace',
1044: 'Beijing Stone Automation',
1045: 'Changshu Switchgear Manufacture Ltd.',
1046: 'METRONIX Corp.',
1047: 'WIT',
1048: 'ORMEC Systems Corp.',
1049: 'ASATech (China) Inc.',
1050: 'Controlled Systems Limited',
1051: 'Mitsubishi Heavy Ind. Digital System Co., Ltd. (M.H.I.)',
1052: 'Electrogrip',
1053: 'TDS Automation',
1054: 'T&C Power Conversion, Inc.',
1055: 'Robostar Co., Ltd',
1056: 'Scancon A/S',
1057: 'Haas Automation, Inc.',
1058: 'Eshed Technology',
1059: 'Delta Electronic Inc.',
1060: 'Innovasic Semiconductor',
1061: 'SoftDEL Systems Limited',
1062: 'FiberFin, Inc.',
1063: 'Nicollet Technologies Corp.',
1064: 'B.F. Systems',
1065: 'Empire Wire and Supply LLC',
1066: 'Reserved',
1067: 'Elmo Motion Control LTD',
1068: 'Reserved',
1069: 'Asahi Keiki Co., Ltd.',
1070: 'Joy Mining Machinery',
1071: 'MPM Engineering Ltd',
1072: 'Wolke Inks & Printers GmbH',
1073: 'Mitsubishi Electric Engineering Co., Ltd.',
1074: 'COMET AG',
1075: 'Real Time Objects & Systems, LLC',
1076: 'MISCO Refractometer',
1077: 'JT Engineering Inc.',
1078: 'Automated Packing Systems',
1079: 'Niobrara R&D Corp.',
1080: 'Garmin Ltd.',
1081: 'Japan Mobile Platform Co., Ltd',
1082: 'Advosol Inc.',
1083: 'ABB Global Services Limited',
1084: 'Sciemetric Instruments Inc.',
1085: 'Tata Elxsi Ltd.',
1086: 'TPC Mechatronics, Co., Ltd.',
1087: 'Cooper Bussmann',
1088: 'Trinite Automatisering B.V.',
1089: 'Peek Traffic B.V.',
1090: 'Acrison, Inc',
1091: 'Applied Robotics, Inc.',
1092: 'FireBus Systems, Inc.',
1093: 'Beijing Sevenstar Huachuang Electronics',
1094: 'Magnetek',
1095: 'Microscan',
1096: 'Air Water Inc.',
1097: 'Sensopart Industriesensorik GmbH',
1098: 'Tiefenbach Control Systems GmbH',
1099: 'INOXPA S.A',
1100: 'Zurich University of Applied Sciences',
1101: 'Ethernet Direct',
1102: 'GSI-Micro-E Systems',
1103: 'S-Net Automation Co., Ltd.',
1104: 'Power Electronics S.L.',
1105: 'Renesas Technology Corp.',
1106: 'NSWCCD-SSES',
1107: 'Porter Engineering Ltd.',
1108: 'Meggitt Airdynamics, Inc.',
1109: 'Inductive Automation',
1110: 'Neural ID',
1111: 'EEPod LLC',
1112: 'Hitachi Industrial Equipment Systems Co., Ltd.',
1113: 'Salem Automation',
1114: 'port GmbH',
1115: 'B & PLUS',
1116: 'Graco Inc.',
1117: 'Altera Corporation',
1118: 'Technology Brewing Corporation',
1121: 'CSE Servelec',
1124: 'Fluke Networks',
1125: 'Tetra Pak Packaging Solutions SPA',
1126: 'Racine Federated, Inc.',
1127: 'Pureron Japan Co., Ltd.',
1130: 'Brother Industries, Ltd.',
1132: 'Leroy Automation',
1137: 'TR-Electronic GmbH',
1138: 'ASCON S.p.A.',
1139: 'Toledo do Brasil Industria de Balancas Ltda.',
1140: 'Bucyrus DBT Europe GmbH',
1141: 'Emerson Process Management Valve Automation',
1142: 'Alstom Transport',
1144: 'Matrox Electronic Systems',
1145: 'Littelfuse',
1146: 'PLASMART, Inc.',
1147: 'Miyachi Corporation',
1150: 'Promess Incorporated',
1151: 'COPA-DATA GmbH',
1152: 'Precision Engine Controls Corporation',
1153: 'Alga Automacao e controle LTDA',
1154: 'U.I. Lapp GmbH',
1155: 'ICES',
1156: 'Philips Lighting bv',
1157: 'Aseptomag AG',
1158: 'ARC Informatique',
1159: 'Hesmor GmbH',
1160: 'Kobe Steel, Ltd.',
1161: 'FLIR Systems',
1162: 'Simcon A/S',
1163: 'COPALP',
1164: 'Zypcom, Inc.',
1165: 'Swagelok',
1166: 'Elspec',
1167: 'ITT Water & Wastewater AB',
1168: 'Kunbus GmbH Industrial Communication',
1170: 'Performance Controls, Inc.',
1171: 'ACS Motion Control, Ltd.',
1173: 'IStar Technology Limited',
1174: 'Alicat Scientific, Inc.',
1176: 'ADFweb.com SRL',
1177: 'Tata Consultancy Services Limited',
1178: 'CXR Ltd.',
1179: 'Vishay Nobel AB',
1181: 'SolaHD',
1182: 'Endress+Hauser',
1183: 'Bartec GmbH',
1185: 'AccuSentry, Inc.',
1186: 'Exlar Corporation',
1187: 'ILS Technology',
1188: 'Control Concepts Inc.',
1190: 'Procon Engineering Limited',
1191: 'Hermary Opto Electronics Inc.',
1192: 'Q-Lambda',
1194: 'VAMP Ltd',
1195: 'FlexLink',
1196: 'Office FA.com Co., Ltd.',
1197: 'SPMC (Changzhou) Co. Ltd.',
1198: 'Anton Paar GmbH',
1199: 'Zhuzhou CSR Times Electric Co., Ltd.',
1200: 'DeStaCo',
1201: 'Synrad, Inc',
1202: 'Bonfiglioli Vectron GmbH',
1203: 'Pivotal Systems',
1204: 'TKSCT',
1205: 'Randy Nuernberger',
1206: 'CENTRALP',
1207: 'Tengen Group',
1208: 'OES, Inc.',
1209: 'Actel Corporation',
1210: 'Monaghan Engineering, Inc.',
1211: 'wenglor sensoric gmbh',
1212: 'HSA Systems',
1213: 'MK Precision Co., Ltd.',
1214: 'Tappan Wire and Cable',
1215: 'Heinzmann GmbH & Co. KG',
1216: 'Process Automation International Ltd.',
1217: 'Secure Crossing',
1218: 'SMA Railway Technology GmbH',
1219: 'FMS Force Measuring Systems AG',
1220: 'ABT Endustri Enerji Sistemleri Sanayi Tic. Ltd. Sti.',
1221: 'MagneMotion Inc.',
1222: 'STS Co., Ltd.',
1223: 'MERAK SIC, SA',
1224: 'ABOUNDI, Inc.',
1225: 'Rosemount Inc.',
1226: 'GEA FES, Inc.',
1227: 'TMG Technologie und Engineering GmbH',
1228: 'embeX GmbH',
1229: 'GH Electrotermia, S.A.',
1230: 'Tolomatic',
1231: 'Dukane',
1232: 'Elco (Tian Jin) Electronics Co., Ltd.',
1233: 'Jacobs Automation',
1234: 'Noda Radio Frequency Technologies Co., Ltd.',
1235: 'MSC Tuttlingen GmbH',
1236: 'Hitachi Cable Manchester',
1237: 'ACOREL SAS',
1238: 'Global Engineering Solutions Co., Ltd.',
1239: 'ALTE Transportation, S.L.',
1240: 'Penko Engineering B.V.'}
| """
Copyright 2018 Dustin Roeder (dmroeder@gmail.com)
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
"""
class Lgxdevice:
def __init__(self):
self.Length = None
self.EncapsulationVersion = None
self.IPAddress = None
self.VendorID = None
self.Vendor = None
self.DeviceID = None
self.DeviceType = ''
self.ProductCode = None
self.Revision = None
self.Status = None
self.SerialNumber = None
self.ProductNameLength = None
self.ProductName = ''
self.State = None
def get_device(deviceID):
if deviceID in devices.keys():
return devices[deviceID]
else:
return 'Unknown'
def get_vendor(vendorID):
if vendorID in vendors.keys():
return vendors[vendorID]
else:
return 'Unknown'
devices = {0: 'Generic Device (deprecated)', 2: 'AC Drive', 3: 'Motor Overload', 4: 'Limit Switch', 5: 'Inductive Proximity Switch', 6: 'Photoelectric Sensor', 7: 'General Purpose Discrete I/O', 9: 'Resolver', 12: 'Communications Adapter', 14: 'Programmable Logic Controller', 16: 'Position Controller', 19: 'DC Drive', 21: 'Contactor', 22: 'Motor Starter', 23: 'Soft Start', 24: 'Human-Machine Interface', 26: 'Mass Flow Controller', 27: 'Pneumatic Valve', 28: 'Vacuum Pressure Gauge', 29: 'Process Control Value', 30: 'Residual Gas Analyzer', 31: 'DC Power Generator', 32: 'RF Power Generator', 33: 'Turbomolecular Vacuum Pump', 34: 'Encoder', 35: 'Safety Discrete I/O Device', 36: 'Fluid Flow Controller', 37: 'CIP Motion Drive', 38: 'CompoNet Repeater', 39: 'Mass Flow Controller, Enhanced', 40: 'CIP Modbus Device', 41: 'CIP Modbus Translator', 42: 'Safety Analog I/O Device', 43: 'Generic Device (keyable)', 44: 'Managed Switch', 50: 'ControlNet Physical Layer Component'}
vendors = {0: 'Reserved', 1: 'Rockwell Automation/Allen-Bradley', 2: 'Namco Controls Corp.', 3: 'Honeywell Inc.', 4: 'Parker Hannifin Corp. (Veriflo Division)', 5: 'Rockwell Automation/Reliance Elec.', 6: 'Reserved', 7: 'SMC Corporation', 8: 'Molex Incorporated', 9: 'Western Reserve Controls Corp.', 10: 'Advanced Micro Controls Inc. (AMCI)', 11: 'ASCO Pneumatic Controls', 12: 'Banner Engineering Corp.', 13: 'Belden Wire & Cable Company', 14: 'Cooper Interconnect', 15: 'Reserved', 16: 'Daniel Woodhead Co. (Woodhead Connectivity)', 17: 'Dearborn Group Inc.', 18: 'Reserved', 19: 'Helm Instrument Company', 20: 'Huron Net Works', 21: 'Lumberg, Inc.', 22: 'Online Development Inc.(Automation Value)', 23: 'Vorne Industries, Inc.', 24: 'ODVA Special Reserve', 25: 'Reserved', 26: 'Festo Corporation', 27: 'Reserved', 28: 'Reserved', 29: 'Reserved', 30: 'Unico, Inc.', 31: 'Ross Controls', 32: 'Reserved', 33: 'Reserved', 34: 'Hohner Corp.', 35: 'Micro Mo Electronics, Inc.', 36: 'MKS Instruments, Inc.', 37: 'Yaskawa Electric America formerly Magnetek Drives', 38: 'Reserved', 39: 'AVG Automation (Uticor)', 40: 'Wago Corporation', 41: 'Kinetics (Unit Instruments)', 42: 'IMI Norgren Limited', 43: 'BALLUFF, Inc.', 44: 'Yaskawa Electric America, Inc.', 45: 'Eurotherm Controls Inc', 46: 'ABB Industrial Systems', 47: 'Omron Corporation', 48: 'TURCk, Inc.', 49: 'Grayhill Inc.', 50: 'Real Time Automation (C&ID)', 51: 'Reserved', 52: 'Numatics, Inc.', 53: 'Lutze, Inc.', 54: 'Reserved', 55: 'Reserved', 56: 'Softing GmbH', 57: 'Pepperl + Fuchs', 58: 'Spectrum Controls, Inc.', 59: 'D.I.P. Inc. MKS Inst.', 60: 'Applied Motion Products, Inc.', 61: 'Sencon Inc.', 62: 'High Country Tek', 63: 'SWAC Automation Consult GmbH', 64: 'Clippard Instrument Laboratory', 65: 'Reserved', 66: 'Reserved', 67: 'Reserved', 68: 'Eaton Electrical', 69: 'Reserved', 70: 'Reserved', 71: 'Toshiba International Corp.', 72: 'Control Technology Incorporated', 73: 'TCS (NZ) Ltd.', 74: 'Hitachi, Ltd.', 75: 'ABB Robotics Products AB', 76: 'NKE Corporation', 77: 'Rockwell Software, Inc.', 78: 'Escort Memory Systems (A Datalogic Group Co.)', 79: 'Reserved', 80: 'Industrial Devices Corporation', 81: 'IXXAT Automation GmbH', 82: 'Mitsubishi Electric Automation, Inc.', 83: 'OPTO-22', 84: 'Reserved', 85: 'Reserved', 86: 'Horner Electric', 87: 'Burkert Werke GmbH & Co. KG', 88: 'Reserved', 89: 'Industrial Indexing Systems, Inc.', 90: 'HMS Industrial Networks AB', 91: 'Robicon', 92: 'Helix Technology (Granville-Phillips)', 93: 'Arlington Laboratory', 94: 'Advantech Co. Ltd.', 95: 'Square D Company', 96: 'Digital Electronics Corp.', 97: 'Danfoss', 98: 'Reserved', 99: 'Reserved', 100: 'Bosch Rexroth Corporation, Pneumatics', 101: 'Applied Materials, Inc.', 102: 'Showa Electric Wire & Cable Co.', 103: 'Pacific Scientific (API Controls Inc.)', 104: 'Sharp Manufacturing Systems Corp.', 105: 'Olflex Wire & Cable, Inc.', 106: 'Reserved', 107: 'Unitrode', 108: 'Beckhoff Automation GmbH', 109: 'National Instruments', 110: 'Mykrolis Corporations (Millipore)', 111: 'International Motion Controls Corp.', 112: 'Reserved', 113: 'SEG Kempen GmbH', 114: 'Reserved', 115: 'Reserved', 116: 'MTS Systems Corp.', 117: 'Krones, Inc', 118: 'Reserved', 119: 'EXOR Electronic R & D', 120: 'SIEI S.p.A.', 121: 'KUKA Roboter GmbH', 122: 'Reserved', 123: 'SEC (Samsung Electronics Co., Ltd)', 124: 'Binary Electronics Ltd', 125: 'Flexible Machine Controls', 126: 'Reserved', 127: 'ABB Inc. (Entrelec)', 128: 'MAC Valves, Inc.', 129: 'Auma Actuators Inc', 130: 'Toyoda Machine Works, Ltd', 131: 'Reserved', 132: 'Reserved', 133: 'Balogh T.A.G., Corporation', 134: 'TR Systemtechnik GmbH', 135: 'UNIPULSE Corporation', 136: 'Reserved', 137: 'Reserved', 138: 'Conxall Corporation Inc.', 139: 'Reserved', 140: 'Reserved', 141: 'Kuramo Electric Co., Ltd.', 142: 'Creative Micro Designs', 143: 'GE Industrial Systems', 144: 'Leybold Vacuum GmbH', 145: 'Siemens Energy & Automation/Drives', 146: 'Kodensha Ltd', 147: 'Motion Engineering, Inc.', 148: 'Honda Engineering Co., Ltd', 149: 'EIM Valve Controls', 150: 'Melec Inc.', 151: 'Sony Manufacturing Systems Corporation', 152: 'North American Mfg.', 153: 'WATLOW', 154: 'Japan Radio Co., Ltd', 155: 'NADEX Co., Ltd', 156: 'Ametek Automation & Process Technologies', 157: 'Reserved', 158: 'KVASER AB', 159: 'IDEC IZUMI Corporation', 160: 'Mitsubishi Heavy Industries Ltd', 161: 'Mitsubishi Electric Corporation', 162: 'Horiba-STEC Inc.', 163: 'esd electronic system design gmbh', 164: 'DAIHEN Corporation', 165: 'Tyco Valves & Controls/Keystone', 166: 'EBARA Corporation', 167: 'Reserved', 168: 'Reserved', 169: 'Hokuyo Electric Co. Ltd', 170: 'Pyramid Solutions, Inc.', 171: 'Denso Wave Incorporated', 172: 'HLS Hard-Line Solutions Inc', 173: 'Caterpillar, Inc.', 174: 'PDL Electronics Ltd.', 175: 'Reserved', 176: 'Red Lion Controls', 177: 'ANELVA Corporation', 178: 'Toyo Denki Seizo KK', 179: 'Sanyo Denki Co., Ltd', 180: 'Advanced Energy Japan K.K. (Aera Japan)', 181: 'Pilz GmbH & Co', 182: 'Marsh Bellofram-Bellofram PCD Division', 183: 'Reserved', 184: 'M-SYSTEM Co. Ltd', 185: 'Nissin Electric Co., Ltd', 186: 'Hitachi Metals Ltd.', 187: 'Oriental Motor Company', 188: 'A&D Co., Ltd', 189: 'Phasetronics, Inc.', 190: 'Cummins Engine Company', 191: 'Deltron Inc.', 192: 'Geneer Corporation', 193: 'Anatol Automation, Inc.', 194: 'Reserved', 195: 'Reserved', 196: 'Medar, Inc.', 197: 'Comdel Inc.', 198: 'Advanced Energy Industries, Inc', 199: 'Reserved', 200: 'DAIDEN Co., Ltd', 201: 'CKD Corporation', 202: 'Toyo Electric Corporation', 203: 'Reserved', 204: 'AuCom Electronics Ltd', 205: 'Shinko Electric Co., Ltd', 206: 'Vector Informatik GmbH', 207: 'Reserved', 208: 'Moog Inc.', 209: 'Contemporary Controls', 210: 'Tokyo Sokki Kenkyujo Co., Ltd', 211: 'Schenck-AccuRate, Inc.', 212: 'The Oilgear Company', 213: 'Reserved', 214: 'ASM Japan K.K.', 215: 'HIRATA Corp.', 216: 'SUNX Limited', 217: 'Meidensha Corp.', 218: 'NIDEC SANKYO CORPORATION (Sankyo Seiki Mfg. Co., Ltd)', 219: 'KAMRO Corp.', 220: 'Nippon System Development Co., Ltd', 221: 'EBARA Technologies Inc.', 222: 'Reserved', 223: 'Reserved', 224: 'SG Co., Ltd', 225: 'Vaasa Institute of Technology', 226: 'MKS Instruments (ENI Technology)', 227: 'Tateyama System Laboratory Co., Ltd.', 228: 'QLOG Corporation', 229: 'Matric Limited Inc.', 230: 'NSD Corporation', 231: 'Reserved', 232: 'Sumitomo Wiring Systems, Ltd', 233: 'Group 3 Technology Ltd', 234: 'CTI Cryogenics', 235: 'POLSYS CORP', 236: 'Ampere Inc.', 237: 'Reserved', 238: 'Simplatroll Ltd', 239: 'Reserved', 240: 'Reserved', 241: 'Leading Edge Design', 242: 'Humphrey Products', 243: 'Schneider Automation, Inc.', 244: 'Westlock Controls Corp.', 245: 'Nihon Weidmuller Co., Ltd', 246: 'Brooks Instrument (Div. of Emerson)', 247: 'Reserved', 248: ' Moeller GmbH', 249: 'Varian Vacuum Products', 250: 'Yokogawa Electric Corporation', 251: 'Electrical Design Daiyu Co., Ltd', 252: 'Omron Software Co., Ltd', 253: 'BOC Edwards', 254: 'Control Technology Corporation', 255: 'Bosch Rexroth', 256: 'Turck', 257: 'Control Techniques PLC', 258: 'Hardy Instruments, Inc.', 259: 'LS Industrial Systems', 260: 'E.O.A. Systems Inc.', 261: 'Reserved', 262: 'New Cosmos Electric Co., Ltd.', 263: 'Sense Eletronica LTDA', 264: 'Xycom, Inc.', 265: 'Baldor Electric', 266: 'Reserved', 267: 'Patlite Corporation', 268: 'Reserved', 269: 'Mogami Wire & Cable Corporation', 270: 'Welding Technology Corporation (WTC)', 271: 'Reserved', 272: 'Deutschmann Automation GmbH', 273: 'ICP Panel-Tec Inc.', 274: 'Bray Controls USA', 275: 'Reserved', 276: 'Status Technologies', 277: 'Trio Motion Technology Ltd', 278: 'Sherrex Systems Ltd', 279: 'Adept Technology, Inc.', 280: 'Spang Power Electronics', 281: 'Reserved', 282: 'Acrosser Technology Co., Ltd', 283: 'Hilscher GmbH', 284: 'IMAX Corporation', 285: 'Electronic Innovation, Inc. (Falter Engineering)', 286: 'Netlogic Inc.', 287: 'Bosch Rexroth Corporation, Indramat', 288: 'Reserved', 289: 'Reserved', 290: 'Murata Machinery Ltd.', 291: 'MTT Company Ltd.', 292: 'Kanematsu Semiconductor Corp.', 293: 'Takebishi Electric Sales Co.', 294: 'Tokyo Electron Device Ltd', 295: 'PFU Limited', 296: 'Hakko Automation Co., Ltd.', 297: 'Advanet Inc.', 298: 'Tokyo Electron Software Technologies Ltd.', 299: 'Reserved', 300: 'Shinagawa Electric Wire Co., Ltd.', 301: 'Yokogawa M&C Corporation', 302: 'KONAN Electric Co., Ltd.', 303: 'Binar Elektronik AB', 304: 'Furukawa Electric Co.', 305: 'Cooper Energy Services', 306: 'Schleicher GmbH & Co.', 307: 'Hirose Electric Co., Ltd', 308: 'Western Servo Design Inc.', 309: 'Prosoft Technology', 310: 'Reserved', 311: 'Towa Shoko Co., Ltd', 312: 'Kyopal Co., Ltd', 313: 'Extron Co.', 314: 'Wieland Electric GmbH', 315: 'SEW Eurodrive GmbH', 316: 'Aera Corporation', 317: 'STA Reutlingen', 318: 'Reserved', 319: 'Fuji Electric Co., Ltd.', 320: 'Reserved', 321: 'Reserved', 322: 'ifm efector, inc.', 323: 'Reserved', 324: 'IDEACOD-Hohner Automation S.A.', 325: 'CommScope Inc.', 326: 'GE Fanuc Automation North America, Inc.', 327: 'Matsushita Electric Industrial Co., Ltd', 328: 'Okaya Electronics Corporation', 329: 'KASHIYAMA Industries, Ltd', 330: 'JVC', 331: 'Interface Corporation', 332: 'Grape Systems Inc.', 333: 'Reserved', 334: 'Reserved', 335: 'Toshiba IT & Control Systems Corporation', 336: 'Sanyo Machine Works, Ltd.', 337: 'Vansco Electronics Ltd.', 338: 'Dart Container Corp.', 339: 'Livingston & Co., Inc.', 340: 'Alfa Laval LKM as', 341: 'BF ENTRON Ltd. (British Federal)', 342: 'Bekaert Engineering NV', 343: 'Ferran Scientific Inc.', 344: 'KEBA AG', 345: 'Endress + Hauser', 346: 'Reserved', 347: 'ABB ALSTOM Power UK Ltd. (EGT)', 348: 'Berger Lahr GmbH', 349: 'Reserved', 350: 'Federal Signal Corp.', 351: 'Kawasaki Robotics (USA), Inc.', 352: 'Bently Nevada Corporation', 353: 'Reserved', 354: 'FRABA Posital GmbH', 355: 'Elsag Bailey, Inc.', 356: 'Fanuc Robotics America', 357: 'Reserved', 358: 'Surface Combustion, Inc.', 359: 'Reserved', 360: 'AILES Electronics Ind. Co., Ltd.', 361: 'Wonderware Corporation', 362: 'Particle Measuring Systems, Inc.', 363: 'Reserved', 364: 'Reserved', 365: 'BITS Co., Ltd', 366: 'Japan Aviation Electronics Industry Ltd', 367: 'Keyence Corporation', 368: 'Kuroda Precision Industries Ltd.', 369: 'Mitsubishi Electric Semiconductor Application', 370: 'Nippon Seisen Cable, Ltd.', 371: 'Omron ASO Co., Ltd', 372: 'Seiko Seiki Co., Ltd.', 373: 'Sumitomo Heavy Industries, Ltd.', 374: 'Tango Computer Service Corporation', 375: 'Technology Service, Inc.', 376: 'Toshiba Information Systems (Japan) Corporation', 377: 'TOSHIBA Schneider Inverter Corporation', 378: 'Toyooki Kogyo Co., Ltd.', 379: 'XEBEC', 380: 'Madison Cable Corporation', 381: 'Hitati Engineering & Services Co., Ltd', 382: 'TEM-TECH Lab Co., Ltd', 383: 'International Laboratory Corporation', 384: 'Dyadic Systems Co., Ltd.', 385: 'SETO Electronics Industry Co., Ltd', 386: 'Tokyo Electron Kyushu Limited', 387: 'KEI System Co., Ltd', 388: 'Reserved', 389: 'Asahi Engineering Co., Ltd', 390: 'Contrex Inc.', 391: 'Paradigm Controls Ltd.', 392: 'Reserved', 393: 'Ohm Electric Co., Ltd.', 394: 'RKC Instrument Inc.', 395: 'Suzuki Motor Corporation', 396: 'Custom Servo Motors Inc.', 397: 'PACE Control Systems', 398: 'Reserved', 399: 'Reserved', 400: 'LINTEC Co., Ltd.', 401: 'Hitachi Cable Ltd.', 402: 'BUSWARE Direct', 403: 'Eaton Electric B.V. (former Holec Holland N.V.)', 404: 'VAT Vakuumventile AG', 405: 'Scientific Technologies Incorporated', 406: 'Alfa Instrumentos Eletronicos Ltda', 407: 'TWK Elektronik GmbH', 408: 'ABB Welding Systems AB', 409: 'BYSTRONIC Maschinen AG', 410: 'Kimura Electric Co., Ltd', 411: 'Nissei Plastic Industrial Co., Ltd', 412: 'Reserved', 413: 'Kistler-Morse Corporation', 414: 'Proteous Industries Inc.', 415: 'IDC Corporation', 416: 'Nordson Corporation', 417: 'Rapistan Systems', 418: 'LP-Elektronik GmbH', 419: 'GERBI & FASE S.p.A.(Fase Saldatura)', 420: 'Phoenix Digital Corporation', 421: 'Z-World Engineering', 422: 'Honda R&D Co., Ltd.', 423: 'Bionics Instrument Co., Ltd.', 424: 'Teknic, Inc.', 425: 'R.Stahl, Inc.', 426: 'Reserved', 427: 'Ryco Graphic Manufacturing Inc.', 428: 'Giddings & Lewis, Inc.', 429: 'Koganei Corporation', 430: 'Reserved', 431: 'Nichigoh Communication Electric Wire Co., Ltd.', 432: 'Reserved', 433: 'Fujikura Ltd.', 434: 'AD Link Technology Inc.', 435: 'StoneL Corporation', 436: 'Computer Optical Products, Inc.', 437: 'CONOS Inc.', 438: 'Erhardt + Leimer GmbH', 439: 'UNIQUE Co. Ltd', 440: 'Roboticsware, Inc.', 441: 'Nachi Fujikoshi Corporation', 442: 'Hengstler GmbH', 443: 'Reserved', 444: 'SUNNY GIKEN Inc.', 445: 'Lenze Drive Systems GmbH', 446: 'CD Systems B.V.', 447: 'FMT/Aircraft Gate Support Systems AB', 448: 'Axiomatic Technologies Corp', 449: 'Embedded System Products, Inc.', 450: 'Reserved', 451: 'Mencom Corporation', 452: 'Reserved', 453: 'Matsushita Welding Systems Co., Ltd.', 454: 'Dengensha Mfg. Co. Ltd.', 455: 'Quinn Systems Ltd.', 456: 'Tellima Technology Ltd', 457: 'MDT, Software', 458: 'Taiwan Keiso Co., Ltd', 459: 'Pinnacle Systems', 460: 'Ascom Hasler Mailing Sys', 461: 'INSTRUMAR Limited', 462: 'Reserved', 463: 'Navistar International Transportation Corp', 464: 'Huettinger Elektronik GmbH + Co. KG', 465: 'OCM Technology Inc.', 466: 'Professional Supply Inc.', 468: 'Baumer IVO GmbH & Co. KG', 469: 'Worcester Controls Corporation', 470: 'Pyramid Technical Consultants, Inc.', 471: 'Reserved', 472: 'Apollo Fire Detectors Limited', 473: 'Avtron Manufacturing, Inc.', 474: 'Reserved', 475: 'Tokyo Keiso Co., Ltd.', 476: 'Daishowa Swiki Co., Ltd.', 477: 'Kojima Instruments Inc.', 478: 'Shimadzu Corporation', 479: 'Tatsuta Electric Wire & Cable Co., Ltd.', 480: 'MECS Corporation', 481: 'Tahara Electric', 482: 'Koyo Electronics', 483: 'Clever Devices', 484: 'GCD Hardware & Software GmbH', 485: 'Reserved', 486: 'Miller Electric Mfg Co.', 487: 'GEA Tuchenhagen GmbH', 488: 'Riken Keiki Co., LTD', 489: 'Keisokugiken Corporation', 490: 'Fuji Machine Mfg. Co., Ltd', 491: 'Reserved', 492: 'Nidec-Shimpo Corp.', 493: 'UTEC Corporation', 494: 'Sanyo Electric Co. Ltd.', 495: 'Reserved', 496: 'Reserved', 497: 'Okano Electric Wire Co. Ltd', 498: 'Shimaden Co. Ltd.', 499: 'Teddington Controls Ltd', 500: 'Reserved', 501: 'VIPA GmbH', 502: 'Warwick Manufacturing Group', 503: 'Danaher Controls', 504: 'Reserved', 505: 'Reserved', 506: 'American Science & Engineering', 507: 'Accutron Controls International Inc.', 508: 'Norcott Technologies Ltd', 509: 'TB Woods, Inc', 510: 'Proportion-Air, Inc.', 511: 'SICK Stegmann GmbH', 512: 'Reserved', 513: 'Edwards Signaling', 514: 'Sumitomo Metal Industries, Ltd', 515: 'Cosmo Instruments Co., Ltd.', 516: 'Denshosha Co., Ltd.', 517: 'Kaijo Corp.', 518: 'Michiproducts Co., Ltd.', 519: 'Miura Corporation', 520: 'TG Information Network Co., Ltd.', 521: 'Fujikin , Inc.', 522: 'Estic Corp.', 523: 'GS Hydraulic Sales', 524: 'Reserved', 525: 'MTE Limited', 526: 'Hyde Park Electronics, Inc.', 527: 'Pfeiffer Vacuum GmbH', 528: 'Cyberlogic Technologies', 529: 'OKUMA Corporation FA Systems Division', 530: 'Reserved', 531: 'Hitachi Kokusai Electric Co., Ltd.', 532: 'SHINKO TECHNOS Co., Ltd.', 533: 'Itoh Electric Co., Ltd.', 534: 'Colorado Flow Tech Inc.', 535: 'Love Controls Division/Dwyer Inst.', 536: 'Alstom Drives and Controls', 537: 'The Foxboro Company', 538: 'Tescom Corporation', 539: 'Reserved', 540: 'Atlas Copco Controls UK', 541: 'Reserved', 542: 'Autojet Technologies', 543: 'Prima Electronics S.p.A.', 544: 'PMA GmbH', 545: 'Shimafuji Electric Co., Ltd', 546: 'Oki Electric Industry Co., Ltd', 547: 'Kyushu Matsushita Electric Co., Ltd', 548: 'Nihon Electric Wire & Cable Co., Ltd', 549: 'Tsuken Electric Ind Co., Ltd', 550: 'Tamadic Co.', 551: 'MAATEL SA', 552: 'OKUMA America', 554: 'TPC Wire & Cable', 555: 'ATI Industrial Automation', 557: 'Serra Soldadura, S.A.', 558: 'Southwest Research Institute', 559: 'Cabinplant International', 560: 'Sartorius Mechatronics T&H GmbH', 561: 'Comau S.p.A. Robotics & Final Assembly Division', 562: 'Phoenix Contact', 563: 'Yokogawa MAT Corporation', 564: 'asahi sangyo co., ltd.', 565: 'Reserved', 566: 'Akita Myotoku Ltd.', 567: 'OBARA Corp.', 568: 'Suetron Electronic GmbH', 569: 'Reserved', 570: 'Serck Controls Limited', 571: 'Fairchild Industrial Products Company', 572: 'ARO S.A.', 573: 'M2C GmbH', 574: 'Shin Caterpillar Mitsubishi Ltd.', 575: 'Santest Co., Ltd.', 576: 'Cosmotechs Co., Ltd.', 577: 'Hitachi Electric Systems', 578: 'Smartscan Ltd', 579: 'Woodhead Software & Electronics France', 580: 'Athena Controls, Inc.', 581: 'Syron Engineering & Manufacturing, Inc.', 582: 'Asahi Optical Co., Ltd.', 583: 'Sansha Electric Mfg. Co., Ltd.', 584: 'Nikki Denso Co., Ltd.', 585: 'Star Micronics, Co., Ltd.', 586: 'Ecotecnia Socirtat Corp.', 587: 'AC Technology Corp.', 588: 'West Instruments Limited', 589: 'NTI Limited', 590: 'Delta Computer Systems, Inc.', 591: 'FANUC Ltd.', 592: 'Hearn-Gu Lee', 593: 'ABB Automation Products', 594: 'Orion Machinery Co., Ltd.', 595: 'Reserved', 596: 'Wire-Pro, Inc.', 597: 'Beijing Huakong Technology Co. Ltd.', 598: 'Yokoyama Shokai Co., Ltd.', 599: 'Toyogiken Co., Ltd.', 600: 'Coester Equipamentos Eletronicos Ltda.', 601: 'Reserved', 602: 'Electroplating Engineers of Japan Ltd.', 603: 'ROBOX S.p.A.', 604: 'Spraying Systems Company', 605: 'Benshaw Inc.', 606: 'ZPA-DP A.S.', 607: 'Wired Rite Systems', 608: 'Tandis Research, Inc.', 609: 'SSD Drives GmbH', 610: 'ULVAC Japan Ltd.', 611: 'DYNAX Corporation', 612: 'Nor-Cal Products, Inc.', 613: 'Aros Electronics AB', 614: 'Jun-Tech Co., Ltd.', 615: 'HAN-MI Co. Ltd.', 616: 'uniNtech (formerly SungGi Internet)', 617: 'Hae Pyung Electronics Reserch Institute', 618: 'Milwaukee Electronics', 619: 'OBERG Industries', 620: 'Parker Hannifin/Compumotor Division', 621: 'TECHNO DIGITAL CORPORATION', 622: 'Network Supply Co., Ltd.', 623: 'Union Electronics Co., Ltd.', 624: 'Tritronics Services PM Ltd.', 625: 'Rockwell Automation-Sprecher+Schuh', 626: 'Matsushita Electric Industrial Co., Ltd/Motor Co.', 627: 'Rolls-Royce Energy Systems, Inc.', 628: 'JEONGIL INTERCOM CO., LTD', 629: 'Interroll Corp.', 630: 'Hubbell Wiring Device-Kellems (Delaware)', 631: 'Intelligent Motion Systems', 632: 'Reserved', 633: 'INFICON AG', 634: 'Hirschmann, Inc.', 635: 'The Siemon Company', 636: 'YAMAHA Motor Co. Ltd.', 637: 'aska corporation', 638: 'Woodhead Connectivity', 639: 'Trimble AB', 640: 'Murrelektronik GmbH', 641: 'Creatrix Labs, Inc.', 642: 'TopWorx', 643: 'Kumho Industrial Co., Ltd.', 644: 'Wind River Systems, Inc.', 645: 'Bihl & Wiedemann GmbH', 646: 'Harmonic Drive Systems Inc.', 647: 'Rikei Corporation', 648: 'BL Autotec, Ltd.', 649: 'Hana Information & Technology Co., Ltd.', 650: 'Seoil Electric Co., Ltd.', 651: 'Fife Corporation', 652: 'Shanghai Electrical Apparatus Research Institute', 653: 'Reserved', 654: 'Parasense Development Centre', 655: 'Reserved', 656: 'Reserved', 657: 'Six Tau S.p.A.', 658: 'Aucos GmbH', 659: 'Rotork Controls', 660: 'Automationdirect.com', 661: 'Thermo BLH', 662: 'System Controls, Ltd.', 663: 'Univer S.p.A.', 664: 'MKS-Tenta Technology', 665: 'Lika Electronic SNC', 666: 'Mettler-Toledo, Inc.', 667: 'DXL USA Inc.', 668: 'Rockwell Automation/Entek IRD Intl.', 669: 'Nippon Otis Elevator Company', 670: 'Sinano Electric, Co., Ltd.', 671: 'Sony Manufacturing Systems', 672: 'Reserved', 673: 'Contec Co., Ltd.', 674: 'Automated Solutions', 675: 'Controlweigh', 676: 'Reserved', 677: 'Fincor Electronics', 678: 'Cognex Corporation', 679: 'Qualiflow', 680: 'Weidmuller, Inc.', 681: 'Morinaga Milk Industry Co., Ltd.', 682: 'Takagi Industrial Co., Ltd.', 683: 'Wittenstein AG', 684: 'Sena Technologies, Inc.', 685: 'Reserved', 686: 'APV Products Unna', 687: 'Creator Teknisk Utvedkling AB', 688: 'Reserved', 689: 'Mibu Denki Industrial Co., Ltd.', 690: 'Takamastsu Machineer Section', 691: 'Startco Engineering Ltd.', 692: 'Reserved', 693: 'Holjeron', 694: 'ALCATEL High Vacuum Technology', 695: 'Taesan LCD Co., Ltd.', 696: 'POSCON', 697: 'VMIC', 698: 'Matsushita Electric Works, Ltd.', 699: 'IAI Corporation', 700: 'Horst GmbH', 701: 'MicroControl GmbH & Co.', 702: 'Leine & Linde AB', 703: 'Reserved', 704: 'EC Elettronica Srl', 705: 'VIT Software HB', 706: 'Bronkhorst High-Tech B.V.', 707: 'Optex Co., Ltd.', 708: 'Yosio Electronic Co.', 709: 'Terasaki Electric Co., Ltd.', 710: 'Sodick Co., Ltd.', 711: 'MTS Systems Corporation-Automation Division', 712: 'Mesa Systemtechnik', 713: 'SHIN HO SYSTEM Co., Ltd.', 714: 'Goyo Electronics Co, Ltd.', 715: 'Loreme', 716: 'SAB Brockskes GmbH & Co. KG', 717: 'Trumpf Laser GmbH + Co. KG', 718: 'Niigata Electronic Instruments Co., Ltd.', 719: 'Yokogawa Digital Computer Corporation', 720: 'O.N. Electronic Co., Ltd.', 721: 'Industrial Control\tCommunication, Inc.', 722: 'ABB, Inc.', 723: 'ElectroWave USA, Inc.', 724: 'Industrial Network Controls, LLC', 725: 'KDT Systems Co., Ltd.', 726: 'SEFA Technology Inc.', 727: 'Nippon POP Rivets and Fasteners Ltd.', 728: 'Yamato Scale Co., Ltd.', 729: 'Zener Electric', 730: 'GSE Scale Systems', 731: 'ISAS (Integrated Switchgear & Sys. Pty Ltd)', 732: 'Beta LaserMike Limited', 733: 'TOEI Electric Co., Ltd.', 734: 'Hakko Electronics Co., Ltd', 735: 'Reserved', 736: 'RFID, Inc.', 737: 'Adwin Corporation', 738: 'Osaka Vacuum, Ltd.', 739: 'A-Kyung Motion, Inc.', 740: 'Camozzi S.P. A.', 741: 'Crevis Co., LTD', 742: 'Rice Lake Weighing Systems', 743: 'Linux Network Services', 744: 'KEB Antriebstechnik GmbH', 745: 'Hagiwara Electric Co., Ltd.', 746: 'Glass Inc. International', 747: 'Reserved', 748: 'DVT Corporation', 749: 'Woodward Governor', 750: 'Mosaic Systems, Inc.', 751: 'Laserline GmbH', 752: 'COM-TEC, Inc.', 753: 'Weed Instrument', 754: 'Prof-face European Technology Center', 755: 'Fuji Automation Co., Ltd.', 756: 'Matsutame Co., Ltd.', 757: 'Hitachi Via Mechanics, Ltd.', 758: 'Dainippon Screen Mfg. Co. Ltd.', 759: 'FLS Automation A/S', 760: 'ABB Stotz Kontakt GmbH', 761: 'Technical Marine Service', 762: 'Advanced Automation Associates, Inc.', 763: 'Baumer Ident GmbH', 764: 'Tsubakimoto Chain Co.', 765: 'Reserved', 766: 'Furukawa Co., Ltd.', 767: 'Active Power', 768: 'CSIRO Mining Automation', 769: 'Matrix Integrated Systems', 770: 'Digitronic Automationsanlagen GmbH', 771: 'SICK STEGMANN Inc.', 772: 'TAE-Antriebstechnik GmbH', 773: 'Electronic Solutions', 774: 'Rocon L.L.C.', 775: 'Dijitized Communications Inc.', 776: 'Asahi Organic Chemicals Industry Co., Ltd.', 777: 'Hodensha', 778: 'Harting, Inc. NA', 779: 'Kubler GmbH', 780: 'Yamatake Corporation', 781: 'JEOL', 782: 'Yamatake Industrial Systems Co., Ltd.', 783: 'HAEHNE Elektronische Messgerate GmbH', 784: 'Ci Technologies Pty Ltd (for Pelamos Industries)', 785: 'N. SCHLUMBERGER & CIE', 786: 'Teijin Seiki Co., Ltd.', 787: 'DAIKIN Industries, Ltd', 788: 'RyuSyo Industrial Co., Ltd.', 789: 'SAGINOMIYA SEISAKUSHO, INC.', 790: 'Seishin Engineering Co., Ltd.', 791: 'Japan Support System Ltd.', 792: 'Decsys', 793: 'Metronix Messgerate u. Elektronik GmbH', 794: 'Reserved', 795: 'Vaccon Company, Inc.', 796: 'Siemens Energy & Automation, Inc.', 797: 'Ten X Technology, Inc.', 798: 'Tyco Electronics', 799: 'Delta Power Electronics Center', 800: 'Denker', 801: 'Autonics Corporation', 802: 'JFE Electronic Engineering Pty. Ltd.', 803: 'Reserved', 804: 'Electro-Sensors, Inc.', 805: 'Digi International, Inc.', 806: 'Texas Instruments', 807: 'ADTEC Plasma Technology Co., Ltd', 808: 'SICK AG', 809: 'Ethernet Peripherals, Inc.', 810: 'Animatics Corporation', 811: 'Reserved', 812: 'Process Control Corporation', 813: 'SystemV. Inc.', 814: 'Danaher Motion SRL', 815: 'SHINKAWA Sensor Technology, Inc.', 816: 'Tesch GmbH & Co. KG', 817: 'Reserved', 818: 'Trend Controls Systems Ltd.', 819: 'Guangzhou ZHIYUAN Electronic Co., Ltd.', 820: 'Mykrolis Corporation', 821: 'Bethlehem Steel Corporation', 822: 'KK ICP', 823: 'Takemoto Denki Corporation', 824: 'The Montalvo Corporation', 825: 'Reserved', 826: 'LEONI Special Cables GmbH', 827: 'Reserved', 828: 'ONO SOKKI CO.,LTD.', 829: 'Rockwell Samsung Automation', 830: 'SHINDENGEN ELECTRIC MFG. CO. LTD', 831: 'Origin Electric Co. Ltd.', 832: 'Quest Technical Solutions, Inc.', 833: 'LS Cable, Ltd.', 834: 'Enercon-Nord Electronic GmbH', 835: 'Northwire Inc.', 836: 'Engel Elektroantriebe GmbH', 837: 'The Stanley Works', 838: 'Celesco Transducer Products, Inc.', 839: 'Chugoku Electric Wire and Cable Co.', 840: 'Kongsberg Simrad AS', 841: 'Panduit Corporation', 842: 'Spellman High Voltage Electronics Corp.', 843: 'Kokusai Electric Alpha Co., Ltd.', 844: 'Brooks Automation, Inc.', 845: 'ANYWIRE CORPORATION', 846: 'Honda Electronics Co. Ltd', 847: 'REO Elektronik AG', 848: 'Fusion UV Systems, Inc.', 849: 'ASI Advanced Semiconductor Instruments GmbH', 850: 'Datalogic, Inc.', 851: 'SoftPLC Corporation', 852: 'Dynisco Instruments LLC', 853: 'WEG Industrias SA', 854: 'Frontline Test Equipment, Inc.', 855: 'Tamagawa Seiki Co., Ltd.', 856: 'Multi Computing Co., Ltd.', 857: 'RVSI', 858: 'Commercial Timesharing Inc.', 859: 'Tennessee Rand Automation LLC', 860: 'Wacogiken Co., Ltd', 861: 'Reflex Integration Inc.', 862: 'Siemens AG, A&D PI Flow Instruments', 863: 'G. Bachmann Electronic GmbH', 864: 'NT International', 865: 'Schweitzer Engineering Laboratories', 866: 'ATR Industrie-Elektronik GmbH Co.', 867: 'PLASMATECH Co., Ltd', 868: 'Reserved', 869: 'GEMU GmbH & Co. KG', 870: 'Alcorn McBride Inc.', 871: 'MORI SEIKI CO., LTD', 872: 'NodeTech Systems Ltd', 873: 'Emhart Teknologies', 874: 'Cervis, Inc.', 875: 'FieldServer Technologies (Div Sierra Monitor Corp)', 876: 'NEDAP Power Supplies', 877: 'Nippon Sanso Corporation', 878: 'Mitomi Giken Co., Ltd.', 879: 'PULS GmbH', 880: 'Reserved', 881: 'Japan Control Engineering Ltd', 882: 'Embedded Systems Korea (Former Zues Emtek Co Ltd.)', 883: 'Automa SRL', 884: 'Harms+Wende GmbH & Co KG', 885: 'SAE-STAHL GmbH', 886: 'Microwave Data Systems', 887: 'Bernecker + Rainer Industrie-Elektronik GmbH', 888: 'Hiprom Technologies', 889: 'Reserved', 890: 'Nitta Corporation', 891: 'Kontron Modular Computers GmbH', 892: 'Marlin Controls', 893: 'ELCIS s.r.l.', 894: 'Acromag, Inc.', 895: 'Avery Weigh-Tronix', 896: 'Reserved', 897: 'Reserved', 898: 'Reserved', 899: 'Practicon Ltd', 900: 'Schunk GmbH & Co. KG', 901: 'MYNAH Technologies', 902: 'Defontaine Groupe', 903: 'Emerson Process Management Power & Water Solutions', 904: 'F.A. Elec', 905: 'Hottinger Baldwin Messtechnik GmbH', 906: 'Coreco Imaging, Inc.', 907: 'London Electronics Ltd.', 908: 'HSD SpA', 909: 'Comtrol Corporation', 910: 'TEAM, S.A. (Tecnica Electronica de Automatismo Y Medida)', 911: 'MAN B&W Diesel Ltd. Regulateurs Europa', 912: 'Reserved', 913: 'Reserved', 914: 'Micro Motion, Inc.', 915: 'Eckelmann AG', 916: 'Hanyoung Nux', 917: 'Ransburg Industrial Finishing KK', 918: 'Kun Hung Electric Co. Ltd.', 919: 'Brimos wegbebakening b.v.', 920: 'Nitto Seiki Co., Ltd', 921: 'PPT Vision, Inc.', 922: 'Yamazaki Machinery Works', 923: 'SCHMIDT Technology GmbH', 924: 'Parker Hannifin SpA (SBC Division)', 925: 'HIMA Paul Hildebrandt GmbH', 926: 'RivaTek, Inc.', 927: 'Misumi Corporation', 928: 'GE Multilin', 929: 'Measurement Computing Corporation', 930: 'Jetter AG', 931: 'Tokyo Electronics Systems Corporation', 932: 'Togami Electric Mfg. Co., Ltd.', 933: 'HK Systems', 934: 'CDA Systems Ltd.', 935: 'Aerotech Inc.', 936: 'JVL Industrie Elektronik A/S', 937: 'NovaTech Process Solutions LLC', 938: 'Reserved', 939: 'Cisco Systems', 940: 'Grid Connect', 941: 'ITW Automotive Finishing', 942: 'HanYang System', 943: 'ABB K.K. Technical Center', 944: 'Taiyo Electric Wire & Cable Co., Ltd.', 945: 'Reserved', 946: 'SEREN IPS INC', 947: 'Belden CDT Electronics Division', 948: 'ControlNet International', 949: 'Gefran S.P.A.', 950: 'Jokab Safety AB', 951: 'SUMITA OPTICAL GLASS, INC.', 952: 'Biffi Italia srl', 953: 'Beck IPC GmbH', 954: 'Copley Controls Corporation', 955: 'Fagor Automation S. Coop.', 956: 'DARCOM', 957: 'Frick Controls (div. of York International)', 958: 'SymCom, Inc.', 959: 'Infranor', 960: 'Kyosan Cable, Ltd.', 961: 'Varian Vacuum Technologies', 962: 'Messung Systems', 963: 'Xantrex Technology, Inc.', 964: 'StarThis Inc.', 965: 'Chiyoda Co., Ltd.', 966: 'Flowserve Corporation', 967: 'Spyder Controls Corp.', 968: 'IBA AG', 969: 'SHIMOHIRA ELECTRIC MFG.CO.,LTD', 970: 'Reserved', 971: 'Siemens L&A', 972: 'Micro Innovations AG', 973: 'Switchgear & Instrumentation', 974: 'PRE-TECH CO., LTD.', 975: 'National Semiconductor', 976: 'Invensys Process Systems', 977: 'Ametek HDR Power Systems', 978: 'Reserved', 979: 'TETRA-K Corporation', 980: 'C & M Corporation', 981: 'Siempelkamp Maschinen', 982: 'Reserved', 983: 'Daifuku America Corporation', 984: 'Electro-Matic Products Inc.', 985: 'BUSSAN MICROELECTRONICS CORP.', 986: 'ELAU AG', 987: 'Hetronic USA', 988: 'NIIGATA POWER SYSTEMS Co., Ltd.', 989: 'Software Horizons Inc.', 990: 'B3 Systems, Inc.', 991: 'Moxa Networking Co., Ltd.', 992: 'Reserved', 993: 'S4 Integration', 994: 'Elettro Stemi S.R.L.', 995: 'AquaSensors', 996: 'Ifak System GmbH', 997: 'SANKEI MANUFACTURING Co.,LTD.', 998: 'Emerson Network Power Co., Ltd.', 999: 'Fairmount Automation, Inc.', 1000: 'Bird Electronic Corporation', 1001: 'Nabtesco Corporation', 1002: 'AGM Electronics, Inc.', 1003: 'ARCX Inc.', 1004: 'DELTA I/O Co.', 1005: 'Chun IL Electric Ind. Co.', 1006: 'N-Tron', 1007: 'Nippon Pneumatics/Fludics System CO.,LTD.', 1008: 'DDK Ltd.', 1009: 'Seiko Epson Corporation', 1010: 'Halstrup-Walcher GmbH', 1011: 'ITT', 1012: 'Ground Fault Systems bv', 1013: 'Scolari Engineering S.p.A.', 1014: 'Vialis Traffic bv', 1015: 'Weidmueller Interface GmbH & Co. KG', 1016: 'Shanghai Sibotech Automation Co. Ltd', 1017: 'AEG Power Supply Systems GmbH', 1018: 'Komatsu Electronics Inc.', 1019: 'Souriau', 1020: 'Baumuller Chicago Corp.', 1021: 'J. Schmalz GmbH', 1022: 'SEN Corporation', 1023: 'Korenix Technology Co. Ltd', 1024: 'Cooper Power Tools', 1025: 'INNOBIS', 1026: 'Shinho System', 1027: 'Xm Services Ltd.', 1028: 'KVC Co., Ltd.', 1029: 'Sanyu Seiki Co., Ltd.', 1030: 'TuxPLC', 1031: 'Northern Network Solutions', 1032: 'Converteam GmbH', 1033: 'Symbol Technologies', 1034: 'S-TEAM Lab', 1035: 'Maguire Products, Inc.', 1036: 'AC&T', 1037: 'MITSUBISHI HEAVY INDUSTRIES, LTD. KOBE SHIPYARD & MACHINERY WORKS', 1038: 'Hurletron Inc.', 1039: 'Chunichi Denshi Co., Ltd', 1040: 'Cardinal Scale Mfg. Co.', 1041: 'BTR NETCOM via RIA Connect, Inc.', 1042: 'Base2', 1043: 'ASRC Aerospace', 1044: 'Beijing Stone Automation', 1045: 'Changshu Switchgear Manufacture Ltd.', 1046: 'METRONIX Corp.', 1047: 'WIT', 1048: 'ORMEC Systems Corp.', 1049: 'ASATech (China) Inc.', 1050: 'Controlled Systems Limited', 1051: 'Mitsubishi Heavy Ind. Digital System Co., Ltd. (M.H.I.)', 1052: 'Electrogrip', 1053: 'TDS Automation', 1054: 'T&C Power Conversion, Inc.', 1055: 'Robostar Co., Ltd', 1056: 'Scancon A/S', 1057: 'Haas Automation, Inc.', 1058: 'Eshed Technology', 1059: 'Delta Electronic Inc.', 1060: 'Innovasic Semiconductor', 1061: 'SoftDEL Systems Limited', 1062: 'FiberFin, Inc.', 1063: 'Nicollet Technologies Corp.', 1064: 'B.F. Systems', 1065: 'Empire Wire and Supply LLC', 1066: 'Reserved', 1067: 'Elmo Motion Control LTD', 1068: 'Reserved', 1069: 'Asahi Keiki Co., Ltd.', 1070: 'Joy Mining Machinery', 1071: 'MPM Engineering Ltd', 1072: 'Wolke Inks & Printers GmbH', 1073: 'Mitsubishi Electric Engineering Co., Ltd.', 1074: 'COMET AG', 1075: 'Real Time Objects & Systems, LLC', 1076: 'MISCO Refractometer', 1077: 'JT Engineering Inc.', 1078: 'Automated Packing Systems', 1079: 'Niobrara R&D Corp.', 1080: 'Garmin Ltd.', 1081: 'Japan Mobile Platform Co., Ltd', 1082: 'Advosol Inc.', 1083: 'ABB Global Services Limited', 1084: 'Sciemetric Instruments Inc.', 1085: 'Tata Elxsi Ltd.', 1086: 'TPC Mechatronics, Co., Ltd.', 1087: 'Cooper Bussmann', 1088: 'Trinite Automatisering B.V.', 1089: 'Peek Traffic B.V.', 1090: 'Acrison, Inc', 1091: 'Applied Robotics, Inc.', 1092: 'FireBus Systems, Inc.', 1093: 'Beijing Sevenstar Huachuang Electronics', 1094: 'Magnetek', 1095: 'Microscan', 1096: 'Air Water Inc.', 1097: 'Sensopart Industriesensorik GmbH', 1098: 'Tiefenbach Control Systems GmbH', 1099: 'INOXPA S.A', 1100: 'Zurich University of Applied Sciences', 1101: 'Ethernet Direct', 1102: 'GSI-Micro-E Systems', 1103: 'S-Net Automation Co., Ltd.', 1104: 'Power Electronics S.L.', 1105: 'Renesas Technology Corp.', 1106: 'NSWCCD-SSES', 1107: 'Porter Engineering Ltd.', 1108: 'Meggitt Airdynamics, Inc.', 1109: 'Inductive Automation', 1110: 'Neural ID', 1111: 'EEPod LLC', 1112: 'Hitachi Industrial Equipment Systems Co., Ltd.', 1113: 'Salem Automation', 1114: 'port GmbH', 1115: 'B & PLUS', 1116: 'Graco Inc.', 1117: 'Altera Corporation', 1118: 'Technology Brewing Corporation', 1121: 'CSE Servelec', 1124: 'Fluke Networks', 1125: 'Tetra Pak Packaging Solutions SPA', 1126: 'Racine Federated, Inc.', 1127: 'Pureron Japan Co., Ltd.', 1130: 'Brother Industries, Ltd.', 1132: 'Leroy Automation', 1137: 'TR-Electronic GmbH', 1138: 'ASCON S.p.A.', 1139: 'Toledo do Brasil Industria de Balancas Ltda.', 1140: 'Bucyrus DBT Europe GmbH', 1141: 'Emerson Process Management Valve Automation', 1142: 'Alstom Transport', 1144: 'Matrox Electronic Systems', 1145: 'Littelfuse', 1146: 'PLASMART, Inc.', 1147: 'Miyachi Corporation', 1150: 'Promess Incorporated', 1151: 'COPA-DATA GmbH', 1152: 'Precision Engine Controls Corporation', 1153: 'Alga Automacao e controle LTDA', 1154: 'U.I. Lapp GmbH', 1155: 'ICES', 1156: 'Philips Lighting bv', 1157: 'Aseptomag AG', 1158: 'ARC Informatique', 1159: 'Hesmor GmbH', 1160: 'Kobe Steel, Ltd.', 1161: 'FLIR Systems', 1162: 'Simcon A/S', 1163: 'COPALP', 1164: 'Zypcom, Inc.', 1165: 'Swagelok', 1166: 'Elspec', 1167: 'ITT Water & Wastewater AB', 1168: 'Kunbus GmbH Industrial Communication', 1170: 'Performance Controls, Inc.', 1171: 'ACS Motion Control, Ltd.', 1173: 'IStar Technology Limited', 1174: 'Alicat Scientific, Inc.', 1176: 'ADFweb.com SRL', 1177: 'Tata Consultancy Services Limited', 1178: 'CXR Ltd.', 1179: 'Vishay Nobel AB', 1181: 'SolaHD', 1182: 'Endress+Hauser', 1183: 'Bartec GmbH', 1185: 'AccuSentry, Inc.', 1186: 'Exlar Corporation', 1187: 'ILS Technology', 1188: 'Control Concepts Inc.', 1190: 'Procon Engineering Limited', 1191: 'Hermary Opto Electronics Inc.', 1192: 'Q-Lambda', 1194: 'VAMP Ltd', 1195: 'FlexLink', 1196: 'Office FA.com Co., Ltd.', 1197: 'SPMC (Changzhou) Co. Ltd.', 1198: 'Anton Paar GmbH', 1199: 'Zhuzhou CSR Times Electric Co., Ltd.', 1200: 'DeStaCo', 1201: 'Synrad, Inc', 1202: 'Bonfiglioli Vectron GmbH', 1203: 'Pivotal Systems', 1204: 'TKSCT', 1205: 'Randy Nuernberger', 1206: 'CENTRALP', 1207: 'Tengen Group', 1208: 'OES, Inc.', 1209: 'Actel Corporation', 1210: 'Monaghan Engineering, Inc.', 1211: 'wenglor sensoric gmbh', 1212: 'HSA Systems', 1213: 'MK Precision Co., Ltd.', 1214: 'Tappan Wire and Cable', 1215: 'Heinzmann GmbH & Co. KG', 1216: 'Process Automation International Ltd.', 1217: 'Secure Crossing', 1218: 'SMA Railway Technology GmbH', 1219: 'FMS Force Measuring Systems AG', 1220: 'ABT Endustri Enerji Sistemleri Sanayi Tic. Ltd. Sti.', 1221: 'MagneMotion Inc.', 1222: 'STS Co., Ltd.', 1223: 'MERAK SIC, SA', 1224: 'ABOUNDI, Inc.', 1225: 'Rosemount Inc.', 1226: 'GEA FES, Inc.', 1227: 'TMG Technologie und Engineering GmbH', 1228: 'embeX GmbH', 1229: 'GH Electrotermia, S.A.', 1230: 'Tolomatic', 1231: 'Dukane', 1232: 'Elco (Tian Jin) Electronics Co., Ltd.', 1233: 'Jacobs Automation', 1234: 'Noda Radio Frequency Technologies Co., Ltd.', 1235: 'MSC Tuttlingen GmbH', 1236: 'Hitachi Cable Manchester', 1237: 'ACOREL SAS', 1238: 'Global Engineering Solutions Co., Ltd.', 1239: 'ALTE Transportation, S.L.', 1240: 'Penko Engineering B.V.'} |
train_cfg = {}
test_cfg = {}
optimizer_config = dict() # grad_clip, coalesce, bucket_size_mb
# yapf:disable
# yapf:enable
# runtime settings
dist_params = dict(backend='nccl')
cudnn_benchmark = True
log_level = 'INFO'
load_from = None
resume_from = None
workflow = [('train', 1)]
# model settings
model = dict(
type='Classification',
pretrained=None,
backbone=dict(
type='ResNet',
depth=50,
in_channels=3,
out_indices=[4], # 0: conv-1, x: stage-x
# TODO(cjrd) should we be using BN here???
norm_cfg=dict(type='BN')),
head=dict(
type='ClsHead', with_avg_pool=True, in_channels=2048,
num_classes=21))
prefetch=False
| train_cfg = {}
test_cfg = {}
optimizer_config = dict()
dist_params = dict(backend='nccl')
cudnn_benchmark = True
log_level = 'INFO'
load_from = None
resume_from = None
workflow = [('train', 1)]
model = dict(type='Classification', pretrained=None, backbone=dict(type='ResNet', depth=50, in_channels=3, out_indices=[4], norm_cfg=dict(type='BN')), head=dict(type='ClsHead', with_avg_pool=True, in_channels=2048, num_classes=21))
prefetch = False |
# -*- coding: utf-8 -*-
urlpatterns = patterns('',
url(r'^galleries/', include('porticus.urls', namespace='porticus')),
) + urlpatterns
| urlpatterns = patterns('', url('^galleries/', include('porticus.urls', namespace='porticus'))) + urlpatterns |
#
# Elias Coding performs prefix-free(variable-length) encode/decode for integer stream
#
def elias_encoder(N:int):
assert N > 0, "Cannot encode non-positive number!"
if N == 1:
return str(N)
# 1. initialization, base case(binary rep for N)
binary_N:str = BinaryRep(N)
L:int = len(binary_N)-1
encoded:str = binary_N
# 2. repeated encode length component(L) until L = 1
while L > 1:
binary_L:str = BinaryRep(L)
encoded = '0' + binary_L[1:] + encoded
L = len(binary_L) - 1
# 3. return elias code word for N
return '0'+ encoded
def elias_decoder(code_word:str):
'''
Decode to a single integer
:param code_word: '1000011' machine code
:return:
'''
if code_word == '1':
return int(code_word)
# 1. start with 1st bit, which is always '0'
binary_L:str = '1' # binary rep of length component
L:int = len(binary_L) + 1
code_word = code_word[1:]
# 2. repeated decode until meet '1' as the 1st bit, which means get the original binary rep of N
while code_word != "" and code_word[0] == '0':
# probe next L bits
binary_L = '1' + code_word[1:L]
# cut next L bits in elias code word
code_word = code_word[L:]
# binary Length-component => decimal Length-component, update L
L = DecimalRep(binary_L) + 1
# 3. final decoded number comes from rest code_word which starts with bit '1'
N = DecimalRep(code_word[:L])
return N
def elias_seq_decoder(code_word:str):
'''
Decode to a sequence of integers
:param code_word: '1000011' machine code
:return:
'''
if code_word == '1':
return [int(code_word)]
Ns = []
while code_word != "":
# 1. start with 1st bit, which is always '0'
binary_L: str = '1' # binary rep of length component
L: int = len(binary_L) + 1
code_word = code_word[1:]
# 2. repeated decode until meet '1' as the 1st bit, which means get the original binary rep of N
while code_word != "" and code_word[0] == '0':
# probe next L bits
binary_L = '1' + code_word[1:L]
# cut next L bits in elias code word
code_word = code_word[L:]
# binary Length-component => decimal Length-component, update L
L = DecimalRep(binary_L) + 1
# 3. final decoded number comes from rest code_word which starts with bit '1'
N = DecimalRep(code_word[:L])
code_word = code_word[L:]
Ns.append(N)
return Ns
def BinaryRep(n:int):
ret = ""
while n > 0:
ret = str(n % 2) + ret
n //= 2
return ret
def DecimalRep(b:str): # b: the binary rep
ret = 0 # ret: return decimal number
base = 1 # base: the multiplicator for specific bit
while b != "":
ret += int(b[-1])*base
base *= 2
b = b[:-1]
return ret
if __name__ == '__main__':
print(elias_encoder(561))
print(elias_seq_decoder("011000100"))
print(elias_seq_decoder("011011"))
# test encodes
outfile = open("elias_code_word.txt", 'w')
for i in range(100):
outfile.write("{:3} {}\n".format(i, elias_encoder(i)))
outfile.close()
| def elias_encoder(N: int):
assert N > 0, 'Cannot encode non-positive number!'
if N == 1:
return str(N)
binary_n: str = binary_rep(N)
l: int = len(binary_N) - 1
encoded: str = binary_N
while L > 1:
binary_l: str = binary_rep(L)
encoded = '0' + binary_L[1:] + encoded
l = len(binary_L) - 1
return '0' + encoded
def elias_decoder(code_word: str):
"""
Decode to a single integer
:param code_word: '1000011' machine code
:return:
"""
if code_word == '1':
return int(code_word)
binary_l: str = '1'
l: int = len(binary_L) + 1
code_word = code_word[1:]
while code_word != '' and code_word[0] == '0':
binary_l = '1' + code_word[1:L]
code_word = code_word[L:]
l = decimal_rep(binary_L) + 1
n = decimal_rep(code_word[:L])
return N
def elias_seq_decoder(code_word: str):
"""
Decode to a sequence of integers
:param code_word: '1000011' machine code
:return:
"""
if code_word == '1':
return [int(code_word)]
ns = []
while code_word != '':
binary_l: str = '1'
l: int = len(binary_L) + 1
code_word = code_word[1:]
while code_word != '' and code_word[0] == '0':
binary_l = '1' + code_word[1:L]
code_word = code_word[L:]
l = decimal_rep(binary_L) + 1
n = decimal_rep(code_word[:L])
code_word = code_word[L:]
Ns.append(N)
return Ns
def binary_rep(n: int):
ret = ''
while n > 0:
ret = str(n % 2) + ret
n //= 2
return ret
def decimal_rep(b: str):
ret = 0
base = 1
while b != '':
ret += int(b[-1]) * base
base *= 2
b = b[:-1]
return ret
if __name__ == '__main__':
print(elias_encoder(561))
print(elias_seq_decoder('011000100'))
print(elias_seq_decoder('011011'))
outfile = open('elias_code_word.txt', 'w')
for i in range(100):
outfile.write('{:3} {}\n'.format(i, elias_encoder(i)))
outfile.close() |
RAWDATA_DIR = '/staging/as/skchoudh/re-ribo-datasets/hg38/SRP103009'
OUT_DIR = '/staging/as/skchoudh/re-ribo-analysis/hg38/SRP103009'
GENOME_FASTA = '/home/cmb-06/as/skchoudh/genomes/hg38/fasta/Homo_sapiens.GRCh38.dna_sm.primary_assembly.fa'
CHROM_SIZES = '/home/cmb-06/as/skchoudh/genomes/hg38/fasta/Homo_sapiens.GRCh38.dna_sm.primary_assembly.sizes'
STAR_INDEX = '/home/cmb-06/as/skchoudh/genomes/hg38/star_annotated_ribopod'
GTF_VERSION = 'v96'
GTF = '/home/cmb-06/as/skchoudh/genomes/hg38/annotation/Homo_sapiens.GRCh38.96.gtf'
GENE_BED = '/home/cmb-06/as/skchoudh/github_projects/riboraptor/riboraptor/annotation/hg38/v96/gene.bed.gz'
STAR_CODON_BED = '/home/cmb-06/as/skchoudh/github_projects/riboraptor/riboraptor/annotation/hg38/v96/start_codon.bed.gz'
STOP_CODON_BED = '/home/cmb-06/as/skchoudh/github_projects/riboraptor/riboraptor/annotation/hg38/v96/stop_codon.bed.gz'
CDS_BED = '/home/cmb-06/as/skchoudh/github_projects/riboraptor/riboraptor/annotation/hg38/v96/cds.bed.gz'
UTR5_BED = '/home/cmb-06/as/skchoudh/github_projects/riboraptor/riboraptor/annotation/hg38/v96/utr5.bed.gz'
UTR3_BED = '/home/cmb-06/as/skchoudh/github_projects/riboraptor/riboraptor/annotation/hg38/v96/utr3.bed.gz'
INTRON_BED = '/home/cmb-06/as/skchoudh/github_projects/riboraptor/riboraptor/annotation/hg38/v96/intron.bed.gz'
ORIENTATIONS = ['5prime', '3prime']
STRANDS = ['pos', 'neg', 'combined']
FRAGMENT_LENGTHS = range(18, 39)
RIBOTRICER_ANNOTATION_PREFIX = '/home/cmb-06/as/skchoudh/genomes/hg38/ribotricer_v96_annotation_longest'
| rawdata_dir = '/staging/as/skchoudh/re-ribo-datasets/hg38/SRP103009'
out_dir = '/staging/as/skchoudh/re-ribo-analysis/hg38/SRP103009'
genome_fasta = '/home/cmb-06/as/skchoudh/genomes/hg38/fasta/Homo_sapiens.GRCh38.dna_sm.primary_assembly.fa'
chrom_sizes = '/home/cmb-06/as/skchoudh/genomes/hg38/fasta/Homo_sapiens.GRCh38.dna_sm.primary_assembly.sizes'
star_index = '/home/cmb-06/as/skchoudh/genomes/hg38/star_annotated_ribopod'
gtf_version = 'v96'
gtf = '/home/cmb-06/as/skchoudh/genomes/hg38/annotation/Homo_sapiens.GRCh38.96.gtf'
gene_bed = '/home/cmb-06/as/skchoudh/github_projects/riboraptor/riboraptor/annotation/hg38/v96/gene.bed.gz'
star_codon_bed = '/home/cmb-06/as/skchoudh/github_projects/riboraptor/riboraptor/annotation/hg38/v96/start_codon.bed.gz'
stop_codon_bed = '/home/cmb-06/as/skchoudh/github_projects/riboraptor/riboraptor/annotation/hg38/v96/stop_codon.bed.gz'
cds_bed = '/home/cmb-06/as/skchoudh/github_projects/riboraptor/riboraptor/annotation/hg38/v96/cds.bed.gz'
utr5_bed = '/home/cmb-06/as/skchoudh/github_projects/riboraptor/riboraptor/annotation/hg38/v96/utr5.bed.gz'
utr3_bed = '/home/cmb-06/as/skchoudh/github_projects/riboraptor/riboraptor/annotation/hg38/v96/utr3.bed.gz'
intron_bed = '/home/cmb-06/as/skchoudh/github_projects/riboraptor/riboraptor/annotation/hg38/v96/intron.bed.gz'
orientations = ['5prime', '3prime']
strands = ['pos', 'neg', 'combined']
fragment_lengths = range(18, 39)
ribotricer_annotation_prefix = '/home/cmb-06/as/skchoudh/genomes/hg38/ribotricer_v96_annotation_longest' |
def code_function():
#function begin############################################
global code
code="""
`include "{0}_agent.sv"
`include "{0}_scoreboard.sv"
class {0}_model_env extends uvm_env;
//---------------------------------------
// agent and scoreboard instance
//---------------------------------------
{0}_agent {0}_agnt;
{0}_scoreboard {0}_scb;
`uvm_component_utils({0}_model_env)
//---------------------------------------
// constructor
//---------------------------------------
function new(string name, uvm_component parent);
super.new(name, parent);
endfunction : new
//---------------------------------------
// build_phase - crate the components
//---------------------------------------
function void build_phase(uvm_phase phase);
super.build_phase(phase);
{0}_agnt = {0}_agent::type_id::create("{0}_agnt", this);
{0}_scb = {0}_scoreboard::type_id::create("{0}_scb", this);
endfunction : build_phase
//---------------------------------------
// connect_phase - connecting monitor and scoreboard port
//---------------------------------------
function void connect_phase(uvm_phase phase);
{0}_agnt.monitor.item_collected_port.connect({0}_scb.item_collected_export);
endfunction : connect_phase
endclass : {0}_model_env
""".format(protocol_name)
print(code)
#function end############################################
fh=open("protocol.csv","r")
for protocol_name in fh:
protocol_name=protocol_name.strip("\n")
fph=open('{0}_env.sv'.format(protocol_name),"w")
code_function()
fph.write(code)
| def code_function():
global code
code = '\n`include "{0}_agent.sv"\n`include "{0}_scoreboard.sv"\n\nclass {0}_model_env extends uvm_env;\n \n //---------------------------------------\n // agent and scoreboard instance\n //---------------------------------------\n {0}_agent {0}_agnt;\n {0}_scoreboard {0}_scb;\n \n `uvm_component_utils({0}_model_env)\n \n //--------------------------------------- \n // constructor\n //---------------------------------------\n function new(string name, uvm_component parent);\n super.new(name, parent);\n endfunction : new\n\n //---------------------------------------\n // build_phase - crate the components\n //---------------------------------------\n function void build_phase(uvm_phase phase);\n super.build_phase(phase);\n\n {0}_agnt = {0}_agent::type_id::create("{0}_agnt", this);\n {0}_scb = {0}_scoreboard::type_id::create("{0}_scb", this);\n endfunction : build_phase\n \n //---------------------------------------\n // connect_phase - connecting monitor and scoreboard port\n //---------------------------------------\n function void connect_phase(uvm_phase phase);\n {0}_agnt.monitor.item_collected_port.connect({0}_scb.item_collected_export);\n endfunction : connect_phase\n\nendclass : {0}_model_env\n'.format(protocol_name)
print(code)
fh = open('protocol.csv', 'r')
for protocol_name in fh:
protocol_name = protocol_name.strip('\n')
fph = open('{0}_env.sv'.format(protocol_name), 'w')
code_function()
fph.write(code) |
{
"conditions": [
["OS=='mac'", {
"variables": { "oci_version%": "11" },
}, {
"variables": { "oci_version%": "12" },
}],
],
"targets": [
{
"target_name": "oracle_bindings",
"sources": [ "src/connection.cpp",
"src/oracle_bindings.cpp",
"src/executeBaton.cpp",
"src/outParam.cpp",
"src/reader.cpp",
"src/statement.cpp" ],
"conditions": [
["OS=='mac'", {
"xcode_settings": {
"GCC_ENABLE_CPP_EXCEPTIONS": "YES",
"GCC_ENABLE_CPP_RTTI": "YES"
},
"variables": {
"oci_include_dir%": "<!(if [ -z $OCI_INCLUDE_DIR ]; then echo \"/opt/instantclient/sdk/include/\"; else echo $OCI_INCLUDE_DIR; fi)",
"oci_lib_dir%": "<!(if [ -z $OCI_LIB_DIR ]; then echo \"/opt/instantclient/\"; else echo $OCI_LIB_DIR; fi)",
},
"libraries": [ "-locci", "-lclntsh", "-lnnz<(oci_version)" ],
"link_settings": {"libraries": [ '-L<(oci_lib_dir)'] }
}],
["OS=='linux'", {
"variables": {
"oci_include_dir%": "<!(if [ -z $OCI_INCLUDE_DIR ]; then echo \"/opt/instantclient/sdk/include/\"; else echo $OCI_INCLUDE_DIR; fi)",
"oci_lib_dir%": "<!(if [ -z $OCI_LIB_DIR ]; then echo \"/opt/instantclient/\"; else echo $OCI_LIB_DIR; fi)",
},
"defines": ["_GLIBCXX_USE_CXX11_ABI=0"],
"libraries": [ "-locci", "-lclntsh", "-lnnz<(oci_version)" ],
"link_settings": {"libraries": [ '-L<(oci_lib_dir)'] }
}],
["OS=='win'", {
"configurations": {
"Release": {
"msvs_settings": {
"VCCLCompilerTool": {
"RuntimeLibrary": "2"
}
},
},
"Debug": {
"msvs_settings": {
"VCCLCompilerTool": {
"RuntimeLibrary": "3"
}
},
}
},
"variables": {
"oci_include_dir%": "<!(IF DEFINED OCI_INCLUDE_DIR (echo %OCI_INCLUDE_DIR%) ELSE (echo C:\oracle\instantclient\sdk\include))",
"oci_lib_dir%": "<!(IF DEFINED OCI_LIB_DIR (echo %OCI_LIB_DIR%) ELSE (echo C:\oracle\instantclient\sdk\lib\msvc))",
},
# "libraries": [ "-loci" ],
"link_settings": {"libraries": [ '<(oci_lib_dir)\oraocci<(oci_version).lib'] }
}]
],
"include_dirs": [ "<(oci_include_dir)", "<!(node -e \"require('nan')\")" ],
"cflags!": [ "-fno-exceptions" ],
"cflags_cc!": [ "-fno-exceptions" ]
}
]
}
| {'conditions': [["OS=='mac'", {'variables': {'oci_version%': '11'}}, {'variables': {'oci_version%': '12'}}]], 'targets': [{'target_name': 'oracle_bindings', 'sources': ['src/connection.cpp', 'src/oracle_bindings.cpp', 'src/executeBaton.cpp', 'src/outParam.cpp', 'src/reader.cpp', 'src/statement.cpp'], 'conditions': [["OS=='mac'", {'xcode_settings': {'GCC_ENABLE_CPP_EXCEPTIONS': 'YES', 'GCC_ENABLE_CPP_RTTI': 'YES'}, 'variables': {'oci_include_dir%': '<!(if [ -z $OCI_INCLUDE_DIR ]; then echo "/opt/instantclient/sdk/include/"; else echo $OCI_INCLUDE_DIR; fi)', 'oci_lib_dir%': '<!(if [ -z $OCI_LIB_DIR ]; then echo "/opt/instantclient/"; else echo $OCI_LIB_DIR; fi)'}, 'libraries': ['-locci', '-lclntsh', '-lnnz<(oci_version)'], 'link_settings': {'libraries': ['-L<(oci_lib_dir)']}}], ["OS=='linux'", {'variables': {'oci_include_dir%': '<!(if [ -z $OCI_INCLUDE_DIR ]; then echo "/opt/instantclient/sdk/include/"; else echo $OCI_INCLUDE_DIR; fi)', 'oci_lib_dir%': '<!(if [ -z $OCI_LIB_DIR ]; then echo "/opt/instantclient/"; else echo $OCI_LIB_DIR; fi)'}, 'defines': ['_GLIBCXX_USE_CXX11_ABI=0'], 'libraries': ['-locci', '-lclntsh', '-lnnz<(oci_version)'], 'link_settings': {'libraries': ['-L<(oci_lib_dir)']}}], ["OS=='win'", {'configurations': {'Release': {'msvs_settings': {'VCCLCompilerTool': {'RuntimeLibrary': '2'}}}, 'Debug': {'msvs_settings': {'VCCLCompilerTool': {'RuntimeLibrary': '3'}}}}, 'variables': {'oci_include_dir%': '<!(IF DEFINED OCI_INCLUDE_DIR (echo %OCI_INCLUDE_DIR%) ELSE (echo C:\\oracle\\instantclient\\sdk\\include))', 'oci_lib_dir%': '<!(IF DEFINED OCI_LIB_DIR (echo %OCI_LIB_DIR%) ELSE (echo C:\\oracle\\instantclient\\sdk\\lib\\msvc))'}, 'link_settings': {'libraries': ['<(oci_lib_dir)\\oraocci<(oci_version).lib']}}]], 'include_dirs': ['<(oci_include_dir)', '<!(node -e "require(\'nan\')")'], 'cflags!': ['-fno-exceptions'], 'cflags_cc!': ['-fno-exceptions']}]} |
a = 0
while(a < 5):
a = (a + 1) * 2 % 3
if(a == 2):
while(b):
execute(a)
else:
a = mogrify()
else:
a = -(c and d) == -1 != get() + escape_string(a)
a = get()
execute(a) | a = 0
while a < 5:
a = (a + 1) * 2 % 3
if a == 2:
while b:
execute(a)
else:
a = mogrify()
else:
a = -(c and d) == -1 != get() + escape_string(a)
a = get()
execute(a) |
#
# PySNMP MIB module VERTICAL16-IPTEL-MIB (http://snmplabs.com/pysmi)
# ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/VERTICAL16-IPTEL-MIB
# Produced by pysmi-0.3.4 at Wed May 1 15:34:14 2019
# On host DAVWANG4-M-1475 platform Darwin version 18.5.0 by user davwang4
# Using Python version 3.7.3 (default, Mar 27 2019, 09:23:15)
#
ObjectIdentifier, OctetString, Integer = mibBuilder.importSymbols("ASN1", "ObjectIdentifier", "OctetString", "Integer")
NamedValues, = mibBuilder.importSymbols("ASN1-ENUMERATION", "NamedValues")
ConstraintsIntersection, ConstraintsUnion, ValueRangeConstraint, SingleValueConstraint, ValueSizeConstraint = mibBuilder.importSymbols("ASN1-REFINEMENT", "ConstraintsIntersection", "ConstraintsUnion", "ValueRangeConstraint", "SingleValueConstraint", "ValueSizeConstraint")
NotificationGroup, ModuleCompliance = mibBuilder.importSymbols("SNMPv2-CONF", "NotificationGroup", "ModuleCompliance")
enterprises, Counter32, Counter64, NotificationType, ModuleIdentity, MibIdentifier, TimeTicks, IpAddress, MibScalar, MibTable, MibTableRow, MibTableColumn, ObjectIdentity, Integer32, NotificationType, Unsigned32, iso, Gauge32, Bits = mibBuilder.importSymbols("SNMPv2-SMI", "enterprises", "Counter32", "Counter64", "NotificationType", "ModuleIdentity", "MibIdentifier", "TimeTicks", "IpAddress", "MibScalar", "MibTable", "MibTableRow", "MibTableColumn", "ObjectIdentity", "Integer32", "NotificationType", "Unsigned32", "iso", "Gauge32", "Bits")
DisplayString, TextualConvention = mibBuilder.importSymbols("SNMPv2-TC", "DisplayString", "TextualConvention")
vertical = MibIdentifier((1, 3, 6, 1, 4, 1, 2338))
iptel = MibIdentifier((1, 3, 6, 1, 4, 1, 2338, 16))
iptelTrunkSize = MibScalar((1, 3, 6, 1, 4, 1, 2338, 16, 1), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: iptelTrunkSize.setStatus('mandatory')
if mibBuilder.loadTexts: iptelTrunkSize.setDescription('Number of Trunk')
ipTelTrunkSummary = MibTable((1, 3, 6, 1, 4, 1, 2338, 16, 2), )
if mibBuilder.loadTexts: ipTelTrunkSummary.setStatus('mandatory')
if mibBuilder.loadTexts: ipTelTrunkSummary.setDescription('Overview table of IPTel trunks')
ipTelTrunkInfo = MibTableRow((1, 3, 6, 1, 4, 1, 2338, 16, 2, 1), ).setIndexNames((0, "VERTICAL16-IPTEL-MIB", "TrunkIndex"))
if mibBuilder.loadTexts: ipTelTrunkInfo.setStatus('mandatory')
if mibBuilder.loadTexts: ipTelTrunkInfo.setDescription('Entry in the IpTelTrunkSummary Table')
trunkIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 2338, 16, 2, 1, 1), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: trunkIndex.setStatus('mandatory')
if mibBuilder.loadTexts: trunkIndex.setDescription('Trunk Number in the trunk table')
trunkState = MibTableColumn((1, 3, 6, 1, 4, 1, 2338, 16, 2, 1, 2), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 1, 2, 3, 4, 5, 6, 7))).clone(namedValues=NamedValues(("not-configured", 0), ("out-of-service", 1), ("initializing", 2), ("idle", 3), ("outgoing", 4), ("incoming", 5), ("connected", 6), ("disconnecting", 7)))).setMaxAccess("readonly")
if mibBuilder.loadTexts: trunkState.setStatus('mandatory')
if mibBuilder.loadTexts: trunkState.setDescription('Trunk State')
calledParty = MibTableColumn((1, 3, 6, 1, 4, 1, 2338, 16, 2, 1, 3), DisplayString()).setMaxAccess("readonly")
if mibBuilder.loadTexts: calledParty.setStatus('mandatory')
if mibBuilder.loadTexts: calledParty.setDescription('Number of the Called Party')
callingParty = MibTableColumn((1, 3, 6, 1, 4, 1, 2338, 16, 2, 1, 4), DisplayString()).setMaxAccess("readonly")
if mibBuilder.loadTexts: callingParty.setStatus('mandatory')
if mibBuilder.loadTexts: callingParty.setDescription('Number of the Calling Party')
remoteGateway = MibTableColumn((1, 3, 6, 1, 4, 1, 2338, 16, 2, 1, 5), DisplayString()).setMaxAccess("readonly")
if mibBuilder.loadTexts: remoteGateway.setStatus('mandatory')
if mibBuilder.loadTexts: remoteGateway.setDescription('Remote Gateway Number')
localAlarmThreshold = MibTableColumn((1, 3, 6, 1, 4, 1, 2338, 16, 2, 1, 6), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: localAlarmThreshold.setStatus('mandatory')
if mibBuilder.loadTexts: localAlarmThreshold.setDescription('Current levels of thresholds reached. It is a bit field indicating following thresholds: == BIT === === DESCRIPTION === 0 Jitter 1 NetworkLost 2 Network To Host Errors 3 Host To Network Errors 4 DSP To Host Errors 5 Host to DSP Errors ================================')
remoteAlarmThreshold = MibTableColumn((1, 3, 6, 1, 4, 1, 2338, 16, 2, 1, 7), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: remoteAlarmThreshold.setStatus('mandatory')
if mibBuilder.loadTexts: remoteAlarmThreshold.setDescription('Current levels of thresholds reached. For a description of bit fields refer to LocalThreshold')
ipTelReconfigComplete = NotificationType((1, 3, 6, 1, 4, 1, 2338) + (0,64)).setObjects(("VERTICAL16-IPTEL-MIB", "iptelTrunkSize"))
if mibBuilder.loadTexts: ipTelReconfigComplete.setDescription(' This notification is sent when the reconfiguration command completes.')
ipTelTrunkFailure = NotificationType((1, 3, 6, 1, 4, 1, 2338) + (0,65)).setObjects(("VERTICAL16-IPTEL-MIB", "trunkIndex"))
if mibBuilder.loadTexts: ipTelTrunkFailure.setDescription('Issued when the specified Trunk has failed.')
ipTelTrunkAlarmInfo = NotificationType((1, 3, 6, 1, 4, 1, 2338) + (0,66)).setObjects(("VERTICAL16-IPTEL-MIB", "trunkIndex"), ("VERTICAL16-IPTEL-MIB", "localAlarmThreshold"), ("VERTICAL16-IPTEL-MIB", "remoteAlarmThreshold"))
if mibBuilder.loadTexts: ipTelTrunkAlarmInfo.setDescription('Informational Alarm associated with some parameter threshold being reached.')
mibBuilder.exportSymbols("VERTICAL16-IPTEL-MIB", ipTelTrunkAlarmInfo=ipTelTrunkAlarmInfo, localAlarmThreshold=localAlarmThreshold, calledParty=calledParty, remoteAlarmThreshold=remoteAlarmThreshold, ipTelTrunkSummary=ipTelTrunkSummary, ipTelTrunkFailure=ipTelTrunkFailure, ipTelTrunkInfo=ipTelTrunkInfo, remoteGateway=remoteGateway, iptelTrunkSize=iptelTrunkSize, iptel=iptel, ipTelReconfigComplete=ipTelReconfigComplete, vertical=vertical, trunkIndex=trunkIndex, callingParty=callingParty, trunkState=trunkState)
| (object_identifier, octet_string, integer) = mibBuilder.importSymbols('ASN1', 'ObjectIdentifier', 'OctetString', 'Integer')
(named_values,) = mibBuilder.importSymbols('ASN1-ENUMERATION', 'NamedValues')
(constraints_intersection, constraints_union, value_range_constraint, single_value_constraint, value_size_constraint) = mibBuilder.importSymbols('ASN1-REFINEMENT', 'ConstraintsIntersection', 'ConstraintsUnion', 'ValueRangeConstraint', 'SingleValueConstraint', 'ValueSizeConstraint')
(notification_group, module_compliance) = mibBuilder.importSymbols('SNMPv2-CONF', 'NotificationGroup', 'ModuleCompliance')
(enterprises, counter32, counter64, notification_type, module_identity, mib_identifier, time_ticks, ip_address, mib_scalar, mib_table, mib_table_row, mib_table_column, object_identity, integer32, notification_type, unsigned32, iso, gauge32, bits) = mibBuilder.importSymbols('SNMPv2-SMI', 'enterprises', 'Counter32', 'Counter64', 'NotificationType', 'ModuleIdentity', 'MibIdentifier', 'TimeTicks', 'IpAddress', 'MibScalar', 'MibTable', 'MibTableRow', 'MibTableColumn', 'ObjectIdentity', 'Integer32', 'NotificationType', 'Unsigned32', 'iso', 'Gauge32', 'Bits')
(display_string, textual_convention) = mibBuilder.importSymbols('SNMPv2-TC', 'DisplayString', 'TextualConvention')
vertical = mib_identifier((1, 3, 6, 1, 4, 1, 2338))
iptel = mib_identifier((1, 3, 6, 1, 4, 1, 2338, 16))
iptel_trunk_size = mib_scalar((1, 3, 6, 1, 4, 1, 2338, 16, 1), integer32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
iptelTrunkSize.setStatus('mandatory')
if mibBuilder.loadTexts:
iptelTrunkSize.setDescription('Number of Trunk')
ip_tel_trunk_summary = mib_table((1, 3, 6, 1, 4, 1, 2338, 16, 2))
if mibBuilder.loadTexts:
ipTelTrunkSummary.setStatus('mandatory')
if mibBuilder.loadTexts:
ipTelTrunkSummary.setDescription('Overview table of IPTel trunks')
ip_tel_trunk_info = mib_table_row((1, 3, 6, 1, 4, 1, 2338, 16, 2, 1)).setIndexNames((0, 'VERTICAL16-IPTEL-MIB', 'TrunkIndex'))
if mibBuilder.loadTexts:
ipTelTrunkInfo.setStatus('mandatory')
if mibBuilder.loadTexts:
ipTelTrunkInfo.setDescription('Entry in the IpTelTrunkSummary Table')
trunk_index = mib_table_column((1, 3, 6, 1, 4, 1, 2338, 16, 2, 1, 1), integer32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
trunkIndex.setStatus('mandatory')
if mibBuilder.loadTexts:
trunkIndex.setDescription('Trunk Number in the trunk table')
trunk_state = mib_table_column((1, 3, 6, 1, 4, 1, 2338, 16, 2, 1, 2), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(0, 1, 2, 3, 4, 5, 6, 7))).clone(namedValues=named_values(('not-configured', 0), ('out-of-service', 1), ('initializing', 2), ('idle', 3), ('outgoing', 4), ('incoming', 5), ('connected', 6), ('disconnecting', 7)))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
trunkState.setStatus('mandatory')
if mibBuilder.loadTexts:
trunkState.setDescription('Trunk State')
called_party = mib_table_column((1, 3, 6, 1, 4, 1, 2338, 16, 2, 1, 3), display_string()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
calledParty.setStatus('mandatory')
if mibBuilder.loadTexts:
calledParty.setDescription('Number of the Called Party')
calling_party = mib_table_column((1, 3, 6, 1, 4, 1, 2338, 16, 2, 1, 4), display_string()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
callingParty.setStatus('mandatory')
if mibBuilder.loadTexts:
callingParty.setDescription('Number of the Calling Party')
remote_gateway = mib_table_column((1, 3, 6, 1, 4, 1, 2338, 16, 2, 1, 5), display_string()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
remoteGateway.setStatus('mandatory')
if mibBuilder.loadTexts:
remoteGateway.setDescription('Remote Gateway Number')
local_alarm_threshold = mib_table_column((1, 3, 6, 1, 4, 1, 2338, 16, 2, 1, 6), integer32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
localAlarmThreshold.setStatus('mandatory')
if mibBuilder.loadTexts:
localAlarmThreshold.setDescription('Current levels of thresholds reached. It is a bit field indicating following thresholds: == BIT === === DESCRIPTION === 0 Jitter 1 NetworkLost 2 Network To Host Errors 3 Host To Network Errors 4 DSP To Host Errors 5 Host to DSP Errors ================================')
remote_alarm_threshold = mib_table_column((1, 3, 6, 1, 4, 1, 2338, 16, 2, 1, 7), integer32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
remoteAlarmThreshold.setStatus('mandatory')
if mibBuilder.loadTexts:
remoteAlarmThreshold.setDescription('Current levels of thresholds reached. For a description of bit fields refer to LocalThreshold')
ip_tel_reconfig_complete = notification_type((1, 3, 6, 1, 4, 1, 2338) + (0, 64)).setObjects(('VERTICAL16-IPTEL-MIB', 'iptelTrunkSize'))
if mibBuilder.loadTexts:
ipTelReconfigComplete.setDescription(' This notification is sent when the reconfiguration command completes.')
ip_tel_trunk_failure = notification_type((1, 3, 6, 1, 4, 1, 2338) + (0, 65)).setObjects(('VERTICAL16-IPTEL-MIB', 'trunkIndex'))
if mibBuilder.loadTexts:
ipTelTrunkFailure.setDescription('Issued when the specified Trunk has failed.')
ip_tel_trunk_alarm_info = notification_type((1, 3, 6, 1, 4, 1, 2338) + (0, 66)).setObjects(('VERTICAL16-IPTEL-MIB', 'trunkIndex'), ('VERTICAL16-IPTEL-MIB', 'localAlarmThreshold'), ('VERTICAL16-IPTEL-MIB', 'remoteAlarmThreshold'))
if mibBuilder.loadTexts:
ipTelTrunkAlarmInfo.setDescription('Informational Alarm associated with some parameter threshold being reached.')
mibBuilder.exportSymbols('VERTICAL16-IPTEL-MIB', ipTelTrunkAlarmInfo=ipTelTrunkAlarmInfo, localAlarmThreshold=localAlarmThreshold, calledParty=calledParty, remoteAlarmThreshold=remoteAlarmThreshold, ipTelTrunkSummary=ipTelTrunkSummary, ipTelTrunkFailure=ipTelTrunkFailure, ipTelTrunkInfo=ipTelTrunkInfo, remoteGateway=remoteGateway, iptelTrunkSize=iptelTrunkSize, iptel=iptel, ipTelReconfigComplete=ipTelReconfigComplete, vertical=vertical, trunkIndex=trunkIndex, callingParty=callingParty, trunkState=trunkState) |
first_value = input('First Number: ')
second_value = input('Second Number: ')
if first_value.isnumeric() == False or second_value.isnumeric() == False:
print('Please enter numbers only.')
exit()
first_value = int(first_value)
second_value = int(second_value)
sum = first_value + second_value
print('Sum: ' + str(sum)) | first_value = input('First Number: ')
second_value = input('Second Number: ')
if first_value.isnumeric() == False or second_value.isnumeric() == False:
print('Please enter numbers only.')
exit()
first_value = int(first_value)
second_value = int(second_value)
sum = first_value + second_value
print('Sum: ' + str(sum)) |
DEBUG = True
ASSETS_DEBUG = True
# GRANO_HOST = 'http://localhost:5000'
# GRANO_APIKEY = '7a65f180d7b898822'
# GRANO_PROJECT = 'kompromatron_C'
GRANO_HOST = 'http://beta.grano.cc/'
GRANO_APIKEY = 'GHtElTYOQUPKPik'
GRANO_PROJECT = 'kompromatron'
| debug = True
assets_debug = True
grano_host = 'http://beta.grano.cc/'
grano_apikey = 'GHtElTYOQUPKPik'
grano_project = 'kompromatron' |
#Chapter 2 - Exploratory data analysis
#pandas line plots
# Create a list of y-axis column names: y_columns
y_columns = ['AAPL','IBM']
# Generate a line plot
df.plot(x='Month', y=y_columns)
# Add the title
plt.title('Monthly stock prices')
# Add the y-axis label
plt.ylabel('Price ($US)')
# Display the plot
plt.show()
#pandas scatter plots
# Generate a scatter plot
df.plot(kind='scatter', x='hp', y='mpg', s=sizes)
# Add the title
plt.title('Fuel efficiency vs Horse-power')
# Add the x-axis label
plt.xlabel('Horse-power')
# Add the y-axis label
plt.ylabel('Fuel efficiency (mpg)')
# Display the plot
plt.show()
#pandas box plots
# Make a list of the column names to be plotted: cols
cols = ['weight','mpg']
# Generate the box plots
df[cols].plot(kind='box',subplots=True)
# Display the plot
plt.show()
#pandas hist, pdf and cdf
# This formats the plots such that they appear on separate rows
fig, axes = plt.subplots(nrows=2, ncols=1)
# Plot the PDF
df.fraction.plot(ax=axes[0], kind='hist', normed=True, bins=30, range=(0,.3))
plt.show()
# Plot the CDF
df.fraction.plot(ax=axes[1], kind='hist', normed=True, cumulative=True, bins=30, range=(0,.3))
plt.show()
#Bachelor's degrees awarded to women
# Print the minimum value of the Engineering column
print(df['Engineering'].min())
# Print the maximum value of the Engineering column
print(df['Engineering'].max())
# Construct the mean percentage per year: mean
mean = df.mean(axis='columns')
# Plot the average percentage per year
mean.plot()
# Display the plot
plt.show()
#Median vs mean
# Print summary statistics of the fare column with .describe()
print(df.fare.describe())
# Generate a box plot of the fare column
df.fare.plot(kind='box')
# Show the plot
plt.show()
#Quantiles
# Print the number of countries reported in 2015
print(df['2015'].count())
# Print the 5th and 95th percentiles
q=[0.05, 0.95]
print(df.quantile(q))
# Generate a box plot
years = ['1800','1850','1900','1950','2000']
df[years].plot(kind='box')
plt.show()
#Standard deviation of temperature
# Print the mean of the January and March data
print(january.mean(), march.mean())
# Print the standard deviation of the January and March data
print(january.std(), march.std())
#Filtering and counting
#Separate and summarize
# Compute the global mean and global standard deviation: global_mean, global_std
global_mean = df.mean()
global_std = df.std()
# Filter the US population from the origin column: us
us = df[df['origin'] == 'US']
# Compute the US mean and US standard deviation: us_mean, us_std
us_mean = us.mean()
us_std = us.std()
# Print the differences
print(us_mean - global_mean)
print(us_std - global_std)
#Separate and plot
# Display the box plots on 3 separate rows and 1 column
fig, axes = plt.subplots(nrows=3, ncols=1)
# Generate a box plot of the fare prices for the First passenger class
titanic.loc[titanic['pclass'] == 1].plot(ax=axes[0], y='fare', kind='box')
# Generate a box plot of the fare prices for the Second passenger class
titanic.loc[titanic['pclass'] == 2].plot(ax=axes[1], y='fare', kind='box')
# Generate a box plot of the fare prices for the Third passenger class
titanic.loc[titanic['pclass'] == 3].plot(ax=axes[2], y='fare', kind='box')
# Display the plot
plt.show()
| y_columns = ['AAPL', 'IBM']
df.plot(x='Month', y=y_columns)
plt.title('Monthly stock prices')
plt.ylabel('Price ($US)')
plt.show()
df.plot(kind='scatter', x='hp', y='mpg', s=sizes)
plt.title('Fuel efficiency vs Horse-power')
plt.xlabel('Horse-power')
plt.ylabel('Fuel efficiency (mpg)')
plt.show()
cols = ['weight', 'mpg']
df[cols].plot(kind='box', subplots=True)
plt.show()
(fig, axes) = plt.subplots(nrows=2, ncols=1)
df.fraction.plot(ax=axes[0], kind='hist', normed=True, bins=30, range=(0, 0.3))
plt.show()
df.fraction.plot(ax=axes[1], kind='hist', normed=True, cumulative=True, bins=30, range=(0, 0.3))
plt.show()
print(df['Engineering'].min())
print(df['Engineering'].max())
mean = df.mean(axis='columns')
mean.plot()
plt.show()
print(df.fare.describe())
df.fare.plot(kind='box')
plt.show()
print(df['2015'].count())
q = [0.05, 0.95]
print(df.quantile(q))
years = ['1800', '1850', '1900', '1950', '2000']
df[years].plot(kind='box')
plt.show()
print(january.mean(), march.mean())
print(january.std(), march.std())
global_mean = df.mean()
global_std = df.std()
us = df[df['origin'] == 'US']
us_mean = us.mean()
us_std = us.std()
print(us_mean - global_mean)
print(us_std - global_std)
(fig, axes) = plt.subplots(nrows=3, ncols=1)
titanic.loc[titanic['pclass'] == 1].plot(ax=axes[0], y='fare', kind='box')
titanic.loc[titanic['pclass'] == 2].plot(ax=axes[1], y='fare', kind='box')
titanic.loc[titanic['pclass'] == 3].plot(ax=axes[2], y='fare', kind='box')
plt.show() |
a=int(input("enter a year:"))
if(a%4==0):
print("{0} is a leap year".format(a))
elif(a%400==0):
print("{0} is a leaf year".format(a))
else:
print("{0} is not a leap year".format(a))
| a = int(input('enter a year:'))
if a % 4 == 0:
print('{0} is a leap year'.format(a))
elif a % 400 == 0:
print('{0} is a leaf year'.format(a))
else:
print('{0} is not a leap year'.format(a)) |
# This program saves a list of strings to a file.
def main():
# Create a list of strings.
cities = ['New York', 'Boston', 'Atlanta', 'Dallas']
# Open a file for writing.
outfile = open('cities.txt', 'w')
# Write the list to the file.
for item in cities:
outfile.write(item + '\n')
# Close the file.
outfile.close()
# Call the main function.
main()
| def main():
cities = ['New York', 'Boston', 'Atlanta', 'Dallas']
outfile = open('cities.txt', 'w')
for item in cities:
outfile.write(item + '\n')
outfile.close()
main() |
class FabricArea(Element,IDisposable):
""" An object that represents an Fabric Area Distribution within the Autodesk Revit project. It is container for Fabric Sheet elements. """
def CopyCurveLoopsInSketch(self):
"""
CopyCurveLoopsInSketch(self: FabricArea) -> IList[CurveLoop]
Creates copies of the CurveLoops in the FabricArea sketch.
Returns: The copy of the curve loops.
"""
pass
@staticmethod
def Create(aDoc,hostElement,*__args):
"""
Create(aDoc: Document,hostElement: Element,curveLoops: IList[CurveLoop],majorDirection: XYZ,majorDirectionOrigin: XYZ,fabricAreaTypeId: ElementId,fabricSheetTypeId: ElementId) -> FabricArea
Create(aDoc: Document,hostElement: Element,majorDirection: XYZ,fabricAreaTypeId: ElementId,fabricSheetTypeId: ElementId) -> FabricArea
Creates a FabricArea based on a host boundary.
aDoc: The document.
hostElement: The element that will host the FabricArea. The host can be a Structural Floor,
Structural Wall,Structural Slab,or a Part created from a structural layer
belonging to one of those element types.
majorDirection: A vector to define the major direction of the FabricArea.
fabricAreaTypeId: The id of the FabricAreaType.
fabricSheetTypeId: The id of the FabricSheetType.
Returns: The newly created FabricArea.
"""
pass
def Dispose(self):
""" Dispose(self: Element,A_0: bool) """
pass
def GetBoundaryCurveIds(self):
"""
GetBoundaryCurveIds(self: FabricArea) -> IList[ElementId]
Retrieves the identifiers of the set of curves forming the boundary of the
Fabric Area.
Returns: A collection of ElementIds of FabricAreaCurve elements.
"""
pass
def getBoundingBox(self,*args):
""" getBoundingBox(self: Element,view: View) -> BoundingBoxXYZ """
pass
def GetFabricSheetElementIds(self):
"""
GetFabricSheetElementIds(self: FabricArea) -> IList[ElementId]
Retrieves the identifiers of all the FabricSheet Elements in the FabricArea.
Returns: A collection of ElementIds of FabricSheet elements.
"""
pass
def GetReinforcementRoundingManager(self):
"""
GetReinforcementRoundingManager(self: FabricArea) -> FabricRoundingManager
Returns an object for managing reinforcement rounding override settings.
Returns: The rounding manager.
"""
pass
def GetTotalSheetMass(self):
"""
GetTotalSheetMass(self: FabricArea) -> float
Calculates the total sheet mass: Volume of Wire * Unit Weight.
Returns: The total sheet mass.
"""
pass
def GetValidViewsForTags(self):
"""
GetValidViewsForTags(self: FabricArea) -> IList[ElementId]
Gets ids of the views where tags and symbols can be placed for the FabricArea
and/or FabricSheets
Returns: The collection of View ElementIds.
"""
pass
def IsCoverOffsetValid(self,coverOffset):
"""
IsCoverOffsetValid(self: FabricArea,coverOffset: float) -> bool
Identifies if the specified value is valid for use as a cover offset.
coverOffset: The cover offset value.
Returns: True if the value is valid,false if the value is invalid.
"""
pass
def IsValidMajorLapSplice(self,majorLapSplice):
"""
IsValidMajorLapSplice(self: FabricArea,majorLapSplice: float) -> bool
Identifies if the specified value is valid for use as a major lap splice.
majorLapSplice: The major lap splice value.
Returns: True if the value is valid,false if the value is invalid.
"""
pass
def IsValidMinorLapSplice(self,minorLapSplice):
"""
IsValidMinorLapSplice(self: FabricArea,minorLapSplice: float) -> bool
Identifies if the specified value is valid for use as a minor lap splice.
minorLapSplice: The minor lap splice value.
Returns: True if the value is valid,false if the value is invalid.
"""
pass
def ReleaseUnmanagedResources(self,*args):
""" ReleaseUnmanagedResources(self: Element,disposing: bool) """
pass
@staticmethod
def RemoveFabricReinforcementSystem(doc,system):
"""
RemoveFabricReinforcementSystem(doc: Document,system: FabricArea) -> IList[ElementId]
Deletes the specified FabricArea,and converts its FabricSheet elements
to
equivalent Single Fabric Sheet elements.
doc: The document.
system: An FabricArea Reinforcement element in the document.
Returns: The ids of the newly created Single Fabric Sheet elements.
"""
pass
def setElementType(self,*args):
""" setElementType(self: Element,type: ElementType,incompatibleExceptionMessage: str) """
pass
def __enter__(self,*args):
""" __enter__(self: IDisposable) -> object """
pass
def __exit__(self,*args):
""" __exit__(self: IDisposable,exc_type: object,exc_value: object,exc_back: object) """
pass
def __init__(self,*args):
""" x.__init__(...) initializes x; see x.__class__.__doc__ for signaturex.__init__(...) initializes x; see x.__class__.__doc__ for signaturex.__init__(...) initializes x; see x.__class__.__doc__ for signature """
pass
CoverOffset=property(lambda self: object(),lambda self,v: None,lambda self: None)
"""The additional cover offset of the fabric distribution.
Get: CoverOffset(self: FabricArea) -> float
Set: CoverOffset(self: FabricArea)=value
"""
Direction=property(lambda self: object(),lambda self,v: None,lambda self: None)
"""The Major Direction of the Fabric Area.
Get: Direction(self: FabricArea) -> XYZ
"""
DirectionOrigin=property(lambda self: object(),lambda self,v: None,lambda self: None)
"""The Origin Point of the Major Direction of the Fabric Area.
Get: DirectionOrigin(self: FabricArea) -> XYZ
"""
FabricAreaType=property(lambda self: object(),lambda self,v: None,lambda self: None)
"""The type of the Fabric Area.
Get: FabricAreaType(self: FabricArea) -> FabricAreaType
"""
FabricLocation=property(lambda self: object(),lambda self,v: None,lambda self: None)
"""The Fabric location in the host.
Get: FabricLocation(self: FabricArea) -> FabricLocation
Set: FabricLocation(self: FabricArea)=value
"""
FabricSheetTypeId=property(lambda self: object(),lambda self,v: None,lambda self: None)
"""The id of the Fabric Sheet Type for this element.
Get: FabricSheetTypeId(self: FabricArea) -> ElementId
Set: FabricSheetTypeId(self: FabricArea)=value
"""
HostId=property(lambda self: object(),lambda self,v: None,lambda self: None)
"""The id of the Host element for the fabric area.
Get: HostId(self: FabricArea) -> ElementId
"""
LapSplicePosition=property(lambda self: object(),lambda self,v: None,lambda self: None)
"""The fabric lap splice position in the fabric distribution.
Get: LapSplicePosition(self: FabricArea) -> FabricLapSplicePosition
Set: LapSplicePosition(self: FabricArea)=value
"""
MajorLapSpliceLength=property(lambda self: object(),lambda self,v: None,lambda self: None)
"""The fabric lap splice length in the fabric distribution in the major direction.
Get: MajorLapSpliceLength(self: FabricArea) -> float
Set: MajorLapSpliceLength(self: FabricArea)=value
"""
MajorSheetAlignment=property(lambda self: object(),lambda self,v: None,lambda self: None)
"""The fabric sheet alignment in the fabric distribution in the major direction.
Get: MajorSheetAlignment(self: FabricArea) -> FabricSheetAlignment
Set: MajorSheetAlignment(self: FabricArea)=value
"""
MinorLapSpliceLength=property(lambda self: object(),lambda self,v: None,lambda self: None)
"""The fabric lap splice length in the fabric distribution in the minor direction.
Get: MinorLapSpliceLength(self: FabricArea) -> float
Set: MinorLapSpliceLength(self: FabricArea)=value
"""
MinorSheetAlignment=property(lambda self: object(),lambda self,v: None,lambda self: None)
"""The fabric sheet alignment in the fabric distribution in the minor direction.
Get: MinorSheetAlignment(self: FabricArea) -> FabricSheetAlignment
Set: MinorSheetAlignment(self: FabricArea)=value
"""
SketchId=property(lambda self: object(),lambda self,v: None,lambda self: None)
"""The id of the Sketch element for this element.
Get: SketchId(self: FabricArea) -> ElementId
"""
TagViewId=property(lambda self: object(),lambda self,v: None,lambda self: None)
"""The element of the view in which to tag new members of this element.
Get: TagViewId(self: FabricArea) -> ElementId
Set: TagViewId(self: FabricArea)=value
"""
| class Fabricarea(Element, IDisposable):
""" An object that represents an Fabric Area Distribution within the Autodesk Revit project. It is container for Fabric Sheet elements. """
def copy_curve_loops_in_sketch(self):
"""
CopyCurveLoopsInSketch(self: FabricArea) -> IList[CurveLoop]
Creates copies of the CurveLoops in the FabricArea sketch.
Returns: The copy of the curve loops.
"""
pass
@staticmethod
def create(aDoc, hostElement, *__args):
"""
Create(aDoc: Document,hostElement: Element,curveLoops: IList[CurveLoop],majorDirection: XYZ,majorDirectionOrigin: XYZ,fabricAreaTypeId: ElementId,fabricSheetTypeId: ElementId) -> FabricArea
Create(aDoc: Document,hostElement: Element,majorDirection: XYZ,fabricAreaTypeId: ElementId,fabricSheetTypeId: ElementId) -> FabricArea
Creates a FabricArea based on a host boundary.
aDoc: The document.
hostElement: The element that will host the FabricArea. The host can be a Structural Floor,
Structural Wall,Structural Slab,or a Part created from a structural layer
belonging to one of those element types.
majorDirection: A vector to define the major direction of the FabricArea.
fabricAreaTypeId: The id of the FabricAreaType.
fabricSheetTypeId: The id of the FabricSheetType.
Returns: The newly created FabricArea.
"""
pass
def dispose(self):
""" Dispose(self: Element,A_0: bool) """
pass
def get_boundary_curve_ids(self):
"""
GetBoundaryCurveIds(self: FabricArea) -> IList[ElementId]
Retrieves the identifiers of the set of curves forming the boundary of the
Fabric Area.
Returns: A collection of ElementIds of FabricAreaCurve elements.
"""
pass
def get_bounding_box(self, *args):
""" getBoundingBox(self: Element,view: View) -> BoundingBoxXYZ """
pass
def get_fabric_sheet_element_ids(self):
"""
GetFabricSheetElementIds(self: FabricArea) -> IList[ElementId]
Retrieves the identifiers of all the FabricSheet Elements in the FabricArea.
Returns: A collection of ElementIds of FabricSheet elements.
"""
pass
def get_reinforcement_rounding_manager(self):
"""
GetReinforcementRoundingManager(self: FabricArea) -> FabricRoundingManager
Returns an object for managing reinforcement rounding override settings.
Returns: The rounding manager.
"""
pass
def get_total_sheet_mass(self):
"""
GetTotalSheetMass(self: FabricArea) -> float
Calculates the total sheet mass: Volume of Wire * Unit Weight.
Returns: The total sheet mass.
"""
pass
def get_valid_views_for_tags(self):
"""
GetValidViewsForTags(self: FabricArea) -> IList[ElementId]
Gets ids of the views where tags and symbols can be placed for the FabricArea
and/or FabricSheets
Returns: The collection of View ElementIds.
"""
pass
def is_cover_offset_valid(self, coverOffset):
"""
IsCoverOffsetValid(self: FabricArea,coverOffset: float) -> bool
Identifies if the specified value is valid for use as a cover offset.
coverOffset: The cover offset value.
Returns: True if the value is valid,false if the value is invalid.
"""
pass
def is_valid_major_lap_splice(self, majorLapSplice):
"""
IsValidMajorLapSplice(self: FabricArea,majorLapSplice: float) -> bool
Identifies if the specified value is valid for use as a major lap splice.
majorLapSplice: The major lap splice value.
Returns: True if the value is valid,false if the value is invalid.
"""
pass
def is_valid_minor_lap_splice(self, minorLapSplice):
"""
IsValidMinorLapSplice(self: FabricArea,minorLapSplice: float) -> bool
Identifies if the specified value is valid for use as a minor lap splice.
minorLapSplice: The minor lap splice value.
Returns: True if the value is valid,false if the value is invalid.
"""
pass
def release_unmanaged_resources(self, *args):
""" ReleaseUnmanagedResources(self: Element,disposing: bool) """
pass
@staticmethod
def remove_fabric_reinforcement_system(doc, system):
"""
RemoveFabricReinforcementSystem(doc: Document,system: FabricArea) -> IList[ElementId]
Deletes the specified FabricArea,and converts its FabricSheet elements
to
equivalent Single Fabric Sheet elements.
doc: The document.
system: An FabricArea Reinforcement element in the document.
Returns: The ids of the newly created Single Fabric Sheet elements.
"""
pass
def set_element_type(self, *args):
""" setElementType(self: Element,type: ElementType,incompatibleExceptionMessage: str) """
pass
def __enter__(self, *args):
""" __enter__(self: IDisposable) -> object """
pass
def __exit__(self, *args):
""" __exit__(self: IDisposable,exc_type: object,exc_value: object,exc_back: object) """
pass
def __init__(self, *args):
""" x.__init__(...) initializes x; see x.__class__.__doc__ for signaturex.__init__(...) initializes x; see x.__class__.__doc__ for signaturex.__init__(...) initializes x; see x.__class__.__doc__ for signature """
pass
cover_offset = property(lambda self: object(), lambda self, v: None, lambda self: None)
'The additional cover offset of the fabric distribution.\n\n\n\nGet: CoverOffset(self: FabricArea) -> float\n\n\n\nSet: CoverOffset(self: FabricArea)=value\n\n'
direction = property(lambda self: object(), lambda self, v: None, lambda self: None)
'The Major Direction of the Fabric Area.\n\n\n\nGet: Direction(self: FabricArea) -> XYZ\n\n\n\n'
direction_origin = property(lambda self: object(), lambda self, v: None, lambda self: None)
'The Origin Point of the Major Direction of the Fabric Area.\n\n\n\nGet: DirectionOrigin(self: FabricArea) -> XYZ\n\n\n\n'
fabric_area_type = property(lambda self: object(), lambda self, v: None, lambda self: None)
'The type of the Fabric Area.\n\n\n\nGet: FabricAreaType(self: FabricArea) -> FabricAreaType\n\n\n\n'
fabric_location = property(lambda self: object(), lambda self, v: None, lambda self: None)
'The Fabric location in the host.\n\n\n\nGet: FabricLocation(self: FabricArea) -> FabricLocation\n\n\n\nSet: FabricLocation(self: FabricArea)=value\n\n'
fabric_sheet_type_id = property(lambda self: object(), lambda self, v: None, lambda self: None)
'The id of the Fabric Sheet Type for this element.\n\n\n\nGet: FabricSheetTypeId(self: FabricArea) -> ElementId\n\n\n\nSet: FabricSheetTypeId(self: FabricArea)=value\n\n'
host_id = property(lambda self: object(), lambda self, v: None, lambda self: None)
'The id of the Host element for the fabric area.\n\n\n\nGet: HostId(self: FabricArea) -> ElementId\n\n\n\n'
lap_splice_position = property(lambda self: object(), lambda self, v: None, lambda self: None)
'The fabric lap splice position in the fabric distribution.\n\n\n\nGet: LapSplicePosition(self: FabricArea) -> FabricLapSplicePosition\n\n\n\nSet: LapSplicePosition(self: FabricArea)=value\n\n'
major_lap_splice_length = property(lambda self: object(), lambda self, v: None, lambda self: None)
'The fabric lap splice length in the fabric distribution in the major direction.\n\n\n\nGet: MajorLapSpliceLength(self: FabricArea) -> float\n\n\n\nSet: MajorLapSpliceLength(self: FabricArea)=value\n\n'
major_sheet_alignment = property(lambda self: object(), lambda self, v: None, lambda self: None)
'The fabric sheet alignment in the fabric distribution in the major direction.\n\n\n\nGet: MajorSheetAlignment(self: FabricArea) -> FabricSheetAlignment\n\n\n\nSet: MajorSheetAlignment(self: FabricArea)=value\n\n'
minor_lap_splice_length = property(lambda self: object(), lambda self, v: None, lambda self: None)
'The fabric lap splice length in the fabric distribution in the minor direction.\n\n\n\nGet: MinorLapSpliceLength(self: FabricArea) -> float\n\n\n\nSet: MinorLapSpliceLength(self: FabricArea)=value\n\n'
minor_sheet_alignment = property(lambda self: object(), lambda self, v: None, lambda self: None)
'The fabric sheet alignment in the fabric distribution in the minor direction.\n\n\n\nGet: MinorSheetAlignment(self: FabricArea) -> FabricSheetAlignment\n\n\n\nSet: MinorSheetAlignment(self: FabricArea)=value\n\n'
sketch_id = property(lambda self: object(), lambda self, v: None, lambda self: None)
'The id of the Sketch element for this element.\n\n\n\nGet: SketchId(self: FabricArea) -> ElementId\n\n\n\n'
tag_view_id = property(lambda self: object(), lambda self, v: None, lambda self: None)
'The element of the view in which to tag new members of this element.\n\n\n\nGet: TagViewId(self: FabricArea) -> ElementId\n\n\n\nSet: TagViewId(self: FabricArea)=value\n\n' |
__all__ = ['edition_to_deckbox']
def edition_to_deckbox(edition):
if edition == 'GRN Guild Kit':
edition = 'Guilds of Ravnica Guild Kit'
if edition == 'RNA Guild Kit':
edition = 'Ravnica Allegiance Guild Kit'
if edition == 'Time Spiral Timeshifted':
edition = 'Time Spiral "Timeshifted"'
elif edition == 'Magic: The Gathering-Commander':
edition = 'Commander'
elif edition == 'Magic 2014':
edition = 'Magic 2014 Core Set'
elif edition == 'Magic 2015':
edition = 'Magic 2015 Core Set'
elif edition == 'Modern Masters 2015':
edition = 'Modern Masters 2015 Edition'
elif edition == 'Modern Masters 2017':
edition = 'Modern Masters 2017 Edition'
elif edition == 'Commander 2013 Edition':
edition = 'Commander 2013'
elif edition == 'Commander 2011':
edition = 'Commander'
elif edition == 'Planechase 2012 Edition':
edition = 'Planechase 2012'
elif edition == 'Commander Anthology 2018':
edition = 'Commander Anthology Volume II'
elif edition == 'M19 Gift Pack':
edition = 'M19 Gift Pack Promos'
return edition
| __all__ = ['edition_to_deckbox']
def edition_to_deckbox(edition):
if edition == 'GRN Guild Kit':
edition = 'Guilds of Ravnica Guild Kit'
if edition == 'RNA Guild Kit':
edition = 'Ravnica Allegiance Guild Kit'
if edition == 'Time Spiral Timeshifted':
edition = 'Time Spiral "Timeshifted"'
elif edition == 'Magic: The Gathering-Commander':
edition = 'Commander'
elif edition == 'Magic 2014':
edition = 'Magic 2014 Core Set'
elif edition == 'Magic 2015':
edition = 'Magic 2015 Core Set'
elif edition == 'Modern Masters 2015':
edition = 'Modern Masters 2015 Edition'
elif edition == 'Modern Masters 2017':
edition = 'Modern Masters 2017 Edition'
elif edition == 'Commander 2013 Edition':
edition = 'Commander 2013'
elif edition == 'Commander 2011':
edition = 'Commander'
elif edition == 'Planechase 2012 Edition':
edition = 'Planechase 2012'
elif edition == 'Commander Anthology 2018':
edition = 'Commander Anthology Volume II'
elif edition == 'M19 Gift Pack':
edition = 'M19 Gift Pack Promos'
return edition |
# --------------------------------------------------------
# (c) Copyright 2014, 2020 by Jason DeLaat.
# Licensed under BSD 3-clause licence.
# --------------------------------------------------------
""" Provides monad classes with operators.
The operators module overrides all base monad types and their aliases
with versions which support operators.
The defined operators are:
& - amap
>> - bind
* - map
Example:
from pymonad.operators import Maybe, Just, Nothing
from pymonad.tools import curry
@curry(2)
def add(x, y): return x + y
@curry(2)
def div(y, x):
if y == 0:
return Nothing
else:
return Just(x / y)
# Equivalent to Maybe.apply(add).to_arguments(Just(1), Just(2))
print(add * Just(1) & Just(2)) # Just 3
# Equivalent to Maybe.insert(5).bind(div(2)).bind(div(0))
print(Just(5) >> div(2) >> div(0)) # Nothing
"""
| """ Provides monad classes with operators.
The operators module overrides all base monad types and their aliases
with versions which support operators.
The defined operators are:
& - amap
>> - bind
* - map
Example:
from pymonad.operators import Maybe, Just, Nothing
from pymonad.tools import curry
@curry(2)
def add(x, y): return x + y
@curry(2)
def div(y, x):
if y == 0:
return Nothing
else:
return Just(x / y)
# Equivalent to Maybe.apply(add).to_arguments(Just(1), Just(2))
print(add * Just(1) & Just(2)) # Just 3
# Equivalent to Maybe.insert(5).bind(div(2)).bind(div(0))
print(Just(5) >> div(2) >> div(0)) # Nothing
""" |
# CPU: 0.05 s
n_judges, n_ratings = map(int, input().split())
sum_ = 0
for _ in range(n_ratings):
sum_ += int(input())
print((sum_ + (n_judges - n_ratings) * -3) / n_judges, (sum_ + (n_judges - n_ratings) * 3) / n_judges)
| (n_judges, n_ratings) = map(int, input().split())
sum_ = 0
for _ in range(n_ratings):
sum_ += int(input())
print((sum_ + (n_judges - n_ratings) * -3) / n_judges, (sum_ + (n_judges - n_ratings) * 3) / n_judges) |
# -*- coding: utf-8 -*-
"""
Created on Sun May 15 2016
@author: Matthew Carse
"""
#@ Uses virtual potentials (Aires-de-Sousa, J., & Aires-de-Sousa, L. (2003). Representation of DNA sequences
#@ with virtual potentials and their processing by (SEQREP) Kohonen self-organizing maps. Bioinformatics, 19(1), 30-36.)
#@ to numerically represent a protein sequence through the relationship (abundance and proximity) of two amino acid residues.
#@ The vpGen class takes an anchor and a chain residue and creates an identifier from these residues.
#@ When the featureGen function is called with an appropriate peptide sequence, the virtual potential for the
#@ sequence is calculated using the anchor and chain residues. The virtual potential is displayed as a 6-item
#@ feature set, with each 'item' corresponding to a range of 0.5 from 0 to 3. The maximum value of a virtual
#@ potential is 2.92896825397.
class vpGen:
# constructor taking anchor and chain residues and creating identifier
def __init__(self, anchor, chain):
# use join for instance variables as anchor/chain are lists due to .split() operation
self.anchor = ''.join(anchor)
self.chain = ''.join(chain)
self.id = self.anchor+self.chain
def featureGen(self, seq):
"Derive virtual potentials given a sequence, anchor residue and chain residue"
# find the position of the first anchor residue in the sequence (has to be at least index 10 due to window size of 10)
ancPos = seq.find(self.anchor,10)
if ancPos == -1:
# default vp set
# float values for future calculations
vps = [-1.,-1.,-1.,-1.,-1.,-1.]
return vps
else:
# recursively call featureGen until anchor not found in remaining sequence
vps = self.featureGen(seq[ancPos-9:])
# if first iteration with anchor existing, set virtual potential counts to 0
# float values for future calculations
if vps == [-1.,-1,-1.,-1.,-1.,-1.]:
vps = [0.,0.,0.,0.,0.,0.]
# reverse sequence for ease of calculation using indices
window = seq[(ancPos-10):ancPos][::-1]
# iterate through the 10-residue window, searching for chain residue
vp = 0
for i, c in enumerate(window):
if c==self.chain:
# if chain residue is found, calculate virtual potential
vp += 1.0/(i+1)
# look up correct index given virtual potential and increment 'histogram'
if vp > 0:
vps[self.vpDict(vp)]+=1
return vps
def vpDict(self, vp):
"Returns array index corresponding to virtual potential value range"
if (vp >= 0.0) & (vp < 0.5): return 0
if (vp >= 0.5) & (vp < 1.0): return 1
if (vp >= 1.0) & (vp < 1.5): return 2
if (vp >= 1.5) & (vp < 2.0): return 3
if (vp >= 2.0) & (vp < 2.5): return 4
if (vp >= 2.5) & (vp < 3.0): return 5
| """
Created on Sun May 15 2016
@author: Matthew Carse
"""
class Vpgen:
def __init__(self, anchor, chain):
self.anchor = ''.join(anchor)
self.chain = ''.join(chain)
self.id = self.anchor + self.chain
def feature_gen(self, seq):
"""Derive virtual potentials given a sequence, anchor residue and chain residue"""
anc_pos = seq.find(self.anchor, 10)
if ancPos == -1:
vps = [-1.0, -1.0, -1.0, -1.0, -1.0, -1.0]
return vps
else:
vps = self.featureGen(seq[ancPos - 9:])
if vps == [-1.0, -1, -1.0, -1.0, -1.0, -1.0]:
vps = [0.0, 0.0, 0.0, 0.0, 0.0, 0.0]
window = seq[ancPos - 10:ancPos][::-1]
vp = 0
for (i, c) in enumerate(window):
if c == self.chain:
vp += 1.0 / (i + 1)
if vp > 0:
vps[self.vpDict(vp)] += 1
return vps
def vp_dict(self, vp):
"""Returns array index corresponding to virtual potential value range"""
if (vp >= 0.0) & (vp < 0.5):
return 0
if (vp >= 0.5) & (vp < 1.0):
return 1
if (vp >= 1.0) & (vp < 1.5):
return 2
if (vp >= 1.5) & (vp < 2.0):
return 3
if (vp >= 2.0) & (vp < 2.5):
return 4
if (vp >= 2.5) & (vp < 3.0):
return 5 |
class AnalysisModule(object):
def __init__(self, config_section, *args, **kwargs):
assert isinstance(config_section, str)
self.config = config_section
def analyze_sample(self, filepath='', tags=[]):
'''
Called to start the analysis for the module.
:param filepath: The full path and filename of the sample to analyze.
:type filepath: str
:param tags: Any tags associated with the given sample
:type tags: list
'''
raise NotImplementedError("This analysis module was not implemented.")
def check_status(self, filename='', tags=[]):
'''
Returns the status of the analysis module for the given file
:param filepath: The full path and filename of the sample to analyze.
:type filepath: str
:param tags: Any tags associated with the given sample
:type tags: list
:returns: boolean
'''
raise NotImplementedError("This analysis module was not implemented.")
def cleanup(self, filename='', tags=[]):
'''
Called to perform any necessary cleanup.
:param filepath: The full path and filename of the sample to analyze.
:type filepath: str
:param tags: Any tags associated with the given sample
:type tags: list
'''
raise NotImplementedError("This analysis module was not implemented.")
| class Analysismodule(object):
def __init__(self, config_section, *args, **kwargs):
assert isinstance(config_section, str)
self.config = config_section
def analyze_sample(self, filepath='', tags=[]):
"""
Called to start the analysis for the module.
:param filepath: The full path and filename of the sample to analyze.
:type filepath: str
:param tags: Any tags associated with the given sample
:type tags: list
"""
raise not_implemented_error('This analysis module was not implemented.')
def check_status(self, filename='', tags=[]):
"""
Returns the status of the analysis module for the given file
:param filepath: The full path and filename of the sample to analyze.
:type filepath: str
:param tags: Any tags associated with the given sample
:type tags: list
:returns: boolean
"""
raise not_implemented_error('This analysis module was not implemented.')
def cleanup(self, filename='', tags=[]):
"""
Called to perform any necessary cleanup.
:param filepath: The full path and filename of the sample to analyze.
:type filepath: str
:param tags: Any tags associated with the given sample
:type tags: list
"""
raise not_implemented_error('This analysis module was not implemented.') |
hexa = {
"a" : 10,
"b" : 11,
"c" : 12,
"d" : 13,
"e" : 14,
"f" : 15,
}
print(hexa['a'])
hexa_to_dec = {
"0": 0,
"1": 1,
"2": 2,
"3": 3,
"4": 4,
"5": 5,
"6": 6,
"7": 7,
"8": 8,
"9": 9,
"A": 10,
"B": 11,
"C": 12,
"D": 13,
"E": 14,
"F": 15
}
def convert(value, base):
i = 0
for key in value:
i = i * base + hexa_to_dec[key]
return i
print(convert('10110', 2))
| hexa = {'a': 10, 'b': 11, 'c': 12, 'd': 13, 'e': 14, 'f': 15}
print(hexa['a'])
hexa_to_dec = {'0': 0, '1': 1, '2': 2, '3': 3, '4': 4, '5': 5, '6': 6, '7': 7, '8': 8, '9': 9, 'A': 10, 'B': 11, 'C': 12, 'D': 13, 'E': 14, 'F': 15}
def convert(value, base):
i = 0
for key in value:
i = i * base + hexa_to_dec[key]
return i
print(convert('10110', 2)) |
"""
Connection types are specified here:
https://code.google.com/p/selenium/source/browse/spec-draft.md?repo=mobile#120
Value (Alias) | Data | Wifi | Airplane Mode
-------------------------------------------------
0 (None) | 0 | 0 | 0
1 (Airplane Mode) | 0 | 0 | 1
2 (Wifi only) | 0 | 1 | 0
4 (Data only) | 1 | 0 | 0
6 (All network on) | 1 | 1 | 0
"""
class ConnectionType(object):
NO_CONNECTION = 0
AIRPLANE_MODE = 1
WIFI_ONLY = 2
DATA_ONLY = 4
ALL_NETWORK_ON = 6
| """
Connection types are specified here:
https://code.google.com/p/selenium/source/browse/spec-draft.md?repo=mobile#120
Value (Alias) | Data | Wifi | Airplane Mode
-------------------------------------------------
0 (None) | 0 | 0 | 0
1 (Airplane Mode) | 0 | 0 | 1
2 (Wifi only) | 0 | 1 | 0
4 (Data only) | 1 | 0 | 0
6 (All network on) | 1 | 1 | 0
"""
class Connectiontype(object):
no_connection = 0
airplane_mode = 1
wifi_only = 2
data_only = 4
all_network_on = 6 |
class Restaurant():
def __init__(self, nombre, tipo):
self.nombre = nombre.title()
self.tipo = tipo
def desc(self):
print("\nEl mejor restaurant de todos! ---> " + self.nombre + " comida: " + self.tipo)
def abierto(self):
print("\n" + self.nombre + " esta abierto")
| class Restaurant:
def __init__(self, nombre, tipo):
self.nombre = nombre.title()
self.tipo = tipo
def desc(self):
print('\nEl mejor restaurant de todos! ---> ' + self.nombre + ' comida: ' + self.tipo)
def abierto(self):
print('\n' + self.nombre + ' esta abierto') |
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
'''
@File : __init__.py
@Author: ChenXinqun
@Date : 2019/1/18 16:26
''' | """
@File : __init__.py
@Author: ChenXinqun
@Date : 2019/1/18 16:26
""" |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.