content stringlengths 7 1.05M | fixed_cases stringlengths 1 1.28M |
|---|---|
SPARK_SESSION = {"default": {}}
"""
PySpark session definition
Local Session::
SPARK_SESSION = {
"default": {
"master": "local",
"appName": "Word Count",
"config": {
"spark.some.config.option": "some-value",
}
}
}
Cluster::
SPARK_SESSION = {
"default": {
"master": "spark://master:7077",
"appName": "Word Count",
"config": {
"spark.some.config.option": "some-value",
}
}
}
"""
| spark_session = {'default': {}}
'\nPySpark session definition\n\nLocal Session::\n\n SPARK_SESSION = {\n "default": {\n "master": "local",\n "appName": "Word Count",\n "config": {\n "spark.some.config.option": "some-value",\n }\n }\n }\n\nCluster::\n\n SPARK_SESSION = {\n "default": {\n "master": "spark://master:7077",\n "appName": "Word Count",\n "config": {\n "spark.some.config.option": "some-value",\n }\n }\n }\n\n' |
class Db:
def __init__(self):
self._db = None
self._connection = None
@property
def db(self):
return self._db
@db.setter
def db(self, db):
self._db = db
async def _make_connection(self):
self._connection = await self.db.acquire()
async def _close_connection(self):
await self.db.release(self._connection)
| class Db:
def __init__(self):
self._db = None
self._connection = None
@property
def db(self):
return self._db
@db.setter
def db(self, db):
self._db = db
async def _make_connection(self):
self._connection = await self.db.acquire()
async def _close_connection(self):
await self.db.release(self._connection) |
# -*- coding: utf-8 -*-
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
# All hardware-specific features are prefixed with this namespace
_HW_NS = 'hw:'
# All CPU-specific features are prefixed with this namespace
_CPU_NS = _HW_NS + 'cpu:'
_CPU_X86_NS = _CPU_NS + 'x86:'
# ref: https://en.wikipedia.org/wiki/Streaming_SIMD_Extensions
HW_CPU_X86_AVX = _CPU_X86_NS + 'avx'
HW_CPU_X86_AVX2 = _CPU_X86_NS + 'avx2'
HW_CPU_X86_CLMUL = _CPU_X86_NS + 'clmul'
HW_CPU_X86_FMA3 = _CPU_X86_NS + 'fma3'
HW_CPU_X86_FMA4 = _CPU_X86_NS + 'fma4'
HW_CPU_X86_F16C = _CPU_X86_NS + 'f16c'
HW_CPU_X86_MMX = _CPU_X86_NS + 'mmx'
HW_CPU_X86_SSE = _CPU_X86_NS + 'sse'
HW_CPU_X86_SSE2 = _CPU_X86_NS + 'sse2'
HW_CPU_X86_SSE3 = _CPU_X86_NS + 'sse3'
HW_CPU_X86_SSSE3 = _CPU_X86_NS + 'ssse3'
HW_CPU_X86_SSE41 = _CPU_X86_NS + 'sse41'
HW_CPU_X86_SSE42 = _CPU_X86_NS + 'sse42'
HW_CPU_X86_SSE4A = _CPU_X86_NS + 'sse4a'
HW_CPU_X86_XOP = _CPU_X86_NS + 'xop'
HW_CPU_X86_3DNOW = _CPU_X86_NS + '3dnow'
# ref: https://en.wikipedia.org/wiki/AVX-512
HW_CPU_X86_AVX512F = _CPU_X86_NS + 'avx512f' # foundation
HW_CPU_X86_AVX512CD = _CPU_X86_NS + 'avx512cd' # conflict detection
HW_CPU_X86_AVX512PF = _CPU_X86_NS + 'avx512pf' # prefetch
HW_CPU_X86_AVX512ER = _CPU_X86_NS + 'avx512er' # exponential + reciprocal
HW_CPU_X86_AVX512VL = _CPU_X86_NS + 'avx512vl' # vector length extensions
HW_CPU_X86_AVX512BW = _CPU_X86_NS + 'avx512bw' # byte + word
HW_CPU_X86_AVX512DQ = _CPU_X86_NS + 'avx512dq' # double word + quad word
# ref: https://en.wikipedia.org/wiki/Bit_Manipulation_Instruction_Sets
HW_CPU_X86_ABM = _CPU_X86_NS + 'abm'
HW_CPU_X86_BMI = _CPU_X86_NS + 'bmi'
HW_CPU_X86_BMI2 = _CPU_X86_NS + 'bmi2'
HW_CPU_X86_TBM = _CPU_X86_NS + 'tbm'
# ref: https://en.wikipedia.org/wiki/AES_instruction_set
HW_CPU_X86_AESNI = _CPU_X86_NS + 'aes-ni'
# ref: https://en.wikipedia.org/wiki/Intel_SHA_extensions
HW_CPU_X86_SHA = _CPU_X86_NS + 'sha'
# ref: https://en.wikipedia.org/wiki/Intel_MPX
HW_CPU_X86_MPX = _CPU_X86_NS + 'mpx'
# ref: https://en.wikipedia.org/wiki/Software_Guard_Extensions
HW_CPU_X86_SGX = _CPU_X86_NS + 'sgx'
# ref: https://en.wikipedia.org/wiki/Transactional_Synchronization_Extensions
HW_CPU_X86_TSX = _CPU_X86_NS + 'tsx'
# ref: https://en.wikipedia.org/wiki/Advanced_Synchronization_Facility
HW_CPU_X86_ASF = _CPU_X86_NS + 'asf'
# ref: https://en.wikipedia.org/wiki/VT-x
HW_CPU_X86_VMX = _CPU_X86_NS + 'vmx'
# ref: https://en.wikipedia.org/wiki/AMD-V
HW_CPU_X86_SVM = _CPU_X86_NS + 'svm'
NAMESPACES = {
'hardware': _HW_NS,
'hw': _HW_NS,
'cpu': _CPU_NS,
'x86': _CPU_X86_NS,
}
| _hw_ns = 'hw:'
_cpu_ns = _HW_NS + 'cpu:'
_cpu_x86_ns = _CPU_NS + 'x86:'
hw_cpu_x86_avx = _CPU_X86_NS + 'avx'
hw_cpu_x86_avx2 = _CPU_X86_NS + 'avx2'
hw_cpu_x86_clmul = _CPU_X86_NS + 'clmul'
hw_cpu_x86_fma3 = _CPU_X86_NS + 'fma3'
hw_cpu_x86_fma4 = _CPU_X86_NS + 'fma4'
hw_cpu_x86_f16_c = _CPU_X86_NS + 'f16c'
hw_cpu_x86_mmx = _CPU_X86_NS + 'mmx'
hw_cpu_x86_sse = _CPU_X86_NS + 'sse'
hw_cpu_x86_sse2 = _CPU_X86_NS + 'sse2'
hw_cpu_x86_sse3 = _CPU_X86_NS + 'sse3'
hw_cpu_x86_ssse3 = _CPU_X86_NS + 'ssse3'
hw_cpu_x86_sse41 = _CPU_X86_NS + 'sse41'
hw_cpu_x86_sse42 = _CPU_X86_NS + 'sse42'
hw_cpu_x86_sse4_a = _CPU_X86_NS + 'sse4a'
hw_cpu_x86_xop = _CPU_X86_NS + 'xop'
hw_cpu_x86_3_dnow = _CPU_X86_NS + '3dnow'
hw_cpu_x86_avx512_f = _CPU_X86_NS + 'avx512f'
hw_cpu_x86_avx512_cd = _CPU_X86_NS + 'avx512cd'
hw_cpu_x86_avx512_pf = _CPU_X86_NS + 'avx512pf'
hw_cpu_x86_avx512_er = _CPU_X86_NS + 'avx512er'
hw_cpu_x86_avx512_vl = _CPU_X86_NS + 'avx512vl'
hw_cpu_x86_avx512_bw = _CPU_X86_NS + 'avx512bw'
hw_cpu_x86_avx512_dq = _CPU_X86_NS + 'avx512dq'
hw_cpu_x86_abm = _CPU_X86_NS + 'abm'
hw_cpu_x86_bmi = _CPU_X86_NS + 'bmi'
hw_cpu_x86_bmi2 = _CPU_X86_NS + 'bmi2'
hw_cpu_x86_tbm = _CPU_X86_NS + 'tbm'
hw_cpu_x86_aesni = _CPU_X86_NS + 'aes-ni'
hw_cpu_x86_sha = _CPU_X86_NS + 'sha'
hw_cpu_x86_mpx = _CPU_X86_NS + 'mpx'
hw_cpu_x86_sgx = _CPU_X86_NS + 'sgx'
hw_cpu_x86_tsx = _CPU_X86_NS + 'tsx'
hw_cpu_x86_asf = _CPU_X86_NS + 'asf'
hw_cpu_x86_vmx = _CPU_X86_NS + 'vmx'
hw_cpu_x86_svm = _CPU_X86_NS + 'svm'
namespaces = {'hardware': _HW_NS, 'hw': _HW_NS, 'cpu': _CPU_NS, 'x86': _CPU_X86_NS} |
#
# PySNMP MIB module CISCO-MEDIATRACE-MIB (http://snmplabs.com/pysmi)
# ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/CISCO-MEDIATRACE-MIB
# Produced by pysmi-0.3.4 at Wed May 1 12:07:08 2019
# On host DAVWANG4-M-1475 platform Darwin version 18.5.0 by user davwang4
# Using Python version 3.7.3 (default, Mar 27 2019, 09:23:15)
#
Integer, OctetString, ObjectIdentifier = mibBuilder.importSymbols("ASN1", "Integer", "OctetString", "ObjectIdentifier")
NamedValues, = mibBuilder.importSymbols("ASN1-ENUMERATION", "NamedValues")
ValueRangeConstraint, ConstraintsIntersection, ConstraintsUnion, SingleValueConstraint, ValueSizeConstraint = mibBuilder.importSymbols("ASN1-REFINEMENT", "ValueRangeConstraint", "ConstraintsIntersection", "ConstraintsUnion", "SingleValueConstraint", "ValueSizeConstraint")
FlowMetricValue, = mibBuilder.importSymbols("CISCO-FLOW-MONITOR-TC-MIB", "FlowMetricValue")
ciscoMgmt, = mibBuilder.importSymbols("CISCO-SMI", "ciscoMgmt")
InterfaceIndexOrZero, = mibBuilder.importSymbols("IF-MIB", "InterfaceIndexOrZero")
InetPortNumber, InetAddress, InetAddressType = mibBuilder.importSymbols("INET-ADDRESS-MIB", "InetPortNumber", "InetAddress", "InetAddressType")
VlanId, = mibBuilder.importSymbols("Q-BRIDGE-MIB", "VlanId")
SnmpAdminString, = mibBuilder.importSymbols("SNMP-FRAMEWORK-MIB", "SnmpAdminString")
ModuleCompliance, NotificationGroup, ObjectGroup = mibBuilder.importSymbols("SNMPv2-CONF", "ModuleCompliance", "NotificationGroup", "ObjectGroup")
Counter32, MibScalar, MibTable, MibTableRow, MibTableColumn, IpAddress, MibIdentifier, Counter64, ModuleIdentity, Gauge32, iso, Bits, Integer32, NotificationType, Unsigned32, ObjectIdentity, TimeTicks = mibBuilder.importSymbols("SNMPv2-SMI", "Counter32", "MibScalar", "MibTable", "MibTableRow", "MibTableColumn", "IpAddress", "MibIdentifier", "Counter64", "ModuleIdentity", "Gauge32", "iso", "Bits", "Integer32", "NotificationType", "Unsigned32", "ObjectIdentity", "TimeTicks")
TruthValue, TimeStamp, DisplayString, RowStatus, TextualConvention = mibBuilder.importSymbols("SNMPv2-TC", "TruthValue", "TimeStamp", "DisplayString", "RowStatus", "TextualConvention")
ciscoMediatraceMIB = ModuleIdentity((1, 3, 6, 1, 4, 1, 9, 9, 800))
ciscoMediatraceMIB.setRevisions(('2012-08-23 00:00',))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
if mibBuilder.loadTexts: ciscoMediatraceMIB.setRevisionsDescriptions(('Initial version of this MIB module.',))
if mibBuilder.loadTexts: ciscoMediatraceMIB.setLastUpdated('201208230000Z')
if mibBuilder.loadTexts: ciscoMediatraceMIB.setOrganization('Cisco Systems, Inc.')
if mibBuilder.loadTexts: ciscoMediatraceMIB.setContactInfo('Cisco Systems Customer Service Postal: 170 W Tasman Drive San Jose, CA 95134 USA Tel: +1 800 553-NETS E-mail: cs-mediatrace@cisco.com')
if mibBuilder.loadTexts: ciscoMediatraceMIB.setDescription("Mediatrace helps to isolate and troubleshoot network degradation problems by enabling a network administrator to discover an Internet Protocol (IP) flow's path, dynamically enable monitoring capabilities on the nodes along the path, and collect information on a hop-by-hop basis. This information includes, among other things, flow statistics, and utilization information for incoming and outgoing interfaces, CPUs, and memory, as well as any changes to IP routes. This information can be retrieved by configuring Cisco Mediatrace to start a recurring monitoring session at a specific time and on specific days. The session can be configured to specify which metrics to collect, and how frequently they are collected. The hops along the path are automatically discovered as part of the operation. This module defines a MIB for the features of configuring Mediatrace sessions and obtain statistics data for a particular hop at a specific time. INITIATOR/RESPONDER ==================== At the top level, this MIB module describes the initiator and responder roles for the device. The scalar objects corresponding to each role are used to enable and set parameters like maximum sessions supported, IP address used for enabling the initiator,etc. Some of the scalar objects are used to obtain information about a particular role for the device. At a time the device supports a single initiator and/or single responder. The following scalar objects are used for enabling the initiator, +---------> cMTInitiatorEnable +---------> cMTInitiatorSourceInterface +---------> cMTInitiatorSourceAddressType +---------> cMTInitiatorSourceAddress +---------> cMTInitiatorMaxSessions In addition to the above objects, the following objects are used for obtaining information about the initiator role on the device, +---------> cMTInitiatorSoftwareVersionMajor +---------> cMTInitiatorSoftwareVersionMinor +---------> cMTInitiatorProtocolVersionMajor +---------> cMTInitiatorProtocolVersionMinor +---------> cMTInitiatorConfiguredSessions +---------> cMTInitiatorPendingSessions +---------> cMTInitiatorInactiveSessions +---------> cMTInitiatorActiveSessions The following scalar objects are used for enabling the responder, +---------> cMTResponderEnable +---------> cMTResponderMaxSessions In addition to the above objects, the following object is used for obtaining information about the responder role on the device, +---------> cMTResponderActiveSessions CONTROL TABLES =============== At the next level, this MIB module describes the entities - path specifier, flow specifier, session params and profile. This section also includes the session and scheduling entities. Each row in the cMTSessionTable corresponds to a single session. The session is a container and hence the path specifier, flow specifier, session params and profile objects for each session point to the corresponding entities in the cMTPathSpecifierTable, cMTFlowSpecifierTable, cMTSessionParamsTable, cMTMediaMonitorProfileTable and cMTSystemProfileTable tables. o cMTPathSpecifierTable - describes path specifiers. o cMTFlowSpecifierTable - describes flow specifiers. o cMTSessionParamsTable - describes session params entities. o cMTMediaMonitorProfileTable - describes media monitor profile. o cMTSystemProfileTable - describes system profiles. The cMTSessionTable has a sparse dependent relationship with each of these tables, as there exist situations when data from those tables may not be used for a particular session, including : 1) The session using system profile does not need flow specifier. 2) The session using media monitor profile may not need optional flow specifier. 3) The session may only use one of the two profiles, system or media monitor. o cMTSessionTable - describes sessions. o cMTScheduleTable - describes scheduling entities for the sessions. The cMTScheduleTable has sparse dependent relationship on the cMTSessionTable, as there exist situations when the a session is not available for scheduling, including - a session is created but is not yet scheduled. +----------------------+ | cMTPathSpecifierTable| | | +-----------------------------+ | cMTPathSpecifierName = ps1 | +-----------------------------+ | | +-----------------------------+ | cMTPathSpecifierName = ps2 | +-----------------------------+ : : : : +-----------------------------+ | cMTPathSpecifierName = ps6 | +-----------------------------+ | | +----------------------+ +----------------------+ | cMTFlowSpecifierTable| | | +-----------------------------+ | cMTFlowSpecifierName = fs1 | +-----------------------------+ | | +-----------------------------+ | cMTFlowSpecifierName = fs2 | +-----------------------------+ : : : : +-----------------------------+ | cMTFlowSpecifierName = fs6 | +-----------------------------+ | | +----------------------+ +-------------------------+ +----------------------+ | cMTSessionTable | | cMTSessionParamsTable| | | | | +-------------------------------------+ +--------------------------+ | cMTSessionNumber = 1 | |cMTSessionParamsName = sp1| | +---------------------------------+ | +--------------------------+ | |cMTSessionPathSpecifierName = ps1| | | | | +---------------------------------+ | +--------------------------+ | | |cMTSessionParamsName = sp2| | +---------------------------------+ | +--------------------------+ | |cMTSessionParamName = sp1 | | : : | +---------------------------------+ | : : | | +--------------------------+ | +---------------------------------+ | |cMTSessionParamsName = sp5| | |cMTSessionProfileName = rtp1 | | +--------------------------+ | +---------------------------------+ | | | | | +-----------------------+ | +---------------------------------+ | | |cMTSessionFlowSpecifierName = fs1| | | +---------------------------------+ | | | | +---------------------------------+ | | |cMTSessionTraceRouteEnabled = T | | | +---------------------------------+ | | | +-------------------------------------+ | | | | +-------------------------------------+ | cMTSessionNumber = 2 | | +---------------------------------+ | +---------------------------+ | |cMTSessionPathSpecifierName = ps2| | |cMTMediaMonitorProfileTable| | +---------------------------------+ | | | | | +-----------------------------+ | +---------------------------------+ | |cMTMediaMonitorProfileName | | |cMTSessionParamName = sp5 | | | =rtp1 | | +---------------------------------+ | +-----------------------------+ | | | | | +---------------------------------+ | +-----------------------------+ | |cMTSessionProfileName = intf1 | | |cMTMediaMonitorProfileName | | +---------------------------------+ | | =rtp1 | | | +-----------------------------+ | +---------------------------------+ | : : | |cMTSessionTraceRouteEnabled = T | | : : | +---------------------------------+ | +-----------------------------+ | | |cMTMediaMonitorProfileName | +-------------------------------------+ | =tcp1 | : : +-----------------------------+ : : | | +-------------------------------------+ +---------------------------+ | cMTSessionNumber = 10 | | +---------------------------------+ | | |cMTSessionPathSpecifierName = ps1| | | +---------------------------------+ | | | | +---------------------------------+ | | |cMTSessionParamName = sp1 | | | +---------------------------------+ | | | | +---------------------------------+ | | |cMTSessionProfileName = tcp1 | | | +---------------------------------+ | | | | +---------------------------------+ | | |cMTSessionTraceRouteEnabled = T | | | +---------------------------------+ | | | +-------------------------------------+ | | | | +-------------------------+ +----------------------+ | cMTSystemProfileTable| | | +-----------------------------+ | cMTSystemProfileName = intf1| +-----------------------------+ | | +-----------------------------+ | cMTSystemProfileName = cpu1 | +-----------------------------+ : : : : +-----------------------------+ | cMTSystemProfileName = intf2| +-----------------------------+ | | +----------------------+ DEFINITIONS =============== Mediatrace Initiator - This is the entity that supports creation of periodic sessions using global session id. Initiator can send request, collects the responses to those request and processes them for reporting. Henceforth, it will be referred as initiator. Mediatrace Responder - This is the entity that queries local database and features to obtain information based on the request sent by the Initiator as part of a session. The collected information is sent as response to the initiator to match the session. Henceforth, it will be referred as responder. Meta-data - Meta information about the flow not contained in the data packet. Examples of such information are global session id, multi party session id, type of application that is generating this flow e.g., telepresence. Meta-data global session identifier - it is one of the meta-data attributes which uniquely identifies a flow globally and is used to query the meta-data database for obtaining the corresponding 5-tuple (destination address, destination port, source address, source port and IP protocol) for path specifier or flow specifier. Path - This specifies the route taken by the Mediatrace request for a particular session. This can be specified in terms of single or multiple 5-tuple parameters - destination address, destination port, source address, source port and IP protocol. Gateway address and VLAN are required in cases where the path starts from network element without IP address. This is specified using path specifier entity. Path Specifier - The path specifier is generally specified using complete or partial 5-tuple (destination address, destination port, source address, source port and IP protocol) for Layer 3 initiator. Gateway and VLAN ID are required for a Layer 2 initiator. It can also use the meta-data Global session Id to specify the 5-tuple. A single row corresponds to a path specifier which is created or destroyed when a path specifier is added or removed. Each path specifier entry is uniquely identified by cMTPathSpecifierName. Examples of a path specifier are as follows, path-specifier (ps1)+-------> destination address (10.10.10.2) +-------> destination port (12344) +-------> source address (10.10.12.2) +-------> source port (12567) +-------> IP protocol (UDP) +-------> gateway (10.10.11.2) +-------> VLAN ID (601) path-specifier (ps2)+-------> meta-data global identifier (345123456) Flow - A unidirectional stream of packets conforming to a classifier. For example, packets having a particular source IP address, destination IP address, protocol type, source port number, and destination port number. This is specified using a flow specifier entity. Flow Specifier - The flow specifier is generally specified using complete or partial 5-tuple (destination address, destination port, source address, source port and IP protocol). It can also use the meta-data Global session Id to specify the 5-tuple. A single row corresponds to a flow specifier which is created or destroyed when a flow specifier is added or removed. Each flow specifier entry is uniquely identified by cMTFlowSpecifierName. Examples of a flow specifier is as follows, flow-specifier (fs1)+-------> destination address(10.11.10.2) +-------> destination port (12344) +-------> source address (10.11.12.2) +-------> source port (12567) +-------> IP protocol (UDP) flow-specifier (fs2)+-------> meta-data global identifier (345123456) Metric - It defines a measurement that reflects the quality of a traffic flow or a resource on a hop or along the path e.g. number of packets for a flow, memory utilization on a hop, number of dropped packets on an interface, etc. Metric-list - It defines logical grouping of related metrics e.g. Metric-list CPU has 1% and 2% CPU utilization metric, Metric-list interface has ingress interface speed, egress interface speed, etc. Profile - It defines the set of metric-lists to be collected from the devices along the path. It can also include additional parameters which are required for collecting the metric e.g., sampling interval (also referred as monitor interval), etc. A Profile can include a set of related metric-lists along with related configuration parameters. The metrics could be the media monitoring (also referred as performance monitoring) metrics such as jitter, packet loss, bit rate etc., or system resource utilization metrics or interface counters. Two profiles, System profile and Media Monitoring (Performance Monitoring) Profile are supported. The different profiles, metric-lists and metrics are listed below, +-----> Profile +---> Metric-list +--------> one min CPU utilization | System | CPU | | | +--------> five min CPU utilization | | | +---> Metric-list +-----> memory utilization Memory | | | +---> Metric-list +------> octets input at ingress | Interface | | +------> octets output at egress | |------> packets received with error | | at ingress | +------> packets with error at egress | +------> packets discarded at ingress | +------> packets discarded at egress | +------> ingress interface speed | +------> egress interface speed | +--> Profile +--> Metric-list +--> Common +--> loss of Media Monitor | TCP | IP | measurement confidence | | metrics | | | +--> media stop event occurred | | +--> IP packet drop count | | +--> IP byte count | | +--> IP byte rate | | +--> IP DSCP | | +--> IP TTL | | +--> IP protocol | | +---> media byte | | count | | | +--> TCP +--> TCP connect round trip | specific | delay | metrics | | +--> TCP lost event count | +--> Metric-list +--> Common +--> loss of measurement RTP | IP | confidence | metrics | | +--> media stop event occurred | +--> IP packet drop count | +--> IP byte count | +--> IP byte rate | +--> IP DSCP | +--> IP TTL | +--> IP protocol | +---> media byte count | +--> RTP +--> RTP inter arrival jitter specific | delay metrics | +--> RTP packets lost +--> RTP packets expected +--> RTP packets lost event | count +---> RTP loss percent Examples of the profiles are as follows, profile system - metric-list interface (sys1) profile media-monitor - metric-list rtp (rtp1) +-------> monitor interval (60 seconds) Session parameter Profile - These correspond to the various parameters related to session such as frequency of data collection, timeout for request, etc. These are specified using the session params entity. This is the entity that executes via a conceptual session/schedule control row and populates a conceptual statistics row. Example session parameter profile is as follows, Session-params (sp1)+-------> response timeout (10 seconds) +-------> frequency (60 seconds) +-------> history data sets (2) +-------> route change reaction time (10 seconds) +-------> inactivity timeout (180 seconds) Session - The session is a grouping of various configurable entities such as profiles, session parameters and path specifiers. Flow specifier is optional and required for media monitor profile only. Once these parameters for a mediatrace session are defined through these entities, they are combined into a mediatrace session. Example of sessions are as follows, session (1) +--------> path-specifier (ps1) +--------> session-params (sp1) +--------> profile system (sys1) metric-list interface session (2) +--------> path-specifier (ps1) +--------> session-params (sp2) +--------> profile media-monitor (rtp1) | metric-list rtp +--------> flow-specifier (fs1) A session cycles through various states in its lifetime. The different states are, Active state : A session is said to be in active state when it is requesting and collecting data from the responders. Inactive state : A session becomes inactive when it is either stopped by unscheduling or life expires. In this state it will no longer collect or request data. Pending state: A session is in pending state when the session is created but not yet scheduled to be active. Based on the state and history of a session it can be classified as configured or scheduled session. Configured session : A session which is created and is in pending or inactive state is called a configured session. It can also be a newly created session which has not been scheduled (made active) yet. Scheduled session : A session which is in active state or pending state which is already requesting and collecting data or has set a time in future to start requesting or collecting data. Responder: The responder is in active state when it is able to process the requests from the initiator, collect the data locally and send the Response back to the initiator. Reachability Address: It is the address of the interface on a responder which is used to send the response to the initiator. Statistics row - This conceptual row is indexed based on the session index, session life index, bucket number and hop information (Hop address type and Hop address). This identifies the statistics for a particular session with specific life, at a particular time and for a specific hop.")
class CiscoNTPTimeStamp(TextualConvention, OctetString):
reference = "D.L. Mills, 'Network Time Protocol (Version 3)', RFC-1305, March 1992, Section 3.1"
description = 'CiscoNTP timestamps are represented as a 64-bit unsigned fixed-point number, in seconds relative to 00:00 on 1 January 1900. The integer part is in the first 32 bits and the fraction part is in the last 32 bits.'
status = 'current'
displayHint = '4d.4d'
subtypeSpec = OctetString.subtypeSpec + ValueSizeConstraint(8, 8)
fixedLength = 8
class CiscoMediatraceSupportProtocol(TextualConvention, Integer32):
description = 'Represents different types of layer 3 protocols supported by by Mediatrace for path and flow specification. Currently two protocols - TCP and UDP are supported.'
status = 'current'
subtypeSpec = Integer32.subtypeSpec + ConstraintsUnion(SingleValueConstraint(6, 17))
namedValues = NamedValues(("tcp", 6), ("udp", 17))
class CiscoMediatraceDiscoveryProtocol(TextualConvention, Integer32):
description = 'Represents different types of protocols used by Mediatrace to discover the path based on the path specifier.'
status = 'current'
subtypeSpec = Integer32.subtypeSpec + ConstraintsUnion(SingleValueConstraint(46))
namedValues = NamedValues(("rsvp", 46))
ciscoMediatraceMIBNotifs = MibIdentifier((1, 3, 6, 1, 4, 1, 9, 9, 800, 0))
ciscoMediatraceMIBObjects = MibIdentifier((1, 3, 6, 1, 4, 1, 9, 9, 800, 1))
ciscoMediatraceMIBConform = MibIdentifier((1, 3, 6, 1, 4, 1, 9, 9, 800, 2))
cMTCtrl = MibIdentifier((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 1))
cMTStats = MibIdentifier((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 2))
cMTInitiatorEnable = MibScalar((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 1, 2), TruthValue()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: cMTInitiatorEnable.setStatus('current')
if mibBuilder.loadTexts: cMTInitiatorEnable.setDescription('This object specifies the whether the Mediatrace initiator is enabled on the network element.')
cMTInitiatorSourceInterface = MibScalar((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 1, 3), InterfaceIndexOrZero()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: cMTInitiatorSourceInterface.setStatus('current')
if mibBuilder.loadTexts: cMTInitiatorSourceInterface.setDescription('This object specifies the interface whose IP or IPv6 address will be used as initiator address. The Initiator address is used by layer 2 mediatrace responder to unicast the response message to initiator. This address is also reachability address for mediatrace hop 0. The value of this object should be set to ifIndex value of the desired interface from the ifTable.')
cMTInitiatorSourceAddressType = MibScalar((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 1, 4), InetAddressType()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: cMTInitiatorSourceAddressType.setStatus('current')
if mibBuilder.loadTexts: cMTInitiatorSourceAddressType.setDescription('Address type (IP or IPv6) of the initiator address specified in cMTInitiatorSourceAddress object. The value should be set to unknown (0) if source interface object is non zero.')
cMTInitiatorSourceAddress = MibScalar((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 1, 5), InetAddress()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: cMTInitiatorSourceAddress.setStatus('current')
if mibBuilder.loadTexts: cMTInitiatorSourceAddress.setDescription('This object specifies the IP address used by the initiator when obtaining the reachability address from a downstream responder.')
cMTInitiatorMaxSessions = MibScalar((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 1, 6), Unsigned32()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: cMTInitiatorMaxSessions.setStatus('current')
if mibBuilder.loadTexts: cMTInitiatorMaxSessions.setDescription('This object specifies the maximum number of mediatrace sessions that can be active simultaneously on the initiator.')
cMTInitiatorSoftwareVersionMajor = MibScalar((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 1, 7), Unsigned32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: cMTInitiatorSoftwareVersionMajor.setStatus('current')
if mibBuilder.loadTexts: cMTInitiatorSoftwareVersionMajor.setDescription('This object indicates the major version number of Mediatrace application.')
cMTInitiatorSoftwareVersionMinor = MibScalar((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 1, 8), Unsigned32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: cMTInitiatorSoftwareVersionMinor.setStatus('current')
if mibBuilder.loadTexts: cMTInitiatorSoftwareVersionMinor.setDescription('This object indicates the minor version number of Mediatrace application.')
cMTInitiatorProtocolVersionMajor = MibScalar((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 1, 9), Unsigned32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: cMTInitiatorProtocolVersionMajor.setStatus('current')
if mibBuilder.loadTexts: cMTInitiatorProtocolVersionMajor.setDescription('This object indicates the major version number of Mediatrace protocol.')
cMTInitiatorProtocolVersionMinor = MibScalar((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 1, 10), Unsigned32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: cMTInitiatorProtocolVersionMinor.setStatus('current')
if mibBuilder.loadTexts: cMTInitiatorProtocolVersionMinor.setDescription('This object indicates the minor version number of Mediatrace protocol.')
cMTInitiatorConfiguredSessions = MibScalar((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 1, 11), Gauge32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: cMTInitiatorConfiguredSessions.setStatus('current')
if mibBuilder.loadTexts: cMTInitiatorConfiguredSessions.setDescription('This object indicates number of mediatrace sessions configured. The session may or may not be active.')
cMTInitiatorPendingSessions = MibScalar((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 1, 12), Gauge32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: cMTInitiatorPendingSessions.setStatus('current')
if mibBuilder.loadTexts: cMTInitiatorPendingSessions.setDescription('This object indicates the current number of sessions in pending state on the initiator.')
cMTInitiatorInactiveSessions = MibScalar((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 1, 13), Gauge32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: cMTInitiatorInactiveSessions.setStatus('current')
if mibBuilder.loadTexts: cMTInitiatorInactiveSessions.setDescription('This object indicates the current number of sessions in inactive state on the initiator.')
cMTInitiatorActiveSessions = MibScalar((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 1, 14), Gauge32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: cMTInitiatorActiveSessions.setStatus('current')
if mibBuilder.loadTexts: cMTInitiatorActiveSessions.setDescription('This object indicates the current number of sessions in active state on the initiator.')
cMTResponderEnable = MibScalar((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 1, 15), TruthValue()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: cMTResponderEnable.setStatus('current')
if mibBuilder.loadTexts: cMTResponderEnable.setDescription("This object specifies the whether the Mediatrace responder is enabled. If set to 'true' the responder will be enabled. If set to false then mediatrace responder process will be stopped and the device will no longer be discovered as mediatrace capable hop along the flow path.")
cMTResponderMaxSessions = MibScalar((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 1, 16), Unsigned32()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: cMTResponderMaxSessions.setStatus('current')
if mibBuilder.loadTexts: cMTResponderMaxSessions.setDescription('This object specifies the maximum number of sessions that a responder can accept from initiator.')
cMTResponderActiveSessions = MibScalar((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 1, 17), Gauge32()).setUnits('sessions').setMaxAccess("readonly")
if mibBuilder.loadTexts: cMTResponderActiveSessions.setStatus('current')
if mibBuilder.loadTexts: cMTResponderActiveSessions.setDescription('This object indicates the current number of sessions that are in active state on the responder.')
cMTFlowSpecifierTable = MibTable((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 1, 18), )
if mibBuilder.loadTexts: cMTFlowSpecifierTable.setStatus('current')
if mibBuilder.loadTexts: cMTFlowSpecifierTable.setDescription('This table lists the flow specifiers contained by the device.')
cMTFlowSpecifierEntry = MibTableRow((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 1, 18, 1), ).setIndexNames((0, "CISCO-MEDIATRACE-MIB", "cMTFlowSpecifierName"))
if mibBuilder.loadTexts: cMTFlowSpecifierEntry.setStatus('current')
if mibBuilder.loadTexts: cMTFlowSpecifierEntry.setDescription("An entry represents a flow specifier which can be associated with a Mediatrace session contained by the cMTSessionTable. Each entry is uniquely identified by name specified by cMTFlowSpecifierName object. A row created in this table will be shown in 'show running' command and it will not be saved into non-volatile memory.")
cMTFlowSpecifierName = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 1, 18, 1, 1), SnmpAdminString())
if mibBuilder.loadTexts: cMTFlowSpecifierName.setStatus('current')
if mibBuilder.loadTexts: cMTFlowSpecifierName.setDescription('A unique identifier for the flow specifier.')
cMTFlowSpecifierRowStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 1, 18, 1, 2), RowStatus()).setMaxAccess("readcreate")
if mibBuilder.loadTexts: cMTFlowSpecifierRowStatus.setStatus('current')
if mibBuilder.loadTexts: cMTFlowSpecifierRowStatus.setDescription("This object specifies the status of the flow specifier. Only CreateAndGo and active status is supported. The following columns must be valid before activating the flow specifier: - cMTFlowSpecifierDestAddrType and cMTFlowSpecifierDestAddr OR - cMTFlowSpecifierMetadataGlobalId All other objects can assume default values. Once the flow specifier is activated no column can be modified. Setting this object to 'delete' will destroy the flow specifier. The flow specifier can be deleted only if it is not attached to any session.")
cMTFlowSpecifierMetadataGlobalId = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 1, 18, 1, 3), SnmpAdminString()).setMaxAccess("readcreate")
if mibBuilder.loadTexts: cMTFlowSpecifierMetadataGlobalId.setStatus('current')
if mibBuilder.loadTexts: cMTFlowSpecifierMetadataGlobalId.setDescription('This object specifies the meta-data Global ID of the flow specifier. Maximum of 24 characters can be specified for this field.')
cMTFlowSpecifierDestAddrType = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 1, 18, 1, 4), InetAddressType()).setMaxAccess("readcreate")
if mibBuilder.loadTexts: cMTFlowSpecifierDestAddrType.setStatus('current')
if mibBuilder.loadTexts: cMTFlowSpecifierDestAddrType.setDescription('This object specifies the type of IP address specified by the corresponding instance of cMTFlowSpecifierDestAddr.')
cMTFlowSpecifierDestAddr = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 1, 18, 1, 5), InetAddress()).setMaxAccess("readcreate")
if mibBuilder.loadTexts: cMTFlowSpecifierDestAddr.setStatus('current')
if mibBuilder.loadTexts: cMTFlowSpecifierDestAddr.setDescription('Address of the destination of the flow to be monitored.')
cMTFlowSpecifierDestPort = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 1, 18, 1, 6), InetPortNumber()).setMaxAccess("readcreate")
if mibBuilder.loadTexts: cMTFlowSpecifierDestPort.setStatus('current')
if mibBuilder.loadTexts: cMTFlowSpecifierDestPort.setDescription('This object specifies the destination port for the flow.')
cMTFlowSpecifierSourceAddrType = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 1, 18, 1, 7), InetAddressType()).setMaxAccess("readcreate")
if mibBuilder.loadTexts: cMTFlowSpecifierSourceAddrType.setStatus('current')
if mibBuilder.loadTexts: cMTFlowSpecifierSourceAddrType.setDescription('This object specifies the type of IP address specified by the corresponding instance of cMTFlowSpecifierSourceAddr.')
cMTFlowSpecifierSourceAddr = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 1, 18, 1, 8), InetAddress()).setMaxAccess("readcreate")
if mibBuilder.loadTexts: cMTFlowSpecifierSourceAddr.setStatus('current')
if mibBuilder.loadTexts: cMTFlowSpecifierSourceAddr.setDescription('This object specifies the source address for the flow to be monitored.')
cMTFlowSpecifierSourcePort = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 1, 18, 1, 9), InetPortNumber()).setMaxAccess("readcreate")
if mibBuilder.loadTexts: cMTFlowSpecifierSourcePort.setStatus('current')
if mibBuilder.loadTexts: cMTFlowSpecifierSourcePort.setDescription('This object specifies the source port for the flow.')
cMTFlowSpecifierIpProtocol = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 1, 18, 1, 10), CiscoMediatraceSupportProtocol().clone('udp')).setMaxAccess("readcreate")
if mibBuilder.loadTexts: cMTFlowSpecifierIpProtocol.setStatus('current')
if mibBuilder.loadTexts: cMTFlowSpecifierIpProtocol.setDescription('This is transport protocol type for the flow. Flow of this type between specified source and and destination will be monitored.')
cMTPathSpecifierTable = MibTable((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 1, 19), )
if mibBuilder.loadTexts: cMTPathSpecifierTable.setStatus('current')
if mibBuilder.loadTexts: cMTPathSpecifierTable.setDescription('This table lists the path specifiers contained by the device.')
cMTPathSpecifierEntry = MibTableRow((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 1, 19, 1), ).setIndexNames((0, "CISCO-MEDIATRACE-MIB", "cMTPathSpecifierName"))
if mibBuilder.loadTexts: cMTPathSpecifierEntry.setStatus('current')
if mibBuilder.loadTexts: cMTPathSpecifierEntry.setDescription("This entry defines path specifier that can be used in mediatrace session. Each entry is uniquely identified by name specified by cMTPathSpecifierName object. A row created in this table will be shown in 'show running' command and it will not be saved into non-volatile memory.")
cMTPathSpecifierName = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 1, 19, 1, 1), SnmpAdminString())
if mibBuilder.loadTexts: cMTPathSpecifierName.setStatus('current')
if mibBuilder.loadTexts: cMTPathSpecifierName.setDescription('A unique identifier for the path specifier.')
cMTPathSpecifierRowStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 1, 19, 1, 2), RowStatus()).setMaxAccess("readcreate")
if mibBuilder.loadTexts: cMTPathSpecifierRowStatus.setStatus('current')
if mibBuilder.loadTexts: cMTPathSpecifierRowStatus.setDescription("This object specifies the status of the path specifier. Only CreateAndGo and active status is supported. The following columns must be valid before activating the path specifier: - cMTPathSpecifierDestAddrType and cMTPathSpecifierDestAddr OR - cMTPathSpecifierMetadataGlobalId All other objects can assume default values. Once the path specifier is activated no column can be modified. Setting this object to 'delete' will destroy the path specifier. The path specifier can be deleted only if it is not attached to any session.")
cMTPathSpecifierMetadataGlobalId = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 1, 19, 1, 3), SnmpAdminString()).setMaxAccess("readcreate")
if mibBuilder.loadTexts: cMTPathSpecifierMetadataGlobalId.setStatus('current')
if mibBuilder.loadTexts: cMTPathSpecifierMetadataGlobalId.setDescription('Metadata global session id can be used as path specifier. This object should be populated when this is desired. Mediatrace software will query the Metadata database for five tuple to be used for establishing the path.')
cMTPathSpecifierDestAddrType = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 1, 19, 1, 4), InetAddressType()).setMaxAccess("readcreate")
if mibBuilder.loadTexts: cMTPathSpecifierDestAddrType.setStatus('current')
if mibBuilder.loadTexts: cMTPathSpecifierDestAddrType.setDescription('This object specifies the type of IP address specified by the corresponding instance of cMTPathSpecifierDestAddr.')
cMTPathSpecifierDestAddr = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 1, 19, 1, 5), InetAddress()).setMaxAccess("readcreate")
if mibBuilder.loadTexts: cMTPathSpecifierDestAddr.setStatus('current')
if mibBuilder.loadTexts: cMTPathSpecifierDestAddr.setDescription('This object specifies the destination address for the path specifier.')
cMTPathSpecifierDestPort = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 1, 19, 1, 6), InetPortNumber()).setMaxAccess("readcreate")
if mibBuilder.loadTexts: cMTPathSpecifierDestPort.setStatus('current')
if mibBuilder.loadTexts: cMTPathSpecifierDestPort.setDescription('This object specifies the destination port for the path specifier.')
cMTPathSpecifierSourceAddrType = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 1, 19, 1, 7), InetAddressType()).setMaxAccess("readcreate")
if mibBuilder.loadTexts: cMTPathSpecifierSourceAddrType.setStatus('current')
if mibBuilder.loadTexts: cMTPathSpecifierSourceAddrType.setDescription('This object specifies the type of IP address specified by the corresponding instance of cMTFlowSpecifierSourceAddr.')
cMTPathSpecifierSourceAddr = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 1, 19, 1, 8), InetAddress()).setMaxAccess("readcreate")
if mibBuilder.loadTexts: cMTPathSpecifierSourceAddr.setStatus('current')
if mibBuilder.loadTexts: cMTPathSpecifierSourceAddr.setDescription('This object specifies the source address for the path specifier.')
cMTPathSpecifierSourcePort = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 1, 19, 1, 9), InetPortNumber()).setMaxAccess("readcreate")
if mibBuilder.loadTexts: cMTPathSpecifierSourcePort.setStatus('current')
if mibBuilder.loadTexts: cMTPathSpecifierSourcePort.setDescription('This object specifies the source port for the path specifier.')
cMTPathSpecifierProtocolForDiscovery = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 1, 19, 1, 10), CiscoMediatraceDiscoveryProtocol().clone('rsvp')).setMaxAccess("readcreate")
if mibBuilder.loadTexts: cMTPathSpecifierProtocolForDiscovery.setStatus('current')
if mibBuilder.loadTexts: cMTPathSpecifierProtocolForDiscovery.setDescription('This object specifies the protocol used for path discovery on Mediatrace. Currently, only RSVP is used by default.')
cMTPathSpecifierGatewayAddrType = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 1, 19, 1, 11), InetAddressType()).setMaxAccess("readcreate")
if mibBuilder.loadTexts: cMTPathSpecifierGatewayAddrType.setStatus('current')
if mibBuilder.loadTexts: cMTPathSpecifierGatewayAddrType.setDescription('This object specifies the type of IP address specified by the corresponding instance of cMTPathSpecifierGatewayAddr.')
cMTPathSpecifierGatewayAddr = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 1, 19, 1, 12), InetAddress()).setMaxAccess("readcreate")
if mibBuilder.loadTexts: cMTPathSpecifierGatewayAddr.setStatus('current')
if mibBuilder.loadTexts: cMTPathSpecifierGatewayAddr.setDescription('When the mediatrace session is originated on layer-2 switch the address of gateway is required to establish the session. This object specifies address of this gateway.')
cMTPathSpecifierGatewayVlanId = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 1, 19, 1, 13), VlanId().subtype(subtypeSpec=ValueRangeConstraint(1, 4094))).setMaxAccess("readcreate")
if mibBuilder.loadTexts: cMTPathSpecifierGatewayVlanId.setStatus('current')
if mibBuilder.loadTexts: cMTPathSpecifierGatewayVlanId.setDescription('This object specifies the Vlan ID associated with the gateway for path specifier.')
cMTPathSpecifierIpProtocol = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 1, 19, 1, 14), CiscoMediatraceSupportProtocol().clone('udp')).setMaxAccess("readcreate")
if mibBuilder.loadTexts: cMTPathSpecifierIpProtocol.setStatus('current')
if mibBuilder.loadTexts: cMTPathSpecifierIpProtocol.setDescription('This object specifies which metrics are monitored for a path specifier. Currently, only TCP and UDP are supported.')
cMTSessionParamsTable = MibTable((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 1, 20), )
if mibBuilder.loadTexts: cMTSessionParamsTable.setStatus('current')
if mibBuilder.loadTexts: cMTSessionParamsTable.setDescription('This table is collection of session parameter profiles.')
cMTSessionParamsEntry = MibTableRow((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 1, 20, 1), ).setIndexNames((0, "CISCO-MEDIATRACE-MIB", "cMTSessionParamsName"))
if mibBuilder.loadTexts: cMTSessionParamsEntry.setStatus('current')
if mibBuilder.loadTexts: cMTSessionParamsEntry.setDescription("An entry represents session parameters that can be associated with a Mediatrace session contained by the cMTSessionTable. Each entry is uniquely identified by name specified by cMTSessionParamsName object. A row created in this table will be shown in 'show running' command and it will not be saved into non-volatile memory.")
cMTSessionParamsName = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 1, 20, 1, 1), SnmpAdminString())
if mibBuilder.loadTexts: cMTSessionParamsName.setStatus('current')
if mibBuilder.loadTexts: cMTSessionParamsName.setDescription('This object specifies the name of this set of session parameters.')
cMTSessionParamsRowStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 1, 20, 1, 2), RowStatus()).setMaxAccess("readcreate")
if mibBuilder.loadTexts: cMTSessionParamsRowStatus.setStatus('current')
if mibBuilder.loadTexts: cMTSessionParamsRowStatus.setDescription("This object specifies the status of the session parameters. Only CreateAndGo and active status is supported. In order for this object to become active cMTSessionParamsName must be defined. The value of cMTSessionParamsInactivityTimeout needs to be at least 3 times of the value of cMTSessionParamsFrequency. All other objects assume the default value. Once the session parameters is activated no column can be modified. Setting this object to 'delete' will destroy the session parameters. The session parameters can be deleted only if it is not attached to any session.")
cMTSessionParamsResponseTimeout = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 1, 20, 1, 3), Unsigned32().subtype(subtypeSpec=ValueRangeConstraint(1, 65535))).setUnits('seconds').setMaxAccess("readcreate")
if mibBuilder.loadTexts: cMTSessionParamsResponseTimeout.setStatus('current')
if mibBuilder.loadTexts: cMTSessionParamsResponseTimeout.setDescription('This object specifies the amount of time a session should wait for the responses after sending out a Mediatrace request. The initiator will discard any responses to a particular request after this timeout.')
cMTSessionParamsFrequency = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 1, 20, 1, 4), Unsigned32().subtype(subtypeSpec=ValueRangeConstraint(10, 3600)).clone(120)).setUnits('seconds').setMaxAccess("readcreate")
if mibBuilder.loadTexts: cMTSessionParamsFrequency.setStatus('current')
if mibBuilder.loadTexts: cMTSessionParamsFrequency.setDescription('Duration between two successive data fetch requests.')
cMTSessionParamsInactivityTimeout = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 1, 20, 1, 5), Unsigned32().subtype(subtypeSpec=ValueRangeConstraint(1, 10800))).setUnits('sconds').setMaxAccess("readcreate")
if mibBuilder.loadTexts: cMTSessionParamsInactivityTimeout.setStatus('current')
if mibBuilder.loadTexts: cMTSessionParamsInactivityTimeout.setDescription('This object specifies the interval that the responder wait without any requests from the initiator before removing a particular session. The inactivity timeout needs to be at least 3 times of the session frequency.')
cMTSessionParamsHistoryBuckets = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 1, 20, 1, 6), Unsigned32().subtype(subtypeSpec=ValueRangeConstraint(1, 10)).clone(3)).setUnits('buckets').setMaxAccess("readcreate")
if mibBuilder.loadTexts: cMTSessionParamsHistoryBuckets.setStatus('current')
if mibBuilder.loadTexts: cMTSessionParamsHistoryBuckets.setDescription('This object specifies the number of buckets of statistics retained. Each bucket will contain complete set of metrics collected for all hops in one iteration.')
cMTSessionParamsRouteChangeReactiontime = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 1, 20, 1, 7), Unsigned32().subtype(subtypeSpec=ValueRangeConstraint(0, 60))).setUnits('seconds').setMaxAccess("readcreate")
if mibBuilder.loadTexts: cMTSessionParamsRouteChangeReactiontime.setStatus('current')
if mibBuilder.loadTexts: cMTSessionParamsRouteChangeReactiontime.setDescription('This object specifies the amount of time the initiator should wait after receiving the first route change, before reacting to further route change notifications. Range is from 0 to 60.')
cMTMediaMonitorProfileTable = MibTable((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 1, 21), )
if mibBuilder.loadTexts: cMTMediaMonitorProfileTable.setStatus('current')
if mibBuilder.loadTexts: cMTMediaMonitorProfileTable.setDescription('This table lists the media monitor profiles configured on the device.')
cMTMediaMonitorProfileEntry = MibTableRow((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 1, 21, 1), ).setIndexNames((0, "CISCO-MEDIATRACE-MIB", "cMTMediaMonitorProfileName"))
if mibBuilder.loadTexts: cMTMediaMonitorProfileEntry.setStatus('current')
if mibBuilder.loadTexts: cMTMediaMonitorProfileEntry.setDescription("An entry represents a media monitor profile that can be associated with a Mediatrace session contained by the cMTSessionTable. The entry is uniquely identified by cMTMediaMonitorProfileName. A row created in this table will be shown in 'show running' command and it will not be saved into non-volatile memory.")
cMTMediaMonitorProfileName = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 1, 21, 1, 1), SnmpAdminString())
if mibBuilder.loadTexts: cMTMediaMonitorProfileName.setStatus('current')
if mibBuilder.loadTexts: cMTMediaMonitorProfileName.setDescription('This object specifies the name of the Mediatrace media monitor profile.')
cMTMediaMonitorProfileRowStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 1, 21, 1, 2), RowStatus()).setMaxAccess("readcreate")
if mibBuilder.loadTexts: cMTMediaMonitorProfileRowStatus.setStatus('current')
if mibBuilder.loadTexts: cMTMediaMonitorProfileRowStatus.setDescription("This object specifies the status of the media monitor profile. Only CreateAndGo and active status is supported. In order for this object to become active cMTMediaMonitorProfileName must be defined. All other objects assume the default value. Once the media monitor profile is activated no column can be modified. Setting this object to 'delete' will destroy the media monitor. The media monitor profile can be deleted only if it is not attached to any session.")
cMTMediaMonitorProfileMetric = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 1, 21, 1, 3), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("rtp", 1), ("tcp", 2)))).setMaxAccess("readcreate")
if mibBuilder.loadTexts: cMTMediaMonitorProfileMetric.setStatus('current')
if mibBuilder.loadTexts: cMTMediaMonitorProfileMetric.setDescription("This object specifies the type of metrics group to be collected in addition to basic IP metrics. Specify value as RTP if metrics from 'Metric-List RTP' are desired and 'TCP' if metrics in 'Metric-List TCP' is desired.")
cMTMediaMonitorProfileInterval = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 1, 21, 1, 4), Unsigned32().subtype(subtypeSpec=ValueRangeConstraint(10, 120))).setUnits('seconds').setMaxAccess("readcreate")
if mibBuilder.loadTexts: cMTMediaMonitorProfileInterval.setStatus('current')
if mibBuilder.loadTexts: cMTMediaMonitorProfileInterval.setDescription('This object specifies the sampling interval for the media monitor profile.')
cMTMediaMonitorProfileRtpMaxDropout = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 1, 21, 1, 5), Unsigned32().subtype(subtypeSpec=ValueRangeConstraint(1, 20)).clone(10)).setUnits('packets').setMaxAccess("readcreate")
if mibBuilder.loadTexts: cMTMediaMonitorProfileRtpMaxDropout.setStatus('current')
if mibBuilder.loadTexts: cMTMediaMonitorProfileRtpMaxDropout.setDescription('This object specifies the maximum number of dropouts allowed when sampling RTP monitoring metrics.')
cMTMediaMonitorProfileRtpMaxReorder = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 1, 21, 1, 6), Unsigned32().subtype(subtypeSpec=ValueRangeConstraint(1, 20)).clone(5)).setUnits('packets').setMaxAccess("readcreate")
if mibBuilder.loadTexts: cMTMediaMonitorProfileRtpMaxReorder.setStatus('current')
if mibBuilder.loadTexts: cMTMediaMonitorProfileRtpMaxReorder.setDescription('This object specifies the maximum number of reorders allowed when sampling RTP monitoring metrics.')
cMTMediaMonitorProfileRtpMinimalSequential = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 1, 21, 1, 7), Unsigned32().subtype(subtypeSpec=ValueRangeConstraint(2, 10))).setUnits('packets').setMaxAccess("readcreate")
if mibBuilder.loadTexts: cMTMediaMonitorProfileRtpMinimalSequential.setStatus('current')
if mibBuilder.loadTexts: cMTMediaMonitorProfileRtpMinimalSequential.setDescription('This object specifies the minimum number of sequental packets required to identify a stream as being an RTP flow.')
cMTSystemProfileTable = MibTable((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 1, 22), )
if mibBuilder.loadTexts: cMTSystemProfileTable.setStatus('current')
if mibBuilder.loadTexts: cMTSystemProfileTable.setDescription('This table lists the system profiles configured on the device.')
cMTSystemProfileEntry = MibTableRow((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 1, 22, 1), ).setIndexNames((0, "CISCO-MEDIATRACE-MIB", "cMTSystemProfileName"))
if mibBuilder.loadTexts: cMTSystemProfileEntry.setStatus('current')
if mibBuilder.loadTexts: cMTSystemProfileEntry.setDescription("An entry represents a system profile that can be associated with a Mediatrace session contained by the cMTSessionTable. Each entry is uniquely identified by name specified by cMTSystemProfileName object. A row created in this table will be shown in 'show running' command and it will not be saved into non-volatile memory.")
cMTSystemProfileName = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 1, 22, 1, 1), SnmpAdminString())
if mibBuilder.loadTexts: cMTSystemProfileName.setStatus('current')
if mibBuilder.loadTexts: cMTSystemProfileName.setDescription('This object specifies the name of the Mediatrace system profile.')
cMTSystemProfileRowStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 1, 22, 1, 2), RowStatus()).setMaxAccess("readcreate")
if mibBuilder.loadTexts: cMTSystemProfileRowStatus.setStatus('current')
if mibBuilder.loadTexts: cMTSystemProfileRowStatus.setDescription("This object specifies the status of the system profile. Only CreateAndGo and active status is supported. In order for this object to become active cMTSystemProfileName must be defined. All other objects assume the default value. Once the system profile is activated no column can be modified. Setting this object to 'delete' will destroy the system profile. The system prifile can be deleted only if it is not attached to any session.")
cMTSystemProfileMetric = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 1, 22, 1, 3), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3))).clone(namedValues=NamedValues(("interface", 1), ("cpu", 2), ("memory", 3)))).setMaxAccess("readcreate")
if mibBuilder.loadTexts: cMTSystemProfileMetric.setStatus('current')
if mibBuilder.loadTexts: cMTSystemProfileMetric.setDescription("This object specifies the type of metrics group to be collected in addition to basic IP metrics. Specify 'interface' if metrics from 'Metric-List-Interface' are desired. Specify 'cpu' if metrics in 'Metric-List-CPU' is desired. Specify 'memory' if metrics in 'Metric-List-Memory' is desired.")
cMTSessionTable = MibTable((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 1, 23), )
if mibBuilder.loadTexts: cMTSessionTable.setStatus('current')
if mibBuilder.loadTexts: cMTSessionTable.setDescription('This table lists the Mediatrace sessions configured on the device.')
cMTSessionEntry = MibTableRow((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 1, 23, 1), ).setIndexNames((0, "CISCO-MEDIATRACE-MIB", "cMTSessionNumber"))
if mibBuilder.loadTexts: cMTSessionEntry.setReference('An entry in cMTSessionTable')
if mibBuilder.loadTexts: cMTSessionEntry.setStatus('current')
if mibBuilder.loadTexts: cMTSessionEntry.setDescription("A list of objects that define specific configuration for the session of Mediatrace. The entry is uniquely identified by cMTSessionNumber. A row created in this table will be shown in 'show running' command and it will not be saved into non-volatile memory.")
cMTSessionNumber = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 1, 23, 1, 2), Unsigned32().subtype(subtypeSpec=ValueRangeConstraint(1, 2147483647)))
if mibBuilder.loadTexts: cMTSessionNumber.setStatus('current')
if mibBuilder.loadTexts: cMTSessionNumber.setDescription('This object specifies an arbitrary integer-value that uniquely identifies a Mediatrace session.')
cMTSessionRowStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 1, 23, 1, 3), RowStatus()).setMaxAccess("readcreate")
if mibBuilder.loadTexts: cMTSessionRowStatus.setStatus('current')
if mibBuilder.loadTexts: cMTSessionRowStatus.setDescription("This object indicates the status of Mediatrace session. Only CreateAndGo and active status is supported. Following columns must be specified in order to activate the session: - cMTSessionPathSpecifierName - cMTSessionProfileName All other objects can assume default values. None of the properties of session can be modified once it is in 'active' state. Setting the value of 'destroy' for this object will delete the session. The session can be deleted only if the corresponding schedule (row in cMTScheduleTable ) not exist.")
cMTSessionPathSpecifierName = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 1, 23, 1, 4), SnmpAdminString()).setMaxAccess("readcreate")
if mibBuilder.loadTexts: cMTSessionPathSpecifierName.setStatus('current')
if mibBuilder.loadTexts: cMTSessionPathSpecifierName.setDescription('This object specifies the name of the Mediatrace path specifier profile associated with the session.')
cMTSessionParamName = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 1, 23, 1, 5), SnmpAdminString()).setMaxAccess("readcreate")
if mibBuilder.loadTexts: cMTSessionParamName.setStatus('current')
if mibBuilder.loadTexts: cMTSessionParamName.setDescription('This object specifies the name of Mediatrace session parameter associated with the session.')
cMTSessionProfileName = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 1, 23, 1, 6), SnmpAdminString()).setMaxAccess("readcreate")
if mibBuilder.loadTexts: cMTSessionProfileName.setStatus('current')
if mibBuilder.loadTexts: cMTSessionProfileName.setDescription('This object specifies the name of the Mediatrace metric profile associated with the session.')
cMTSessionFlowSpecifierName = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 1, 23, 1, 7), SnmpAdminString()).setMaxAccess("readcreate")
if mibBuilder.loadTexts: cMTSessionFlowSpecifierName.setStatus('current')
if mibBuilder.loadTexts: cMTSessionFlowSpecifierName.setDescription('This object specifies the name of the Mediatrace flow specifier profile associated with the session. Flow specifier is not required if system profile is attached to the session. In this case, media monitor profile is attached to the session. Flow specifier is optional and the 5-tuple from the path-specifier is used instead.')
cMTSessionTraceRouteEnabled = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 1, 23, 1, 8), TruthValue()).setMaxAccess("readcreate")
if mibBuilder.loadTexts: cMTSessionTraceRouteEnabled.setStatus('current')
if mibBuilder.loadTexts: cMTSessionTraceRouteEnabled.setDescription('This object specifies if traceroute is enabled for this session.')
cMTScheduleTable = MibTable((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 1, 24), )
if mibBuilder.loadTexts: cMTScheduleTable.setStatus('current')
if mibBuilder.loadTexts: cMTScheduleTable.setDescription('A table of Mediatrace scheduling specific definitions. Each entry in this table schedules a cMTSessionEntry created via the cMTSessionTable object.')
cMTScheduleEntry = MibTableRow((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 1, 24, 1), ).setIndexNames((0, "CISCO-MEDIATRACE-MIB", "cMTSessionNumber"))
if mibBuilder.loadTexts: cMTScheduleEntry.setReference('An entry in cMTScheduleTable')
if mibBuilder.loadTexts: cMTScheduleEntry.setStatus('current')
if mibBuilder.loadTexts: cMTScheduleEntry.setDescription("A list of objects that define specific configuration for the scheduling of Mediatrace operations. A row is created when a session is scheduled to make it active. Likewise, a row is destroyed when the session is unscheduled. A row created in this table will be shown in 'show running' command and it will not be saved into non-volatile memory.")
cMTScheduleRowStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 1, 24, 1, 1), RowStatus()).setMaxAccess("readcreate")
if mibBuilder.loadTexts: cMTScheduleRowStatus.setStatus('current')
if mibBuilder.loadTexts: cMTScheduleRowStatus.setDescription("This objects specifies the status of Mediatrace session schedule. Only CreateAndGo and destroy operations are permitted on the row. All objects can assume default values. The schedule start time (column cMTScheduleStartTime) must be specified in order to activate the schedule. Once activated none of the properties of the schedule can be changed. The schedule can be destroyed any time by setting the value of this object to 'destroy'. Destroying the schedule will stop the Mediatrace session but the session will not be destroyed.")
cMTScheduleStartTime = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 1, 24, 1, 2), TimeStamp()).setMaxAccess("readcreate")
if mibBuilder.loadTexts: cMTScheduleStartTime.setStatus('current')
if mibBuilder.loadTexts: cMTScheduleStartTime.setDescription('This object specifies the start time of the scheduled session.')
cMTScheduleLife = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 1, 24, 1, 3), Unsigned32().subtype(subtypeSpec=ValueRangeConstraint(0, 2147483647)).clone(3600)).setUnits('seconds').setMaxAccess("readcreate")
if mibBuilder.loadTexts: cMTScheduleLife.setStatus('current')
if mibBuilder.loadTexts: cMTScheduleLife.setDescription('This object specifies the duration of the session in seconds.')
cMTScheduleEntryAgeout = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 1, 24, 1, 4), Unsigned32().subtype(subtypeSpec=ValueRangeConstraint(0, 2073600)).clone(3600)).setUnits('seconds').setMaxAccess("readcreate")
if mibBuilder.loadTexts: cMTScheduleEntryAgeout.setStatus('current')
if mibBuilder.loadTexts: cMTScheduleEntryAgeout.setDescription('This object specifies the amount of time after which mediatrace session entry will be removed once the life of session is over and session is inactive.')
cMTScheduleRecurring = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 1, 24, 1, 5), TruthValue()).setMaxAccess("readcreate")
if mibBuilder.loadTexts: cMTScheduleRecurring.setStatus('current')
if mibBuilder.loadTexts: cMTScheduleRecurring.setDescription('This object specifies whether the schedule is recurring schedule. This object can be used when a periodic session is to be executed everyday at certain time and for certain life.')
cMTPathTable = MibTable((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 2, 1), )
if mibBuilder.loadTexts: cMTPathTable.setStatus('current')
if mibBuilder.loadTexts: cMTPathTable.setDescription('List of paths discovered by a mediatrace session.')
cMTPathEntry = MibTableRow((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 2, 1, 1), ).setIndexNames((0, "CISCO-MEDIATRACE-MIB", "cMTSessionNumber"), (0, "CISCO-MEDIATRACE-MIB", "cMTSessionLifeNumber"), (0, "CISCO-MEDIATRACE-MIB", "cMTBucketNumber"), (0, "CISCO-MEDIATRACE-MIB", "cMTPathHopNumber"))
if mibBuilder.loadTexts: cMTPathEntry.setStatus('current')
if mibBuilder.loadTexts: cMTPathEntry.setDescription('An entry in cMTPathTable represents a Mediatrace path discovered by a session. This table contains information about the hops (Mediatrace or non-Mediatrace) discovered during a specific request. The Path table is used to find the hop address (Address type - IPv4 or IPv6 and Address) and hop type (currently Mediatrace or Traceroute) to use as index for other statistics tables. A row is created when a Mediatrace scheduled session discovers a path to the specified destination during a request. Likewise, a row is destroyed when the path is no longer avilable. A single row corresponds to a Mediatrace path discovered for a session and is uniquely identified by cMTSessionNumber, cMTSessionLifeNumber, cMTBucketNumber and cMTPathHopNumber. The created rows are destroyed when the device undergoes a restart.')
cMTSessionLifeNumber = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 2, 1, 1, 1), Unsigned32().subtype(subtypeSpec=ValueRangeConstraint(0, 2)))
if mibBuilder.loadTexts: cMTSessionLifeNumber.setStatus('current')
if mibBuilder.loadTexts: cMTSessionLifeNumber.setDescription('This object specifies a life for a conceptual statistics row. For a particular value of cMTSessionLifeNumber, the agent assigns the first value of 0 to the current (latest) life, with 1 being the next latest and so on. The sequence keeps incrementing, despite older (lower) values being removed from the table.')
cMTBucketNumber = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 2, 1, 1, 2), Unsigned32().subtype(subtypeSpec=ValueRangeConstraint(0, 10)))
if mibBuilder.loadTexts: cMTBucketNumber.setStatus('current')
if mibBuilder.loadTexts: cMTBucketNumber.setDescription('This object is index of the list of statistics buckets stored. A statistics bucket corresponds to data collected from each hop in one run of the periodic mediatrace session. Bucket with Index value of 0 is the bucket for latest completed run. Index 1 is one run prior to latest completed run, index 2 is two runs prior to latest completed run, and so on.')
cMTPathHopNumber = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 2, 1, 1, 3), Unsigned32().subtype(subtypeSpec=ValueRangeConstraint(0, 255)))
if mibBuilder.loadTexts: cMTPathHopNumber.setStatus('current')
if mibBuilder.loadTexts: cMTPathHopNumber.setDescription('This object specifies the hop number for a Mediatrace Path. This hop can be either Mediatrace or Non-Mediatrace node. The hop number is relative to the initiator with 0 being used to identify initiator itself, 1 for next farther node, etc. This hop number is always unique i.e., two hops cannot have same hop number.')
cMTPathHopAddrType = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 2, 1, 1, 4), InetAddressType()).setMaxAccess("readonly")
if mibBuilder.loadTexts: cMTPathHopAddrType.setStatus('current')
if mibBuilder.loadTexts: cMTPathHopAddrType.setDescription('This object specifies the type of IP address specified by the corresponding instance of cMTPathHopAddrType.')
cMTPathHopAddr = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 2, 1, 1, 5), InetAddress()).setMaxAccess("readonly")
if mibBuilder.loadTexts: cMTPathHopAddr.setStatus('current')
if mibBuilder.loadTexts: cMTPathHopAddr.setDescription('This object indicates IP Address type of the hop on a Mediatrace Path.')
cMTPathHopType = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 2, 1, 1, 6), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("mediatrace", 1), ("traceroute", 2)))).setMaxAccess("readonly")
if mibBuilder.loadTexts: cMTPathHopType.setStatus('current')
if mibBuilder.loadTexts: cMTPathHopType.setDescription("This object indicates the type of the hop on a Mediatrace path. Currently, only two types are present - mediatrace(1) and traceroute(2). A hop is of type 'mediatrace' if it is discovered by only mediatrace or by both mediatrace and trace-route. The hop is 'trace route' if it is discovered by trace route only.")
cMTPathHopAlternate1AddrType = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 2, 1, 1, 7), InetAddressType()).setMaxAccess("readonly")
if mibBuilder.loadTexts: cMTPathHopAlternate1AddrType.setStatus('current')
if mibBuilder.loadTexts: cMTPathHopAlternate1AddrType.setDescription('This object specifies the type of IP address specified by the corresponding instance of cMTPathHopAlternate1AddrType.')
cMTPathHopAlternate1Addr = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 2, 1, 1, 8), InetAddress()).setMaxAccess("readonly")
if mibBuilder.loadTexts: cMTPathHopAlternate1Addr.setStatus('current')
if mibBuilder.loadTexts: cMTPathHopAlternate1Addr.setDescription('This object indicates the IP Address of the first alternate hop on a traceroute path.')
cMTPathHopAlternate2AddrType = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 2, 1, 1, 9), InetAddressType()).setMaxAccess("readonly")
if mibBuilder.loadTexts: cMTPathHopAlternate2AddrType.setStatus('current')
if mibBuilder.loadTexts: cMTPathHopAlternate2AddrType.setDescription('This object specifies the type of IP address specified by the corresponding instance of cMTPathHopAlternate2AddrType.')
cMTPathHopAlternate2Addr = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 2, 1, 1, 10), InetAddress()).setMaxAccess("readonly")
if mibBuilder.loadTexts: cMTPathHopAlternate2Addr.setStatus('current')
if mibBuilder.loadTexts: cMTPathHopAlternate2Addr.setDescription('This object indicates the IP Address of the second alternate hop on a traceroute path.')
cMTPathHopAlternate3AddrType = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 2, 1, 1, 11), InetAddressType()).setMaxAccess("readonly")
if mibBuilder.loadTexts: cMTPathHopAlternate3AddrType.setStatus('current')
if mibBuilder.loadTexts: cMTPathHopAlternate3AddrType.setDescription('This object specifies the type of IP address specified by the corresponding instance of cMTPathHopAlternate3AddrType.')
cMTPathHopAlternate3Addr = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 2, 1, 1, 12), InetAddress()).setMaxAccess("readonly")
if mibBuilder.loadTexts: cMTPathHopAlternate3Addr.setStatus('current')
if mibBuilder.loadTexts: cMTPathHopAlternate3Addr.setDescription('This object indicates the IP Address of the third alternate hop on a traceroute path.')
cMTHopStatsTable = MibTable((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 2, 2), )
if mibBuilder.loadTexts: cMTHopStatsTable.setStatus('current')
if mibBuilder.loadTexts: cMTHopStatsTable.setDescription('An entry in cMTHopStatsTable represents a hop on the path associated to a Mediatrace session. This table contains information about particular hop (Mediatrace or non-Mediatrace) such as the address, type of hop, etc. A single row corresponds to a hop on the Mediatrace path discovered for a session and is uniquely identified by cMTSessionNumber, cMTSessionLifeNumber, cMTBucketNumber,cMTHopStatsAddrType and cMTHopStatsAddr. The created rows are destroyed when the device undergoes a restart.')
cMTHopStatsEntry = MibTableRow((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 2, 2, 1), ).setIndexNames((0, "CISCO-MEDIATRACE-MIB", "cMTSessionNumber"), (0, "CISCO-MEDIATRACE-MIB", "cMTSessionLifeNumber"), (0, "CISCO-MEDIATRACE-MIB", "cMTBucketNumber"), (0, "CISCO-MEDIATRACE-MIB", "cMTHopStatsAddrType"), (0, "CISCO-MEDIATRACE-MIB", "cMTHopStatsAddr"))
if mibBuilder.loadTexts: cMTHopStatsEntry.setStatus('current')
if mibBuilder.loadTexts: cMTHopStatsEntry.setDescription('An entry in cMTHopStatsTable')
cMTHopStatsMaskBitmaps = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 2, 2, 1, 1), Bits().clone(namedValues=NamedValues(("mediatraceTtlUnsupported", 0), ("mediatraceTtlUncollected", 1), ("collectionStatsUnsupported", 2), ("collectionStatsUncollected", 3), ("ingressInterfaceUnsupported", 4), ("ingressInterfaceUncollected", 5), ("egressInterfaceUnsupported", 6), ("egressInterfaceUncollected", 7)))).setMaxAccess("readonly")
if mibBuilder.loadTexts: cMTHopStatsMaskBitmaps.setStatus('current')
if mibBuilder.loadTexts: cMTHopStatsMaskBitmaps.setDescription('This object indicates whether the corresponding instances of these statistics fields in the table are supported. It also indicates if the statistics data are collected. There are 2 bits for each corresponding field.')
cMTHopStatsAddrType = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 2, 2, 1, 2), InetAddressType())
if mibBuilder.loadTexts: cMTHopStatsAddrType.setStatus('current')
if mibBuilder.loadTexts: cMTHopStatsAddrType.setDescription('This object specifies the type of IP address specified by the corresponding instance of cMTHopStatsAddr.')
cMTHopStatsAddr = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 2, 2, 1, 3), InetAddress())
if mibBuilder.loadTexts: cMTHopStatsAddr.setStatus('current')
if mibBuilder.loadTexts: cMTHopStatsAddr.setDescription('This object specifies the IP Address of the hop on a Mediatrace Path. This value is obtained from CMTPathHopAddr in cMTPathTable.')
cMTHopStatsName = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 2, 2, 1, 4), SnmpAdminString()).setMaxAccess("readonly")
if mibBuilder.loadTexts: cMTHopStatsName.setStatus('current')
if mibBuilder.loadTexts: cMTHopStatsName.setDescription('This object indicates the name for this hop. This can be either the hostname or the IP address for the hop.')
cMTHopStatsMediatraceTtl = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 2, 2, 1, 5), Unsigned32().subtype(subtypeSpec=ValueRangeConstraint(0, 255))).setMaxAccess("readonly")
if mibBuilder.loadTexts: cMTHopStatsMediatraceTtl.setReference("J. Postel, 'Internet Protocol', RFC-791, September 1981. J. Deering and R. Hinden, 'Internet Protocol, Version 6 (IPv6) Specification', RFC-2460, December 1998.")
if mibBuilder.loadTexts: cMTHopStatsMediatraceTtl.setStatus('current')
if mibBuilder.loadTexts: cMTHopStatsMediatraceTtl.setDescription("This object indicates the hop limit of the corresponding traffic flow. If version 4 of the IP carries the traffic flow, then the value of this column corresponds to the 'Time to Live' field of the IP header contained by packets in the Mediatrace request. If version 6 of the IP carries the traffic flow, then the value of this column corresponds to the 'Hop Limit' field of the IP header contained by packets in the Mediatrace request.")
cMTHopStatsCollectionStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 2, 2, 1, 6), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("success", 1), ("notSuccess", 2)))).setMaxAccess("readonly")
if mibBuilder.loadTexts: cMTHopStatsCollectionStatus.setStatus('current')
if mibBuilder.loadTexts: cMTHopStatsCollectionStatus.setDescription("This object indicates the operational status of data being collected on the hop for a specific session: 'success' The hop is actively collecting and responding with data. 'notsuccess' The hop is not collecting or responding with data.")
cMTHopStatsIngressInterface = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 2, 2, 1, 7), SnmpAdminString()).setMaxAccess("readonly")
if mibBuilder.loadTexts: cMTHopStatsIngressInterface.setStatus('current')
if mibBuilder.loadTexts: cMTHopStatsIngressInterface.setDescription('This object indicates the interface on the responder that receives the Mediatrace request from the initiator.')
cMTHopStatsEgressInterface = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 2, 2, 1, 8), SnmpAdminString()).setMaxAccess("readonly")
if mibBuilder.loadTexts: cMTHopStatsEgressInterface.setStatus('current')
if mibBuilder.loadTexts: cMTHopStatsEgressInterface.setDescription("This object indicates the interface on the responder which is used to forward the Mediatrace request from the initiator towards destination in the path specifier. Value of 'None' will be shown if the destination address in path specifier terminates on this hop.")
cMTTraceRouteTable = MibTable((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 2, 3), )
if mibBuilder.loadTexts: cMTTraceRouteTable.setStatus('current')
if mibBuilder.loadTexts: cMTTraceRouteTable.setDescription('This table lists the hops discovered by traceroute executed from the initiator. These are the hops which are on media flow path but on which mediatrace is not enabled or is not supported.')
cMTTraceRouteEntry = MibTableRow((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 2, 3, 1), ).setIndexNames((0, "CISCO-MEDIATRACE-MIB", "cMTSessionNumber"), (0, "CISCO-MEDIATRACE-MIB", "cMTSessionLifeNumber"), (0, "CISCO-MEDIATRACE-MIB", "cMTBucketNumber"), (0, "CISCO-MEDIATRACE-MIB", "cMTHopStatsAddrType"), (0, "CISCO-MEDIATRACE-MIB", "cMTHopStatsAddr"))
if mibBuilder.loadTexts: cMTTraceRouteEntry.setStatus('current')
if mibBuilder.loadTexts: cMTTraceRouteEntry.setDescription('An entry in cMTTraceRouteTable represents a Traceroute hop on the path associated to a Mediatrace session. The created rows are destroyed when the device undergoes a restart.')
cMTTraceRouteHopNumber = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 2, 3, 1, 1), Gauge32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: cMTTraceRouteHopNumber.setStatus('current')
if mibBuilder.loadTexts: cMTTraceRouteHopNumber.setDescription('This object indicates the hop number of Traceroute host relative to the Initiator. It start with 1 and increments as we go farther from the Initiator.')
cMTTraceRouteHopRtt = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 2, 3, 1, 2), Counter64()).setMaxAccess("readonly")
if mibBuilder.loadTexts: cMTTraceRouteHopRtt.setStatus('current')
if mibBuilder.loadTexts: cMTTraceRouteHopRtt.setDescription('This object indicates RTT. The time it takes for a packet to get to a hop and back, displayed in milliseconds. (ms).')
cMTSessionStatusTable = MibTable((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 2, 4), )
if mibBuilder.loadTexts: cMTSessionStatusTable.setStatus('current')
if mibBuilder.loadTexts: cMTSessionStatusTable.setDescription('This table contains aggregate data maintained by Mediatrace for session status.')
cMTSessionStatusEntry = MibTableRow((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 2, 4, 1), ).setIndexNames((0, "CISCO-MEDIATRACE-MIB", "cMTSessionNumber"))
if mibBuilder.loadTexts: cMTSessionStatusEntry.setStatus('current')
if mibBuilder.loadTexts: cMTSessionStatusEntry.setDescription('An entry in cMTSessionStatusTable represents information about a Mediatrace session. This table contains information about particular session such as global session identifier, operation state and time to live. A single row corresponds to status of a Mediatrace session and is uniquely identified by cMTSessionNumber. The created rows are destroyed when the device undergoes a restart.')
cMTSessionStatusBitmaps = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 2, 4, 1, 1), Bits().clone(namedValues=NamedValues(("globalSessionIdUusupport", 0), ("globalSessionIdUncollected", 1), ("operationStateUusupport", 2), ("operationStateUncollected", 3), ("operationTimeToLiveUusupport", 4), ("operationTimeToLiveUncollected", 5)))).setMaxAccess("readonly")
if mibBuilder.loadTexts: cMTSessionStatusBitmaps.setStatus('current')
if mibBuilder.loadTexts: cMTSessionStatusBitmaps.setDescription('This object indicates whether the corresponding instances of these statistics fields in the table are supported. It also indicates if the statistics are collected. There are 2 bits for each field.')
cMTSessionStatusGlobalSessionId = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 2, 4, 1, 2), Unsigned32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: cMTSessionStatusGlobalSessionId.setStatus('current')
if mibBuilder.loadTexts: cMTSessionStatusGlobalSessionId.setDescription('This object indicates a globally unique Id to identify a session throughout the network.')
cMTSessionStatusOperationState = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 2, 4, 1, 3), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4))).clone(namedValues=NamedValues(("pending", 1), ("active", 2), ("inactive", 3), ("sleep", 4)))).setMaxAccess("readonly")
if mibBuilder.loadTexts: cMTSessionStatusOperationState.setStatus('current')
if mibBuilder.loadTexts: cMTSessionStatusOperationState.setDescription('This object indicates the operation status of the session. pending - Session is not currently active. active - Session is in active state. inactive - Session is not active but it has not aged out. sleep - Session is in sleep state.')
cMTSessionStatusOperationTimeToLive = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 2, 4, 1, 4), Counter64()).setMaxAccess("readonly")
if mibBuilder.loadTexts: cMTSessionStatusOperationTimeToLive.setStatus('current')
if mibBuilder.loadTexts: cMTSessionStatusOperationTimeToLive.setDescription('This object indicates how long the session operation will last.')
cMTSessionRequestStatsTable = MibTable((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 2, 5), )
if mibBuilder.loadTexts: cMTSessionRequestStatsTable.setStatus('current')
if mibBuilder.loadTexts: cMTSessionRequestStatsTable.setDescription('This table contains aggregate data maintained by Mediatrace for session request status.')
cMTSessionRequestStatsEntry = MibTableRow((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 2, 5, 1), ).setIndexNames((0, "CISCO-MEDIATRACE-MIB", "cMTSessionNumber"), (0, "CISCO-MEDIATRACE-MIB", "cMTSessionLifeNumber"), (0, "CISCO-MEDIATRACE-MIB", "cMTBucketNumber"))
if mibBuilder.loadTexts: cMTSessionRequestStatsEntry.setStatus('current')
if mibBuilder.loadTexts: cMTSessionRequestStatsEntry.setDescription('An entry in cMTSessionRequestStatsTable represents status for each request for a particular session. A single row corresponds to a request sent by a particular Mediatrace session and is uniquely identified by cMTSessionNumber, cMTSessionLifeNumber and cMTBucketNumber. The created rows are destroyed when the device undergoes a restart.')
cMTSessionRequestStatsBitmaps = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 2, 5, 1, 1), Bits().clone(namedValues=NamedValues(("requestTimestampUnsupport", 0), ("requestTimestampUncollected", 1), ("requestStatusUnsupport", 2), ("requestStatusUncollected", 3), ("tracerouteStatusUnsupport", 4), ("tracerouteStatusUncollected", 5), ("routeIndexUnsupport", 6), ("routeIndexUncollected", 7), ("numberOfMediatraceHopsUnsupport", 8), ("numberOfMediatraceHopsUncollected", 9), ("numberOfNonMediatraceHopsUnsupport", 10), ("numberOfNonMediatraceHopsUncollected", 11), ("numberOfValidHopsUnsupport", 12), ("numberOfValidHopsUncollected", 13), ("numberOfErrorHopsUnsupport", 14), ("numberOfErrorHopsUncollected", 15), ("numberOfNoDataRecordHopsUnsupport", 16), ("numberOfNoDataRecordHopsUncollected", 17), ("metaGlobalIdUnsupport", 18), ("metaGlobalIdUncollected", 19), ("metaMultiPartySessionIdUnsupport", 20), ("metaMultiPartySessionIdUncollected", 21), ("metaAppNameUnsupport", 22), ("metaAppNameUncollected", 23)))).setMaxAccess("readonly")
if mibBuilder.loadTexts: cMTSessionRequestStatsBitmaps.setStatus('current')
if mibBuilder.loadTexts: cMTSessionRequestStatsBitmaps.setDescription('This object indicates whether the corresponding instances of these stats fields in the table are supported. It also indicates if the stats data are collected. There are 2 bits for each corresponding field.')
cMTSessionRequestStatsRequestTimestamp = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 2, 5, 1, 2), TimeStamp()).setMaxAccess("readonly")
if mibBuilder.loadTexts: cMTSessionRequestStatsRequestTimestamp.setStatus('current')
if mibBuilder.loadTexts: cMTSessionRequestStatsRequestTimestamp.setDescription('This object indicates the value of request time when the request was sent our by the initiator for this particular session.')
cMTSessionRequestStatsRequestStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 2, 5, 1, 3), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("completed", 1), ("notCompleted", 2)))).setMaxAccess("readonly")
if mibBuilder.loadTexts: cMTSessionRequestStatsRequestStatus.setStatus('current')
if mibBuilder.loadTexts: cMTSessionRequestStatsRequestStatus.setDescription('This object indicates the status of request for the session.')
cMTSessionRequestStatsTracerouteStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 2, 5, 1, 4), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("completed", 1), ("notCompleted", 2)))).setMaxAccess("readonly")
if mibBuilder.loadTexts: cMTSessionRequestStatsTracerouteStatus.setStatus('current')
if mibBuilder.loadTexts: cMTSessionRequestStatsTracerouteStatus.setDescription('This object indicates the status of traceroute for the session.')
cMTSessionRequestStatsRouteIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 2, 5, 1, 5), Gauge32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: cMTSessionRequestStatsRouteIndex.setStatus('current')
if mibBuilder.loadTexts: cMTSessionRequestStatsRouteIndex.setDescription('This object indicates the route index for the session request. It signifies the number of times a route has changed for a particular session. 0 signifies no route change.')
cMTSessionRequestStatsNumberOfMediatraceHops = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 2, 5, 1, 6), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: cMTSessionRequestStatsNumberOfMediatraceHops.setStatus('current')
if mibBuilder.loadTexts: cMTSessionRequestStatsNumberOfMediatraceHops.setDescription('This object indicates the number of Mediatrace hops in the path.')
cMTSessionRequestStatsNumberOfNonMediatraceHops = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 2, 5, 1, 7), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: cMTSessionRequestStatsNumberOfNonMediatraceHops.setStatus('current')
if mibBuilder.loadTexts: cMTSessionRequestStatsNumberOfNonMediatraceHops.setDescription('This object indicates the number of non-Mediatrace hops in the path.')
cMTSessionRequestStatsNumberOfValidHops = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 2, 5, 1, 8), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: cMTSessionRequestStatsNumberOfValidHops.setStatus('current')
if mibBuilder.loadTexts: cMTSessionRequestStatsNumberOfValidHops.setDescription('This object indicates the number of hops with valid data report.')
cMTSessionRequestStatsNumberOfErrorHops = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 2, 5, 1, 9), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: cMTSessionRequestStatsNumberOfErrorHops.setStatus('current')
if mibBuilder.loadTexts: cMTSessionRequestStatsNumberOfErrorHops.setDescription('This object indicates the number of hops with error report. These hops are not able to return the statistics due to some issue.')
cMTSessionRequestStatsNumberOfNoDataRecordHops = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 2, 5, 1, 10), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: cMTSessionRequestStatsNumberOfNoDataRecordHops.setStatus('current')
if mibBuilder.loadTexts: cMTSessionRequestStatsNumberOfNoDataRecordHops.setDescription('This object indicates the number of hops with no data record.')
cMTSessionRequestStatsMDGlobalId = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 2, 5, 1, 11), OctetString()).setMaxAccess("readonly")
if mibBuilder.loadTexts: cMTSessionRequestStatsMDGlobalId.setStatus('current')
if mibBuilder.loadTexts: cMTSessionRequestStatsMDGlobalId.setDescription('This object indicates the meta-data global Id for this session.')
cMTSessionRequestStatsMDMultiPartySessionId = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 2, 5, 1, 12), OctetString()).setMaxAccess("readonly")
if mibBuilder.loadTexts: cMTSessionRequestStatsMDMultiPartySessionId.setStatus('current')
if mibBuilder.loadTexts: cMTSessionRequestStatsMDMultiPartySessionId.setDescription('This object indicates the meta-data Multi Party Session Id for this session.')
cMTSessionRequestStatsMDAppName = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 2, 5, 1, 13), OctetString()).setMaxAccess("readonly")
if mibBuilder.loadTexts: cMTSessionRequestStatsMDAppName.setStatus('current')
if mibBuilder.loadTexts: cMTSessionRequestStatsMDAppName.setDescription('This object indicates the meta-data AppName for this session.')
cMTCommonMetricStatsTable = MibTable((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 2, 6), )
if mibBuilder.loadTexts: cMTCommonMetricStatsTable.setStatus('current')
if mibBuilder.loadTexts: cMTCommonMetricStatsTable.setDescription('This table contains the list of entries representing common IP metrics values for a particular mediatrace session on particular hop.')
cMTCommonMetricStatsEntry = MibTableRow((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 2, 6, 1), ).setIndexNames((0, "CISCO-MEDIATRACE-MIB", "cMTSessionNumber"), (0, "CISCO-MEDIATRACE-MIB", "cMTSessionLifeNumber"), (0, "CISCO-MEDIATRACE-MIB", "cMTBucketNumber"), (0, "CISCO-MEDIATRACE-MIB", "cMTHopStatsAddrType"), (0, "CISCO-MEDIATRACE-MIB", "cMTHopStatsAddr"))
if mibBuilder.loadTexts: cMTCommonMetricStatsEntry.setStatus('current')
if mibBuilder.loadTexts: cMTCommonMetricStatsEntry.setDescription('An entry in cMTCommonMetricStatsTable represents common media monitor profile information of a hop on the path associated to a Mediatrace session such as flow sampling time stamp, packets dropped, IP TTL, etc. The devices creates a row in the cMTCommonMetricStatsTable when a Mediatrace session starts collecting a traffic metrics data and has been configured to compute common IP metrics. Likewise, the device destroys a row in the cMTCommonMetricStatsTable when the corresponding Mediatrace session has ceased collecting the traffic metrics data (e.g., when a scheduled session has timed out). A single row corresponds to a common media monitor profile information of a hop on the path discovered for a session and is uniquely identified by cMTSessionNumber, cMTSessionLifeNumber, cMTBucketNumber,cMTHopStatsAddrType and cMTHopStatsAddr. The created rows are destroyed when the device undergoes a restart.')
cMTCommonMetricsBitmaps = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 2, 6, 1, 2), Bits().clone(namedValues=NamedValues(("flowSamplingStartTimeUnsupported", 0), ("flowSamplingStartTimeUncollected", 1), ("ipPktDroppedUnsupported", 2), ("ipPktDroppedUncollected", 3), ("ipPktCountUnsupported", 4), ("ipPktCountUncollected", 5), ("ipOctetsUnsupported", 6), ("ipOctetsUncollected", 7), ("ipByteRateUnsupported", 8), ("ipByteRateUncollected", 9), ("ipDscpUnsupported", 10), ("ipDscpUncollected", 11), ("ipTtlUnsupported", 12), ("ipTtlUncollected", 13), ("flowCounterUnsupported", 14), ("flowCounterUncollected", 15), ("flowDirectionUnsupported", 16), ("flowDirectionUncollected", 17), ("lossMeasurementUnsupported", 18), ("lossMeasurementUncollected", 19), ("mediaStopOccurredUnsupported", 20), ("mediaStopOccurredUncollected", 21), ("routeForwardUnsupported", 22), ("routeForwardUncollected", 23), ("ipProtocolUnsupported", 24), ("ipProtocolUncollected", 25)))).setMaxAccess("readonly")
if mibBuilder.loadTexts: cMTCommonMetricsBitmaps.setStatus('current')
if mibBuilder.loadTexts: cMTCommonMetricsBitmaps.setDescription('This object indicates whether the corresponding instances of these stats fields in the table are supported. It also indicates if the stats data are collected. There are 2 bits for each field.')
cMTCommonMetricsFlowSamplingStartTime = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 2, 6, 1, 3), CiscoNTPTimeStamp()).setMaxAccess("readonly")
if mibBuilder.loadTexts: cMTCommonMetricsFlowSamplingStartTime.setStatus('current')
if mibBuilder.loadTexts: cMTCommonMetricsFlowSamplingStartTime.setDescription('This object defines the the timestamp when the statistics were collected on the responder.')
cMTCommonMetricsIpPktDropped = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 2, 6, 1, 4), Counter64()).setUnits('packets').setMaxAccess("readonly")
if mibBuilder.loadTexts: cMTCommonMetricsIpPktDropped.setStatus('current')
if mibBuilder.loadTexts: cMTCommonMetricsIpPktDropped.setDescription("This object indicates number of packet drops observed on the flow being monitored on this hop from flow sampling start time in window of 'sample interval' length.")
cMTCommonMetricsIpOctets = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 2, 6, 1, 5), Counter64()).setUnits('octets').setMaxAccess("readonly")
if mibBuilder.loadTexts: cMTCommonMetricsIpOctets.setStatus('current')
if mibBuilder.loadTexts: cMTCommonMetricsIpOctets.setDescription('This object indicates the total number of octets contained by the packets processed by the Mediatrace request for the corresponding traffic flow.')
cMTCommonMetricsIpPktCount = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 2, 6, 1, 6), Counter64()).setUnits('packets').setMaxAccess("readonly")
if mibBuilder.loadTexts: cMTCommonMetricsIpPktCount.setStatus('current')
if mibBuilder.loadTexts: cMTCommonMetricsIpPktCount.setDescription('This object indicates the total number of packets processed by the Mediatrace request for the corresponding traffic flow.')
cMTCommonMetricsIpByteRate = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 2, 6, 1, 7), Gauge32()).setUnits('packets per second').setMaxAccess("readonly")
if mibBuilder.loadTexts: cMTCommonMetricsIpByteRate.setStatus('current')
if mibBuilder.loadTexts: cMTCommonMetricsIpByteRate.setDescription('This object indicates the average packet rate at which the Mediatrace request is processing data for the corresponding traffic flow. This value is cumulative over the lifetime of the traffic flow.')
cMTCommonMetricsIpDscp = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 2, 6, 1, 8), Unsigned32().subtype(subtypeSpec=ValueRangeConstraint(0, 64))).setMaxAccess("readonly")
if mibBuilder.loadTexts: cMTCommonMetricsIpDscp.setStatus('current')
if mibBuilder.loadTexts: cMTCommonMetricsIpDscp.setDescription("This object indicates the DSCP value of the corresponding traffic flow. If version 4 of the IP carries the traffic flow, then the value of this column corresponds to the DSCP part of 'Type of Service' field of the IP header contained by packets in the traffic flow. If version 6 of the IP carries the traffic flow, then the value of this column corresponds to DSCP part of the 'Traffic Class' field of the IP header contained by packets in the traffic flow.")
cMTCommonMetricsIpTtl = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 2, 6, 1, 9), Unsigned32().subtype(subtypeSpec=ValueRangeConstraint(0, 255))).setMaxAccess("readonly")
if mibBuilder.loadTexts: cMTCommonMetricsIpTtl.setReference("J. Postel, 'Internet Protocol', RFC-791, September 1981. J. Deering and R. Hinden, 'Internet Protocol, Version 6 (IPv6) Specification', RFC-2460, December 1998.")
if mibBuilder.loadTexts: cMTCommonMetricsIpTtl.setStatus('current')
if mibBuilder.loadTexts: cMTCommonMetricsIpTtl.setDescription("This object indicates the hop limit of the corresponding traffic flow. If version 4 of the IP carries the traffic flow, then the value of this column corresponds to the 'Time to Live' field of the IP header contained by packets in the Mediatrace request. If version 6 of the IP carries the traffic flow, then the value of this column corresponds to the 'Hop Limit' field of the IP header contained by packets in the Mediatrace request.")
cMTCommonMetricsFlowCounter = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 2, 6, 1, 10), Gauge32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: cMTCommonMetricsFlowCounter.setStatus('current')
if mibBuilder.loadTexts: cMTCommonMetricsFlowCounter.setDescription('This object indicates the number of traffic flows currently monitored by the Mediatrace request.')
cMTCommonMetricsFlowDirection = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 2, 6, 1, 11), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3))).clone(namedValues=NamedValues(("unknown", 1), ("ingress", 2), ("egress", 3)))).setMaxAccess("readonly")
if mibBuilder.loadTexts: cMTCommonMetricsFlowDirection.setStatus('current')
if mibBuilder.loadTexts: cMTCommonMetricsFlowDirection.setDescription("This object indicates the direction of the traffic flow where the data is monitored : 'unknown' The SNMP entity does not know the direction of the traffic flow at the point data is collected. 'ingress' Data is collected at the point where the traffic flow enters the devices 'egress' Data is colected at the point where the traffic flow leaves the device.")
cMTCommonMetricsLossMeasurement = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 2, 6, 1, 12), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("true", 1), ("false", 2)))).setMaxAccess("readonly")
if mibBuilder.loadTexts: cMTCommonMetricsLossMeasurement.setStatus('current')
if mibBuilder.loadTexts: cMTCommonMetricsLossMeasurement.setDescription('This object indicates the loss measurement.')
cMTCommonMetricsMediaStopOccurred = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 2, 6, 1, 13), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("true", 1), ("false", 2)))).setMaxAccess("readonly")
if mibBuilder.loadTexts: cMTCommonMetricsMediaStopOccurred.setStatus('current')
if mibBuilder.loadTexts: cMTCommonMetricsMediaStopOccurred.setDescription('This object indicates the media stop occurred.')
cMTCommonMetricsRouteForward = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 2, 6, 1, 14), SnmpAdminString()).setMaxAccess("readonly")
if mibBuilder.loadTexts: cMTCommonMetricsRouteForward.setStatus('current')
if mibBuilder.loadTexts: cMTCommonMetricsRouteForward.setDescription('This object indicates routing or forwarding status i.e. whether the packet is forwarded or dropped for the flow.')
cMTCommonMetricsIpProtocol = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 2, 6, 1, 15), CiscoMediatraceSupportProtocol()).setMaxAccess("readonly")
if mibBuilder.loadTexts: cMTCommonMetricsIpProtocol.setStatus('current')
if mibBuilder.loadTexts: cMTCommonMetricsIpProtocol.setDescription('This table contains entry to specify the media Metric-list for the particular Mmediatrace session on the hop.')
cMTRtpMetricStatsTable = MibTable((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 2, 7), )
if mibBuilder.loadTexts: cMTRtpMetricStatsTable.setStatus('current')
if mibBuilder.loadTexts: cMTRtpMetricStatsTable.setDescription('This table contains aggregate data maintained by Mediatrace for traffic flows for which it is computing RTP metrics.')
cMTRtpMetricStatsEntry = MibTableRow((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 2, 7, 1), )
cMTCommonMetricStatsEntry.registerAugmentions(("CISCO-MEDIATRACE-MIB", "cMTRtpMetricStatsEntry"))
cMTRtpMetricStatsEntry.setIndexNames(*cMTCommonMetricStatsEntry.getIndexNames())
if mibBuilder.loadTexts: cMTRtpMetricStatsEntry.setStatus('current')
if mibBuilder.loadTexts: cMTRtpMetricStatsEntry.setDescription('An entry in cMTRtpMetricStatsTable represents RTP related information of a hop on the path associated to a Mediatrace session such as bit rate, octets, etc. The devices creates a row in the cMTRtpMetricStatsTable when a Mediatrace session starts collecting a traffic metrics data and has been configured to compute RTP metrics for the same traffic metrics data. Likewise, the device destroys a row in the cMTRtpMetricStatsTable when the corresponding Mediatrace session has ceased collecting the traffic metrics data (e.g., when a scheduled session has timed out). A single row corresponds to a RTP information of a hop on the path discovered for a Mediatrace session and is uniquely identified by cMTSessionNumber, cMTSessionLifeNumber, cMTBucketNumber,cMTHopStatsAddrType and cMTHopStatsAddr. The created rows are destroyed when the device undergoes a restart.')
cMTRtpMetricsBitmaps = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 2, 7, 1, 2), Bits().clone(namedValues=NamedValues(("bitRateunSupport", 0), ("bitRateunCollected", 1), ("octetsunSupport", 2), ("octetsunCollected", 3), ("pktsunSupport", 4), ("pktsunCollected", 5), ("jitterunSupport", 6), ("jitterunCollected", 7), ("lostPktsunSupport", 8), ("lostPktsunCollected", 9), ("expectedPktsunSupport", 10), ("expectedPktsunCollected", 11), ("lostPktEventsunSupport", 12), ("lostPktEventsunCollected", 13), ("losspercentUnsupport", 14), ("losspercentUncollected", 15)))).setMaxAccess("readonly")
if mibBuilder.loadTexts: cMTRtpMetricsBitmaps.setStatus('current')
if mibBuilder.loadTexts: cMTRtpMetricsBitmaps.setDescription('This object indicates whether the corresponding instances of these statistics fields in the table are supported. It also indicates if the stats data are collected. There are 2 bits for each field.')
cMTRtpMetricsBitRate = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 2, 7, 1, 3), Gauge32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: cMTRtpMetricsBitRate.setStatus('current')
if mibBuilder.loadTexts: cMTRtpMetricsBitRate.setDescription('This object indicates the average bit rate at which the corresponding Mediatrace request is processing data for the corresponding traffic flow. This value is cumulative over the lifetime of the traffic flow.')
cMTRtpMetricsOctets = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 2, 7, 1, 4), Counter64()).setMaxAccess("readonly")
if mibBuilder.loadTexts: cMTRtpMetricsOctets.setStatus('current')
if mibBuilder.loadTexts: cMTRtpMetricsOctets.setDescription('This object indicates the total number of octets contained by the packets processed by the Mediatrace request for the corresponding traffic flow.')
cMTRtpMetricsPkts = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 2, 7, 1, 5), Counter64()).setUnits('packets').setMaxAccess("readonly")
if mibBuilder.loadTexts: cMTRtpMetricsPkts.setStatus('current')
if mibBuilder.loadTexts: cMTRtpMetricsPkts.setDescription('This object indicates the total number of packets processed by the corresponding Mediatrace request for the corresponding traffic flow.')
cMTRtpMetricsJitter = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 2, 7, 1, 6), FlowMetricValue()).setUnits('seconds').setMaxAccess("readonly")
if mibBuilder.loadTexts: cMTRtpMetricsJitter.setStatus('current')
if mibBuilder.loadTexts: cMTRtpMetricsJitter.setDescription('This object indicates the inter-arrival jitter for the traffic flow.')
cMTRtpMetricsLostPkts = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 2, 7, 1, 7), Counter64()).setUnits('packets').setMaxAccess("readonly")
if mibBuilder.loadTexts: cMTRtpMetricsLostPkts.setStatus('current')
if mibBuilder.loadTexts: cMTRtpMetricsLostPkts.setDescription('This object indicates the number of RTP packets lost for the traffic flow.')
cMTRtpMetricsExpectedPkts = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 2, 7, 1, 8), Counter64()).setUnits('packets').setMaxAccess("readonly")
if mibBuilder.loadTexts: cMTRtpMetricsExpectedPkts.setStatus('current')
if mibBuilder.loadTexts: cMTRtpMetricsExpectedPkts.setDescription('This object indicates the number of RTP packets expected for the traffic flow.')
cMTRtpMetricsLostPktEvents = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 2, 7, 1, 9), Counter64()).setUnits('packets').setMaxAccess("readonly")
if mibBuilder.loadTexts: cMTRtpMetricsLostPktEvents.setStatus('current')
if mibBuilder.loadTexts: cMTRtpMetricsLostPktEvents.setDescription('This object indicates the number of packet loss events observed by the Mediatrace request for the corresponding traffic flow.')
cMTRtpMetricsLossPercent = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 2, 7, 1, 10), Gauge32().subtype(subtypeSpec=ValueRangeConstraint(0, 100))).setMaxAccess("readonly")
if mibBuilder.loadTexts: cMTRtpMetricsLossPercent.setStatus('current')
if mibBuilder.loadTexts: cMTRtpMetricsLossPercent.setDescription('This object indicates the percentage of packages are lost per ten thousand packets in a traffic flow.')
cMTTcpMetricStatsTable = MibTable((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 2, 8), )
if mibBuilder.loadTexts: cMTTcpMetricStatsTable.setStatus('current')
if mibBuilder.loadTexts: cMTTcpMetricStatsTable.setDescription('This table contains aggregate data maintained by Mediatrace for traffic flows for which it is computing TCP metrics.')
cMTTcpMetricStatsEntry = MibTableRow((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 2, 8, 1), )
cMTCommonMetricStatsEntry.registerAugmentions(("CISCO-MEDIATRACE-MIB", "cMTTcpMetricStatsEntry"))
cMTTcpMetricStatsEntry.setIndexNames(*cMTCommonMetricStatsEntry.getIndexNames())
if mibBuilder.loadTexts: cMTTcpMetricStatsEntry.setStatus('current')
if mibBuilder.loadTexts: cMTTcpMetricStatsEntry.setDescription('An entry in cMTTcpMetricStatsTable represents TCP information of a hop on the path associated to a Mediatrace session such as byte count, round trip delay, etc. The devices creates a row in the cMTTcpMetricStatsTable when a Mediatrace session starts collecting a traffic metrics data and has been configured to compute TCP metrics for the same traffic metrics data. Likewise, the device destroys a row in the cMTTcpMetricStatsTable when the corresponding Mediatrace session has ceased collecting the traffic metrics data (e.g., when a scheduled session has timed out). A single row corresponds to TCP information of a hop on the path discovered for a Mediatrace session and is uniquely identified by cMTSessionNumber, cMTSessionLifeNumber, cMTBucketNumber,cMTHopStatsAddrType and cMTHopStatsAddr. The created rows are destroyed when the device undergoes a restart.')
cMTTcpMetricBitmaps = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 2, 8, 1, 2), Bits().clone(namedValues=NamedValues(("mediaByteCountUnsupport", 0), ("mediaByteCountUncollected", 1), ("connectRoundTripDelayUnsupport", 2), ("connectRoundTripDelayUncollected", 3), ("lostEventCountUnsupport", 4), ("lostEventCountUncollected", 5)))).setMaxAccess("readonly")
if mibBuilder.loadTexts: cMTTcpMetricBitmaps.setStatus('current')
if mibBuilder.loadTexts: cMTTcpMetricBitmaps.setDescription('This object indicates whether the corresponding instances of these stats fields in the table are supported. It also indicates if the stats data are collected. There are 2 bits for each field.')
cMTTcpMetricMediaByteCount = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 2, 8, 1, 3), FlowMetricValue()).setMaxAccess("readonly")
if mibBuilder.loadTexts: cMTTcpMetricMediaByteCount.setStatus('current')
if mibBuilder.loadTexts: cMTTcpMetricMediaByteCount.setDescription('This object indicates the number of bytes for the packets observed by the Mediatrace session for the corresponding flow.')
cMTTcpMetricConnectRoundTripDelay = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 2, 8, 1, 4), Counter64()).setMaxAccess("readonly")
if mibBuilder.loadTexts: cMTTcpMetricConnectRoundTripDelay.setStatus('current')
if mibBuilder.loadTexts: cMTTcpMetricConnectRoundTripDelay.setDescription('This object indicates the round trip time for the packets observed by the Mediatrace session for the corresponding flow. The round trip time is defined as the length of time it takes for a TCP segment transmission and receipt of acknowledgement. This object indicates the connect round trip delay.')
cMTTcpMetricLostEventCount = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 2, 8, 1, 5), Counter64()).setMaxAccess("readonly")
if mibBuilder.loadTexts: cMTTcpMetricLostEventCount.setStatus('current')
if mibBuilder.loadTexts: cMTTcpMetricLostEventCount.setDescription('This object indicates the number of packets lost for the traffic flow.')
cMTSystemMetricStatsTable = MibTable((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 2, 9), )
if mibBuilder.loadTexts: cMTSystemMetricStatsTable.setStatus('current')
if mibBuilder.loadTexts: cMTSystemMetricStatsTable.setDescription('A list of objects which accumulate the system metrics results of a particular node for that path.')
cMTSystemMetricStatsEntry = MibTableRow((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 2, 9, 1), ).setIndexNames((0, "CISCO-MEDIATRACE-MIB", "cMTSessionNumber"), (0, "CISCO-MEDIATRACE-MIB", "cMTSessionLifeNumber"), (0, "CISCO-MEDIATRACE-MIB", "cMTBucketNumber"), (0, "CISCO-MEDIATRACE-MIB", "cMTHopStatsAddrType"), (0, "CISCO-MEDIATRACE-MIB", "cMTHopStatsAddr"))
if mibBuilder.loadTexts: cMTSystemMetricStatsEntry.setStatus('current')
if mibBuilder.loadTexts: cMTSystemMetricStatsEntry.setDescription('An entry in cMTSystemMetricStatsTable represents CPU or memory utilization information of a hop on the path associated to a Mediatrace session such as five minutes CPU utilization, memory utilization, etc. The devices creates a row in the cMTSystemMetricStatsTable when a Mediatrace session starts collecting a system metrics data and has been configured to compute system metrics. Likewise, the device destroys a row in the cMTSystemMetricStatsTable when the corresponding Mediatrace session has ceased collecting the system metrics data (e.g., when a scheduled session has timed out). A single row corresponds to a CPU or memory utilization information of a hop on the path discovered for a Mediatrace session and is uniquely identified by cMTSessionNumber, cMTSessionLifeNumber, cMTBucketNumber,cMTHopStatsAddrType and cMTHopStatsAddr. The created rows are destroyed when the device undergoes a restart.')
cMTSystemMetricBitmaps = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 2, 9, 1, 1), Bits().clone(namedValues=NamedValues(("cpuOneMinuteUtilizationUnsupport", 0), ("cpuOneMinuteUtilizationUncollected", 1), ("cpuFiveMinutesUtilizationUnsupport", 2), ("cpuFiveMinutesUtilizationUncollected", 3), ("memoryMetricsUnsupport", 4), ("memoryMetricsUncollected", 5)))).setMaxAccess("readonly")
if mibBuilder.loadTexts: cMTSystemMetricBitmaps.setStatus('current')
if mibBuilder.loadTexts: cMTSystemMetricBitmaps.setDescription('This object indicates whether the corresponding instances of these stats fields in the table are supported. It also indicates if the stats data are collected. There are 2 bits for each field.')
cMTSystemMetricCpuOneMinuteUtilization = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 2, 9, 1, 2), Gauge32().subtype(subtypeSpec=ValueRangeConstraint(0, 100))).setMaxAccess("readonly")
if mibBuilder.loadTexts: cMTSystemMetricCpuOneMinuteUtilization.setStatus('current')
if mibBuilder.loadTexts: cMTSystemMetricCpuOneMinuteUtilization.setDescription('This object indicates the overall CPU busy percentage in the last 1 minute period for the network element')
cMTSystemMetricCpuFiveMinutesUtilization = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 2, 9, 1, 3), Gauge32().subtype(subtypeSpec=ValueRangeConstraint(0, 100))).setMaxAccess("readonly")
if mibBuilder.loadTexts: cMTSystemMetricCpuFiveMinutesUtilization.setStatus('current')
if mibBuilder.loadTexts: cMTSystemMetricCpuFiveMinutesUtilization.setDescription('This object indicates the overall CPU busy percentage in the last 5 minute period for the network element')
cMTSystemMetricMemoryUtilization = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 2, 9, 1, 4), Gauge32().subtype(subtypeSpec=ValueRangeConstraint(0, 100))).setMaxAccess("readonly")
if mibBuilder.loadTexts: cMTSystemMetricMemoryUtilization.setStatus('current')
if mibBuilder.loadTexts: cMTSystemMetricMemoryUtilization.setDescription('This object indicates the overall memory usage percentage for the node.')
cMTInterfaceMetricStatsTable = MibTable((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 2, 10), )
if mibBuilder.loadTexts: cMTInterfaceMetricStatsTable.setStatus('current')
if mibBuilder.loadTexts: cMTInterfaceMetricStatsTable.setDescription('This table contains aggregate data of interface information for the network nodes.')
cMTInterfaceMetricStatsEntry = MibTableRow((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 2, 10, 1), ).setIndexNames((0, "CISCO-MEDIATRACE-MIB", "cMTSessionNumber"), (0, "CISCO-MEDIATRACE-MIB", "cMTSessionLifeNumber"), (0, "CISCO-MEDIATRACE-MIB", "cMTBucketNumber"), (0, "CISCO-MEDIATRACE-MIB", "cMTHopStatsAddrType"), (0, "CISCO-MEDIATRACE-MIB", "cMTHopStatsAddr"))
if mibBuilder.loadTexts: cMTInterfaceMetricStatsEntry.setStatus('current')
if mibBuilder.loadTexts: cMTInterfaceMetricStatsEntry.setDescription('An entry in cMTInterfaceMetricStatsTable represents interface information of a hop on the path associated to a Mediatrace session such as ingress interface speed, egress interface speed, etc. The devices creates a row in the cMTInterfaceMetricStatsTable when a Mediatrace session starts collecting an interface metrics data and has been configured to compute interface metrics. Likewise, the device destroys a row in the cMTInterfaceMetricStatsTable when the corresponding Mediatrace session has ceased collecting the interface metrics data (e.g., when a scheduled session has timed out). A single row corresponds to a interface information of a hop on the path discovered for a session and is uniquely identified by cMTSessionNumber, cMTSessionLifeNumber, cMTBucketNumber, cMTHopStatsAddrType and cMTHopStatsAddr. The created rows are destroyed when the device undergoes a restart.')
cMTInterfaceBitmaps = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 2, 10, 1, 2), Bits().clone(namedValues=NamedValues(("inSpeedUnsupport", 0), ("inSpeedUncollected", 1), ("outSpeedUnsupport", 2), ("outSpeedUncollected", 3), ("outDiscardsUnsupport", 4), ("outDiscardsUncollected", 5), ("inDiscardsUnsupport", 6), ("inDiscardsUncollected", 7), ("outErrorsUnsupport", 8), ("outErrorsUncollected", 9), ("inErrorsUnsupport", 10), ("inErrorsUncollected", 11), ("outOctetsUnsupport", 12), ("outOctetsUncollected", 13), ("inOctetsUnsupport", 14), ("inOctetsUncollected", 15)))).setMaxAccess("readonly")
if mibBuilder.loadTexts: cMTInterfaceBitmaps.setStatus('current')
if mibBuilder.loadTexts: cMTInterfaceBitmaps.setDescription('This object indicates whether the corresponding instances of these stats fields in the table are supported. It also indicates if the stats data are collected. There are 2 bits for each field.')
cMTInterfaceOutSpeed = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 2, 10, 1, 3), Gauge32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: cMTInterfaceOutSpeed.setStatus('current')
if mibBuilder.loadTexts: cMTInterfaceOutSpeed.setDescription("This object indicates the egress interface's current bandwidth in bits per second. For interfaces which do not vary in bandwidth or for those where no accurate estimation can be made, this object should contain the nominal bandwidth. Currently bandwidth above the maximum value 4,294,967,295 is not supported and it will show the maximum for this condition.")
cMTInterfaceInSpeed = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 2, 10, 1, 4), Gauge32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: cMTInterfaceInSpeed.setStatus('current')
if mibBuilder.loadTexts: cMTInterfaceInSpeed.setDescription("This object indicates an estimate of the ingress interface's current bandwidth in bits per second. Currently bandwidth above the maximum value 4,294,967,295 is not supported and it will show the maximum for this condition.")
cMTInterfaceOutDiscards = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 2, 10, 1, 5), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: cMTInterfaceOutDiscards.setStatus('current')
if mibBuilder.loadTexts: cMTInterfaceOutDiscards.setDescription('This object indicates the number of outbound packets which were chosen to be discarded even though no errors had been detected to prevent their being transmitted. One possible reason for discarding such a packet could be to free up buffer space.')
cMTInterfaceInDiscards = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 2, 10, 1, 6), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: cMTInterfaceInDiscards.setStatus('current')
if mibBuilder.loadTexts: cMTInterfaceInDiscards.setDescription('This object indicates the number of inbound packets which were chosen to be discarded even though no errors had been detected to prevent their being deliverable to a higher-layer protocol. One possible reason for discarding such a packet could be to free up buffer space. Discontinuities in the value of this counter can occur at re-initialization of the management system, and at other times as indicated by the value of ifCounterDiscontinuityTime.')
cMTInterfaceOutErrors = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 2, 10, 1, 7), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: cMTInterfaceOutErrors.setStatus('current')
if mibBuilder.loadTexts: cMTInterfaceOutErrors.setDescription('This object indicates the error packet number. For packet-oriented interfaces, the number of outbound packets that could not be transmitted because of errors. For character-oriented or fixed-length interfaces, the number of outbound transmission units that could not be transmitted because of errors. Discontinuities in the value of this counter can occur at re-initialization of the management system, and at other times as indicated by the value of ifCounterDiscontinuityTime.')
cMTInterfaceInErrors = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 2, 10, 1, 8), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: cMTInterfaceInErrors.setStatus('current')
if mibBuilder.loadTexts: cMTInterfaceInErrors.setDescription('This object indicates the error packet number. For packet-oriented interfaces, the number of inbound packets that contained errors preventing them from being deliverable to a higher-layer protocol. For character-oriented or fixed-length interfaces, the number of inbound transmission units that contained errors preventing them from being deliverable to a higher-layer protocol. Discontinuities in the value of this counter can occur at re-initialization of the management system, and at other times as indicated by the value of ifCounterDiscontinuityTime.')
cMTInterfaceOutOctets = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 2, 10, 1, 9), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: cMTInterfaceOutOctets.setStatus('current')
if mibBuilder.loadTexts: cMTInterfaceOutOctets.setDescription('This object indicates the total number of octets transmitted out of the interface, including framing characters. Discontinuities in the value of this counter can occur at re-initialization of the management system, and at other times as indicated by the value of ifCounterDiscontinuityTime.')
cMTInterfaceInOctets = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 2, 10, 1, 10), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: cMTInterfaceInOctets.setStatus('current')
if mibBuilder.loadTexts: cMTInterfaceInOctets.setDescription('This object indicates the total number of octets received on the interface, including framing characters. Discontinuities in the value of this counter can occur at re-initialization of the management system, and at other times as indicated by the value of ifCounterDiscontinuityTime.')
ciscoMediatraceMIBCompliances = MibIdentifier((1, 3, 6, 1, 4, 1, 9, 9, 800, 2, 1))
ciscoMediatraceMIBGroups = MibIdentifier((1, 3, 6, 1, 4, 1, 9, 9, 800, 2, 2))
ciscoMediatraceMIBCompliance = ModuleCompliance((1, 3, 6, 1, 4, 1, 9, 9, 800, 2, 1, 1)).setObjects(("CISCO-MEDIATRACE-MIB", "ciscoMediatraceMIBMainObjectGroup"))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
ciscoMediatraceMIBCompliance = ciscoMediatraceMIBCompliance.setStatus('current')
if mibBuilder.loadTexts: ciscoMediatraceMIBCompliance.setDescription('This is a default module-compliance containing default object groups.')
ciscoMediatraceMIBMainObjectGroup = ObjectGroup((1, 3, 6, 1, 4, 1, 9, 9, 800, 2, 2, 1)).setObjects(("CISCO-MEDIATRACE-MIB", "cMTFlowSpecifierRowStatus"), ("CISCO-MEDIATRACE-MIB", "cMTFlowSpecifierDestAddrType"), ("CISCO-MEDIATRACE-MIB", "cMTFlowSpecifierDestAddr"), ("CISCO-MEDIATRACE-MIB", "cMTFlowSpecifierDestPort"), ("CISCO-MEDIATRACE-MIB", "cMTFlowSpecifierSourceAddrType"), ("CISCO-MEDIATRACE-MIB", "cMTFlowSpecifierSourceAddr"), ("CISCO-MEDIATRACE-MIB", "cMTFlowSpecifierSourcePort"), ("CISCO-MEDIATRACE-MIB", "cMTFlowSpecifierIpProtocol"), ("CISCO-MEDIATRACE-MIB", "cMTPathSpecifierRowStatus"), ("CISCO-MEDIATRACE-MIB", "cMTPathSpecifierDestAddrType"), ("CISCO-MEDIATRACE-MIB", "cMTPathSpecifierDestAddr"), ("CISCO-MEDIATRACE-MIB", "cMTPathSpecifierDestPort"), ("CISCO-MEDIATRACE-MIB", "cMTPathSpecifierSourceAddrType"), ("CISCO-MEDIATRACE-MIB", "cMTPathSpecifierSourceAddr"), ("CISCO-MEDIATRACE-MIB", "cMTPathSpecifierSourcePort"), ("CISCO-MEDIATRACE-MIB", "cMTPathSpecifierProtocolForDiscovery"), ("CISCO-MEDIATRACE-MIB", "cMTPathSpecifierGatewayAddrType"), ("CISCO-MEDIATRACE-MIB", "cMTPathSpecifierGatewayAddr"), ("CISCO-MEDIATRACE-MIB", "cMTPathSpecifierGatewayVlanId"), ("CISCO-MEDIATRACE-MIB", "cMTPathSpecifierIpProtocol"), ("CISCO-MEDIATRACE-MIB", "cMTSessionParamsResponseTimeout"), ("CISCO-MEDIATRACE-MIB", "cMTSessionParamsFrequency"), ("CISCO-MEDIATRACE-MIB", "cMTSessionParamsHistoryBuckets"), ("CISCO-MEDIATRACE-MIB", "cMTSessionParamsInactivityTimeout"), ("CISCO-MEDIATRACE-MIB", "cMTSessionParamsRouteChangeReactiontime"), ("CISCO-MEDIATRACE-MIB", "cMTSessionParamsRowStatus"), ("CISCO-MEDIATRACE-MIB", "cMTSessionPathSpecifierName"), ("CISCO-MEDIATRACE-MIB", "cMTMediaMonitorProfileRtpMaxDropout"), ("CISCO-MEDIATRACE-MIB", "cMTMediaMonitorProfileRtpMaxReorder"), ("CISCO-MEDIATRACE-MIB", "cMTMediaMonitorProfileRtpMinimalSequential"), ("CISCO-MEDIATRACE-MIB", "cMTMediaMonitorProfileInterval"), ("CISCO-MEDIATRACE-MIB", "cMTMediaMonitorProfileRowStatus"), ("CISCO-MEDIATRACE-MIB", "cMTSessionFlowSpecifierName"), ("CISCO-MEDIATRACE-MIB", "cMTSessionParamName"), ("CISCO-MEDIATRACE-MIB", "cMTSessionProfileName"), ("CISCO-MEDIATRACE-MIB", "cMTSessionRequestStatsRouteIndex"), ("CISCO-MEDIATRACE-MIB", "cMTSessionRequestStatsTracerouteStatus"), ("CISCO-MEDIATRACE-MIB", "cMTSessionRowStatus"), ("CISCO-MEDIATRACE-MIB", "cMTScheduleLife"), ("CISCO-MEDIATRACE-MIB", "cMTScheduleStartTime"), ("CISCO-MEDIATRACE-MIB", "cMTScheduleEntryAgeout"), ("CISCO-MEDIATRACE-MIB", "cMTScheduleRowStatus"), ("CISCO-MEDIATRACE-MIB", "cMTSystemProfileMetric"), ("CISCO-MEDIATRACE-MIB", "cMTSystemProfileRowStatus"), ("CISCO-MEDIATRACE-MIB", "cMTHopStatsMediatraceTtl"), ("CISCO-MEDIATRACE-MIB", "cMTHopStatsName"), ("CISCO-MEDIATRACE-MIB", "cMTHopStatsCollectionStatus"), ("CISCO-MEDIATRACE-MIB", "cMTHopStatsIngressInterface"), ("CISCO-MEDIATRACE-MIB", "cMTHopStatsEgressInterface"), ("CISCO-MEDIATRACE-MIB", "cMTPathHopType"), ("CISCO-MEDIATRACE-MIB", "cMTPathHopAddrType"), ("CISCO-MEDIATRACE-MIB", "cMTPathHopAddr"), ("CISCO-MEDIATRACE-MIB", "cMTPathHopAlternate1AddrType"), ("CISCO-MEDIATRACE-MIB", "cMTPathHopAlternate1Addr"), ("CISCO-MEDIATRACE-MIB", "cMTPathHopAlternate2AddrType"), ("CISCO-MEDIATRACE-MIB", "cMTPathHopAlternate2Addr"), ("CISCO-MEDIATRACE-MIB", "cMTPathHopAlternate3AddrType"), ("CISCO-MEDIATRACE-MIB", "cMTPathHopAlternate3Addr"), ("CISCO-MEDIATRACE-MIB", "cMTTraceRouteHopNumber"), ("CISCO-MEDIATRACE-MIB", "cMTTraceRouteHopRtt"), ("CISCO-MEDIATRACE-MIB", "cMTSessionRequestStatsRequestTimestamp"), ("CISCO-MEDIATRACE-MIB", "cMTSessionRequestStatsRequestStatus"), ("CISCO-MEDIATRACE-MIB", "cMTSessionRequestStatsNumberOfMediatraceHops"), ("CISCO-MEDIATRACE-MIB", "cMTSessionRequestStatsNumberOfValidHops"), ("CISCO-MEDIATRACE-MIB", "cMTSessionRequestStatsNumberOfErrorHops"), ("CISCO-MEDIATRACE-MIB", "cMTSessionRequestStatsNumberOfNoDataRecordHops"), ("CISCO-MEDIATRACE-MIB", "cMTSessionRequestStatsNumberOfNonMediatraceHops"), ("CISCO-MEDIATRACE-MIB", "cMTCommonMetricsIpPktDropped"), ("CISCO-MEDIATRACE-MIB", "cMTCommonMetricsIpOctets"), ("CISCO-MEDIATRACE-MIB", "cMTCommonMetricsIpPktCount"), ("CISCO-MEDIATRACE-MIB", "cMTCommonMetricsIpByteRate"), ("CISCO-MEDIATRACE-MIB", "cMTCommonMetricsIpDscp"), ("CISCO-MEDIATRACE-MIB", "cMTCommonMetricsIpTtl"), ("CISCO-MEDIATRACE-MIB", "cMTCommonMetricsFlowCounter"), ("CISCO-MEDIATRACE-MIB", "cMTCommonMetricsFlowDirection"), ("CISCO-MEDIATRACE-MIB", "cMTCommonMetricsLossMeasurement"), ("CISCO-MEDIATRACE-MIB", "cMTCommonMetricsMediaStopOccurred"), ("CISCO-MEDIATRACE-MIB", "cMTCommonMetricsRouteForward"), ("CISCO-MEDIATRACE-MIB", "cMTCommonMetricsIpProtocol"), ("CISCO-MEDIATRACE-MIB", "cMTRtpMetricsBitRate"), ("CISCO-MEDIATRACE-MIB", "cMTRtpMetricsOctets"), ("CISCO-MEDIATRACE-MIB", "cMTRtpMetricsPkts"), ("CISCO-MEDIATRACE-MIB", "cMTRtpMetricsJitter"), ("CISCO-MEDIATRACE-MIB", "cMTRtpMetricsLostPkts"), ("CISCO-MEDIATRACE-MIB", "cMTRtpMetricsExpectedPkts"), ("CISCO-MEDIATRACE-MIB", "cMTRtpMetricsLostPktEvents"), ("CISCO-MEDIATRACE-MIB", "cMTRtpMetricsLossPercent"), ("CISCO-MEDIATRACE-MIB", "cMTTcpMetricMediaByteCount"), ("CISCO-MEDIATRACE-MIB", "cMTTcpMetricConnectRoundTripDelay"), ("CISCO-MEDIATRACE-MIB", "cMTTcpMetricLostEventCount"), ("CISCO-MEDIATRACE-MIB", "cMTSystemMetricCpuOneMinuteUtilization"), ("CISCO-MEDIATRACE-MIB", "cMTSystemMetricCpuFiveMinutesUtilization"), ("CISCO-MEDIATRACE-MIB", "cMTSystemMetricMemoryUtilization"), ("CISCO-MEDIATRACE-MIB", "cMTInterfaceOutSpeed"), ("CISCO-MEDIATRACE-MIB", "cMTInterfaceInSpeed"), ("CISCO-MEDIATRACE-MIB", "cMTInterfaceOutDiscards"), ("CISCO-MEDIATRACE-MIB", "cMTInterfaceInDiscards"), ("CISCO-MEDIATRACE-MIB", "cMTInterfaceOutErrors"), ("CISCO-MEDIATRACE-MIB", "cMTInterfaceInErrors"), ("CISCO-MEDIATRACE-MIB", "cMTInterfaceOutOctets"), ("CISCO-MEDIATRACE-MIB", "cMTInterfaceInOctets"), ("CISCO-MEDIATRACE-MIB", "cMTMediaMonitorProfileMetric"), ("CISCO-MEDIATRACE-MIB", "cMTSessionTraceRouteEnabled"), ("CISCO-MEDIATRACE-MIB", "cMTScheduleRecurring"), ("CISCO-MEDIATRACE-MIB", "cMTFlowSpecifierMetadataGlobalId"), ("CISCO-MEDIATRACE-MIB", "cMTPathSpecifierMetadataGlobalId"), ("CISCO-MEDIATRACE-MIB", "cMTHopStatsMaskBitmaps"), ("CISCO-MEDIATRACE-MIB", "cMTSessionStatusBitmaps"), ("CISCO-MEDIATRACE-MIB", "cMTCommonMetricsBitmaps"), ("CISCO-MEDIATRACE-MIB", "cMTRtpMetricsBitmaps"), ("CISCO-MEDIATRACE-MIB", "cMTTcpMetricBitmaps"), ("CISCO-MEDIATRACE-MIB", "cMTSystemMetricBitmaps"), ("CISCO-MEDIATRACE-MIB", "cMTInterfaceBitmaps"), ("CISCO-MEDIATRACE-MIB", "cMTSessionStatusOperationState"), ("CISCO-MEDIATRACE-MIB", "cMTSessionStatusOperationTimeToLive"), ("CISCO-MEDIATRACE-MIB", "cMTSessionStatusGlobalSessionId"), ("CISCO-MEDIATRACE-MIB", "cMTSessionRequestStatsBitmaps"), ("CISCO-MEDIATRACE-MIB", "cMTSessionRequestStatsMDGlobalId"), ("CISCO-MEDIATRACE-MIB", "cMTSessionRequestStatsMDMultiPartySessionId"), ("CISCO-MEDIATRACE-MIB", "cMTSessionRequestStatsMDAppName"), ("CISCO-MEDIATRACE-MIB", "cMTInitiatorEnable"), ("CISCO-MEDIATRACE-MIB", "cMTInitiatorSourceInterface"), ("CISCO-MEDIATRACE-MIB", "cMTInitiatorSourceAddressType"), ("CISCO-MEDIATRACE-MIB", "cMTInitiatorSourceAddress"), ("CISCO-MEDIATRACE-MIB", "cMTInitiatorMaxSessions"), ("CISCO-MEDIATRACE-MIB", "cMTInitiatorSoftwareVersionMajor"), ("CISCO-MEDIATRACE-MIB", "cMTInitiatorProtocolVersionMajor"), ("CISCO-MEDIATRACE-MIB", "cMTInitiatorConfiguredSessions"), ("CISCO-MEDIATRACE-MIB", "cMTInitiatorPendingSessions"), ("CISCO-MEDIATRACE-MIB", "cMTInitiatorInactiveSessions"), ("CISCO-MEDIATRACE-MIB", "cMTInitiatorActiveSessions"), ("CISCO-MEDIATRACE-MIB", "cMTResponderEnable"), ("CISCO-MEDIATRACE-MIB", "cMTResponderMaxSessions"), ("CISCO-MEDIATRACE-MIB", "cMTResponderActiveSessions"), ("CISCO-MEDIATRACE-MIB", "cMTInitiatorSoftwareVersionMinor"), ("CISCO-MEDIATRACE-MIB", "cMTInitiatorProtocolVersionMinor"), ("CISCO-MEDIATRACE-MIB", "cMTCommonMetricsFlowSamplingStartTime"))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
ciscoMediatraceMIBMainObjectGroup = ciscoMediatraceMIBMainObjectGroup.setStatus('current')
if mibBuilder.loadTexts: ciscoMediatraceMIBMainObjectGroup.setDescription('The is a object group.')
mibBuilder.exportSymbols("CISCO-MEDIATRACE-MIB", cMTResponderActiveSessions=cMTResponderActiveSessions, cMTFlowSpecifierSourcePort=cMTFlowSpecifierSourcePort, cMTSessionRequestStatsNumberOfNoDataRecordHops=cMTSessionRequestStatsNumberOfNoDataRecordHops, cMTRtpMetricStatsTable=cMTRtpMetricStatsTable, cMTRtpMetricsLossPercent=cMTRtpMetricsLossPercent, cMTPathHopAddrType=cMTPathHopAddrType, cMTSessionStatusGlobalSessionId=cMTSessionStatusGlobalSessionId, cMTInitiatorActiveSessions=cMTInitiatorActiveSessions, cMTSessionRequestStatsNumberOfNonMediatraceHops=cMTSessionRequestStatsNumberOfNonMediatraceHops, cMTSessionParamsHistoryBuckets=cMTSessionParamsHistoryBuckets, cMTHopStatsEgressInterface=cMTHopStatsEgressInterface, cMTMediaMonitorProfileName=cMTMediaMonitorProfileName, cMTPathHopAlternate1Addr=cMTPathHopAlternate1Addr, cMTHopStatsEntry=cMTHopStatsEntry, cMTPathSpecifierEntry=cMTPathSpecifierEntry, cMTTraceRouteEntry=cMTTraceRouteEntry, cMTSessionFlowSpecifierName=cMTSessionFlowSpecifierName, cMTSessionStatusBitmaps=cMTSessionStatusBitmaps, cMTInitiatorSourceAddressType=cMTInitiatorSourceAddressType, cMTRtpMetricsBitRate=cMTRtpMetricsBitRate, cMTSessionRequestStatsMDGlobalId=cMTSessionRequestStatsMDGlobalId, cMTInterfaceOutSpeed=cMTInterfaceOutSpeed, cMTFlowSpecifierRowStatus=cMTFlowSpecifierRowStatus, cMTSystemProfileEntry=cMTSystemProfileEntry, cMTInitiatorSourceAddress=cMTInitiatorSourceAddress, cMTSessionParamsEntry=cMTSessionParamsEntry, cMTSessionParamsFrequency=cMTSessionParamsFrequency, cMTInitiatorProtocolVersionMinor=cMTInitiatorProtocolVersionMinor, CiscoNTPTimeStamp=CiscoNTPTimeStamp, cMTSystemMetricBitmaps=cMTSystemMetricBitmaps, cMTTcpMetricMediaByteCount=cMTTcpMetricMediaByteCount, cMTSessionRequestStatsRequestStatus=cMTSessionRequestStatsRequestStatus, cMTRtpMetricsBitmaps=cMTRtpMetricsBitmaps, ciscoMediatraceMIB=ciscoMediatraceMIB, cMTInterfaceInSpeed=cMTInterfaceInSpeed, cMTInitiatorConfiguredSessions=cMTInitiatorConfiguredSessions, cMTHopStatsMediatraceTtl=cMTHopStatsMediatraceTtl, cMTPathSpecifierDestPort=cMTPathSpecifierDestPort, cMTHopStatsCollectionStatus=cMTHopStatsCollectionStatus, cMTSessionParamsResponseTimeout=cMTSessionParamsResponseTimeout, ciscoMediatraceMIBNotifs=ciscoMediatraceMIBNotifs, cMTTcpMetricStatsEntry=cMTTcpMetricStatsEntry, cMTInterfaceMetricStatsTable=cMTInterfaceMetricStatsTable, cMTSessionParamName=cMTSessionParamName, cMTSessionLifeNumber=cMTSessionLifeNumber, cMTScheduleLife=cMTScheduleLife, cMTTcpMetricStatsTable=cMTTcpMetricStatsTable, cMTBucketNumber=cMTBucketNumber, cMTResponderMaxSessions=cMTResponderMaxSessions, cMTScheduleTable=cMTScheduleTable, cMTSessionRequestStatsRequestTimestamp=cMTSessionRequestStatsRequestTimestamp, cMTPathTable=cMTPathTable, cMTRtpMetricsLostPkts=cMTRtpMetricsLostPkts, ciscoMediatraceMIBGroups=ciscoMediatraceMIBGroups, cMTFlowSpecifierDestAddrType=cMTFlowSpecifierDestAddrType, cMTCommonMetricsMediaStopOccurred=cMTCommonMetricsMediaStopOccurred, cMTCommonMetricStatsTable=cMTCommonMetricStatsTable, cMTPathEntry=cMTPathEntry, cMTInitiatorMaxSessions=cMTInitiatorMaxSessions, cMTInterfaceInOctets=cMTInterfaceInOctets, cMTFlowSpecifierTable=cMTFlowSpecifierTable, cMTHopStatsMaskBitmaps=cMTHopStatsMaskBitmaps, cMTSessionRequestStatsMDAppName=cMTSessionRequestStatsMDAppName, cMTSessionPathSpecifierName=cMTSessionPathSpecifierName, cMTMediaMonitorProfileRowStatus=cMTMediaMonitorProfileRowStatus, cMTPathSpecifierProtocolForDiscovery=cMTPathSpecifierProtocolForDiscovery, cMTCtrl=cMTCtrl, cMTFlowSpecifierEntry=cMTFlowSpecifierEntry, cMTCommonMetricsBitmaps=cMTCommonMetricsBitmaps, cMTInitiatorPendingSessions=cMTInitiatorPendingSessions, cMTSystemProfileTable=cMTSystemProfileTable, CiscoMediatraceDiscoveryProtocol=CiscoMediatraceDiscoveryProtocol, cMTFlowSpecifierName=cMTFlowSpecifierName, cMTCommonMetricsIpOctets=cMTCommonMetricsIpOctets, cMTSystemProfileMetric=cMTSystemProfileMetric, cMTHopStatsIngressInterface=cMTHopStatsIngressInterface, cMTHopStatsAddr=cMTHopStatsAddr, cMTPathSpecifierGatewayAddrType=cMTPathSpecifierGatewayAddrType, CiscoMediatraceSupportProtocol=CiscoMediatraceSupportProtocol, cMTPathSpecifierIpProtocol=cMTPathSpecifierIpProtocol, cMTSessionRowStatus=cMTSessionRowStatus, cMTFlowSpecifierIpProtocol=cMTFlowSpecifierIpProtocol, cMTTcpMetricBitmaps=cMTTcpMetricBitmaps, cMTSystemMetricCpuFiveMinutesUtilization=cMTSystemMetricCpuFiveMinutesUtilization, cMTSessionNumber=cMTSessionNumber, cMTPathSpecifierSourceAddrType=cMTPathSpecifierSourceAddrType, cMTInitiatorSoftwareVersionMajor=cMTInitiatorSoftwareVersionMajor, cMTSessionRequestStatsNumberOfErrorHops=cMTSessionRequestStatsNumberOfErrorHops, cMTMediaMonitorProfileRtpMaxReorder=cMTMediaMonitorProfileRtpMaxReorder, cMTSessionParamsRowStatus=cMTSessionParamsRowStatus, cMTHopStatsAddrType=cMTHopStatsAddrType, cMTMediaMonitorProfileEntry=cMTMediaMonitorProfileEntry, cMTInterfaceOutDiscards=cMTInterfaceOutDiscards, cMTSessionParamsRouteChangeReactiontime=cMTSessionParamsRouteChangeReactiontime, cMTRtpMetricsPkts=cMTRtpMetricsPkts, cMTSessionParamsName=cMTSessionParamsName, cMTResponderEnable=cMTResponderEnable, cMTSessionTable=cMTSessionTable, cMTTraceRouteHopNumber=cMTTraceRouteHopNumber, cMTPathSpecifierDestAddr=cMTPathSpecifierDestAddr, cMTInitiatorProtocolVersionMajor=cMTInitiatorProtocolVersionMajor, cMTPathHopAddr=cMTPathHopAddr, cMTSessionStatusTable=cMTSessionStatusTable, cMTSystemMetricStatsTable=cMTSystemMetricStatsTable, cMTInterfaceMetricStatsEntry=cMTInterfaceMetricStatsEntry, cMTTraceRouteHopRtt=cMTTraceRouteHopRtt, cMTSessionRequestStatsNumberOfMediatraceHops=cMTSessionRequestStatsNumberOfMediatraceHops, cMTSessionParamsInactivityTimeout=cMTSessionParamsInactivityTimeout, cMTSystemProfileRowStatus=cMTSystemProfileRowStatus, cMTFlowSpecifierSourceAddrType=cMTFlowSpecifierSourceAddrType, cMTPathHopNumber=cMTPathHopNumber, cMTSessionRequestStatsNumberOfValidHops=cMTSessionRequestStatsNumberOfValidHops, cMTScheduleRowStatus=cMTScheduleRowStatus, cMTCommonMetricsIpTtl=cMTCommonMetricsIpTtl, cMTSessionTraceRouteEnabled=cMTSessionTraceRouteEnabled, cMTSessionRequestStatsTracerouteStatus=cMTSessionRequestStatsTracerouteStatus, cMTRtpMetricsOctets=cMTRtpMetricsOctets, cMTSystemMetricCpuOneMinuteUtilization=cMTSystemMetricCpuOneMinuteUtilization, cMTSessionStatusOperationState=cMTSessionStatusOperationState, ciscoMediatraceMIBCompliances=ciscoMediatraceMIBCompliances, cMTPathSpecifierRowStatus=cMTPathSpecifierRowStatus, cMTCommonMetricsIpPktCount=cMTCommonMetricsIpPktCount, cMTPathSpecifierGatewayAddr=cMTPathSpecifierGatewayAddr, cMTInterfaceBitmaps=cMTInterfaceBitmaps, cMTFlowSpecifierMetadataGlobalId=cMTFlowSpecifierMetadataGlobalId, cMTPathHopAlternate2AddrType=cMTPathHopAlternate2AddrType, cMTSessionRequestStatsRouteIndex=cMTSessionRequestStatsRouteIndex, cMTPathSpecifierName=cMTPathSpecifierName, cMTTcpMetricConnectRoundTripDelay=cMTTcpMetricConnectRoundTripDelay, cMTCommonMetricsRouteForward=cMTCommonMetricsRouteForward, cMTSessionRequestStatsTable=cMTSessionRequestStatsTable, cMTSystemMetricStatsEntry=cMTSystemMetricStatsEntry, cMTPathHopAlternate3Addr=cMTPathHopAlternate3Addr, cMTPathHopAlternate1AddrType=cMTPathHopAlternate1AddrType, cMTCommonMetricsIpDscp=cMTCommonMetricsIpDscp, ciscoMediatraceMIBObjects=ciscoMediatraceMIBObjects, cMTPathSpecifierGatewayVlanId=cMTPathSpecifierGatewayVlanId, cMTTraceRouteTable=cMTTraceRouteTable, cMTPathSpecifierMetadataGlobalId=cMTPathSpecifierMetadataGlobalId, cMTPathSpecifierDestAddrType=cMTPathSpecifierDestAddrType, cMTSessionRequestStatsMDMultiPartySessionId=cMTSessionRequestStatsMDMultiPartySessionId, cMTPathHopType=cMTPathHopType, cMTPathHopAlternate3AddrType=cMTPathHopAlternate3AddrType, cMTMediaMonitorProfileMetric=cMTMediaMonitorProfileMetric, cMTPathSpecifierTable=cMTPathSpecifierTable, cMTStats=cMTStats, cMTSessionStatusEntry=cMTSessionStatusEntry, cMTPathSpecifierSourcePort=cMTPathSpecifierSourcePort, cMTSessionRequestStatsEntry=cMTSessionRequestStatsEntry, ciscoMediatraceMIBMainObjectGroup=ciscoMediatraceMIBMainObjectGroup, cMTCommonMetricsFlowCounter=cMTCommonMetricsFlowCounter, cMTHopStatsName=cMTHopStatsName, cMTSystemMetricMemoryUtilization=cMTSystemMetricMemoryUtilization, cMTFlowSpecifierSourceAddr=cMTFlowSpecifierSourceAddr, PYSNMP_MODULE_ID=ciscoMediatraceMIB, cMTMediaMonitorProfileTable=cMTMediaMonitorProfileTable, ciscoMediatraceMIBConform=ciscoMediatraceMIBConform, cMTMediaMonitorProfileInterval=cMTMediaMonitorProfileInterval, cMTCommonMetricStatsEntry=cMTCommonMetricStatsEntry, cMTRtpMetricsExpectedPkts=cMTRtpMetricsExpectedPkts, cMTFlowSpecifierDestAddr=cMTFlowSpecifierDestAddr, cMTCommonMetricsFlowSamplingStartTime=cMTCommonMetricsFlowSamplingStartTime, cMTInitiatorSoftwareVersionMinor=cMTInitiatorSoftwareVersionMinor, cMTPathHopAlternate2Addr=cMTPathHopAlternate2Addr, cMTSessionProfileName=cMTSessionProfileName, cMTCommonMetricsIpProtocol=cMTCommonMetricsIpProtocol, cMTFlowSpecifierDestPort=cMTFlowSpecifierDestPort, cMTPathSpecifierSourceAddr=cMTPathSpecifierSourceAddr, cMTCommonMetricsFlowDirection=cMTCommonMetricsFlowDirection, cMTSessionStatusOperationTimeToLive=cMTSessionStatusOperationTimeToLive, cMTSessionRequestStatsBitmaps=cMTSessionRequestStatsBitmaps, cMTInterfaceInErrors=cMTInterfaceInErrors, cMTHopStatsTable=cMTHopStatsTable, cMTInterfaceInDiscards=cMTInterfaceInDiscards, cMTScheduleRecurring=cMTScheduleRecurring, cMTSessionParamsTable=cMTSessionParamsTable, cMTCommonMetricsIpByteRate=cMTCommonMetricsIpByteRate, cMTInitiatorInactiveSessions=cMTInitiatorInactiveSessions, cMTSystemProfileName=cMTSystemProfileName, cMTInterfaceOutOctets=cMTInterfaceOutOctets, cMTScheduleEntryAgeout=cMTScheduleEntryAgeout, cMTCommonMetricsLossMeasurement=cMTCommonMetricsLossMeasurement, cMTRtpMetricsJitter=cMTRtpMetricsJitter, cMTInterfaceOutErrors=cMTInterfaceOutErrors, cMTRtpMetricStatsEntry=cMTRtpMetricStatsEntry, cMTScheduleEntry=cMTScheduleEntry, cMTInitiatorSourceInterface=cMTInitiatorSourceInterface, cMTTcpMetricLostEventCount=cMTTcpMetricLostEventCount, cMTSessionEntry=cMTSessionEntry, cMTMediaMonitorProfileRtpMaxDropout=cMTMediaMonitorProfileRtpMaxDropout, ciscoMediatraceMIBCompliance=ciscoMediatraceMIBCompliance, cMTMediaMonitorProfileRtpMinimalSequential=cMTMediaMonitorProfileRtpMinimalSequential, cMTInitiatorEnable=cMTInitiatorEnable, cMTScheduleStartTime=cMTScheduleStartTime, cMTCommonMetricsIpPktDropped=cMTCommonMetricsIpPktDropped, cMTRtpMetricsLostPktEvents=cMTRtpMetricsLostPktEvents)
| (integer, octet_string, object_identifier) = mibBuilder.importSymbols('ASN1', 'Integer', 'OctetString', 'ObjectIdentifier')
(named_values,) = mibBuilder.importSymbols('ASN1-ENUMERATION', 'NamedValues')
(value_range_constraint, constraints_intersection, constraints_union, single_value_constraint, value_size_constraint) = mibBuilder.importSymbols('ASN1-REFINEMENT', 'ValueRangeConstraint', 'ConstraintsIntersection', 'ConstraintsUnion', 'SingleValueConstraint', 'ValueSizeConstraint')
(flow_metric_value,) = mibBuilder.importSymbols('CISCO-FLOW-MONITOR-TC-MIB', 'FlowMetricValue')
(cisco_mgmt,) = mibBuilder.importSymbols('CISCO-SMI', 'ciscoMgmt')
(interface_index_or_zero,) = mibBuilder.importSymbols('IF-MIB', 'InterfaceIndexOrZero')
(inet_port_number, inet_address, inet_address_type) = mibBuilder.importSymbols('INET-ADDRESS-MIB', 'InetPortNumber', 'InetAddress', 'InetAddressType')
(vlan_id,) = mibBuilder.importSymbols('Q-BRIDGE-MIB', 'VlanId')
(snmp_admin_string,) = mibBuilder.importSymbols('SNMP-FRAMEWORK-MIB', 'SnmpAdminString')
(module_compliance, notification_group, object_group) = mibBuilder.importSymbols('SNMPv2-CONF', 'ModuleCompliance', 'NotificationGroup', 'ObjectGroup')
(counter32, mib_scalar, mib_table, mib_table_row, mib_table_column, ip_address, mib_identifier, counter64, module_identity, gauge32, iso, bits, integer32, notification_type, unsigned32, object_identity, time_ticks) = mibBuilder.importSymbols('SNMPv2-SMI', 'Counter32', 'MibScalar', 'MibTable', 'MibTableRow', 'MibTableColumn', 'IpAddress', 'MibIdentifier', 'Counter64', 'ModuleIdentity', 'Gauge32', 'iso', 'Bits', 'Integer32', 'NotificationType', 'Unsigned32', 'ObjectIdentity', 'TimeTicks')
(truth_value, time_stamp, display_string, row_status, textual_convention) = mibBuilder.importSymbols('SNMPv2-TC', 'TruthValue', 'TimeStamp', 'DisplayString', 'RowStatus', 'TextualConvention')
cisco_mediatrace_mib = module_identity((1, 3, 6, 1, 4, 1, 9, 9, 800))
ciscoMediatraceMIB.setRevisions(('2012-08-23 00:00',))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
if mibBuilder.loadTexts:
ciscoMediatraceMIB.setRevisionsDescriptions(('Initial version of this MIB module.',))
if mibBuilder.loadTexts:
ciscoMediatraceMIB.setLastUpdated('201208230000Z')
if mibBuilder.loadTexts:
ciscoMediatraceMIB.setOrganization('Cisco Systems, Inc.')
if mibBuilder.loadTexts:
ciscoMediatraceMIB.setContactInfo('Cisco Systems Customer Service Postal: 170 W Tasman Drive San Jose, CA 95134 USA Tel: +1 800 553-NETS E-mail: cs-mediatrace@cisco.com')
if mibBuilder.loadTexts:
ciscoMediatraceMIB.setDescription("Mediatrace helps to isolate and troubleshoot network degradation problems by enabling a network administrator to discover an Internet Protocol (IP) flow's path, dynamically enable monitoring capabilities on the nodes along the path, and collect information on a hop-by-hop basis. This information includes, among other things, flow statistics, and utilization information for incoming and outgoing interfaces, CPUs, and memory, as well as any changes to IP routes. This information can be retrieved by configuring Cisco Mediatrace to start a recurring monitoring session at a specific time and on specific days. The session can be configured to specify which metrics to collect, and how frequently they are collected. The hops along the path are automatically discovered as part of the operation. This module defines a MIB for the features of configuring Mediatrace sessions and obtain statistics data for a particular hop at a specific time. INITIATOR/RESPONDER ==================== At the top level, this MIB module describes the initiator and responder roles for the device. The scalar objects corresponding to each role are used to enable and set parameters like maximum sessions supported, IP address used for enabling the initiator,etc. Some of the scalar objects are used to obtain information about a particular role for the device. At a time the device supports a single initiator and/or single responder. The following scalar objects are used for enabling the initiator, +---------> cMTInitiatorEnable +---------> cMTInitiatorSourceInterface +---------> cMTInitiatorSourceAddressType +---------> cMTInitiatorSourceAddress +---------> cMTInitiatorMaxSessions In addition to the above objects, the following objects are used for obtaining information about the initiator role on the device, +---------> cMTInitiatorSoftwareVersionMajor +---------> cMTInitiatorSoftwareVersionMinor +---------> cMTInitiatorProtocolVersionMajor +---------> cMTInitiatorProtocolVersionMinor +---------> cMTInitiatorConfiguredSessions +---------> cMTInitiatorPendingSessions +---------> cMTInitiatorInactiveSessions +---------> cMTInitiatorActiveSessions The following scalar objects are used for enabling the responder, +---------> cMTResponderEnable +---------> cMTResponderMaxSessions In addition to the above objects, the following object is used for obtaining information about the responder role on the device, +---------> cMTResponderActiveSessions CONTROL TABLES =============== At the next level, this MIB module describes the entities - path specifier, flow specifier, session params and profile. This section also includes the session and scheduling entities. Each row in the cMTSessionTable corresponds to a single session. The session is a container and hence the path specifier, flow specifier, session params and profile objects for each session point to the corresponding entities in the cMTPathSpecifierTable, cMTFlowSpecifierTable, cMTSessionParamsTable, cMTMediaMonitorProfileTable and cMTSystemProfileTable tables. o cMTPathSpecifierTable - describes path specifiers. o cMTFlowSpecifierTable - describes flow specifiers. o cMTSessionParamsTable - describes session params entities. o cMTMediaMonitorProfileTable - describes media monitor profile. o cMTSystemProfileTable - describes system profiles. The cMTSessionTable has a sparse dependent relationship with each of these tables, as there exist situations when data from those tables may not be used for a particular session, including : 1) The session using system profile does not need flow specifier. 2) The session using media monitor profile may not need optional flow specifier. 3) The session may only use one of the two profiles, system or media monitor. o cMTSessionTable - describes sessions. o cMTScheduleTable - describes scheduling entities for the sessions. The cMTScheduleTable has sparse dependent relationship on the cMTSessionTable, as there exist situations when the a session is not available for scheduling, including - a session is created but is not yet scheduled. +----------------------+ | cMTPathSpecifierTable| | | +-----------------------------+ | cMTPathSpecifierName = ps1 | +-----------------------------+ | | +-----------------------------+ | cMTPathSpecifierName = ps2 | +-----------------------------+ : : : : +-----------------------------+ | cMTPathSpecifierName = ps6 | +-----------------------------+ | | +----------------------+ +----------------------+ | cMTFlowSpecifierTable| | | +-----------------------------+ | cMTFlowSpecifierName = fs1 | +-----------------------------+ | | +-----------------------------+ | cMTFlowSpecifierName = fs2 | +-----------------------------+ : : : : +-----------------------------+ | cMTFlowSpecifierName = fs6 | +-----------------------------+ | | +----------------------+ +-------------------------+ +----------------------+ | cMTSessionTable | | cMTSessionParamsTable| | | | | +-------------------------------------+ +--------------------------+ | cMTSessionNumber = 1 | |cMTSessionParamsName = sp1| | +---------------------------------+ | +--------------------------+ | |cMTSessionPathSpecifierName = ps1| | | | | +---------------------------------+ | +--------------------------+ | | |cMTSessionParamsName = sp2| | +---------------------------------+ | +--------------------------+ | |cMTSessionParamName = sp1 | | : : | +---------------------------------+ | : : | | +--------------------------+ | +---------------------------------+ | |cMTSessionParamsName = sp5| | |cMTSessionProfileName = rtp1 | | +--------------------------+ | +---------------------------------+ | | | | | +-----------------------+ | +---------------------------------+ | | |cMTSessionFlowSpecifierName = fs1| | | +---------------------------------+ | | | | +---------------------------------+ | | |cMTSessionTraceRouteEnabled = T | | | +---------------------------------+ | | | +-------------------------------------+ | | | | +-------------------------------------+ | cMTSessionNumber = 2 | | +---------------------------------+ | +---------------------------+ | |cMTSessionPathSpecifierName = ps2| | |cMTMediaMonitorProfileTable| | +---------------------------------+ | | | | | +-----------------------------+ | +---------------------------------+ | |cMTMediaMonitorProfileName | | |cMTSessionParamName = sp5 | | | =rtp1 | | +---------------------------------+ | +-----------------------------+ | | | | | +---------------------------------+ | +-----------------------------+ | |cMTSessionProfileName = intf1 | | |cMTMediaMonitorProfileName | | +---------------------------------+ | | =rtp1 | | | +-----------------------------+ | +---------------------------------+ | : : | |cMTSessionTraceRouteEnabled = T | | : : | +---------------------------------+ | +-----------------------------+ | | |cMTMediaMonitorProfileName | +-------------------------------------+ | =tcp1 | : : +-----------------------------+ : : | | +-------------------------------------+ +---------------------------+ | cMTSessionNumber = 10 | | +---------------------------------+ | | |cMTSessionPathSpecifierName = ps1| | | +---------------------------------+ | | | | +---------------------------------+ | | |cMTSessionParamName = sp1 | | | +---------------------------------+ | | | | +---------------------------------+ | | |cMTSessionProfileName = tcp1 | | | +---------------------------------+ | | | | +---------------------------------+ | | |cMTSessionTraceRouteEnabled = T | | | +---------------------------------+ | | | +-------------------------------------+ | | | | +-------------------------+ +----------------------+ | cMTSystemProfileTable| | | +-----------------------------+ | cMTSystemProfileName = intf1| +-----------------------------+ | | +-----------------------------+ | cMTSystemProfileName = cpu1 | +-----------------------------+ : : : : +-----------------------------+ | cMTSystemProfileName = intf2| +-----------------------------+ | | +----------------------+ DEFINITIONS =============== Mediatrace Initiator - This is the entity that supports creation of periodic sessions using global session id. Initiator can send request, collects the responses to those request and processes them for reporting. Henceforth, it will be referred as initiator. Mediatrace Responder - This is the entity that queries local database and features to obtain information based on the request sent by the Initiator as part of a session. The collected information is sent as response to the initiator to match the session. Henceforth, it will be referred as responder. Meta-data - Meta information about the flow not contained in the data packet. Examples of such information are global session id, multi party session id, type of application that is generating this flow e.g., telepresence. Meta-data global session identifier - it is one of the meta-data attributes which uniquely identifies a flow globally and is used to query the meta-data database for obtaining the corresponding 5-tuple (destination address, destination port, source address, source port and IP protocol) for path specifier or flow specifier. Path - This specifies the route taken by the Mediatrace request for a particular session. This can be specified in terms of single or multiple 5-tuple parameters - destination address, destination port, source address, source port and IP protocol. Gateway address and VLAN are required in cases where the path starts from network element without IP address. This is specified using path specifier entity. Path Specifier - The path specifier is generally specified using complete or partial 5-tuple (destination address, destination port, source address, source port and IP protocol) for Layer 3 initiator. Gateway and VLAN ID are required for a Layer 2 initiator. It can also use the meta-data Global session Id to specify the 5-tuple. A single row corresponds to a path specifier which is created or destroyed when a path specifier is added or removed. Each path specifier entry is uniquely identified by cMTPathSpecifierName. Examples of a path specifier are as follows, path-specifier (ps1)+-------> destination address (10.10.10.2) +-------> destination port (12344) +-------> source address (10.10.12.2) +-------> source port (12567) +-------> IP protocol (UDP) +-------> gateway (10.10.11.2) +-------> VLAN ID (601) path-specifier (ps2)+-------> meta-data global identifier (345123456) Flow - A unidirectional stream of packets conforming to a classifier. For example, packets having a particular source IP address, destination IP address, protocol type, source port number, and destination port number. This is specified using a flow specifier entity. Flow Specifier - The flow specifier is generally specified using complete or partial 5-tuple (destination address, destination port, source address, source port and IP protocol). It can also use the meta-data Global session Id to specify the 5-tuple. A single row corresponds to a flow specifier which is created or destroyed when a flow specifier is added or removed. Each flow specifier entry is uniquely identified by cMTFlowSpecifierName. Examples of a flow specifier is as follows, flow-specifier (fs1)+-------> destination address(10.11.10.2) +-------> destination port (12344) +-------> source address (10.11.12.2) +-------> source port (12567) +-------> IP protocol (UDP) flow-specifier (fs2)+-------> meta-data global identifier (345123456) Metric - It defines a measurement that reflects the quality of a traffic flow or a resource on a hop or along the path e.g. number of packets for a flow, memory utilization on a hop, number of dropped packets on an interface, etc. Metric-list - It defines logical grouping of related metrics e.g. Metric-list CPU has 1% and 2% CPU utilization metric, Metric-list interface has ingress interface speed, egress interface speed, etc. Profile - It defines the set of metric-lists to be collected from the devices along the path. It can also include additional parameters which are required for collecting the metric e.g., sampling interval (also referred as monitor interval), etc. A Profile can include a set of related metric-lists along with related configuration parameters. The metrics could be the media monitoring (also referred as performance monitoring) metrics such as jitter, packet loss, bit rate etc., or system resource utilization metrics or interface counters. Two profiles, System profile and Media Monitoring (Performance Monitoring) Profile are supported. The different profiles, metric-lists and metrics are listed below, +-----> Profile +---> Metric-list +--------> one min CPU utilization | System | CPU | | | +--------> five min CPU utilization | | | +---> Metric-list +-----> memory utilization Memory | | | +---> Metric-list +------> octets input at ingress | Interface | | +------> octets output at egress | |------> packets received with error | | at ingress | +------> packets with error at egress | +------> packets discarded at ingress | +------> packets discarded at egress | +------> ingress interface speed | +------> egress interface speed | +--> Profile +--> Metric-list +--> Common +--> loss of Media Monitor | TCP | IP | measurement confidence | | metrics | | | +--> media stop event occurred | | +--> IP packet drop count | | +--> IP byte count | | +--> IP byte rate | | +--> IP DSCP | | +--> IP TTL | | +--> IP protocol | | +---> media byte | | count | | | +--> TCP +--> TCP connect round trip | specific | delay | metrics | | +--> TCP lost event count | +--> Metric-list +--> Common +--> loss of measurement RTP | IP | confidence | metrics | | +--> media stop event occurred | +--> IP packet drop count | +--> IP byte count | +--> IP byte rate | +--> IP DSCP | +--> IP TTL | +--> IP protocol | +---> media byte count | +--> RTP +--> RTP inter arrival jitter specific | delay metrics | +--> RTP packets lost +--> RTP packets expected +--> RTP packets lost event | count +---> RTP loss percent Examples of the profiles are as follows, profile system - metric-list interface (sys1) profile media-monitor - metric-list rtp (rtp1) +-------> monitor interval (60 seconds) Session parameter Profile - These correspond to the various parameters related to session such as frequency of data collection, timeout for request, etc. These are specified using the session params entity. This is the entity that executes via a conceptual session/schedule control row and populates a conceptual statistics row. Example session parameter profile is as follows, Session-params (sp1)+-------> response timeout (10 seconds) +-------> frequency (60 seconds) +-------> history data sets (2) +-------> route change reaction time (10 seconds) +-------> inactivity timeout (180 seconds) Session - The session is a grouping of various configurable entities such as profiles, session parameters and path specifiers. Flow specifier is optional and required for media monitor profile only. Once these parameters for a mediatrace session are defined through these entities, they are combined into a mediatrace session. Example of sessions are as follows, session (1) +--------> path-specifier (ps1) +--------> session-params (sp1) +--------> profile system (sys1) metric-list interface session (2) +--------> path-specifier (ps1) +--------> session-params (sp2) +--------> profile media-monitor (rtp1) | metric-list rtp +--------> flow-specifier (fs1) A session cycles through various states in its lifetime. The different states are, Active state : A session is said to be in active state when it is requesting and collecting data from the responders. Inactive state : A session becomes inactive when it is either stopped by unscheduling or life expires. In this state it will no longer collect or request data. Pending state: A session is in pending state when the session is created but not yet scheduled to be active. Based on the state and history of a session it can be classified as configured or scheduled session. Configured session : A session which is created and is in pending or inactive state is called a configured session. It can also be a newly created session which has not been scheduled (made active) yet. Scheduled session : A session which is in active state or pending state which is already requesting and collecting data or has set a time in future to start requesting or collecting data. Responder: The responder is in active state when it is able to process the requests from the initiator, collect the data locally and send the Response back to the initiator. Reachability Address: It is the address of the interface on a responder which is used to send the response to the initiator. Statistics row - This conceptual row is indexed based on the session index, session life index, bucket number and hop information (Hop address type and Hop address). This identifies the statistics for a particular session with specific life, at a particular time and for a specific hop.")
class Ciscontptimestamp(TextualConvention, OctetString):
reference = "D.L. Mills, 'Network Time Protocol (Version 3)', RFC-1305, March 1992, Section 3.1"
description = 'CiscoNTP timestamps are represented as a 64-bit unsigned fixed-point number, in seconds relative to 00:00 on 1 January 1900. The integer part is in the first 32 bits and the fraction part is in the last 32 bits.'
status = 'current'
display_hint = '4d.4d'
subtype_spec = OctetString.subtypeSpec + value_size_constraint(8, 8)
fixed_length = 8
class Ciscomediatracesupportprotocol(TextualConvention, Integer32):
description = 'Represents different types of layer 3 protocols supported by by Mediatrace for path and flow specification. Currently two protocols - TCP and UDP are supported.'
status = 'current'
subtype_spec = Integer32.subtypeSpec + constraints_union(single_value_constraint(6, 17))
named_values = named_values(('tcp', 6), ('udp', 17))
class Ciscomediatracediscoveryprotocol(TextualConvention, Integer32):
description = 'Represents different types of protocols used by Mediatrace to discover the path based on the path specifier.'
status = 'current'
subtype_spec = Integer32.subtypeSpec + constraints_union(single_value_constraint(46))
named_values = named_values(('rsvp', 46))
cisco_mediatrace_mib_notifs = mib_identifier((1, 3, 6, 1, 4, 1, 9, 9, 800, 0))
cisco_mediatrace_mib_objects = mib_identifier((1, 3, 6, 1, 4, 1, 9, 9, 800, 1))
cisco_mediatrace_mib_conform = mib_identifier((1, 3, 6, 1, 4, 1, 9, 9, 800, 2))
c_mt_ctrl = mib_identifier((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 1))
c_mt_stats = mib_identifier((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 2))
c_mt_initiator_enable = mib_scalar((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 1, 2), truth_value()).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
cMTInitiatorEnable.setStatus('current')
if mibBuilder.loadTexts:
cMTInitiatorEnable.setDescription('This object specifies the whether the Mediatrace initiator is enabled on the network element.')
c_mt_initiator_source_interface = mib_scalar((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 1, 3), interface_index_or_zero()).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
cMTInitiatorSourceInterface.setStatus('current')
if mibBuilder.loadTexts:
cMTInitiatorSourceInterface.setDescription('This object specifies the interface whose IP or IPv6 address will be used as initiator address. The Initiator address is used by layer 2 mediatrace responder to unicast the response message to initiator. This address is also reachability address for mediatrace hop 0. The value of this object should be set to ifIndex value of the desired interface from the ifTable.')
c_mt_initiator_source_address_type = mib_scalar((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 1, 4), inet_address_type()).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
cMTInitiatorSourceAddressType.setStatus('current')
if mibBuilder.loadTexts:
cMTInitiatorSourceAddressType.setDescription('Address type (IP or IPv6) of the initiator address specified in cMTInitiatorSourceAddress object. The value should be set to unknown (0) if source interface object is non zero.')
c_mt_initiator_source_address = mib_scalar((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 1, 5), inet_address()).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
cMTInitiatorSourceAddress.setStatus('current')
if mibBuilder.loadTexts:
cMTInitiatorSourceAddress.setDescription('This object specifies the IP address used by the initiator when obtaining the reachability address from a downstream responder.')
c_mt_initiator_max_sessions = mib_scalar((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 1, 6), unsigned32()).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
cMTInitiatorMaxSessions.setStatus('current')
if mibBuilder.loadTexts:
cMTInitiatorMaxSessions.setDescription('This object specifies the maximum number of mediatrace sessions that can be active simultaneously on the initiator.')
c_mt_initiator_software_version_major = mib_scalar((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 1, 7), unsigned32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
cMTInitiatorSoftwareVersionMajor.setStatus('current')
if mibBuilder.loadTexts:
cMTInitiatorSoftwareVersionMajor.setDescription('This object indicates the major version number of Mediatrace application.')
c_mt_initiator_software_version_minor = mib_scalar((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 1, 8), unsigned32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
cMTInitiatorSoftwareVersionMinor.setStatus('current')
if mibBuilder.loadTexts:
cMTInitiatorSoftwareVersionMinor.setDescription('This object indicates the minor version number of Mediatrace application.')
c_mt_initiator_protocol_version_major = mib_scalar((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 1, 9), unsigned32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
cMTInitiatorProtocolVersionMajor.setStatus('current')
if mibBuilder.loadTexts:
cMTInitiatorProtocolVersionMajor.setDescription('This object indicates the major version number of Mediatrace protocol.')
c_mt_initiator_protocol_version_minor = mib_scalar((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 1, 10), unsigned32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
cMTInitiatorProtocolVersionMinor.setStatus('current')
if mibBuilder.loadTexts:
cMTInitiatorProtocolVersionMinor.setDescription('This object indicates the minor version number of Mediatrace protocol.')
c_mt_initiator_configured_sessions = mib_scalar((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 1, 11), gauge32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
cMTInitiatorConfiguredSessions.setStatus('current')
if mibBuilder.loadTexts:
cMTInitiatorConfiguredSessions.setDescription('This object indicates number of mediatrace sessions configured. The session may or may not be active.')
c_mt_initiator_pending_sessions = mib_scalar((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 1, 12), gauge32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
cMTInitiatorPendingSessions.setStatus('current')
if mibBuilder.loadTexts:
cMTInitiatorPendingSessions.setDescription('This object indicates the current number of sessions in pending state on the initiator.')
c_mt_initiator_inactive_sessions = mib_scalar((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 1, 13), gauge32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
cMTInitiatorInactiveSessions.setStatus('current')
if mibBuilder.loadTexts:
cMTInitiatorInactiveSessions.setDescription('This object indicates the current number of sessions in inactive state on the initiator.')
c_mt_initiator_active_sessions = mib_scalar((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 1, 14), gauge32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
cMTInitiatorActiveSessions.setStatus('current')
if mibBuilder.loadTexts:
cMTInitiatorActiveSessions.setDescription('This object indicates the current number of sessions in active state on the initiator.')
c_mt_responder_enable = mib_scalar((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 1, 15), truth_value()).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
cMTResponderEnable.setStatus('current')
if mibBuilder.loadTexts:
cMTResponderEnable.setDescription("This object specifies the whether the Mediatrace responder is enabled. If set to 'true' the responder will be enabled. If set to false then mediatrace responder process will be stopped and the device will no longer be discovered as mediatrace capable hop along the flow path.")
c_mt_responder_max_sessions = mib_scalar((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 1, 16), unsigned32()).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
cMTResponderMaxSessions.setStatus('current')
if mibBuilder.loadTexts:
cMTResponderMaxSessions.setDescription('This object specifies the maximum number of sessions that a responder can accept from initiator.')
c_mt_responder_active_sessions = mib_scalar((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 1, 17), gauge32()).setUnits('sessions').setMaxAccess('readonly')
if mibBuilder.loadTexts:
cMTResponderActiveSessions.setStatus('current')
if mibBuilder.loadTexts:
cMTResponderActiveSessions.setDescription('This object indicates the current number of sessions that are in active state on the responder.')
c_mt_flow_specifier_table = mib_table((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 1, 18))
if mibBuilder.loadTexts:
cMTFlowSpecifierTable.setStatus('current')
if mibBuilder.loadTexts:
cMTFlowSpecifierTable.setDescription('This table lists the flow specifiers contained by the device.')
c_mt_flow_specifier_entry = mib_table_row((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 1, 18, 1)).setIndexNames((0, 'CISCO-MEDIATRACE-MIB', 'cMTFlowSpecifierName'))
if mibBuilder.loadTexts:
cMTFlowSpecifierEntry.setStatus('current')
if mibBuilder.loadTexts:
cMTFlowSpecifierEntry.setDescription("An entry represents a flow specifier which can be associated with a Mediatrace session contained by the cMTSessionTable. Each entry is uniquely identified by name specified by cMTFlowSpecifierName object. A row created in this table will be shown in 'show running' command and it will not be saved into non-volatile memory.")
c_mt_flow_specifier_name = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 1, 18, 1, 1), snmp_admin_string())
if mibBuilder.loadTexts:
cMTFlowSpecifierName.setStatus('current')
if mibBuilder.loadTexts:
cMTFlowSpecifierName.setDescription('A unique identifier for the flow specifier.')
c_mt_flow_specifier_row_status = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 1, 18, 1, 2), row_status()).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
cMTFlowSpecifierRowStatus.setStatus('current')
if mibBuilder.loadTexts:
cMTFlowSpecifierRowStatus.setDescription("This object specifies the status of the flow specifier. Only CreateAndGo and active status is supported. The following columns must be valid before activating the flow specifier: - cMTFlowSpecifierDestAddrType and cMTFlowSpecifierDestAddr OR - cMTFlowSpecifierMetadataGlobalId All other objects can assume default values. Once the flow specifier is activated no column can be modified. Setting this object to 'delete' will destroy the flow specifier. The flow specifier can be deleted only if it is not attached to any session.")
c_mt_flow_specifier_metadata_global_id = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 1, 18, 1, 3), snmp_admin_string()).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
cMTFlowSpecifierMetadataGlobalId.setStatus('current')
if mibBuilder.loadTexts:
cMTFlowSpecifierMetadataGlobalId.setDescription('This object specifies the meta-data Global ID of the flow specifier. Maximum of 24 characters can be specified for this field.')
c_mt_flow_specifier_dest_addr_type = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 1, 18, 1, 4), inet_address_type()).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
cMTFlowSpecifierDestAddrType.setStatus('current')
if mibBuilder.loadTexts:
cMTFlowSpecifierDestAddrType.setDescription('This object specifies the type of IP address specified by the corresponding instance of cMTFlowSpecifierDestAddr.')
c_mt_flow_specifier_dest_addr = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 1, 18, 1, 5), inet_address()).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
cMTFlowSpecifierDestAddr.setStatus('current')
if mibBuilder.loadTexts:
cMTFlowSpecifierDestAddr.setDescription('Address of the destination of the flow to be monitored.')
c_mt_flow_specifier_dest_port = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 1, 18, 1, 6), inet_port_number()).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
cMTFlowSpecifierDestPort.setStatus('current')
if mibBuilder.loadTexts:
cMTFlowSpecifierDestPort.setDescription('This object specifies the destination port for the flow.')
c_mt_flow_specifier_source_addr_type = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 1, 18, 1, 7), inet_address_type()).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
cMTFlowSpecifierSourceAddrType.setStatus('current')
if mibBuilder.loadTexts:
cMTFlowSpecifierSourceAddrType.setDescription('This object specifies the type of IP address specified by the corresponding instance of cMTFlowSpecifierSourceAddr.')
c_mt_flow_specifier_source_addr = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 1, 18, 1, 8), inet_address()).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
cMTFlowSpecifierSourceAddr.setStatus('current')
if mibBuilder.loadTexts:
cMTFlowSpecifierSourceAddr.setDescription('This object specifies the source address for the flow to be monitored.')
c_mt_flow_specifier_source_port = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 1, 18, 1, 9), inet_port_number()).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
cMTFlowSpecifierSourcePort.setStatus('current')
if mibBuilder.loadTexts:
cMTFlowSpecifierSourcePort.setDescription('This object specifies the source port for the flow.')
c_mt_flow_specifier_ip_protocol = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 1, 18, 1, 10), cisco_mediatrace_support_protocol().clone('udp')).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
cMTFlowSpecifierIpProtocol.setStatus('current')
if mibBuilder.loadTexts:
cMTFlowSpecifierIpProtocol.setDescription('This is transport protocol type for the flow. Flow of this type between specified source and and destination will be monitored.')
c_mt_path_specifier_table = mib_table((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 1, 19))
if mibBuilder.loadTexts:
cMTPathSpecifierTable.setStatus('current')
if mibBuilder.loadTexts:
cMTPathSpecifierTable.setDescription('This table lists the path specifiers contained by the device.')
c_mt_path_specifier_entry = mib_table_row((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 1, 19, 1)).setIndexNames((0, 'CISCO-MEDIATRACE-MIB', 'cMTPathSpecifierName'))
if mibBuilder.loadTexts:
cMTPathSpecifierEntry.setStatus('current')
if mibBuilder.loadTexts:
cMTPathSpecifierEntry.setDescription("This entry defines path specifier that can be used in mediatrace session. Each entry is uniquely identified by name specified by cMTPathSpecifierName object. A row created in this table will be shown in 'show running' command and it will not be saved into non-volatile memory.")
c_mt_path_specifier_name = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 1, 19, 1, 1), snmp_admin_string())
if mibBuilder.loadTexts:
cMTPathSpecifierName.setStatus('current')
if mibBuilder.loadTexts:
cMTPathSpecifierName.setDescription('A unique identifier for the path specifier.')
c_mt_path_specifier_row_status = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 1, 19, 1, 2), row_status()).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
cMTPathSpecifierRowStatus.setStatus('current')
if mibBuilder.loadTexts:
cMTPathSpecifierRowStatus.setDescription("This object specifies the status of the path specifier. Only CreateAndGo and active status is supported. The following columns must be valid before activating the path specifier: - cMTPathSpecifierDestAddrType and cMTPathSpecifierDestAddr OR - cMTPathSpecifierMetadataGlobalId All other objects can assume default values. Once the path specifier is activated no column can be modified. Setting this object to 'delete' will destroy the path specifier. The path specifier can be deleted only if it is not attached to any session.")
c_mt_path_specifier_metadata_global_id = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 1, 19, 1, 3), snmp_admin_string()).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
cMTPathSpecifierMetadataGlobalId.setStatus('current')
if mibBuilder.loadTexts:
cMTPathSpecifierMetadataGlobalId.setDescription('Metadata global session id can be used as path specifier. This object should be populated when this is desired. Mediatrace software will query the Metadata database for five tuple to be used for establishing the path.')
c_mt_path_specifier_dest_addr_type = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 1, 19, 1, 4), inet_address_type()).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
cMTPathSpecifierDestAddrType.setStatus('current')
if mibBuilder.loadTexts:
cMTPathSpecifierDestAddrType.setDescription('This object specifies the type of IP address specified by the corresponding instance of cMTPathSpecifierDestAddr.')
c_mt_path_specifier_dest_addr = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 1, 19, 1, 5), inet_address()).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
cMTPathSpecifierDestAddr.setStatus('current')
if mibBuilder.loadTexts:
cMTPathSpecifierDestAddr.setDescription('This object specifies the destination address for the path specifier.')
c_mt_path_specifier_dest_port = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 1, 19, 1, 6), inet_port_number()).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
cMTPathSpecifierDestPort.setStatus('current')
if mibBuilder.loadTexts:
cMTPathSpecifierDestPort.setDescription('This object specifies the destination port for the path specifier.')
c_mt_path_specifier_source_addr_type = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 1, 19, 1, 7), inet_address_type()).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
cMTPathSpecifierSourceAddrType.setStatus('current')
if mibBuilder.loadTexts:
cMTPathSpecifierSourceAddrType.setDescription('This object specifies the type of IP address specified by the corresponding instance of cMTFlowSpecifierSourceAddr.')
c_mt_path_specifier_source_addr = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 1, 19, 1, 8), inet_address()).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
cMTPathSpecifierSourceAddr.setStatus('current')
if mibBuilder.loadTexts:
cMTPathSpecifierSourceAddr.setDescription('This object specifies the source address for the path specifier.')
c_mt_path_specifier_source_port = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 1, 19, 1, 9), inet_port_number()).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
cMTPathSpecifierSourcePort.setStatus('current')
if mibBuilder.loadTexts:
cMTPathSpecifierSourcePort.setDescription('This object specifies the source port for the path specifier.')
c_mt_path_specifier_protocol_for_discovery = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 1, 19, 1, 10), cisco_mediatrace_discovery_protocol().clone('rsvp')).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
cMTPathSpecifierProtocolForDiscovery.setStatus('current')
if mibBuilder.loadTexts:
cMTPathSpecifierProtocolForDiscovery.setDescription('This object specifies the protocol used for path discovery on Mediatrace. Currently, only RSVP is used by default.')
c_mt_path_specifier_gateway_addr_type = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 1, 19, 1, 11), inet_address_type()).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
cMTPathSpecifierGatewayAddrType.setStatus('current')
if mibBuilder.loadTexts:
cMTPathSpecifierGatewayAddrType.setDescription('This object specifies the type of IP address specified by the corresponding instance of cMTPathSpecifierGatewayAddr.')
c_mt_path_specifier_gateway_addr = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 1, 19, 1, 12), inet_address()).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
cMTPathSpecifierGatewayAddr.setStatus('current')
if mibBuilder.loadTexts:
cMTPathSpecifierGatewayAddr.setDescription('When the mediatrace session is originated on layer-2 switch the address of gateway is required to establish the session. This object specifies address of this gateway.')
c_mt_path_specifier_gateway_vlan_id = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 1, 19, 1, 13), vlan_id().subtype(subtypeSpec=value_range_constraint(1, 4094))).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
cMTPathSpecifierGatewayVlanId.setStatus('current')
if mibBuilder.loadTexts:
cMTPathSpecifierGatewayVlanId.setDescription('This object specifies the Vlan ID associated with the gateway for path specifier.')
c_mt_path_specifier_ip_protocol = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 1, 19, 1, 14), cisco_mediatrace_support_protocol().clone('udp')).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
cMTPathSpecifierIpProtocol.setStatus('current')
if mibBuilder.loadTexts:
cMTPathSpecifierIpProtocol.setDescription('This object specifies which metrics are monitored for a path specifier. Currently, only TCP and UDP are supported.')
c_mt_session_params_table = mib_table((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 1, 20))
if mibBuilder.loadTexts:
cMTSessionParamsTable.setStatus('current')
if mibBuilder.loadTexts:
cMTSessionParamsTable.setDescription('This table is collection of session parameter profiles.')
c_mt_session_params_entry = mib_table_row((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 1, 20, 1)).setIndexNames((0, 'CISCO-MEDIATRACE-MIB', 'cMTSessionParamsName'))
if mibBuilder.loadTexts:
cMTSessionParamsEntry.setStatus('current')
if mibBuilder.loadTexts:
cMTSessionParamsEntry.setDescription("An entry represents session parameters that can be associated with a Mediatrace session contained by the cMTSessionTable. Each entry is uniquely identified by name specified by cMTSessionParamsName object. A row created in this table will be shown in 'show running' command and it will not be saved into non-volatile memory.")
c_mt_session_params_name = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 1, 20, 1, 1), snmp_admin_string())
if mibBuilder.loadTexts:
cMTSessionParamsName.setStatus('current')
if mibBuilder.loadTexts:
cMTSessionParamsName.setDescription('This object specifies the name of this set of session parameters.')
c_mt_session_params_row_status = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 1, 20, 1, 2), row_status()).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
cMTSessionParamsRowStatus.setStatus('current')
if mibBuilder.loadTexts:
cMTSessionParamsRowStatus.setDescription("This object specifies the status of the session parameters. Only CreateAndGo and active status is supported. In order for this object to become active cMTSessionParamsName must be defined. The value of cMTSessionParamsInactivityTimeout needs to be at least 3 times of the value of cMTSessionParamsFrequency. All other objects assume the default value. Once the session parameters is activated no column can be modified. Setting this object to 'delete' will destroy the session parameters. The session parameters can be deleted only if it is not attached to any session.")
c_mt_session_params_response_timeout = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 1, 20, 1, 3), unsigned32().subtype(subtypeSpec=value_range_constraint(1, 65535))).setUnits('seconds').setMaxAccess('readcreate')
if mibBuilder.loadTexts:
cMTSessionParamsResponseTimeout.setStatus('current')
if mibBuilder.loadTexts:
cMTSessionParamsResponseTimeout.setDescription('This object specifies the amount of time a session should wait for the responses after sending out a Mediatrace request. The initiator will discard any responses to a particular request after this timeout.')
c_mt_session_params_frequency = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 1, 20, 1, 4), unsigned32().subtype(subtypeSpec=value_range_constraint(10, 3600)).clone(120)).setUnits('seconds').setMaxAccess('readcreate')
if mibBuilder.loadTexts:
cMTSessionParamsFrequency.setStatus('current')
if mibBuilder.loadTexts:
cMTSessionParamsFrequency.setDescription('Duration between two successive data fetch requests.')
c_mt_session_params_inactivity_timeout = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 1, 20, 1, 5), unsigned32().subtype(subtypeSpec=value_range_constraint(1, 10800))).setUnits('sconds').setMaxAccess('readcreate')
if mibBuilder.loadTexts:
cMTSessionParamsInactivityTimeout.setStatus('current')
if mibBuilder.loadTexts:
cMTSessionParamsInactivityTimeout.setDescription('This object specifies the interval that the responder wait without any requests from the initiator before removing a particular session. The inactivity timeout needs to be at least 3 times of the session frequency.')
c_mt_session_params_history_buckets = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 1, 20, 1, 6), unsigned32().subtype(subtypeSpec=value_range_constraint(1, 10)).clone(3)).setUnits('buckets').setMaxAccess('readcreate')
if mibBuilder.loadTexts:
cMTSessionParamsHistoryBuckets.setStatus('current')
if mibBuilder.loadTexts:
cMTSessionParamsHistoryBuckets.setDescription('This object specifies the number of buckets of statistics retained. Each bucket will contain complete set of metrics collected for all hops in one iteration.')
c_mt_session_params_route_change_reactiontime = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 1, 20, 1, 7), unsigned32().subtype(subtypeSpec=value_range_constraint(0, 60))).setUnits('seconds').setMaxAccess('readcreate')
if mibBuilder.loadTexts:
cMTSessionParamsRouteChangeReactiontime.setStatus('current')
if mibBuilder.loadTexts:
cMTSessionParamsRouteChangeReactiontime.setDescription('This object specifies the amount of time the initiator should wait after receiving the first route change, before reacting to further route change notifications. Range is from 0 to 60.')
c_mt_media_monitor_profile_table = mib_table((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 1, 21))
if mibBuilder.loadTexts:
cMTMediaMonitorProfileTable.setStatus('current')
if mibBuilder.loadTexts:
cMTMediaMonitorProfileTable.setDescription('This table lists the media monitor profiles configured on the device.')
c_mt_media_monitor_profile_entry = mib_table_row((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 1, 21, 1)).setIndexNames((0, 'CISCO-MEDIATRACE-MIB', 'cMTMediaMonitorProfileName'))
if mibBuilder.loadTexts:
cMTMediaMonitorProfileEntry.setStatus('current')
if mibBuilder.loadTexts:
cMTMediaMonitorProfileEntry.setDescription("An entry represents a media monitor profile that can be associated with a Mediatrace session contained by the cMTSessionTable. The entry is uniquely identified by cMTMediaMonitorProfileName. A row created in this table will be shown in 'show running' command and it will not be saved into non-volatile memory.")
c_mt_media_monitor_profile_name = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 1, 21, 1, 1), snmp_admin_string())
if mibBuilder.loadTexts:
cMTMediaMonitorProfileName.setStatus('current')
if mibBuilder.loadTexts:
cMTMediaMonitorProfileName.setDescription('This object specifies the name of the Mediatrace media monitor profile.')
c_mt_media_monitor_profile_row_status = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 1, 21, 1, 2), row_status()).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
cMTMediaMonitorProfileRowStatus.setStatus('current')
if mibBuilder.loadTexts:
cMTMediaMonitorProfileRowStatus.setDescription("This object specifies the status of the media monitor profile. Only CreateAndGo and active status is supported. In order for this object to become active cMTMediaMonitorProfileName must be defined. All other objects assume the default value. Once the media monitor profile is activated no column can be modified. Setting this object to 'delete' will destroy the media monitor. The media monitor profile can be deleted only if it is not attached to any session.")
c_mt_media_monitor_profile_metric = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 1, 21, 1, 3), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2))).clone(namedValues=named_values(('rtp', 1), ('tcp', 2)))).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
cMTMediaMonitorProfileMetric.setStatus('current')
if mibBuilder.loadTexts:
cMTMediaMonitorProfileMetric.setDescription("This object specifies the type of metrics group to be collected in addition to basic IP metrics. Specify value as RTP if metrics from 'Metric-List RTP' are desired and 'TCP' if metrics in 'Metric-List TCP' is desired.")
c_mt_media_monitor_profile_interval = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 1, 21, 1, 4), unsigned32().subtype(subtypeSpec=value_range_constraint(10, 120))).setUnits('seconds').setMaxAccess('readcreate')
if mibBuilder.loadTexts:
cMTMediaMonitorProfileInterval.setStatus('current')
if mibBuilder.loadTexts:
cMTMediaMonitorProfileInterval.setDescription('This object specifies the sampling interval for the media monitor profile.')
c_mt_media_monitor_profile_rtp_max_dropout = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 1, 21, 1, 5), unsigned32().subtype(subtypeSpec=value_range_constraint(1, 20)).clone(10)).setUnits('packets').setMaxAccess('readcreate')
if mibBuilder.loadTexts:
cMTMediaMonitorProfileRtpMaxDropout.setStatus('current')
if mibBuilder.loadTexts:
cMTMediaMonitorProfileRtpMaxDropout.setDescription('This object specifies the maximum number of dropouts allowed when sampling RTP monitoring metrics.')
c_mt_media_monitor_profile_rtp_max_reorder = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 1, 21, 1, 6), unsigned32().subtype(subtypeSpec=value_range_constraint(1, 20)).clone(5)).setUnits('packets').setMaxAccess('readcreate')
if mibBuilder.loadTexts:
cMTMediaMonitorProfileRtpMaxReorder.setStatus('current')
if mibBuilder.loadTexts:
cMTMediaMonitorProfileRtpMaxReorder.setDescription('This object specifies the maximum number of reorders allowed when sampling RTP monitoring metrics.')
c_mt_media_monitor_profile_rtp_minimal_sequential = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 1, 21, 1, 7), unsigned32().subtype(subtypeSpec=value_range_constraint(2, 10))).setUnits('packets').setMaxAccess('readcreate')
if mibBuilder.loadTexts:
cMTMediaMonitorProfileRtpMinimalSequential.setStatus('current')
if mibBuilder.loadTexts:
cMTMediaMonitorProfileRtpMinimalSequential.setDescription('This object specifies the minimum number of sequental packets required to identify a stream as being an RTP flow.')
c_mt_system_profile_table = mib_table((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 1, 22))
if mibBuilder.loadTexts:
cMTSystemProfileTable.setStatus('current')
if mibBuilder.loadTexts:
cMTSystemProfileTable.setDescription('This table lists the system profiles configured on the device.')
c_mt_system_profile_entry = mib_table_row((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 1, 22, 1)).setIndexNames((0, 'CISCO-MEDIATRACE-MIB', 'cMTSystemProfileName'))
if mibBuilder.loadTexts:
cMTSystemProfileEntry.setStatus('current')
if mibBuilder.loadTexts:
cMTSystemProfileEntry.setDescription("An entry represents a system profile that can be associated with a Mediatrace session contained by the cMTSessionTable. Each entry is uniquely identified by name specified by cMTSystemProfileName object. A row created in this table will be shown in 'show running' command and it will not be saved into non-volatile memory.")
c_mt_system_profile_name = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 1, 22, 1, 1), snmp_admin_string())
if mibBuilder.loadTexts:
cMTSystemProfileName.setStatus('current')
if mibBuilder.loadTexts:
cMTSystemProfileName.setDescription('This object specifies the name of the Mediatrace system profile.')
c_mt_system_profile_row_status = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 1, 22, 1, 2), row_status()).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
cMTSystemProfileRowStatus.setStatus('current')
if mibBuilder.loadTexts:
cMTSystemProfileRowStatus.setDescription("This object specifies the status of the system profile. Only CreateAndGo and active status is supported. In order for this object to become active cMTSystemProfileName must be defined. All other objects assume the default value. Once the system profile is activated no column can be modified. Setting this object to 'delete' will destroy the system profile. The system prifile can be deleted only if it is not attached to any session.")
c_mt_system_profile_metric = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 1, 22, 1, 3), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3))).clone(namedValues=named_values(('interface', 1), ('cpu', 2), ('memory', 3)))).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
cMTSystemProfileMetric.setStatus('current')
if mibBuilder.loadTexts:
cMTSystemProfileMetric.setDescription("This object specifies the type of metrics group to be collected in addition to basic IP metrics. Specify 'interface' if metrics from 'Metric-List-Interface' are desired. Specify 'cpu' if metrics in 'Metric-List-CPU' is desired. Specify 'memory' if metrics in 'Metric-List-Memory' is desired.")
c_mt_session_table = mib_table((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 1, 23))
if mibBuilder.loadTexts:
cMTSessionTable.setStatus('current')
if mibBuilder.loadTexts:
cMTSessionTable.setDescription('This table lists the Mediatrace sessions configured on the device.')
c_mt_session_entry = mib_table_row((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 1, 23, 1)).setIndexNames((0, 'CISCO-MEDIATRACE-MIB', 'cMTSessionNumber'))
if mibBuilder.loadTexts:
cMTSessionEntry.setReference('An entry in cMTSessionTable')
if mibBuilder.loadTexts:
cMTSessionEntry.setStatus('current')
if mibBuilder.loadTexts:
cMTSessionEntry.setDescription("A list of objects that define specific configuration for the session of Mediatrace. The entry is uniquely identified by cMTSessionNumber. A row created in this table will be shown in 'show running' command and it will not be saved into non-volatile memory.")
c_mt_session_number = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 1, 23, 1, 2), unsigned32().subtype(subtypeSpec=value_range_constraint(1, 2147483647)))
if mibBuilder.loadTexts:
cMTSessionNumber.setStatus('current')
if mibBuilder.loadTexts:
cMTSessionNumber.setDescription('This object specifies an arbitrary integer-value that uniquely identifies a Mediatrace session.')
c_mt_session_row_status = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 1, 23, 1, 3), row_status()).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
cMTSessionRowStatus.setStatus('current')
if mibBuilder.loadTexts:
cMTSessionRowStatus.setDescription("This object indicates the status of Mediatrace session. Only CreateAndGo and active status is supported. Following columns must be specified in order to activate the session: - cMTSessionPathSpecifierName - cMTSessionProfileName All other objects can assume default values. None of the properties of session can be modified once it is in 'active' state. Setting the value of 'destroy' for this object will delete the session. The session can be deleted only if the corresponding schedule (row in cMTScheduleTable ) not exist.")
c_mt_session_path_specifier_name = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 1, 23, 1, 4), snmp_admin_string()).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
cMTSessionPathSpecifierName.setStatus('current')
if mibBuilder.loadTexts:
cMTSessionPathSpecifierName.setDescription('This object specifies the name of the Mediatrace path specifier profile associated with the session.')
c_mt_session_param_name = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 1, 23, 1, 5), snmp_admin_string()).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
cMTSessionParamName.setStatus('current')
if mibBuilder.loadTexts:
cMTSessionParamName.setDescription('This object specifies the name of Mediatrace session parameter associated with the session.')
c_mt_session_profile_name = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 1, 23, 1, 6), snmp_admin_string()).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
cMTSessionProfileName.setStatus('current')
if mibBuilder.loadTexts:
cMTSessionProfileName.setDescription('This object specifies the name of the Mediatrace metric profile associated with the session.')
c_mt_session_flow_specifier_name = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 1, 23, 1, 7), snmp_admin_string()).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
cMTSessionFlowSpecifierName.setStatus('current')
if mibBuilder.loadTexts:
cMTSessionFlowSpecifierName.setDescription('This object specifies the name of the Mediatrace flow specifier profile associated with the session. Flow specifier is not required if system profile is attached to the session. In this case, media monitor profile is attached to the session. Flow specifier is optional and the 5-tuple from the path-specifier is used instead.')
c_mt_session_trace_route_enabled = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 1, 23, 1, 8), truth_value()).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
cMTSessionTraceRouteEnabled.setStatus('current')
if mibBuilder.loadTexts:
cMTSessionTraceRouteEnabled.setDescription('This object specifies if traceroute is enabled for this session.')
c_mt_schedule_table = mib_table((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 1, 24))
if mibBuilder.loadTexts:
cMTScheduleTable.setStatus('current')
if mibBuilder.loadTexts:
cMTScheduleTable.setDescription('A table of Mediatrace scheduling specific definitions. Each entry in this table schedules a cMTSessionEntry created via the cMTSessionTable object.')
c_mt_schedule_entry = mib_table_row((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 1, 24, 1)).setIndexNames((0, 'CISCO-MEDIATRACE-MIB', 'cMTSessionNumber'))
if mibBuilder.loadTexts:
cMTScheduleEntry.setReference('An entry in cMTScheduleTable')
if mibBuilder.loadTexts:
cMTScheduleEntry.setStatus('current')
if mibBuilder.loadTexts:
cMTScheduleEntry.setDescription("A list of objects that define specific configuration for the scheduling of Mediatrace operations. A row is created when a session is scheduled to make it active. Likewise, a row is destroyed when the session is unscheduled. A row created in this table will be shown in 'show running' command and it will not be saved into non-volatile memory.")
c_mt_schedule_row_status = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 1, 24, 1, 1), row_status()).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
cMTScheduleRowStatus.setStatus('current')
if mibBuilder.loadTexts:
cMTScheduleRowStatus.setDescription("This objects specifies the status of Mediatrace session schedule. Only CreateAndGo and destroy operations are permitted on the row. All objects can assume default values. The schedule start time (column cMTScheduleStartTime) must be specified in order to activate the schedule. Once activated none of the properties of the schedule can be changed. The schedule can be destroyed any time by setting the value of this object to 'destroy'. Destroying the schedule will stop the Mediatrace session but the session will not be destroyed.")
c_mt_schedule_start_time = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 1, 24, 1, 2), time_stamp()).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
cMTScheduleStartTime.setStatus('current')
if mibBuilder.loadTexts:
cMTScheduleStartTime.setDescription('This object specifies the start time of the scheduled session.')
c_mt_schedule_life = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 1, 24, 1, 3), unsigned32().subtype(subtypeSpec=value_range_constraint(0, 2147483647)).clone(3600)).setUnits('seconds').setMaxAccess('readcreate')
if mibBuilder.loadTexts:
cMTScheduleLife.setStatus('current')
if mibBuilder.loadTexts:
cMTScheduleLife.setDescription('This object specifies the duration of the session in seconds.')
c_mt_schedule_entry_ageout = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 1, 24, 1, 4), unsigned32().subtype(subtypeSpec=value_range_constraint(0, 2073600)).clone(3600)).setUnits('seconds').setMaxAccess('readcreate')
if mibBuilder.loadTexts:
cMTScheduleEntryAgeout.setStatus('current')
if mibBuilder.loadTexts:
cMTScheduleEntryAgeout.setDescription('This object specifies the amount of time after which mediatrace session entry will be removed once the life of session is over and session is inactive.')
c_mt_schedule_recurring = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 1, 24, 1, 5), truth_value()).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
cMTScheduleRecurring.setStatus('current')
if mibBuilder.loadTexts:
cMTScheduleRecurring.setDescription('This object specifies whether the schedule is recurring schedule. This object can be used when a periodic session is to be executed everyday at certain time and for certain life.')
c_mt_path_table = mib_table((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 2, 1))
if mibBuilder.loadTexts:
cMTPathTable.setStatus('current')
if mibBuilder.loadTexts:
cMTPathTable.setDescription('List of paths discovered by a mediatrace session.')
c_mt_path_entry = mib_table_row((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 2, 1, 1)).setIndexNames((0, 'CISCO-MEDIATRACE-MIB', 'cMTSessionNumber'), (0, 'CISCO-MEDIATRACE-MIB', 'cMTSessionLifeNumber'), (0, 'CISCO-MEDIATRACE-MIB', 'cMTBucketNumber'), (0, 'CISCO-MEDIATRACE-MIB', 'cMTPathHopNumber'))
if mibBuilder.loadTexts:
cMTPathEntry.setStatus('current')
if mibBuilder.loadTexts:
cMTPathEntry.setDescription('An entry in cMTPathTable represents a Mediatrace path discovered by a session. This table contains information about the hops (Mediatrace or non-Mediatrace) discovered during a specific request. The Path table is used to find the hop address (Address type - IPv4 or IPv6 and Address) and hop type (currently Mediatrace or Traceroute) to use as index for other statistics tables. A row is created when a Mediatrace scheduled session discovers a path to the specified destination during a request. Likewise, a row is destroyed when the path is no longer avilable. A single row corresponds to a Mediatrace path discovered for a session and is uniquely identified by cMTSessionNumber, cMTSessionLifeNumber, cMTBucketNumber and cMTPathHopNumber. The created rows are destroyed when the device undergoes a restart.')
c_mt_session_life_number = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 2, 1, 1, 1), unsigned32().subtype(subtypeSpec=value_range_constraint(0, 2)))
if mibBuilder.loadTexts:
cMTSessionLifeNumber.setStatus('current')
if mibBuilder.loadTexts:
cMTSessionLifeNumber.setDescription('This object specifies a life for a conceptual statistics row. For a particular value of cMTSessionLifeNumber, the agent assigns the first value of 0 to the current (latest) life, with 1 being the next latest and so on. The sequence keeps incrementing, despite older (lower) values being removed from the table.')
c_mt_bucket_number = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 2, 1, 1, 2), unsigned32().subtype(subtypeSpec=value_range_constraint(0, 10)))
if mibBuilder.loadTexts:
cMTBucketNumber.setStatus('current')
if mibBuilder.loadTexts:
cMTBucketNumber.setDescription('This object is index of the list of statistics buckets stored. A statistics bucket corresponds to data collected from each hop in one run of the periodic mediatrace session. Bucket with Index value of 0 is the bucket for latest completed run. Index 1 is one run prior to latest completed run, index 2 is two runs prior to latest completed run, and so on.')
c_mt_path_hop_number = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 2, 1, 1, 3), unsigned32().subtype(subtypeSpec=value_range_constraint(0, 255)))
if mibBuilder.loadTexts:
cMTPathHopNumber.setStatus('current')
if mibBuilder.loadTexts:
cMTPathHopNumber.setDescription('This object specifies the hop number for a Mediatrace Path. This hop can be either Mediatrace or Non-Mediatrace node. The hop number is relative to the initiator with 0 being used to identify initiator itself, 1 for next farther node, etc. This hop number is always unique i.e., two hops cannot have same hop number.')
c_mt_path_hop_addr_type = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 2, 1, 1, 4), inet_address_type()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
cMTPathHopAddrType.setStatus('current')
if mibBuilder.loadTexts:
cMTPathHopAddrType.setDescription('This object specifies the type of IP address specified by the corresponding instance of cMTPathHopAddrType.')
c_mt_path_hop_addr = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 2, 1, 1, 5), inet_address()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
cMTPathHopAddr.setStatus('current')
if mibBuilder.loadTexts:
cMTPathHopAddr.setDescription('This object indicates IP Address type of the hop on a Mediatrace Path.')
c_mt_path_hop_type = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 2, 1, 1, 6), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2))).clone(namedValues=named_values(('mediatrace', 1), ('traceroute', 2)))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
cMTPathHopType.setStatus('current')
if mibBuilder.loadTexts:
cMTPathHopType.setDescription("This object indicates the type of the hop on a Mediatrace path. Currently, only two types are present - mediatrace(1) and traceroute(2). A hop is of type 'mediatrace' if it is discovered by only mediatrace or by both mediatrace and trace-route. The hop is 'trace route' if it is discovered by trace route only.")
c_mt_path_hop_alternate1_addr_type = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 2, 1, 1, 7), inet_address_type()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
cMTPathHopAlternate1AddrType.setStatus('current')
if mibBuilder.loadTexts:
cMTPathHopAlternate1AddrType.setDescription('This object specifies the type of IP address specified by the corresponding instance of cMTPathHopAlternate1AddrType.')
c_mt_path_hop_alternate1_addr = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 2, 1, 1, 8), inet_address()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
cMTPathHopAlternate1Addr.setStatus('current')
if mibBuilder.loadTexts:
cMTPathHopAlternate1Addr.setDescription('This object indicates the IP Address of the first alternate hop on a traceroute path.')
c_mt_path_hop_alternate2_addr_type = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 2, 1, 1, 9), inet_address_type()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
cMTPathHopAlternate2AddrType.setStatus('current')
if mibBuilder.loadTexts:
cMTPathHopAlternate2AddrType.setDescription('This object specifies the type of IP address specified by the corresponding instance of cMTPathHopAlternate2AddrType.')
c_mt_path_hop_alternate2_addr = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 2, 1, 1, 10), inet_address()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
cMTPathHopAlternate2Addr.setStatus('current')
if mibBuilder.loadTexts:
cMTPathHopAlternate2Addr.setDescription('This object indicates the IP Address of the second alternate hop on a traceroute path.')
c_mt_path_hop_alternate3_addr_type = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 2, 1, 1, 11), inet_address_type()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
cMTPathHopAlternate3AddrType.setStatus('current')
if mibBuilder.loadTexts:
cMTPathHopAlternate3AddrType.setDescription('This object specifies the type of IP address specified by the corresponding instance of cMTPathHopAlternate3AddrType.')
c_mt_path_hop_alternate3_addr = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 2, 1, 1, 12), inet_address()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
cMTPathHopAlternate3Addr.setStatus('current')
if mibBuilder.loadTexts:
cMTPathHopAlternate3Addr.setDescription('This object indicates the IP Address of the third alternate hop on a traceroute path.')
c_mt_hop_stats_table = mib_table((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 2, 2))
if mibBuilder.loadTexts:
cMTHopStatsTable.setStatus('current')
if mibBuilder.loadTexts:
cMTHopStatsTable.setDescription('An entry in cMTHopStatsTable represents a hop on the path associated to a Mediatrace session. This table contains information about particular hop (Mediatrace or non-Mediatrace) such as the address, type of hop, etc. A single row corresponds to a hop on the Mediatrace path discovered for a session and is uniquely identified by cMTSessionNumber, cMTSessionLifeNumber, cMTBucketNumber,cMTHopStatsAddrType and cMTHopStatsAddr. The created rows are destroyed when the device undergoes a restart.')
c_mt_hop_stats_entry = mib_table_row((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 2, 2, 1)).setIndexNames((0, 'CISCO-MEDIATRACE-MIB', 'cMTSessionNumber'), (0, 'CISCO-MEDIATRACE-MIB', 'cMTSessionLifeNumber'), (0, 'CISCO-MEDIATRACE-MIB', 'cMTBucketNumber'), (0, 'CISCO-MEDIATRACE-MIB', 'cMTHopStatsAddrType'), (0, 'CISCO-MEDIATRACE-MIB', 'cMTHopStatsAddr'))
if mibBuilder.loadTexts:
cMTHopStatsEntry.setStatus('current')
if mibBuilder.loadTexts:
cMTHopStatsEntry.setDescription('An entry in cMTHopStatsTable')
c_mt_hop_stats_mask_bitmaps = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 2, 2, 1, 1), bits().clone(namedValues=named_values(('mediatraceTtlUnsupported', 0), ('mediatraceTtlUncollected', 1), ('collectionStatsUnsupported', 2), ('collectionStatsUncollected', 3), ('ingressInterfaceUnsupported', 4), ('ingressInterfaceUncollected', 5), ('egressInterfaceUnsupported', 6), ('egressInterfaceUncollected', 7)))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
cMTHopStatsMaskBitmaps.setStatus('current')
if mibBuilder.loadTexts:
cMTHopStatsMaskBitmaps.setDescription('This object indicates whether the corresponding instances of these statistics fields in the table are supported. It also indicates if the statistics data are collected. There are 2 bits for each corresponding field.')
c_mt_hop_stats_addr_type = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 2, 2, 1, 2), inet_address_type())
if mibBuilder.loadTexts:
cMTHopStatsAddrType.setStatus('current')
if mibBuilder.loadTexts:
cMTHopStatsAddrType.setDescription('This object specifies the type of IP address specified by the corresponding instance of cMTHopStatsAddr.')
c_mt_hop_stats_addr = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 2, 2, 1, 3), inet_address())
if mibBuilder.loadTexts:
cMTHopStatsAddr.setStatus('current')
if mibBuilder.loadTexts:
cMTHopStatsAddr.setDescription('This object specifies the IP Address of the hop on a Mediatrace Path. This value is obtained from CMTPathHopAddr in cMTPathTable.')
c_mt_hop_stats_name = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 2, 2, 1, 4), snmp_admin_string()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
cMTHopStatsName.setStatus('current')
if mibBuilder.loadTexts:
cMTHopStatsName.setDescription('This object indicates the name for this hop. This can be either the hostname or the IP address for the hop.')
c_mt_hop_stats_mediatrace_ttl = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 2, 2, 1, 5), unsigned32().subtype(subtypeSpec=value_range_constraint(0, 255))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
cMTHopStatsMediatraceTtl.setReference("J. Postel, 'Internet Protocol', RFC-791, September 1981. J. Deering and R. Hinden, 'Internet Protocol, Version 6 (IPv6) Specification', RFC-2460, December 1998.")
if mibBuilder.loadTexts:
cMTHopStatsMediatraceTtl.setStatus('current')
if mibBuilder.loadTexts:
cMTHopStatsMediatraceTtl.setDescription("This object indicates the hop limit of the corresponding traffic flow. If version 4 of the IP carries the traffic flow, then the value of this column corresponds to the 'Time to Live' field of the IP header contained by packets in the Mediatrace request. If version 6 of the IP carries the traffic flow, then the value of this column corresponds to the 'Hop Limit' field of the IP header contained by packets in the Mediatrace request.")
c_mt_hop_stats_collection_status = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 2, 2, 1, 6), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2))).clone(namedValues=named_values(('success', 1), ('notSuccess', 2)))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
cMTHopStatsCollectionStatus.setStatus('current')
if mibBuilder.loadTexts:
cMTHopStatsCollectionStatus.setDescription("This object indicates the operational status of data being collected on the hop for a specific session: 'success' The hop is actively collecting and responding with data. 'notsuccess' The hop is not collecting or responding with data.")
c_mt_hop_stats_ingress_interface = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 2, 2, 1, 7), snmp_admin_string()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
cMTHopStatsIngressInterface.setStatus('current')
if mibBuilder.loadTexts:
cMTHopStatsIngressInterface.setDescription('This object indicates the interface on the responder that receives the Mediatrace request from the initiator.')
c_mt_hop_stats_egress_interface = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 2, 2, 1, 8), snmp_admin_string()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
cMTHopStatsEgressInterface.setStatus('current')
if mibBuilder.loadTexts:
cMTHopStatsEgressInterface.setDescription("This object indicates the interface on the responder which is used to forward the Mediatrace request from the initiator towards destination in the path specifier. Value of 'None' will be shown if the destination address in path specifier terminates on this hop.")
c_mt_trace_route_table = mib_table((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 2, 3))
if mibBuilder.loadTexts:
cMTTraceRouteTable.setStatus('current')
if mibBuilder.loadTexts:
cMTTraceRouteTable.setDescription('This table lists the hops discovered by traceroute executed from the initiator. These are the hops which are on media flow path but on which mediatrace is not enabled or is not supported.')
c_mt_trace_route_entry = mib_table_row((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 2, 3, 1)).setIndexNames((0, 'CISCO-MEDIATRACE-MIB', 'cMTSessionNumber'), (0, 'CISCO-MEDIATRACE-MIB', 'cMTSessionLifeNumber'), (0, 'CISCO-MEDIATRACE-MIB', 'cMTBucketNumber'), (0, 'CISCO-MEDIATRACE-MIB', 'cMTHopStatsAddrType'), (0, 'CISCO-MEDIATRACE-MIB', 'cMTHopStatsAddr'))
if mibBuilder.loadTexts:
cMTTraceRouteEntry.setStatus('current')
if mibBuilder.loadTexts:
cMTTraceRouteEntry.setDescription('An entry in cMTTraceRouteTable represents a Traceroute hop on the path associated to a Mediatrace session. The created rows are destroyed when the device undergoes a restart.')
c_mt_trace_route_hop_number = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 2, 3, 1, 1), gauge32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
cMTTraceRouteHopNumber.setStatus('current')
if mibBuilder.loadTexts:
cMTTraceRouteHopNumber.setDescription('This object indicates the hop number of Traceroute host relative to the Initiator. It start with 1 and increments as we go farther from the Initiator.')
c_mt_trace_route_hop_rtt = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 2, 3, 1, 2), counter64()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
cMTTraceRouteHopRtt.setStatus('current')
if mibBuilder.loadTexts:
cMTTraceRouteHopRtt.setDescription('This object indicates RTT. The time it takes for a packet to get to a hop and back, displayed in milliseconds. (ms).')
c_mt_session_status_table = mib_table((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 2, 4))
if mibBuilder.loadTexts:
cMTSessionStatusTable.setStatus('current')
if mibBuilder.loadTexts:
cMTSessionStatusTable.setDescription('This table contains aggregate data maintained by Mediatrace for session status.')
c_mt_session_status_entry = mib_table_row((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 2, 4, 1)).setIndexNames((0, 'CISCO-MEDIATRACE-MIB', 'cMTSessionNumber'))
if mibBuilder.loadTexts:
cMTSessionStatusEntry.setStatus('current')
if mibBuilder.loadTexts:
cMTSessionStatusEntry.setDescription('An entry in cMTSessionStatusTable represents information about a Mediatrace session. This table contains information about particular session such as global session identifier, operation state and time to live. A single row corresponds to status of a Mediatrace session and is uniquely identified by cMTSessionNumber. The created rows are destroyed when the device undergoes a restart.')
c_mt_session_status_bitmaps = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 2, 4, 1, 1), bits().clone(namedValues=named_values(('globalSessionIdUusupport', 0), ('globalSessionIdUncollected', 1), ('operationStateUusupport', 2), ('operationStateUncollected', 3), ('operationTimeToLiveUusupport', 4), ('operationTimeToLiveUncollected', 5)))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
cMTSessionStatusBitmaps.setStatus('current')
if mibBuilder.loadTexts:
cMTSessionStatusBitmaps.setDescription('This object indicates whether the corresponding instances of these statistics fields in the table are supported. It also indicates if the statistics are collected. There are 2 bits for each field.')
c_mt_session_status_global_session_id = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 2, 4, 1, 2), unsigned32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
cMTSessionStatusGlobalSessionId.setStatus('current')
if mibBuilder.loadTexts:
cMTSessionStatusGlobalSessionId.setDescription('This object indicates a globally unique Id to identify a session throughout the network.')
c_mt_session_status_operation_state = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 2, 4, 1, 3), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3, 4))).clone(namedValues=named_values(('pending', 1), ('active', 2), ('inactive', 3), ('sleep', 4)))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
cMTSessionStatusOperationState.setStatus('current')
if mibBuilder.loadTexts:
cMTSessionStatusOperationState.setDescription('This object indicates the operation status of the session. pending - Session is not currently active. active - Session is in active state. inactive - Session is not active but it has not aged out. sleep - Session is in sleep state.')
c_mt_session_status_operation_time_to_live = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 2, 4, 1, 4), counter64()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
cMTSessionStatusOperationTimeToLive.setStatus('current')
if mibBuilder.loadTexts:
cMTSessionStatusOperationTimeToLive.setDescription('This object indicates how long the session operation will last.')
c_mt_session_request_stats_table = mib_table((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 2, 5))
if mibBuilder.loadTexts:
cMTSessionRequestStatsTable.setStatus('current')
if mibBuilder.loadTexts:
cMTSessionRequestStatsTable.setDescription('This table contains aggregate data maintained by Mediatrace for session request status.')
c_mt_session_request_stats_entry = mib_table_row((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 2, 5, 1)).setIndexNames((0, 'CISCO-MEDIATRACE-MIB', 'cMTSessionNumber'), (0, 'CISCO-MEDIATRACE-MIB', 'cMTSessionLifeNumber'), (0, 'CISCO-MEDIATRACE-MIB', 'cMTBucketNumber'))
if mibBuilder.loadTexts:
cMTSessionRequestStatsEntry.setStatus('current')
if mibBuilder.loadTexts:
cMTSessionRequestStatsEntry.setDescription('An entry in cMTSessionRequestStatsTable represents status for each request for a particular session. A single row corresponds to a request sent by a particular Mediatrace session and is uniquely identified by cMTSessionNumber, cMTSessionLifeNumber and cMTBucketNumber. The created rows are destroyed when the device undergoes a restart.')
c_mt_session_request_stats_bitmaps = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 2, 5, 1, 1), bits().clone(namedValues=named_values(('requestTimestampUnsupport', 0), ('requestTimestampUncollected', 1), ('requestStatusUnsupport', 2), ('requestStatusUncollected', 3), ('tracerouteStatusUnsupport', 4), ('tracerouteStatusUncollected', 5), ('routeIndexUnsupport', 6), ('routeIndexUncollected', 7), ('numberOfMediatraceHopsUnsupport', 8), ('numberOfMediatraceHopsUncollected', 9), ('numberOfNonMediatraceHopsUnsupport', 10), ('numberOfNonMediatraceHopsUncollected', 11), ('numberOfValidHopsUnsupport', 12), ('numberOfValidHopsUncollected', 13), ('numberOfErrorHopsUnsupport', 14), ('numberOfErrorHopsUncollected', 15), ('numberOfNoDataRecordHopsUnsupport', 16), ('numberOfNoDataRecordHopsUncollected', 17), ('metaGlobalIdUnsupport', 18), ('metaGlobalIdUncollected', 19), ('metaMultiPartySessionIdUnsupport', 20), ('metaMultiPartySessionIdUncollected', 21), ('metaAppNameUnsupport', 22), ('metaAppNameUncollected', 23)))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
cMTSessionRequestStatsBitmaps.setStatus('current')
if mibBuilder.loadTexts:
cMTSessionRequestStatsBitmaps.setDescription('This object indicates whether the corresponding instances of these stats fields in the table are supported. It also indicates if the stats data are collected. There are 2 bits for each corresponding field.')
c_mt_session_request_stats_request_timestamp = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 2, 5, 1, 2), time_stamp()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
cMTSessionRequestStatsRequestTimestamp.setStatus('current')
if mibBuilder.loadTexts:
cMTSessionRequestStatsRequestTimestamp.setDescription('This object indicates the value of request time when the request was sent our by the initiator for this particular session.')
c_mt_session_request_stats_request_status = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 2, 5, 1, 3), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2))).clone(namedValues=named_values(('completed', 1), ('notCompleted', 2)))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
cMTSessionRequestStatsRequestStatus.setStatus('current')
if mibBuilder.loadTexts:
cMTSessionRequestStatsRequestStatus.setDescription('This object indicates the status of request for the session.')
c_mt_session_request_stats_traceroute_status = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 2, 5, 1, 4), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2))).clone(namedValues=named_values(('completed', 1), ('notCompleted', 2)))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
cMTSessionRequestStatsTracerouteStatus.setStatus('current')
if mibBuilder.loadTexts:
cMTSessionRequestStatsTracerouteStatus.setDescription('This object indicates the status of traceroute for the session.')
c_mt_session_request_stats_route_index = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 2, 5, 1, 5), gauge32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
cMTSessionRequestStatsRouteIndex.setStatus('current')
if mibBuilder.loadTexts:
cMTSessionRequestStatsRouteIndex.setDescription('This object indicates the route index for the session request. It signifies the number of times a route has changed for a particular session. 0 signifies no route change.')
c_mt_session_request_stats_number_of_mediatrace_hops = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 2, 5, 1, 6), counter32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
cMTSessionRequestStatsNumberOfMediatraceHops.setStatus('current')
if mibBuilder.loadTexts:
cMTSessionRequestStatsNumberOfMediatraceHops.setDescription('This object indicates the number of Mediatrace hops in the path.')
c_mt_session_request_stats_number_of_non_mediatrace_hops = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 2, 5, 1, 7), counter32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
cMTSessionRequestStatsNumberOfNonMediatraceHops.setStatus('current')
if mibBuilder.loadTexts:
cMTSessionRequestStatsNumberOfNonMediatraceHops.setDescription('This object indicates the number of non-Mediatrace hops in the path.')
c_mt_session_request_stats_number_of_valid_hops = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 2, 5, 1, 8), counter32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
cMTSessionRequestStatsNumberOfValidHops.setStatus('current')
if mibBuilder.loadTexts:
cMTSessionRequestStatsNumberOfValidHops.setDescription('This object indicates the number of hops with valid data report.')
c_mt_session_request_stats_number_of_error_hops = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 2, 5, 1, 9), counter32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
cMTSessionRequestStatsNumberOfErrorHops.setStatus('current')
if mibBuilder.loadTexts:
cMTSessionRequestStatsNumberOfErrorHops.setDescription('This object indicates the number of hops with error report. These hops are not able to return the statistics due to some issue.')
c_mt_session_request_stats_number_of_no_data_record_hops = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 2, 5, 1, 10), counter32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
cMTSessionRequestStatsNumberOfNoDataRecordHops.setStatus('current')
if mibBuilder.loadTexts:
cMTSessionRequestStatsNumberOfNoDataRecordHops.setDescription('This object indicates the number of hops with no data record.')
c_mt_session_request_stats_md_global_id = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 2, 5, 1, 11), octet_string()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
cMTSessionRequestStatsMDGlobalId.setStatus('current')
if mibBuilder.loadTexts:
cMTSessionRequestStatsMDGlobalId.setDescription('This object indicates the meta-data global Id for this session.')
c_mt_session_request_stats_md_multi_party_session_id = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 2, 5, 1, 12), octet_string()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
cMTSessionRequestStatsMDMultiPartySessionId.setStatus('current')
if mibBuilder.loadTexts:
cMTSessionRequestStatsMDMultiPartySessionId.setDescription('This object indicates the meta-data Multi Party Session Id for this session.')
c_mt_session_request_stats_md_app_name = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 2, 5, 1, 13), octet_string()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
cMTSessionRequestStatsMDAppName.setStatus('current')
if mibBuilder.loadTexts:
cMTSessionRequestStatsMDAppName.setDescription('This object indicates the meta-data AppName for this session.')
c_mt_common_metric_stats_table = mib_table((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 2, 6))
if mibBuilder.loadTexts:
cMTCommonMetricStatsTable.setStatus('current')
if mibBuilder.loadTexts:
cMTCommonMetricStatsTable.setDescription('This table contains the list of entries representing common IP metrics values for a particular mediatrace session on particular hop.')
c_mt_common_metric_stats_entry = mib_table_row((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 2, 6, 1)).setIndexNames((0, 'CISCO-MEDIATRACE-MIB', 'cMTSessionNumber'), (0, 'CISCO-MEDIATRACE-MIB', 'cMTSessionLifeNumber'), (0, 'CISCO-MEDIATRACE-MIB', 'cMTBucketNumber'), (0, 'CISCO-MEDIATRACE-MIB', 'cMTHopStatsAddrType'), (0, 'CISCO-MEDIATRACE-MIB', 'cMTHopStatsAddr'))
if mibBuilder.loadTexts:
cMTCommonMetricStatsEntry.setStatus('current')
if mibBuilder.loadTexts:
cMTCommonMetricStatsEntry.setDescription('An entry in cMTCommonMetricStatsTable represents common media monitor profile information of a hop on the path associated to a Mediatrace session such as flow sampling time stamp, packets dropped, IP TTL, etc. The devices creates a row in the cMTCommonMetricStatsTable when a Mediatrace session starts collecting a traffic metrics data and has been configured to compute common IP metrics. Likewise, the device destroys a row in the cMTCommonMetricStatsTable when the corresponding Mediatrace session has ceased collecting the traffic metrics data (e.g., when a scheduled session has timed out). A single row corresponds to a common media monitor profile information of a hop on the path discovered for a session and is uniquely identified by cMTSessionNumber, cMTSessionLifeNumber, cMTBucketNumber,cMTHopStatsAddrType and cMTHopStatsAddr. The created rows are destroyed when the device undergoes a restart.')
c_mt_common_metrics_bitmaps = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 2, 6, 1, 2), bits().clone(namedValues=named_values(('flowSamplingStartTimeUnsupported', 0), ('flowSamplingStartTimeUncollected', 1), ('ipPktDroppedUnsupported', 2), ('ipPktDroppedUncollected', 3), ('ipPktCountUnsupported', 4), ('ipPktCountUncollected', 5), ('ipOctetsUnsupported', 6), ('ipOctetsUncollected', 7), ('ipByteRateUnsupported', 8), ('ipByteRateUncollected', 9), ('ipDscpUnsupported', 10), ('ipDscpUncollected', 11), ('ipTtlUnsupported', 12), ('ipTtlUncollected', 13), ('flowCounterUnsupported', 14), ('flowCounterUncollected', 15), ('flowDirectionUnsupported', 16), ('flowDirectionUncollected', 17), ('lossMeasurementUnsupported', 18), ('lossMeasurementUncollected', 19), ('mediaStopOccurredUnsupported', 20), ('mediaStopOccurredUncollected', 21), ('routeForwardUnsupported', 22), ('routeForwardUncollected', 23), ('ipProtocolUnsupported', 24), ('ipProtocolUncollected', 25)))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
cMTCommonMetricsBitmaps.setStatus('current')
if mibBuilder.loadTexts:
cMTCommonMetricsBitmaps.setDescription('This object indicates whether the corresponding instances of these stats fields in the table are supported. It also indicates if the stats data are collected. There are 2 bits for each field.')
c_mt_common_metrics_flow_sampling_start_time = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 2, 6, 1, 3), cisco_ntp_time_stamp()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
cMTCommonMetricsFlowSamplingStartTime.setStatus('current')
if mibBuilder.loadTexts:
cMTCommonMetricsFlowSamplingStartTime.setDescription('This object defines the the timestamp when the statistics were collected on the responder.')
c_mt_common_metrics_ip_pkt_dropped = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 2, 6, 1, 4), counter64()).setUnits('packets').setMaxAccess('readonly')
if mibBuilder.loadTexts:
cMTCommonMetricsIpPktDropped.setStatus('current')
if mibBuilder.loadTexts:
cMTCommonMetricsIpPktDropped.setDescription("This object indicates number of packet drops observed on the flow being monitored on this hop from flow sampling start time in window of 'sample interval' length.")
c_mt_common_metrics_ip_octets = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 2, 6, 1, 5), counter64()).setUnits('octets').setMaxAccess('readonly')
if mibBuilder.loadTexts:
cMTCommonMetricsIpOctets.setStatus('current')
if mibBuilder.loadTexts:
cMTCommonMetricsIpOctets.setDescription('This object indicates the total number of octets contained by the packets processed by the Mediatrace request for the corresponding traffic flow.')
c_mt_common_metrics_ip_pkt_count = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 2, 6, 1, 6), counter64()).setUnits('packets').setMaxAccess('readonly')
if mibBuilder.loadTexts:
cMTCommonMetricsIpPktCount.setStatus('current')
if mibBuilder.loadTexts:
cMTCommonMetricsIpPktCount.setDescription('This object indicates the total number of packets processed by the Mediatrace request for the corresponding traffic flow.')
c_mt_common_metrics_ip_byte_rate = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 2, 6, 1, 7), gauge32()).setUnits('packets per second').setMaxAccess('readonly')
if mibBuilder.loadTexts:
cMTCommonMetricsIpByteRate.setStatus('current')
if mibBuilder.loadTexts:
cMTCommonMetricsIpByteRate.setDescription('This object indicates the average packet rate at which the Mediatrace request is processing data for the corresponding traffic flow. This value is cumulative over the lifetime of the traffic flow.')
c_mt_common_metrics_ip_dscp = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 2, 6, 1, 8), unsigned32().subtype(subtypeSpec=value_range_constraint(0, 64))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
cMTCommonMetricsIpDscp.setStatus('current')
if mibBuilder.loadTexts:
cMTCommonMetricsIpDscp.setDescription("This object indicates the DSCP value of the corresponding traffic flow. If version 4 of the IP carries the traffic flow, then the value of this column corresponds to the DSCP part of 'Type of Service' field of the IP header contained by packets in the traffic flow. If version 6 of the IP carries the traffic flow, then the value of this column corresponds to DSCP part of the 'Traffic Class' field of the IP header contained by packets in the traffic flow.")
c_mt_common_metrics_ip_ttl = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 2, 6, 1, 9), unsigned32().subtype(subtypeSpec=value_range_constraint(0, 255))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
cMTCommonMetricsIpTtl.setReference("J. Postel, 'Internet Protocol', RFC-791, September 1981. J. Deering and R. Hinden, 'Internet Protocol, Version 6 (IPv6) Specification', RFC-2460, December 1998.")
if mibBuilder.loadTexts:
cMTCommonMetricsIpTtl.setStatus('current')
if mibBuilder.loadTexts:
cMTCommonMetricsIpTtl.setDescription("This object indicates the hop limit of the corresponding traffic flow. If version 4 of the IP carries the traffic flow, then the value of this column corresponds to the 'Time to Live' field of the IP header contained by packets in the Mediatrace request. If version 6 of the IP carries the traffic flow, then the value of this column corresponds to the 'Hop Limit' field of the IP header contained by packets in the Mediatrace request.")
c_mt_common_metrics_flow_counter = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 2, 6, 1, 10), gauge32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
cMTCommonMetricsFlowCounter.setStatus('current')
if mibBuilder.loadTexts:
cMTCommonMetricsFlowCounter.setDescription('This object indicates the number of traffic flows currently monitored by the Mediatrace request.')
c_mt_common_metrics_flow_direction = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 2, 6, 1, 11), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3))).clone(namedValues=named_values(('unknown', 1), ('ingress', 2), ('egress', 3)))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
cMTCommonMetricsFlowDirection.setStatus('current')
if mibBuilder.loadTexts:
cMTCommonMetricsFlowDirection.setDescription("This object indicates the direction of the traffic flow where the data is monitored : 'unknown' The SNMP entity does not know the direction of the traffic flow at the point data is collected. 'ingress' Data is collected at the point where the traffic flow enters the devices 'egress' Data is colected at the point where the traffic flow leaves the device.")
c_mt_common_metrics_loss_measurement = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 2, 6, 1, 12), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2))).clone(namedValues=named_values(('true', 1), ('false', 2)))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
cMTCommonMetricsLossMeasurement.setStatus('current')
if mibBuilder.loadTexts:
cMTCommonMetricsLossMeasurement.setDescription('This object indicates the loss measurement.')
c_mt_common_metrics_media_stop_occurred = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 2, 6, 1, 13), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2))).clone(namedValues=named_values(('true', 1), ('false', 2)))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
cMTCommonMetricsMediaStopOccurred.setStatus('current')
if mibBuilder.loadTexts:
cMTCommonMetricsMediaStopOccurred.setDescription('This object indicates the media stop occurred.')
c_mt_common_metrics_route_forward = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 2, 6, 1, 14), snmp_admin_string()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
cMTCommonMetricsRouteForward.setStatus('current')
if mibBuilder.loadTexts:
cMTCommonMetricsRouteForward.setDescription('This object indicates routing or forwarding status i.e. whether the packet is forwarded or dropped for the flow.')
c_mt_common_metrics_ip_protocol = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 2, 6, 1, 15), cisco_mediatrace_support_protocol()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
cMTCommonMetricsIpProtocol.setStatus('current')
if mibBuilder.loadTexts:
cMTCommonMetricsIpProtocol.setDescription('This table contains entry to specify the media Metric-list for the particular Mmediatrace session on the hop.')
c_mt_rtp_metric_stats_table = mib_table((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 2, 7))
if mibBuilder.loadTexts:
cMTRtpMetricStatsTable.setStatus('current')
if mibBuilder.loadTexts:
cMTRtpMetricStatsTable.setDescription('This table contains aggregate data maintained by Mediatrace for traffic flows for which it is computing RTP metrics.')
c_mt_rtp_metric_stats_entry = mib_table_row((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 2, 7, 1))
cMTCommonMetricStatsEntry.registerAugmentions(('CISCO-MEDIATRACE-MIB', 'cMTRtpMetricStatsEntry'))
cMTRtpMetricStatsEntry.setIndexNames(*cMTCommonMetricStatsEntry.getIndexNames())
if mibBuilder.loadTexts:
cMTRtpMetricStatsEntry.setStatus('current')
if mibBuilder.loadTexts:
cMTRtpMetricStatsEntry.setDescription('An entry in cMTRtpMetricStatsTable represents RTP related information of a hop on the path associated to a Mediatrace session such as bit rate, octets, etc. The devices creates a row in the cMTRtpMetricStatsTable when a Mediatrace session starts collecting a traffic metrics data and has been configured to compute RTP metrics for the same traffic metrics data. Likewise, the device destroys a row in the cMTRtpMetricStatsTable when the corresponding Mediatrace session has ceased collecting the traffic metrics data (e.g., when a scheduled session has timed out). A single row corresponds to a RTP information of a hop on the path discovered for a Mediatrace session and is uniquely identified by cMTSessionNumber, cMTSessionLifeNumber, cMTBucketNumber,cMTHopStatsAddrType and cMTHopStatsAddr. The created rows are destroyed when the device undergoes a restart.')
c_mt_rtp_metrics_bitmaps = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 2, 7, 1, 2), bits().clone(namedValues=named_values(('bitRateunSupport', 0), ('bitRateunCollected', 1), ('octetsunSupport', 2), ('octetsunCollected', 3), ('pktsunSupport', 4), ('pktsunCollected', 5), ('jitterunSupport', 6), ('jitterunCollected', 7), ('lostPktsunSupport', 8), ('lostPktsunCollected', 9), ('expectedPktsunSupport', 10), ('expectedPktsunCollected', 11), ('lostPktEventsunSupport', 12), ('lostPktEventsunCollected', 13), ('losspercentUnsupport', 14), ('losspercentUncollected', 15)))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
cMTRtpMetricsBitmaps.setStatus('current')
if mibBuilder.loadTexts:
cMTRtpMetricsBitmaps.setDescription('This object indicates whether the corresponding instances of these statistics fields in the table are supported. It also indicates if the stats data are collected. There are 2 bits for each field.')
c_mt_rtp_metrics_bit_rate = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 2, 7, 1, 3), gauge32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
cMTRtpMetricsBitRate.setStatus('current')
if mibBuilder.loadTexts:
cMTRtpMetricsBitRate.setDescription('This object indicates the average bit rate at which the corresponding Mediatrace request is processing data for the corresponding traffic flow. This value is cumulative over the lifetime of the traffic flow.')
c_mt_rtp_metrics_octets = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 2, 7, 1, 4), counter64()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
cMTRtpMetricsOctets.setStatus('current')
if mibBuilder.loadTexts:
cMTRtpMetricsOctets.setDescription('This object indicates the total number of octets contained by the packets processed by the Mediatrace request for the corresponding traffic flow.')
c_mt_rtp_metrics_pkts = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 2, 7, 1, 5), counter64()).setUnits('packets').setMaxAccess('readonly')
if mibBuilder.loadTexts:
cMTRtpMetricsPkts.setStatus('current')
if mibBuilder.loadTexts:
cMTRtpMetricsPkts.setDescription('This object indicates the total number of packets processed by the corresponding Mediatrace request for the corresponding traffic flow.')
c_mt_rtp_metrics_jitter = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 2, 7, 1, 6), flow_metric_value()).setUnits('seconds').setMaxAccess('readonly')
if mibBuilder.loadTexts:
cMTRtpMetricsJitter.setStatus('current')
if mibBuilder.loadTexts:
cMTRtpMetricsJitter.setDescription('This object indicates the inter-arrival jitter for the traffic flow.')
c_mt_rtp_metrics_lost_pkts = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 2, 7, 1, 7), counter64()).setUnits('packets').setMaxAccess('readonly')
if mibBuilder.loadTexts:
cMTRtpMetricsLostPkts.setStatus('current')
if mibBuilder.loadTexts:
cMTRtpMetricsLostPkts.setDescription('This object indicates the number of RTP packets lost for the traffic flow.')
c_mt_rtp_metrics_expected_pkts = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 2, 7, 1, 8), counter64()).setUnits('packets').setMaxAccess('readonly')
if mibBuilder.loadTexts:
cMTRtpMetricsExpectedPkts.setStatus('current')
if mibBuilder.loadTexts:
cMTRtpMetricsExpectedPkts.setDescription('This object indicates the number of RTP packets expected for the traffic flow.')
c_mt_rtp_metrics_lost_pkt_events = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 2, 7, 1, 9), counter64()).setUnits('packets').setMaxAccess('readonly')
if mibBuilder.loadTexts:
cMTRtpMetricsLostPktEvents.setStatus('current')
if mibBuilder.loadTexts:
cMTRtpMetricsLostPktEvents.setDescription('This object indicates the number of packet loss events observed by the Mediatrace request for the corresponding traffic flow.')
c_mt_rtp_metrics_loss_percent = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 2, 7, 1, 10), gauge32().subtype(subtypeSpec=value_range_constraint(0, 100))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
cMTRtpMetricsLossPercent.setStatus('current')
if mibBuilder.loadTexts:
cMTRtpMetricsLossPercent.setDescription('This object indicates the percentage of packages are lost per ten thousand packets in a traffic flow.')
c_mt_tcp_metric_stats_table = mib_table((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 2, 8))
if mibBuilder.loadTexts:
cMTTcpMetricStatsTable.setStatus('current')
if mibBuilder.loadTexts:
cMTTcpMetricStatsTable.setDescription('This table contains aggregate data maintained by Mediatrace for traffic flows for which it is computing TCP metrics.')
c_mt_tcp_metric_stats_entry = mib_table_row((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 2, 8, 1))
cMTCommonMetricStatsEntry.registerAugmentions(('CISCO-MEDIATRACE-MIB', 'cMTTcpMetricStatsEntry'))
cMTTcpMetricStatsEntry.setIndexNames(*cMTCommonMetricStatsEntry.getIndexNames())
if mibBuilder.loadTexts:
cMTTcpMetricStatsEntry.setStatus('current')
if mibBuilder.loadTexts:
cMTTcpMetricStatsEntry.setDescription('An entry in cMTTcpMetricStatsTable represents TCP information of a hop on the path associated to a Mediatrace session such as byte count, round trip delay, etc. The devices creates a row in the cMTTcpMetricStatsTable when a Mediatrace session starts collecting a traffic metrics data and has been configured to compute TCP metrics for the same traffic metrics data. Likewise, the device destroys a row in the cMTTcpMetricStatsTable when the corresponding Mediatrace session has ceased collecting the traffic metrics data (e.g., when a scheduled session has timed out). A single row corresponds to TCP information of a hop on the path discovered for a Mediatrace session and is uniquely identified by cMTSessionNumber, cMTSessionLifeNumber, cMTBucketNumber,cMTHopStatsAddrType and cMTHopStatsAddr. The created rows are destroyed when the device undergoes a restart.')
c_mt_tcp_metric_bitmaps = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 2, 8, 1, 2), bits().clone(namedValues=named_values(('mediaByteCountUnsupport', 0), ('mediaByteCountUncollected', 1), ('connectRoundTripDelayUnsupport', 2), ('connectRoundTripDelayUncollected', 3), ('lostEventCountUnsupport', 4), ('lostEventCountUncollected', 5)))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
cMTTcpMetricBitmaps.setStatus('current')
if mibBuilder.loadTexts:
cMTTcpMetricBitmaps.setDescription('This object indicates whether the corresponding instances of these stats fields in the table are supported. It also indicates if the stats data are collected. There are 2 bits for each field.')
c_mt_tcp_metric_media_byte_count = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 2, 8, 1, 3), flow_metric_value()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
cMTTcpMetricMediaByteCount.setStatus('current')
if mibBuilder.loadTexts:
cMTTcpMetricMediaByteCount.setDescription('This object indicates the number of bytes for the packets observed by the Mediatrace session for the corresponding flow.')
c_mt_tcp_metric_connect_round_trip_delay = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 2, 8, 1, 4), counter64()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
cMTTcpMetricConnectRoundTripDelay.setStatus('current')
if mibBuilder.loadTexts:
cMTTcpMetricConnectRoundTripDelay.setDescription('This object indicates the round trip time for the packets observed by the Mediatrace session for the corresponding flow. The round trip time is defined as the length of time it takes for a TCP segment transmission and receipt of acknowledgement. This object indicates the connect round trip delay.')
c_mt_tcp_metric_lost_event_count = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 2, 8, 1, 5), counter64()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
cMTTcpMetricLostEventCount.setStatus('current')
if mibBuilder.loadTexts:
cMTTcpMetricLostEventCount.setDescription('This object indicates the number of packets lost for the traffic flow.')
c_mt_system_metric_stats_table = mib_table((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 2, 9))
if mibBuilder.loadTexts:
cMTSystemMetricStatsTable.setStatus('current')
if mibBuilder.loadTexts:
cMTSystemMetricStatsTable.setDescription('A list of objects which accumulate the system metrics results of a particular node for that path.')
c_mt_system_metric_stats_entry = mib_table_row((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 2, 9, 1)).setIndexNames((0, 'CISCO-MEDIATRACE-MIB', 'cMTSessionNumber'), (0, 'CISCO-MEDIATRACE-MIB', 'cMTSessionLifeNumber'), (0, 'CISCO-MEDIATRACE-MIB', 'cMTBucketNumber'), (0, 'CISCO-MEDIATRACE-MIB', 'cMTHopStatsAddrType'), (0, 'CISCO-MEDIATRACE-MIB', 'cMTHopStatsAddr'))
if mibBuilder.loadTexts:
cMTSystemMetricStatsEntry.setStatus('current')
if mibBuilder.loadTexts:
cMTSystemMetricStatsEntry.setDescription('An entry in cMTSystemMetricStatsTable represents CPU or memory utilization information of a hop on the path associated to a Mediatrace session such as five minutes CPU utilization, memory utilization, etc. The devices creates a row in the cMTSystemMetricStatsTable when a Mediatrace session starts collecting a system metrics data and has been configured to compute system metrics. Likewise, the device destroys a row in the cMTSystemMetricStatsTable when the corresponding Mediatrace session has ceased collecting the system metrics data (e.g., when a scheduled session has timed out). A single row corresponds to a CPU or memory utilization information of a hop on the path discovered for a Mediatrace session and is uniquely identified by cMTSessionNumber, cMTSessionLifeNumber, cMTBucketNumber,cMTHopStatsAddrType and cMTHopStatsAddr. The created rows are destroyed when the device undergoes a restart.')
c_mt_system_metric_bitmaps = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 2, 9, 1, 1), bits().clone(namedValues=named_values(('cpuOneMinuteUtilizationUnsupport', 0), ('cpuOneMinuteUtilizationUncollected', 1), ('cpuFiveMinutesUtilizationUnsupport', 2), ('cpuFiveMinutesUtilizationUncollected', 3), ('memoryMetricsUnsupport', 4), ('memoryMetricsUncollected', 5)))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
cMTSystemMetricBitmaps.setStatus('current')
if mibBuilder.loadTexts:
cMTSystemMetricBitmaps.setDescription('This object indicates whether the corresponding instances of these stats fields in the table are supported. It also indicates if the stats data are collected. There are 2 bits for each field.')
c_mt_system_metric_cpu_one_minute_utilization = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 2, 9, 1, 2), gauge32().subtype(subtypeSpec=value_range_constraint(0, 100))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
cMTSystemMetricCpuOneMinuteUtilization.setStatus('current')
if mibBuilder.loadTexts:
cMTSystemMetricCpuOneMinuteUtilization.setDescription('This object indicates the overall CPU busy percentage in the last 1 minute period for the network element')
c_mt_system_metric_cpu_five_minutes_utilization = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 2, 9, 1, 3), gauge32().subtype(subtypeSpec=value_range_constraint(0, 100))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
cMTSystemMetricCpuFiveMinutesUtilization.setStatus('current')
if mibBuilder.loadTexts:
cMTSystemMetricCpuFiveMinutesUtilization.setDescription('This object indicates the overall CPU busy percentage in the last 5 minute period for the network element')
c_mt_system_metric_memory_utilization = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 2, 9, 1, 4), gauge32().subtype(subtypeSpec=value_range_constraint(0, 100))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
cMTSystemMetricMemoryUtilization.setStatus('current')
if mibBuilder.loadTexts:
cMTSystemMetricMemoryUtilization.setDescription('This object indicates the overall memory usage percentage for the node.')
c_mt_interface_metric_stats_table = mib_table((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 2, 10))
if mibBuilder.loadTexts:
cMTInterfaceMetricStatsTable.setStatus('current')
if mibBuilder.loadTexts:
cMTInterfaceMetricStatsTable.setDescription('This table contains aggregate data of interface information for the network nodes.')
c_mt_interface_metric_stats_entry = mib_table_row((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 2, 10, 1)).setIndexNames((0, 'CISCO-MEDIATRACE-MIB', 'cMTSessionNumber'), (0, 'CISCO-MEDIATRACE-MIB', 'cMTSessionLifeNumber'), (0, 'CISCO-MEDIATRACE-MIB', 'cMTBucketNumber'), (0, 'CISCO-MEDIATRACE-MIB', 'cMTHopStatsAddrType'), (0, 'CISCO-MEDIATRACE-MIB', 'cMTHopStatsAddr'))
if mibBuilder.loadTexts:
cMTInterfaceMetricStatsEntry.setStatus('current')
if mibBuilder.loadTexts:
cMTInterfaceMetricStatsEntry.setDescription('An entry in cMTInterfaceMetricStatsTable represents interface information of a hop on the path associated to a Mediatrace session such as ingress interface speed, egress interface speed, etc. The devices creates a row in the cMTInterfaceMetricStatsTable when a Mediatrace session starts collecting an interface metrics data and has been configured to compute interface metrics. Likewise, the device destroys a row in the cMTInterfaceMetricStatsTable when the corresponding Mediatrace session has ceased collecting the interface metrics data (e.g., when a scheduled session has timed out). A single row corresponds to a interface information of a hop on the path discovered for a session and is uniquely identified by cMTSessionNumber, cMTSessionLifeNumber, cMTBucketNumber, cMTHopStatsAddrType and cMTHopStatsAddr. The created rows are destroyed when the device undergoes a restart.')
c_mt_interface_bitmaps = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 2, 10, 1, 2), bits().clone(namedValues=named_values(('inSpeedUnsupport', 0), ('inSpeedUncollected', 1), ('outSpeedUnsupport', 2), ('outSpeedUncollected', 3), ('outDiscardsUnsupport', 4), ('outDiscardsUncollected', 5), ('inDiscardsUnsupport', 6), ('inDiscardsUncollected', 7), ('outErrorsUnsupport', 8), ('outErrorsUncollected', 9), ('inErrorsUnsupport', 10), ('inErrorsUncollected', 11), ('outOctetsUnsupport', 12), ('outOctetsUncollected', 13), ('inOctetsUnsupport', 14), ('inOctetsUncollected', 15)))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
cMTInterfaceBitmaps.setStatus('current')
if mibBuilder.loadTexts:
cMTInterfaceBitmaps.setDescription('This object indicates whether the corresponding instances of these stats fields in the table are supported. It also indicates if the stats data are collected. There are 2 bits for each field.')
c_mt_interface_out_speed = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 2, 10, 1, 3), gauge32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
cMTInterfaceOutSpeed.setStatus('current')
if mibBuilder.loadTexts:
cMTInterfaceOutSpeed.setDescription("This object indicates the egress interface's current bandwidth in bits per second. For interfaces which do not vary in bandwidth or for those where no accurate estimation can be made, this object should contain the nominal bandwidth. Currently bandwidth above the maximum value 4,294,967,295 is not supported and it will show the maximum for this condition.")
c_mt_interface_in_speed = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 2, 10, 1, 4), gauge32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
cMTInterfaceInSpeed.setStatus('current')
if mibBuilder.loadTexts:
cMTInterfaceInSpeed.setDescription("This object indicates an estimate of the ingress interface's current bandwidth in bits per second. Currently bandwidth above the maximum value 4,294,967,295 is not supported and it will show the maximum for this condition.")
c_mt_interface_out_discards = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 2, 10, 1, 5), counter32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
cMTInterfaceOutDiscards.setStatus('current')
if mibBuilder.loadTexts:
cMTInterfaceOutDiscards.setDescription('This object indicates the number of outbound packets which were chosen to be discarded even though no errors had been detected to prevent their being transmitted. One possible reason for discarding such a packet could be to free up buffer space.')
c_mt_interface_in_discards = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 2, 10, 1, 6), counter32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
cMTInterfaceInDiscards.setStatus('current')
if mibBuilder.loadTexts:
cMTInterfaceInDiscards.setDescription('This object indicates the number of inbound packets which were chosen to be discarded even though no errors had been detected to prevent their being deliverable to a higher-layer protocol. One possible reason for discarding such a packet could be to free up buffer space. Discontinuities in the value of this counter can occur at re-initialization of the management system, and at other times as indicated by the value of ifCounterDiscontinuityTime.')
c_mt_interface_out_errors = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 2, 10, 1, 7), counter32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
cMTInterfaceOutErrors.setStatus('current')
if mibBuilder.loadTexts:
cMTInterfaceOutErrors.setDescription('This object indicates the error packet number. For packet-oriented interfaces, the number of outbound packets that could not be transmitted because of errors. For character-oriented or fixed-length interfaces, the number of outbound transmission units that could not be transmitted because of errors. Discontinuities in the value of this counter can occur at re-initialization of the management system, and at other times as indicated by the value of ifCounterDiscontinuityTime.')
c_mt_interface_in_errors = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 2, 10, 1, 8), counter32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
cMTInterfaceInErrors.setStatus('current')
if mibBuilder.loadTexts:
cMTInterfaceInErrors.setDescription('This object indicates the error packet number. For packet-oriented interfaces, the number of inbound packets that contained errors preventing them from being deliverable to a higher-layer protocol. For character-oriented or fixed-length interfaces, the number of inbound transmission units that contained errors preventing them from being deliverable to a higher-layer protocol. Discontinuities in the value of this counter can occur at re-initialization of the management system, and at other times as indicated by the value of ifCounterDiscontinuityTime.')
c_mt_interface_out_octets = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 2, 10, 1, 9), counter32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
cMTInterfaceOutOctets.setStatus('current')
if mibBuilder.loadTexts:
cMTInterfaceOutOctets.setDescription('This object indicates the total number of octets transmitted out of the interface, including framing characters. Discontinuities in the value of this counter can occur at re-initialization of the management system, and at other times as indicated by the value of ifCounterDiscontinuityTime.')
c_mt_interface_in_octets = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 800, 1, 2, 10, 1, 10), counter32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
cMTInterfaceInOctets.setStatus('current')
if mibBuilder.loadTexts:
cMTInterfaceInOctets.setDescription('This object indicates the total number of octets received on the interface, including framing characters. Discontinuities in the value of this counter can occur at re-initialization of the management system, and at other times as indicated by the value of ifCounterDiscontinuityTime.')
cisco_mediatrace_mib_compliances = mib_identifier((1, 3, 6, 1, 4, 1, 9, 9, 800, 2, 1))
cisco_mediatrace_mib_groups = mib_identifier((1, 3, 6, 1, 4, 1, 9, 9, 800, 2, 2))
cisco_mediatrace_mib_compliance = module_compliance((1, 3, 6, 1, 4, 1, 9, 9, 800, 2, 1, 1)).setObjects(('CISCO-MEDIATRACE-MIB', 'ciscoMediatraceMIBMainObjectGroup'))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
cisco_mediatrace_mib_compliance = ciscoMediatraceMIBCompliance.setStatus('current')
if mibBuilder.loadTexts:
ciscoMediatraceMIBCompliance.setDescription('This is a default module-compliance containing default object groups.')
cisco_mediatrace_mib_main_object_group = object_group((1, 3, 6, 1, 4, 1, 9, 9, 800, 2, 2, 1)).setObjects(('CISCO-MEDIATRACE-MIB', 'cMTFlowSpecifierRowStatus'), ('CISCO-MEDIATRACE-MIB', 'cMTFlowSpecifierDestAddrType'), ('CISCO-MEDIATRACE-MIB', 'cMTFlowSpecifierDestAddr'), ('CISCO-MEDIATRACE-MIB', 'cMTFlowSpecifierDestPort'), ('CISCO-MEDIATRACE-MIB', 'cMTFlowSpecifierSourceAddrType'), ('CISCO-MEDIATRACE-MIB', 'cMTFlowSpecifierSourceAddr'), ('CISCO-MEDIATRACE-MIB', 'cMTFlowSpecifierSourcePort'), ('CISCO-MEDIATRACE-MIB', 'cMTFlowSpecifierIpProtocol'), ('CISCO-MEDIATRACE-MIB', 'cMTPathSpecifierRowStatus'), ('CISCO-MEDIATRACE-MIB', 'cMTPathSpecifierDestAddrType'), ('CISCO-MEDIATRACE-MIB', 'cMTPathSpecifierDestAddr'), ('CISCO-MEDIATRACE-MIB', 'cMTPathSpecifierDestPort'), ('CISCO-MEDIATRACE-MIB', 'cMTPathSpecifierSourceAddrType'), ('CISCO-MEDIATRACE-MIB', 'cMTPathSpecifierSourceAddr'), ('CISCO-MEDIATRACE-MIB', 'cMTPathSpecifierSourcePort'), ('CISCO-MEDIATRACE-MIB', 'cMTPathSpecifierProtocolForDiscovery'), ('CISCO-MEDIATRACE-MIB', 'cMTPathSpecifierGatewayAddrType'), ('CISCO-MEDIATRACE-MIB', 'cMTPathSpecifierGatewayAddr'), ('CISCO-MEDIATRACE-MIB', 'cMTPathSpecifierGatewayVlanId'), ('CISCO-MEDIATRACE-MIB', 'cMTPathSpecifierIpProtocol'), ('CISCO-MEDIATRACE-MIB', 'cMTSessionParamsResponseTimeout'), ('CISCO-MEDIATRACE-MIB', 'cMTSessionParamsFrequency'), ('CISCO-MEDIATRACE-MIB', 'cMTSessionParamsHistoryBuckets'), ('CISCO-MEDIATRACE-MIB', 'cMTSessionParamsInactivityTimeout'), ('CISCO-MEDIATRACE-MIB', 'cMTSessionParamsRouteChangeReactiontime'), ('CISCO-MEDIATRACE-MIB', 'cMTSessionParamsRowStatus'), ('CISCO-MEDIATRACE-MIB', 'cMTSessionPathSpecifierName'), ('CISCO-MEDIATRACE-MIB', 'cMTMediaMonitorProfileRtpMaxDropout'), ('CISCO-MEDIATRACE-MIB', 'cMTMediaMonitorProfileRtpMaxReorder'), ('CISCO-MEDIATRACE-MIB', 'cMTMediaMonitorProfileRtpMinimalSequential'), ('CISCO-MEDIATRACE-MIB', 'cMTMediaMonitorProfileInterval'), ('CISCO-MEDIATRACE-MIB', 'cMTMediaMonitorProfileRowStatus'), ('CISCO-MEDIATRACE-MIB', 'cMTSessionFlowSpecifierName'), ('CISCO-MEDIATRACE-MIB', 'cMTSessionParamName'), ('CISCO-MEDIATRACE-MIB', 'cMTSessionProfileName'), ('CISCO-MEDIATRACE-MIB', 'cMTSessionRequestStatsRouteIndex'), ('CISCO-MEDIATRACE-MIB', 'cMTSessionRequestStatsTracerouteStatus'), ('CISCO-MEDIATRACE-MIB', 'cMTSessionRowStatus'), ('CISCO-MEDIATRACE-MIB', 'cMTScheduleLife'), ('CISCO-MEDIATRACE-MIB', 'cMTScheduleStartTime'), ('CISCO-MEDIATRACE-MIB', 'cMTScheduleEntryAgeout'), ('CISCO-MEDIATRACE-MIB', 'cMTScheduleRowStatus'), ('CISCO-MEDIATRACE-MIB', 'cMTSystemProfileMetric'), ('CISCO-MEDIATRACE-MIB', 'cMTSystemProfileRowStatus'), ('CISCO-MEDIATRACE-MIB', 'cMTHopStatsMediatraceTtl'), ('CISCO-MEDIATRACE-MIB', 'cMTHopStatsName'), ('CISCO-MEDIATRACE-MIB', 'cMTHopStatsCollectionStatus'), ('CISCO-MEDIATRACE-MIB', 'cMTHopStatsIngressInterface'), ('CISCO-MEDIATRACE-MIB', 'cMTHopStatsEgressInterface'), ('CISCO-MEDIATRACE-MIB', 'cMTPathHopType'), ('CISCO-MEDIATRACE-MIB', 'cMTPathHopAddrType'), ('CISCO-MEDIATRACE-MIB', 'cMTPathHopAddr'), ('CISCO-MEDIATRACE-MIB', 'cMTPathHopAlternate1AddrType'), ('CISCO-MEDIATRACE-MIB', 'cMTPathHopAlternate1Addr'), ('CISCO-MEDIATRACE-MIB', 'cMTPathHopAlternate2AddrType'), ('CISCO-MEDIATRACE-MIB', 'cMTPathHopAlternate2Addr'), ('CISCO-MEDIATRACE-MIB', 'cMTPathHopAlternate3AddrType'), ('CISCO-MEDIATRACE-MIB', 'cMTPathHopAlternate3Addr'), ('CISCO-MEDIATRACE-MIB', 'cMTTraceRouteHopNumber'), ('CISCO-MEDIATRACE-MIB', 'cMTTraceRouteHopRtt'), ('CISCO-MEDIATRACE-MIB', 'cMTSessionRequestStatsRequestTimestamp'), ('CISCO-MEDIATRACE-MIB', 'cMTSessionRequestStatsRequestStatus'), ('CISCO-MEDIATRACE-MIB', 'cMTSessionRequestStatsNumberOfMediatraceHops'), ('CISCO-MEDIATRACE-MIB', 'cMTSessionRequestStatsNumberOfValidHops'), ('CISCO-MEDIATRACE-MIB', 'cMTSessionRequestStatsNumberOfErrorHops'), ('CISCO-MEDIATRACE-MIB', 'cMTSessionRequestStatsNumberOfNoDataRecordHops'), ('CISCO-MEDIATRACE-MIB', 'cMTSessionRequestStatsNumberOfNonMediatraceHops'), ('CISCO-MEDIATRACE-MIB', 'cMTCommonMetricsIpPktDropped'), ('CISCO-MEDIATRACE-MIB', 'cMTCommonMetricsIpOctets'), ('CISCO-MEDIATRACE-MIB', 'cMTCommonMetricsIpPktCount'), ('CISCO-MEDIATRACE-MIB', 'cMTCommonMetricsIpByteRate'), ('CISCO-MEDIATRACE-MIB', 'cMTCommonMetricsIpDscp'), ('CISCO-MEDIATRACE-MIB', 'cMTCommonMetricsIpTtl'), ('CISCO-MEDIATRACE-MIB', 'cMTCommonMetricsFlowCounter'), ('CISCO-MEDIATRACE-MIB', 'cMTCommonMetricsFlowDirection'), ('CISCO-MEDIATRACE-MIB', 'cMTCommonMetricsLossMeasurement'), ('CISCO-MEDIATRACE-MIB', 'cMTCommonMetricsMediaStopOccurred'), ('CISCO-MEDIATRACE-MIB', 'cMTCommonMetricsRouteForward'), ('CISCO-MEDIATRACE-MIB', 'cMTCommonMetricsIpProtocol'), ('CISCO-MEDIATRACE-MIB', 'cMTRtpMetricsBitRate'), ('CISCO-MEDIATRACE-MIB', 'cMTRtpMetricsOctets'), ('CISCO-MEDIATRACE-MIB', 'cMTRtpMetricsPkts'), ('CISCO-MEDIATRACE-MIB', 'cMTRtpMetricsJitter'), ('CISCO-MEDIATRACE-MIB', 'cMTRtpMetricsLostPkts'), ('CISCO-MEDIATRACE-MIB', 'cMTRtpMetricsExpectedPkts'), ('CISCO-MEDIATRACE-MIB', 'cMTRtpMetricsLostPktEvents'), ('CISCO-MEDIATRACE-MIB', 'cMTRtpMetricsLossPercent'), ('CISCO-MEDIATRACE-MIB', 'cMTTcpMetricMediaByteCount'), ('CISCO-MEDIATRACE-MIB', 'cMTTcpMetricConnectRoundTripDelay'), ('CISCO-MEDIATRACE-MIB', 'cMTTcpMetricLostEventCount'), ('CISCO-MEDIATRACE-MIB', 'cMTSystemMetricCpuOneMinuteUtilization'), ('CISCO-MEDIATRACE-MIB', 'cMTSystemMetricCpuFiveMinutesUtilization'), ('CISCO-MEDIATRACE-MIB', 'cMTSystemMetricMemoryUtilization'), ('CISCO-MEDIATRACE-MIB', 'cMTInterfaceOutSpeed'), ('CISCO-MEDIATRACE-MIB', 'cMTInterfaceInSpeed'), ('CISCO-MEDIATRACE-MIB', 'cMTInterfaceOutDiscards'), ('CISCO-MEDIATRACE-MIB', 'cMTInterfaceInDiscards'), ('CISCO-MEDIATRACE-MIB', 'cMTInterfaceOutErrors'), ('CISCO-MEDIATRACE-MIB', 'cMTInterfaceInErrors'), ('CISCO-MEDIATRACE-MIB', 'cMTInterfaceOutOctets'), ('CISCO-MEDIATRACE-MIB', 'cMTInterfaceInOctets'), ('CISCO-MEDIATRACE-MIB', 'cMTMediaMonitorProfileMetric'), ('CISCO-MEDIATRACE-MIB', 'cMTSessionTraceRouteEnabled'), ('CISCO-MEDIATRACE-MIB', 'cMTScheduleRecurring'), ('CISCO-MEDIATRACE-MIB', 'cMTFlowSpecifierMetadataGlobalId'), ('CISCO-MEDIATRACE-MIB', 'cMTPathSpecifierMetadataGlobalId'), ('CISCO-MEDIATRACE-MIB', 'cMTHopStatsMaskBitmaps'), ('CISCO-MEDIATRACE-MIB', 'cMTSessionStatusBitmaps'), ('CISCO-MEDIATRACE-MIB', 'cMTCommonMetricsBitmaps'), ('CISCO-MEDIATRACE-MIB', 'cMTRtpMetricsBitmaps'), ('CISCO-MEDIATRACE-MIB', 'cMTTcpMetricBitmaps'), ('CISCO-MEDIATRACE-MIB', 'cMTSystemMetricBitmaps'), ('CISCO-MEDIATRACE-MIB', 'cMTInterfaceBitmaps'), ('CISCO-MEDIATRACE-MIB', 'cMTSessionStatusOperationState'), ('CISCO-MEDIATRACE-MIB', 'cMTSessionStatusOperationTimeToLive'), ('CISCO-MEDIATRACE-MIB', 'cMTSessionStatusGlobalSessionId'), ('CISCO-MEDIATRACE-MIB', 'cMTSessionRequestStatsBitmaps'), ('CISCO-MEDIATRACE-MIB', 'cMTSessionRequestStatsMDGlobalId'), ('CISCO-MEDIATRACE-MIB', 'cMTSessionRequestStatsMDMultiPartySessionId'), ('CISCO-MEDIATRACE-MIB', 'cMTSessionRequestStatsMDAppName'), ('CISCO-MEDIATRACE-MIB', 'cMTInitiatorEnable'), ('CISCO-MEDIATRACE-MIB', 'cMTInitiatorSourceInterface'), ('CISCO-MEDIATRACE-MIB', 'cMTInitiatorSourceAddressType'), ('CISCO-MEDIATRACE-MIB', 'cMTInitiatorSourceAddress'), ('CISCO-MEDIATRACE-MIB', 'cMTInitiatorMaxSessions'), ('CISCO-MEDIATRACE-MIB', 'cMTInitiatorSoftwareVersionMajor'), ('CISCO-MEDIATRACE-MIB', 'cMTInitiatorProtocolVersionMajor'), ('CISCO-MEDIATRACE-MIB', 'cMTInitiatorConfiguredSessions'), ('CISCO-MEDIATRACE-MIB', 'cMTInitiatorPendingSessions'), ('CISCO-MEDIATRACE-MIB', 'cMTInitiatorInactiveSessions'), ('CISCO-MEDIATRACE-MIB', 'cMTInitiatorActiveSessions'), ('CISCO-MEDIATRACE-MIB', 'cMTResponderEnable'), ('CISCO-MEDIATRACE-MIB', 'cMTResponderMaxSessions'), ('CISCO-MEDIATRACE-MIB', 'cMTResponderActiveSessions'), ('CISCO-MEDIATRACE-MIB', 'cMTInitiatorSoftwareVersionMinor'), ('CISCO-MEDIATRACE-MIB', 'cMTInitiatorProtocolVersionMinor'), ('CISCO-MEDIATRACE-MIB', 'cMTCommonMetricsFlowSamplingStartTime'))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
cisco_mediatrace_mib_main_object_group = ciscoMediatraceMIBMainObjectGroup.setStatus('current')
if mibBuilder.loadTexts:
ciscoMediatraceMIBMainObjectGroup.setDescription('The is a object group.')
mibBuilder.exportSymbols('CISCO-MEDIATRACE-MIB', cMTResponderActiveSessions=cMTResponderActiveSessions, cMTFlowSpecifierSourcePort=cMTFlowSpecifierSourcePort, cMTSessionRequestStatsNumberOfNoDataRecordHops=cMTSessionRequestStatsNumberOfNoDataRecordHops, cMTRtpMetricStatsTable=cMTRtpMetricStatsTable, cMTRtpMetricsLossPercent=cMTRtpMetricsLossPercent, cMTPathHopAddrType=cMTPathHopAddrType, cMTSessionStatusGlobalSessionId=cMTSessionStatusGlobalSessionId, cMTInitiatorActiveSessions=cMTInitiatorActiveSessions, cMTSessionRequestStatsNumberOfNonMediatraceHops=cMTSessionRequestStatsNumberOfNonMediatraceHops, cMTSessionParamsHistoryBuckets=cMTSessionParamsHistoryBuckets, cMTHopStatsEgressInterface=cMTHopStatsEgressInterface, cMTMediaMonitorProfileName=cMTMediaMonitorProfileName, cMTPathHopAlternate1Addr=cMTPathHopAlternate1Addr, cMTHopStatsEntry=cMTHopStatsEntry, cMTPathSpecifierEntry=cMTPathSpecifierEntry, cMTTraceRouteEntry=cMTTraceRouteEntry, cMTSessionFlowSpecifierName=cMTSessionFlowSpecifierName, cMTSessionStatusBitmaps=cMTSessionStatusBitmaps, cMTInitiatorSourceAddressType=cMTInitiatorSourceAddressType, cMTRtpMetricsBitRate=cMTRtpMetricsBitRate, cMTSessionRequestStatsMDGlobalId=cMTSessionRequestStatsMDGlobalId, cMTInterfaceOutSpeed=cMTInterfaceOutSpeed, cMTFlowSpecifierRowStatus=cMTFlowSpecifierRowStatus, cMTSystemProfileEntry=cMTSystemProfileEntry, cMTInitiatorSourceAddress=cMTInitiatorSourceAddress, cMTSessionParamsEntry=cMTSessionParamsEntry, cMTSessionParamsFrequency=cMTSessionParamsFrequency, cMTInitiatorProtocolVersionMinor=cMTInitiatorProtocolVersionMinor, CiscoNTPTimeStamp=CiscoNTPTimeStamp, cMTSystemMetricBitmaps=cMTSystemMetricBitmaps, cMTTcpMetricMediaByteCount=cMTTcpMetricMediaByteCount, cMTSessionRequestStatsRequestStatus=cMTSessionRequestStatsRequestStatus, cMTRtpMetricsBitmaps=cMTRtpMetricsBitmaps, ciscoMediatraceMIB=ciscoMediatraceMIB, cMTInterfaceInSpeed=cMTInterfaceInSpeed, cMTInitiatorConfiguredSessions=cMTInitiatorConfiguredSessions, cMTHopStatsMediatraceTtl=cMTHopStatsMediatraceTtl, cMTPathSpecifierDestPort=cMTPathSpecifierDestPort, cMTHopStatsCollectionStatus=cMTHopStatsCollectionStatus, cMTSessionParamsResponseTimeout=cMTSessionParamsResponseTimeout, ciscoMediatraceMIBNotifs=ciscoMediatraceMIBNotifs, cMTTcpMetricStatsEntry=cMTTcpMetricStatsEntry, cMTInterfaceMetricStatsTable=cMTInterfaceMetricStatsTable, cMTSessionParamName=cMTSessionParamName, cMTSessionLifeNumber=cMTSessionLifeNumber, cMTScheduleLife=cMTScheduleLife, cMTTcpMetricStatsTable=cMTTcpMetricStatsTable, cMTBucketNumber=cMTBucketNumber, cMTResponderMaxSessions=cMTResponderMaxSessions, cMTScheduleTable=cMTScheduleTable, cMTSessionRequestStatsRequestTimestamp=cMTSessionRequestStatsRequestTimestamp, cMTPathTable=cMTPathTable, cMTRtpMetricsLostPkts=cMTRtpMetricsLostPkts, ciscoMediatraceMIBGroups=ciscoMediatraceMIBGroups, cMTFlowSpecifierDestAddrType=cMTFlowSpecifierDestAddrType, cMTCommonMetricsMediaStopOccurred=cMTCommonMetricsMediaStopOccurred, cMTCommonMetricStatsTable=cMTCommonMetricStatsTable, cMTPathEntry=cMTPathEntry, cMTInitiatorMaxSessions=cMTInitiatorMaxSessions, cMTInterfaceInOctets=cMTInterfaceInOctets, cMTFlowSpecifierTable=cMTFlowSpecifierTable, cMTHopStatsMaskBitmaps=cMTHopStatsMaskBitmaps, cMTSessionRequestStatsMDAppName=cMTSessionRequestStatsMDAppName, cMTSessionPathSpecifierName=cMTSessionPathSpecifierName, cMTMediaMonitorProfileRowStatus=cMTMediaMonitorProfileRowStatus, cMTPathSpecifierProtocolForDiscovery=cMTPathSpecifierProtocolForDiscovery, cMTCtrl=cMTCtrl, cMTFlowSpecifierEntry=cMTFlowSpecifierEntry, cMTCommonMetricsBitmaps=cMTCommonMetricsBitmaps, cMTInitiatorPendingSessions=cMTInitiatorPendingSessions, cMTSystemProfileTable=cMTSystemProfileTable, CiscoMediatraceDiscoveryProtocol=CiscoMediatraceDiscoveryProtocol, cMTFlowSpecifierName=cMTFlowSpecifierName, cMTCommonMetricsIpOctets=cMTCommonMetricsIpOctets, cMTSystemProfileMetric=cMTSystemProfileMetric, cMTHopStatsIngressInterface=cMTHopStatsIngressInterface, cMTHopStatsAddr=cMTHopStatsAddr, cMTPathSpecifierGatewayAddrType=cMTPathSpecifierGatewayAddrType, CiscoMediatraceSupportProtocol=CiscoMediatraceSupportProtocol, cMTPathSpecifierIpProtocol=cMTPathSpecifierIpProtocol, cMTSessionRowStatus=cMTSessionRowStatus, cMTFlowSpecifierIpProtocol=cMTFlowSpecifierIpProtocol, cMTTcpMetricBitmaps=cMTTcpMetricBitmaps, cMTSystemMetricCpuFiveMinutesUtilization=cMTSystemMetricCpuFiveMinutesUtilization, cMTSessionNumber=cMTSessionNumber, cMTPathSpecifierSourceAddrType=cMTPathSpecifierSourceAddrType, cMTInitiatorSoftwareVersionMajor=cMTInitiatorSoftwareVersionMajor, cMTSessionRequestStatsNumberOfErrorHops=cMTSessionRequestStatsNumberOfErrorHops, cMTMediaMonitorProfileRtpMaxReorder=cMTMediaMonitorProfileRtpMaxReorder, cMTSessionParamsRowStatus=cMTSessionParamsRowStatus, cMTHopStatsAddrType=cMTHopStatsAddrType, cMTMediaMonitorProfileEntry=cMTMediaMonitorProfileEntry, cMTInterfaceOutDiscards=cMTInterfaceOutDiscards, cMTSessionParamsRouteChangeReactiontime=cMTSessionParamsRouteChangeReactiontime, cMTRtpMetricsPkts=cMTRtpMetricsPkts, cMTSessionParamsName=cMTSessionParamsName, cMTResponderEnable=cMTResponderEnable, cMTSessionTable=cMTSessionTable, cMTTraceRouteHopNumber=cMTTraceRouteHopNumber, cMTPathSpecifierDestAddr=cMTPathSpecifierDestAddr, cMTInitiatorProtocolVersionMajor=cMTInitiatorProtocolVersionMajor, cMTPathHopAddr=cMTPathHopAddr, cMTSessionStatusTable=cMTSessionStatusTable, cMTSystemMetricStatsTable=cMTSystemMetricStatsTable, cMTInterfaceMetricStatsEntry=cMTInterfaceMetricStatsEntry, cMTTraceRouteHopRtt=cMTTraceRouteHopRtt, cMTSessionRequestStatsNumberOfMediatraceHops=cMTSessionRequestStatsNumberOfMediatraceHops, cMTSessionParamsInactivityTimeout=cMTSessionParamsInactivityTimeout, cMTSystemProfileRowStatus=cMTSystemProfileRowStatus, cMTFlowSpecifierSourceAddrType=cMTFlowSpecifierSourceAddrType, cMTPathHopNumber=cMTPathHopNumber, cMTSessionRequestStatsNumberOfValidHops=cMTSessionRequestStatsNumberOfValidHops, cMTScheduleRowStatus=cMTScheduleRowStatus, cMTCommonMetricsIpTtl=cMTCommonMetricsIpTtl, cMTSessionTraceRouteEnabled=cMTSessionTraceRouteEnabled, cMTSessionRequestStatsTracerouteStatus=cMTSessionRequestStatsTracerouteStatus, cMTRtpMetricsOctets=cMTRtpMetricsOctets, cMTSystemMetricCpuOneMinuteUtilization=cMTSystemMetricCpuOneMinuteUtilization, cMTSessionStatusOperationState=cMTSessionStatusOperationState, ciscoMediatraceMIBCompliances=ciscoMediatraceMIBCompliances, cMTPathSpecifierRowStatus=cMTPathSpecifierRowStatus, cMTCommonMetricsIpPktCount=cMTCommonMetricsIpPktCount, cMTPathSpecifierGatewayAddr=cMTPathSpecifierGatewayAddr, cMTInterfaceBitmaps=cMTInterfaceBitmaps, cMTFlowSpecifierMetadataGlobalId=cMTFlowSpecifierMetadataGlobalId, cMTPathHopAlternate2AddrType=cMTPathHopAlternate2AddrType, cMTSessionRequestStatsRouteIndex=cMTSessionRequestStatsRouteIndex, cMTPathSpecifierName=cMTPathSpecifierName, cMTTcpMetricConnectRoundTripDelay=cMTTcpMetricConnectRoundTripDelay, cMTCommonMetricsRouteForward=cMTCommonMetricsRouteForward, cMTSessionRequestStatsTable=cMTSessionRequestStatsTable, cMTSystemMetricStatsEntry=cMTSystemMetricStatsEntry, cMTPathHopAlternate3Addr=cMTPathHopAlternate3Addr, cMTPathHopAlternate1AddrType=cMTPathHopAlternate1AddrType, cMTCommonMetricsIpDscp=cMTCommonMetricsIpDscp, ciscoMediatraceMIBObjects=ciscoMediatraceMIBObjects, cMTPathSpecifierGatewayVlanId=cMTPathSpecifierGatewayVlanId, cMTTraceRouteTable=cMTTraceRouteTable, cMTPathSpecifierMetadataGlobalId=cMTPathSpecifierMetadataGlobalId, cMTPathSpecifierDestAddrType=cMTPathSpecifierDestAddrType, cMTSessionRequestStatsMDMultiPartySessionId=cMTSessionRequestStatsMDMultiPartySessionId, cMTPathHopType=cMTPathHopType, cMTPathHopAlternate3AddrType=cMTPathHopAlternate3AddrType, cMTMediaMonitorProfileMetric=cMTMediaMonitorProfileMetric, cMTPathSpecifierTable=cMTPathSpecifierTable, cMTStats=cMTStats, cMTSessionStatusEntry=cMTSessionStatusEntry, cMTPathSpecifierSourcePort=cMTPathSpecifierSourcePort, cMTSessionRequestStatsEntry=cMTSessionRequestStatsEntry, ciscoMediatraceMIBMainObjectGroup=ciscoMediatraceMIBMainObjectGroup, cMTCommonMetricsFlowCounter=cMTCommonMetricsFlowCounter, cMTHopStatsName=cMTHopStatsName, cMTSystemMetricMemoryUtilization=cMTSystemMetricMemoryUtilization, cMTFlowSpecifierSourceAddr=cMTFlowSpecifierSourceAddr, PYSNMP_MODULE_ID=ciscoMediatraceMIB, cMTMediaMonitorProfileTable=cMTMediaMonitorProfileTable, ciscoMediatraceMIBConform=ciscoMediatraceMIBConform, cMTMediaMonitorProfileInterval=cMTMediaMonitorProfileInterval, cMTCommonMetricStatsEntry=cMTCommonMetricStatsEntry, cMTRtpMetricsExpectedPkts=cMTRtpMetricsExpectedPkts, cMTFlowSpecifierDestAddr=cMTFlowSpecifierDestAddr, cMTCommonMetricsFlowSamplingStartTime=cMTCommonMetricsFlowSamplingStartTime, cMTInitiatorSoftwareVersionMinor=cMTInitiatorSoftwareVersionMinor, cMTPathHopAlternate2Addr=cMTPathHopAlternate2Addr, cMTSessionProfileName=cMTSessionProfileName, cMTCommonMetricsIpProtocol=cMTCommonMetricsIpProtocol, cMTFlowSpecifierDestPort=cMTFlowSpecifierDestPort, cMTPathSpecifierSourceAddr=cMTPathSpecifierSourceAddr, cMTCommonMetricsFlowDirection=cMTCommonMetricsFlowDirection, cMTSessionStatusOperationTimeToLive=cMTSessionStatusOperationTimeToLive, cMTSessionRequestStatsBitmaps=cMTSessionRequestStatsBitmaps, cMTInterfaceInErrors=cMTInterfaceInErrors, cMTHopStatsTable=cMTHopStatsTable, cMTInterfaceInDiscards=cMTInterfaceInDiscards, cMTScheduleRecurring=cMTScheduleRecurring, cMTSessionParamsTable=cMTSessionParamsTable, cMTCommonMetricsIpByteRate=cMTCommonMetricsIpByteRate, cMTInitiatorInactiveSessions=cMTInitiatorInactiveSessions, cMTSystemProfileName=cMTSystemProfileName, cMTInterfaceOutOctets=cMTInterfaceOutOctets, cMTScheduleEntryAgeout=cMTScheduleEntryAgeout, cMTCommonMetricsLossMeasurement=cMTCommonMetricsLossMeasurement, cMTRtpMetricsJitter=cMTRtpMetricsJitter, cMTInterfaceOutErrors=cMTInterfaceOutErrors, cMTRtpMetricStatsEntry=cMTRtpMetricStatsEntry, cMTScheduleEntry=cMTScheduleEntry, cMTInitiatorSourceInterface=cMTInitiatorSourceInterface, cMTTcpMetricLostEventCount=cMTTcpMetricLostEventCount, cMTSessionEntry=cMTSessionEntry, cMTMediaMonitorProfileRtpMaxDropout=cMTMediaMonitorProfileRtpMaxDropout, ciscoMediatraceMIBCompliance=ciscoMediatraceMIBCompliance, cMTMediaMonitorProfileRtpMinimalSequential=cMTMediaMonitorProfileRtpMinimalSequential, cMTInitiatorEnable=cMTInitiatorEnable, cMTScheduleStartTime=cMTScheduleStartTime, cMTCommonMetricsIpPktDropped=cMTCommonMetricsIpPktDropped, cMTRtpMetricsLostPktEvents=cMTRtpMetricsLostPktEvents) |
"""
module for creating generic constants used by multiple modules
"""
"""
The cloudwatch dashboard grid positioning system will automatically set x and y coordinates of every widget
in the list, based on the next available x,y on the dashboard, from left to right, then top to bottom. As long
as we specify height and width, and are ok with this default positioning behavior, positioning can be as simple
as specifying the height and width of the widget.
doc: https://docs.aws.amazon.com/AmazonCloudWatch/latest/APIReference/CloudWatch-Dashboard-Body-Structure.html#CloudWatch-Dashboard-Properties-Widgets-Structure
"""
positioning = {
'width': 24,
'height': 3
}
| """
module for creating generic constants used by multiple modules
"""
'\n The cloudwatch dashboard grid positioning system will automatically set x and y coordinates of every widget\n in the list, based on the next available x,y on the dashboard, from left to right, then top to bottom. As long\n as we specify height and width, and are ok with this default positioning behavior, positioning can be as simple\n as specifying the height and width of the widget.\n doc: https://docs.aws.amazon.com/AmazonCloudWatch/latest/APIReference/CloudWatch-Dashboard-Body-Structure.html#CloudWatch-Dashboard-Properties-Widgets-Structure\n'
positioning = {'width': 24, 'height': 3} |
# %% [1128. Number of Equivalent Domino Pairs](https://leetcode.com/problems/number-of-equivalent-domino-pairs/)
class Solution:
def numEquivDominoPairs(self, dominoes: List[List[int]]) -> int:
c = collections.Counter(tuple(sorted(i)) for i in dominoes)
return sum(n * (n - 1) // 2 for n in c.values())
| class Solution:
def num_equiv_domino_pairs(self, dominoes: List[List[int]]) -> int:
c = collections.Counter((tuple(sorted(i)) for i in dominoes))
return sum((n * (n - 1) // 2 for n in c.values())) |
print("hi\nmyname is : abdullah")
print("And in this code we will do ")
#Files
print("Files")
#______________________#
with open("information.txt" , "r") as f:
print(f.read()) | print('hi\nmyname is : abdullah')
print('And in this code we will do ')
print('Files')
with open('information.txt', 'r') as f:
print(f.read()) |
"""
DESCRIPTION
Gerald Appel developed Moving Average Convergence/Divergence as an indicator
of the change in a security's underlying price trend. The theory suggests that
when a price is trending, it is expected, from time to time, that speculative
forces "test" the trend. MACD shows characteristics of both a trending indicator
and an oscillator. While the primary function is to identify turning points in a
trend, the level at which the signals occur determines the strength of the reading.
CALCULATION
MACD Line:
MACD=Period1 Exponential MA (Fast) -
Period2 Exponential MA (Slow)
MACD Signal Line:
Sig=Period3 Exponential MA of MACD Line
MACD Diff:
Diff=MACD - Sig
where:
Period1 = N Period of the Fast Exponential MA
The default Period1 is 12
Period2 = N Period of the Slow Exponential MA
The default Period2 is 26
Period3 = N Period Exponential MA for the Signal Line
The default Period3 is 9
MACD Period:
N Period = For daily, N=days; weekly, N=weeks, ...
MACD omits non-trading days from computations.
Formula:
MACD Line: (12-day EMA - 26-day EMA)
Signal Line: 9-day EMA of MACD Line
MACD Histogram: MACD Line - Signal Line
Validation: validated with results from Bloomberg
"""
# Standard MACD function
def macd(ohlcv, short_period=12, long_period=26, signal_period=9, ohlcv_series="close"):
_ohlcv = ohlcv[[ohlcv_series]].copy(deep=True)
_ohlcv["short"] = _ohlcv[ohlcv_series].ewm(span=short_period, min_periods=short_period).mean()
_ohlcv["long"] = _ohlcv[ohlcv_series].ewm(span=long_period, min_periods=long_period).mean()
_ohlcv["macd"] = _ohlcv["short"] - _ohlcv["long"]
_ohlcv["signal"] = _ohlcv["macd"].ewm(span=signal_period, min_periods=signal_period).mean()
_ohlcv["hist"] = _ohlcv["macd"] - _ohlcv["signal"]
return _ohlcv[["macd", "signal", "hist"]]
| """
DESCRIPTION
Gerald Appel developed Moving Average Convergence/Divergence as an indicator
of the change in a security's underlying price trend. The theory suggests that
when a price is trending, it is expected, from time to time, that speculative
forces "test" the trend. MACD shows characteristics of both a trending indicator
and an oscillator. While the primary function is to identify turning points in a
trend, the level at which the signals occur determines the strength of the reading.
CALCULATION
MACD Line:
MACD=Period1 Exponential MA (Fast) -
Period2 Exponential MA (Slow)
MACD Signal Line:
Sig=Period3 Exponential MA of MACD Line
MACD Diff:
Diff=MACD - Sig
where:
Period1 = N Period of the Fast Exponential MA
The default Period1 is 12
Period2 = N Period of the Slow Exponential MA
The default Period2 is 26
Period3 = N Period Exponential MA for the Signal Line
The default Period3 is 9
MACD Period:
N Period = For daily, N=days; weekly, N=weeks, ...
MACD omits non-trading days from computations.
Formula:
MACD Line: (12-day EMA - 26-day EMA)
Signal Line: 9-day EMA of MACD Line
MACD Histogram: MACD Line - Signal Line
Validation: validated with results from Bloomberg
"""
def macd(ohlcv, short_period=12, long_period=26, signal_period=9, ohlcv_series='close'):
_ohlcv = ohlcv[[ohlcv_series]].copy(deep=True)
_ohlcv['short'] = _ohlcv[ohlcv_series].ewm(span=short_period, min_periods=short_period).mean()
_ohlcv['long'] = _ohlcv[ohlcv_series].ewm(span=long_period, min_periods=long_period).mean()
_ohlcv['macd'] = _ohlcv['short'] - _ohlcv['long']
_ohlcv['signal'] = _ohlcv['macd'].ewm(span=signal_period, min_periods=signal_period).mean()
_ohlcv['hist'] = _ohlcv['macd'] - _ohlcv['signal']
return _ohlcv[['macd', 'signal', 'hist']] |
def canTransform1(start, end):
startX = "".join([c for c in start if c != "X"])
endX = "".join([c for c in end if c != "X"])
if startX != endX: return False
startR = [i for i in range(len(start)) if start[i] == "R"]
startL = [i for i in range(len(start)) if start[i] == "L"]
endR = [i for i in range(len(end)) if end[i] == "R"]
endL = [i for i in range(len(end)) if end[i] == "L"]
for s, e in zip(startR, endR):
if s > e: return False
for s, e in zip(startL, endL):
if s < e: return False
return True
def canTransform2(start, end):
n = len(start)
i, j = 0, 0
while i < n or j < n:
while i < n and start[i] == "X": i += 1
while j < n and end[j] == "X": j += 1
if (i < n) != (j < n): return False
if i < n and j < n:
if (start[i] != end[j]) or (start[i] == "L" and i < j) or (end[j] == "R" and i > j):
return False
i += 1
j += 1
return True
print(canTransform1("RXXLRXRXL", "XRLXXRRLX")) # True
print(canTransform2("RXXLRXRXL", "XRLXXRRLX")) # True
print(canTransform1("XXXXXLXXXX", "LXXXXXXXXX")) # True
print(canTransform2("XXXXXLXXXX", "LXXXXXXXXX")) # True
print(canTransform1("RXR", "XXR")) # False
print(canTransform2("RXR", "XXR")) # False | def can_transform1(start, end):
start_x = ''.join([c for c in start if c != 'X'])
end_x = ''.join([c for c in end if c != 'X'])
if startX != endX:
return False
start_r = [i for i in range(len(start)) if start[i] == 'R']
start_l = [i for i in range(len(start)) if start[i] == 'L']
end_r = [i for i in range(len(end)) if end[i] == 'R']
end_l = [i for i in range(len(end)) if end[i] == 'L']
for (s, e) in zip(startR, endR):
if s > e:
return False
for (s, e) in zip(startL, endL):
if s < e:
return False
return True
def can_transform2(start, end):
n = len(start)
(i, j) = (0, 0)
while i < n or j < n:
while i < n and start[i] == 'X':
i += 1
while j < n and end[j] == 'X':
j += 1
if (i < n) != (j < n):
return False
if i < n and j < n:
if start[i] != end[j] or (start[i] == 'L' and i < j) or (end[j] == 'R' and i > j):
return False
i += 1
j += 1
return True
print(can_transform1('RXXLRXRXL', 'XRLXXRRLX'))
print(can_transform2('RXXLRXRXL', 'XRLXXRRLX'))
print(can_transform1('XXXXXLXXXX', 'LXXXXXXXXX'))
print(can_transform2('XXXXXLXXXX', 'LXXXXXXXXX'))
print(can_transform1('RXR', 'XXR'))
print(can_transform2('RXR', 'XXR')) |
n = int(input())
lst = sorted([int(input()) for i in range(n)])
ans = sorted(set(range(lst[0], lst[len(lst) - 1])).difference(lst))
if lst[0] > 1:
for i in range(1, lst[0]):
ans.append(i)
if (len(ans) != 0):
print(*sorted(ans), sep='\n')
else:
print("good job")
| n = int(input())
lst = sorted([int(input()) for i in range(n)])
ans = sorted(set(range(lst[0], lst[len(lst) - 1])).difference(lst))
if lst[0] > 1:
for i in range(1, lst[0]):
ans.append(i)
if len(ans) != 0:
print(*sorted(ans), sep='\n')
else:
print('good job') |
#
# PySNMP MIB module HH3C-RCR-MIB (http://snmplabs.com/pysmi)
# ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/HH3C-RCR-MIB
# Produced by pysmi-0.3.4 at Wed May 1 13:29:21 2019
# On host DAVWANG4-M-1475 platform Darwin version 18.5.0 by user davwang4
# Using Python version 3.7.3 (default, Mar 27 2019, 09:23:15)
#
Integer, OctetString, ObjectIdentifier = mibBuilder.importSymbols("ASN1", "Integer", "OctetString", "ObjectIdentifier")
NamedValues, = mibBuilder.importSymbols("ASN1-ENUMERATION", "NamedValues")
ConstraintsUnion, ValueRangeConstraint, SingleValueConstraint, ValueSizeConstraint, ConstraintsIntersection = mibBuilder.importSymbols("ASN1-REFINEMENT", "ConstraintsUnion", "ValueRangeConstraint", "SingleValueConstraint", "ValueSizeConstraint", "ConstraintsIntersection")
hh3cCommon, = mibBuilder.importSymbols("HH3C-OID-MIB", "hh3cCommon")
InterfaceIndex, = mibBuilder.importSymbols("IF-MIB", "InterfaceIndex")
InetAddress, InetAddressType = mibBuilder.importSymbols("INET-ADDRESS-MIB", "InetAddress", "InetAddressType")
NotificationGroup, ModuleCompliance = mibBuilder.importSymbols("SNMPv2-CONF", "NotificationGroup", "ModuleCompliance")
Counter32, ModuleIdentity, Integer32, IpAddress, Bits, Unsigned32, Counter64, iso, TimeTicks, NotificationType, ObjectIdentity, Gauge32, MibScalar, MibTable, MibTableRow, MibTableColumn, MibIdentifier = mibBuilder.importSymbols("SNMPv2-SMI", "Counter32", "ModuleIdentity", "Integer32", "IpAddress", "Bits", "Unsigned32", "Counter64", "iso", "TimeTicks", "NotificationType", "ObjectIdentity", "Gauge32", "MibScalar", "MibTable", "MibTableRow", "MibTableColumn", "MibIdentifier")
DisplayString, TextualConvention = mibBuilder.importSymbols("SNMPv2-TC", "DisplayString", "TextualConvention")
hh3cRcr = ModuleIdentity((1, 3, 6, 1, 4, 1, 25506, 2, 48))
hh3cRcr.setRevisions(('2005-06-28 19:36',))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
if mibBuilder.loadTexts: hh3cRcr.setRevisionsDescriptions(('The modified revision of this MIB module. Rewrite the whole MIB.',))
if mibBuilder.loadTexts: hh3cRcr.setLastUpdated('200506281936Z')
if mibBuilder.loadTexts: hh3cRcr.setOrganization('Hangzhou H3C Tech. Co., Ltd.')
if mibBuilder.loadTexts: hh3cRcr.setContactInfo('Platform Team Hangzhou H3C Tech. Co., Ltd. Hai-Dian District Beijing P.R. China http://www.h3c.com Zip:100085 ')
if mibBuilder.loadTexts: hh3cRcr.setDescription("This MIB is applicable to router-devices. It's made for RCR (Resilient Controllable Routing). RCR provides an effective resolution which can dynamically auto-adjust outbound traffic to the optimal external interface by monitoring the performance and traffic load of each external interface. It provides the functions of intelligentized traffic load distribution and the optimal external interface selection. This can optimally utilize the external interfaces. Furthermore, RCR realized the function which can select the optimal external interface based on different classes of operation flow.")
hh3cRcrMR = MibIdentifier((1, 3, 6, 1, 4, 1, 25506, 2, 48, 1))
hh3cRcrMRGroup = MibIdentifier((1, 3, 6, 1, 4, 1, 25506, 2, 48, 1, 1))
hh3cRcrMRAllMaxUsedBandRate = MibScalar((1, 3, 6, 1, 4, 1, 25506, 2, 48, 1, 1, 1), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 100))).setUnits('%').setMaxAccess("readwrite")
if mibBuilder.loadTexts: hh3cRcrMRAllMaxUsedBandRate.setStatus('current')
if mibBuilder.loadTexts: hh3cRcrMRAllMaxUsedBandRate.setDescription('The max used band rate of all external interfaces on member router-devices(MRs) which are controlled by RCR.')
hh3cRcrMRAllMinUsedBandRate = MibScalar((1, 3, 6, 1, 4, 1, 25506, 2, 48, 1, 1, 2), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 100))).setUnits('%').setMaxAccess("readwrite")
if mibBuilder.loadTexts: hh3cRcrMRAllMinUsedBandRate.setStatus('current')
if mibBuilder.loadTexts: hh3cRcrMRAllMinUsedBandRate.setDescription('The min used band rate of all external interfaces on MRs which are controlled by RCR.')
hh3cRcrMRListenTime = MibScalar((1, 3, 6, 1, 4, 1, 25506, 2, 48, 1, 1, 3), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 1440))).setUnits('minute').setMaxAccess("readwrite")
if mibBuilder.loadTexts: hh3cRcrMRListenTime.setStatus('current')
if mibBuilder.loadTexts: hh3cRcrMRListenTime.setDescription('The persistent time of a probe on member router-device(MR) which is controlled by RCR.')
hh3cRcrMRStateTable = MibTable((1, 3, 6, 1, 4, 1, 25506, 2, 48, 1, 2), )
if mibBuilder.loadTexts: hh3cRcrMRStateTable.setStatus('current')
if mibBuilder.loadTexts: hh3cRcrMRStateTable.setDescription('This table contains state information of each MR which is controlled by RCR.')
hh3cRcrMRStateEntry = MibTableRow((1, 3, 6, 1, 4, 1, 25506, 2, 48, 1, 2, 1), ).setIndexNames((0, "HH3C-RCR-MIB", "hh3cRcrMRName"))
if mibBuilder.loadTexts: hh3cRcrMRStateEntry.setStatus('current')
if mibBuilder.loadTexts: hh3cRcrMRStateEntry.setDescription('Entry items')
hh3cRcrMRName = MibTableColumn((1, 3, 6, 1, 4, 1, 25506, 2, 48, 1, 2, 1, 1), OctetString().subtype(subtypeSpec=ValueSizeConstraint(1, 32)))
if mibBuilder.loadTexts: hh3cRcrMRName.setStatus('current')
if mibBuilder.loadTexts: hh3cRcrMRName.setDescription('The name of MR which is controlled by RCR.')
hh3cRcrMRState = MibTableColumn((1, 3, 6, 1, 4, 1, 25506, 2, 48, 1, 2, 1, 2), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3))).clone(namedValues=NamedValues(("down", 1), ("up", 2), ("controlled", 3)))).setMaxAccess("readonly")
if mibBuilder.loadTexts: hh3cRcrMRState.setStatus('current')
if mibBuilder.loadTexts: hh3cRcrMRState.setDescription('The state of MR where identified on the controller router-device(CR). down: The MR has been enabled but has not connected to the CR with TCP connection. up: The MR has already successfully connected to the CR but has not been ready for adjusting route. controlled: The MR has already passed the consultation with the CR and could be controlled by it.')
hh3cRcrMRAuthType = MibTableColumn((1, 3, 6, 1, 4, 1, 25506, 2, 48, 1, 2, 1, 3), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("simple", 1), ("md5", 2)))).setMaxAccess("readwrite")
if mibBuilder.loadTexts: hh3cRcrMRAuthType.setStatus('current')
if mibBuilder.loadTexts: hh3cRcrMRAuthType.setDescription('The authentication type of communication packet between CR and MR.')
hh3cRcrMRAuthPwd = MibTableColumn((1, 3, 6, 1, 4, 1, 25506, 2, 48, 1, 2, 1, 4), OctetString()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: hh3cRcrMRAuthPwd.setStatus('current')
if mibBuilder.loadTexts: hh3cRcrMRAuthPwd.setDescription('The authentication password of communication packet between CR and MR. Reading this object always results in an OCTET STRING of length zero; authentication may not be bypassed by reading the MIB object.')
hh3cRcrMROutIfStateTable = MibTable((1, 3, 6, 1, 4, 1, 25506, 2, 48, 1, 3), )
if mibBuilder.loadTexts: hh3cRcrMROutIfStateTable.setStatus('current')
if mibBuilder.loadTexts: hh3cRcrMROutIfStateTable.setDescription('This table contains the external interface states of each MR which is controlled by RCR.')
hh3cRcrMROutIfStateEntry = MibTableRow((1, 3, 6, 1, 4, 1, 25506, 2, 48, 1, 3, 1), ).setIndexNames((0, "HH3C-RCR-MIB", "hh3cRcrMRName"), (0, "HH3C-RCR-MIB", "hh3cRcrMROutIfName"))
if mibBuilder.loadTexts: hh3cRcrMROutIfStateEntry.setStatus('current')
if mibBuilder.loadTexts: hh3cRcrMROutIfStateEntry.setDescription('Entry items')
hh3cRcrMROutIfName = MibTableColumn((1, 3, 6, 1, 4, 1, 25506, 2, 48, 1, 3, 1, 1), OctetString().subtype(subtypeSpec=ValueSizeConstraint(1, 48)))
if mibBuilder.loadTexts: hh3cRcrMROutIfName.setStatus('current')
if mibBuilder.loadTexts: hh3cRcrMROutIfName.setDescription('The name of external interface on each MR.')
hh3cRcrMROutIfState = MibTableColumn((1, 3, 6, 1, 4, 1, 25506, 2, 48, 1, 3, 1, 2), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3))).clone(namedValues=NamedValues(("down", 1), ("up", 2), ("notExist", 3)))).setMaxAccess("readonly")
if mibBuilder.loadTexts: hh3cRcrMROutIfState.setStatus('current')
if mibBuilder.loadTexts: hh3cRcrMROutIfState.setDescription('The state of external interface on each MR.')
hh3cRcrMROutIfMaxUsedBandRate = MibTableColumn((1, 3, 6, 1, 4, 1, 25506, 2, 48, 1, 3, 1, 3), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 100))).setUnits('%').setMaxAccess("readwrite")
if mibBuilder.loadTexts: hh3cRcrMROutIfMaxUsedBandRate.setStatus('current')
if mibBuilder.loadTexts: hh3cRcrMROutIfMaxUsedBandRate.setDescription('The max spendable bandwidth rate on external interface.')
hh3cRcrMROutIfMinUsedBandRate = MibTableColumn((1, 3, 6, 1, 4, 1, 25506, 2, 48, 1, 3, 1, 4), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 100))).setUnits('%').setMaxAccess("readwrite")
if mibBuilder.loadTexts: hh3cRcrMROutIfMinUsedBandRate.setStatus('current')
if mibBuilder.loadTexts: hh3cRcrMROutIfMinUsedBandRate.setDescription('The min spendable bandwidth rate on external interface.')
hh3cRcrMROutIfUsedBandRate = MibTableColumn((1, 3, 6, 1, 4, 1, 25506, 2, 48, 1, 3, 1, 5), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 100))).setUnits('%').setMaxAccess("readonly")
if mibBuilder.loadTexts: hh3cRcrMROutIfUsedBandRate.setStatus('current')
if mibBuilder.loadTexts: hh3cRcrMROutIfUsedBandRate.setDescription('The used bandwidth rate on external interface.')
hh3cRcrCR = MibIdentifier((1, 3, 6, 1, 4, 1, 25506, 2, 48, 2))
hh3cRcrCRGroup = MibIdentifier((1, 3, 6, 1, 4, 1, 25506, 2, 48, 2, 1))
hh3cRcrCRState = MibScalar((1, 3, 6, 1, 4, 1, 25506, 2, 48, 2, 1, 1), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3))).clone(namedValues=NamedValues(("down", 1), ("init", 2), ("active", 3)))).setMaxAccess("readonly")
if mibBuilder.loadTexts: hh3cRcrCRState.setStatus('current')
if mibBuilder.loadTexts: hh3cRcrCRState.setDescription('The state of the CR which is controlled by RCR. down: The CR has been enabled but has not started a TCP connection server. init: The CR has started a TCP connection server and has been waiting for MR connection, but has not been ready for adjusting route. active: The CR is ready for adjusting route.')
hh3cRcrCRPortNum = MibScalar((1, 3, 6, 1, 4, 1, 25506, 2, 48, 2, 1, 2), Integer32()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: hh3cRcrCRPortNum.setStatus('current')
if mibBuilder.loadTexts: hh3cRcrCRPortNum.setDescription('The communication port number between CR and MR.')
hh3cRcrCRCtrlMode = MibScalar((1, 3, 6, 1, 4, 1, 25506, 2, 48, 2, 1, 3), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("control", 1), ("observe", 2)))).setMaxAccess("readwrite")
if mibBuilder.loadTexts: hh3cRcrCRCtrlMode.setStatus('current')
if mibBuilder.loadTexts: hh3cRcrCRCtrlMode.setDescription('The observe mode or control mode is configured to operate in the CR. observe: The CR monitors prefixes and external interfaces based on default and user-defined policies and then reports the status of the network and the decisions that should be made but does not implement any changes. controlled: The CR monitors prefixes and external interfaces based on default and user-defined policies and then reports the status of the network and the decisions that should be made and implement any changes.')
hh3cRcrCRChooseMode = MibScalar((1, 3, 6, 1, 4, 1, 25506, 2, 48, 2, 1, 4), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("good", 1), ("best", 2)))).setMaxAccess("readwrite")
if mibBuilder.loadTexts: hh3cRcrCRChooseMode.setStatus('current')
if mibBuilder.loadTexts: hh3cRcrCRChooseMode.setDescription('The algorithm used to choose an alternative external interface for a prefix. good: The first external interface that conforms to the policy is selected as the new external interface. best: Information is collected from all external interfaces and the best one is selected even though the best external interface may not be in-policy.')
hh3cRcrCRKeepaliveTime = MibScalar((1, 3, 6, 1, 4, 1, 25506, 2, 48, 2, 1, 5), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 1000))).setUnits('second').setMaxAccess("readwrite")
if mibBuilder.loadTexts: hh3cRcrCRKeepaliveTime.setStatus('current')
if mibBuilder.loadTexts: hh3cRcrCRKeepaliveTime.setDescription('The interval time of the transmission of the keepalive communication packet between CR and MR.')
hh3cRcrCRPolicyMode = MibScalar((1, 3, 6, 1, 4, 1, 25506, 2, 48, 2, 1, 6), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3))).clone(namedValues=NamedValues(("prefix", 1), ("operation", 2), ("study", 3)))).setMaxAccess("readwrite")
if mibBuilder.loadTexts: hh3cRcrCRPolicyMode.setStatus('current')
if mibBuilder.loadTexts: hh3cRcrCRPolicyMode.setDescription('The chosen policy mode which decides to change what prefix. prefix: An RCR policy is designed to select IP prefixes or to select RCR learn policies using a match clause and then to apply RCR policy configurations using a set clause. operation: To deside to adjusted prefixes based on operation which user configured. study: To learn and optimize prefixes based on the highest throughput or the highest delay.')
hh3cRcrCRStudyMode = MibScalar((1, 3, 6, 1, 4, 1, 25506, 2, 48, 2, 1, 7), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("maxThoughout", 1), ("maxDelay", 2)))).setMaxAccess("readwrite")
if mibBuilder.loadTexts: hh3cRcrCRStudyMode.setStatus('current')
if mibBuilder.loadTexts: hh3cRcrCRStudyMode.setDescription("The mode of collecting prefix in studying configuration mode. It's to collect either the prefix of max thoughtout or the prefix of max delay time. It doesn't have a value when CR isn't in studying configuration mode.")
hh3cRcrCRStudyIpPrefixNum = MibScalar((1, 3, 6, 1, 4, 1, 25506, 2, 48, 2, 1, 8), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 2500))).setMaxAccess("readwrite")
if mibBuilder.loadTexts: hh3cRcrCRStudyIpPrefixNum.setStatus('current')
if mibBuilder.loadTexts: hh3cRcrCRStudyIpPrefixNum.setDescription('The max number of collecting prefix in studying configuration mode.')
hh3cRcrCRIpPrefixLen = MibScalar((1, 3, 6, 1, 4, 1, 25506, 2, 48, 2, 1, 9), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 32)).clone(24)).setMaxAccess("readwrite")
if mibBuilder.loadTexts: hh3cRcrCRIpPrefixLen.setStatus('current')
if mibBuilder.loadTexts: hh3cRcrCRIpPrefixLen.setDescription('The mask length of collecting prefix in configuration mode.')
hh3cRcrCRRcrPolicyTable = MibTable((1, 3, 6, 1, 4, 1, 25506, 2, 48, 2, 2), )
if mibBuilder.loadTexts: hh3cRcrCRRcrPolicyTable.setStatus('current')
if mibBuilder.loadTexts: hh3cRcrCRRcrPolicyTable.setDescription('This table contains objects to get statistic information of interfaces on a device.')
hh3cRcrCRRcrPolicyEntry = MibTableRow((1, 3, 6, 1, 4, 1, 25506, 2, 48, 2, 2, 1), ).setIndexNames((0, "HH3C-RCR-MIB", "hh3cRcrCRRcrPlyID"))
if mibBuilder.loadTexts: hh3cRcrCRRcrPolicyEntry.setStatus('current')
if mibBuilder.loadTexts: hh3cRcrCRRcrPolicyEntry.setDescription('Entry items')
hh3cRcrCRRcrPlyID = MibTableColumn((1, 3, 6, 1, 4, 1, 25506, 2, 48, 2, 2, 1, 1), Integer32())
if mibBuilder.loadTexts: hh3cRcrCRRcrPlyID.setStatus('current')
if mibBuilder.loadTexts: hh3cRcrCRRcrPlyID.setDescription('The ID of RCR policy which the user has configured.')
hh3cRcrCRRcrPlyMatchIPListName = MibTableColumn((1, 3, 6, 1, 4, 1, 25506, 2, 48, 2, 2, 1, 2), OctetString().subtype(subtypeSpec=ValueSizeConstraint(1, 19))).setMaxAccess("readwrite")
if mibBuilder.loadTexts: hh3cRcrCRRcrPlyMatchIPListName.setStatus('current')
if mibBuilder.loadTexts: hh3cRcrCRRcrPlyMatchIPListName.setDescription('The matched IP prefix list name of RCR policy which the user has configured.')
hh3cRcrCRRcrPlyMatchStudyEnable = MibTableColumn((1, 3, 6, 1, 4, 1, 25506, 2, 48, 2, 2, 1, 3), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("disable", 1), ("enable", 2)))).setMaxAccess("readwrite")
if mibBuilder.loadTexts: hh3cRcrCRRcrPlyMatchStudyEnable.setStatus('current')
if mibBuilder.loadTexts: hh3cRcrCRRcrPlyMatchStudyEnable.setDescription('Whether the RCR policy which the user has configured is matched for studying prefix mode.')
hh3cRcrCRRcrPlyMatchOperPlyName = MibTableColumn((1, 3, 6, 1, 4, 1, 25506, 2, 48, 2, 2, 1, 4), OctetString().subtype(subtypeSpec=ValueSizeConstraint(1, 19))).setMaxAccess("readwrite")
if mibBuilder.loadTexts: hh3cRcrCRRcrPlyMatchOperPlyName.setStatus('current')
if mibBuilder.loadTexts: hh3cRcrCRRcrPlyMatchOperPlyName.setDescription('The matched operation policy name of RCR policy which the user has configured.')
hh3cRcrCRRcrAclNumber = MibTableColumn((1, 3, 6, 1, 4, 1, 25506, 2, 48, 2, 2, 1, 5), Integer32().subtype(subtypeSpec=ValueRangeConstraint(3000, 3999))).setMaxAccess("readwrite")
if mibBuilder.loadTexts: hh3cRcrCRRcrAclNumber.setStatus('current')
if mibBuilder.loadTexts: hh3cRcrCRRcrAclNumber.setDescription('The matched acl number of RCR operation policy which the user has configured.')
hh3cRcrCRRcrPlyDelayTime = MibTableColumn((1, 3, 6, 1, 4, 1, 25506, 2, 48, 2, 2, 1, 6), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 10000))).setUnits('millisecond').setMaxAccess("readwrite")
if mibBuilder.loadTexts: hh3cRcrCRRcrPlyDelayTime.setStatus('current')
if mibBuilder.loadTexts: hh3cRcrCRRcrPlyDelayTime.setDescription('The absolute maximum delay time. The range of values that can be configured is from 1 to 10000.')
hh3cRcrCRRcrPlyLossRate = MibTableColumn((1, 3, 6, 1, 4, 1, 25506, 2, 48, 2, 2, 1, 7), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 100))).setUnits('%').setMaxAccess("readwrite")
if mibBuilder.loadTexts: hh3cRcrCRRcrPlyLossRate.setStatus('current')
if mibBuilder.loadTexts: hh3cRcrCRRcrPlyLossRate.setDescription('The packet loss percent of prefix which the CR concerns.')
hh3cRcrCRMatPrefixPerfTable = MibTable((1, 3, 6, 1, 4, 1, 25506, 2, 48, 2, 3), )
if mibBuilder.loadTexts: hh3cRcrCRMatPrefixPerfTable.setStatus('current')
if mibBuilder.loadTexts: hh3cRcrCRMatPrefixPerfTable.setDescription('This table contains the matched prefix performance information.')
hh3cRcrCRMatPrefixPerfEntry = MibTableRow((1, 3, 6, 1, 4, 1, 25506, 2, 48, 2, 3, 1), ).setIndexNames((0, "HH3C-RCR-MIB", "hh3cRcrCRMatPrefPerfAddrType"), (0, "HH3C-RCR-MIB", "hh3cRcrCRMatPrefPerfDestIPAddr"), (0, "HH3C-RCR-MIB", "hh3cRcrCRMatPrefPerfDestMaskLen"))
if mibBuilder.loadTexts: hh3cRcrCRMatPrefixPerfEntry.setStatus('current')
if mibBuilder.loadTexts: hh3cRcrCRMatPrefixPerfEntry.setDescription('Entry items')
hh3cRcrCRMatPrefPerfAddrType = MibTableColumn((1, 3, 6, 1, 4, 1, 25506, 2, 48, 2, 3, 1, 1), InetAddressType())
if mibBuilder.loadTexts: hh3cRcrCRMatPrefPerfAddrType.setStatus('current')
if mibBuilder.loadTexts: hh3cRcrCRMatPrefPerfAddrType.setDescription('The destination IP addresses type of matched prefix which the CR wants (IPv4 or IPv6).')
hh3cRcrCRMatPrefPerfDestIPAddr = MibTableColumn((1, 3, 6, 1, 4, 1, 25506, 2, 48, 2, 3, 1, 2), InetAddress())
if mibBuilder.loadTexts: hh3cRcrCRMatPrefPerfDestIPAddr.setStatus('current')
if mibBuilder.loadTexts: hh3cRcrCRMatPrefPerfDestIPAddr.setDescription('The destination IP address of matched prefix which the CR wants.')
hh3cRcrCRMatPrefPerfDestMaskLen = MibTableColumn((1, 3, 6, 1, 4, 1, 25506, 2, 48, 2, 3, 1, 3), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 32)))
if mibBuilder.loadTexts: hh3cRcrCRMatPrefPerfDestMaskLen.setStatus('current')
if mibBuilder.loadTexts: hh3cRcrCRMatPrefPerfDestMaskLen.setDescription('The destination IP address mask length of matched prefix which the CR wants.')
hh3cRcrCRMatPrefPerfDelayTime = MibTableColumn((1, 3, 6, 1, 4, 1, 25506, 2, 48, 2, 3, 1, 4), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 10000))).setUnits('second').setMaxAccess("readonly")
if mibBuilder.loadTexts: hh3cRcrCRMatPrefPerfDelayTime.setStatus('current')
if mibBuilder.loadTexts: hh3cRcrCRMatPrefPerfDelayTime.setDescription('The absolute maximum delay time of prefix which the CR has configured.')
hh3cRcrCRMatPrefPerfLossRate = MibTableColumn((1, 3, 6, 1, 4, 1, 25506, 2, 48, 2, 3, 1, 5), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 100))).setUnits('%').setMaxAccess("readonly")
if mibBuilder.loadTexts: hh3cRcrCRMatPrefPerfLossRate.setStatus('current')
if mibBuilder.loadTexts: hh3cRcrCRMatPrefPerfLossRate.setDescription('The packet loss percent of prefix which the CR has configured.')
hh3cRcrCRMatPrefPerfThroughput = MibTableColumn((1, 3, 6, 1, 4, 1, 25506, 2, 48, 2, 3, 1, 6), Integer32()).setUnits('kb').setMaxAccess("readonly")
if mibBuilder.loadTexts: hh3cRcrCRMatPrefPerfThroughput.setStatus('current')
if mibBuilder.loadTexts: hh3cRcrCRMatPrefPerfThroughput.setDescription('The bandwidth of prefix which the CR has monitored.')
hh3cRcrCRAdjustPrefixTable = MibTable((1, 3, 6, 1, 4, 1, 25506, 2, 48, 2, 4), )
if mibBuilder.loadTexts: hh3cRcrCRAdjustPrefixTable.setStatus('current')
if mibBuilder.loadTexts: hh3cRcrCRAdjustPrefixTable.setDescription('This table contains objects to get adjusted prefix information which the CR controlled.')
hh3cRcrCRAdjustPrefixEntry = MibTableRow((1, 3, 6, 1, 4, 1, 25506, 2, 48, 2, 4, 1), ).setIndexNames((0, "HH3C-RCR-MIB", "hh3cRcrCRAdjuPrefDestAddrType"), (0, "HH3C-RCR-MIB", "hh3cRcrCRAdjuPrefDestAddr"), (0, "HH3C-RCR-MIB", "hh3cRcrCRAdjuPrefMaskLen"), (0, "HH3C-RCR-MIB", "hh3cRcrCRAdjuPrefPreMRName"), (0, "HH3C-RCR-MIB", "hh3cRcrCRAdjuPrefPreOutIfName"))
if mibBuilder.loadTexts: hh3cRcrCRAdjustPrefixEntry.setStatus('current')
if mibBuilder.loadTexts: hh3cRcrCRAdjustPrefixEntry.setDescription('Entry items')
hh3cRcrCRAdjuPrefDestAddrType = MibTableColumn((1, 3, 6, 1, 4, 1, 25506, 2, 48, 2, 4, 1, 1), InetAddressType())
if mibBuilder.loadTexts: hh3cRcrCRAdjuPrefDestAddrType.setStatus('current')
if mibBuilder.loadTexts: hh3cRcrCRAdjuPrefDestAddrType.setDescription('The IP address type of the adjusted prefix which CR controlled (IPv4 or IPv6).')
hh3cRcrCRAdjuPrefDestAddr = MibTableColumn((1, 3, 6, 1, 4, 1, 25506, 2, 48, 2, 4, 1, 2), InetAddress())
if mibBuilder.loadTexts: hh3cRcrCRAdjuPrefDestAddr.setStatus('current')
if mibBuilder.loadTexts: hh3cRcrCRAdjuPrefDestAddr.setDescription('The IP address of the adjusted prefix which CR controlled.')
hh3cRcrCRAdjuPrefMaskLen = MibTableColumn((1, 3, 6, 1, 4, 1, 25506, 2, 48, 2, 4, 1, 3), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 32)))
if mibBuilder.loadTexts: hh3cRcrCRAdjuPrefMaskLen.setStatus('current')
if mibBuilder.loadTexts: hh3cRcrCRAdjuPrefMaskLen.setDescription('The IP address mask length of the adjusted prefix which CR controlled.')
hh3cRcrCRAdjuPrefPreMRName = MibTableColumn((1, 3, 6, 1, 4, 1, 25506, 2, 48, 2, 4, 1, 4), OctetString().subtype(subtypeSpec=ValueSizeConstraint(1, 32)))
if mibBuilder.loadTexts: hh3cRcrCRAdjuPrefPreMRName.setStatus('current')
if mibBuilder.loadTexts: hh3cRcrCRAdjuPrefPreMRName.setDescription('The name of the MR which the previous outbound traffic flows through.')
hh3cRcrCRAdjuPrefPreOutIfName = MibTableColumn((1, 3, 6, 1, 4, 1, 25506, 2, 48, 2, 4, 1, 5), OctetString().subtype(subtypeSpec=ValueSizeConstraint(1, 48)))
if mibBuilder.loadTexts: hh3cRcrCRAdjuPrefPreOutIfName.setStatus('current')
if mibBuilder.loadTexts: hh3cRcrCRAdjuPrefPreOutIfName.setDescription('The name of the external interface on the MR which the previous outbound traffic flows through.')
hh3cRcrCRAdjuPrefCurMRName = MibTableColumn((1, 3, 6, 1, 4, 1, 25506, 2, 48, 2, 4, 1, 6), OctetString().subtype(subtypeSpec=ValueSizeConstraint(1, 32))).setMaxAccess("readonly")
if mibBuilder.loadTexts: hh3cRcrCRAdjuPrefCurMRName.setStatus('current')
if mibBuilder.loadTexts: hh3cRcrCRAdjuPrefCurMRName.setDescription('The name of the MR which the current outbound traffic flows through.')
hh3cRcrCRAdjuPrefCurOutIfName = MibTableColumn((1, 3, 6, 1, 4, 1, 25506, 2, 48, 2, 4, 1, 7), OctetString()).setMaxAccess("readonly")
if mibBuilder.loadTexts: hh3cRcrCRAdjuPrefCurOutIfName.setStatus('current')
if mibBuilder.loadTexts: hh3cRcrCRAdjuPrefCurOutIfName.setDescription('The name of the external interface on the MR which the current outbound traffic flows through.')
hh3cRcrCRAdjuPrefPersistTime = MibTableColumn((1, 3, 6, 1, 4, 1, 25506, 2, 48, 2, 4, 1, 8), Integer32()).setUnits('second').setMaxAccess("readonly")
if mibBuilder.loadTexts: hh3cRcrCRAdjuPrefPersistTime.setStatus('current')
if mibBuilder.loadTexts: hh3cRcrCRAdjuPrefPersistTime.setDescription('The persisting time from the time which the adjusted outbound traffic has been adjusted by CR to now.')
hh3cRcrCRAdjuPrefAgeTime = MibTableColumn((1, 3, 6, 1, 4, 1, 25506, 2, 48, 2, 4, 1, 9), Integer32()).setUnits('second').setMaxAccess("readonly")
if mibBuilder.loadTexts: hh3cRcrCRAdjuPrefAgeTime.setStatus('current')
if mibBuilder.loadTexts: hh3cRcrCRAdjuPrefAgeTime.setDescription('The time which the adjusted prefix remains.')
mibBuilder.exportSymbols("HH3C-RCR-MIB", hh3cRcrCRAdjuPrefDestAddr=hh3cRcrCRAdjuPrefDestAddr, hh3cRcrCRMatPrefPerfDestIPAddr=hh3cRcrCRMatPrefPerfDestIPAddr, hh3cRcrCRMatPrefPerfDestMaskLen=hh3cRcrCRMatPrefPerfDestMaskLen, hh3cRcrMR=hh3cRcrMR, hh3cRcrCRStudyMode=hh3cRcrCRStudyMode, hh3cRcrMRName=hh3cRcrMRName, hh3cRcrCRRcrPlyID=hh3cRcrCRRcrPlyID, hh3cRcrCRRcrPlyMatchOperPlyName=hh3cRcrCRRcrPlyMatchOperPlyName, hh3cRcrCRMatPrefixPerfEntry=hh3cRcrCRMatPrefixPerfEntry, hh3cRcrCRAdjuPrefPreOutIfName=hh3cRcrCRAdjuPrefPreOutIfName, hh3cRcrMRGroup=hh3cRcrMRGroup, hh3cRcrMRStateEntry=hh3cRcrMRStateEntry, hh3cRcrCR=hh3cRcrCR, hh3cRcrCRPortNum=hh3cRcrCRPortNum, hh3cRcrCRRcrPlyLossRate=hh3cRcrCRRcrPlyLossRate, hh3cRcrMROutIfUsedBandRate=hh3cRcrMROutIfUsedBandRate, hh3cRcr=hh3cRcr, hh3cRcrMRAuthType=hh3cRcrMRAuthType, hh3cRcrMRAuthPwd=hh3cRcrMRAuthPwd, hh3cRcrCRRcrAclNumber=hh3cRcrCRRcrAclNumber, hh3cRcrCRChooseMode=hh3cRcrCRChooseMode, hh3cRcrCRAdjustPrefixTable=hh3cRcrCRAdjustPrefixTable, hh3cRcrMROutIfStateEntry=hh3cRcrMROutIfStateEntry, hh3cRcrCRMatPrefPerfThroughput=hh3cRcrCRMatPrefPerfThroughput, hh3cRcrCRGroup=hh3cRcrCRGroup, hh3cRcrCRAdjuPrefPreMRName=hh3cRcrCRAdjuPrefPreMRName, hh3cRcrCRAdjustPrefixEntry=hh3cRcrCRAdjustPrefixEntry, hh3cRcrCRMatPrefPerfAddrType=hh3cRcrCRMatPrefPerfAddrType, hh3cRcrMRStateTable=hh3cRcrMRStateTable, hh3cRcrCRAdjuPrefCurOutIfName=hh3cRcrCRAdjuPrefCurOutIfName, hh3cRcrCRAdjuPrefAgeTime=hh3cRcrCRAdjuPrefAgeTime, hh3cRcrCRMatPrefixPerfTable=hh3cRcrCRMatPrefixPerfTable, hh3cRcrMROutIfMaxUsedBandRate=hh3cRcrMROutIfMaxUsedBandRate, hh3cRcrMROutIfStateTable=hh3cRcrMROutIfStateTable, hh3cRcrMRAllMaxUsedBandRate=hh3cRcrMRAllMaxUsedBandRate, hh3cRcrCRCtrlMode=hh3cRcrCRCtrlMode, hh3cRcrCRRcrPlyMatchStudyEnable=hh3cRcrCRRcrPlyMatchStudyEnable, hh3cRcrMRState=hh3cRcrMRState, hh3cRcrCRKeepaliveTime=hh3cRcrCRKeepaliveTime, hh3cRcrMROutIfState=hh3cRcrMROutIfState, hh3cRcrMROutIfMinUsedBandRate=hh3cRcrMROutIfMinUsedBandRate, hh3cRcrCRIpPrefixLen=hh3cRcrCRIpPrefixLen, hh3cRcrCRMatPrefPerfLossRate=hh3cRcrCRMatPrefPerfLossRate, hh3cRcrMRAllMinUsedBandRate=hh3cRcrMRAllMinUsedBandRate, hh3cRcrMRListenTime=hh3cRcrMRListenTime, hh3cRcrCRStudyIpPrefixNum=hh3cRcrCRStudyIpPrefixNum, hh3cRcrCRRcrPolicyEntry=hh3cRcrCRRcrPolicyEntry, hh3cRcrCRRcrPlyMatchIPListName=hh3cRcrCRRcrPlyMatchIPListName, hh3cRcrCRAdjuPrefDestAddrType=hh3cRcrCRAdjuPrefDestAddrType, hh3cRcrCRMatPrefPerfDelayTime=hh3cRcrCRMatPrefPerfDelayTime, hh3cRcrMROutIfName=hh3cRcrMROutIfName, hh3cRcrCRState=hh3cRcrCRState, hh3cRcrCRRcrPolicyTable=hh3cRcrCRRcrPolicyTable, hh3cRcrCRAdjuPrefMaskLen=hh3cRcrCRAdjuPrefMaskLen, hh3cRcrCRAdjuPrefCurMRName=hh3cRcrCRAdjuPrefCurMRName, hh3cRcrCRRcrPlyDelayTime=hh3cRcrCRRcrPlyDelayTime, PYSNMP_MODULE_ID=hh3cRcr, hh3cRcrCRPolicyMode=hh3cRcrCRPolicyMode, hh3cRcrCRAdjuPrefPersistTime=hh3cRcrCRAdjuPrefPersistTime)
| (integer, octet_string, object_identifier) = mibBuilder.importSymbols('ASN1', 'Integer', 'OctetString', 'ObjectIdentifier')
(named_values,) = mibBuilder.importSymbols('ASN1-ENUMERATION', 'NamedValues')
(constraints_union, value_range_constraint, single_value_constraint, value_size_constraint, constraints_intersection) = mibBuilder.importSymbols('ASN1-REFINEMENT', 'ConstraintsUnion', 'ValueRangeConstraint', 'SingleValueConstraint', 'ValueSizeConstraint', 'ConstraintsIntersection')
(hh3c_common,) = mibBuilder.importSymbols('HH3C-OID-MIB', 'hh3cCommon')
(interface_index,) = mibBuilder.importSymbols('IF-MIB', 'InterfaceIndex')
(inet_address, inet_address_type) = mibBuilder.importSymbols('INET-ADDRESS-MIB', 'InetAddress', 'InetAddressType')
(notification_group, module_compliance) = mibBuilder.importSymbols('SNMPv2-CONF', 'NotificationGroup', 'ModuleCompliance')
(counter32, module_identity, integer32, ip_address, bits, unsigned32, counter64, iso, time_ticks, notification_type, object_identity, gauge32, mib_scalar, mib_table, mib_table_row, mib_table_column, mib_identifier) = mibBuilder.importSymbols('SNMPv2-SMI', 'Counter32', 'ModuleIdentity', 'Integer32', 'IpAddress', 'Bits', 'Unsigned32', 'Counter64', 'iso', 'TimeTicks', 'NotificationType', 'ObjectIdentity', 'Gauge32', 'MibScalar', 'MibTable', 'MibTableRow', 'MibTableColumn', 'MibIdentifier')
(display_string, textual_convention) = mibBuilder.importSymbols('SNMPv2-TC', 'DisplayString', 'TextualConvention')
hh3c_rcr = module_identity((1, 3, 6, 1, 4, 1, 25506, 2, 48))
hh3cRcr.setRevisions(('2005-06-28 19:36',))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
if mibBuilder.loadTexts:
hh3cRcr.setRevisionsDescriptions(('The modified revision of this MIB module. Rewrite the whole MIB.',))
if mibBuilder.loadTexts:
hh3cRcr.setLastUpdated('200506281936Z')
if mibBuilder.loadTexts:
hh3cRcr.setOrganization('Hangzhou H3C Tech. Co., Ltd.')
if mibBuilder.loadTexts:
hh3cRcr.setContactInfo('Platform Team Hangzhou H3C Tech. Co., Ltd. Hai-Dian District Beijing P.R. China http://www.h3c.com Zip:100085 ')
if mibBuilder.loadTexts:
hh3cRcr.setDescription("This MIB is applicable to router-devices. It's made for RCR (Resilient Controllable Routing). RCR provides an effective resolution which can dynamically auto-adjust outbound traffic to the optimal external interface by monitoring the performance and traffic load of each external interface. It provides the functions of intelligentized traffic load distribution and the optimal external interface selection. This can optimally utilize the external interfaces. Furthermore, RCR realized the function which can select the optimal external interface based on different classes of operation flow.")
hh3c_rcr_mr = mib_identifier((1, 3, 6, 1, 4, 1, 25506, 2, 48, 1))
hh3c_rcr_mr_group = mib_identifier((1, 3, 6, 1, 4, 1, 25506, 2, 48, 1, 1))
hh3c_rcr_mr_all_max_used_band_rate = mib_scalar((1, 3, 6, 1, 4, 1, 25506, 2, 48, 1, 1, 1), integer32().subtype(subtypeSpec=value_range_constraint(1, 100))).setUnits('%').setMaxAccess('readwrite')
if mibBuilder.loadTexts:
hh3cRcrMRAllMaxUsedBandRate.setStatus('current')
if mibBuilder.loadTexts:
hh3cRcrMRAllMaxUsedBandRate.setDescription('The max used band rate of all external interfaces on member router-devices(MRs) which are controlled by RCR.')
hh3c_rcr_mr_all_min_used_band_rate = mib_scalar((1, 3, 6, 1, 4, 1, 25506, 2, 48, 1, 1, 2), integer32().subtype(subtypeSpec=value_range_constraint(0, 100))).setUnits('%').setMaxAccess('readwrite')
if mibBuilder.loadTexts:
hh3cRcrMRAllMinUsedBandRate.setStatus('current')
if mibBuilder.loadTexts:
hh3cRcrMRAllMinUsedBandRate.setDescription('The min used band rate of all external interfaces on MRs which are controlled by RCR.')
hh3c_rcr_mr_listen_time = mib_scalar((1, 3, 6, 1, 4, 1, 25506, 2, 48, 1, 1, 3), integer32().subtype(subtypeSpec=value_range_constraint(1, 1440))).setUnits('minute').setMaxAccess('readwrite')
if mibBuilder.loadTexts:
hh3cRcrMRListenTime.setStatus('current')
if mibBuilder.loadTexts:
hh3cRcrMRListenTime.setDescription('The persistent time of a probe on member router-device(MR) which is controlled by RCR.')
hh3c_rcr_mr_state_table = mib_table((1, 3, 6, 1, 4, 1, 25506, 2, 48, 1, 2))
if mibBuilder.loadTexts:
hh3cRcrMRStateTable.setStatus('current')
if mibBuilder.loadTexts:
hh3cRcrMRStateTable.setDescription('This table contains state information of each MR which is controlled by RCR.')
hh3c_rcr_mr_state_entry = mib_table_row((1, 3, 6, 1, 4, 1, 25506, 2, 48, 1, 2, 1)).setIndexNames((0, 'HH3C-RCR-MIB', 'hh3cRcrMRName'))
if mibBuilder.loadTexts:
hh3cRcrMRStateEntry.setStatus('current')
if mibBuilder.loadTexts:
hh3cRcrMRStateEntry.setDescription('Entry items')
hh3c_rcr_mr_name = mib_table_column((1, 3, 6, 1, 4, 1, 25506, 2, 48, 1, 2, 1, 1), octet_string().subtype(subtypeSpec=value_size_constraint(1, 32)))
if mibBuilder.loadTexts:
hh3cRcrMRName.setStatus('current')
if mibBuilder.loadTexts:
hh3cRcrMRName.setDescription('The name of MR which is controlled by RCR.')
hh3c_rcr_mr_state = mib_table_column((1, 3, 6, 1, 4, 1, 25506, 2, 48, 1, 2, 1, 2), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3))).clone(namedValues=named_values(('down', 1), ('up', 2), ('controlled', 3)))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
hh3cRcrMRState.setStatus('current')
if mibBuilder.loadTexts:
hh3cRcrMRState.setDescription('The state of MR where identified on the controller router-device(CR). down: The MR has been enabled but has not connected to the CR with TCP connection. up: The MR has already successfully connected to the CR but has not been ready for adjusting route. controlled: The MR has already passed the consultation with the CR and could be controlled by it.')
hh3c_rcr_mr_auth_type = mib_table_column((1, 3, 6, 1, 4, 1, 25506, 2, 48, 1, 2, 1, 3), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2))).clone(namedValues=named_values(('simple', 1), ('md5', 2)))).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
hh3cRcrMRAuthType.setStatus('current')
if mibBuilder.loadTexts:
hh3cRcrMRAuthType.setDescription('The authentication type of communication packet between CR and MR.')
hh3c_rcr_mr_auth_pwd = mib_table_column((1, 3, 6, 1, 4, 1, 25506, 2, 48, 1, 2, 1, 4), octet_string()).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
hh3cRcrMRAuthPwd.setStatus('current')
if mibBuilder.loadTexts:
hh3cRcrMRAuthPwd.setDescription('The authentication password of communication packet between CR and MR. Reading this object always results in an OCTET STRING of length zero; authentication may not be bypassed by reading the MIB object.')
hh3c_rcr_mr_out_if_state_table = mib_table((1, 3, 6, 1, 4, 1, 25506, 2, 48, 1, 3))
if mibBuilder.loadTexts:
hh3cRcrMROutIfStateTable.setStatus('current')
if mibBuilder.loadTexts:
hh3cRcrMROutIfStateTable.setDescription('This table contains the external interface states of each MR which is controlled by RCR.')
hh3c_rcr_mr_out_if_state_entry = mib_table_row((1, 3, 6, 1, 4, 1, 25506, 2, 48, 1, 3, 1)).setIndexNames((0, 'HH3C-RCR-MIB', 'hh3cRcrMRName'), (0, 'HH3C-RCR-MIB', 'hh3cRcrMROutIfName'))
if mibBuilder.loadTexts:
hh3cRcrMROutIfStateEntry.setStatus('current')
if mibBuilder.loadTexts:
hh3cRcrMROutIfStateEntry.setDescription('Entry items')
hh3c_rcr_mr_out_if_name = mib_table_column((1, 3, 6, 1, 4, 1, 25506, 2, 48, 1, 3, 1, 1), octet_string().subtype(subtypeSpec=value_size_constraint(1, 48)))
if mibBuilder.loadTexts:
hh3cRcrMROutIfName.setStatus('current')
if mibBuilder.loadTexts:
hh3cRcrMROutIfName.setDescription('The name of external interface on each MR.')
hh3c_rcr_mr_out_if_state = mib_table_column((1, 3, 6, 1, 4, 1, 25506, 2, 48, 1, 3, 1, 2), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3))).clone(namedValues=named_values(('down', 1), ('up', 2), ('notExist', 3)))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
hh3cRcrMROutIfState.setStatus('current')
if mibBuilder.loadTexts:
hh3cRcrMROutIfState.setDescription('The state of external interface on each MR.')
hh3c_rcr_mr_out_if_max_used_band_rate = mib_table_column((1, 3, 6, 1, 4, 1, 25506, 2, 48, 1, 3, 1, 3), integer32().subtype(subtypeSpec=value_range_constraint(1, 100))).setUnits('%').setMaxAccess('readwrite')
if mibBuilder.loadTexts:
hh3cRcrMROutIfMaxUsedBandRate.setStatus('current')
if mibBuilder.loadTexts:
hh3cRcrMROutIfMaxUsedBandRate.setDescription('The max spendable bandwidth rate on external interface.')
hh3c_rcr_mr_out_if_min_used_band_rate = mib_table_column((1, 3, 6, 1, 4, 1, 25506, 2, 48, 1, 3, 1, 4), integer32().subtype(subtypeSpec=value_range_constraint(0, 100))).setUnits('%').setMaxAccess('readwrite')
if mibBuilder.loadTexts:
hh3cRcrMROutIfMinUsedBandRate.setStatus('current')
if mibBuilder.loadTexts:
hh3cRcrMROutIfMinUsedBandRate.setDescription('The min spendable bandwidth rate on external interface.')
hh3c_rcr_mr_out_if_used_band_rate = mib_table_column((1, 3, 6, 1, 4, 1, 25506, 2, 48, 1, 3, 1, 5), integer32().subtype(subtypeSpec=value_range_constraint(0, 100))).setUnits('%').setMaxAccess('readonly')
if mibBuilder.loadTexts:
hh3cRcrMROutIfUsedBandRate.setStatus('current')
if mibBuilder.loadTexts:
hh3cRcrMROutIfUsedBandRate.setDescription('The used bandwidth rate on external interface.')
hh3c_rcr_cr = mib_identifier((1, 3, 6, 1, 4, 1, 25506, 2, 48, 2))
hh3c_rcr_cr_group = mib_identifier((1, 3, 6, 1, 4, 1, 25506, 2, 48, 2, 1))
hh3c_rcr_cr_state = mib_scalar((1, 3, 6, 1, 4, 1, 25506, 2, 48, 2, 1, 1), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3))).clone(namedValues=named_values(('down', 1), ('init', 2), ('active', 3)))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
hh3cRcrCRState.setStatus('current')
if mibBuilder.loadTexts:
hh3cRcrCRState.setDescription('The state of the CR which is controlled by RCR. down: The CR has been enabled but has not started a TCP connection server. init: The CR has started a TCP connection server and has been waiting for MR connection, but has not been ready for adjusting route. active: The CR is ready for adjusting route.')
hh3c_rcr_cr_port_num = mib_scalar((1, 3, 6, 1, 4, 1, 25506, 2, 48, 2, 1, 2), integer32()).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
hh3cRcrCRPortNum.setStatus('current')
if mibBuilder.loadTexts:
hh3cRcrCRPortNum.setDescription('The communication port number between CR and MR.')
hh3c_rcr_cr_ctrl_mode = mib_scalar((1, 3, 6, 1, 4, 1, 25506, 2, 48, 2, 1, 3), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2))).clone(namedValues=named_values(('control', 1), ('observe', 2)))).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
hh3cRcrCRCtrlMode.setStatus('current')
if mibBuilder.loadTexts:
hh3cRcrCRCtrlMode.setDescription('The observe mode or control mode is configured to operate in the CR. observe: The CR monitors prefixes and external interfaces based on default and user-defined policies and then reports the status of the network and the decisions that should be made but does not implement any changes. controlled: The CR monitors prefixes and external interfaces based on default and user-defined policies and then reports the status of the network and the decisions that should be made and implement any changes.')
hh3c_rcr_cr_choose_mode = mib_scalar((1, 3, 6, 1, 4, 1, 25506, 2, 48, 2, 1, 4), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2))).clone(namedValues=named_values(('good', 1), ('best', 2)))).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
hh3cRcrCRChooseMode.setStatus('current')
if mibBuilder.loadTexts:
hh3cRcrCRChooseMode.setDescription('The algorithm used to choose an alternative external interface for a prefix. good: The first external interface that conforms to the policy is selected as the new external interface. best: Information is collected from all external interfaces and the best one is selected even though the best external interface may not be in-policy.')
hh3c_rcr_cr_keepalive_time = mib_scalar((1, 3, 6, 1, 4, 1, 25506, 2, 48, 2, 1, 5), integer32().subtype(subtypeSpec=value_range_constraint(1, 1000))).setUnits('second').setMaxAccess('readwrite')
if mibBuilder.loadTexts:
hh3cRcrCRKeepaliveTime.setStatus('current')
if mibBuilder.loadTexts:
hh3cRcrCRKeepaliveTime.setDescription('The interval time of the transmission of the keepalive communication packet between CR and MR.')
hh3c_rcr_cr_policy_mode = mib_scalar((1, 3, 6, 1, 4, 1, 25506, 2, 48, 2, 1, 6), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3))).clone(namedValues=named_values(('prefix', 1), ('operation', 2), ('study', 3)))).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
hh3cRcrCRPolicyMode.setStatus('current')
if mibBuilder.loadTexts:
hh3cRcrCRPolicyMode.setDescription('The chosen policy mode which decides to change what prefix. prefix: An RCR policy is designed to select IP prefixes or to select RCR learn policies using a match clause and then to apply RCR policy configurations using a set clause. operation: To deside to adjusted prefixes based on operation which user configured. study: To learn and optimize prefixes based on the highest throughput or the highest delay.')
hh3c_rcr_cr_study_mode = mib_scalar((1, 3, 6, 1, 4, 1, 25506, 2, 48, 2, 1, 7), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2))).clone(namedValues=named_values(('maxThoughout', 1), ('maxDelay', 2)))).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
hh3cRcrCRStudyMode.setStatus('current')
if mibBuilder.loadTexts:
hh3cRcrCRStudyMode.setDescription("The mode of collecting prefix in studying configuration mode. It's to collect either the prefix of max thoughtout or the prefix of max delay time. It doesn't have a value when CR isn't in studying configuration mode.")
hh3c_rcr_cr_study_ip_prefix_num = mib_scalar((1, 3, 6, 1, 4, 1, 25506, 2, 48, 2, 1, 8), integer32().subtype(subtypeSpec=value_range_constraint(1, 2500))).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
hh3cRcrCRStudyIpPrefixNum.setStatus('current')
if mibBuilder.loadTexts:
hh3cRcrCRStudyIpPrefixNum.setDescription('The max number of collecting prefix in studying configuration mode.')
hh3c_rcr_cr_ip_prefix_len = mib_scalar((1, 3, 6, 1, 4, 1, 25506, 2, 48, 2, 1, 9), integer32().subtype(subtypeSpec=value_range_constraint(1, 32)).clone(24)).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
hh3cRcrCRIpPrefixLen.setStatus('current')
if mibBuilder.loadTexts:
hh3cRcrCRIpPrefixLen.setDescription('The mask length of collecting prefix in configuration mode.')
hh3c_rcr_cr_rcr_policy_table = mib_table((1, 3, 6, 1, 4, 1, 25506, 2, 48, 2, 2))
if mibBuilder.loadTexts:
hh3cRcrCRRcrPolicyTable.setStatus('current')
if mibBuilder.loadTexts:
hh3cRcrCRRcrPolicyTable.setDescription('This table contains objects to get statistic information of interfaces on a device.')
hh3c_rcr_cr_rcr_policy_entry = mib_table_row((1, 3, 6, 1, 4, 1, 25506, 2, 48, 2, 2, 1)).setIndexNames((0, 'HH3C-RCR-MIB', 'hh3cRcrCRRcrPlyID'))
if mibBuilder.loadTexts:
hh3cRcrCRRcrPolicyEntry.setStatus('current')
if mibBuilder.loadTexts:
hh3cRcrCRRcrPolicyEntry.setDescription('Entry items')
hh3c_rcr_cr_rcr_ply_id = mib_table_column((1, 3, 6, 1, 4, 1, 25506, 2, 48, 2, 2, 1, 1), integer32())
if mibBuilder.loadTexts:
hh3cRcrCRRcrPlyID.setStatus('current')
if mibBuilder.loadTexts:
hh3cRcrCRRcrPlyID.setDescription('The ID of RCR policy which the user has configured.')
hh3c_rcr_cr_rcr_ply_match_ip_list_name = mib_table_column((1, 3, 6, 1, 4, 1, 25506, 2, 48, 2, 2, 1, 2), octet_string().subtype(subtypeSpec=value_size_constraint(1, 19))).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
hh3cRcrCRRcrPlyMatchIPListName.setStatus('current')
if mibBuilder.loadTexts:
hh3cRcrCRRcrPlyMatchIPListName.setDescription('The matched IP prefix list name of RCR policy which the user has configured.')
hh3c_rcr_cr_rcr_ply_match_study_enable = mib_table_column((1, 3, 6, 1, 4, 1, 25506, 2, 48, 2, 2, 1, 3), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2))).clone(namedValues=named_values(('disable', 1), ('enable', 2)))).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
hh3cRcrCRRcrPlyMatchStudyEnable.setStatus('current')
if mibBuilder.loadTexts:
hh3cRcrCRRcrPlyMatchStudyEnable.setDescription('Whether the RCR policy which the user has configured is matched for studying prefix mode.')
hh3c_rcr_cr_rcr_ply_match_oper_ply_name = mib_table_column((1, 3, 6, 1, 4, 1, 25506, 2, 48, 2, 2, 1, 4), octet_string().subtype(subtypeSpec=value_size_constraint(1, 19))).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
hh3cRcrCRRcrPlyMatchOperPlyName.setStatus('current')
if mibBuilder.loadTexts:
hh3cRcrCRRcrPlyMatchOperPlyName.setDescription('The matched operation policy name of RCR policy which the user has configured.')
hh3c_rcr_cr_rcr_acl_number = mib_table_column((1, 3, 6, 1, 4, 1, 25506, 2, 48, 2, 2, 1, 5), integer32().subtype(subtypeSpec=value_range_constraint(3000, 3999))).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
hh3cRcrCRRcrAclNumber.setStatus('current')
if mibBuilder.loadTexts:
hh3cRcrCRRcrAclNumber.setDescription('The matched acl number of RCR operation policy which the user has configured.')
hh3c_rcr_cr_rcr_ply_delay_time = mib_table_column((1, 3, 6, 1, 4, 1, 25506, 2, 48, 2, 2, 1, 6), integer32().subtype(subtypeSpec=value_range_constraint(1, 10000))).setUnits('millisecond').setMaxAccess('readwrite')
if mibBuilder.loadTexts:
hh3cRcrCRRcrPlyDelayTime.setStatus('current')
if mibBuilder.loadTexts:
hh3cRcrCRRcrPlyDelayTime.setDescription('The absolute maximum delay time. The range of values that can be configured is from 1 to 10000.')
hh3c_rcr_cr_rcr_ply_loss_rate = mib_table_column((1, 3, 6, 1, 4, 1, 25506, 2, 48, 2, 2, 1, 7), integer32().subtype(subtypeSpec=value_range_constraint(1, 100))).setUnits('%').setMaxAccess('readwrite')
if mibBuilder.loadTexts:
hh3cRcrCRRcrPlyLossRate.setStatus('current')
if mibBuilder.loadTexts:
hh3cRcrCRRcrPlyLossRate.setDescription('The packet loss percent of prefix which the CR concerns.')
hh3c_rcr_cr_mat_prefix_perf_table = mib_table((1, 3, 6, 1, 4, 1, 25506, 2, 48, 2, 3))
if mibBuilder.loadTexts:
hh3cRcrCRMatPrefixPerfTable.setStatus('current')
if mibBuilder.loadTexts:
hh3cRcrCRMatPrefixPerfTable.setDescription('This table contains the matched prefix performance information.')
hh3c_rcr_cr_mat_prefix_perf_entry = mib_table_row((1, 3, 6, 1, 4, 1, 25506, 2, 48, 2, 3, 1)).setIndexNames((0, 'HH3C-RCR-MIB', 'hh3cRcrCRMatPrefPerfAddrType'), (0, 'HH3C-RCR-MIB', 'hh3cRcrCRMatPrefPerfDestIPAddr'), (0, 'HH3C-RCR-MIB', 'hh3cRcrCRMatPrefPerfDestMaskLen'))
if mibBuilder.loadTexts:
hh3cRcrCRMatPrefixPerfEntry.setStatus('current')
if mibBuilder.loadTexts:
hh3cRcrCRMatPrefixPerfEntry.setDescription('Entry items')
hh3c_rcr_cr_mat_pref_perf_addr_type = mib_table_column((1, 3, 6, 1, 4, 1, 25506, 2, 48, 2, 3, 1, 1), inet_address_type())
if mibBuilder.loadTexts:
hh3cRcrCRMatPrefPerfAddrType.setStatus('current')
if mibBuilder.loadTexts:
hh3cRcrCRMatPrefPerfAddrType.setDescription('The destination IP addresses type of matched prefix which the CR wants (IPv4 or IPv6).')
hh3c_rcr_cr_mat_pref_perf_dest_ip_addr = mib_table_column((1, 3, 6, 1, 4, 1, 25506, 2, 48, 2, 3, 1, 2), inet_address())
if mibBuilder.loadTexts:
hh3cRcrCRMatPrefPerfDestIPAddr.setStatus('current')
if mibBuilder.loadTexts:
hh3cRcrCRMatPrefPerfDestIPAddr.setDescription('The destination IP address of matched prefix which the CR wants.')
hh3c_rcr_cr_mat_pref_perf_dest_mask_len = mib_table_column((1, 3, 6, 1, 4, 1, 25506, 2, 48, 2, 3, 1, 3), integer32().subtype(subtypeSpec=value_range_constraint(0, 32)))
if mibBuilder.loadTexts:
hh3cRcrCRMatPrefPerfDestMaskLen.setStatus('current')
if mibBuilder.loadTexts:
hh3cRcrCRMatPrefPerfDestMaskLen.setDescription('The destination IP address mask length of matched prefix which the CR wants.')
hh3c_rcr_cr_mat_pref_perf_delay_time = mib_table_column((1, 3, 6, 1, 4, 1, 25506, 2, 48, 2, 3, 1, 4), integer32().subtype(subtypeSpec=value_range_constraint(1, 10000))).setUnits('second').setMaxAccess('readonly')
if mibBuilder.loadTexts:
hh3cRcrCRMatPrefPerfDelayTime.setStatus('current')
if mibBuilder.loadTexts:
hh3cRcrCRMatPrefPerfDelayTime.setDescription('The absolute maximum delay time of prefix which the CR has configured.')
hh3c_rcr_cr_mat_pref_perf_loss_rate = mib_table_column((1, 3, 6, 1, 4, 1, 25506, 2, 48, 2, 3, 1, 5), integer32().subtype(subtypeSpec=value_range_constraint(1, 100))).setUnits('%').setMaxAccess('readonly')
if mibBuilder.loadTexts:
hh3cRcrCRMatPrefPerfLossRate.setStatus('current')
if mibBuilder.loadTexts:
hh3cRcrCRMatPrefPerfLossRate.setDescription('The packet loss percent of prefix which the CR has configured.')
hh3c_rcr_cr_mat_pref_perf_throughput = mib_table_column((1, 3, 6, 1, 4, 1, 25506, 2, 48, 2, 3, 1, 6), integer32()).setUnits('kb').setMaxAccess('readonly')
if mibBuilder.loadTexts:
hh3cRcrCRMatPrefPerfThroughput.setStatus('current')
if mibBuilder.loadTexts:
hh3cRcrCRMatPrefPerfThroughput.setDescription('The bandwidth of prefix which the CR has monitored.')
hh3c_rcr_cr_adjust_prefix_table = mib_table((1, 3, 6, 1, 4, 1, 25506, 2, 48, 2, 4))
if mibBuilder.loadTexts:
hh3cRcrCRAdjustPrefixTable.setStatus('current')
if mibBuilder.loadTexts:
hh3cRcrCRAdjustPrefixTable.setDescription('This table contains objects to get adjusted prefix information which the CR controlled.')
hh3c_rcr_cr_adjust_prefix_entry = mib_table_row((1, 3, 6, 1, 4, 1, 25506, 2, 48, 2, 4, 1)).setIndexNames((0, 'HH3C-RCR-MIB', 'hh3cRcrCRAdjuPrefDestAddrType'), (0, 'HH3C-RCR-MIB', 'hh3cRcrCRAdjuPrefDestAddr'), (0, 'HH3C-RCR-MIB', 'hh3cRcrCRAdjuPrefMaskLen'), (0, 'HH3C-RCR-MIB', 'hh3cRcrCRAdjuPrefPreMRName'), (0, 'HH3C-RCR-MIB', 'hh3cRcrCRAdjuPrefPreOutIfName'))
if mibBuilder.loadTexts:
hh3cRcrCRAdjustPrefixEntry.setStatus('current')
if mibBuilder.loadTexts:
hh3cRcrCRAdjustPrefixEntry.setDescription('Entry items')
hh3c_rcr_cr_adju_pref_dest_addr_type = mib_table_column((1, 3, 6, 1, 4, 1, 25506, 2, 48, 2, 4, 1, 1), inet_address_type())
if mibBuilder.loadTexts:
hh3cRcrCRAdjuPrefDestAddrType.setStatus('current')
if mibBuilder.loadTexts:
hh3cRcrCRAdjuPrefDestAddrType.setDescription('The IP address type of the adjusted prefix which CR controlled (IPv4 or IPv6).')
hh3c_rcr_cr_adju_pref_dest_addr = mib_table_column((1, 3, 6, 1, 4, 1, 25506, 2, 48, 2, 4, 1, 2), inet_address())
if mibBuilder.loadTexts:
hh3cRcrCRAdjuPrefDestAddr.setStatus('current')
if mibBuilder.loadTexts:
hh3cRcrCRAdjuPrefDestAddr.setDescription('The IP address of the adjusted prefix which CR controlled.')
hh3c_rcr_cr_adju_pref_mask_len = mib_table_column((1, 3, 6, 1, 4, 1, 25506, 2, 48, 2, 4, 1, 3), integer32().subtype(subtypeSpec=value_range_constraint(0, 32)))
if mibBuilder.loadTexts:
hh3cRcrCRAdjuPrefMaskLen.setStatus('current')
if mibBuilder.loadTexts:
hh3cRcrCRAdjuPrefMaskLen.setDescription('The IP address mask length of the adjusted prefix which CR controlled.')
hh3c_rcr_cr_adju_pref_pre_mr_name = mib_table_column((1, 3, 6, 1, 4, 1, 25506, 2, 48, 2, 4, 1, 4), octet_string().subtype(subtypeSpec=value_size_constraint(1, 32)))
if mibBuilder.loadTexts:
hh3cRcrCRAdjuPrefPreMRName.setStatus('current')
if mibBuilder.loadTexts:
hh3cRcrCRAdjuPrefPreMRName.setDescription('The name of the MR which the previous outbound traffic flows through.')
hh3c_rcr_cr_adju_pref_pre_out_if_name = mib_table_column((1, 3, 6, 1, 4, 1, 25506, 2, 48, 2, 4, 1, 5), octet_string().subtype(subtypeSpec=value_size_constraint(1, 48)))
if mibBuilder.loadTexts:
hh3cRcrCRAdjuPrefPreOutIfName.setStatus('current')
if mibBuilder.loadTexts:
hh3cRcrCRAdjuPrefPreOutIfName.setDescription('The name of the external interface on the MR which the previous outbound traffic flows through.')
hh3c_rcr_cr_adju_pref_cur_mr_name = mib_table_column((1, 3, 6, 1, 4, 1, 25506, 2, 48, 2, 4, 1, 6), octet_string().subtype(subtypeSpec=value_size_constraint(1, 32))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
hh3cRcrCRAdjuPrefCurMRName.setStatus('current')
if mibBuilder.loadTexts:
hh3cRcrCRAdjuPrefCurMRName.setDescription('The name of the MR which the current outbound traffic flows through.')
hh3c_rcr_cr_adju_pref_cur_out_if_name = mib_table_column((1, 3, 6, 1, 4, 1, 25506, 2, 48, 2, 4, 1, 7), octet_string()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
hh3cRcrCRAdjuPrefCurOutIfName.setStatus('current')
if mibBuilder.loadTexts:
hh3cRcrCRAdjuPrefCurOutIfName.setDescription('The name of the external interface on the MR which the current outbound traffic flows through.')
hh3c_rcr_cr_adju_pref_persist_time = mib_table_column((1, 3, 6, 1, 4, 1, 25506, 2, 48, 2, 4, 1, 8), integer32()).setUnits('second').setMaxAccess('readonly')
if mibBuilder.loadTexts:
hh3cRcrCRAdjuPrefPersistTime.setStatus('current')
if mibBuilder.loadTexts:
hh3cRcrCRAdjuPrefPersistTime.setDescription('The persisting time from the time which the adjusted outbound traffic has been adjusted by CR to now.')
hh3c_rcr_cr_adju_pref_age_time = mib_table_column((1, 3, 6, 1, 4, 1, 25506, 2, 48, 2, 4, 1, 9), integer32()).setUnits('second').setMaxAccess('readonly')
if mibBuilder.loadTexts:
hh3cRcrCRAdjuPrefAgeTime.setStatus('current')
if mibBuilder.loadTexts:
hh3cRcrCRAdjuPrefAgeTime.setDescription('The time which the adjusted prefix remains.')
mibBuilder.exportSymbols('HH3C-RCR-MIB', hh3cRcrCRAdjuPrefDestAddr=hh3cRcrCRAdjuPrefDestAddr, hh3cRcrCRMatPrefPerfDestIPAddr=hh3cRcrCRMatPrefPerfDestIPAddr, hh3cRcrCRMatPrefPerfDestMaskLen=hh3cRcrCRMatPrefPerfDestMaskLen, hh3cRcrMR=hh3cRcrMR, hh3cRcrCRStudyMode=hh3cRcrCRStudyMode, hh3cRcrMRName=hh3cRcrMRName, hh3cRcrCRRcrPlyID=hh3cRcrCRRcrPlyID, hh3cRcrCRRcrPlyMatchOperPlyName=hh3cRcrCRRcrPlyMatchOperPlyName, hh3cRcrCRMatPrefixPerfEntry=hh3cRcrCRMatPrefixPerfEntry, hh3cRcrCRAdjuPrefPreOutIfName=hh3cRcrCRAdjuPrefPreOutIfName, hh3cRcrMRGroup=hh3cRcrMRGroup, hh3cRcrMRStateEntry=hh3cRcrMRStateEntry, hh3cRcrCR=hh3cRcrCR, hh3cRcrCRPortNum=hh3cRcrCRPortNum, hh3cRcrCRRcrPlyLossRate=hh3cRcrCRRcrPlyLossRate, hh3cRcrMROutIfUsedBandRate=hh3cRcrMROutIfUsedBandRate, hh3cRcr=hh3cRcr, hh3cRcrMRAuthType=hh3cRcrMRAuthType, hh3cRcrMRAuthPwd=hh3cRcrMRAuthPwd, hh3cRcrCRRcrAclNumber=hh3cRcrCRRcrAclNumber, hh3cRcrCRChooseMode=hh3cRcrCRChooseMode, hh3cRcrCRAdjustPrefixTable=hh3cRcrCRAdjustPrefixTable, hh3cRcrMROutIfStateEntry=hh3cRcrMROutIfStateEntry, hh3cRcrCRMatPrefPerfThroughput=hh3cRcrCRMatPrefPerfThroughput, hh3cRcrCRGroup=hh3cRcrCRGroup, hh3cRcrCRAdjuPrefPreMRName=hh3cRcrCRAdjuPrefPreMRName, hh3cRcrCRAdjustPrefixEntry=hh3cRcrCRAdjustPrefixEntry, hh3cRcrCRMatPrefPerfAddrType=hh3cRcrCRMatPrefPerfAddrType, hh3cRcrMRStateTable=hh3cRcrMRStateTable, hh3cRcrCRAdjuPrefCurOutIfName=hh3cRcrCRAdjuPrefCurOutIfName, hh3cRcrCRAdjuPrefAgeTime=hh3cRcrCRAdjuPrefAgeTime, hh3cRcrCRMatPrefixPerfTable=hh3cRcrCRMatPrefixPerfTable, hh3cRcrMROutIfMaxUsedBandRate=hh3cRcrMROutIfMaxUsedBandRate, hh3cRcrMROutIfStateTable=hh3cRcrMROutIfStateTable, hh3cRcrMRAllMaxUsedBandRate=hh3cRcrMRAllMaxUsedBandRate, hh3cRcrCRCtrlMode=hh3cRcrCRCtrlMode, hh3cRcrCRRcrPlyMatchStudyEnable=hh3cRcrCRRcrPlyMatchStudyEnable, hh3cRcrMRState=hh3cRcrMRState, hh3cRcrCRKeepaliveTime=hh3cRcrCRKeepaliveTime, hh3cRcrMROutIfState=hh3cRcrMROutIfState, hh3cRcrMROutIfMinUsedBandRate=hh3cRcrMROutIfMinUsedBandRate, hh3cRcrCRIpPrefixLen=hh3cRcrCRIpPrefixLen, hh3cRcrCRMatPrefPerfLossRate=hh3cRcrCRMatPrefPerfLossRate, hh3cRcrMRAllMinUsedBandRate=hh3cRcrMRAllMinUsedBandRate, hh3cRcrMRListenTime=hh3cRcrMRListenTime, hh3cRcrCRStudyIpPrefixNum=hh3cRcrCRStudyIpPrefixNum, hh3cRcrCRRcrPolicyEntry=hh3cRcrCRRcrPolicyEntry, hh3cRcrCRRcrPlyMatchIPListName=hh3cRcrCRRcrPlyMatchIPListName, hh3cRcrCRAdjuPrefDestAddrType=hh3cRcrCRAdjuPrefDestAddrType, hh3cRcrCRMatPrefPerfDelayTime=hh3cRcrCRMatPrefPerfDelayTime, hh3cRcrMROutIfName=hh3cRcrMROutIfName, hh3cRcrCRState=hh3cRcrCRState, hh3cRcrCRRcrPolicyTable=hh3cRcrCRRcrPolicyTable, hh3cRcrCRAdjuPrefMaskLen=hh3cRcrCRAdjuPrefMaskLen, hh3cRcrCRAdjuPrefCurMRName=hh3cRcrCRAdjuPrefCurMRName, hh3cRcrCRRcrPlyDelayTime=hh3cRcrCRRcrPlyDelayTime, PYSNMP_MODULE_ID=hh3cRcr, hh3cRcrCRPolicyMode=hh3cRcrCRPolicyMode, hh3cRcrCRAdjuPrefPersistTime=hh3cRcrCRAdjuPrefPersistTime) |
# Copyright 2019-2020 The ASReview Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
def test_get_projects(client):
"""Test get projects."""
response = client.get("/api/projects")
json_data = response.get_json()
assert "result" in json_data
assert isinstance(json_data["result"], list)
| def test_get_projects(client):
"""Test get projects."""
response = client.get('/api/projects')
json_data = response.get_json()
assert 'result' in json_data
assert isinstance(json_data['result'], list) |
"""
0 = possible pathway
1 = wall
2 = rat's path
"""
board = [
[0, 0, 0, 0, 0],
[1, 1, 0, 1, 0],
[0, 0, 0, 1, 0],
[0, 1, 1, 1, 1],
[0, 0, 0, 0, 0],
]
moves = [(0, 1), (1, 0), (0, -1), (-1, 0)]
def main():
if solve(board, 0, 0, 0):
print("Solvable")
[print(row) for row in board]
else:
print("Not Solvable")
def solve(board, new_x, new_y, pos):
if isAllowed(new_x, new_y):
old_val = board[new_x][new_y]
board[new_x][new_y] = 2
# print("Pos: ", pos, " | x: ", new_x, " | y: ", new_y)
if isCompleted():
return True
for x, y in moves:
if solve(board, new_x + x, new_y + y, pos + 1):
return True
board[new_x][new_y] = old_val
return False
def isAllowed(x, y):
if x >= 0 and x < 5 and y >= 0 and y < 5 and board[x][y] == 0:
return True
return False
def isCompleted():
if board[4][4] == 2:
return True
return False
if __name__ == "__main__":
main()
| """
0 = possible pathway
1 = wall
2 = rat's path
"""
board = [[0, 0, 0, 0, 0], [1, 1, 0, 1, 0], [0, 0, 0, 1, 0], [0, 1, 1, 1, 1], [0, 0, 0, 0, 0]]
moves = [(0, 1), (1, 0), (0, -1), (-1, 0)]
def main():
if solve(board, 0, 0, 0):
print('Solvable')
[print(row) for row in board]
else:
print('Not Solvable')
def solve(board, new_x, new_y, pos):
if is_allowed(new_x, new_y):
old_val = board[new_x][new_y]
board[new_x][new_y] = 2
if is_completed():
return True
for (x, y) in moves:
if solve(board, new_x + x, new_y + y, pos + 1):
return True
board[new_x][new_y] = old_val
return False
def is_allowed(x, y):
if x >= 0 and x < 5 and (y >= 0) and (y < 5) and (board[x][y] == 0):
return True
return False
def is_completed():
if board[4][4] == 2:
return True
return False
if __name__ == '__main__':
main() |
DATA_DIR = "/path/your_data_path"
IDX_DIR = "/path/your_index_path"
FILE_ROOT = "./test"
CALIB_FILE = "./imagenet_int8_cache"
MODEL_FILE = "./resnet_imagenet.uff" | data_dir = '/path/your_data_path'
idx_dir = '/path/your_index_path'
file_root = './test'
calib_file = './imagenet_int8_cache'
model_file = './resnet_imagenet.uff' |
APP_DIRECTORY_NAME = "APP"
SRC_DIRECTORY_NAME = "src"
TEMPLATES_DIRECTORY_NAME = "templates"
# Production React Js Template files having Github Repository Links
REACTJS_TEMPLATES_URLS_DICT = {
"package.json-tpl": "https://raw.githubusercontent.com/Jitensid/django-webpack-dev-server/main/assets/reactjs/package.json-tpl",
"webpack.config.js-tpl": "https://raw.githubusercontent.com/Jitensid/django-webpack-dev-server/main/assets/reactjs/webpack.config.js-tpl",
"babel.config.json-tpl": "https://raw.githubusercontent.com/Jitensid/django-webpack-dev-server/main/assets/reactjs/babel.config.json-tpl",
"App.js-tpl": "https://raw.githubusercontent.com/Jitensid/django-webpack-dev-server/main/assets/reactjs/App.js-tpl",
"index.js-tpl": "https://raw.githubusercontent.com/Jitensid/django-webpack-dev-server/main/assets/reactjs/index.js-tpl",
"App.css-tpl": "https://raw.githubusercontent.com/Jitensid/django-webpack-dev-server/main/assets/reactjs/App.css-tpl",
"reactlogo.png": "https://raw.githubusercontent.com/Jitensid/django-webpack-dev-server/main/assets/reactjs/reactlogo.png",
}
# Template files specific to react js configuration
PROD_REACTJS_TEMPLATE_FILES = [
(
APP_DIRECTORY_NAME,
"package.json",
REACTJS_TEMPLATES_URLS_DICT["package.json-tpl"],
),
(
APP_DIRECTORY_NAME,
"webpack.config.js",
REACTJS_TEMPLATES_URLS_DICT["webpack.config.js-tpl"],
),
(
APP_DIRECTORY_NAME,
"babel.config.json",
REACTJS_TEMPLATES_URLS_DICT["babel.config.json-tpl"],
),
(SRC_DIRECTORY_NAME, "App.js", REACTJS_TEMPLATES_URLS_DICT["App.js-tpl"]),
(SRC_DIRECTORY_NAME, "index.js", REACTJS_TEMPLATES_URLS_DICT["index.js-tpl"]),
(SRC_DIRECTORY_NAME, "App.css", REACTJS_TEMPLATES_URLS_DICT["App.css-tpl"]),
(SRC_DIRECTORY_NAME, "reactlogo.png", REACTJS_TEMPLATES_URLS_DICT["reactlogo.png"]),
]
| app_directory_name = 'APP'
src_directory_name = 'src'
templates_directory_name = 'templates'
reactjs_templates_urls_dict = {'package.json-tpl': 'https://raw.githubusercontent.com/Jitensid/django-webpack-dev-server/main/assets/reactjs/package.json-tpl', 'webpack.config.js-tpl': 'https://raw.githubusercontent.com/Jitensid/django-webpack-dev-server/main/assets/reactjs/webpack.config.js-tpl', 'babel.config.json-tpl': 'https://raw.githubusercontent.com/Jitensid/django-webpack-dev-server/main/assets/reactjs/babel.config.json-tpl', 'App.js-tpl': 'https://raw.githubusercontent.com/Jitensid/django-webpack-dev-server/main/assets/reactjs/App.js-tpl', 'index.js-tpl': 'https://raw.githubusercontent.com/Jitensid/django-webpack-dev-server/main/assets/reactjs/index.js-tpl', 'App.css-tpl': 'https://raw.githubusercontent.com/Jitensid/django-webpack-dev-server/main/assets/reactjs/App.css-tpl', 'reactlogo.png': 'https://raw.githubusercontent.com/Jitensid/django-webpack-dev-server/main/assets/reactjs/reactlogo.png'}
prod_reactjs_template_files = [(APP_DIRECTORY_NAME, 'package.json', REACTJS_TEMPLATES_URLS_DICT['package.json-tpl']), (APP_DIRECTORY_NAME, 'webpack.config.js', REACTJS_TEMPLATES_URLS_DICT['webpack.config.js-tpl']), (APP_DIRECTORY_NAME, 'babel.config.json', REACTJS_TEMPLATES_URLS_DICT['babel.config.json-tpl']), (SRC_DIRECTORY_NAME, 'App.js', REACTJS_TEMPLATES_URLS_DICT['App.js-tpl']), (SRC_DIRECTORY_NAME, 'index.js', REACTJS_TEMPLATES_URLS_DICT['index.js-tpl']), (SRC_DIRECTORY_NAME, 'App.css', REACTJS_TEMPLATES_URLS_DICT['App.css-tpl']), (SRC_DIRECTORY_NAME, 'reactlogo.png', REACTJS_TEMPLATES_URLS_DICT['reactlogo.png'])] |
# SPDX-License-Identifier: GPL-3.0-only
def make_definitions(f, ecpp, bcpp, all_enums, all_bitfields, all_structs_arranged):
f.write("// SPDX-License-Identifier: GPL-3.0-only\n\n// This file was auto-generated.\n// If you want to edit this, edit the .json definitions and rerun the generator script, instead.\n\n")
header_name = "INVADER__TAG__HEK__CLASS__DEFINITION_HPP"
f.write("#ifndef {}\n".format(header_name))
f.write("#define {}\n\n".format(header_name))
f.write("#include \"../../hek/data_type.hpp\"\n\n")
f.write("namespace Invader::HEK {\n")
ecpp.write("// SPDX-License-Identifier: GPL-3.0-only\n\n// This file was auto-generated.\n// If you want to edit this, edit the .json definitions and rerun the generator script, instead.\n\n")
ecpp.write("#include <cstring>\n")
ecpp.write("#include <invader/printf.hpp>\n")
ecpp.write("#include <invader/tag/hek/definition.hpp>\n\n")
ecpp.write("namespace Invader::HEK {\n")
bcpp.write("// SPDX-License-Identifier: GPL-3.0-only\n\n// This file was auto-generated.\n// If you want to edit this, edit the .json definitions and rerun the generator script, instead.\n\n")
bcpp.write("#include <cstring>\n")
bcpp.write("#include <cctype>\n")
bcpp.write("#include <invader/printf.hpp>\n")
bcpp.write("#include <invader/tag/hek/definition.hpp>\n\n")
bcpp.write("namespace Invader::HEK {\n")
# Convert PascalCase to UPPER_SNAKE_CASE
def format_enum(prefix, value):
return "{}_{}".format(prefix,value.upper()).replace("-", "_")
def format_enum_str(value):
return value.lower()
def write_enum(name, fields, fields_pretty, type, cpp):
f.write(" enum {} : {} {{\n".format(name, type))
prefix = ""
name_to_consider = name.replace("HUD", "Hud").replace("UI", "Ui").replace("GBX", "Gbx")
for i in name_to_consider:
if prefix != "" and i.isupper():
prefix += "_"
prefix += i.upper()
for n in range(0,len(fields)):
f.write(" {}{},\n".format(format_enum(prefix, fields[n]), " = static_cast<{}>(1) << {}".format(type, n) if (cpp == bcpp) else ""))
f.write(" {}\n".format(format_enum(prefix, "enum_count")))
f.write(" };\n")
f.write(" /**\n")
f.write(" * Get the string representation of the enum.\n")
f.write(" * @param value value of the enum\n")
f.write(" * @return string representation of the enum\n")
f.write(" */\n")
f.write(" const char *{}_to_string({} value);\n".format(name, name))
cpp.write(" const char *{}_to_string({} value) {{\n".format(name, name))
cpp.write(" switch(value) {\n")
for n in fields:
cpp.write(" case {}::{}:\n".format(name, format_enum(prefix, n)))
cpp.write(" return \"{}\";\n".format(format_enum_str(n)))
cpp.write(" default:\n")
cpp.write(" throw std::exception();\n")
cpp.write(" }\n")
cpp.write(" }\n")
f.write(" /**\n")
f.write(" * Get the pretty string representation of the enum.\n")
f.write(" * @param value value of the enum\n")
f.write(" * @return pretty string representation of the enum\n")
f.write(" */\n")
f.write(" const char *{}_to_string_pretty({} value);\n".format(name, name))
cpp.write(" const char *{}_to_string_pretty({} value) {{\n".format(name, name))
cpp.write(" switch(value) {\n")
for n in range(0,len(fields)):
cpp.write(" case {}::{}:\n".format(name, format_enum(prefix, fields[n])))
cpp.write(" return \"{}\";\n".format(fields_pretty[n]))
cpp.write(" default:\n")
cpp.write(" throw std::exception();\n")
cpp.write(" }\n")
cpp.write(" }\n")
f.write(" /**\n")
f.write(" * Get the enum value from the string.\n")
f.write(" * @param value value of the enum as a string\n")
f.write(" * @return value of the enum\n")
f.write(" */\n")
f.write(" {} {}_from_string(const char *value);\n".format(name, name))
cpp.write(" {} {}_from_string(const char *value) {{\n".format(name, name))
for n in range(0,len(fields)):
cpp.write(" {}if(std::strcmp(value, \"{}\") == 0) {{\n".format("" if n == 0 else "else ", format_enum_str(fields[n])))
cpp.write(" return {}::{};\n".format(name, format_enum(prefix, fields[n])))
cpp.write(" }\n")
cpp.write(" else {\n")
cpp.write(" throw std::exception();\n")
cpp.write(" }\n")
cpp.write(" }\n")
f.write("\n")
# Write enums at the top first, then bitfields
for e in all_enums:
write_enum(e["name"], e["options_formatted"], e["options"], "TagEnum", ecpp)
for b in all_bitfields:
f.write(" using {} = std::uint{}_t;\n".format(b["name"], b["width"]))
write_enum("{}Flag".format(b["name"]), b["fields_formatted"], b["fields"], "std::uint{}_t".format(b["width"]), bcpp)
ecpp.write("}\n")
bcpp.write("}\n")
# Now the hard part
padding_present = False
for s in all_structs_arranged:
f.write(" ENDIAN_TEMPLATE(EndianType) struct {} {}{{\n".format(s["name"], ": {}<EndianType> ".format(s["inherits"]) if "inherits" in s else ""))
for n in s["fields"]:
type_to_write = n["type"]
if type_to_write.startswith("int") or type_to_write.startswith("uint"):
type_to_write = "std::{}_t".format(type_to_write)
elif type_to_write == "pad":
f.write(" PAD(0x{:X});\n".format(n["size"]))
continue
if "flagged" in n and n["flagged"]:
type_to_write = "FlaggedInt<{}>".format(type_to_write)
name = n["member_name"]
if "count" in n:
name = "{}[{}]".format(name, n["count"])
format_to_use = None
default_endian = "EndianType"
if "endian" in n:
if n["endian"] == "little":
default_endian = "LittleEndian"
elif n["endian"] == "big":
default_endian = "BigEndian"
elif n["endian"] == None:
default_endian = None
if type_to_write == "TagReflexive":
f.write(" TagReflexive<{}, {}> {};\n".format(default_endian, n["struct"], name))
else:
if default_endian is None:
format_to_use = "{}"
elif "compound" in n and n["compound"]:
format_to_use = "{{}}<{}>".format(default_endian)
else:
format_to_use = "{}<{{}}>".format(default_endian)
if "bounds" in n and n["bounds"]:
f.write(" Bounds<{}> {};\n".format(format_to_use.format(type_to_write), name))
else:
f.write(" {} {};\n".format(format_to_use.format(type_to_write), name))
# Make sure we have all of the structs we depend on, too
depended_structs = []
dependency = s
padding_present = False
while dependency is not None:
depended_structs.append(dependency)
if not padding_present:
for n in dependency["fields"]:
if n["type"] == "pad":
padding_present = True
break
if "inherits" in dependency:
dependency_name = dependency["inherits"]
dependency = None
for ds in all_structs_arranged:
if ds["name"] == dependency_name:
dependency = ds
break
else:
break
# And we can't forget the copy part
f.write(" ENDIAN_TEMPLATE(NewEndian) operator {}<NewEndian>() const {{\n".format(s["name"]))
f.write(" {}<NewEndian> copy{};\n".format(s["name"], " = {}" if padding_present else ""))
for ds in depended_structs:
for n in ds["fields"]:
if n["type"] == "pad":
continue
else:
f.write(" {}({});\n".format("COPY_THIS_ARRAY" if "count" in n else "COPY_THIS", n["member_name"]))
f.write(" return copy;\n")
f.write(" }\n")
f.write(" };\n")
f.write(" static_assert(sizeof({}<NativeEndian>) == 0x{:X});\n\n".format(s["name"], s["size"]))
f.write("}\n\n")
f.write("#endif\n")
| def make_definitions(f, ecpp, bcpp, all_enums, all_bitfields, all_structs_arranged):
f.write('// SPDX-License-Identifier: GPL-3.0-only\n\n// This file was auto-generated.\n// If you want to edit this, edit the .json definitions and rerun the generator script, instead.\n\n')
header_name = 'INVADER__TAG__HEK__CLASS__DEFINITION_HPP'
f.write('#ifndef {}\n'.format(header_name))
f.write('#define {}\n\n'.format(header_name))
f.write('#include "../../hek/data_type.hpp"\n\n')
f.write('namespace Invader::HEK {\n')
ecpp.write('// SPDX-License-Identifier: GPL-3.0-only\n\n// This file was auto-generated.\n// If you want to edit this, edit the .json definitions and rerun the generator script, instead.\n\n')
ecpp.write('#include <cstring>\n')
ecpp.write('#include <invader/printf.hpp>\n')
ecpp.write('#include <invader/tag/hek/definition.hpp>\n\n')
ecpp.write('namespace Invader::HEK {\n')
bcpp.write('// SPDX-License-Identifier: GPL-3.0-only\n\n// This file was auto-generated.\n// If you want to edit this, edit the .json definitions and rerun the generator script, instead.\n\n')
bcpp.write('#include <cstring>\n')
bcpp.write('#include <cctype>\n')
bcpp.write('#include <invader/printf.hpp>\n')
bcpp.write('#include <invader/tag/hek/definition.hpp>\n\n')
bcpp.write('namespace Invader::HEK {\n')
def format_enum(prefix, value):
return '{}_{}'.format(prefix, value.upper()).replace('-', '_')
def format_enum_str(value):
return value.lower()
def write_enum(name, fields, fields_pretty, type, cpp):
f.write(' enum {} : {} {{\n'.format(name, type))
prefix = ''
name_to_consider = name.replace('HUD', 'Hud').replace('UI', 'Ui').replace('GBX', 'Gbx')
for i in name_to_consider:
if prefix != '' and i.isupper():
prefix += '_'
prefix += i.upper()
for n in range(0, len(fields)):
f.write(' {}{},\n'.format(format_enum(prefix, fields[n]), ' = static_cast<{}>(1) << {}'.format(type, n) if cpp == bcpp else ''))
f.write(' {}\n'.format(format_enum(prefix, 'enum_count')))
f.write(' };\n')
f.write(' /**\n')
f.write(' * Get the string representation of the enum.\n')
f.write(' * @param value value of the enum\n')
f.write(' * @return string representation of the enum\n')
f.write(' */\n')
f.write(' const char *{}_to_string({} value);\n'.format(name, name))
cpp.write(' const char *{}_to_string({} value) {{\n'.format(name, name))
cpp.write(' switch(value) {\n')
for n in fields:
cpp.write(' case {}::{}:\n'.format(name, format_enum(prefix, n)))
cpp.write(' return "{}";\n'.format(format_enum_str(n)))
cpp.write(' default:\n')
cpp.write(' throw std::exception();\n')
cpp.write(' }\n')
cpp.write(' }\n')
f.write(' /**\n')
f.write(' * Get the pretty string representation of the enum.\n')
f.write(' * @param value value of the enum\n')
f.write(' * @return pretty string representation of the enum\n')
f.write(' */\n')
f.write(' const char *{}_to_string_pretty({} value);\n'.format(name, name))
cpp.write(' const char *{}_to_string_pretty({} value) {{\n'.format(name, name))
cpp.write(' switch(value) {\n')
for n in range(0, len(fields)):
cpp.write(' case {}::{}:\n'.format(name, format_enum(prefix, fields[n])))
cpp.write(' return "{}";\n'.format(fields_pretty[n]))
cpp.write(' default:\n')
cpp.write(' throw std::exception();\n')
cpp.write(' }\n')
cpp.write(' }\n')
f.write(' /**\n')
f.write(' * Get the enum value from the string.\n')
f.write(' * @param value value of the enum as a string\n')
f.write(' * @return value of the enum\n')
f.write(' */\n')
f.write(' {} {}_from_string(const char *value);\n'.format(name, name))
cpp.write(' {} {}_from_string(const char *value) {{\n'.format(name, name))
for n in range(0, len(fields)):
cpp.write(' {}if(std::strcmp(value, "{}") == 0) {{\n'.format('' if n == 0 else 'else ', format_enum_str(fields[n])))
cpp.write(' return {}::{};\n'.format(name, format_enum(prefix, fields[n])))
cpp.write(' }\n')
cpp.write(' else {\n')
cpp.write(' throw std::exception();\n')
cpp.write(' }\n')
cpp.write(' }\n')
f.write('\n')
for e in all_enums:
write_enum(e['name'], e['options_formatted'], e['options'], 'TagEnum', ecpp)
for b in all_bitfields:
f.write(' using {} = std::uint{}_t;\n'.format(b['name'], b['width']))
write_enum('{}Flag'.format(b['name']), b['fields_formatted'], b['fields'], 'std::uint{}_t'.format(b['width']), bcpp)
ecpp.write('}\n')
bcpp.write('}\n')
padding_present = False
for s in all_structs_arranged:
f.write(' ENDIAN_TEMPLATE(EndianType) struct {} {}{{\n'.format(s['name'], ': {}<EndianType> '.format(s['inherits']) if 'inherits' in s else ''))
for n in s['fields']:
type_to_write = n['type']
if type_to_write.startswith('int') or type_to_write.startswith('uint'):
type_to_write = 'std::{}_t'.format(type_to_write)
elif type_to_write == 'pad':
f.write(' PAD(0x{:X});\n'.format(n['size']))
continue
if 'flagged' in n and n['flagged']:
type_to_write = 'FlaggedInt<{}>'.format(type_to_write)
name = n['member_name']
if 'count' in n:
name = '{}[{}]'.format(name, n['count'])
format_to_use = None
default_endian = 'EndianType'
if 'endian' in n:
if n['endian'] == 'little':
default_endian = 'LittleEndian'
elif n['endian'] == 'big':
default_endian = 'BigEndian'
elif n['endian'] == None:
default_endian = None
if type_to_write == 'TagReflexive':
f.write(' TagReflexive<{}, {}> {};\n'.format(default_endian, n['struct'], name))
else:
if default_endian is None:
format_to_use = '{}'
elif 'compound' in n and n['compound']:
format_to_use = '{{}}<{}>'.format(default_endian)
else:
format_to_use = '{}<{{}}>'.format(default_endian)
if 'bounds' in n and n['bounds']:
f.write(' Bounds<{}> {};\n'.format(format_to_use.format(type_to_write), name))
else:
f.write(' {} {};\n'.format(format_to_use.format(type_to_write), name))
depended_structs = []
dependency = s
padding_present = False
while dependency is not None:
depended_structs.append(dependency)
if not padding_present:
for n in dependency['fields']:
if n['type'] == 'pad':
padding_present = True
break
if 'inherits' in dependency:
dependency_name = dependency['inherits']
dependency = None
for ds in all_structs_arranged:
if ds['name'] == dependency_name:
dependency = ds
break
else:
break
f.write(' ENDIAN_TEMPLATE(NewEndian) operator {}<NewEndian>() const {{\n'.format(s['name']))
f.write(' {}<NewEndian> copy{};\n'.format(s['name'], ' = {}' if padding_present else ''))
for ds in depended_structs:
for n in ds['fields']:
if n['type'] == 'pad':
continue
else:
f.write(' {}({});\n'.format('COPY_THIS_ARRAY' if 'count' in n else 'COPY_THIS', n['member_name']))
f.write(' return copy;\n')
f.write(' }\n')
f.write(' };\n')
f.write(' static_assert(sizeof({}<NativeEndian>) == 0x{:X});\n\n'.format(s['name'], s['size']))
f.write('}\n\n')
f.write('#endif\n') |
def run_gbrt(d, r, t, ne=0, lr=0.1, md=3, trs=0, frs=0, mf=7):
X_train, X_test, y_train, y_test = train_test_split(
np.append(r, d, 1), t, random_state=trs)
gbrt = GradientBoostingClassifier(
n_estimators=ne, learning_rate=lr, max_depth=md, max_features=mf, random_state=frs)
gbrt.fit(X_train[:, 1:], y_train)
print("Training score: {:.3f}".format(gbrt.score(X_train[:, 1:], y_train)))
print("Test score: {:.3f}".format(gbrt.score(X_test[:, 1:], y_test)))
plot_feature_importances(gbrt)
preds = gbrt.predict(X_test[:, 1:])
print(preds)
print('Predictions: {} {}'.format(type(preds), preds.shape))
dec = gbrt.decision_function(X_test[:, 1:])
print('Decision function: {} {}'.format(type(dec), dec.shape))
print(dec[:3])
probs = gbrt.predict_proba(X_test[:, 1:])
print('Probabilities: {} {}'.format(type(probs), probs.shape))
print(probs[:3])
outcomes = np.append(X_test, np.reshape(preds, (-1, 1)), 1)
print(outcomes[:6])
| def run_gbrt(d, r, t, ne=0, lr=0.1, md=3, trs=0, frs=0, mf=7):
(x_train, x_test, y_train, y_test) = train_test_split(np.append(r, d, 1), t, random_state=trs)
gbrt = gradient_boosting_classifier(n_estimators=ne, learning_rate=lr, max_depth=md, max_features=mf, random_state=frs)
gbrt.fit(X_train[:, 1:], y_train)
print('Training score: {:.3f}'.format(gbrt.score(X_train[:, 1:], y_train)))
print('Test score: {:.3f}'.format(gbrt.score(X_test[:, 1:], y_test)))
plot_feature_importances(gbrt)
preds = gbrt.predict(X_test[:, 1:])
print(preds)
print('Predictions: {} {}'.format(type(preds), preds.shape))
dec = gbrt.decision_function(X_test[:, 1:])
print('Decision function: {} {}'.format(type(dec), dec.shape))
print(dec[:3])
probs = gbrt.predict_proba(X_test[:, 1:])
print('Probabilities: {} {}'.format(type(probs), probs.shape))
print(probs[:3])
outcomes = np.append(X_test, np.reshape(preds, (-1, 1)), 1)
print(outcomes[:6]) |
class Solution:
def buildArray(self, target: List[int], n: int) -> List[str]:
res = []
n = min(max(target), n)
for i in range(1, n+1):
if i in target:
res += ["Push"]
else:
res += ["Push","Pop"]
return res
| class Solution:
def build_array(self, target: List[int], n: int) -> List[str]:
res = []
n = min(max(target), n)
for i in range(1, n + 1):
if i in target:
res += ['Push']
else:
res += ['Push', 'Pop']
return res |
expected_output = {
"vrf": {
"default": {
"source_address": "172.16.10.13",
"path": {
"172.16.121.10 BRI0": {
"neighbor_address": "172.16.121.10",
"neighbor_host": "sj1.cisco.com",
"distance_preferred_lookup": True,
"recursion_count": 0,
"interface_name": "BRI0",
"originated_topology": "ipv4 unicast base",
"lookup_topology": "ipv4 multicast base",
"route_mask": "172.16.0.0/16",
"table_type": "unicast",
}
},
"source_host": "host1",
}
}
}
| expected_output = {'vrf': {'default': {'source_address': '172.16.10.13', 'path': {'172.16.121.10 BRI0': {'neighbor_address': '172.16.121.10', 'neighbor_host': 'sj1.cisco.com', 'distance_preferred_lookup': True, 'recursion_count': 0, 'interface_name': 'BRI0', 'originated_topology': 'ipv4 unicast base', 'lookup_topology': 'ipv4 multicast base', 'route_mask': '172.16.0.0/16', 'table_type': 'unicast'}}, 'source_host': 'host1'}}} |
a = True
b = False
if a == b:
print(1)
else:
print(0)
| a = True
b = False
if a == b:
print(1)
else:
print(0) |
#!/usr/bin/env python3
i = 1
for x in range(-10000, 10000):
for y in range(-10000, 10000):
if (abs(x)+abs(y)) < 100:
i += 1
print(i)
| i = 1
for x in range(-10000, 10000):
for y in range(-10000, 10000):
if abs(x) + abs(y) < 100:
i += 1
print(i) |
class BaseChild:
payload = {
"patient": {
"lastName": "Deeererederepwswdwewwdw",
"firstName": "Allakirillohldldwwwlflrereeeded",
"middleName": "Ballerffffff",
"birthDate": "2011-05-29",
"sex": True,
"isAutoPhone": True
},
"linkType": "6",
}
def __init__(self):
pass
def post_info(self, payload):
return payload
| class Basechild:
payload = {'patient': {'lastName': 'Deeererederepwswdwewwdw', 'firstName': 'Allakirillohldldwwwlflrereeeded', 'middleName': 'Ballerffffff', 'birthDate': '2011-05-29', 'sex': True, 'isAutoPhone': True}, 'linkType': '6'}
def __init__(self):
pass
def post_info(self, payload):
return payload |
ENTRY_POINT = 'smallest_change'
#[PROMPT]
def smallest_change(arr):
"""
Given an array arr of integers, find the minimum number of elements that
need to be changed to make the array palindromic. A palindromic array is an array that
is read the same backwards and forwards. In one change, you can change one element to any other element.
For example:
smallest_change([1,2,3,5,4,7,9,6]) == 4
smallest_change([1, 2, 3, 4, 3, 2, 2]) == 1
smallest_change([1, 2, 3, 2, 1]) == 0
"""
#[SOLUTION]
ans = 0
for i in range(len(arr) // 2):
if arr[i] != arr[len(arr) - i - 1]:
ans += 1
return ans
#[CHECK]
def check(candidate):
# Check some simple cases
assert candidate([1,2,3,5,4,7,9,6]) == 4
assert candidate([1, 2, 3, 4, 3, 2, 2]) == 1
assert candidate([1, 4, 2]) == 1
assert candidate([1, 4, 4, 2]) == 1
# Check some edge cases that are easy to work out by hand.
assert candidate([1, 2, 3, 2, 1]) == 0
assert candidate([3, 1, 1, 3]) == 0
assert candidate([1]) == 0
assert candidate([0, 1]) == 1
| entry_point = 'smallest_change'
def smallest_change(arr):
"""
Given an array arr of integers, find the minimum number of elements that
need to be changed to make the array palindromic. A palindromic array is an array that
is read the same backwards and forwards. In one change, you can change one element to any other element.
For example:
smallest_change([1,2,3,5,4,7,9,6]) == 4
smallest_change([1, 2, 3, 4, 3, 2, 2]) == 1
smallest_change([1, 2, 3, 2, 1]) == 0
"""
ans = 0
for i in range(len(arr) // 2):
if arr[i] != arr[len(arr) - i - 1]:
ans += 1
return ans
def check(candidate):
assert candidate([1, 2, 3, 5, 4, 7, 9, 6]) == 4
assert candidate([1, 2, 3, 4, 3, 2, 2]) == 1
assert candidate([1, 4, 2]) == 1
assert candidate([1, 4, 4, 2]) == 1
assert candidate([1, 2, 3, 2, 1]) == 0
assert candidate([3, 1, 1, 3]) == 0
assert candidate([1]) == 0
assert candidate([0, 1]) == 1 |
# Write a dictionary or list to hdfs
best_params = {
"Key1": 123,
"Key2": "hello"
}
save_path = "hdfs://nameservice1/user/duc.nguyenv3/projects/01_lgbm_modeling/data/output/best_params.json"
sdf = (
spark
.sparkContext
.parallelize([best_params])
.toDF()
.coalesce(1)
.write
.mode("overwrite")
.json(save_path)
)
# Load the dict to SparkDF
json_df = spark.read.json(save_path) | best_params = {'Key1': 123, 'Key2': 'hello'}
save_path = 'hdfs://nameservice1/user/duc.nguyenv3/projects/01_lgbm_modeling/data/output/best_params.json'
sdf = spark.sparkContext.parallelize([best_params]).toDF().coalesce(1).write.mode('overwrite').json(save_path)
json_df = spark.read.json(save_path) |
"""
Test module for learning python packaging.
"""
NAME = "pybinson"
| """
Test module for learning python packaging.
"""
name = 'pybinson' |
'''
Title : sWAP cASE
Subdomain : Strings
Domain : Python
Author : Kalpak Seal
Created : 29 September 2016
'''
__author__ = 'Kalpak Seal'
inputString = raw_input()
finalString = ""
for i in range(0, len(inputString)):
currentChar = inputString[i]
if currentChar.islower() or currentChar.isupper():
finalString += currentChar.swapcase()
else:
finalString += currentChar
print(finalString)
'''
# Alternative One liner:
print ''.join([i.lower() if i.isupper() else i.upper() for i in raw_input()])
'''
| """
Title : sWAP cASE
Subdomain : Strings
Domain : Python
Author : Kalpak Seal
Created : 29 September 2016
"""
__author__ = 'Kalpak Seal'
input_string = raw_input()
final_string = ''
for i in range(0, len(inputString)):
current_char = inputString[i]
if currentChar.islower() or currentChar.isupper():
final_string += currentChar.swapcase()
else:
final_string += currentChar
print(finalString)
"\n# Alternative One liner:\n\nprint ''.join([i.lower() if i.isupper() else i.upper() for i in raw_input()])\n\n" |
class Singleton(object):
def __init__(self, func):
self._func = func
def Instance(self,*a,**k):
try:
return self._instance
except AttributeError:
self._instance = self._func(*a,**k)
return self._instance
def __call__(self):
raise TypeError('Singletons must be accessed by `Instance`.')
def __instancecheck__(self,inst):
return isinstance(inst,self._func)
@Singleton
class App(object):
def __init__(self, ):
pass
a= App.Instance()
b=App.Instance()
print(a is b)
| class Singleton(object):
def __init__(self, func):
self._func = func
def instance(self, *a, **k):
try:
return self._instance
except AttributeError:
self._instance = self._func(*a, **k)
return self._instance
def __call__(self):
raise type_error('Singletons must be accessed by `Instance`.')
def __instancecheck__(self, inst):
return isinstance(inst, self._func)
@Singleton
class App(object):
def __init__(self):
pass
a = App.Instance()
b = App.Instance()
print(a is b) |
FILE_TEMPLATE = "19C_{0:05d}.xml"
header = """<?xml version="1.0" encoding="UTF-8" ?><marc:collection xmlns:marc="http://www.loc.gov/MARC21/slim" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.loc.gov/MARC21/slim http://www.loc.gov/standards/marcxml/schema/MARC21slim.xsd">
"""
footer = "</marc:collection>\n"
CHUNKSIZE = 1000
chunk = 1
records = []
with open("19C.xml", "r") as xmlblob:
count = 0
records.append(xmlblob.next())
for rawline in xmlblob:
line = rawline.decode("utf-8")
if line.startswith("<marc:record>"):
count += 1
if count == CHUNKSIZE:
# store file
print("Storing file - {0}".format(chunk))
with open(FILE_TEMPLATE.format(chunk), "w") as chunkfile:
for item in records:
chunkfile.write(item.encode("utf-8"))
chunkfile.write(footer.encode("utf-8"))
records = [header]
chunk += 1
count = 0
records.append(line)
| file_template = '19C_{0:05d}.xml'
header = '<?xml version="1.0" encoding="UTF-8" ?><marc:collection xmlns:marc="http://www.loc.gov/MARC21/slim" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.loc.gov/MARC21/slim http://www.loc.gov/standards/marcxml/schema/MARC21slim.xsd">\n'
footer = '</marc:collection>\n'
chunksize = 1000
chunk = 1
records = []
with open('19C.xml', 'r') as xmlblob:
count = 0
records.append(xmlblob.next())
for rawline in xmlblob:
line = rawline.decode('utf-8')
if line.startswith('<marc:record>'):
count += 1
if count == CHUNKSIZE:
print('Storing file - {0}'.format(chunk))
with open(FILE_TEMPLATE.format(chunk), 'w') as chunkfile:
for item in records:
chunkfile.write(item.encode('utf-8'))
chunkfile.write(footer.encode('utf-8'))
records = [header]
chunk += 1
count = 0
records.append(line) |
#
# PySNMP MIB module BLUECOAT-AV-MIB (http://snmplabs.com/pysmi)
# ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/BLUECOAT-AV-MIB
# Produced by pysmi-0.3.4 at Mon Apr 29 17:22:33 2019
# On host DAVWANG4-M-1475 platform Darwin version 18.5.0 by user davwang4
# Using Python version 3.7.3 (default, Mar 27 2019, 09:23:15)
#
OctetString, ObjectIdentifier, Integer = mibBuilder.importSymbols("ASN1", "OctetString", "ObjectIdentifier", "Integer")
NamedValues, = mibBuilder.importSymbols("ASN1-ENUMERATION", "NamedValues")
ValueRangeConstraint, ConstraintsUnion, ValueSizeConstraint, SingleValueConstraint, ConstraintsIntersection = mibBuilder.importSymbols("ASN1-REFINEMENT", "ValueRangeConstraint", "ConstraintsUnion", "ValueSizeConstraint", "SingleValueConstraint", "ConstraintsIntersection")
blueCoatMgmt, = mibBuilder.importSymbols("BLUECOAT-MIB", "blueCoatMgmt")
NotificationGroup, ModuleCompliance = mibBuilder.importSymbols("SNMPv2-CONF", "NotificationGroup", "ModuleCompliance")
NotificationType, ObjectIdentity, Integer32, Counter32, Bits, ModuleIdentity, iso, Unsigned32, IpAddress, MibIdentifier, TimeTicks, Gauge32, MibScalar, MibTable, MibTableRow, MibTableColumn, Counter64 = mibBuilder.importSymbols("SNMPv2-SMI", "NotificationType", "ObjectIdentity", "Integer32", "Counter32", "Bits", "ModuleIdentity", "iso", "Unsigned32", "IpAddress", "MibIdentifier", "TimeTicks", "Gauge32", "MibScalar", "MibTable", "MibTableRow", "MibTableColumn", "Counter64")
DateAndTime, TextualConvention, DisplayString = mibBuilder.importSymbols("SNMPv2-TC", "DateAndTime", "TextualConvention", "DisplayString")
blueCoatAvMib = ModuleIdentity((1, 3, 6, 1, 4, 1, 3417, 2, 10))
if mibBuilder.loadTexts: blueCoatAvMib.setLastUpdated('0704160000Z')
if mibBuilder.loadTexts: blueCoatAvMib.setOrganization('Blue Coat Systems, Inc.')
blueCoatAvMibObjects = MibIdentifier((1, 3, 6, 1, 4, 1, 3417, 2, 10, 1))
blueCoatAvMibNotificationObjects = MibIdentifier((1, 3, 6, 1, 4, 1, 3417, 2, 10, 2))
blueCoatAvMibNotifications = MibIdentifier((1, 3, 6, 1, 4, 1, 3417, 2, 10, 3))
avFilesScanned = MibScalar((1, 3, 6, 1, 4, 1, 3417, 2, 10, 1, 1), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: avFilesScanned.setStatus('current')
avVirusesDetected = MibScalar((1, 3, 6, 1, 4, 1, 3417, 2, 10, 1, 2), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: avVirusesDetected.setStatus('current')
avPatternVersion = MibScalar((1, 3, 6, 1, 4, 1, 3417, 2, 10, 1, 3), DisplayString()).setMaxAccess("readonly")
if mibBuilder.loadTexts: avPatternVersion.setStatus('current')
avPatternDateTime = MibScalar((1, 3, 6, 1, 4, 1, 3417, 2, 10, 1, 4), DateAndTime()).setMaxAccess("readonly")
if mibBuilder.loadTexts: avPatternDateTime.setStatus('current')
avEngineVersion = MibScalar((1, 3, 6, 1, 4, 1, 3417, 2, 10, 1, 5), DisplayString()).setMaxAccess("readonly")
if mibBuilder.loadTexts: avEngineVersion.setStatus('current')
avVendorName = MibScalar((1, 3, 6, 1, 4, 1, 3417, 2, 10, 1, 6), DisplayString()).setMaxAccess("readonly")
if mibBuilder.loadTexts: avVendorName.setStatus('current')
avLicenseDaysRemaining = MibScalar((1, 3, 6, 1, 4, 1, 3417, 2, 10, 1, 7), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: avLicenseDaysRemaining.setStatus('current')
avPublishedFirmwareVersion = MibScalar((1, 3, 6, 1, 4, 1, 3417, 2, 10, 1, 8), DisplayString()).setMaxAccess("readonly")
if mibBuilder.loadTexts: avPublishedFirmwareVersion.setStatus('current')
avInstalledFirmwareVersion = MibScalar((1, 3, 6, 1, 4, 1, 3417, 2, 10, 1, 9), DisplayString()).setMaxAccess("readonly")
if mibBuilder.loadTexts: avInstalledFirmwareVersion.setStatus('current')
avSlowICAPConnections = MibScalar((1, 3, 6, 1, 4, 1, 3417, 2, 10, 1, 10), Gauge32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: avSlowICAPConnections.setStatus('current')
avUpdateFailureReason = MibScalar((1, 3, 6, 1, 4, 1, 3417, 2, 10, 2, 1), DisplayString())
if mibBuilder.loadTexts: avUpdateFailureReason.setStatus('current')
avUrl = MibScalar((1, 3, 6, 1, 4, 1, 3417, 2, 10, 2, 2), DisplayString())
if mibBuilder.loadTexts: avUrl.setStatus('current')
avVirusName = MibScalar((1, 3, 6, 1, 4, 1, 3417, 2, 10, 2, 3), DisplayString())
if mibBuilder.loadTexts: avVirusName.setStatus('current')
avVirusDetails = MibScalar((1, 3, 6, 1, 4, 1, 3417, 2, 10, 2, 4), DisplayString())
if mibBuilder.loadTexts: avVirusDetails.setStatus('current')
avErrorCode = MibScalar((1, 3, 6, 1, 4, 1, 3417, 2, 10, 2, 5), DisplayString())
if mibBuilder.loadTexts: avErrorCode.setStatus('current')
avErrorDetails = MibScalar((1, 3, 6, 1, 4, 1, 3417, 2, 10, 2, 6), DisplayString())
if mibBuilder.loadTexts: avErrorDetails.setStatus('current')
avPreviousFirmwareVersion = MibScalar((1, 3, 6, 1, 4, 1, 3417, 2, 10, 2, 7), DisplayString())
if mibBuilder.loadTexts: avPreviousFirmwareVersion.setStatus('current')
avICTMWarningReason = MibScalar((1, 3, 6, 1, 4, 1, 3417, 2, 10, 2, 8), DisplayString())
if mibBuilder.loadTexts: avICTMWarningReason.setStatus('current')
avAntivirusUpdateSuccess = NotificationType((1, 3, 6, 1, 4, 1, 3417, 2, 10, 3, 1)).setObjects(("BLUECOAT-AV-MIB", "avVendorName"), ("BLUECOAT-AV-MIB", "avEngineVersion"), ("BLUECOAT-AV-MIB", "avPatternVersion"), ("BLUECOAT-AV-MIB", "avPatternDateTime"))
if mibBuilder.loadTexts: avAntivirusUpdateSuccess.setStatus('current')
avAntivirusUpdateFailed = NotificationType((1, 3, 6, 1, 4, 1, 3417, 2, 10, 3, 2)).setObjects(("BLUECOAT-AV-MIB", "avUpdateFailureReason"), ("BLUECOAT-AV-MIB", "avVendorName"), ("BLUECOAT-AV-MIB", "avEngineVersion"), ("BLUECOAT-AV-MIB", "avPatternVersion"), ("BLUECOAT-AV-MIB", "avPatternDateTime"))
if mibBuilder.loadTexts: avAntivirusUpdateFailed.setStatus('current')
avVirusDetected = NotificationType((1, 3, 6, 1, 4, 1, 3417, 2, 10, 3, 3)).setObjects(("BLUECOAT-AV-MIB", "avUrl"), ("BLUECOAT-AV-MIB", "avVirusName"), ("BLUECOAT-AV-MIB", "avVirusDetails"))
if mibBuilder.loadTexts: avVirusDetected.setStatus('current')
avFileServed = NotificationType((1, 3, 6, 1, 4, 1, 3417, 2, 10, 3, 4)).setObjects(("BLUECOAT-AV-MIB", "avUrl"), ("BLUECOAT-AV-MIB", "avErrorCode"), ("BLUECOAT-AV-MIB", "avErrorDetails"))
if mibBuilder.loadTexts: avFileServed.setStatus('current')
avFileBlocked = NotificationType((1, 3, 6, 1, 4, 1, 3417, 2, 10, 3, 5)).setObjects(("BLUECOAT-AV-MIB", "avUrl"), ("BLUECOAT-AV-MIB", "avErrorCode"), ("BLUECOAT-AV-MIB", "avErrorDetails"))
if mibBuilder.loadTexts: avFileBlocked.setStatus('current')
avNewFirmwareAvailable = NotificationType((1, 3, 6, 1, 4, 1, 3417, 2, 10, 3, 6)).setObjects(("BLUECOAT-AV-MIB", "avInstalledFirmwareVersion"), ("BLUECOAT-AV-MIB", "avPublishedFirmwareVersion"))
if mibBuilder.loadTexts: avNewFirmwareAvailable.setStatus('current')
avFirmwareUpdateSuccess = NotificationType((1, 3, 6, 1, 4, 1, 3417, 2, 10, 3, 7)).setObjects(("BLUECOAT-AV-MIB", "avPreviousFirmwareVersion"), ("BLUECOAT-AV-MIB", "avInstalledFirmwareVersion"))
if mibBuilder.loadTexts: avFirmwareUpdateSuccess.setStatus('current')
avFirmwareUpdateFailed = NotificationType((1, 3, 6, 1, 4, 1, 3417, 2, 10, 3, 8)).setObjects(("BLUECOAT-AV-MIB", "avInstalledFirmwareVersion"), ("BLUECOAT-AV-MIB", "avPublishedFirmwareVersion"), ("BLUECOAT-AV-MIB", "avUpdateFailureReason"))
if mibBuilder.loadTexts: avFirmwareUpdateFailed.setStatus('current')
avAntivirusLicenseWarning = NotificationType((1, 3, 6, 1, 4, 1, 3417, 2, 10, 3, 9)).setObjects(("BLUECOAT-AV-MIB", "avVendorName"), ("BLUECOAT-AV-MIB", "avLicenseDaysRemaining"))
if mibBuilder.loadTexts: avAntivirusLicenseWarning.setStatus('current')
avICTMWarning = NotificationType((1, 3, 6, 1, 4, 1, 3417, 2, 10, 3, 10)).setObjects(("BLUECOAT-AV-MIB", "avICTMWarningReason"), ("BLUECOAT-AV-MIB", "avSlowICAPConnections"))
if mibBuilder.loadTexts: avICTMWarning.setStatus('current')
mibBuilder.exportSymbols("BLUECOAT-AV-MIB", avErrorDetails=avErrorDetails, blueCoatAvMib=blueCoatAvMib, avPatternDateTime=avPatternDateTime, PYSNMP_MODULE_ID=blueCoatAvMib, avPatternVersion=avPatternVersion, avVendorName=avVendorName, avUrl=avUrl, avFileBlocked=avFileBlocked, avPublishedFirmwareVersion=avPublishedFirmwareVersion, avFirmwareUpdateSuccess=avFirmwareUpdateSuccess, avFirmwareUpdateFailed=avFirmwareUpdateFailed, blueCoatAvMibNotifications=blueCoatAvMibNotifications, avLicenseDaysRemaining=avLicenseDaysRemaining, avFilesScanned=avFilesScanned, avUpdateFailureReason=avUpdateFailureReason, blueCoatAvMibObjects=blueCoatAvMibObjects, blueCoatAvMibNotificationObjects=blueCoatAvMibNotificationObjects, avEngineVersion=avEngineVersion, avVirusDetected=avVirusDetected, avICTMWarning=avICTMWarning, avAntivirusUpdateFailed=avAntivirusUpdateFailed, avErrorCode=avErrorCode, avAntivirusUpdateSuccess=avAntivirusUpdateSuccess, avVirusName=avVirusName, avSlowICAPConnections=avSlowICAPConnections, avAntivirusLicenseWarning=avAntivirusLicenseWarning, avFileServed=avFileServed, avInstalledFirmwareVersion=avInstalledFirmwareVersion, avICTMWarningReason=avICTMWarningReason, avVirusesDetected=avVirusesDetected, avPreviousFirmwareVersion=avPreviousFirmwareVersion, avVirusDetails=avVirusDetails, avNewFirmwareAvailable=avNewFirmwareAvailable)
| (octet_string, object_identifier, integer) = mibBuilder.importSymbols('ASN1', 'OctetString', 'ObjectIdentifier', 'Integer')
(named_values,) = mibBuilder.importSymbols('ASN1-ENUMERATION', 'NamedValues')
(value_range_constraint, constraints_union, value_size_constraint, single_value_constraint, constraints_intersection) = mibBuilder.importSymbols('ASN1-REFINEMENT', 'ValueRangeConstraint', 'ConstraintsUnion', 'ValueSizeConstraint', 'SingleValueConstraint', 'ConstraintsIntersection')
(blue_coat_mgmt,) = mibBuilder.importSymbols('BLUECOAT-MIB', 'blueCoatMgmt')
(notification_group, module_compliance) = mibBuilder.importSymbols('SNMPv2-CONF', 'NotificationGroup', 'ModuleCompliance')
(notification_type, object_identity, integer32, counter32, bits, module_identity, iso, unsigned32, ip_address, mib_identifier, time_ticks, gauge32, mib_scalar, mib_table, mib_table_row, mib_table_column, counter64) = mibBuilder.importSymbols('SNMPv2-SMI', 'NotificationType', 'ObjectIdentity', 'Integer32', 'Counter32', 'Bits', 'ModuleIdentity', 'iso', 'Unsigned32', 'IpAddress', 'MibIdentifier', 'TimeTicks', 'Gauge32', 'MibScalar', 'MibTable', 'MibTableRow', 'MibTableColumn', 'Counter64')
(date_and_time, textual_convention, display_string) = mibBuilder.importSymbols('SNMPv2-TC', 'DateAndTime', 'TextualConvention', 'DisplayString')
blue_coat_av_mib = module_identity((1, 3, 6, 1, 4, 1, 3417, 2, 10))
if mibBuilder.loadTexts:
blueCoatAvMib.setLastUpdated('0704160000Z')
if mibBuilder.loadTexts:
blueCoatAvMib.setOrganization('Blue Coat Systems, Inc.')
blue_coat_av_mib_objects = mib_identifier((1, 3, 6, 1, 4, 1, 3417, 2, 10, 1))
blue_coat_av_mib_notification_objects = mib_identifier((1, 3, 6, 1, 4, 1, 3417, 2, 10, 2))
blue_coat_av_mib_notifications = mib_identifier((1, 3, 6, 1, 4, 1, 3417, 2, 10, 3))
av_files_scanned = mib_scalar((1, 3, 6, 1, 4, 1, 3417, 2, 10, 1, 1), counter32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
avFilesScanned.setStatus('current')
av_viruses_detected = mib_scalar((1, 3, 6, 1, 4, 1, 3417, 2, 10, 1, 2), counter32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
avVirusesDetected.setStatus('current')
av_pattern_version = mib_scalar((1, 3, 6, 1, 4, 1, 3417, 2, 10, 1, 3), display_string()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
avPatternVersion.setStatus('current')
av_pattern_date_time = mib_scalar((1, 3, 6, 1, 4, 1, 3417, 2, 10, 1, 4), date_and_time()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
avPatternDateTime.setStatus('current')
av_engine_version = mib_scalar((1, 3, 6, 1, 4, 1, 3417, 2, 10, 1, 5), display_string()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
avEngineVersion.setStatus('current')
av_vendor_name = mib_scalar((1, 3, 6, 1, 4, 1, 3417, 2, 10, 1, 6), display_string()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
avVendorName.setStatus('current')
av_license_days_remaining = mib_scalar((1, 3, 6, 1, 4, 1, 3417, 2, 10, 1, 7), integer32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
avLicenseDaysRemaining.setStatus('current')
av_published_firmware_version = mib_scalar((1, 3, 6, 1, 4, 1, 3417, 2, 10, 1, 8), display_string()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
avPublishedFirmwareVersion.setStatus('current')
av_installed_firmware_version = mib_scalar((1, 3, 6, 1, 4, 1, 3417, 2, 10, 1, 9), display_string()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
avInstalledFirmwareVersion.setStatus('current')
av_slow_icap_connections = mib_scalar((1, 3, 6, 1, 4, 1, 3417, 2, 10, 1, 10), gauge32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
avSlowICAPConnections.setStatus('current')
av_update_failure_reason = mib_scalar((1, 3, 6, 1, 4, 1, 3417, 2, 10, 2, 1), display_string())
if mibBuilder.loadTexts:
avUpdateFailureReason.setStatus('current')
av_url = mib_scalar((1, 3, 6, 1, 4, 1, 3417, 2, 10, 2, 2), display_string())
if mibBuilder.loadTexts:
avUrl.setStatus('current')
av_virus_name = mib_scalar((1, 3, 6, 1, 4, 1, 3417, 2, 10, 2, 3), display_string())
if mibBuilder.loadTexts:
avVirusName.setStatus('current')
av_virus_details = mib_scalar((1, 3, 6, 1, 4, 1, 3417, 2, 10, 2, 4), display_string())
if mibBuilder.loadTexts:
avVirusDetails.setStatus('current')
av_error_code = mib_scalar((1, 3, 6, 1, 4, 1, 3417, 2, 10, 2, 5), display_string())
if mibBuilder.loadTexts:
avErrorCode.setStatus('current')
av_error_details = mib_scalar((1, 3, 6, 1, 4, 1, 3417, 2, 10, 2, 6), display_string())
if mibBuilder.loadTexts:
avErrorDetails.setStatus('current')
av_previous_firmware_version = mib_scalar((1, 3, 6, 1, 4, 1, 3417, 2, 10, 2, 7), display_string())
if mibBuilder.loadTexts:
avPreviousFirmwareVersion.setStatus('current')
av_ictm_warning_reason = mib_scalar((1, 3, 6, 1, 4, 1, 3417, 2, 10, 2, 8), display_string())
if mibBuilder.loadTexts:
avICTMWarningReason.setStatus('current')
av_antivirus_update_success = notification_type((1, 3, 6, 1, 4, 1, 3417, 2, 10, 3, 1)).setObjects(('BLUECOAT-AV-MIB', 'avVendorName'), ('BLUECOAT-AV-MIB', 'avEngineVersion'), ('BLUECOAT-AV-MIB', 'avPatternVersion'), ('BLUECOAT-AV-MIB', 'avPatternDateTime'))
if mibBuilder.loadTexts:
avAntivirusUpdateSuccess.setStatus('current')
av_antivirus_update_failed = notification_type((1, 3, 6, 1, 4, 1, 3417, 2, 10, 3, 2)).setObjects(('BLUECOAT-AV-MIB', 'avUpdateFailureReason'), ('BLUECOAT-AV-MIB', 'avVendorName'), ('BLUECOAT-AV-MIB', 'avEngineVersion'), ('BLUECOAT-AV-MIB', 'avPatternVersion'), ('BLUECOAT-AV-MIB', 'avPatternDateTime'))
if mibBuilder.loadTexts:
avAntivirusUpdateFailed.setStatus('current')
av_virus_detected = notification_type((1, 3, 6, 1, 4, 1, 3417, 2, 10, 3, 3)).setObjects(('BLUECOAT-AV-MIB', 'avUrl'), ('BLUECOAT-AV-MIB', 'avVirusName'), ('BLUECOAT-AV-MIB', 'avVirusDetails'))
if mibBuilder.loadTexts:
avVirusDetected.setStatus('current')
av_file_served = notification_type((1, 3, 6, 1, 4, 1, 3417, 2, 10, 3, 4)).setObjects(('BLUECOAT-AV-MIB', 'avUrl'), ('BLUECOAT-AV-MIB', 'avErrorCode'), ('BLUECOAT-AV-MIB', 'avErrorDetails'))
if mibBuilder.loadTexts:
avFileServed.setStatus('current')
av_file_blocked = notification_type((1, 3, 6, 1, 4, 1, 3417, 2, 10, 3, 5)).setObjects(('BLUECOAT-AV-MIB', 'avUrl'), ('BLUECOAT-AV-MIB', 'avErrorCode'), ('BLUECOAT-AV-MIB', 'avErrorDetails'))
if mibBuilder.loadTexts:
avFileBlocked.setStatus('current')
av_new_firmware_available = notification_type((1, 3, 6, 1, 4, 1, 3417, 2, 10, 3, 6)).setObjects(('BLUECOAT-AV-MIB', 'avInstalledFirmwareVersion'), ('BLUECOAT-AV-MIB', 'avPublishedFirmwareVersion'))
if mibBuilder.loadTexts:
avNewFirmwareAvailable.setStatus('current')
av_firmware_update_success = notification_type((1, 3, 6, 1, 4, 1, 3417, 2, 10, 3, 7)).setObjects(('BLUECOAT-AV-MIB', 'avPreviousFirmwareVersion'), ('BLUECOAT-AV-MIB', 'avInstalledFirmwareVersion'))
if mibBuilder.loadTexts:
avFirmwareUpdateSuccess.setStatus('current')
av_firmware_update_failed = notification_type((1, 3, 6, 1, 4, 1, 3417, 2, 10, 3, 8)).setObjects(('BLUECOAT-AV-MIB', 'avInstalledFirmwareVersion'), ('BLUECOAT-AV-MIB', 'avPublishedFirmwareVersion'), ('BLUECOAT-AV-MIB', 'avUpdateFailureReason'))
if mibBuilder.loadTexts:
avFirmwareUpdateFailed.setStatus('current')
av_antivirus_license_warning = notification_type((1, 3, 6, 1, 4, 1, 3417, 2, 10, 3, 9)).setObjects(('BLUECOAT-AV-MIB', 'avVendorName'), ('BLUECOAT-AV-MIB', 'avLicenseDaysRemaining'))
if mibBuilder.loadTexts:
avAntivirusLicenseWarning.setStatus('current')
av_ictm_warning = notification_type((1, 3, 6, 1, 4, 1, 3417, 2, 10, 3, 10)).setObjects(('BLUECOAT-AV-MIB', 'avICTMWarningReason'), ('BLUECOAT-AV-MIB', 'avSlowICAPConnections'))
if mibBuilder.loadTexts:
avICTMWarning.setStatus('current')
mibBuilder.exportSymbols('BLUECOAT-AV-MIB', avErrorDetails=avErrorDetails, blueCoatAvMib=blueCoatAvMib, avPatternDateTime=avPatternDateTime, PYSNMP_MODULE_ID=blueCoatAvMib, avPatternVersion=avPatternVersion, avVendorName=avVendorName, avUrl=avUrl, avFileBlocked=avFileBlocked, avPublishedFirmwareVersion=avPublishedFirmwareVersion, avFirmwareUpdateSuccess=avFirmwareUpdateSuccess, avFirmwareUpdateFailed=avFirmwareUpdateFailed, blueCoatAvMibNotifications=blueCoatAvMibNotifications, avLicenseDaysRemaining=avLicenseDaysRemaining, avFilesScanned=avFilesScanned, avUpdateFailureReason=avUpdateFailureReason, blueCoatAvMibObjects=blueCoatAvMibObjects, blueCoatAvMibNotificationObjects=blueCoatAvMibNotificationObjects, avEngineVersion=avEngineVersion, avVirusDetected=avVirusDetected, avICTMWarning=avICTMWarning, avAntivirusUpdateFailed=avAntivirusUpdateFailed, avErrorCode=avErrorCode, avAntivirusUpdateSuccess=avAntivirusUpdateSuccess, avVirusName=avVirusName, avSlowICAPConnections=avSlowICAPConnections, avAntivirusLicenseWarning=avAntivirusLicenseWarning, avFileServed=avFileServed, avInstalledFirmwareVersion=avInstalledFirmwareVersion, avICTMWarningReason=avICTMWarningReason, avVirusesDetected=avVirusesDetected, avPreviousFirmwareVersion=avPreviousFirmwareVersion, avVirusDetails=avVirusDetails, avNewFirmwareAvailable=avNewFirmwareAvailable) |
class PartialFillHandlingEnum:
PARTIAL_FILL_UNSET = 0
PARTIAL_FILL_HANDLING_REDUCE_QUANTITY = 1
PARTIAL_FILL_HANDLING_IMMEDIATE_CANCEL = 2
| class Partialfillhandlingenum:
partial_fill_unset = 0
partial_fill_handling_reduce_quantity = 1
partial_fill_handling_immediate_cancel = 2 |
SKILL_SAMPLE_TYPES = (
("dc", "DC"),
("mod", "Modifier"),
)
| skill_sample_types = (('dc', 'DC'), ('mod', 'Modifier')) |
def emulate(instructions):
# did we already run a specific instruction?
previous = [False for _ in range(len(instructions))]
acc, i = 0, 0
while i < len(instructions):
# infinite loop detected
if previous[i]:
return None
previous[i] = True
instr, value = instructions[i]
# emulate
if instr == "acc":
acc += value
elif instr == "jmp":
i += value
continue
i += 1
return acc
instructions = []
with open("input.txt", "r") as file:
for line in file.readlines():
instructions.append([line[:3], int(line[4:])])
# keep flipping instructions until we find one that doesn't end up in an infinite loop
for i in range(len(instructions)):
# we only care about jmp's and nop's
if instructions[i][0] == "acc":
continue
# keep a copy of the original instruction
original = instructions[i][0]
if instructions[i][0] == "jmp":
instructions[i][0] = "nop"
elif instructions[i][0] == "nop":
instructions[i][0] = "jmp"
result = emulate(instructions)
# we found code that runs
if result != None:
print(result)
break
# restore to original
instructions[i][0] = original | def emulate(instructions):
previous = [False for _ in range(len(instructions))]
(acc, i) = (0, 0)
while i < len(instructions):
if previous[i]:
return None
previous[i] = True
(instr, value) = instructions[i]
if instr == 'acc':
acc += value
elif instr == 'jmp':
i += value
continue
i += 1
return acc
instructions = []
with open('input.txt', 'r') as file:
for line in file.readlines():
instructions.append([line[:3], int(line[4:])])
for i in range(len(instructions)):
if instructions[i][0] == 'acc':
continue
original = instructions[i][0]
if instructions[i][0] == 'jmp':
instructions[i][0] = 'nop'
elif instructions[i][0] == 'nop':
instructions[i][0] = 'jmp'
result = emulate(instructions)
if result != None:
print(result)
break
instructions[i][0] = original |
flowerpot_price = 4.00
flower_seeds_price = 1.00
soil_price = 5.00
tax_rate = 0.06
number_of_pots = int(input('How many flowerpots? '))
number_of_seeds = int(input('How many packs of seeds? '))
number_of_bags = int(input('How many bags of soil? '))
cost_of_items = (number_of_pots * flowerpot_price)
+ (number_of_seeds * flower_seeds_price)
+ (number_of_bags * soil_price)
print(cost_of_items)
| flowerpot_price = 4.0
flower_seeds_price = 1.0
soil_price = 5.0
tax_rate = 0.06
number_of_pots = int(input('How many flowerpots? '))
number_of_seeds = int(input('How many packs of seeds? '))
number_of_bags = int(input('How many bags of soil? '))
cost_of_items = number_of_pots * flowerpot_price
+(number_of_seeds * flower_seeds_price)
+(number_of_bags * soil_price)
print(cost_of_items) |
class Field:
cells = ()
def __init__(self, w, h):
print('Game Field Created!')
| class Field:
cells = ()
def __init__(self, w, h):
print('Game Field Created!') |
class Entry(object):
def __init__(self, record, value):
self.record = record
self.value = value
def __lt__(self, other):
# to make a max-heap
return self.value > other.value
def to_json(self):
return {"record": self.record.to_json(), "value": self.value}
| class Entry(object):
def __init__(self, record, value):
self.record = record
self.value = value
def __lt__(self, other):
return self.value > other.value
def to_json(self):
return {'record': self.record.to_json(), 'value': self.value} |
#
# PySNMP MIB module HUAWEI-TASK-MIB (http://snmplabs.com/pysmi)
# ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/HUAWEI-TASK-MIB
# Produced by pysmi-0.3.4 at Mon Apr 29 19:37:15 2019
# On host DAVWANG4-M-1475 platform Darwin version 18.5.0 by user davwang4
# Using Python version 3.7.3 (default, Mar 27 2019, 09:23:15)
#
OctetString, ObjectIdentifier, Integer = mibBuilder.importSymbols("ASN1", "OctetString", "ObjectIdentifier", "Integer")
NamedValues, = mibBuilder.importSymbols("ASN1-ENUMERATION", "NamedValues")
ConstraintsIntersection, ValueSizeConstraint, ValueRangeConstraint, SingleValueConstraint, ConstraintsUnion = mibBuilder.importSymbols("ASN1-REFINEMENT", "ConstraintsIntersection", "ValueSizeConstraint", "ValueRangeConstraint", "SingleValueConstraint", "ConstraintsUnion")
hwDatacomm, = mibBuilder.importSymbols("HUAWEI-MIB", "hwDatacomm")
ObjectGroup, ModuleCompliance, NotificationGroup = mibBuilder.importSymbols("SNMPv2-CONF", "ObjectGroup", "ModuleCompliance", "NotificationGroup")
ModuleIdentity, iso, Counter64, Gauge32, NotificationType, ObjectIdentity, Bits, Integer32, Unsigned32, MibScalar, MibTable, MibTableRow, MibTableColumn, IpAddress, TimeTicks, Counter32, MibIdentifier = mibBuilder.importSymbols("SNMPv2-SMI", "ModuleIdentity", "iso", "Counter64", "Gauge32", "NotificationType", "ObjectIdentity", "Bits", "Integer32", "Unsigned32", "MibScalar", "MibTable", "MibTableRow", "MibTableColumn", "IpAddress", "TimeTicks", "Counter32", "MibIdentifier")
TextualConvention, DisplayString = mibBuilder.importSymbols("SNMPv2-TC", "TextualConvention", "DisplayString")
hwTask = ModuleIdentity((1, 3, 6, 1, 4, 1, 2011, 5, 25, 27))
hwTask.setRevisions(('2014-09-25 00:00', '2003-07-31 00:00',))
if mibBuilder.loadTexts: hwTask.setLastUpdated('201409250000Z')
if mibBuilder.loadTexts: hwTask.setOrganization('Huawei Technologies Co.,Ltd.')
class HwTaskStatusType(TextualConvention, Integer32):
status = 'current'
subtypeSpec = Integer32.subtypeSpec + ConstraintsUnion(SingleValueConstraint(0, 1, 2, 4, 5, 6, 8, 17, 21, 33, 37, 65, 69, 128, 256, 513, 517))
namedValues = NamedValues(("normalready", 0), ("block", 1), ("sleep", 2), ("suspend", 4), ("blockAndSuspend", 5), ("sleptAndSuspend", 6), ("running", 8), ("queueblock", 17), ("queueblockAndSuspend", 21), ("semaphoreblock", 33), ("semaphoreblockAandSuspend", 37), ("eventblock", 65), ("eventblockAndSuspend", 69), ("prioblock", 128), ("preemptready", 256), ("writequeueblock", 513), ("writequeueblockAndSuspend", 517))
hwTaskObjects = MibIdentifier((1, 3, 6, 1, 4, 1, 2011, 5, 25, 27, 1))
hwTaskTable = MibTable((1, 3, 6, 1, 4, 1, 2011, 5, 25, 27, 1, 1), )
if mibBuilder.loadTexts: hwTaskTable.setStatus('current')
hwTaskEntry = MibTableRow((1, 3, 6, 1, 4, 1, 2011, 5, 25, 27, 1, 1, 1), ).setIndexNames((0, "HUAWEI-TASK-MIB", "hwTaskIndex"), (0, "HUAWEI-TASK-MIB", "hwTaskID"))
if mibBuilder.loadTexts: hwTaskEntry.setStatus('current')
hwTaskIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 2011, 5, 25, 27, 1, 1, 1, 1), Gauge32())
if mibBuilder.loadTexts: hwTaskIndex.setStatus('current')
hwTaskID = MibTableColumn((1, 3, 6, 1, 4, 1, 2011, 5, 25, 27, 1, 1, 1, 2), Gauge32())
if mibBuilder.loadTexts: hwTaskID.setStatus('current')
hwTaskName = MibTableColumn((1, 3, 6, 1, 4, 1, 2011, 5, 25, 27, 1, 1, 1, 3), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(1, 255))).setMaxAccess("readonly")
if mibBuilder.loadTexts: hwTaskName.setStatus('current')
hwTaskStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 2011, 5, 25, 27, 1, 1, 1, 4), HwTaskStatusType()).setMaxAccess("readonly")
if mibBuilder.loadTexts: hwTaskStatus.setStatus('current')
hwTaskCpuUsage = MibTableColumn((1, 3, 6, 1, 4, 1, 2011, 5, 25, 27, 1, 1, 1, 5), Gauge32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: hwTaskCpuUsage.setStatus('current')
hwTaskuSecs = MibTableColumn((1, 3, 6, 1, 4, 1, 2011, 5, 25, 27, 1, 1, 1, 6), Gauge32()).setUnits('millseconds').setMaxAccess("readonly")
if mibBuilder.loadTexts: hwTaskuSecs.setStatus('current')
hwKeyTaskTable = MibTable((1, 3, 6, 1, 4, 1, 2011, 5, 25, 27, 1, 2), )
if mibBuilder.loadTexts: hwKeyTaskTable.setStatus('current')
hwKeyTaskEntry = MibTableRow((1, 3, 6, 1, 4, 1, 2011, 5, 25, 27, 1, 2, 1), ).setIndexNames((0, "HUAWEI-TASK-MIB", "hwKeyTaskIndex"), (0, "HUAWEI-TASK-MIB", "hwKeyTaskID"))
if mibBuilder.loadTexts: hwKeyTaskEntry.setStatus('current')
hwKeyTaskIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 2011, 5, 25, 27, 1, 2, 1, 1), Integer32())
if mibBuilder.loadTexts: hwKeyTaskIndex.setStatus('current')
hwKeyTaskID = MibTableColumn((1, 3, 6, 1, 4, 1, 2011, 5, 25, 27, 1, 2, 1, 2), Integer32())
if mibBuilder.loadTexts: hwKeyTaskID.setStatus('current')
hwKeyTaskName = MibTableColumn((1, 3, 6, 1, 4, 1, 2011, 5, 25, 27, 1, 2, 1, 3), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(1, 255))).setMaxAccess("readonly")
if mibBuilder.loadTexts: hwKeyTaskName.setStatus('current')
hwKeyTaskCpuUsage = MibTableColumn((1, 3, 6, 1, 4, 1, 2011, 5, 25, 27, 1, 2, 1, 4), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: hwKeyTaskCpuUsage.setStatus('current')
hwTaskNotifications = MibIdentifier((1, 3, 6, 1, 4, 1, 2011, 5, 25, 27, 2))
hwTaskConformance = MibIdentifier((1, 3, 6, 1, 4, 1, 2011, 5, 25, 27, 3))
hwTaskCompliances = MibIdentifier((1, 3, 6, 1, 4, 1, 2011, 5, 25, 27, 3, 1))
hwTaskCompliance = ModuleCompliance((1, 3, 6, 1, 4, 1, 2011, 5, 25, 27, 3, 1, 1)).setObjects(("HUAWEI-TASK-MIB", "hwTaskGroup"))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
hwTaskCompliance = hwTaskCompliance.setStatus('current')
hwTaskGroups = MibIdentifier((1, 3, 6, 1, 4, 1, 2011, 5, 25, 27, 3, 2))
hwTaskGroup = ObjectGroup((1, 3, 6, 1, 4, 1, 2011, 5, 25, 27, 3, 2, 1)).setObjects(("HUAWEI-TASK-MIB", "hwTaskName"), ("HUAWEI-TASK-MIB", "hwTaskStatus"), ("HUAWEI-TASK-MIB", "hwTaskCpuUsage"), ("HUAWEI-TASK-MIB", "hwTaskuSecs"))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
hwTaskGroup = hwTaskGroup.setStatus('current')
hwKeyTaskGroup = ObjectGroup((1, 3, 6, 1, 4, 1, 2011, 5, 25, 27, 3, 2, 2)).setObjects(("HUAWEI-TASK-MIB", "hwKeyTaskName"), ("HUAWEI-TASK-MIB", "hwKeyTaskCpuUsage"))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
hwKeyTaskGroup = hwKeyTaskGroup.setStatus('current')
mibBuilder.exportSymbols("HUAWEI-TASK-MIB", hwKeyTaskName=hwKeyTaskName, PYSNMP_MODULE_ID=hwTask, hwKeyTaskCpuUsage=hwKeyTaskCpuUsage, hwTaskGroup=hwTaskGroup, hwTaskCompliances=hwTaskCompliances, hwTaskName=hwTaskName, hwKeyTaskIndex=hwKeyTaskIndex, hwTask=hwTask, hwKeyTaskTable=hwKeyTaskTable, hwKeyTaskEntry=hwKeyTaskEntry, hwKeyTaskID=hwKeyTaskID, hwTaskID=hwTaskID, hwTaskStatus=hwTaskStatus, hwTaskuSecs=hwTaskuSecs, hwTaskCpuUsage=hwTaskCpuUsage, hwTaskIndex=hwTaskIndex, hwTaskGroups=hwTaskGroups, hwTaskConformance=hwTaskConformance, hwTaskObjects=hwTaskObjects, hwTaskTable=hwTaskTable, hwTaskEntry=hwTaskEntry, hwTaskNotifications=hwTaskNotifications, hwKeyTaskGroup=hwKeyTaskGroup, hwTaskCompliance=hwTaskCompliance, HwTaskStatusType=HwTaskStatusType)
| (octet_string, object_identifier, integer) = mibBuilder.importSymbols('ASN1', 'OctetString', 'ObjectIdentifier', 'Integer')
(named_values,) = mibBuilder.importSymbols('ASN1-ENUMERATION', 'NamedValues')
(constraints_intersection, value_size_constraint, value_range_constraint, single_value_constraint, constraints_union) = mibBuilder.importSymbols('ASN1-REFINEMENT', 'ConstraintsIntersection', 'ValueSizeConstraint', 'ValueRangeConstraint', 'SingleValueConstraint', 'ConstraintsUnion')
(hw_datacomm,) = mibBuilder.importSymbols('HUAWEI-MIB', 'hwDatacomm')
(object_group, module_compliance, notification_group) = mibBuilder.importSymbols('SNMPv2-CONF', 'ObjectGroup', 'ModuleCompliance', 'NotificationGroup')
(module_identity, iso, counter64, gauge32, notification_type, object_identity, bits, integer32, unsigned32, mib_scalar, mib_table, mib_table_row, mib_table_column, ip_address, time_ticks, counter32, mib_identifier) = mibBuilder.importSymbols('SNMPv2-SMI', 'ModuleIdentity', 'iso', 'Counter64', 'Gauge32', 'NotificationType', 'ObjectIdentity', 'Bits', 'Integer32', 'Unsigned32', 'MibScalar', 'MibTable', 'MibTableRow', 'MibTableColumn', 'IpAddress', 'TimeTicks', 'Counter32', 'MibIdentifier')
(textual_convention, display_string) = mibBuilder.importSymbols('SNMPv2-TC', 'TextualConvention', 'DisplayString')
hw_task = module_identity((1, 3, 6, 1, 4, 1, 2011, 5, 25, 27))
hwTask.setRevisions(('2014-09-25 00:00', '2003-07-31 00:00'))
if mibBuilder.loadTexts:
hwTask.setLastUpdated('201409250000Z')
if mibBuilder.loadTexts:
hwTask.setOrganization('Huawei Technologies Co.,Ltd.')
class Hwtaskstatustype(TextualConvention, Integer32):
status = 'current'
subtype_spec = Integer32.subtypeSpec + constraints_union(single_value_constraint(0, 1, 2, 4, 5, 6, 8, 17, 21, 33, 37, 65, 69, 128, 256, 513, 517))
named_values = named_values(('normalready', 0), ('block', 1), ('sleep', 2), ('suspend', 4), ('blockAndSuspend', 5), ('sleptAndSuspend', 6), ('running', 8), ('queueblock', 17), ('queueblockAndSuspend', 21), ('semaphoreblock', 33), ('semaphoreblockAandSuspend', 37), ('eventblock', 65), ('eventblockAndSuspend', 69), ('prioblock', 128), ('preemptready', 256), ('writequeueblock', 513), ('writequeueblockAndSuspend', 517))
hw_task_objects = mib_identifier((1, 3, 6, 1, 4, 1, 2011, 5, 25, 27, 1))
hw_task_table = mib_table((1, 3, 6, 1, 4, 1, 2011, 5, 25, 27, 1, 1))
if mibBuilder.loadTexts:
hwTaskTable.setStatus('current')
hw_task_entry = mib_table_row((1, 3, 6, 1, 4, 1, 2011, 5, 25, 27, 1, 1, 1)).setIndexNames((0, 'HUAWEI-TASK-MIB', 'hwTaskIndex'), (0, 'HUAWEI-TASK-MIB', 'hwTaskID'))
if mibBuilder.loadTexts:
hwTaskEntry.setStatus('current')
hw_task_index = mib_table_column((1, 3, 6, 1, 4, 1, 2011, 5, 25, 27, 1, 1, 1, 1), gauge32())
if mibBuilder.loadTexts:
hwTaskIndex.setStatus('current')
hw_task_id = mib_table_column((1, 3, 6, 1, 4, 1, 2011, 5, 25, 27, 1, 1, 1, 2), gauge32())
if mibBuilder.loadTexts:
hwTaskID.setStatus('current')
hw_task_name = mib_table_column((1, 3, 6, 1, 4, 1, 2011, 5, 25, 27, 1, 1, 1, 3), display_string().subtype(subtypeSpec=value_size_constraint(1, 255))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
hwTaskName.setStatus('current')
hw_task_status = mib_table_column((1, 3, 6, 1, 4, 1, 2011, 5, 25, 27, 1, 1, 1, 4), hw_task_status_type()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
hwTaskStatus.setStatus('current')
hw_task_cpu_usage = mib_table_column((1, 3, 6, 1, 4, 1, 2011, 5, 25, 27, 1, 1, 1, 5), gauge32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
hwTaskCpuUsage.setStatus('current')
hw_tasku_secs = mib_table_column((1, 3, 6, 1, 4, 1, 2011, 5, 25, 27, 1, 1, 1, 6), gauge32()).setUnits('millseconds').setMaxAccess('readonly')
if mibBuilder.loadTexts:
hwTaskuSecs.setStatus('current')
hw_key_task_table = mib_table((1, 3, 6, 1, 4, 1, 2011, 5, 25, 27, 1, 2))
if mibBuilder.loadTexts:
hwKeyTaskTable.setStatus('current')
hw_key_task_entry = mib_table_row((1, 3, 6, 1, 4, 1, 2011, 5, 25, 27, 1, 2, 1)).setIndexNames((0, 'HUAWEI-TASK-MIB', 'hwKeyTaskIndex'), (0, 'HUAWEI-TASK-MIB', 'hwKeyTaskID'))
if mibBuilder.loadTexts:
hwKeyTaskEntry.setStatus('current')
hw_key_task_index = mib_table_column((1, 3, 6, 1, 4, 1, 2011, 5, 25, 27, 1, 2, 1, 1), integer32())
if mibBuilder.loadTexts:
hwKeyTaskIndex.setStatus('current')
hw_key_task_id = mib_table_column((1, 3, 6, 1, 4, 1, 2011, 5, 25, 27, 1, 2, 1, 2), integer32())
if mibBuilder.loadTexts:
hwKeyTaskID.setStatus('current')
hw_key_task_name = mib_table_column((1, 3, 6, 1, 4, 1, 2011, 5, 25, 27, 1, 2, 1, 3), display_string().subtype(subtypeSpec=value_size_constraint(1, 255))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
hwKeyTaskName.setStatus('current')
hw_key_task_cpu_usage = mib_table_column((1, 3, 6, 1, 4, 1, 2011, 5, 25, 27, 1, 2, 1, 4), integer32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
hwKeyTaskCpuUsage.setStatus('current')
hw_task_notifications = mib_identifier((1, 3, 6, 1, 4, 1, 2011, 5, 25, 27, 2))
hw_task_conformance = mib_identifier((1, 3, 6, 1, 4, 1, 2011, 5, 25, 27, 3))
hw_task_compliances = mib_identifier((1, 3, 6, 1, 4, 1, 2011, 5, 25, 27, 3, 1))
hw_task_compliance = module_compliance((1, 3, 6, 1, 4, 1, 2011, 5, 25, 27, 3, 1, 1)).setObjects(('HUAWEI-TASK-MIB', 'hwTaskGroup'))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
hw_task_compliance = hwTaskCompliance.setStatus('current')
hw_task_groups = mib_identifier((1, 3, 6, 1, 4, 1, 2011, 5, 25, 27, 3, 2))
hw_task_group = object_group((1, 3, 6, 1, 4, 1, 2011, 5, 25, 27, 3, 2, 1)).setObjects(('HUAWEI-TASK-MIB', 'hwTaskName'), ('HUAWEI-TASK-MIB', 'hwTaskStatus'), ('HUAWEI-TASK-MIB', 'hwTaskCpuUsage'), ('HUAWEI-TASK-MIB', 'hwTaskuSecs'))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
hw_task_group = hwTaskGroup.setStatus('current')
hw_key_task_group = object_group((1, 3, 6, 1, 4, 1, 2011, 5, 25, 27, 3, 2, 2)).setObjects(('HUAWEI-TASK-MIB', 'hwKeyTaskName'), ('HUAWEI-TASK-MIB', 'hwKeyTaskCpuUsage'))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
hw_key_task_group = hwKeyTaskGroup.setStatus('current')
mibBuilder.exportSymbols('HUAWEI-TASK-MIB', hwKeyTaskName=hwKeyTaskName, PYSNMP_MODULE_ID=hwTask, hwKeyTaskCpuUsage=hwKeyTaskCpuUsage, hwTaskGroup=hwTaskGroup, hwTaskCompliances=hwTaskCompliances, hwTaskName=hwTaskName, hwKeyTaskIndex=hwKeyTaskIndex, hwTask=hwTask, hwKeyTaskTable=hwKeyTaskTable, hwKeyTaskEntry=hwKeyTaskEntry, hwKeyTaskID=hwKeyTaskID, hwTaskID=hwTaskID, hwTaskStatus=hwTaskStatus, hwTaskuSecs=hwTaskuSecs, hwTaskCpuUsage=hwTaskCpuUsage, hwTaskIndex=hwTaskIndex, hwTaskGroups=hwTaskGroups, hwTaskConformance=hwTaskConformance, hwTaskObjects=hwTaskObjects, hwTaskTable=hwTaskTable, hwTaskEntry=hwTaskEntry, hwTaskNotifications=hwTaskNotifications, hwKeyTaskGroup=hwKeyTaskGroup, hwTaskCompliance=hwTaskCompliance, HwTaskStatusType=HwTaskStatusType) |
# keyword param for the ProfileHandler
KEY_DATASET_OBJECT_ID = 'dataset_object_id'
KEY_SAVE_ROW_COUNT = 'save_row_count'
KEY_DATASET_IS_DJANGO_FILEFIELD = 'dataset_is_django_filefield'
KEY_DATASET_IS_FILEPATH = 'dataset_is_filepath'
VAR_TYPE_BOOLEAN = 'Boolean'
VAR_TYPE_CATEGORICAL = 'Categorical'
VAR_TYPE_NUMERICAL = 'Numerical'
VAR_TYPE_INTEGER = 'Integer'
VAR_TYPE_FLOAT = 'Float'
NUMERIC_VAR_TYPES = [VAR_TYPE_NUMERICAL, VAR_TYPE_INTEGER, VAR_TYPE_FLOAT]
VALID_VAR_TYPES = [VAR_TYPE_BOOLEAN,
VAR_TYPE_CATEGORICAL,
VAR_TYPE_NUMERICAL,
VAR_TYPE_INTEGER,
VAR_TYPE_FLOAT]
KW_MAX_NUM_FEATURES = 'max_num_features'
# -----------------------------
ERR_MSG_COLUMN_LIMIT = 'The column_limit may be "None" or an integer greater than 0.'
ERR_MSG_SOURCE_FILE_DOES_NOT_EXIST = 'The source file does not exist for dataset: '
ERR_MSG_DATASET_POINTER_NOT_FIELDFILE = 'The dataset pointer is not a Django FieldFile object.'
ERR_FAILED_TO_READ_DATASET = 'Failed to read the dataset.'
ERR_DATASET_POINTER_NOT_SET = 'In order to profile the data, the "dataset_pointer" must be set.' | key_dataset_object_id = 'dataset_object_id'
key_save_row_count = 'save_row_count'
key_dataset_is_django_filefield = 'dataset_is_django_filefield'
key_dataset_is_filepath = 'dataset_is_filepath'
var_type_boolean = 'Boolean'
var_type_categorical = 'Categorical'
var_type_numerical = 'Numerical'
var_type_integer = 'Integer'
var_type_float = 'Float'
numeric_var_types = [VAR_TYPE_NUMERICAL, VAR_TYPE_INTEGER, VAR_TYPE_FLOAT]
valid_var_types = [VAR_TYPE_BOOLEAN, VAR_TYPE_CATEGORICAL, VAR_TYPE_NUMERICAL, VAR_TYPE_INTEGER, VAR_TYPE_FLOAT]
kw_max_num_features = 'max_num_features'
err_msg_column_limit = 'The column_limit may be "None" or an integer greater than 0.'
err_msg_source_file_does_not_exist = 'The source file does not exist for dataset: '
err_msg_dataset_pointer_not_fieldfile = 'The dataset pointer is not a Django FieldFile object.'
err_failed_to_read_dataset = 'Failed to read the dataset.'
err_dataset_pointer_not_set = 'In order to profile the data, the "dataset_pointer" must be set.' |
#! /usr/bin/env python3
# check if a word is palindromic without reversing it
def isPalindrome(word):
end = len(word)
start = 0
retval = True
while start < end+1:
left = word[start]
right = word[end-1]
if left != right:
retval = False
break
start += 1
end -= 1
return retval
print(isPalindrome("wwaabbaawwz"))
| def is_palindrome(word):
end = len(word)
start = 0
retval = True
while start < end + 1:
left = word[start]
right = word[end - 1]
if left != right:
retval = False
break
start += 1
end -= 1
return retval
print(is_palindrome('wwaabbaawwz')) |
class Solution(object):
def setZeroes(self, matrix):
"""
:type matrix: List[List[int]]
:rtype: None Do not return anything, modify matrix in-place instead.
"""
if len(matrix) == 0 or len(matrix[0]) == 0:
return matrix
rcnt = len(matrix)
ccnt = len(matrix[0])
horz, verz = False, False
for i in range(ccnt):
if matrix[0][i] == 0:
horz = True
break
for i in range(rcnt):
if matrix[i][0] == 0:
verz = True
break
# exclude outmost row and column, and if one cell at (i,j) is 0
# then mark (i, 0) and (0, j) as 0.
# i.e. we use these two outmost row and column for bookkeeping.
for i in range(1, rcnt):
for j in range(1, ccnt):
if matrix[i][j] == 0:
matrix[i][0] = 0
matrix[0][j] = 0
for i in range(1, rcnt):
for j in range(1, ccnt):
if matrix[i][0] == 0 or matrix[0][j] == 0:
matrix[i][j] = 0
# zero outmost row & col if necessary.
if horz:
for i in range(ccnt):
matrix[0][i] = 0
if verz:
for i in range(rcnt):
matrix[i][0] = 0
| class Solution(object):
def set_zeroes(self, matrix):
"""
:type matrix: List[List[int]]
:rtype: None Do not return anything, modify matrix in-place instead.
"""
if len(matrix) == 0 or len(matrix[0]) == 0:
return matrix
rcnt = len(matrix)
ccnt = len(matrix[0])
(horz, verz) = (False, False)
for i in range(ccnt):
if matrix[0][i] == 0:
horz = True
break
for i in range(rcnt):
if matrix[i][0] == 0:
verz = True
break
for i in range(1, rcnt):
for j in range(1, ccnt):
if matrix[i][j] == 0:
matrix[i][0] = 0
matrix[0][j] = 0
for i in range(1, rcnt):
for j in range(1, ccnt):
if matrix[i][0] == 0 or matrix[0][j] == 0:
matrix[i][j] = 0
if horz:
for i in range(ccnt):
matrix[0][i] = 0
if verz:
for i in range(rcnt):
matrix[i][0] = 0 |
class Pessoa:
olhos = 2
def __init__(self, *filhos, nome=None, idade=46):
self.idade = idade
self.nome = nome
self.filhos = list(filhos)
def cumprimentar(self):
return f'Ola {id(self)}'
if __name__ == '__main__':
nilton = Pessoa(nome='Nilton')
roberto = Pessoa(nilton, nome='Roberto')
print(Pessoa.cumprimentar(roberto))
print(id(roberto))
print(roberto.cumprimentar())
print(roberto.nome)
print(roberto.idade)
for filho in roberto.filhos:
print(filho.nome)
roberto.sobrenome = 'Goncalves'
del roberto.filhos
roberto.olhos = 1
del roberto.olhos
print(roberto.__dict__)
print(nilton.__dict__)
Pessoa.olhos = 3
print(Pessoa.olhos)
print(roberto.olhos)
print(nilton.olhos)
print(id(Pessoa.olhos), id(roberto), id(nilton.olhos)) | class Pessoa:
olhos = 2
def __init__(self, *filhos, nome=None, idade=46):
self.idade = idade
self.nome = nome
self.filhos = list(filhos)
def cumprimentar(self):
return f'Ola {id(self)}'
if __name__ == '__main__':
nilton = pessoa(nome='Nilton')
roberto = pessoa(nilton, nome='Roberto')
print(Pessoa.cumprimentar(roberto))
print(id(roberto))
print(roberto.cumprimentar())
print(roberto.nome)
print(roberto.idade)
for filho in roberto.filhos:
print(filho.nome)
roberto.sobrenome = 'Goncalves'
del roberto.filhos
roberto.olhos = 1
del roberto.olhos
print(roberto.__dict__)
print(nilton.__dict__)
Pessoa.olhos = 3
print(Pessoa.olhos)
print(roberto.olhos)
print(nilton.olhos)
print(id(Pessoa.olhos), id(roberto), id(nilton.olhos)) |
AIRTABLE_EXPORT_JOB_DOWNLOADING_PENDING = "pending"
AIRTABLE_EXPORT_JOB_DOWNLOADING_FAILED = "failed"
AIRTABLE_EXPORT_JOB_DOWNLOADING_FINISHED = "finished"
AIRTABLE_EXPORT_JOB_DOWNLOADING_BASE = "downloading-base"
AIRTABLE_EXPORT_JOB_CONVERTING = "converting"
AIRTABLE_EXPORT_JOB_DOWNLOADING_FILES = "downloading-files"
AIRTABLE_BASEROW_COLOR_MAPPING = {
"blue": "blue",
"cyan": "light-blue",
"teal": "light-green",
"green": "green",
"yellow": "light-orange",
"orange": "orange",
"red": "light-red",
"pink": "red",
"purple": "dark-blue",
"gray": "light-gray",
}
| airtable_export_job_downloading_pending = 'pending'
airtable_export_job_downloading_failed = 'failed'
airtable_export_job_downloading_finished = 'finished'
airtable_export_job_downloading_base = 'downloading-base'
airtable_export_job_converting = 'converting'
airtable_export_job_downloading_files = 'downloading-files'
airtable_baserow_color_mapping = {'blue': 'blue', 'cyan': 'light-blue', 'teal': 'light-green', 'green': 'green', 'yellow': 'light-orange', 'orange': 'orange', 'red': 'light-red', 'pink': 'red', 'purple': 'dark-blue', 'gray': 'light-gray'} |
#!/usr/bin/env python3
"""Advent of Code 2020 Day 06 - Custom Customs."""
with open ('inputs/day_06.txt', 'r') as forms:
groups = [group_answers.strip() for group_answers in forms.read().split('\n\n')]
overall_yes = 0
for group in groups:
group_yes = set()
for member_yes in group.split('\n'):
for char in member_yes:
group_yes.add(char)
overall_yes += len(group_yes)
# Answer One
print("Sum of all groups yes counts:", overall_yes)
overall_group_yes = 0
for group in groups:
members = group.split('\n')
group_yes = set([char for char in members[0]])
for member in members[1:]:
group_yes = set([char for char in member]).intersection(group_yes)
overall_group_yes += len(group_yes)
# Answer Two
print("Sum of all group overall yes counts:", overall_group_yes)
| """Advent of Code 2020 Day 06 - Custom Customs."""
with open('inputs/day_06.txt', 'r') as forms:
groups = [group_answers.strip() for group_answers in forms.read().split('\n\n')]
overall_yes = 0
for group in groups:
group_yes = set()
for member_yes in group.split('\n'):
for char in member_yes:
group_yes.add(char)
overall_yes += len(group_yes)
print('Sum of all groups yes counts:', overall_yes)
overall_group_yes = 0
for group in groups:
members = group.split('\n')
group_yes = set([char for char in members[0]])
for member in members[1:]:
group_yes = set([char for char in member]).intersection(group_yes)
overall_group_yes += len(group_yes)
print('Sum of all group overall yes counts:', overall_group_yes) |
print("Rathinn")
print("AM.EN.U4AIE19052")
print("AIE")
print("Anime Rocks")
| print('Rathinn')
print('AM.EN.U4AIE19052')
print('AIE')
print('Anime Rocks') |
"""Constants about physical keg shell."""
# Most common shell sizes, from smalles to largest.
MINI = "mini"
CORNY_25 = "corny-2_5-gal"
CORNY_30 = "corny-3-gal"
CORNY = "corny"
SIXTH_BARREL = "sixth"
EURO_30_LITER = "euro-30-liter"
EURO_HALF_BARREL = "euro-half"
QUARTER_BARREL = "quarter"
EURO = "euro"
HALF_BARREL = "half-barrel"
OTHER = "other"
VOLUMES_ML = {
MINI: 5000,
CORNY_25: 9463.53,
CORNY_30: 11356.2,
CORNY: 18927.1,
SIXTH_BARREL: 19570.6,
EURO_30_LITER: 300000.0,
EURO_HALF_BARREL: 50000.0,
QUARTER_BARREL: 29336.9,
EURO: 100000.0,
HALF_BARREL: 58673.9,
OTHER: 0.0,
}
DESCRIPTIONS = {
MINI: "Mini Keg (5 L)",
CORNY_25: "Corny Keg (2.5 gal)",
CORNY_30: "Corny Keg (3.0 gal)",
CORNY: "Corny Keg (5 gal)",
SIXTH_BARREL: "Sixth Barrel (5.17 gal)",
EURO_30_LITER: "European DIN (30 L)",
EURO_HALF_BARREL: "European Half Barrel (50 L)",
QUARTER_BARREL: "Quarter Barrel (7.75 gal)",
EURO: "European Full Barrel (100 L)",
HALF_BARREL: "Half Barrel (15.5 gal)",
OTHER: "Other",
}
CHOICES = [(x, DESCRIPTIONS[x]) for x in reversed(sorted(VOLUMES_ML, key=VOLUMES_ML.get))]
def find_closest_keg_size(volume_ml, tolerance_ml=100.0):
"""Returns the nearest fuzzy match name within tolerance_ml.
If no match is found, OTHER is returned.
"""
for size_name, size_volume_ml in list(VOLUMES_ML.items()):
diff = abs(volume_ml - size_volume_ml)
if diff <= tolerance_ml:
return size_name
return OTHER
def get_description(keg_type):
return DESCRIPTIONS.get(keg_type, "Unknown")
| """Constants about physical keg shell."""
mini = 'mini'
corny_25 = 'corny-2_5-gal'
corny_30 = 'corny-3-gal'
corny = 'corny'
sixth_barrel = 'sixth'
euro_30_liter = 'euro-30-liter'
euro_half_barrel = 'euro-half'
quarter_barrel = 'quarter'
euro = 'euro'
half_barrel = 'half-barrel'
other = 'other'
volumes_ml = {MINI: 5000, CORNY_25: 9463.53, CORNY_30: 11356.2, CORNY: 18927.1, SIXTH_BARREL: 19570.6, EURO_30_LITER: 300000.0, EURO_HALF_BARREL: 50000.0, QUARTER_BARREL: 29336.9, EURO: 100000.0, HALF_BARREL: 58673.9, OTHER: 0.0}
descriptions = {MINI: 'Mini Keg (5 L)', CORNY_25: 'Corny Keg (2.5 gal)', CORNY_30: 'Corny Keg (3.0 gal)', CORNY: 'Corny Keg (5 gal)', SIXTH_BARREL: 'Sixth Barrel (5.17 gal)', EURO_30_LITER: 'European DIN (30 L)', EURO_HALF_BARREL: 'European Half Barrel (50 L)', QUARTER_BARREL: 'Quarter Barrel (7.75 gal)', EURO: 'European Full Barrel (100 L)', HALF_BARREL: 'Half Barrel (15.5 gal)', OTHER: 'Other'}
choices = [(x, DESCRIPTIONS[x]) for x in reversed(sorted(VOLUMES_ML, key=VOLUMES_ML.get))]
def find_closest_keg_size(volume_ml, tolerance_ml=100.0):
"""Returns the nearest fuzzy match name within tolerance_ml.
If no match is found, OTHER is returned.
"""
for (size_name, size_volume_ml) in list(VOLUMES_ML.items()):
diff = abs(volume_ml - size_volume_ml)
if diff <= tolerance_ml:
return size_name
return OTHER
def get_description(keg_type):
return DESCRIPTIONS.get(keg_type, 'Unknown') |
"""Consts used by rpi_camera."""
DOMAIN = "rpi_camera"
CONF_HORIZONTAL_FLIP = "horizontal_flip"
CONF_IMAGE_HEIGHT = "image_height"
CONF_IMAGE_QUALITY = "image_quality"
CONF_IMAGE_ROTATION = "image_rotation"
CONF_IMAGE_WIDTH = "image_width"
CONF_OVERLAY_METADATA = "overlay_metadata"
CONF_OVERLAY_TIMESTAMP = "overlay_timestamp"
CONF_TIMELAPSE = "timelapse"
CONF_VERTICAL_FLIP = "vertical_flip"
DEFAULT_HORIZONTAL_FLIP = 0
DEFAULT_IMAGE_HEIGHT = 480
DEFAULT_IMAGE_QUALITY = 7
DEFAULT_IMAGE_ROTATION = 0
DEFAULT_IMAGE_WIDTH = 640
DEFAULT_NAME = "Raspberry Pi Camera"
DEFAULT_TIMELAPSE = 1000
DEFAULT_VERTICAL_FLIP = 0
| """Consts used by rpi_camera."""
domain = 'rpi_camera'
conf_horizontal_flip = 'horizontal_flip'
conf_image_height = 'image_height'
conf_image_quality = 'image_quality'
conf_image_rotation = 'image_rotation'
conf_image_width = 'image_width'
conf_overlay_metadata = 'overlay_metadata'
conf_overlay_timestamp = 'overlay_timestamp'
conf_timelapse = 'timelapse'
conf_vertical_flip = 'vertical_flip'
default_horizontal_flip = 0
default_image_height = 480
default_image_quality = 7
default_image_rotation = 0
default_image_width = 640
default_name = 'Raspberry Pi Camera'
default_timelapse = 1000
default_vertical_flip = 0 |
# Backtracking
class Solution:
def combinationSum(self, candidates: List[int], target: int) -> List[List[int]]:
if not candidates:
return
candidates.sort()
paths = []
results = []
index = 0
cursum = 0
# paths, results, index, candidates, cursum, target
self.dfs(paths,results,index,candidates,cursum, target)
return results
def dfs(self,paths, results,index,candidates,cursum,target):
if cursum > target:
return
# append path must use list to new a paths
if cursum == target:
results.append(list(paths))
return
for i in range(index,len(candidates)):
paths.append(candidates[i])
cursum += candidates[i]
self.dfs(paths,results,i,candidates,cursum,target)
paths.pop()
cursum -= candidates[i]
# https://www.jiuzhang.com/problem/combination-sum/
class Solution:
def combinationSum(self, candidates: List[int], target: int) -> List[List[int]]:
results = []
def backtrack(remain,comb,start):
if remain == 0:
# make a deep copy of the current combination
results.append(list(comb))
return
# not satify condition
elif remain <0:
# exceed the scope, stop exploration.
return
for i in range(start,len(candidates)):
# add the number into the combination
comb.append(candidates[i])
# give the current number another chance, rather than moving on
backtrack(remain-candidates[i],comb,i)
# backtrack, remove the number from the combination
comb.pop()
backtrack(target,[],0)
return results
# Refer from
# https://leetcode.com/problems/combination-sum/solution/
# Time: O(N^(T/M)+1)
# Let N be the number of candidates, T be the target value, and M be the minimal value among the candidates.
# Space:O(T/M)
# V2
class Solution(object):
def combinationSum(self, candidates, target):
ret = []
self.dfs(candidates, target, [], ret)
return ret
def dfs(self, nums, target, path, ret):
if target < 0:
return
if target == 0:
ret.append(path)
return
for i in range(len(nums)):
# Here we have to use concatenation because if we use append, then path will be passed by
# reference and it will cause allocation problem
self.dfs(nums[i:], target-nums[i], path+[nums[i]], ret)
# V3
class Solution:
def combinationSum(self, candidates: List[int], target: int) -> List[List[int]]:
res = []
self.backtrack(0,candidates,target,[],res)
return res
def backtrack(self,start,candidates,target,path,res):
if target <0:
return
if target ==0:
res.append(path)
return
for i in range(start,len(candidates)):
self.backtrack(i,candidates,target-candidates[i],path+[candidates[i]],res)
| class Solution:
def combination_sum(self, candidates: List[int], target: int) -> List[List[int]]:
if not candidates:
return
candidates.sort()
paths = []
results = []
index = 0
cursum = 0
self.dfs(paths, results, index, candidates, cursum, target)
return results
def dfs(self, paths, results, index, candidates, cursum, target):
if cursum > target:
return
if cursum == target:
results.append(list(paths))
return
for i in range(index, len(candidates)):
paths.append(candidates[i])
cursum += candidates[i]
self.dfs(paths, results, i, candidates, cursum, target)
paths.pop()
cursum -= candidates[i]
class Solution:
def combination_sum(self, candidates: List[int], target: int) -> List[List[int]]:
results = []
def backtrack(remain, comb, start):
if remain == 0:
results.append(list(comb))
return
elif remain < 0:
return
for i in range(start, len(candidates)):
comb.append(candidates[i])
backtrack(remain - candidates[i], comb, i)
comb.pop()
backtrack(target, [], 0)
return results
class Solution(object):
def combination_sum(self, candidates, target):
ret = []
self.dfs(candidates, target, [], ret)
return ret
def dfs(self, nums, target, path, ret):
if target < 0:
return
if target == 0:
ret.append(path)
return
for i in range(len(nums)):
self.dfs(nums[i:], target - nums[i], path + [nums[i]], ret)
class Solution:
def combination_sum(self, candidates: List[int], target: int) -> List[List[int]]:
res = []
self.backtrack(0, candidates, target, [], res)
return res
def backtrack(self, start, candidates, target, path, res):
if target < 0:
return
if target == 0:
res.append(path)
return
for i in range(start, len(candidates)):
self.backtrack(i, candidates, target - candidates[i], path + [candidates[i]], res) |
# final
def sum_of_args(args):
result = 0
for i in args:
result += i
return result
print(sum_of_args(args=[1,2,3,4]))
| def sum_of_args(args):
result = 0
for i in args:
result += i
return result
print(sum_of_args(args=[1, 2, 3, 4])) |
'''
https://leetcode.com/contest/weekly-contest-182/problems/find-lucky-integer-in-an-array/
'''
class Solution:
def findLucky(self, arr: List[int]) -> int:
for a in sorted(arr)[::-1]:
if a == arr.count(a):
return a
return -1
| """
https://leetcode.com/contest/weekly-contest-182/problems/find-lucky-integer-in-an-array/
"""
class Solution:
def find_lucky(self, arr: List[int]) -> int:
for a in sorted(arr)[::-1]:
if a == arr.count(a):
return a
return -1 |
####Use the loop 'while'
# input a and b
a = int(input())
b = int(input())
if a > b :
print('it is not the total')
else :
i = a
total = 0
while i <= b :
total += i
i += 1
print(total) | a = int(input())
b = int(input())
if a > b:
print('it is not the total')
else:
i = a
total = 0
while i <= b:
total += i
i += 1
print(total) |
# Write your solution for 1.3 here!
x=0
i=0
while x<10000:
i+=1
x+=i
print(i)
| x = 0
i = 0
while x < 10000:
i += 1
x += i
print(i) |
# This is the Python adaptation and derivative work of Myia (https://github.com/mila-iqia/myia/).
#
# Copyright 2021 Huawei Technologies Co., Ltd
#
# 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.
# ============================================================================
""" Define constants"""
# Arithmetic
kScalarAdd = "ScalarAdd"
kScalarSub = "ScalarSub"
kScalarMul = "ScalarMul"
kScalarDiv = "ScalarDiv"
kScalarFloordiv = "ScalarFloordiv"
kScalarMod = "ScalarMod"
kScalarPow = "ScalarPow"
kScalarTrunc = "ScalarTrunc"
kScalarFloor = "ScalarFloor"
kScalarUadd = "ScalarUadd"
kScalarUsub = "ScalarUsub"
kTupleGetItem = "TupleGetItem"
kMakeTuple = "MakeTuple"
kGather = "Gather"
| """ Define constants"""
k_scalar_add = 'ScalarAdd'
k_scalar_sub = 'ScalarSub'
k_scalar_mul = 'ScalarMul'
k_scalar_div = 'ScalarDiv'
k_scalar_floordiv = 'ScalarFloordiv'
k_scalar_mod = 'ScalarMod'
k_scalar_pow = 'ScalarPow'
k_scalar_trunc = 'ScalarTrunc'
k_scalar_floor = 'ScalarFloor'
k_scalar_uadd = 'ScalarUadd'
k_scalar_usub = 'ScalarUsub'
k_tuple_get_item = 'TupleGetItem'
k_make_tuple = 'MakeTuple'
k_gather = 'Gather' |
tile_size = 25
# size of tiles in the board
screen_width = 400
# width of the screen
screen_height = 400
# height of the screen
| tile_size = 25
screen_width = 400
screen_height = 400 |
class Queue:
def __init__(self,list = None):
if list == None:
self.item =[]
else :
self.item = list
def enQueue(self,i):
self.item.append(i)
def size(self):
return len(self.item)
def isEmpty(self):
return len(self.item)==0
def deQueue(self):
return self.item.pop(0)
def showresult(r,b,heat,freeze,mistake):
print("Red Team : \n",r.size(),'\n',"".join(reversed(r.item)) if r.size()!=0 else "Empty",'\n',heat," Explosive(s) ! ! ! (HEAT)",sep="")
if mistake>0:
print("Blue Team Made (a) Mistake(s)",mistake,"Bomb(s)")
print("----------TENETTENET----------")
print(": maeT eulB\n",b.size(),'\n',"".join(reversed(b.item)) if b.size() != 0 else "ytpmE","\n","(EZEERF) ! ! ! (s)evisolpxE ",freeze,sep="")
def TENET(r,b):
bombl = Queue()
heat,freeze,mistake = 0,0,0
newr = Queue()
count = len(b.item)-2
j= 0
while j < count:
if b.item[j] == b.item[j+1] == b.item[j+2]:
bombl.enQueue(b.item[j])
# del b.item[j:j+3]
for _ in range(3):
b.item.pop(j)
count-=1
j-=1
freeze +=1
j+=1
# print(bombl.item)
for i in range(r.size()):
newr.enQueue(r.item[i])
# print("before",newr.item)
if newr.size()>=3:
if newr.item[-1]==newr.item[-2]==newr.item[-3]:
if not bombl.isEmpty():
bombq = bombl.deQueue()
if bombq == newr.item[-1]:
mistake+=1
for _ in range(2):
newr.item.pop()
else :
newr.item.insert(-1,bombq)
else:
heat+=1
for _ in range(3):
newr.item.pop()
# print("after",newr.item)
showresult(newr,b,heat,freeze,mistake)
r,b = input("Enter Input (Red, Blue) : ").split()
r = Queue(list(r))
b = Queue(list(b[::-1]))
# print(r.item,b.item)
TENET(r,b)
# print("heat",heat,"Freeze",freeze,"mistake",mistake)
| class Queue:
def __init__(self, list=None):
if list == None:
self.item = []
else:
self.item = list
def en_queue(self, i):
self.item.append(i)
def size(self):
return len(self.item)
def is_empty(self):
return len(self.item) == 0
def de_queue(self):
return self.item.pop(0)
def showresult(r, b, heat, freeze, mistake):
print('Red Team : \n', r.size(), '\n', ''.join(reversed(r.item)) if r.size() != 0 else 'Empty', '\n', heat, ' Explosive(s) ! ! ! (HEAT)', sep='')
if mistake > 0:
print('Blue Team Made (a) Mistake(s)', mistake, 'Bomb(s)')
print('----------TENETTENET----------')
print(': maeT eulB\n', b.size(), '\n', ''.join(reversed(b.item)) if b.size() != 0 else 'ytpmE', '\n', '(EZEERF) ! ! ! (s)evisolpxE ', freeze, sep='')
def tenet(r, b):
bombl = queue()
(heat, freeze, mistake) = (0, 0, 0)
newr = queue()
count = len(b.item) - 2
j = 0
while j < count:
if b.item[j] == b.item[j + 1] == b.item[j + 2]:
bombl.enQueue(b.item[j])
for _ in range(3):
b.item.pop(j)
count -= 1
j -= 1
freeze += 1
j += 1
for i in range(r.size()):
newr.enQueue(r.item[i])
if newr.size() >= 3:
if newr.item[-1] == newr.item[-2] == newr.item[-3]:
if not bombl.isEmpty():
bombq = bombl.deQueue()
if bombq == newr.item[-1]:
mistake += 1
for _ in range(2):
newr.item.pop()
else:
newr.item.insert(-1, bombq)
else:
heat += 1
for _ in range(3):
newr.item.pop()
showresult(newr, b, heat, freeze, mistake)
(r, b) = input('Enter Input (Red, Blue) : ').split()
r = queue(list(r))
b = queue(list(b[::-1]))
tenet(r, b) |
def test_signup_new_account(app):
username = "user1"
password = "test"
app.james.ensure_user_exists(username, password) | def test_signup_new_account(app):
username = 'user1'
password = 'test'
app.james.ensure_user_exists(username, password) |
list_var = [1, 2]
dict_var = {
"key1": "value1"
}
setVar = {1, 2, 3} | list_var = [1, 2]
dict_var = {'key1': 'value1'}
set_var = {1, 2, 3} |
n = int(input())
cnt1, cnt2 = {}, {}
for i in range(n):
x, y = map(int, input().split())
cnt1[x+y] = cnt1.get(x+y, 0) + 1
cnt2[x-y] = cnt2.get(x-y, 0) + 1
ans = 0
for t in cnt1.values():
ans += t*(t-1)//2
for t in cnt2.values():
ans += t*(t-1)//2
print(ans)
| n = int(input())
(cnt1, cnt2) = ({}, {})
for i in range(n):
(x, y) = map(int, input().split())
cnt1[x + y] = cnt1.get(x + y, 0) + 1
cnt2[x - y] = cnt2.get(x - y, 0) + 1
ans = 0
for t in cnt1.values():
ans += t * (t - 1) // 2
for t in cnt2.values():
ans += t * (t - 1) // 2
print(ans) |
def valid_oci_group(parser):
add_oci_group(parser)
def add_oci_group(parser):
oci_group = parser.add_argument_group(title="OCI arguments")
oci_group.add_argument("--oci-profile-name", default="")
oci_group.add_argument("--oci-profile-compartment-id", default="")
# HACK to extract the set provider from the cli
oci_group.add_argument("--oci", action="store_true", default=True)
| def valid_oci_group(parser):
add_oci_group(parser)
def add_oci_group(parser):
oci_group = parser.add_argument_group(title='OCI arguments')
oci_group.add_argument('--oci-profile-name', default='')
oci_group.add_argument('--oci-profile-compartment-id', default='')
oci_group.add_argument('--oci', action='store_true', default=True) |
def sievePrimeGen(n):
primes = [True] * (n + 1)
ans = []
for i in range(2, int(n * (1 / 2) + 1)):
if primes[i] == True:
for j in range(i * 2, n + 1, i):
primes[j] = False
for i in range(2, n + 1):
if primes[i] == True:
ans.append(i)
i += 1
return ans
print(sievePrimeGen(int(input("Enter the number upto which prime nos. should be generated - "))))
"""
* n = number uptill which prime nos are to be generated
* primes initially has all elements True by default
* LOGIC
* Instead of checking wheather all nums are prime - we remove(make them False) the multiples of prime nos less than sqrt of n
* Remaining ones which are True are Prime and False are non Prime
*
* COMPLEXITY - O(N * log(log(n)))
""" | def sieve_prime_gen(n):
primes = [True] * (n + 1)
ans = []
for i in range(2, int(n * (1 / 2) + 1)):
if primes[i] == True:
for j in range(i * 2, n + 1, i):
primes[j] = False
for i in range(2, n + 1):
if primes[i] == True:
ans.append(i)
i += 1
return ans
print(sieve_prime_gen(int(input('Enter the number upto which prime nos. should be generated - '))))
'\n * n = number uptill which prime nos are to be generated\n * primes initially has all elements True by default\n * LOGIC\n * Instead of checking wheather all nums are prime - we remove(make them False) the multiples of prime nos less than sqrt of n\n * Remaining ones which are True are Prime and False are non Prime\n * \n * COMPLEXITY - O(N * log(log(n)))\n' |
class Card:
def __repr__(self):
return str((self.name, self.rules, self.value))
class Batman(Card):
def __init__(self):
self.name = 'Batman'
self.value = 1
self.rules = "Guess a player's hand"
self.action = 'guess'
class Catwoman(Card):
def __init__(self):
self.name = 'Catwoman'
self.value = 2
self.rules = 'Look at a hand'
self.action = 'look'
class Bane(Card):
def __init__(self):
self.name = 'Bane'
self.value = 3
self.rules = 'Compare hands; lower hand is out'
self.action = 'compare'
class Robin(Card):
def __init__(self):
self.name = 'Robin'
self.value = 4
self.rules = 'Protection until next turn'
self.action = 'immune'
class PoisonIvy(Card):
def __init__(self):
self.name = 'Poison Ivy'
self.value = 5
self.rules = 'One player discards their hand'
self.action = 'discard'
class TwoFace(Card):
def __init__(self):
self.name = 'Two-Face'
self.value = 6
self.rules = 'Trade hands'
self.action = 'trade'
class HarleyQuinn(Card):
def __init__(self):
self.name = 'Harley Quinn'
self.value = 7
self.rules = 'Discard if caught with TWO-FACE or POISON IVY'
self.action = 'nop'
class Joker(Card):
def __init__(self):
self.name = 'Joker'
self.value = 8
self.rules = 'Lose if discarded'
self.action = 'lose'
def get_card(v):
return {
1: Batman,
2: Catwoman,
3: Bane,
4: Robin,
5: PoisonIvy,
6: TwoFace,
7: HarleyQuinn,
8: Joker
}[v]()
| class Card:
def __repr__(self):
return str((self.name, self.rules, self.value))
class Batman(Card):
def __init__(self):
self.name = 'Batman'
self.value = 1
self.rules = "Guess a player's hand"
self.action = 'guess'
class Catwoman(Card):
def __init__(self):
self.name = 'Catwoman'
self.value = 2
self.rules = 'Look at a hand'
self.action = 'look'
class Bane(Card):
def __init__(self):
self.name = 'Bane'
self.value = 3
self.rules = 'Compare hands; lower hand is out'
self.action = 'compare'
class Robin(Card):
def __init__(self):
self.name = 'Robin'
self.value = 4
self.rules = 'Protection until next turn'
self.action = 'immune'
class Poisonivy(Card):
def __init__(self):
self.name = 'Poison Ivy'
self.value = 5
self.rules = 'One player discards their hand'
self.action = 'discard'
class Twoface(Card):
def __init__(self):
self.name = 'Two-Face'
self.value = 6
self.rules = 'Trade hands'
self.action = 'trade'
class Harleyquinn(Card):
def __init__(self):
self.name = 'Harley Quinn'
self.value = 7
self.rules = 'Discard if caught with TWO-FACE or POISON IVY'
self.action = 'nop'
class Joker(Card):
def __init__(self):
self.name = 'Joker'
self.value = 8
self.rules = 'Lose if discarded'
self.action = 'lose'
def get_card(v):
return {1: Batman, 2: Catwoman, 3: Bane, 4: Robin, 5: PoisonIvy, 6: TwoFace, 7: HarleyQuinn, 8: Joker}[v]() |
# Definition for a binary tree node.
# class TreeNode:
# def __init__(self, x):
# self.val = x
# self.left = None
# self.right = None
class Solution:
def inorderSuccessor(self, root: 'TreeNode', p: 'TreeNode') -> 'TreeNode':
'''
in-order traversal
'''
self.found = False
def inorder(node, target):
if not node:
return
if node.left:
l = inorder(node.left, target)
if l:
return l
if self.found:
return node
elif node == target:
self.found = True
if node.right:
r = inorder(node.right, target)
if r:
return r
return
res = inorder(root, p)
return res
## 4/8/2021: iterative solution
# class Solution:
# def inorderSuccessor(self, root: 'TreeNode', p: 'TreeNode') -> 'TreeNode':
# '''
# inorder traversal the tree, find the child node of the target node
# '''
# curr = None
# stack = []
# while True:
# while root:
# stack.append(root)
# root = root.left
# if not stack:
# return None
# node = stack.pop()
# if curr == p:
# return node
# curr = node
# root = node.right
| class Solution:
def inorder_successor(self, root: 'TreeNode', p: 'TreeNode') -> 'TreeNode':
"""
in-order traversal
"""
self.found = False
def inorder(node, target):
if not node:
return
if node.left:
l = inorder(node.left, target)
if l:
return l
if self.found:
return node
elif node == target:
self.found = True
if node.right:
r = inorder(node.right, target)
if r:
return r
return
res = inorder(root, p)
return res |
db_host_name="127.0.0.1"
db_name="TestDB"
db_user="testuser"
db_password="test123"
db_table_name="brady"
| db_host_name = '127.0.0.1'
db_name = 'TestDB'
db_user = 'testuser'
db_password = 'test123'
db_table_name = 'brady' |
#
# This file is part of BDC-DB.
# Copyright (C) 2020 INPE.
#
# BDC-DB is free software; you can redistribute it and/or modify it
# under the terms of the MIT License; see LICENSE file for more details.
#
"""Define mock of flask app that extends BDC-DB."""
SCHEMA = 'myapp'
| """Define mock of flask app that extends BDC-DB."""
schema = 'myapp' |
'''
Created on 13 Jun 2016
@author: a
'''
class InvalidPasswords():
BAD_PASSWORDS = ['1234567890','qwertyuiop','123456789','password1','photoshop',
'11111111','12345678','1qaz2wsx','access14','adobe123','baseball',
'bigdaddy','butthead','cocacola','computer','corvette','danielle',\
'dolphins','einstein','firebird','football','hardcore','iloveyou',\
'internet','jennifer','marlboro','maverick','mercedes','michelle',\
'midnight','mistress','mountain','nicholas','passw0rd','password',\
'pa#sword','princess','qwertyui','redskins','redwings','rush2112',\
'samantha','scorpion','srinivas','startrek','starwars','steelers',\
'sunshine','superman','swimming','trustno1','victoria','whatever',\
'xxxxxxxx','1234567','7777777','8675309','abgrtyu','amateur','anthony',\
'arsenal','a#shole','bigc#ck','bigdick','bigtits','bitches','blondes',\
'bl#wjob','bond007','brandon','broncos','bulldog','cameron','captain',\
'charles','charlie','chelsea','chester','chicago','chicken','c#mming',\
'c#mshot','college','cowboys','crystal','diamond','dolphin','extreme',\
'f#cking','f#ckyou','ferrari','fishing','florida','forever','freedom',\
'gandalf','gateway','gregory','heather','hooters','hunting','jackson',\
'jasmine','jessica','johnson','leather','letmein','madison','matthew',\
'maxwell','melissa','michael','monster','mustang','naughty','ncc1701',\
'newyork','nipples','packers','panther','panties','patrick','peaches',\
'phantom','phoenix','porsche','private','p#ssies','raiders','rainbow',\
'rangers','rebecca','richard','rosebud','scooter','scorpio','shannon',\
'success','testing','thunder','thx1138','tiffany','trouble','voyager',\
'warrior','welcome','william','winston','yankees','zxcvbnm','123456',\
'111111','112233','121212','123123','123456','131313','232323','654321',\
'666666','696969','777777','987654','aaaaaa','abc123','access','action',\
'albert','alexis','amanda','andrea','andrew','angela','angels','animal',\
'apollo','apples','arthur','asdfgh','ashley','Aaugust','austin','azerty',\
'badboy','bailey','banana','barney','batman','beaver','beavis','bigdog',\
'birdie','biteme','blazer','blonde','blowme','bonnie','booboo','booger',\
'boomer','boston','brandy','braves','brazil','bronco','buster','butter',\
'calvin','camaro','canada','carlos','carter','casper','cheese','coffee',\
'compaq','cookie','cooper','cowboy','dakota','dallas','daniel','debbie',\
'dennis','diablo','doctor','doggie','donald','dragon','dreams','driver',\
'eagle1','eagles','edward','erotic','falcon','f#cked','f#cker','f#ckme',\
'fender','flower','flyers','freddy','gators','gemini','george','giants',\
'ginger','golden','golfer','gordon','guitar','gunner','hammer','hannah',\
'harley','helpme','hentai','hockey','horney','hotdog','hunter','iceman',\
'iwantu','jackie','jaguar','jasper','jeremy','johnny','jordan','joseph',\
'joshua','junior','justin','killer','knight','ladies','lakers','lauren',\
'legend','little','london','lovers','maddog','maggie','magnum','marine',\
'martin','marvin','master','matrix','member','merlin','mickey','miller',\
'monica','monkey','morgan','mother','muffin','murphy','nascar','nathan',\
'nicole','nipple','oliver','orange','parker','peanut','pepper','player',\
'please','pookie','prince','purple','qazwsx','qwerty','rabbit','rachel',\
'racing','ranger','redsox','robert','rocket','runner','russia','samson',\
'sandra','saturn','scooby','secret','sexsex','shadow','shaved','sierra',\
'silver','skippy','slayer','smokey','snoopy','soccer','sophie','spanky',\
'sparky','spider','squirt','steven','sticky','stupid','suckit','summer',\
'surfer','sydney','taylor','tennis','teresa','tester','theman','thomas',\
'tigers','tigger','tomcat','topgun','toyota','travis','tucker','turtle',\
'united','vagina','victor','viking','voodoo','walter','willie','wilson',\
'winner','winter','wizard','xavier','xxxxxx','yamaha','yankee','yellow',\
'zxcvbn','zzzzzz','qwerty123', 'qwerty12'] | """
Created on 13 Jun 2016
@author: a
"""
class Invalidpasswords:
bad_passwords = ['1234567890', 'qwertyuiop', '123456789', 'password1', 'photoshop', '11111111', '12345678', '1qaz2wsx', 'access14', 'adobe123', 'baseball', 'bigdaddy', 'butthead', 'cocacola', 'computer', 'corvette', 'danielle', 'dolphins', 'einstein', 'firebird', 'football', 'hardcore', 'iloveyou', 'internet', 'jennifer', 'marlboro', 'maverick', 'mercedes', 'michelle', 'midnight', 'mistress', 'mountain', 'nicholas', 'passw0rd', 'password', 'pa#sword', 'princess', 'qwertyui', 'redskins', 'redwings', 'rush2112', 'samantha', 'scorpion', 'srinivas', 'startrek', 'starwars', 'steelers', 'sunshine', 'superman', 'swimming', 'trustno1', 'victoria', 'whatever', 'xxxxxxxx', '1234567', '7777777', '8675309', 'abgrtyu', 'amateur', 'anthony', 'arsenal', 'a#shole', 'bigc#ck', 'bigdick', 'bigtits', 'bitches', 'blondes', 'bl#wjob', 'bond007', 'brandon', 'broncos', 'bulldog', 'cameron', 'captain', 'charles', 'charlie', 'chelsea', 'chester', 'chicago', 'chicken', 'c#mming', 'c#mshot', 'college', 'cowboys', 'crystal', 'diamond', 'dolphin', 'extreme', 'f#cking', 'f#ckyou', 'ferrari', 'fishing', 'florida', 'forever', 'freedom', 'gandalf', 'gateway', 'gregory', 'heather', 'hooters', 'hunting', 'jackson', 'jasmine', 'jessica', 'johnson', 'leather', 'letmein', 'madison', 'matthew', 'maxwell', 'melissa', 'michael', 'monster', 'mustang', 'naughty', 'ncc1701', 'newyork', 'nipples', 'packers', 'panther', 'panties', 'patrick', 'peaches', 'phantom', 'phoenix', 'porsche', 'private', 'p#ssies', 'raiders', 'rainbow', 'rangers', 'rebecca', 'richard', 'rosebud', 'scooter', 'scorpio', 'shannon', 'success', 'testing', 'thunder', 'thx1138', 'tiffany', 'trouble', 'voyager', 'warrior', 'welcome', 'william', 'winston', 'yankees', 'zxcvbnm', '123456', '111111', '112233', '121212', '123123', '123456', '131313', '232323', '654321', '666666', '696969', '777777', '987654', 'aaaaaa', 'abc123', 'access', 'action', 'albert', 'alexis', 'amanda', 'andrea', 'andrew', 'angela', 'angels', 'animal', 'apollo', 'apples', 'arthur', 'asdfgh', 'ashley', 'Aaugust', 'austin', 'azerty', 'badboy', 'bailey', 'banana', 'barney', 'batman', 'beaver', 'beavis', 'bigdog', 'birdie', 'biteme', 'blazer', 'blonde', 'blowme', 'bonnie', 'booboo', 'booger', 'boomer', 'boston', 'brandy', 'braves', 'brazil', 'bronco', 'buster', 'butter', 'calvin', 'camaro', 'canada', 'carlos', 'carter', 'casper', 'cheese', 'coffee', 'compaq', 'cookie', 'cooper', 'cowboy', 'dakota', 'dallas', 'daniel', 'debbie', 'dennis', 'diablo', 'doctor', 'doggie', 'donald', 'dragon', 'dreams', 'driver', 'eagle1', 'eagles', 'edward', 'erotic', 'falcon', 'f#cked', 'f#cker', 'f#ckme', 'fender', 'flower', 'flyers', 'freddy', 'gators', 'gemini', 'george', 'giants', 'ginger', 'golden', 'golfer', 'gordon', 'guitar', 'gunner', 'hammer', 'hannah', 'harley', 'helpme', 'hentai', 'hockey', 'horney', 'hotdog', 'hunter', 'iceman', 'iwantu', 'jackie', 'jaguar', 'jasper', 'jeremy', 'johnny', 'jordan', 'joseph', 'joshua', 'junior', 'justin', 'killer', 'knight', 'ladies', 'lakers', 'lauren', 'legend', 'little', 'london', 'lovers', 'maddog', 'maggie', 'magnum', 'marine', 'martin', 'marvin', 'master', 'matrix', 'member', 'merlin', 'mickey', 'miller', 'monica', 'monkey', 'morgan', 'mother', 'muffin', 'murphy', 'nascar', 'nathan', 'nicole', 'nipple', 'oliver', 'orange', 'parker', 'peanut', 'pepper', 'player', 'please', 'pookie', 'prince', 'purple', 'qazwsx', 'qwerty', 'rabbit', 'rachel', 'racing', 'ranger', 'redsox', 'robert', 'rocket', 'runner', 'russia', 'samson', 'sandra', 'saturn', 'scooby', 'secret', 'sexsex', 'shadow', 'shaved', 'sierra', 'silver', 'skippy', 'slayer', 'smokey', 'snoopy', 'soccer', 'sophie', 'spanky', 'sparky', 'spider', 'squirt', 'steven', 'sticky', 'stupid', 'suckit', 'summer', 'surfer', 'sydney', 'taylor', 'tennis', 'teresa', 'tester', 'theman', 'thomas', 'tigers', 'tigger', 'tomcat', 'topgun', 'toyota', 'travis', 'tucker', 'turtle', 'united', 'vagina', 'victor', 'viking', 'voodoo', 'walter', 'willie', 'wilson', 'winner', 'winter', 'wizard', 'xavier', 'xxxxxx', 'yamaha', 'yankee', 'yellow', 'zxcvbn', 'zzzzzz', 'qwerty123', 'qwerty12'] |
# None datatype
a = None
print(a)
# Numeric datatype (int,float,complex,bool)
b = 4
print(type(b))
c = 2.5
print(type(c))
d = 4 + 5j
print(type(d))
bool = b > c
print(type(bool))
e = int(c)
print(e)
f = complex(e, b)
print(f)
print(int(True))
# List datatype
lst = [1, 2, 3, 4, 5]
print(lst)
# Set datatype
s = {4, 8, 2, 1, 6, 3}
print(s)
# Tuple datatypes
tup = (10, 20, 50, 40, 30)
print(tup)
# String datatype
str = 'Sunny'
print(str)
# Range datatype
k = list(range(10))
print(k)
l = list(range(11, 21, 2))
print(l)
# Dictionary datatype
d = {1: 'sunny', 'raj': 'python', 2.4: 'java'}
print(d)
print(d.keys())
print(d.values())
print(d[2.4])
| a = None
print(a)
b = 4
print(type(b))
c = 2.5
print(type(c))
d = 4 + 5j
print(type(d))
bool = b > c
print(type(bool))
e = int(c)
print(e)
f = complex(e, b)
print(f)
print(int(True))
lst = [1, 2, 3, 4, 5]
print(lst)
s = {4, 8, 2, 1, 6, 3}
print(s)
tup = (10, 20, 50, 40, 30)
print(tup)
str = 'Sunny'
print(str)
k = list(range(10))
print(k)
l = list(range(11, 21, 2))
print(l)
d = {1: 'sunny', 'raj': 'python', 2.4: 'java'}
print(d)
print(d.keys())
print(d.values())
print(d[2.4]) |
# this menu.py only installs the SetLoop examples.
# get script location (necessaary for loading toolsets)
dirName = os.path.dirname( os.path.abspath(__file__)).replace('\\', '/')
# get node toolbar
nodes = nuke.menu('Nodes')
# make group entry for examples in toolsets menu
group = nodes.addMenu('ToolSets/SetLoop Examples', index=2)
# make adding examples a function
def addExample(fileName, toolSetName):
# add individual examples
group.addCommand('(' + toolSetName + ') ' + fileName, "nuke.loadToolset('" + dirName + '/' + fileName + ".nk')", icon = fileName + '.png')
# add each example
addExample('Geo Loop', 'SetLoop')
addExample('Motion Graphics', 'SetLoop')
addExample('Julia Set 1', 'SetLoop')
addExample('Julia Set 2', 'SetLoop')
addExample('Julia Set 3', 'SetLoop')
addExample('Mandelbrot 1', 'SetLoop')
addExample('Mandelbrot 2', 'SetLoop')
addExample('Reaction Diffusion 1', 'SetLoop')
addExample('Reaction Diffusion 2', 'SetLoop')
addExample('Reaction Diffusion 3', 'SetLoop') | dir_name = os.path.dirname(os.path.abspath(__file__)).replace('\\', '/')
nodes = nuke.menu('Nodes')
group = nodes.addMenu('ToolSets/SetLoop Examples', index=2)
def add_example(fileName, toolSetName):
group.addCommand('(' + toolSetName + ') ' + fileName, "nuke.loadToolset('" + dirName + '/' + fileName + ".nk')", icon=fileName + '.png')
add_example('Geo Loop', 'SetLoop')
add_example('Motion Graphics', 'SetLoop')
add_example('Julia Set 1', 'SetLoop')
add_example('Julia Set 2', 'SetLoop')
add_example('Julia Set 3', 'SetLoop')
add_example('Mandelbrot 1', 'SetLoop')
add_example('Mandelbrot 2', 'SetLoop')
add_example('Reaction Diffusion 1', 'SetLoop')
add_example('Reaction Diffusion 2', 'SetLoop')
add_example('Reaction Diffusion 3', 'SetLoop') |
_base_ = ["./FlowNet512_1.5AugCosyAAEGray_Flat_Pbr_01_ape.py"]
OUTPUT_DIR = "output/deepim/lmPbrSO/FlowNet512_1.5AugCosyAAEGray_Flat_lmPbr_SO/camera"
DATASETS = dict(TRAIN=("lm_pbr_camera_train",), TEST=("lm_real_camera_test",))
# bbnc7
# objects camera Avg(1)
# ad_2 26.86 26.86
# ad_5 84.41 84.41
# ad_10 99.12 99.12
# rete_2 40.88 40.88
# rete_5 99.12 99.12
# rete_10 100.00 100.00
# re_2 40.98 40.98
# re_5 99.12 99.12
# re_10 100.00 100.00
# te_2 99.51 99.51
# te_5 100.00 100.00
# te_10 100.00 100.00
# proj_2 81.76 81.76
# proj_5 99.31 99.31
# proj_10 100.00 100.00
# re 2.34 2.34
# te 0.01 0.01
# init by mlBCE
# objects camera Avg(1)
# ad_2 28.43 28.43
# ad_5 84.31 84.31
# ad_10 99.22 99.22
# rete_2 40.20 40.20
# rete_5 99.02 99.02
# rete_10 100.00 100.00
# re_2 40.29 40.29
# re_5 99.02 99.02
# re_10 100.00 100.00
# te_2 99.51 99.51
# te_5 100.00 100.00
# te_10 100.00 100.00
# proj_2 82.06 82.06
# proj_5 99.31 99.31
# proj_10 100.00 100.00
# re 2.34 2.34
# te 0.01 0.01
| _base_ = ['./FlowNet512_1.5AugCosyAAEGray_Flat_Pbr_01_ape.py']
output_dir = 'output/deepim/lmPbrSO/FlowNet512_1.5AugCosyAAEGray_Flat_lmPbr_SO/camera'
datasets = dict(TRAIN=('lm_pbr_camera_train',), TEST=('lm_real_camera_test',)) |
# Function to square every digit of a number.
# Eg. 9119 will become 811181, because 9^2 is 81 and 1^2 is 1.
def square_each_number(num):
result= ''
list = [int(d) for d in str(num)]
square_list = [i ** 2 for i in list]
for i in square_list:
result += str(i)
return float(result)
test.assert_equals(square_digits(9119), 811181) | def square_each_number(num):
result = ''
list = [int(d) for d in str(num)]
square_list = [i ** 2 for i in list]
for i in square_list:
result += str(i)
return float(result)
test.assert_equals(square_digits(9119), 811181) |
# QUESTION:
#
# This problem was asked by Google.
#
# Given the root to a binary tree, implement serialize(root), which serializes
# the tree into a string, and deserialize(s), which deserializes the string
# back into the tree.
#
# For example, given the following Node class
#
# class Node:
# def __init__(self, val, left=None, right=None):
# self.val = val
# self.left = left
# self.right = right
# The following test should pass:
#
# node = Node('root', Node('left', Node('left.left')), Node('right'))
# assert deserialize(serialize(node)).left.left.val == 'left.left'
class Node(object):
def __init__(self, val, left=None, right=None):
self.val = val
self.left = left
self.right = right
def solution(L):
# Sanity check
if not L:
return None
# Return the identity if the element-count is fewer than 3
if len(L) < 3:
return L
# Prevent division-by-zero
for i in range(0, len(L)):
if L[i] == 0:
return None
product = 1
multiply = lambda x, y: x * y
divide = lambda x: product // x
product = reduce(multiply, L)
return list(map(divide, L))
| class Node(object):
def __init__(self, val, left=None, right=None):
self.val = val
self.left = left
self.right = right
def solution(L):
if not L:
return None
if len(L) < 3:
return L
for i in range(0, len(L)):
if L[i] == 0:
return None
product = 1
multiply = lambda x, y: x * y
divide = lambda x: product // x
product = reduce(multiply, L)
return list(map(divide, L)) |
def reverseBits(n):
head = 15
tail = 0
while head > tail:
headBit = (n >> head) & 1
tailBit = (n >> tail) & 1
if headBit != tailBit:
bitMask = (1 << head) | (1 << tail)
n ^= bitMask
head -= 1
tail += 1
return n
| def reverse_bits(n):
head = 15
tail = 0
while head > tail:
head_bit = n >> head & 1
tail_bit = n >> tail & 1
if headBit != tailBit:
bit_mask = 1 << head | 1 << tail
n ^= bitMask
head -= 1
tail += 1
return n |
class MolGraphInterface:
r"""The `MolGraphInterface` defines the base class interface to handle a molecular graph. The method implementation
to generate a mol-instance from smiles etc. can be obtained from different backends like `rdkit`. The mol-instance
of a chemical informatics package like `rdkit` is treated via composition. The interface is designed to
extract a graph from a mol instance not to make a mol object from a graph.
"""
def __init__(self, mol=None, add_hydrogen: bool = False):
"""Set the mol attribute for composition. This mol instances will be the backends molecule class.
Args:
mol: Instance of a molecule from chemical informatics package.
add_hydrogen (bool): Whether to add or ignore hydrogen in the molecule.
"""
self.mol = mol
self._add_hydrogen = add_hydrogen
def from_smiles(self, smile: str, **kwargs):
"""Main method to generate a molecule from smiles string representation.
Args:
smile (str): Smile string representation of a molecule.
Returns:
self
"""
raise NotImplementedError("ERROR:kgcnn: Method for `MolGraphInterface` must be implemented in sub-class.")
def to_smiles(self):
"""Return a smile string representation of the mol instance.
Returns:
smile (str): Smile string.
"""
raise NotImplementedError("ERROR:kgcnn: Method for `MolGraphInterface` must be implemented in sub-class.")
def from_mol_block(self, mol_block: str):
"""Set mol-instance from a more extensive string representation containing coordinates and bond information.
Args:
mol_block (str): Mol-block representation of a molecule.
Returns:
self
"""
raise NotImplementedError("ERROR:kgcnn: Method for `MolGraphInterface` must be implemented in sub-class.")
def to_mol_block(self):
"""Make a more extensive string representation containing coordinates and bond information from self.
Returns:
mol_block (str): Mol-block representation of a molecule.
"""
raise NotImplementedError("ERROR:kgcnn: Method for `MolGraphInterface` must be implemented in sub-class.")
@property
def node_number(self):
"""Return list of node numbers which is the atomic number of atoms in the molecule"""
raise NotImplementedError("ERROR:kgcnn: Method for `MolGraphInterface` must be implemented in sub-class.")
@property
def node_symbol(self):
"""Return a list of atomic symbols of the molecule."""
raise NotImplementedError("ERROR:kgcnn: Method for `MolGraphInterface` must be implemented in sub-class.")
@property
def node_coordinates(self):
"""Return a list of atomic coordinates of the molecule."""
raise NotImplementedError("ERROR:kgcnn: Method for `MolGraphInterface` must be implemented in sub-class.")
@property
def edge_indices(self):
"""Return a list of edge indices of the molecule."""
raise NotImplementedError("ERROR:kgcnn: Method for `MolGraphInterface` must be implemented in sub-class.")
@property
def edge_number(self):
"""Return a list of edge number that represents the bond order."""
raise NotImplementedError("ERROR:kgcnn: Method for `MolGraphInterface` must be implemented in sub-class.")
def edge_attributes(self, properties: list, encoder: dict):
"""Make edge attributes.
Args:
properties (list): List of string identifier for a molecular property. Must match backend features.
encoder (dict): A dictionary of callable encoder function or class for each string identifier.
Returns:
list: List of attributes after processed by the encoder.
"""
raise NotImplementedError("ERROR:kgcnn: Method for `MolGraphInterface` must be implemented in sub-class.")
def node_attributes(self, properties: list, encoder: dict):
"""Make node attributes.
Args:
properties (list): List of string identifier for a molecular property. Must match backend features.
encoder (dict): A dictionary of callable encoder function or class for each string identifier.
Returns:
list: List of attributes after processed by the encoder.
"""
raise NotImplementedError("ERROR:kgcnn: Method for `MolGraphInterface` must be implemented in sub-class.")
def graph_attributes(self, properties: list, encoder: dict):
"""Make graph attributes.
Args:
properties (list): List of string identifier for a molecular property. Must match backend features.
encoder (dict): A dictionary of callable encoder function or class for each string identifier.
Returns:
list: List of attributes after processed by the encoder.
"""
raise NotImplementedError("ERROR:kgcnn: Method for `MolGraphInterface` must be implemented in sub-class.")
@staticmethod
def _check_encoder(encoder: dict, possible_keys: list):
"""Verify and check if encoder dictionary inputs is within possible properties. If a key has to be removed,
a warning is issued.
Args:
encoder (dict): Dictionary of callable encoder function or class. Key matches properties.
possible_keys (list): List of allowed keys for encoder.
Returns:
dict: Cleaned encoder dictionary.
"""
if encoder is None:
encoder = {}
else:
encoder_unknown = [x for x in encoder if x not in possible_keys]
if len(encoder_unknown) > 0:
print("WARNING: Encoder property not known", encoder_unknown)
encoder = {key: value for key, value in encoder.items() if key not in encoder_unknown}
return encoder
@staticmethod
def _check_properties_list(properties: list, possible_properties: list, attribute_name: str):
"""Verify and check if list of string identifier match expected properties. If an identifier has to be removed,
a warning is issued.
Args:
properties (list): List of requested string identifier. Key matches properties.
possible_properties (list): List of allowed string identifier for properties.
attribute_name(str): A name for the properties.
Returns:
dict: Cleaned encoder dictionary.
"""
if properties is None:
props = [x for x in possible_properties]
else:
props_unknown = [x for x in properties if x not in possible_properties]
if len(props_unknown) > 0:
print("WARNING: %s property is not defined, ignore following keys:" % attribute_name,
props_unknown)
props = [x for x in properties if x in possible_properties]
return props | class Molgraphinterface:
"""The `MolGraphInterface` defines the base class interface to handle a molecular graph. The method implementation
to generate a mol-instance from smiles etc. can be obtained from different backends like `rdkit`. The mol-instance
of a chemical informatics package like `rdkit` is treated via composition. The interface is designed to
extract a graph from a mol instance not to make a mol object from a graph.
"""
def __init__(self, mol=None, add_hydrogen: bool=False):
"""Set the mol attribute for composition. This mol instances will be the backends molecule class.
Args:
mol: Instance of a molecule from chemical informatics package.
add_hydrogen (bool): Whether to add or ignore hydrogen in the molecule.
"""
self.mol = mol
self._add_hydrogen = add_hydrogen
def from_smiles(self, smile: str, **kwargs):
"""Main method to generate a molecule from smiles string representation.
Args:
smile (str): Smile string representation of a molecule.
Returns:
self
"""
raise not_implemented_error('ERROR:kgcnn: Method for `MolGraphInterface` must be implemented in sub-class.')
def to_smiles(self):
"""Return a smile string representation of the mol instance.
Returns:
smile (str): Smile string.
"""
raise not_implemented_error('ERROR:kgcnn: Method for `MolGraphInterface` must be implemented in sub-class.')
def from_mol_block(self, mol_block: str):
"""Set mol-instance from a more extensive string representation containing coordinates and bond information.
Args:
mol_block (str): Mol-block representation of a molecule.
Returns:
self
"""
raise not_implemented_error('ERROR:kgcnn: Method for `MolGraphInterface` must be implemented in sub-class.')
def to_mol_block(self):
"""Make a more extensive string representation containing coordinates and bond information from self.
Returns:
mol_block (str): Mol-block representation of a molecule.
"""
raise not_implemented_error('ERROR:kgcnn: Method for `MolGraphInterface` must be implemented in sub-class.')
@property
def node_number(self):
"""Return list of node numbers which is the atomic number of atoms in the molecule"""
raise not_implemented_error('ERROR:kgcnn: Method for `MolGraphInterface` must be implemented in sub-class.')
@property
def node_symbol(self):
"""Return a list of atomic symbols of the molecule."""
raise not_implemented_error('ERROR:kgcnn: Method for `MolGraphInterface` must be implemented in sub-class.')
@property
def node_coordinates(self):
"""Return a list of atomic coordinates of the molecule."""
raise not_implemented_error('ERROR:kgcnn: Method for `MolGraphInterface` must be implemented in sub-class.')
@property
def edge_indices(self):
"""Return a list of edge indices of the molecule."""
raise not_implemented_error('ERROR:kgcnn: Method for `MolGraphInterface` must be implemented in sub-class.')
@property
def edge_number(self):
"""Return a list of edge number that represents the bond order."""
raise not_implemented_error('ERROR:kgcnn: Method for `MolGraphInterface` must be implemented in sub-class.')
def edge_attributes(self, properties: list, encoder: dict):
"""Make edge attributes.
Args:
properties (list): List of string identifier for a molecular property. Must match backend features.
encoder (dict): A dictionary of callable encoder function or class for each string identifier.
Returns:
list: List of attributes after processed by the encoder.
"""
raise not_implemented_error('ERROR:kgcnn: Method for `MolGraphInterface` must be implemented in sub-class.')
def node_attributes(self, properties: list, encoder: dict):
"""Make node attributes.
Args:
properties (list): List of string identifier for a molecular property. Must match backend features.
encoder (dict): A dictionary of callable encoder function or class for each string identifier.
Returns:
list: List of attributes after processed by the encoder.
"""
raise not_implemented_error('ERROR:kgcnn: Method for `MolGraphInterface` must be implemented in sub-class.')
def graph_attributes(self, properties: list, encoder: dict):
"""Make graph attributes.
Args:
properties (list): List of string identifier for a molecular property. Must match backend features.
encoder (dict): A dictionary of callable encoder function or class for each string identifier.
Returns:
list: List of attributes after processed by the encoder.
"""
raise not_implemented_error('ERROR:kgcnn: Method for `MolGraphInterface` must be implemented in sub-class.')
@staticmethod
def _check_encoder(encoder: dict, possible_keys: list):
"""Verify and check if encoder dictionary inputs is within possible properties. If a key has to be removed,
a warning is issued.
Args:
encoder (dict): Dictionary of callable encoder function or class. Key matches properties.
possible_keys (list): List of allowed keys for encoder.
Returns:
dict: Cleaned encoder dictionary.
"""
if encoder is None:
encoder = {}
else:
encoder_unknown = [x for x in encoder if x not in possible_keys]
if len(encoder_unknown) > 0:
print('WARNING: Encoder property not known', encoder_unknown)
encoder = {key: value for (key, value) in encoder.items() if key not in encoder_unknown}
return encoder
@staticmethod
def _check_properties_list(properties: list, possible_properties: list, attribute_name: str):
"""Verify and check if list of string identifier match expected properties. If an identifier has to be removed,
a warning is issued.
Args:
properties (list): List of requested string identifier. Key matches properties.
possible_properties (list): List of allowed string identifier for properties.
attribute_name(str): A name for the properties.
Returns:
dict: Cleaned encoder dictionary.
"""
if properties is None:
props = [x for x in possible_properties]
else:
props_unknown = [x for x in properties if x not in possible_properties]
if len(props_unknown) > 0:
print('WARNING: %s property is not defined, ignore following keys:' % attribute_name, props_unknown)
props = [x for x in properties if x in possible_properties]
return props |
# from Data Structures, Spring 2019
class Graph:
"""Representation of a simple graph using an adjacency map."""
#------------------------- nested Vertex class -------------------------
class Vertex:
"""Lightweight vertex structure for a graph."""
# __slots__ = '_element'
def __init__(self, idx, goal=None,proof_tree=None,proof=None):
"""Do not call constructor directly. Use Graph's insert_vertex(x)."""
self.goal = goal
self.idx = idx
self.proof_tree = proof_tree
self.proof = proof
# def element(self):
# """Return element associated with this vertex."""
# return self._element
def __hash__(self): # will allow vertex to be a map/set key
return hash(self.idx)
def __str__(self):
return "VERTEX ({}, {})".format(self.idx,self.goal)
# return str(self.goal)
def __repr__(self):
return "VERTEX ({}, {})".format(self.idx,self.goal)
def __ge__(self,v2):
if not isinstance(v2,type(self)):
raise ValueError("not a vertex to compare")
return self.idx >= v2.idx
def __eq__(self,v2):
if not isinstance(v2,type(self)):
raise ValueError("not a vertex to compare")
return self.idx==v2.idx and self.goal==v2.goal and self.proof_tree==v2.proof_tree
# return str(self.goal)
#------------------------- nested Edge class -------------------------
class Edge:
"""Lightweight edge structure for a graph."""
# __slots__ = '_origin', '_destination', '_element'
def __init__(self, u, v, rule_encoding=None,matching_dict=None):
"""Do not call constructor directly. Use Graph's insert_edge(u,v,x)."""
self._origin = u
self._destination = v
self.rule_encoding = rule_encoding
self.matching_dict = matching_dict
def endpoints(self):
"""Return (u,v) tuple for vertices u and v."""
return (self._origin, self._destination)
def opposite(self, v):
"""Return the vertex that is opposite v on this edge."""
if not isinstance(v, Graph.Vertex):
raise TypeError('v must be a Vertex')
return self._destination if v is self._origin else self._origin
raise ValueError('v not incident to edge')
# def element(self):
# """Return element associated with this edge."""
# return self._element
def __hash__(self): # will allow edge to be a map/set key
return hash( (self._origin, self._destination) )
def __str__(self):
return '({0},{1},{2},{3})'.format(self._origin,self._destination,self.rule_encoding,self.matching_dict)
def __repr__(self):
if self._origin.idx < self._destination.idx:
u = self._origin
v = self._destination
else:
u = self._destination
v = self._origin
return 'EDGE: ({0},{1},{2},{3})'.format(u,v,self.rule_encoding,self.matching_dict)
#------------------------- Graph methods -------------------------
def __init__(self, directed=False):
"""Create an empty graph (undirected, by default).
Graph is directed if optional paramter is set to True.
"""
self._outgoing = {}
# only create second map for directed graph; use alias for undirected
self._incoming = {} if directed else self._outgoing
def __str__(self):
def edge_key(e):
if e._origin.idx < e._destination.idx:
u = e._origin
v = e._destination
else:
u = e._destination
v = e._origin
return u.idx
edges = list(self.edges())
sorted_edges = sorted(edges,key=lambda x:edge_key(x))
result = []
for each in sorted_edges:
result.append(str(each) + "\n")
return "".join(result)
def size(self):
return len(self.vertices())
def dfs(self,start_node):
# retrun an iteration in the dfs order
def dfs_inner(start_node,visited):
visited.append(start_node)
adj_list = list(self._outgoing[start_node].keys())
for i in range(len(adj_list)):
has_visited = False
for j in visited:
if j == adj_list[i]:
has_visited = True
break
if not has_visited:
dfs_inner(adj_list[i],visited)
return visited
if len(self._outgoing)==0:
return []
to_return = dfs_inner(start_node,[])
return to_return
def _validate_vertex(self, v):
"""Verify that v is a Vertex of this graph."""
if not isinstance(v, self.Vertex):
raise TypeError('Vertex expected')
if v not in self._outgoing:
raise ValueError('Vertex does not belong to this graph.')
def is_directed(self):
"""Return True if this is a directed graph; False if undirected.
Property is based on the original declaration of the graph, not its contents.
"""
return self._incoming is not self._outgoing # directed if maps are distinct
def vertex_count(self):
"""Return the number of vertices in the graph."""
return len(self._outgoing)
def vertices(self):
"""Return an iteration of all vertices of the graph."""
return self._outgoing.keys()
def edge_count(self):
"""Return the number of edges in the graph."""
total = sum(len(self._outgoing[v]) for v in self._outgoing)
# for undirected graphs, make sure not to double-count edges
return total if self.is_directed() else total // 2
def edges(self):
"""Return a set of all edges of the graph."""
result = set() # avoid double-reporting edges of undirected graph
for secondary_map in self._outgoing.values():
result.update(secondary_map.values()) # add edges to resulting set
return result
def get_edge(self, u, v):
"""Return the edge from u to v, or None if not adjacent."""
self._validate_vertex(u)
self._validate_vertex(v)
return self._outgoing[u].get(v) # returns None if v not adjacent
def degree(self, v, outgoing=True):
"""Return number of (outgoing) edges incident to vertex v in the graph.
If graph is directed, optional parameter used to count incoming edges.
"""
self._validate_vertex(v)
adj = self._outgoing if outgoing else self._incoming
return len(adj[v])
def incident_edges(self, v, outgoing=True):
"""Return all (outgoing) edges incident to vertex v in the graph.
If graph is directed, optional parameter used to request incoming edges.
"""
self._validate_vertex(v)
adj = self._outgoing if outgoing else self._incoming
for edge in adj[v].values():
yield edge
def insert_vertex(self, x=None):
"""Insert and return a new Vertex with element x."""
idx = len(self._outgoing)
v = self.Vertex(idx,x) #create a new instance in the vertex class
self._outgoing[v] = {}
if self.is_directed():
self._incoming[v] = {} # need distinct map for incoming edges
return v
def insert_edge(self, u, v, rule_encoding=None,matching_dict=None):
"""Insert and return a new Edge from u to v with auxiliary element x.
Raise a ValueError if u and v are not vertices of the graph.
Raise a ValueError if u and v are already adjacent.
"""
if self.get_edge(u, v) is not None: # includes error checking
raise ValueError('u and v are already adjacent')
e = self.Edge(u, v, rule_encoding,matching_dict)
self._outgoing[u][v] = e
self._incoming[v][u] = e
return e
def find_root(self):
if self.size()==0:
return None
return self.idx_to_vertex(0)
def idx_to_vertex(self,idx):
# input: idx of a vertex
# return the vertex
if len(self._outgoing)==0 or idx>=len(self._incoming):
raise ValueError('vertex DNE')
for i in self._outgoing.keys():
if i.idx==idx:
return i
return None
# raise ValueError('vertex DNE')
def goal_to_vertex(self,goal):
# input: goal of a vertex
# return the vertex
if len(self._outgoing)==0:
print("GOAL: ",goal)
raise ValueError('vertex DNE')
for i in self._outgoing.keys():
if i.goal==goal:
return i
return None
# raise ValueError('vertex DNE')
def encoding_to_edge(self,rule_encoding):
# input: encoding of a edge
# return :the corresponding edge if the edge exists, none otherwise
edges = list(self.edges())
for i in range(len(edges)):
if edges[i].rule_encoding==rule_encoding:
return edges[i]
return None
def first_vertex_without_goal(self):
# return the vertex with the smallest idx that is without goal
vertices=sorted(self.vertices(), key = lambda u: u.idx)
for i in range(len(vertices)):
if vertices[i].goal==None or vertices[i].goal=="":
return vertices[i]
return None
def incoming_edge(self,v):
# find the edge that connects v to a vertex of smaller idx
incident_edges = self.incident_edges(v)
incident_edges = list(incident_edges)
curr_idx = v.idx
curr_edge = None
for i in range(len(incident_edges)):
u,v = incident_edges[i].endpoints()
if u.idx<=curr_idx and v.idx<=curr_idx:
curr_edge = incident_edges[i]
return curr_edge
return curr_edge
| class Graph:
"""Representation of a simple graph using an adjacency map."""
class Vertex:
"""Lightweight vertex structure for a graph."""
def __init__(self, idx, goal=None, proof_tree=None, proof=None):
"""Do not call constructor directly. Use Graph's insert_vertex(x)."""
self.goal = goal
self.idx = idx
self.proof_tree = proof_tree
self.proof = proof
def __hash__(self):
return hash(self.idx)
def __str__(self):
return 'VERTEX ({}, {})'.format(self.idx, self.goal)
def __repr__(self):
return 'VERTEX ({}, {})'.format(self.idx, self.goal)
def __ge__(self, v2):
if not isinstance(v2, type(self)):
raise value_error('not a vertex to compare')
return self.idx >= v2.idx
def __eq__(self, v2):
if not isinstance(v2, type(self)):
raise value_error('not a vertex to compare')
return self.idx == v2.idx and self.goal == v2.goal and (self.proof_tree == v2.proof_tree)
class Edge:
"""Lightweight edge structure for a graph."""
def __init__(self, u, v, rule_encoding=None, matching_dict=None):
"""Do not call constructor directly. Use Graph's insert_edge(u,v,x)."""
self._origin = u
self._destination = v
self.rule_encoding = rule_encoding
self.matching_dict = matching_dict
def endpoints(self):
"""Return (u,v) tuple for vertices u and v."""
return (self._origin, self._destination)
def opposite(self, v):
"""Return the vertex that is opposite v on this edge."""
if not isinstance(v, Graph.Vertex):
raise type_error('v must be a Vertex')
return self._destination if v is self._origin else self._origin
raise value_error('v not incident to edge')
def __hash__(self):
return hash((self._origin, self._destination))
def __str__(self):
return '({0},{1},{2},{3})'.format(self._origin, self._destination, self.rule_encoding, self.matching_dict)
def __repr__(self):
if self._origin.idx < self._destination.idx:
u = self._origin
v = self._destination
else:
u = self._destination
v = self._origin
return 'EDGE: ({0},{1},{2},{3})'.format(u, v, self.rule_encoding, self.matching_dict)
def __init__(self, directed=False):
"""Create an empty graph (undirected, by default).
Graph is directed if optional paramter is set to True.
"""
self._outgoing = {}
self._incoming = {} if directed else self._outgoing
def __str__(self):
def edge_key(e):
if e._origin.idx < e._destination.idx:
u = e._origin
v = e._destination
else:
u = e._destination
v = e._origin
return u.idx
edges = list(self.edges())
sorted_edges = sorted(edges, key=lambda x: edge_key(x))
result = []
for each in sorted_edges:
result.append(str(each) + '\n')
return ''.join(result)
def size(self):
return len(self.vertices())
def dfs(self, start_node):
def dfs_inner(start_node, visited):
visited.append(start_node)
adj_list = list(self._outgoing[start_node].keys())
for i in range(len(adj_list)):
has_visited = False
for j in visited:
if j == adj_list[i]:
has_visited = True
break
if not has_visited:
dfs_inner(adj_list[i], visited)
return visited
if len(self._outgoing) == 0:
return []
to_return = dfs_inner(start_node, [])
return to_return
def _validate_vertex(self, v):
"""Verify that v is a Vertex of this graph."""
if not isinstance(v, self.Vertex):
raise type_error('Vertex expected')
if v not in self._outgoing:
raise value_error('Vertex does not belong to this graph.')
def is_directed(self):
"""Return True if this is a directed graph; False if undirected.
Property is based on the original declaration of the graph, not its contents.
"""
return self._incoming is not self._outgoing
def vertex_count(self):
"""Return the number of vertices in the graph."""
return len(self._outgoing)
def vertices(self):
"""Return an iteration of all vertices of the graph."""
return self._outgoing.keys()
def edge_count(self):
"""Return the number of edges in the graph."""
total = sum((len(self._outgoing[v]) for v in self._outgoing))
return total if self.is_directed() else total // 2
def edges(self):
"""Return a set of all edges of the graph."""
result = set()
for secondary_map in self._outgoing.values():
result.update(secondary_map.values())
return result
def get_edge(self, u, v):
"""Return the edge from u to v, or None if not adjacent."""
self._validate_vertex(u)
self._validate_vertex(v)
return self._outgoing[u].get(v)
def degree(self, v, outgoing=True):
"""Return number of (outgoing) edges incident to vertex v in the graph.
If graph is directed, optional parameter used to count incoming edges.
"""
self._validate_vertex(v)
adj = self._outgoing if outgoing else self._incoming
return len(adj[v])
def incident_edges(self, v, outgoing=True):
"""Return all (outgoing) edges incident to vertex v in the graph.
If graph is directed, optional parameter used to request incoming edges.
"""
self._validate_vertex(v)
adj = self._outgoing if outgoing else self._incoming
for edge in adj[v].values():
yield edge
def insert_vertex(self, x=None):
"""Insert and return a new Vertex with element x."""
idx = len(self._outgoing)
v = self.Vertex(idx, x)
self._outgoing[v] = {}
if self.is_directed():
self._incoming[v] = {}
return v
def insert_edge(self, u, v, rule_encoding=None, matching_dict=None):
"""Insert and return a new Edge from u to v with auxiliary element x.
Raise a ValueError if u and v are not vertices of the graph.
Raise a ValueError if u and v are already adjacent.
"""
if self.get_edge(u, v) is not None:
raise value_error('u and v are already adjacent')
e = self.Edge(u, v, rule_encoding, matching_dict)
self._outgoing[u][v] = e
self._incoming[v][u] = e
return e
def find_root(self):
if self.size() == 0:
return None
return self.idx_to_vertex(0)
def idx_to_vertex(self, idx):
if len(self._outgoing) == 0 or idx >= len(self._incoming):
raise value_error('vertex DNE')
for i in self._outgoing.keys():
if i.idx == idx:
return i
return None
def goal_to_vertex(self, goal):
if len(self._outgoing) == 0:
print('GOAL: ', goal)
raise value_error('vertex DNE')
for i in self._outgoing.keys():
if i.goal == goal:
return i
return None
def encoding_to_edge(self, rule_encoding):
edges = list(self.edges())
for i in range(len(edges)):
if edges[i].rule_encoding == rule_encoding:
return edges[i]
return None
def first_vertex_without_goal(self):
vertices = sorted(self.vertices(), key=lambda u: u.idx)
for i in range(len(vertices)):
if vertices[i].goal == None or vertices[i].goal == '':
return vertices[i]
return None
def incoming_edge(self, v):
incident_edges = self.incident_edges(v)
incident_edges = list(incident_edges)
curr_idx = v.idx
curr_edge = None
for i in range(len(incident_edges)):
(u, v) = incident_edges[i].endpoints()
if u.idx <= curr_idx and v.idx <= curr_idx:
curr_edge = incident_edges[i]
return curr_edge
return curr_edge |
""".. Ignore pydocstyle D400.
===============
Resolwe Toolkit
===============
This module includes general processes, schemas, tools and docker image
definitions.
"""
| """.. Ignore pydocstyle D400.
===============
Resolwe Toolkit
===============
This module includes general processes, schemas, tools and docker image
definitions.
""" |
def get(s, register):
if s in 'abcdefghijklmnopqrstuvwxyz':
return register[s]
return int(s)
def solveQuestion(inputPath):
fileP = open(inputPath, 'r')
instVals = [line.split() for line in fileP.read().strip().split("\n")]
fileP.close()
registers = {}
registers[0] = {}
registers[1] = {}
for char in 'abcdefghijklmnopqrstuvwxyz':
registers[0][char] = 0
registers[1][char] = 0
registers[1]['p'] = 1
indexs = [0, 0]
sentData = [[], []]
state = ['ok', 'ok']
programId = 0
register = registers[programId]
index = indexs[programId]
total = 0
while True:
if instVals[index][0] == 'set':
register[instVals[index][1]] = get(instVals[index][2], register)
elif instVals[index][0] == 'add':
register[instVals[index][1]] += get(instVals[index][2], register)
elif instVals[index][0] == 'snd':
if programId == 1:
total += 1
sentData[programId].append(get(instVals[index][1], register))
elif instVals[index][0] == 'mul':
register[instVals[index][1]] *= get(instVals[index][2], register)
elif instVals[index][0] == 'mod':
register[instVals[index][1]] %= get(instVals[index][2], register)
elif instVals[index][0] == 'rcv':
if sentData[1 - programId]: # the other program has sent data
state[programId] = 'ok'
register[instVals[index][1]] = sentData[1 - programId].pop(0)
else: # Switch to other prog
if state[1 - programId] == 'done':
break
if len(sentData[programId]) == 0 and state[1 - programId] == 'r':
break
indexs[programId] = index
state[programId] = 'r'
programId = 1 - programId
index = indexs[programId] - 1
register = registers[programId]
elif instVals[index][0] == 'jgz':
if get(instVals[index][1], register) > 0:
index += get(instVals[index][2], register) - 1
index += 1
if not 0 <= index < len(instVals):
if state[1 - programId] == 'done':
break
state[programId] = 'done'
indexs[programId] = index
programId = 1 - programId
index = indexs[programId]
register = registers[programId]
return total
print(solveQuestion('InputD18Q2.txt'))
| def get(s, register):
if s in 'abcdefghijklmnopqrstuvwxyz':
return register[s]
return int(s)
def solve_question(inputPath):
file_p = open(inputPath, 'r')
inst_vals = [line.split() for line in fileP.read().strip().split('\n')]
fileP.close()
registers = {}
registers[0] = {}
registers[1] = {}
for char in 'abcdefghijklmnopqrstuvwxyz':
registers[0][char] = 0
registers[1][char] = 0
registers[1]['p'] = 1
indexs = [0, 0]
sent_data = [[], []]
state = ['ok', 'ok']
program_id = 0
register = registers[programId]
index = indexs[programId]
total = 0
while True:
if instVals[index][0] == 'set':
register[instVals[index][1]] = get(instVals[index][2], register)
elif instVals[index][0] == 'add':
register[instVals[index][1]] += get(instVals[index][2], register)
elif instVals[index][0] == 'snd':
if programId == 1:
total += 1
sentData[programId].append(get(instVals[index][1], register))
elif instVals[index][0] == 'mul':
register[instVals[index][1]] *= get(instVals[index][2], register)
elif instVals[index][0] == 'mod':
register[instVals[index][1]] %= get(instVals[index][2], register)
elif instVals[index][0] == 'rcv':
if sentData[1 - programId]:
state[programId] = 'ok'
register[instVals[index][1]] = sentData[1 - programId].pop(0)
else:
if state[1 - programId] == 'done':
break
if len(sentData[programId]) == 0 and state[1 - programId] == 'r':
break
indexs[programId] = index
state[programId] = 'r'
program_id = 1 - programId
index = indexs[programId] - 1
register = registers[programId]
elif instVals[index][0] == 'jgz':
if get(instVals[index][1], register) > 0:
index += get(instVals[index][2], register) - 1
index += 1
if not 0 <= index < len(instVals):
if state[1 - programId] == 'done':
break
state[programId] = 'done'
indexs[programId] = index
program_id = 1 - programId
index = indexs[programId]
register = registers[programId]
return total
print(solve_question('InputD18Q2.txt')) |
class ColumnWidthChangingEventArgs(CancelEventArgs):
"""
Provides data for the System.Windows.Forms.ListView.ColumnWidthChanging event.
ColumnWidthChangingEventArgs(columnIndex: int,newWidth: int,cancel: bool)
ColumnWidthChangingEventArgs(columnIndex: int,newWidth: int)
"""
@staticmethod
def __new__(self, columnIndex, newWidth, cancel=None):
"""
__new__(cls: type,columnIndex: int,newWidth: int,cancel: bool)
__new__(cls: type,columnIndex: int,newWidth: int)
"""
pass
ColumnIndex = property(
lambda self: object(), lambda self, v: None, lambda self: None
)
"""Gets the index of the column whose width is changing.
Get: ColumnIndex(self: ColumnWidthChangingEventArgs) -> int
"""
NewWidth = property(lambda self: object(), lambda self, v: None, lambda self: None)
"""Gets or sets the new width for the column.
Get: NewWidth(self: ColumnWidthChangingEventArgs) -> int
Set: NewWidth(self: ColumnWidthChangingEventArgs)=value
"""
| class Columnwidthchangingeventargs(CancelEventArgs):
"""
Provides data for the System.Windows.Forms.ListView.ColumnWidthChanging event.
ColumnWidthChangingEventArgs(columnIndex: int,newWidth: int,cancel: bool)
ColumnWidthChangingEventArgs(columnIndex: int,newWidth: int)
"""
@staticmethod
def __new__(self, columnIndex, newWidth, cancel=None):
"""
__new__(cls: type,columnIndex: int,newWidth: int,cancel: bool)
__new__(cls: type,columnIndex: int,newWidth: int)
"""
pass
column_index = property(lambda self: object(), lambda self, v: None, lambda self: None)
'Gets the index of the column whose width is changing.\n\n\n\nGet: ColumnIndex(self: ColumnWidthChangingEventArgs) -> int\n\n\n\n'
new_width = property(lambda self: object(), lambda self, v: None, lambda self: None)
'Gets or sets the new width for the column.\n\n\n\nGet: NewWidth(self: ColumnWidthChangingEventArgs) -> int\n\n\n\nSet: NewWidth(self: ColumnWidthChangingEventArgs)=value\n\n' |
# import standard modules
# import third party modules
# import third party modules
class Layer(object):
"""
Parent class for all layer classes used for a model. For this framework is does only have one attribute
which all layers share, however, it is important to keep things sorted in case of future enrichment.
"""
def __init__(self):
self.cache = None # placeholder for incoming for modified data which must be captured
| class Layer(object):
"""
Parent class for all layer classes used for a model. For this framework is does only have one attribute
which all layers share, however, it is important to keep things sorted in case of future enrichment.
"""
def __init__(self):
self.cache = None |
"""
URL lookup for common views
"""
common_urls = [
]
| """
URL lookup for common views
"""
common_urls = [] |
PRECISION = 100
class PiCalculator(object):
def __init__(self, precision):
self.precision = precision
def divide_one_by(self, b):
divider = 1
result = ""
for x in range(self.precision):
if divider // b == 0:
divider *= 10
result += "0"
else:
partial = divider // b
divider -= partial * b
divider *= 10
result += str(partial)
return "%s.%s" % (result[0], result[1:])
def add_two_strings(self, a, b):
assert len(a) == len(b)
a = a[::-1]
b = b[::-1]
result = ''
overflow = 0
for i, _ in enumerate(a):
if a[i] == '.':
result += '.'
continue
r = int(a[i]) + int(b[i]) + overflow
if r >= 10:
overflow = r // 10
r -= 10
else:
overflow = 0
result += str(r)
return result[::-1] if overflow == 0 else str(overflow) + result[::-1]
def sub_two_strings(self, a, b):
assert len(a) == len(b)
a = a[::-1]
b = b[::-1]
result = ''
overflow = 0
for i, _ in enumerate(a):
if a[i] == '.':
result += '.'
continue
r = int(a[i]) - int(b[i]) - overflow
if r < 0:
overflow = 1
r += 10
else:
overflow = 0
result += str(r)
return result[::-1]
def multiply_string_by_four(self, a):
a = a[::-1]
result = ''
overflow = 0
for i in a:
if i == '.':
result += '.'
continue
r = int(i) * 4 + overflow
if r >= 10:
overflow = r // 10
r = r - overflow * 10
else:
overflow = 0
result += str(r)
return result[::-1] if overflow == 0 else str(overflow) + result[::-1]
if __name__ == '__main__':
ITERATIONS = 10000
PRECISION = 100
pi_calculator = PiCalculator(PRECISION)
result_list = []
for a in range(1, ITERATIONS, 2):
result_list.append(pi_calculator.divide_one_by(a))
result = result_list[0]
for i, _ in enumerate(result_list, 1):
try:
if i % 2 != 0:
result = pi_calculator.sub_two_strings(result, result_list[i])
else:
result = pi_calculator.add_two_strings(result, result_list[i])
except IndexError:
pass
print(pi_calculator.multiply_string_by_four(result))
| precision = 100
class Picalculator(object):
def __init__(self, precision):
self.precision = precision
def divide_one_by(self, b):
divider = 1
result = ''
for x in range(self.precision):
if divider // b == 0:
divider *= 10
result += '0'
else:
partial = divider // b
divider -= partial * b
divider *= 10
result += str(partial)
return '%s.%s' % (result[0], result[1:])
def add_two_strings(self, a, b):
assert len(a) == len(b)
a = a[::-1]
b = b[::-1]
result = ''
overflow = 0
for (i, _) in enumerate(a):
if a[i] == '.':
result += '.'
continue
r = int(a[i]) + int(b[i]) + overflow
if r >= 10:
overflow = r // 10
r -= 10
else:
overflow = 0
result += str(r)
return result[::-1] if overflow == 0 else str(overflow) + result[::-1]
def sub_two_strings(self, a, b):
assert len(a) == len(b)
a = a[::-1]
b = b[::-1]
result = ''
overflow = 0
for (i, _) in enumerate(a):
if a[i] == '.':
result += '.'
continue
r = int(a[i]) - int(b[i]) - overflow
if r < 0:
overflow = 1
r += 10
else:
overflow = 0
result += str(r)
return result[::-1]
def multiply_string_by_four(self, a):
a = a[::-1]
result = ''
overflow = 0
for i in a:
if i == '.':
result += '.'
continue
r = int(i) * 4 + overflow
if r >= 10:
overflow = r // 10
r = r - overflow * 10
else:
overflow = 0
result += str(r)
return result[::-1] if overflow == 0 else str(overflow) + result[::-1]
if __name__ == '__main__':
iterations = 10000
precision = 100
pi_calculator = pi_calculator(PRECISION)
result_list = []
for a in range(1, ITERATIONS, 2):
result_list.append(pi_calculator.divide_one_by(a))
result = result_list[0]
for (i, _) in enumerate(result_list, 1):
try:
if i % 2 != 0:
result = pi_calculator.sub_two_strings(result, result_list[i])
else:
result = pi_calculator.add_two_strings(result, result_list[i])
except IndexError:
pass
print(pi_calculator.multiply_string_by_four(result)) |
def area(a, b):
return (a * b) / 2
print(area(6, 9))
print(area(5, 8))
| def area(a, b):
return a * b / 2
print(area(6, 9))
print(area(5, 8)) |
# returns the classification or None if no classification could be determined
def calcClass(arr):
sel0 = arr[0] > 0.0
sel1 = arr[1] > 0.0
if sel0 and sel1: # is selection valid? if not then we just ignore the result!
n = 2
maxSelVal = float("-inf")
maxSelIdx = None
for iIdx in range(n):
if arr[iIdx] > maxSelVal:
maxSelIdx = iIdx
maxSelVal = arr[iIdx]
return maxSelIdx
else:
return None # no classification was possible
| def calc_class(arr):
sel0 = arr[0] > 0.0
sel1 = arr[1] > 0.0
if sel0 and sel1:
n = 2
max_sel_val = float('-inf')
max_sel_idx = None
for i_idx in range(n):
if arr[iIdx] > maxSelVal:
max_sel_idx = iIdx
max_sel_val = arr[iIdx]
return maxSelIdx
else:
return None |
"""
Given two binary trees and imagine that when you put one of them to cover the other, some nodes of the two trees are overlapped while the others are not.
You need to merge them into a new binary tree. The merge rule is that if two nodes overlap, then sum node values up as the new value of the merged node. Otherwise, the NOT null node will be used as the node of new tree.
Example 1:
Input:
Tree 1 Tree 2
1 2
/ \ / \
3 2 1 3
/ \ \
5 4 7
Output:
Merged tree:
3
/ \
4 5
/ \ \
5 4 7
Note: The merging process must start from the root nodes of both trees.
"""
# Definition for a binary tree node.
# class TreeNode:
# def __init__(self, x):
# self.val = x
# self.left = None
# self.right = None
class TreeNode:
def __init__(self, x):
self.val = x
self.left = None
self.right = None
class Solution:
def mergeTrees(self, t1: TreeNode, t2: TreeNode) -> TreeNode:
if t1 is None and t2 is None:
return None
else:
result_root = TreeNode(0)
stack = []
if t1 is None:
result_root.val = t2.val
stack.append((None, t2.right, result_root, False))
stack.append((None, t2.left, result_root, True))
else:
if t2 is None:
result_root.val = t1.val
stack.append((t1.right, None, result_root, False))
stack.append((t1.left, None, result_root, True))
else:
result_root.val = t1.val + t2.val
stack.append((t1.right, t2.right, result_root, False))
stack.append((t1.left, t2.left, result_root, True))
while len(stack) > 0:
node_tuple = stack.pop()
t1_node = node_tuple[0]
t2_node = node_tuple[1]
result_parent = node_tuple[2]
is_left_child = node_tuple[3]
if t1_node is None and t2_node is None:
continue
else:
if t1_node is None:
result_node = TreeNode(t2_node.val)
stack.append((None, t2_node.right, result_node, False))
stack.append((None, t2_node.left, result_node, True))
else:
if t2_node is None:
result_node = TreeNode(t1_node.val)
stack.append(
(t1_node.right, None, result_node, False))
stack.append(
(t1_node.left, None, result_node, True))
else:
result_node = TreeNode(t1_node.val + t2_node.val)
stack.append(
(t1_node.right, t2_node.right, result_node, False))
stack.append(
(t1_node.left, t2_node.left, result_node, True))
if is_left_child:
result_parent.left = result_node
else:
result_parent.right = result_node
return result_root
def create_tree(values):
values_len = len(values)
if values_len == 0:
return None
root = TreeNode(values[0])
nodes = []
nodes.append(root)
i = 1
while i < values_len:
node_parent = nodes.pop(0)
left_value = values[i]
if left_value is None:
node_parent.left = None
else:
left_node = TreeNode(left_value)
node_parent.left = left_node
nodes.append(left_node)
i += 1
if i < values_len:
right_value = values[i]
right_node = TreeNode(right_value)
node_parent.right = right_node
nodes.append(right_node)
i += 1
return root
if __name__ == "__main__":
tests = [
# ([[1, 3, 2, 5], [2, 1, 3, None, 4, None, 7]]),
([[], [1]])
]
s = Solution()
for t in tests:
s.mergeTrees(create_tree(t[0]), create_tree(t[1]))
| """
Given two binary trees and imagine that when you put one of them to cover the other, some nodes of the two trees are overlapped while the others are not.
You need to merge them into a new binary tree. The merge rule is that if two nodes overlap, then sum node values up as the new value of the merged node. Otherwise, the NOT null node will be used as the node of new tree.
Example 1:
Input:
Tree 1 Tree 2
1 2
/ \\ / \\
3 2 1 3
/ \\ \\
5 4 7
Output:
Merged tree:
3
/ 4 5
/ \\ \\
5 4 7
Note: The merging process must start from the root nodes of both trees.
"""
class Treenode:
def __init__(self, x):
self.val = x
self.left = None
self.right = None
class Solution:
def merge_trees(self, t1: TreeNode, t2: TreeNode) -> TreeNode:
if t1 is None and t2 is None:
return None
else:
result_root = tree_node(0)
stack = []
if t1 is None:
result_root.val = t2.val
stack.append((None, t2.right, result_root, False))
stack.append((None, t2.left, result_root, True))
elif t2 is None:
result_root.val = t1.val
stack.append((t1.right, None, result_root, False))
stack.append((t1.left, None, result_root, True))
else:
result_root.val = t1.val + t2.val
stack.append((t1.right, t2.right, result_root, False))
stack.append((t1.left, t2.left, result_root, True))
while len(stack) > 0:
node_tuple = stack.pop()
t1_node = node_tuple[0]
t2_node = node_tuple[1]
result_parent = node_tuple[2]
is_left_child = node_tuple[3]
if t1_node is None and t2_node is None:
continue
else:
if t1_node is None:
result_node = tree_node(t2_node.val)
stack.append((None, t2_node.right, result_node, False))
stack.append((None, t2_node.left, result_node, True))
elif t2_node is None:
result_node = tree_node(t1_node.val)
stack.append((t1_node.right, None, result_node, False))
stack.append((t1_node.left, None, result_node, True))
else:
result_node = tree_node(t1_node.val + t2_node.val)
stack.append((t1_node.right, t2_node.right, result_node, False))
stack.append((t1_node.left, t2_node.left, result_node, True))
if is_left_child:
result_parent.left = result_node
else:
result_parent.right = result_node
return result_root
def create_tree(values):
values_len = len(values)
if values_len == 0:
return None
root = tree_node(values[0])
nodes = []
nodes.append(root)
i = 1
while i < values_len:
node_parent = nodes.pop(0)
left_value = values[i]
if left_value is None:
node_parent.left = None
else:
left_node = tree_node(left_value)
node_parent.left = left_node
nodes.append(left_node)
i += 1
if i < values_len:
right_value = values[i]
right_node = tree_node(right_value)
node_parent.right = right_node
nodes.append(right_node)
i += 1
return root
if __name__ == '__main__':
tests = [[[], [1]]]
s = solution()
for t in tests:
s.mergeTrees(create_tree(t[0]), create_tree(t[1])) |
'''
Leetcode problem No 301 Remove Invalid Parentheses
Solution written by Xuqiang Fang on 5 July, 2018
'''
class Solution(object):
def removeInvalidParentheses(self, s):
"""
:type s: str
:rtype: List[str]
"""
l = 0; r = 0
for c in s:
if c == '(':
l += 1
if l == 0:
if c == ')':
r += 1
else:
if c == ')':
l -= 1
ans = []
self.dfs(s, 0, l, r, ans)
return ans
def dfs(self, s, start, l, r, ans):
if l == 0 and r == 0:
if self.isValid(s):
ans.append(s)
return
for i in range(start, len(s)):
if i != start and s[i] == s[i-1]:
continue
if s[i] == '(' or s[i] == ')':
curr = s[:i] + s[i+1:]
if r > 0:
self.dfs(curr, i, l, r-1, ans)
elif l > 0:
self.dfs(curr, i, l-1, r, ans)
def isValid(self, s):
count = 0
for c in s:
if c == '(':
count += 1
if c == ')':
count -= 1
if count < 0:
return False
return count == 0
def combination(self, l, c):#select c from l
'''
l is a list, we have to select c elements from l
'''
ans = set()
self.dfs_(ans, l, c, [])
return ans
def dfs_(self, ans, l, c, t):
if len(t) > c:
return
if len(t) == c:
ans.add(tuple(t))
return
for j in l:
if j not in t:
t.append(j)
self.dfs(ans, l, c, t)
t.remove(j)
def main():
s = Solution()
print(s.removeInvalidParentheses('()())()'))
print(s.removeInvalidParentheses('(a)())()'))
print(s.removeInvalidParentheses(')('))
print(s.removeInvalidParentheses(')()()()((((()))()('))
print(s.removeInvalidParentheses('((((()))()'))
print(len(s.removeInvalidParentheses('((((()()(fdsfas90()))((((((())))))))))(fsdafs()))()()afdsafsfs)')))
print(s.removeInvalidParentheses('((((()()(fdsfas90()))((((((())))))))))(fsdafs()))()()afdsafsfs)'))
main()
| """
Leetcode problem No 301 Remove Invalid Parentheses
Solution written by Xuqiang Fang on 5 July, 2018
"""
class Solution(object):
def remove_invalid_parentheses(self, s):
"""
:type s: str
:rtype: List[str]
"""
l = 0
r = 0
for c in s:
if c == '(':
l += 1
if l == 0:
if c == ')':
r += 1
elif c == ')':
l -= 1
ans = []
self.dfs(s, 0, l, r, ans)
return ans
def dfs(self, s, start, l, r, ans):
if l == 0 and r == 0:
if self.isValid(s):
ans.append(s)
return
for i in range(start, len(s)):
if i != start and s[i] == s[i - 1]:
continue
if s[i] == '(' or s[i] == ')':
curr = s[:i] + s[i + 1:]
if r > 0:
self.dfs(curr, i, l, r - 1, ans)
elif l > 0:
self.dfs(curr, i, l - 1, r, ans)
def is_valid(self, s):
count = 0
for c in s:
if c == '(':
count += 1
if c == ')':
count -= 1
if count < 0:
return False
return count == 0
def combination(self, l, c):
"""
l is a list, we have to select c elements from l
"""
ans = set()
self.dfs_(ans, l, c, [])
return ans
def dfs_(self, ans, l, c, t):
if len(t) > c:
return
if len(t) == c:
ans.add(tuple(t))
return
for j in l:
if j not in t:
t.append(j)
self.dfs(ans, l, c, t)
t.remove(j)
def main():
s = solution()
print(s.removeInvalidParentheses('()())()'))
print(s.removeInvalidParentheses('(a)())()'))
print(s.removeInvalidParentheses(')('))
print(s.removeInvalidParentheses(')()()()((((()))()('))
print(s.removeInvalidParentheses('((((()))()'))
print(len(s.removeInvalidParentheses('((((()()(fdsfas90()))((((((())))))))))(fsdafs()))()()afdsafsfs)')))
print(s.removeInvalidParentheses('((((()()(fdsfas90()))((((((())))))))))(fsdafs()))()()afdsafsfs)'))
main() |
# -*- coding: utf-8 -*-
"""Implementation of the ``tcell_crg_report`` step
This step collects all of the calls and information gathered for the BIH T cell CRG and generates
an Excel report for each patient.
.. note::
Status: not implemented yet
==========
Step Input
==========
The BIH T cell CRG report generator uses the following as input:
- ``somatic_variant_annotation``
- ``somatic_epitope_prediction``
- ``somatic_variant_checking``
- ``somatic_ngs_sanity_checks``
===========
Step Output
===========
.. note:: TODO
=====================
Default Configuration
=====================
The default configuration is as follows.
.. include:: DEFAULT_CONFIG_tcell_crg_report.rst
=============================
Available Gene Fusion Callers
=============================
- ``cnvkit``
"""
__author__ = "Manuel Holtgrewe <manuel.holtgrewe@bihealth.de>"
#: Default configuration for the tcell_crg_report step
DEFAULT_CONFIG = r"""
# Default configuration tcell_crg_report
step_config:
tcell_crg_report:
path_somatic_variant_annotation: ../somatic_variant_annotation # REQUIRED
"""
| """Implementation of the ``tcell_crg_report`` step
This step collects all of the calls and information gathered for the BIH T cell CRG and generates
an Excel report for each patient.
.. note::
Status: not implemented yet
==========
Step Input
==========
The BIH T cell CRG report generator uses the following as input:
- ``somatic_variant_annotation``
- ``somatic_epitope_prediction``
- ``somatic_variant_checking``
- ``somatic_ngs_sanity_checks``
===========
Step Output
===========
.. note:: TODO
=====================
Default Configuration
=====================
The default configuration is as follows.
.. include:: DEFAULT_CONFIG_tcell_crg_report.rst
=============================
Available Gene Fusion Callers
=============================
- ``cnvkit``
"""
__author__ = 'Manuel Holtgrewe <manuel.holtgrewe@bihealth.de>'
default_config = '\n# Default configuration tcell_crg_report\nstep_config:\n tcell_crg_report:\n path_somatic_variant_annotation: ../somatic_variant_annotation # REQUIRED\n' |
def MAD(data : np.array):
"""
returns the median absolute deviation of a distribution
useful for non-normal distributions, etc.
"""
return np.median(abs(data - np.median(data)))
| def mad(data: np.array):
"""
returns the median absolute deviation of a distribution
useful for non-normal distributions, etc.
"""
return np.median(abs(data - np.median(data))) |
class Solution:
def search(self, arr, target) -> int:
"""O(logn) time | O(1) space"""
l, h = 0, len(arr)-1
while l <= h:
mid = (l+h)//2
if arr[mid] == target:
return mid
elif target < arr[mid]:
if arr[l] <= target or arr[l] > arr[mid]:
h = mid - 1
else:
l = mid + 1
else:
if arr[h] >= target or arr[h] < arr[mid]:
l = mid + 1
else:
h = mid - 1
return -1
| class Solution:
def search(self, arr, target) -> int:
"""O(logn) time | O(1) space"""
(l, h) = (0, len(arr) - 1)
while l <= h:
mid = (l + h) // 2
if arr[mid] == target:
return mid
elif target < arr[mid]:
if arr[l] <= target or arr[l] > arr[mid]:
h = mid - 1
else:
l = mid + 1
elif arr[h] >= target or arr[h] < arr[mid]:
l = mid + 1
else:
h = mid - 1
return -1 |
__doc__ = """Just a sketch for now.
"""
__author__ = "Rui Campos"
class Element(dict):
def __init__(self, Z):
self.__dict__[Z] = 1
self.Z = Z
def __mul__(self, other):
#usual checks
if not (isinstance(other, float) or isinstance(other, int)):
return NotImplemented
self.__dict__[Z] *= other
def __add__(self, other):
if isinstance(other, float) or isinstance(other, int):
return NotImplemented
return Molecule()
| __doc__ = 'Just a sketch for now.\n'
__author__ = 'Rui Campos'
class Element(dict):
def __init__(self, Z):
self.__dict__[Z] = 1
self.Z = Z
def __mul__(self, other):
if not (isinstance(other, float) or isinstance(other, int)):
return NotImplemented
self.__dict__[Z] *= other
def __add__(self, other):
if isinstance(other, float) or isinstance(other, int):
return NotImplemented
return molecule() |
"""
utils.py
Copyright 2011 Andres Riancho
This file is part of w3af, http://w3af.org/ .
w3af is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation version 2 of the License.
w3af is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with w3af; if not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
"""
def is_black_image(img_inst):
""":return: True if the image is completely black"""
img_width, img_height = img_inst.size
for x in xrange(img_width):
for y in xrange(img_height):
# 0 means black color
if img_inst.getpixel((x, y)) != 0:
return False
return True
| """
utils.py
Copyright 2011 Andres Riancho
This file is part of w3af, http://w3af.org/ .
w3af is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation version 2 of the License.
w3af is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with w3af; if not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
"""
def is_black_image(img_inst):
""":return: True if the image is completely black"""
(img_width, img_height) = img_inst.size
for x in xrange(img_width):
for y in xrange(img_height):
if img_inst.getpixel((x, y)) != 0:
return False
return True |
_base_ = './faster_rcnn_obb_r50_fpn_1x_dota2.0.py'
# fp16 settings
fp16 = dict(loss_scale=512.)
| _base_ = './faster_rcnn_obb_r50_fpn_1x_dota2.0.py'
fp16 = dict(loss_scale=512.0) |
class Digraph:
def __init__(self, v):
self.v = v
self.e = 0
self.adj = [[] for _ in range(v)]
def init_from(self, file_name):
with open(file_name) as f:
self.v = int(f.readline())
self.e = int(f.readline())
self.adj = [[] for _ in range(self.v)]
for i in range(self.e):
v1, v2 = f.readline().split()
self.add_edge(int(v1), int(v2))
self.e -= 1
def add_edge(self, v, w):
self.adj[v].append(w)
self.e += 1
def get_adj(self, v):
for adj in self.adj[v]:
yield adj
def get_v(self):
return self.v
def get_e(self):
return self.e
def __str__(self):
builder = f'Vertices: {self.get_v()} Edges: {self.get_e()}'
for i in range(self.v):
builder += f'\n{i}: '
for adj in self.adj[i]:
builder += f' {adj}'
return builder
def test_digraph():
digraph = Digraph(0)
digraph.init_from('digraph.txt')
print(digraph)
if __name__ == '__main__':
test_digraph()
| class Digraph:
def __init__(self, v):
self.v = v
self.e = 0
self.adj = [[] for _ in range(v)]
def init_from(self, file_name):
with open(file_name) as f:
self.v = int(f.readline())
self.e = int(f.readline())
self.adj = [[] for _ in range(self.v)]
for i in range(self.e):
(v1, v2) = f.readline().split()
self.add_edge(int(v1), int(v2))
self.e -= 1
def add_edge(self, v, w):
self.adj[v].append(w)
self.e += 1
def get_adj(self, v):
for adj in self.adj[v]:
yield adj
def get_v(self):
return self.v
def get_e(self):
return self.e
def __str__(self):
builder = f'Vertices: {self.get_v()} Edges: {self.get_e()}'
for i in range(self.v):
builder += f'\n{i}: '
for adj in self.adj[i]:
builder += f' {adj}'
return builder
def test_digraph():
digraph = digraph(0)
digraph.init_from('digraph.txt')
print(digraph)
if __name__ == '__main__':
test_digraph() |
# -*- coding: utf-8 -*-
try:
print('enter a number')
num = int (input())
print('enter a denom')
denom = int (input())
print(str(num/denom))
#you can raise the exceptions as follows
#raise ZeroDivisionError
except ZeroDivisionError:
#except IOError:
print('Cannot divide by zero')
print('enter a number')
num = int (input())
print('enter a denom')
denom = int (input())
print(str(num/denom))
try:
print('enter a file name')
name = input()
file = open(name, 'w')
display(file)
except IOError:
print('Error with file')
print('enter a file name')
name = input()
file = open(name, 'w')
display(file)
finally:
file.close()
| try:
print('enter a number')
num = int(input())
print('enter a denom')
denom = int(input())
print(str(num / denom))
except ZeroDivisionError:
print('Cannot divide by zero')
print('enter a number')
num = int(input())
print('enter a denom')
denom = int(input())
print(str(num / denom))
try:
print('enter a file name')
name = input()
file = open(name, 'w')
display(file)
except IOError:
print('Error with file')
print('enter a file name')
name = input()
file = open(name, 'w')
display(file)
finally:
file.close() |
class Journal:
def __init__(self, article_title, journal_title, year_published, page_start,
page_end, volume, issue, doi_or_website):
self.article_title = article_title
self.journal_title = journal_title
self.year_published = year_published
self.page_start = page_start
self.page_end = page_end
self.volume = volume
self.issue = issue
self.doi = doi_or_website
self.pages = f"{page_start}-{page_end}." if page_start != '' and page_end != '' else ''
self.volume_issue = ''
if volume != '' and issue != '':
self.volume_issue = f"{volume}({issue}),"
elif volume != "" and issue == '':
self.volume_issue = f"{volume},"
else:
self.volume_issue = ''
self.doi_or_website = doi_or_website if doi_or_website != '' else ''
# Last, F. M., Jr. (year). Article Title. Journal Title, Volume(Issue), series, P-Start-P-End.
# doi:DOI_OR_WEBSITE
def get_journal_entry(self):
journal = "({}). {}. {},{} {} {}".format(self.year_published, self.article_title, self.journal_title,
self.volume_issue, self.pages, self.doi_or_website)
if journal[-1] == ',':
journal = journal[0:-1] + '.'
return journal
| class Journal:
def __init__(self, article_title, journal_title, year_published, page_start, page_end, volume, issue, doi_or_website):
self.article_title = article_title
self.journal_title = journal_title
self.year_published = year_published
self.page_start = page_start
self.page_end = page_end
self.volume = volume
self.issue = issue
self.doi = doi_or_website
self.pages = f'{page_start}-{page_end}.' if page_start != '' and page_end != '' else ''
self.volume_issue = ''
if volume != '' and issue != '':
self.volume_issue = f'{volume}({issue}),'
elif volume != '' and issue == '':
self.volume_issue = f'{volume},'
else:
self.volume_issue = ''
self.doi_or_website = doi_or_website if doi_or_website != '' else ''
def get_journal_entry(self):
journal = '({}). {}. {},{} {} {}'.format(self.year_published, self.article_title, self.journal_title, self.volume_issue, self.pages, self.doi_or_website)
if journal[-1] == ',':
journal = journal[0:-1] + '.'
return journal |
#!/usr/bin/env python3
"""
Pythonic implementation of Adverse Outcome Pathways
"""
class AdverseOutcomePathway(object):
"""Adverse Outcome Pathway---A framework for conceptualizing how
toxic exposures result in downstream adverse phenotypic effects,
especially in humans.
AOPs basically constitute the "pinnacle" of toxicological
knowledge, and are therefore one of the central components to the
Comptox Ontology. Most of the algorithms and models applied to the
data seek to either discover new AOPs or validate
existing/proposed AOPs.
"""
def __init__(self, name):
"""Construct an empty AdverseOutcomePathway.
Rather than specify all of the components and their
relationships in the default constructor, we rather build an
empty AOP and construct its key event graph later.
"""
self.name = name
@classmethod
def aop_from_owl(cls, name):
new_aop = cls(name)
return new_aop
@classmethod
def aop_from_neo4j(cls, neo):
new_aop = cls(neo)
return new_aop
def generate_aop_data_report(self, graph_db):
print(
"Fetching AOP data from Neo4j database corresponding to {0}..."
).format(self.name)
def build_key_event_graph(self, mies, key_events, adverse_outcomes):
if isinstance(mies, list):
pass
| """
Pythonic implementation of Adverse Outcome Pathways
"""
class Adverseoutcomepathway(object):
"""Adverse Outcome Pathway---A framework for conceptualizing how
toxic exposures result in downstream adverse phenotypic effects,
especially in humans.
AOPs basically constitute the "pinnacle" of toxicological
knowledge, and are therefore one of the central components to the
Comptox Ontology. Most of the algorithms and models applied to the
data seek to either discover new AOPs or validate
existing/proposed AOPs.
"""
def __init__(self, name):
"""Construct an empty AdverseOutcomePathway.
Rather than specify all of the components and their
relationships in the default constructor, we rather build an
empty AOP and construct its key event graph later.
"""
self.name = name
@classmethod
def aop_from_owl(cls, name):
new_aop = cls(name)
return new_aop
@classmethod
def aop_from_neo4j(cls, neo):
new_aop = cls(neo)
return new_aop
def generate_aop_data_report(self, graph_db):
print('Fetching AOP data from Neo4j database corresponding to {0}...').format(self.name)
def build_key_event_graph(self, mies, key_events, adverse_outcomes):
if isinstance(mies, list):
pass |
vogais = ('Aprender', 'Programar', 'Linguagem', 'Python', 'Curso', 'Gratis', 'Estudar',
'Praticar', 'Trabalhar', 'Mercado', 'Programador')
for c in range(0, len(vogais)):
print(f'\nNa palavra {vogais[c].upper()} temos: ', end=' ')
for letra in vogais[c]:
if letra.lower() in 'aeiou':
print(letra.lower(), end= ' ') | vogais = ('Aprender', 'Programar', 'Linguagem', 'Python', 'Curso', 'Gratis', 'Estudar', 'Praticar', 'Trabalhar', 'Mercado', 'Programador')
for c in range(0, len(vogais)):
print(f'\nNa palavra {vogais[c].upper()} temos: ', end=' ')
for letra in vogais[c]:
if letra.lower() in 'aeiou':
print(letra.lower(), end=' ') |
#!/usr/bin/env python3
def responses(input_text):
user_message = str(input_text).lower()
if user_message in ("yes","sure","ok"):
return "Great! Let's start. First I need to know where you were born."
if user_message in ("no","naw","no thanks"):
return "That's alright, maybe another time."
return "I'm Crypto Astro Bot and I love to do Astrology Readings! Would you like one?"
| def responses(input_text):
user_message = str(input_text).lower()
if user_message in ('yes', 'sure', 'ok'):
return "Great! Let's start. First I need to know where you were born."
if user_message in ('no', 'naw', 'no thanks'):
return "That's alright, maybe another time."
return "I'm Crypto Astro Bot and I love to do Astrology Readings! Would you like one?" |
'''
Este snipet es para crear un generador que me permita contar hasta 100.
'''
# Retorna la lsita con todos los valores
def count_to():
yield [n for n in range(0,101) if n%2 ==0]
if __name__ == '__main__':
i = count_to()
print(next(i)) # Lista
print(next(i)) # Error StopIteration
| """
Este snipet es para crear un generador que me permita contar hasta 100.
"""
def count_to():
yield [n for n in range(0, 101) if n % 2 == 0]
if __name__ == '__main__':
i = count_to()
print(next(i))
print(next(i)) |
class Solution:
def twoSum(self, numbers: List[int], target: int) -> List[int]:
low = 0
high = len(numbers)-1
while low < high:
s = numbers[low] + numbers[high]
if s == target:
return [low+1, high+1]
if s > target:
high -= 1
else:
low += 1
| class Solution:
def two_sum(self, numbers: List[int], target: int) -> List[int]:
low = 0
high = len(numbers) - 1
while low < high:
s = numbers[low] + numbers[high]
if s == target:
return [low + 1, high + 1]
if s > target:
high -= 1
else:
low += 1 |
#==============================================================================
# exceptions.py
# exception handler for Exosite HTTP JSON RPC API library (man, alphabet soup)
#==============================================================================
##
## Tested with python 2.6
##
## Copyright (c) 2010, Exosite LLC
## All rights reserved.
##
# vim: tabstop=2 expandtab shiftwidth=2 softtabstop=2 smarttab
class OneException(Exception):
pass
class OnePlatformException(OneException):
pass
class JsonRPCRequestException(OneException):
pass
class JsonRPCResponseException(OneException):
pass
class JsonStringException(OneException):
pass
class ProvisionException(OneException):
def __init__(self, provision_response):
self.response = provision_response
def __str__(self):
return self.__repr__()
def __repr__(self):
return "{0} {1}".format(self.response.status(), self.response.reason())
| class Oneexception(Exception):
pass
class Oneplatformexception(OneException):
pass
class Jsonrpcrequestexception(OneException):
pass
class Jsonrpcresponseexception(OneException):
pass
class Jsonstringexception(OneException):
pass
class Provisionexception(OneException):
def __init__(self, provision_response):
self.response = provision_response
def __str__(self):
return self.__repr__()
def __repr__(self):
return '{0} {1}'.format(self.response.status(), self.response.reason()) |
num1 = int(input('Enter First number: '))
num2 = int(input('Enter Second number '))
add = num1 + num2
dif = num1 - num2
mul = num1 * num2
div = num1 / num2
floor_div = num1 // num2
power = num1 ** num2
modulus = num1 % num2
print('Sum of ',num1 ,'and' ,num2 ,'is :',add)
print('Difference of ',num1 ,'and' ,num2 ,'is :',dif)
print('Product of' ,num1 ,'and' ,num2 ,'is :',mul)
print('Division of ',num1 ,'and' ,num2 ,'is :',div)
print('Floor Division of ',num1 ,'and' ,num2 ,'is :',floor_div)
print('Exponent of ',num1 ,'and' ,num2 ,'is :',power)
print('Modulus of ',num1 ,'and' ,num2 ,'is :',modulus) | num1 = int(input('Enter First number: '))
num2 = int(input('Enter Second number '))
add = num1 + num2
dif = num1 - num2
mul = num1 * num2
div = num1 / num2
floor_div = num1 // num2
power = num1 ** num2
modulus = num1 % num2
print('Sum of ', num1, 'and', num2, 'is :', add)
print('Difference of ', num1, 'and', num2, 'is :', dif)
print('Product of', num1, 'and', num2, 'is :', mul)
print('Division of ', num1, 'and', num2, 'is :', div)
print('Floor Division of ', num1, 'and', num2, 'is :', floor_div)
print('Exponent of ', num1, 'and', num2, 'is :', power)
print('Modulus of ', num1, 'and', num2, 'is :', modulus) |
#!/usr/bin/env python3
c = 100
k = int(input())
i = 0
while c<k:
c = int(c*1.01)
i += 1
print(i) | c = 100
k = int(input())
i = 0
while c < k:
c = int(c * 1.01)
i += 1
print(i) |
def parse(data):
kernel, img = data.split("\n\n")
i = set()
for y, r in enumerate(img.split()):
for x, c in enumerate(r):
if c == "#":
i.add((x, y))
return [c == "#" for c in kernel], i
def enhance(kernel, i, inverted):
inverting = kernel[0] and not inverted
e = set()
for x, y in i:
for ax, ay in ((x + dx, y + dy) for dy in range(-1, 2) for dx in range(-1, 2)):
m = 0
for dx, dy in (
(ax + dx, ay + dy) for dy in range(-1, 2) for dx in range(-1, 2)
):
m <<= 1
m |= ((dx, dy) in i) != inverted
if kernel[m] != inverting:
e.add((ax, ay))
return e, inverting
def aoc(data):
kernel, i = parse(data)
inverted = False
for _ in range(2):
i, inverted = enhance(kernel, i, inverted)
return len(i)
| def parse(data):
(kernel, img) = data.split('\n\n')
i = set()
for (y, r) in enumerate(img.split()):
for (x, c) in enumerate(r):
if c == '#':
i.add((x, y))
return ([c == '#' for c in kernel], i)
def enhance(kernel, i, inverted):
inverting = kernel[0] and (not inverted)
e = set()
for (x, y) in i:
for (ax, ay) in ((x + dx, y + dy) for dy in range(-1, 2) for dx in range(-1, 2)):
m = 0
for (dx, dy) in ((ax + dx, ay + dy) for dy in range(-1, 2) for dx in range(-1, 2)):
m <<= 1
m |= ((dx, dy) in i) != inverted
if kernel[m] != inverting:
e.add((ax, ay))
return (e, inverting)
def aoc(data):
(kernel, i) = parse(data)
inverted = False
for _ in range(2):
(i, inverted) = enhance(kernel, i, inverted)
return len(i) |
print(a)
print(b)
c = a + b
print(c)
| print(a)
print(b)
c = a + b
print(c) |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.