content stringlengths 7 1.05M | fixed_cases stringlengths 1 1.28M |
|---|---|
def find_largest_palindrome(range_start: int, range_end: int) -> int:
largest: int = 0
product: int
i: int
for i in range(range_start, range_end):
j: int
for j in range(range_start, range_end):
product = i * j
if is_palindrome(str(product)) and product > largest:
largest = product
return largest
def is_palindrome(input_string: str) -> bool:
input_length: int = len(input_string)
direct: int
index: int
for index in range(0, input_length):
direct = input_length - index - 1
if direct <= index:
return True
elif input_string[direct] != input_string[index]:
return False
return False
| def find_largest_palindrome(range_start: int, range_end: int) -> int:
largest: int = 0
product: int
i: int
for i in range(range_start, range_end):
j: int
for j in range(range_start, range_end):
product = i * j
if is_palindrome(str(product)) and product > largest:
largest = product
return largest
def is_palindrome(input_string: str) -> bool:
input_length: int = len(input_string)
direct: int
index: int
for index in range(0, input_length):
direct = input_length - index - 1
if direct <= index:
return True
elif input_string[direct] != input_string[index]:
return False
return False |
# SPDX-License-Identifier: MIT
# Copyright (c) 2020 Akumatic
#
# https://adventofcode.com/2020/day/18
def read_file() -> list:
with open(f"{__file__.rstrip('code.py')}input.txt", "r") as f:
return [line.strip() for line in f.readlines()]
def evaluate(values: list, operators: list, precedence: bool) -> int:
if not precedence: # "+" and "*" have same precedence levels
result = int(values[0])
for i in range(len(operators)):
if operators[i] == "+":
result += int(values[i+1])
else: # operators[i] == "*"
result *= int(values[i+1])
else: # "+" and "*" have different precedence levels; "+" evaluated before "*"
while True:
try:
idx = operators.index("+")
values = values[:idx] + [values[idx] + values[idx+1]] + values[idx+2:]
operators = operators[:idx] + operators[idx+1:]
except ValueError:
break
result = 1
for factor in values:
result *= factor
return result
def parse(expression: str, precedence: bool = False) -> int:
expression = expression.replace(" ", "")
values = list()
operators = list()
i = 0
while i < len(expression):
if expression[i] == "+":
operators.append("+")
i += 1
elif expression[i] == "*":
operators.append("*")
i += 1
elif expression[i] == "(":
# find correct closing bracket
layer = 1
j = i + 1
while j < len(expression):
if expression[j] == "(":
layer += 1
elif expression[j] == ")":
if layer == 1:
break
layer -= 1
j += 1
# evaluate expression between brackets
values.append(parse(expression[i+1:j], precedence))
i += j - i + 1
else: # numbers
j = i
value = 0
while j < len(expression) and expression[j].isnumeric():
value = value * 10 + int(expression[j])
j += 1
values.append(value)
i += j - i
return evaluate(values, operators, precedence)
def part1(input: list) -> int:
return sum([parse(line) for line in input])
def part2(input: list) -> int:
return sum([parse(line, precedence=True) for line in input])
if __name__ == "__main__":
input = read_file()
print(f"Part 1: {part1(input)}")
print(f"Part 2: {part2(input)}") | def read_file() -> list:
with open(f"{__file__.rstrip('code.py')}input.txt", 'r') as f:
return [line.strip() for line in f.readlines()]
def evaluate(values: list, operators: list, precedence: bool) -> int:
if not precedence:
result = int(values[0])
for i in range(len(operators)):
if operators[i] == '+':
result += int(values[i + 1])
else:
result *= int(values[i + 1])
else:
while True:
try:
idx = operators.index('+')
values = values[:idx] + [values[idx] + values[idx + 1]] + values[idx + 2:]
operators = operators[:idx] + operators[idx + 1:]
except ValueError:
break
result = 1
for factor in values:
result *= factor
return result
def parse(expression: str, precedence: bool=False) -> int:
expression = expression.replace(' ', '')
values = list()
operators = list()
i = 0
while i < len(expression):
if expression[i] == '+':
operators.append('+')
i += 1
elif expression[i] == '*':
operators.append('*')
i += 1
elif expression[i] == '(':
layer = 1
j = i + 1
while j < len(expression):
if expression[j] == '(':
layer += 1
elif expression[j] == ')':
if layer == 1:
break
layer -= 1
j += 1
values.append(parse(expression[i + 1:j], precedence))
i += j - i + 1
else:
j = i
value = 0
while j < len(expression) and expression[j].isnumeric():
value = value * 10 + int(expression[j])
j += 1
values.append(value)
i += j - i
return evaluate(values, operators, precedence)
def part1(input: list) -> int:
return sum([parse(line) for line in input])
def part2(input: list) -> int:
return sum([parse(line, precedence=True) for line in input])
if __name__ == '__main__':
input = read_file()
print(f'Part 1: {part1(input)}')
print(f'Part 2: {part2(input)}') |
class AuthenticationError(Exception):
pass
class MarketClosedError(Exception):
pass
class MarketEmptyError(Exception):
pass
class InternalStateBotError(Exception):
pass
| class Authenticationerror(Exception):
pass
class Marketclosederror(Exception):
pass
class Marketemptyerror(Exception):
pass
class Internalstateboterror(Exception):
pass |
class Database:
def __init__(self):
self.stuff = {}
def cleanup(self):
self.stuff = {}
def save(self, id, timestamp, count):
self.stuff[id] = {
'timestamp': timestamp,
'count': count
}
def find_all(self, id):
return [self.stuff[id]]
def count(self):
return len(self.stuff)
| class Database:
def __init__(self):
self.stuff = {}
def cleanup(self):
self.stuff = {}
def save(self, id, timestamp, count):
self.stuff[id] = {'timestamp': timestamp, 'count': count}
def find_all(self, id):
return [self.stuff[id]]
def count(self):
return len(self.stuff) |
def assemble_message(message: str, error: bool = False) -> str:
print("Assembling Message")
if error:
message = "-ERR {0}".format(message)
else:
message = "+OK {0}".format(message)
return message
| def assemble_message(message: str, error: bool=False) -> str:
print('Assembling Message')
if error:
message = '-ERR {0}'.format(message)
else:
message = '+OK {0}'.format(message)
return message |
def longest_special_subseq(_n, dist, chars):
chars = tuple(ord(char) - ord("a") for char in chars)
print(chars)
lengths = [0] * 26
# print(lengths)
for char in chars:
c_from = max(char - dist, 0)
c_to = min(char + dist, 25)
longest = max(lengths[c_from: c_to+1])
print(longest)
lengths[char] = longest + 1
return max(lengths)
t = int(input())
for tc in range(t):
n, k, s = input().split()
n = int(n)
k = int(k)
print(longest_special_subseq(n, k, s))
| def longest_special_subseq(_n, dist, chars):
chars = tuple((ord(char) - ord('a') for char in chars))
print(chars)
lengths = [0] * 26
for char in chars:
c_from = max(char - dist, 0)
c_to = min(char + dist, 25)
longest = max(lengths[c_from:c_to + 1])
print(longest)
lengths[char] = longest + 1
return max(lengths)
t = int(input())
for tc in range(t):
(n, k, s) = input().split()
n = int(n)
k = int(k)
print(longest_special_subseq(n, k, s)) |
numero = int(input('Digite um numero para ver sua tabuada: '))
print('---------------')
print('{} x 1 = {}'.format(numero, numero * 1))
print('{} x 2 = {}'.format(numero, numero * 2))
print('{} x 3 = {}'.format(numero, numero * 3))
print('{} x 4 = {}'.format(numero, numero * 4))
print('{} x 5 = {}'.format(numero, numero * 5))
print('{} x 6 = {}'.format(numero, numero * 6))
print('{} x 7 = {}'.format(numero, numero * 7))
print('{} x 8 = {}'.format(numero, numero * 8))
print('{} x 9 = {}'.format(numero, numero * 9))
print('{} x 10 = {}'.format(numero, numero * 10))
print('---------------') | numero = int(input('Digite um numero para ver sua tabuada: '))
print('---------------')
print('{} x 1 = {}'.format(numero, numero * 1))
print('{} x 2 = {}'.format(numero, numero * 2))
print('{} x 3 = {}'.format(numero, numero * 3))
print('{} x 4 = {}'.format(numero, numero * 4))
print('{} x 5 = {}'.format(numero, numero * 5))
print('{} x 6 = {}'.format(numero, numero * 6))
print('{} x 7 = {}'.format(numero, numero * 7))
print('{} x 8 = {}'.format(numero, numero * 8))
print('{} x 9 = {}'.format(numero, numero * 9))
print('{} x 10 = {}'.format(numero, numero * 10))
print('---------------') |
'''
We want to make a row of bricks that is goal inches long. We have a number of
small bricks (1 inch each) and big bricks (5 inches each). Return True if it
is possible to make the goal by choosing from the given bricks. This is a
little harder than it looks and can be done without any loops.
'''
def make_bricks(small, big, goal):
if small + 5*big < goal:
return False
if small >= goal % 5:
return True
return False
| """
We want to make a row of bricks that is goal inches long. We have a number of
small bricks (1 inch each) and big bricks (5 inches each). Return True if it
is possible to make the goal by choosing from the given bricks. This is a
little harder than it looks and can be done without any loops.
"""
def make_bricks(small, big, goal):
if small + 5 * big < goal:
return False
if small >= goal % 5:
return True
return False |
def validacao_de_nota():
notas_validas = soma = 0
while True:
if notas_validas == 2:
break
nota = float(input())
if 0 <= nota <= 10:
soma += nota
notas_validas += 1
else:
print('nota invalida')
media = soma / 2
print(f'media = {media:.2f}')
validacao_de_nota()
| def validacao_de_nota():
notas_validas = soma = 0
while True:
if notas_validas == 2:
break
nota = float(input())
if 0 <= nota <= 10:
soma += nota
notas_validas += 1
else:
print('nota invalida')
media = soma / 2
print(f'media = {media:.2f}')
validacao_de_nota() |
# -*- coding: utf-8 -*-
def main(names):
def get_format(is_angy):
return "{0}.My name is {1}" if is_angy else "{0}.{1} is my classmate"
for i, n in enumerate(names):
print(get_format(n == "Angy").format(i, n))
if __name__ == "__main__":
names = ("Bill", "Anne", "Angy", "Cony", "Daniel", "Occhan")
main(names)
| def main(names):
def get_format(is_angy):
return '{0}.My name is {1}' if is_angy else '{0}.{1} is my classmate'
for (i, n) in enumerate(names):
print(get_format(n == 'Angy').format(i, n))
if __name__ == '__main__':
names = ('Bill', 'Anne', 'Angy', 'Cony', 'Daniel', 'Occhan')
main(names) |
# # 6. write a function that takes an integer n and prints a square of n*n #
def quadrat(n):
sq=n*n
print(sq)
return sq
quadrat(10) | def quadrat(n):
sq = n * n
print(sq)
return sq
quadrat(10) |
'''test for having the file checked .
if we request the channels from the file and there are no channels
and when you call the channels from file .. you specify which file to call from .(which list)
if the stream is already there then you dont want it to add the stream
and notify the user that it already exists.
''' | """test for having the file checked .
if we request the channels from the file and there are no channels
and when you call the channels from file .. you specify which file to call from .(which list)
if the stream is already there then you dont want it to add the stream
and notify the user that it already exists.
""" |
with open("day2.txt", "rt") as file:
data = file.readlines()
valid = 0
valid2 = 0
for entry in data:
parts = entry.split(' ')
limits = parts[0].split('-')
letter = parts[1].split(':')[0]
password = parts[2]
count = 0
for ch in password:
if ch == letter:
count += 1
if (count >= int(limits[0]) and count <= int(limits[1])):
valid += 1
if (password[int(limits[0])-1] == letter or password[int(limits[1])-1] == letter):
if (not password[int(limits[0])-1] == password[int(limits[1])-1]):
valid2 += 1
print(valid, valid2)
| with open('day2.txt', 'rt') as file:
data = file.readlines()
valid = 0
valid2 = 0
for entry in data:
parts = entry.split(' ')
limits = parts[0].split('-')
letter = parts[1].split(':')[0]
password = parts[2]
count = 0
for ch in password:
if ch == letter:
count += 1
if count >= int(limits[0]) and count <= int(limits[1]):
valid += 1
if password[int(limits[0]) - 1] == letter or password[int(limits[1]) - 1] == letter:
if not password[int(limits[0]) - 1] == password[int(limits[1]) - 1]:
valid2 += 1
print(valid, valid2) |
TRAINING_FILE_ORIG = '../input/adult.csv'
TRAINING_FILE = '../input/adult_folds.csv'
| training_file_orig = '../input/adult.csv'
training_file = '../input/adult_folds.csv' |
open_brackets = ["[","{","("]
close_brackets = ["]","}",")"]
def validate_brackets(string):
stack = []
for i in string:
if i in open_brackets:
stack.append(i)
elif i in close_brackets:
pos = close_brackets.index(i)
if ((len(stack) > 0) and
(open_brackets[pos] == stack[len(stack)-1])):
stack.pop()
else:
return "invalid"
if len(stack) == 0:
return "valid"
else:
return "invalid"
| open_brackets = ['[', '{', '(']
close_brackets = [']', '}', ')']
def validate_brackets(string):
stack = []
for i in string:
if i in open_brackets:
stack.append(i)
elif i in close_brackets:
pos = close_brackets.index(i)
if len(stack) > 0 and open_brackets[pos] == stack[len(stack) - 1]:
stack.pop()
else:
return 'invalid'
if len(stack) == 0:
return 'valid'
else:
return 'invalid' |
def my_name(name):
# import ipdb;ipdb.set_trace()
return f"My name is: {name}"
if __name__ == "__main__":
my_name("bob")
| def my_name(name):
return f'My name is: {name}'
if __name__ == '__main__':
my_name('bob') |
'''
Created on 25 apr 2019
@author: Matteo
'''
CD_RETURN_IMMEDIATELY = 1
CD_ADD_AND_CONTINUE_WAITING = 2
CD_CONTINUE_WAITING = 0
CD_ABORT_AND_RETRY = 3
| """
Created on 25 apr 2019
@author: Matteo
"""
cd_return_immediately = 1
cd_add_and_continue_waiting = 2
cd_continue_waiting = 0
cd_abort_and_retry = 3 |
load("@fbcode_macros//build_defs/lib:cpp_common.bzl", "cpp_common")
load("@fbcode_macros//build_defs/lib:src_and_dep_helpers.bzl", "src_and_dep_helpers")
load("@fbcode_macros//build_defs/lib:string_macros.bzl", "string_macros")
load("@fbcode_macros//build_defs/lib:target_utils.bzl", "target_utils")
load("@fbcode_macros//build_defs/lib:visibility.bzl", "get_visibility")
load("@fbcode_macros//build_defs:platform_utils.bzl", "platform_utils")
# save original native module before it's shadowed by the attribute
_native = native
def _convert_ocaml(
name,
rule_type,
srcs = (),
deps = (),
compiler_flags = None,
ocamldep_flags = None,
native = True,
warnings_flags = None,
supports_coverage = None,
external_deps = (),
visibility = None,
ppx_flag = None,
nodefaultlibs = False):
_ignore = supports_coverage
base_path = _native.package_name()
is_binary = rule_type == "ocaml_binary"
# Translate visibility
visibility = get_visibility(visibility, name)
platform = platform_utils.get_platform_for_base_path(base_path)
attributes = {}
attributes["name"] = name
attributes["srcs"] = src_and_dep_helpers.convert_source_list(base_path, srcs)
attributes["visibility"] = visibility
if warnings_flags:
attributes["warnings_flags"] = warnings_flags
attributes["compiler_flags"] = ["-warn-error", "+a", "-safe-string"]
if compiler_flags:
attributes["compiler_flags"].extend(
string_macros.convert_args_with_macros(
compiler_flags,
platform = platform,
),
)
attributes["ocamldep_flags"] = []
if ocamldep_flags:
attributes["ocamldep_flags"].extend(ocamldep_flags)
if ppx_flag != None:
attributes["compiler_flags"].extend(["-ppx", ppx_flag])
attributes["ocamldep_flags"].extend(["-ppx", ppx_flag])
if not native:
attributes["bytecode_only"] = True
if rule_type == "ocaml_binary":
attributes["platform"] = platform_utils.get_buck_platform_for_base_path(base_path)
dependencies = []
# Add the C/C++ build info lib to deps.
if rule_type == "ocaml_binary":
cxx_build_info = cpp_common.cxx_build_info_rule(
base_path,
name,
rule_type,
platform,
visibility = visibility,
)
dependencies.append(cxx_build_info)
# Translate dependencies.
for dep in deps:
dependencies.append(target_utils.parse_target(dep, default_base_path = base_path))
# Translate external dependencies.
for dep in external_deps:
dependencies.append(src_and_dep_helpers.normalize_external_dep(dep))
# Add in binary-specific link deps.
if is_binary:
dependencies.extend(
cpp_common.get_binary_link_deps(
base_path,
name,
default_deps = not nodefaultlibs,
),
)
# If any deps were specified, add them to the output attrs.
if dependencies:
attributes["deps"], attributes["platform_deps"] = (
src_and_dep_helpers.format_all_deps(dependencies)
)
platform = platform_utils.get_platform_for_base_path(base_path)
ldflags = cpp_common.get_ldflags(
base_path,
name,
rule_type,
binary = is_binary,
platform = platform if is_binary else None,
)
if nodefaultlibs:
ldflags.append("-nodefaultlibs")
if "-flto" in ldflags:
attributes["compiler_flags"].extend(["-ccopt", "-flto", "-cclib", "-flto"])
if "-flto=thin" in ldflags:
attributes["compiler_flags"].extend(["-ccopt", "-flto=thin", "-cclib", "-flto=thin"])
return attributes
ocaml_common = struct(
convert_ocaml = _convert_ocaml,
)
| load('@fbcode_macros//build_defs/lib:cpp_common.bzl', 'cpp_common')
load('@fbcode_macros//build_defs/lib:src_and_dep_helpers.bzl', 'src_and_dep_helpers')
load('@fbcode_macros//build_defs/lib:string_macros.bzl', 'string_macros')
load('@fbcode_macros//build_defs/lib:target_utils.bzl', 'target_utils')
load('@fbcode_macros//build_defs/lib:visibility.bzl', 'get_visibility')
load('@fbcode_macros//build_defs:platform_utils.bzl', 'platform_utils')
_native = native
def _convert_ocaml(name, rule_type, srcs=(), deps=(), compiler_flags=None, ocamldep_flags=None, native=True, warnings_flags=None, supports_coverage=None, external_deps=(), visibility=None, ppx_flag=None, nodefaultlibs=False):
_ignore = supports_coverage
base_path = _native.package_name()
is_binary = rule_type == 'ocaml_binary'
visibility = get_visibility(visibility, name)
platform = platform_utils.get_platform_for_base_path(base_path)
attributes = {}
attributes['name'] = name
attributes['srcs'] = src_and_dep_helpers.convert_source_list(base_path, srcs)
attributes['visibility'] = visibility
if warnings_flags:
attributes['warnings_flags'] = warnings_flags
attributes['compiler_flags'] = ['-warn-error', '+a', '-safe-string']
if compiler_flags:
attributes['compiler_flags'].extend(string_macros.convert_args_with_macros(compiler_flags, platform=platform))
attributes['ocamldep_flags'] = []
if ocamldep_flags:
attributes['ocamldep_flags'].extend(ocamldep_flags)
if ppx_flag != None:
attributes['compiler_flags'].extend(['-ppx', ppx_flag])
attributes['ocamldep_flags'].extend(['-ppx', ppx_flag])
if not native:
attributes['bytecode_only'] = True
if rule_type == 'ocaml_binary':
attributes['platform'] = platform_utils.get_buck_platform_for_base_path(base_path)
dependencies = []
if rule_type == 'ocaml_binary':
cxx_build_info = cpp_common.cxx_build_info_rule(base_path, name, rule_type, platform, visibility=visibility)
dependencies.append(cxx_build_info)
for dep in deps:
dependencies.append(target_utils.parse_target(dep, default_base_path=base_path))
for dep in external_deps:
dependencies.append(src_and_dep_helpers.normalize_external_dep(dep))
if is_binary:
dependencies.extend(cpp_common.get_binary_link_deps(base_path, name, default_deps=not nodefaultlibs))
if dependencies:
(attributes['deps'], attributes['platform_deps']) = src_and_dep_helpers.format_all_deps(dependencies)
platform = platform_utils.get_platform_for_base_path(base_path)
ldflags = cpp_common.get_ldflags(base_path, name, rule_type, binary=is_binary, platform=platform if is_binary else None)
if nodefaultlibs:
ldflags.append('-nodefaultlibs')
if '-flto' in ldflags:
attributes['compiler_flags'].extend(['-ccopt', '-flto', '-cclib', '-flto'])
if '-flto=thin' in ldflags:
attributes['compiler_flags'].extend(['-ccopt', '-flto=thin', '-cclib', '-flto=thin'])
return attributes
ocaml_common = struct(convert_ocaml=_convert_ocaml) |
r'''
.. _snippets-cli-tagging:
Command Line Interface: Tagging
===============================
This is the tested source code for the snippets used in :ref:`cli-tagging`. The
config file we're using in this example can be downloaded
:download:`here <../../examples/snippets/resources/datafs_mongo.yml>`.
Example 1
---------
Displayed example 1 code:
.. EXAMPLE-BLOCK-1-START
.. code-block:: bash
$ datafs create archive1 --tag "foo" --tag "bar" --description \
> "tag test 1 has bar"
created versioned archive <DataArchive local://archive1>
$ datafs create archive2 --tag "foo" --tag "baz" --description \
> "tag test 2 has baz"
created versioned archive <DataArchive local://archive2>
.. EXAMPLE-BLOCK-1-END
Example 2
---------
.. EXAMPLE-BLOCK-2-START
.. code-block:: bash
$ datafs search bar
archive1
$ datafs search baz
archive2
$ datafs search foo # doctest: +SKIP
archive1
archive2
.. EXAMPLE-BLOCK-2-END
Example 3
---------
.. EXAMPLE-BLOCK-3-START
.. code-block:: bash
$ datafs create archive3 --tag "foo" --tag "bar" --tag "baz" \
> --description 'tag test 3 has all the tags!'
created versioned archive <DataArchive local://archive3>
$ datafs search bar foo # doctest: +SKIP
archive1
archive3
$ datafs search bar foo baz
archive3
.. EXAMPLE-BLOCK-3-END
Example 4
---------
.. EXAMPLE-BLOCK-4-START
.. code-block:: bash
$ datafs search qux
$ datafs search foo qux
.. EXAMPLE-BLOCK-4-END
Example 5
---------
.. EXAMPLE-BLOCK-5-START
.. code-block:: bash
$ datafs get_tags archive1
foo bar
.. EXAMPLE-BLOCK-5-END
Example 6
---------
.. EXAMPLE-BLOCK-6-START
.. code-block:: bash
$ datafs add_tags archive1 qux
$ datafs search foo qux
archive1
.. EXAMPLE-BLOCK-6-END
Example 7
---------
.. EXAMPLE-BLOCK-7-START
.. code-block:: bash
$ datafs delete_tags archive1 foo bar
$ datafs search foo bar
archive3
.. EXAMPLE-BLOCK-7-END
Teardown
--------
.. code-block:: bash
$ datafs delete archive1
deleted archive <DataArchive local://archive1>
$ datafs delete archive2
deleted archive <DataArchive local://archive2>
$ datafs delete archive3
deleted archive <DataArchive local://archive3>
'''
| """
.. _snippets-cli-tagging:
Command Line Interface: Tagging
===============================
This is the tested source code for the snippets used in :ref:`cli-tagging`. The
config file we're using in this example can be downloaded
:download:`here <../../examples/snippets/resources/datafs_mongo.yml>`.
Example 1
---------
Displayed example 1 code:
.. EXAMPLE-BLOCK-1-START
.. code-block:: bash
$ datafs create archive1 --tag "foo" --tag "bar" --description \\
> "tag test 1 has bar"
created versioned archive <DataArchive local://archive1>
$ datafs create archive2 --tag "foo" --tag "baz" --description \\
> "tag test 2 has baz"
created versioned archive <DataArchive local://archive2>
.. EXAMPLE-BLOCK-1-END
Example 2
---------
.. EXAMPLE-BLOCK-2-START
.. code-block:: bash
$ datafs search bar
archive1
$ datafs search baz
archive2
$ datafs search foo # doctest: +SKIP
archive1
archive2
.. EXAMPLE-BLOCK-2-END
Example 3
---------
.. EXAMPLE-BLOCK-3-START
.. code-block:: bash
$ datafs create archive3 --tag "foo" --tag "bar" --tag "baz" \\
> --description 'tag test 3 has all the tags!'
created versioned archive <DataArchive local://archive3>
$ datafs search bar foo # doctest: +SKIP
archive1
archive3
$ datafs search bar foo baz
archive3
.. EXAMPLE-BLOCK-3-END
Example 4
---------
.. EXAMPLE-BLOCK-4-START
.. code-block:: bash
$ datafs search qux
$ datafs search foo qux
.. EXAMPLE-BLOCK-4-END
Example 5
---------
.. EXAMPLE-BLOCK-5-START
.. code-block:: bash
$ datafs get_tags archive1
foo bar
.. EXAMPLE-BLOCK-5-END
Example 6
---------
.. EXAMPLE-BLOCK-6-START
.. code-block:: bash
$ datafs add_tags archive1 qux
$ datafs search foo qux
archive1
.. EXAMPLE-BLOCK-6-END
Example 7
---------
.. EXAMPLE-BLOCK-7-START
.. code-block:: bash
$ datafs delete_tags archive1 foo bar
$ datafs search foo bar
archive3
.. EXAMPLE-BLOCK-7-END
Teardown
--------
.. code-block:: bash
$ datafs delete archive1
deleted archive <DataArchive local://archive1>
$ datafs delete archive2
deleted archive <DataArchive local://archive2>
$ datafs delete archive3
deleted archive <DataArchive local://archive3>
""" |
class Funcionario:
def __init__(self, nome, salario):
self.nome=nome
self.salario=float(salario)
def aum_salario(self, pct):
self.salario += (self.salario*pct/100)
def get_salario(self):
return self.salario | class Funcionario:
def __init__(self, nome, salario):
self.nome = nome
self.salario = float(salario)
def aum_salario(self, pct):
self.salario += self.salario * pct / 100
def get_salario(self):
return self.salario |
class Node(object):
def __init__(self, val=None, children=None):
self.val = val
self.children = children
| class Node(object):
def __init__(self, val=None, children=None):
self.val = val
self.children = children |
num = int(input('digite um numero:'))
if num / 1 and num/ num:
print('esse numero primo')
else:
print('esse numerp nap e primo') | num = int(input('digite um numero:'))
if num / 1 and num / num:
print('esse numero primo')
else:
print('esse numerp nap e primo') |
'''
https://www.hackerrank.com/challenges/python-loops/problem
Task
====
The provided code stub reads and integer, , from STDIN. For all non-negative integers , print .
Example
=======
The list of non-negative integers that are less than is . Print the square of each number on a separate line.
0
1
4
Input Format
============
The first and only line contains the integer, .
Constraints
===========
Output Format
===========
Print lines, one corresponding to each .
Sample Input 0
5
Sample Output 0
0
1
4
9
16
'''
if __name__ == '__main__':
n = int(input())
a = [0] * n
print(a[0])
for i in range(1, n):
a[i] = a[i-1] + ((i-1) << 1) + 1
# i , 1, 2, 3
# 2(i-1)+1 0, 1, 3, 5
# a[i] 0, 1, 4, 9
print(a[i])
| """
https://www.hackerrank.com/challenges/python-loops/problem
Task
====
The provided code stub reads and integer, , from STDIN. For all non-negative integers , print .
Example
=======
The list of non-negative integers that are less than is . Print the square of each number on a separate line.
0
1
4
Input Format
============
The first and only line contains the integer, .
Constraints
===========
Output Format
===========
Print lines, one corresponding to each .
Sample Input 0
5
Sample Output 0
0
1
4
9
16
"""
if __name__ == '__main__':
n = int(input())
a = [0] * n
print(a[0])
for i in range(1, n):
a[i] = a[i - 1] + (i - 1 << 1) + 1
print(a[i]) |
'''
Created on 24.07.2019
@author: LK
'''
# TODO: Inheritance of tmcl interface
class Landungsbruecke(object):
GP_VitalSignsErrorMask = 1
GP_DriversEnable = 2
GP_DebugMode = 3
GP_BoardAssignment = 4
GP_HWID = 5
GP_PinState = 6
| """
Created on 24.07.2019
@author: LK
"""
class Landungsbruecke(object):
gp__vital_signs_error_mask = 1
gp__drivers_enable = 2
gp__debug_mode = 3
gp__board_assignment = 4
gp_hwid = 5
gp__pin_state = 6 |
def strategy(history, memory):
if history.shape[1] % 3 == 2: # CC
return 0, None # D
else:
return 1, None # C | def strategy(history, memory):
if history.shape[1] % 3 == 2:
return (0, None)
else:
return (1, None) |
class PixivException(Exception):
pass
class DownloadException(PixivException):
pass
class APIException(PixivException):
pass
class LoginPasswordError(APIException):
pass
class LoginTokenError(APIException):
pass
| class Pixivexception(Exception):
pass
class Downloadexception(PixivException):
pass
class Apiexception(PixivException):
pass
class Loginpassworderror(APIException):
pass
class Logintokenerror(APIException):
pass |
def createMessageForArduino(flags, device_id, datasize, data):
# prepare data, datasize depends whether we are working on
# strings or not and therefor calculate it again
byteData, datasize = getBytesForData(data)
message = b'\xff'
message += bytes([flags])
message += bytes([int(device_id)])
message += bytes([datasize])
if datasize > 0:
message += byteData
message += b'\xfe'
print("Message to be send to arduino: ", message, " with length: ", len(message))
return message
def createDeviceInitializationMessage(device_id, sensor):
if sensor:
return createMessageForArduino(flags=128, device_id=device_id, datasize=0, data=[])
else:
return createMessageForArduino(flags=(128 + 32), device_id=device_id, datasize=0, data=[])
def createActuatorNewValueMessage(device_id, data):
return createMessageForArduino(flags=32, device_id=device_id, datasize=len(data), data=data)
def getBytesForData(data):
newData = b''
datasize = 0
if isinstance(data, list):
for item in data:
newDataPoint, datasizeForPoint = getBytesForDatapoint(item)
newData += newDataPoint
datasize += datasizeForPoint
else:
newData, datasize = getBytesForDatapoint(data)
return newData, datasize
def getBytesForDatapoint(datapoint):
# handle integer and strings differently
try:
newBytes = bytes([int(datapoint)])
except:
newBytes = str.encode(datapoint)
return newBytes, len(newBytes)
| def create_message_for_arduino(flags, device_id, datasize, data):
(byte_data, datasize) = get_bytes_for_data(data)
message = b'\xff'
message += bytes([flags])
message += bytes([int(device_id)])
message += bytes([datasize])
if datasize > 0:
message += byteData
message += b'\xfe'
print('Message to be send to arduino: ', message, ' with length: ', len(message))
return message
def create_device_initialization_message(device_id, sensor):
if sensor:
return create_message_for_arduino(flags=128, device_id=device_id, datasize=0, data=[])
else:
return create_message_for_arduino(flags=128 + 32, device_id=device_id, datasize=0, data=[])
def create_actuator_new_value_message(device_id, data):
return create_message_for_arduino(flags=32, device_id=device_id, datasize=len(data), data=data)
def get_bytes_for_data(data):
new_data = b''
datasize = 0
if isinstance(data, list):
for item in data:
(new_data_point, datasize_for_point) = get_bytes_for_datapoint(item)
new_data += newDataPoint
datasize += datasizeForPoint
else:
(new_data, datasize) = get_bytes_for_datapoint(data)
return (newData, datasize)
def get_bytes_for_datapoint(datapoint):
try:
new_bytes = bytes([int(datapoint)])
except:
new_bytes = str.encode(datapoint)
return (newBytes, len(newBytes)) |
# List is python's version of array, zero-based indexing
months = ['January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December']
print(months[0])
print(months[2])
print(months[-1])
list_of_random_things = [1, 3.4, 'a string', True]
# watch for indexing errors
# list_of_random_things[len(list_of_random_things)]
list_of_random_things[len(list_of_random_things)-1]
print(list_of_random_things[len(list_of_random_things)-1])
# Slicing
# upperbound is inclusive, lowerbound is exclusive
list_of_random_things = [1, 3.4, 'a string', True]
list_of_random_things[1:2]
# [3.4 notice returns a list rather vs indexing single element
q3 = months[6:9]
print(q3)
first_half = months[:6]
print(first_half)
second_half = months[6:]
print(second_half)
greeting = "Hello there"
print(len(greeting), len(months))
print(greeting[6:9], months[6:9])
# Membership Operators
# in and not in
print('her' in greeting, 'her' not in greeting)
print('Sunday' in months, 'Sunday' not in months)
# Lists are mutable (strings aren't)
months[3] = 'Friday'
print(months)
# QUIZ List indexing
month = 8
days_in_month = [31,28,31,30,31,30,31,31,30,31,30,31]
# use list indexing to determine the number of days in month
num_days = days_in_month[month-1]
print(num_days)
# QUIZ Slicing Lists
eclipse_dates = ['June 21, 2001', 'December 4, 2002', 'November 23, 2003',
'March 29, 2006', 'August 1, 2008', 'July 22, 2009',
'July 11, 2010', 'November 13, 2012', 'March 20, 2015',
'March 9, 2016']
# TODO: Modify this line so it prints the last three elements of the list
print(eclipse_dates[-3:])
sentence1 = "I wish to register a complaint."
print(sentence1[30])
# New Section: List Methods
name = 'Jim'
student = name
name = 'Tim'
print(name)
print(student) #Jim
scores = ["B", "C", "A", "D", "B", "A"]
grades = scores
print("scores: " + str(scores))
print("grades: " + str(grades))
scores[3] = "B"
print("scores: " + str(scores))
print("grades: " + str(grades))
# useful functions: len() max() -> highest number or last alphabetically
# min() sorted()
sizes = [15, 6, 89, 34, 65, 35]
print(sorted(sizes))
print(sorted(sizes, reverse=True))
# join method list to strings
nautical_directions = "\n".join(["fore", "aft", "starboard", "port"])
print(nautical_directions)
names = ["Garcia", "O'Kelly", "Davis"]
print("-".join(names))
# don't forget the comma
names = ["Garcia" "O'Kelly" "Davis"]
print("-".join(names))
# append Method
python_varieties = ['Burmese Python', 'African Rock Python', 'Ball Python', 'Reticulated Python', 'Angolan Python']
python_varieties.append('Blood Python')
print(python_varieties)
# QUIZ
a = [1, 5, 8]
b = [2, 6, 9, 10]
c = [100, 200]
print(max([len(a), len(b), len(c)]))
print(min([len(a), len(b), len(c)]))
# 4,2
names = ["Carol", "Albert", "Ben", "Donna"]
print(" & ".join(sorted(names)))
# Albert & Ben & Carol & Donna
names = ["Carol", "Albert", "Ben", "Donna"]
names.append("Eugenia")
print(sorted(names))
# ["Albert", "Ben", "Carol", "Donna", "Eugenia"]
| months = ['January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December']
print(months[0])
print(months[2])
print(months[-1])
list_of_random_things = [1, 3.4, 'a string', True]
list_of_random_things[len(list_of_random_things) - 1]
print(list_of_random_things[len(list_of_random_things) - 1])
list_of_random_things = [1, 3.4, 'a string', True]
list_of_random_things[1:2]
q3 = months[6:9]
print(q3)
first_half = months[:6]
print(first_half)
second_half = months[6:]
print(second_half)
greeting = 'Hello there'
print(len(greeting), len(months))
print(greeting[6:9], months[6:9])
print('her' in greeting, 'her' not in greeting)
print('Sunday' in months, 'Sunday' not in months)
months[3] = 'Friday'
print(months)
month = 8
days_in_month = [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31]
num_days = days_in_month[month - 1]
print(num_days)
eclipse_dates = ['June 21, 2001', 'December 4, 2002', 'November 23, 2003', 'March 29, 2006', 'August 1, 2008', 'July 22, 2009', 'July 11, 2010', 'November 13, 2012', 'March 20, 2015', 'March 9, 2016']
print(eclipse_dates[-3:])
sentence1 = 'I wish to register a complaint.'
print(sentence1[30])
name = 'Jim'
student = name
name = 'Tim'
print(name)
print(student)
scores = ['B', 'C', 'A', 'D', 'B', 'A']
grades = scores
print('scores: ' + str(scores))
print('grades: ' + str(grades))
scores[3] = 'B'
print('scores: ' + str(scores))
print('grades: ' + str(grades))
sizes = [15, 6, 89, 34, 65, 35]
print(sorted(sizes))
print(sorted(sizes, reverse=True))
nautical_directions = '\n'.join(['fore', 'aft', 'starboard', 'port'])
print(nautical_directions)
names = ['Garcia', "O'Kelly", 'Davis']
print('-'.join(names))
names = ["GarciaO'KellyDavis"]
print('-'.join(names))
python_varieties = ['Burmese Python', 'African Rock Python', 'Ball Python', 'Reticulated Python', 'Angolan Python']
python_varieties.append('Blood Python')
print(python_varieties)
a = [1, 5, 8]
b = [2, 6, 9, 10]
c = [100, 200]
print(max([len(a), len(b), len(c)]))
print(min([len(a), len(b), len(c)]))
names = ['Carol', 'Albert', 'Ben', 'Donna']
print(' & '.join(sorted(names)))
names = ['Carol', 'Albert', 'Ben', 'Donna']
names.append('Eugenia')
print(sorted(names)) |
# --- Day 11: Seating System ---
# Your plane lands with plenty of time to spare. The final leg of your journey is a ferry that goes directly to the tropical island where you can finally start your vacation. As you reach the waiting area to board the ferry, you realize you're so early, nobody else has even arrived yet!
# By modeling the process people use to choose (or abandon) their seat in the waiting area, you're pretty sure you can predict the best place to sit. You make a quick map of the seat layout (your puzzle input).
# The seat layout fits neatly on a grid. Each position is either floor (.), an empty seat (L), or an occupied seat (#). For example, the initial seat layout might look like this:
# L.LL.LL.LL
# LLLLLLL.LL
# L.L.L..L..
# LLLL.LL.LL
# L.LL.LL.LL
# L.LLLLL.LL
# ..L.L.....
# LLLLLLLLLL
# L.LLLLLL.L
# L.LLLLL.LL
# Now, you just need to model the people who will be arriving shortly. Fortunately, people are entirely predictable and always follow a simple set of rules. All decisions are based on the number of occupied seats adjacent to a given seat (one of the eight positions immediately up, down, left, right, or diagonal from the seat). The following rules are applied to every seat simultaneously:
# If a seat is empty (L) and there are no occupied seats adjacent to it, the seat becomes occupied.
# If a seat is occupied (#) and four or more seats adjacent to it are also occupied, the seat becomes empty.
# Otherwise, the seat's state does not change.
# Floor (.) never changes; seats don't move, and nobody sits on the floor.
# After one round of these rules, every seat in the example layout becomes occupied:
# #.##.##.##
# #######.##
# #.#.#..#..
# ####.##.##
# #.##.##.##
# #.#####.##
# ..#.#.....
# ##########
# #.######.#
# #.#####.##
# After a second round, the seats with four or more occupied adjacent seats become empty again:
# #.LL.L#.##
# #LLLLLL.L#
# L.L.L..L..
# #LLL.LL.L#
# #.LL.LL.LL
# #.LLLL#.##
# ..L.L.....
# #LLLLLLLL#
# #.LLLLLL.L
# #.#LLLL.##
# This process continues for three more rounds:
# #.##.L#.##
# #L###LL.L#
# L.#.#..#..
# #L##.##.L#
# #.##.LL.LL
# #.###L#.##
# ..#.#.....
# #L######L#
# #.LL###L.L
# #.#L###.##
# #.#L.L#.##
# #LLL#LL.L#
# L.L.L..#..
# #LLL.##.L#
# #.LL.LL.LL
# #.LL#L#.##
# ..L.L.....
# #L#LLLL#L#
# #.LLLLLL.L
# #.#L#L#.##
# #.#L.L#.##
# #LLL#LL.L#
# L.#.L..#..
# #L##.##.L#
# #.#L.LL.LL
# #.#L#L#.##
# ..L.L.....
# #L#L##L#L#
# #.LLLLLL.L
# #.#L#L#.##
# At this point, something interesting happens: the chaos stabilizes and further applications of these rules cause no seats to change state! Once people stop moving around, you count 37 occupied seats.
# Simulate your seating area by applying the seating rules repeatedly until no seats change state. How many seats end up occupied?
def fileInput():
f = open(inputFile, 'r')
with open(inputFile) as f:
read_data = f.read().split('\n')
f.close()
return read_data
def splitSeats(data):
splitData = []
for row in data:
rowData = [seat for seat in row]
splitData.append(rowData)
return splitData
#size - [rows-1,cols-1]
#position - [x,y]
def listAdjSeats(position):
# [
# [-1,-1][0,-1][1,-1]
# [-1, 0][X, X][1, 0]
# [-1, 1][0, 1][1, 1]
# ]
x = position[0]
y = position[1]
allAdjSeats = [[x-1,y-1],[x,y-1],[x+1,y-1],[x-1,y],[x+1,y],[x-1,y+1],[x,y+1],[x+1,y+1]]
adjSeats = []
for location in allAdjSeats:
if (0 <= location[0] <= size[0]) and (0 <= location[1] <= size[1]):
adjSeats.append(location)
return adjSeats
# L = Empty Seat
# # = Taken Seat
# . = Floor
# Rule 1: If seat is empty and all adjacent (up,down,left,right,all diagonals) are empty, seat is taken
# Rule 2: If seat is taken, look if 4 or more adjacent seats are taken.
# - If more than 4 are taken, empty seat
# - If less than 4 are taken, seat doesn't change
# Compare the input with the output. If the same, END
def processSeats(data):
newData = []
rowCount = 0
for row in data:
rowData = []
colCount = 0
for seat in row:
if seat != '.': #if not a floor
adjCount = 0
adjSeats = listAdjSeats([rowCount,colCount])
for adjSeat in adjSeats:
if data[adjSeat[0]][adjSeat[1]] == '#':
adjCount += 1
if seat == 'L' and adjCount == 0: #if rule 1 is good
rowData.append('#')
elif seat == '#' and adjCount < 4: #if rule 2 is good
rowData.append('#')
else:
rowData.append('L')
# print(adjCount,'[',rowCount,colCount,']', adjSeats)
else: #if floor
rowData.append('.')
colCount += 1
newData.append(rowData)
rowCount += 1
return newData
def countTakenSeats(data):
seatCount = 0
for row in data:
for seat in row:
if seat == '#':
seatCount += 1
return seatCount
def checkSeats(data):
newData = processSeats(data)
# print('------')
# print(newData)
if data == newData:
return countTakenSeats(newData)
else:
return checkSeats(newData)
#///////////////////////////////////////////////////
inputFile = 'day11-input.txt'
if __name__ == "__main__":
data = fileInput()
data = splitSeats(data)
size = [len(data)-1,len(data[0])-1]
seatsTaken = checkSeats(data)
print(seatsTaken)
| def file_input():
f = open(inputFile, 'r')
with open(inputFile) as f:
read_data = f.read().split('\n')
f.close()
return read_data
def split_seats(data):
split_data = []
for row in data:
row_data = [seat for seat in row]
splitData.append(rowData)
return splitData
def list_adj_seats(position):
x = position[0]
y = position[1]
all_adj_seats = [[x - 1, y - 1], [x, y - 1], [x + 1, y - 1], [x - 1, y], [x + 1, y], [x - 1, y + 1], [x, y + 1], [x + 1, y + 1]]
adj_seats = []
for location in allAdjSeats:
if 0 <= location[0] <= size[0] and 0 <= location[1] <= size[1]:
adjSeats.append(location)
return adjSeats
def process_seats(data):
new_data = []
row_count = 0
for row in data:
row_data = []
col_count = 0
for seat in row:
if seat != '.':
adj_count = 0
adj_seats = list_adj_seats([rowCount, colCount])
for adj_seat in adjSeats:
if data[adjSeat[0]][adjSeat[1]] == '#':
adj_count += 1
if seat == 'L' and adjCount == 0:
rowData.append('#')
elif seat == '#' and adjCount < 4:
rowData.append('#')
else:
rowData.append('L')
else:
rowData.append('.')
col_count += 1
newData.append(rowData)
row_count += 1
return newData
def count_taken_seats(data):
seat_count = 0
for row in data:
for seat in row:
if seat == '#':
seat_count += 1
return seatCount
def check_seats(data):
new_data = process_seats(data)
if data == newData:
return count_taken_seats(newData)
else:
return check_seats(newData)
input_file = 'day11-input.txt'
if __name__ == '__main__':
data = file_input()
data = split_seats(data)
size = [len(data) - 1, len(data[0]) - 1]
seats_taken = check_seats(data)
print(seatsTaken) |
# WiFi credentials
wifi_ssid = "YourSSID"
wifi_password = "YourPassword"
# Ubidots credentials
ubidots_token = "YourToken"
| wifi_ssid = 'YourSSID'
wifi_password = 'YourPassword'
ubidots_token = 'YourToken' |
number_one = int(input())
number_two = int(input())
number_three = int(input())
for one in range(2, number_one + 1, 2):
for two in range(2, number_two + 1):
for three in range(2, number_three + 1, 2):
if two == 2 or two == 3 or two == 5 or two == 7:
print(f"{one} {two} {three}") | number_one = int(input())
number_two = int(input())
number_three = int(input())
for one in range(2, number_one + 1, 2):
for two in range(2, number_two + 1):
for three in range(2, number_three + 1, 2):
if two == 2 or two == 3 or two == 5 or (two == 7):
print(f'{one} {two} {three}') |
#! /usr/bin/python
HOME_PATH = './'
CACHE_PATH = '/var/cache/obmc/'
FLASH_DOWNLOAD_PATH = "/tmp"
GPIO_BASE = 320
SYSTEM_NAME = "Garrison"
## System states
## state can change to next state in 2 ways:
## - a process emits a GotoSystemState signal with state name to goto
## - objects specified in EXIT_STATE_DEPEND have started
SYSTEM_STATES = [
'BASE_APPS',
'BMC_STARTING',
'BMC_READY',
'HOST_POWERING_ON',
'HOST_POWERED_ON',
'HOST_BOOTING',
'HOST_BOOTED',
'HOST_POWERED_OFF',
]
EXIT_STATE_DEPEND = {
'BASE_APPS' : {
'/org/openbmc/sensors': 0,
},
'BMC_STARTING' : {
'/org/openbmc/control/chassis0': 0,
'/org/openbmc/control/power0' : 0,
'/org/openbmc/control/host0' : 0,
'/org/openbmc/control/flash/bios' : 0,
},
}
## method will be called when state is entered
ENTER_STATE_CALLBACK = {
'HOST_POWERED_ON' : {
'boot' : {
'bus_name' : 'org.openbmc.control.Host',
'obj_name' : '/org/openbmc/control/host0',
'interface_name' : 'org.openbmc.control.Host',
},
},
'HOST_POWERED_OFF' : {
'setOff' : {
'bus_name' : 'org.openbmc.control.led',
'obj_name' : '/org/openbmc/control/led/identify',
'interface_name' : 'org.openbmc.Led',
}
},
'BMC_READY' : {
'setOn' : {
'bus_name' : 'org.openbmc.control.led',
'obj_name' : '/org/openbmc/control/led/beep',
'interface_name' : 'org.openbmc.Led',
},
'init' : {
'bus_name' : 'org.openbmc.control.Flash',
'obj_name' : '/org/openbmc/control/flash/bios',
'interface_name' : 'org.openbmc.Flash',
}
}
}
APPS = {
'startup_hacks' : {
'system_state' : 'BASE_APPS',
'start_process' : True,
'monitor_process' : False,
'process_name' : 'startup_hacks.sh',
},
'inventory' : {
'system_state' : 'BMC_STARTING',
'start_process' : True,
'monitor_process' : True,
'process_name' : 'inventory_items.py',
'args' : [ SYSTEM_NAME ]
},
'hwmon' : {
'system_state' : 'BMC_STARTING',
'start_process' : True,
'monitor_process' : True,
'process_name' : 'hwmon.py',
'args' : [ SYSTEM_NAME ]
},
'sensor_manager' : {
'system_state' : 'BASE_APPS',
'start_process' : True,
'monitor_process' : True,
'process_name' : 'sensor_manager2.py',
'args' : [ SYSTEM_NAME ]
},
'host_watchdog' : {
'system_state' : 'BMC_STARTING',
'start_process' : True,
'monitor_process' : True,
'process_name' : 'host_watchdog.exe',
},
'power_control' : {
'system_state' : 'BMC_STARTING',
'start_process' : True,
'monitor_process' : True,
'process_name' : 'power_control.exe',
'args' : [ '3000', '10' ]
},
'power_button' : {
'system_state' : 'BMC_STARTING',
'start_process' : True,
'monitor_process' : True,
'process_name' : 'button_power.exe',
},
'reset_button' : {
'system_state' : 'BMC_STARTING',
'start_process' : True,
'monitor_process' : True,
'process_name' : 'button_reset.exe',
},
'led_control' : {
'system_state' : 'BMC_STARTING',
'start_process' : True,
'monitor_process' : True,
'process_name' : 'led_controller.exe',
},
'flash_control' : {
'system_state' : 'BMC_STARTING',
'start_process' : True,
'monitor_process' : True,
'process_name' : 'flash_bios.exe',
},
'bmc_flash_control' : {
'system_state' : 'BMC_STARTING',
'start_process' : True,
'monitor_process' : True,
'process_name' : 'bmc_update.py',
},
'download_manager' : {
'system_state' : 'BMC_STARTING',
'start_process' : True,
'monitor_process' : True,
'process_name' : 'download_manager.py',
'args' : [ SYSTEM_NAME ]
},
'host_control' : {
'system_state' : 'BMC_STARTING',
'start_process' : True,
'monitor_process' : True,
'process_name' : 'control_host.exe',
},
'chassis_control' : {
'system_state' : 'BMC_STARTING',
'start_process' : True,
'monitor_process' : True,
'process_name' : 'chassis_control.py',
},
'restore' : {
'system_state' : 'BMC_READY',
'start_process' : True,
'monitor_process' : False,
'process_name' : 'discover_system_state.py',
},
'bmc_control' : {
'system_state' : 'BMC_STARTING',
'start_process' : True,
'monitor_process' : True,
'process_name' : 'control_bmc.exe',
},
}
CACHED_INTERFACES = {
"org.openbmc.InventoryItem" : True,
"org.openbmc.control.Chassis" : True,
}
INVENTORY_ROOT = '/org/openbmc/inventory'
FRU_INSTANCES = {
'<inventory_root>/system' : { 'fru_type' : 'SYSTEM','is_fru' : True, 'present' : "True" },
'<inventory_root>/system/bios' : { 'fru_type' : 'SYSTEM','is_fru' : True, 'present' : "True" },
'<inventory_root>/system/misc' : { 'fru_type' : 'SYSTEM','is_fru' : False, },
'<inventory_root>/system/chassis' : { 'fru_type' : 'SYSTEM','is_fru' : True, 'present' : "True" },
'<inventory_root>/system/chassis/motherboard' : { 'fru_type' : 'MAIN_PLANAR','is_fru' : True, },
'<inventory_root>/system/systemevent' : { 'fru_type' : 'SYSTEM_EVENT', 'is_fru' : False, },
'<inventory_root>/system/chassis/motherboard/refclock' : { 'fru_type' : 'MAIN_PLANAR', 'is_fru' : False, },
'<inventory_root>/system/chassis/motherboard/pcieclock': { 'fru_type' : 'MAIN_PLANAR', 'is_fru' : False, },
'<inventory_root>/system/chassis/motherboard/todclock' : { 'fru_type' : 'MAIN_PLANAR', 'is_fru' : False, },
'<inventory_root>/system/chassis/motherboard/apss' : { 'fru_type' : 'MAIN_PLANAR', 'is_fru' : False, },
'<inventory_root>/system/chassis/fan0' : { 'fru_type' : 'FAN','is_fru' : True, },
'<inventory_root>/system/chassis/fan1' : { 'fru_type' : 'FAN','is_fru' : True, },
'<inventory_root>/system/chassis/fan2' : { 'fru_type' : 'FAN','is_fru' : True, },
'<inventory_root>/system/chassis/fan3' : { 'fru_type' : 'FAN','is_fru' : True, },
'<inventory_root>/system/chassis/motherboard/bmc' : { 'fru_type' : 'BMC','is_fru' : False, 'manufacturer' : 'ASPEED' },
'<inventory_root>/system/chassis/motherboard/cpu0' : { 'fru_type' : 'CPU', 'is_fru' : True, },
'<inventory_root>/system/chassis/motherboard/cpu1' : { 'fru_type' : 'CPU', 'is_fru' : True, },
'<inventory_root>/system/chassis/motherboard/cpu0/core0' : { 'fru_type' : 'CORE', 'is_fru' : False, },
'<inventory_root>/system/chassis/motherboard/cpu0/core1' : { 'fru_type' : 'CORE', 'is_fru' : False, },
'<inventory_root>/system/chassis/motherboard/cpu0/core2' : { 'fru_type' : 'CORE', 'is_fru' : False, },
'<inventory_root>/system/chassis/motherboard/cpu0/core3' : { 'fru_type' : 'CORE', 'is_fru' : False, },
'<inventory_root>/system/chassis/motherboard/cpu0/core4' : { 'fru_type' : 'CORE', 'is_fru' : False, },
'<inventory_root>/system/chassis/motherboard/cpu0/core5' : { 'fru_type' : 'CORE', 'is_fru' : False, },
'<inventory_root>/system/chassis/motherboard/cpu0/core6' : { 'fru_type' : 'CORE', 'is_fru' : False, },
'<inventory_root>/system/chassis/motherboard/cpu0/core7' : { 'fru_type' : 'CORE', 'is_fru' : False, },
'<inventory_root>/system/chassis/motherboard/cpu0/core8' : { 'fru_type' : 'CORE', 'is_fru' : False, },
'<inventory_root>/system/chassis/motherboard/cpu0/core9' : { 'fru_type' : 'CORE', 'is_fru' : False, },
'<inventory_root>/system/chassis/motherboard/cpu0/core10': { 'fru_type' : 'CORE', 'is_fru' : False, },
'<inventory_root>/system/chassis/motherboard/cpu0/core11': { 'fru_type' : 'CORE', 'is_fru' : False, },
'<inventory_root>/system/chassis/motherboard/cpu1/core0' : { 'fru_type' : 'CORE', 'is_fru' : False, },
'<inventory_root>/system/chassis/motherboard/cpu1/core1' : { 'fru_type' : 'CORE', 'is_fru' : False, },
'<inventory_root>/system/chassis/motherboard/cpu1/core2' : { 'fru_type' : 'CORE', 'is_fru' : False, },
'<inventory_root>/system/chassis/motherboard/cpu1/core3' : { 'fru_type' : 'CORE', 'is_fru' : False, },
'<inventory_root>/system/chassis/motherboard/cpu1/core4' : { 'fru_type' : 'CORE', 'is_fru' : False, },
'<inventory_root>/system/chassis/motherboard/cpu1/core5' : { 'fru_type' : 'CORE', 'is_fru' : False, },
'<inventory_root>/system/chassis/motherboard/cpu1/core6' : { 'fru_type' : 'CORE', 'is_fru' : False, },
'<inventory_root>/system/chassis/motherboard/cpu1/core7' : { 'fru_type' : 'CORE', 'is_fru' : False, },
'<inventory_root>/system/chassis/motherboard/cpu1/core8' : { 'fru_type' : 'CORE', 'is_fru' : False, },
'<inventory_root>/system/chassis/motherboard/cpu1/core9' : { 'fru_type' : 'CORE', 'is_fru' : False, },
'<inventory_root>/system/chassis/motherboard/cpu1/core10' : { 'fru_type' : 'CORE', 'is_fru' : False, },
'<inventory_root>/system/chassis/motherboard/cpu1/core11' : { 'fru_type' : 'CORE', 'is_fru' : False, },
'<inventory_root>/system/chassis/motherboard/membuf0' : { 'fru_type' : 'MEMORY_BUFFER', 'is_fru' : False, },
'<inventory_root>/system/chassis/motherboard/membuf1' : { 'fru_type' : 'MEMORY_BUFFER', 'is_fru' : False, },
'<inventory_root>/system/chassis/motherboard/membuf2' : { 'fru_type' : 'MEMORY_BUFFER', 'is_fru' : False, },
'<inventory_root>/system/chassis/motherboard/membuf3' : { 'fru_type' : 'MEMORY_BUFFER', 'is_fru' : False, },
'<inventory_root>/system/chassis/motherboard/membuf4' : { 'fru_type' : 'MEMORY_BUFFER', 'is_fru' : False, },
'<inventory_root>/system/chassis/motherboard/membuf5' : { 'fru_type' : 'MEMORY_BUFFER', 'is_fru' : False, },
'<inventory_root>/system/chassis/motherboard/membuf6' : { 'fru_type' : 'MEMORY_BUFFER', 'is_fru' : False, },
'<inventory_root>/system/chassis/motherboard/membuf7' : { 'fru_type' : 'MEMORY_BUFFER', 'is_fru' : False, },
'<inventory_root>/system/chassis/motherboard/dimm0' : { 'fru_type' : 'DIMM', 'is_fru' : True,},
'<inventory_root>/system/chassis/motherboard/dimm1' : { 'fru_type' : 'DIMM', 'is_fru' : True,},
'<inventory_root>/system/chassis/motherboard/dimm2' : { 'fru_type' : 'DIMM', 'is_fru' : True,},
'<inventory_root>/system/chassis/motherboard/dimm3' : { 'fru_type' : 'DIMM', 'is_fru' : True,},
'<inventory_root>/system/chassis/motherboard/dimm4' : { 'fru_type' : 'DIMM', 'is_fru' : True,},
'<inventory_root>/system/chassis/motherboard/dimm5' : { 'fru_type' : 'DIMM', 'is_fru' : True,},
'<inventory_root>/system/chassis/motherboard/dimm6' : { 'fru_type' : 'DIMM', 'is_fru' : True,},
'<inventory_root>/system/chassis/motherboard/dimm7' : { 'fru_type' : 'DIMM', 'is_fru' : True,},
'<inventory_root>/system/chassis/motherboard/dimm8' : { 'fru_type' : 'DIMM', 'is_fru' : True,},
'<inventory_root>/system/chassis/motherboard/dimm9' : { 'fru_type' : 'DIMM', 'is_fru' : True,},
'<inventory_root>/system/chassis/motherboard/dimm10' : { 'fru_type' : 'DIMM', 'is_fru' : True,},
'<inventory_root>/system/chassis/motherboard/dimm11' : { 'fru_type' : 'DIMM', 'is_fru' : True,},
'<inventory_root>/system/chassis/motherboard/dimm12' : { 'fru_type' : 'DIMM', 'is_fru' : True,},
'<inventory_root>/system/chassis/motherboard/dimm13' : { 'fru_type' : 'DIMM', 'is_fru' : True,},
'<inventory_root>/system/chassis/motherboard/dimm14' : { 'fru_type' : 'DIMM', 'is_fru' : True,},
'<inventory_root>/system/chassis/motherboard/dimm15' : { 'fru_type' : 'DIMM', 'is_fru' : True,},
'<inventory_root>/system/chassis/motherboard/dimm16' : { 'fru_type' : 'DIMM', 'is_fru' : True,},
'<inventory_root>/system/chassis/motherboard/dimm17' : { 'fru_type' : 'DIMM', 'is_fru' : True,},
'<inventory_root>/system/chassis/motherboard/dimm18' : { 'fru_type' : 'DIMM', 'is_fru' : True,},
'<inventory_root>/system/chassis/motherboard/dimm19' : { 'fru_type' : 'DIMM', 'is_fru' : True,},
'<inventory_root>/system/chassis/motherboard/dimm20' : { 'fru_type' : 'DIMM', 'is_fru' : True,},
'<inventory_root>/system/chassis/motherboard/dimm21' : { 'fru_type' : 'DIMM', 'is_fru' : True,},
'<inventory_root>/system/chassis/motherboard/dimm22' : { 'fru_type' : 'DIMM', 'is_fru' : True,},
'<inventory_root>/system/chassis/motherboard/dimm23' : { 'fru_type' : 'DIMM', 'is_fru' : True,},
'<inventory_root>/system/chassis/motherboard/dimm24' : { 'fru_type' : 'DIMM', 'is_fru' : True,},
'<inventory_root>/system/chassis/motherboard/dimm25' : { 'fru_type' : 'DIMM', 'is_fru' : True,},
'<inventory_root>/system/chassis/motherboard/dimm26' : { 'fru_type' : 'DIMM', 'is_fru' : True,},
'<inventory_root>/system/chassis/motherboard/dimm27' : { 'fru_type' : 'DIMM', 'is_fru' : True,},
'<inventory_root>/system/chassis/motherboard/dimm28' : { 'fru_type' : 'DIMM', 'is_fru' : True,},
'<inventory_root>/system/chassis/motherboard/dimm29' : { 'fru_type' : 'DIMM', 'is_fru' : True,},
'<inventory_root>/system/chassis/motherboard/dimm30' : { 'fru_type' : 'DIMM', 'is_fru' : True,},
'<inventory_root>/system/chassis/motherboard/dimm31' : { 'fru_type' : 'DIMM', 'is_fru' : True,},
}
ID_LOOKUP = {
'FRU' : {
0x01 : '<inventory_root>/system/chassis/motherboard/cpu0',
0x02 : '<inventory_root>/system/chassis/motherboard/cpu1',
0x03 : '<inventory_root>/system/chassis/motherboard',
0x04 : '<inventory_root>/system/chassis/motherboard/membuf0',
0x05 : '<inventory_root>/system/chassis/motherboard/membuf1',
0x06 : '<inventory_root>/system/chassis/motherboard/membuf2',
0x07 : '<inventory_root>/system/chassis/motherboard/membuf3',
0x08 : '<inventory_root>/system/chassis/motherboard/membuf4',
0x09 : '<inventory_root>/system/chassis/motherboard/membuf5',
0x0c : '<inventory_root>/system/chassis/motherboard/dimm0',
0x0d : '<inventory_root>/system/chassis/motherboard/dimm1',
0x0e : '<inventory_root>/system/chassis/motherboard/dimm2',
0x0f : '<inventory_root>/system/chassis/motherboard/dimm3',
0x10 : '<inventory_root>/system/chassis/motherboard/dimm4',
0x11 : '<inventory_root>/system/chassis/motherboard/dimm5',
0x12 : '<inventory_root>/system/chassis/motherboard/dimm6',
0x13 : '<inventory_root>/system/chassis/motherboard/dimm7',
0x14 : '<inventory_root>/system/chassis/motherboard/dimm8',
0x15 : '<inventory_root>/system/chassis/motherboard/dimm9',
0x16 : '<inventory_root>/system/chassis/motherboard/dimm10',
0x17 : '<inventory_root>/system/chassis/motherboard/dimm11',
0x18 : '<inventory_root>/system/chassis/motherboard/dimm12',
0x19 : '<inventory_root>/system/chassis/motherboard/dimm13',
0x1a : '<inventory_root>/system/chassis/motherboard/dimm14',
0x1b : '<inventory_root>/system/chassis/motherboard/dimm15',
0x1c : '<inventory_root>/system/chassis/motherboard/dimm16',
0x1d : '<inventory_root>/system/chassis/motherboard/dimm17',
0x1e : '<inventory_root>/system/chassis/motherboard/dimm18',
0x1f : '<inventory_root>/system/chassis/motherboard/dimm19',
0x20 : '<inventory_root>/system/chassis/motherboard/dimm20',
0x21 : '<inventory_root>/system/chassis/motherboard/dimm21',
0x22 : '<inventory_root>/system/chassis/motherboard/dimm22',
0x23 : '<inventory_root>/system/chassis/motherboard/dimm23',
0x24 : '<inventory_root>/system/chassis/motherboard/dimm24',
0x25 : '<inventory_root>/system/chassis/motherboard/dimm25',
0x26 : '<inventory_root>/system/chassis/motherboard/dimm26',
0x27 : '<inventory_root>/system/chassis/motherboard/dimm27',
0x28 : '<inventory_root>/system/chassis/motherboard/dimm28',
0x29 : '<inventory_root>/system/chassis/motherboard/dimm29',
0x2a : '<inventory_root>/system/chassis/motherboard/dimm30',
0x2b : '<inventory_root>/system/chassis/motherboard/dimm31',
},
'FRU_STR' : {
'PRODUCT_0' : '<inventory_root>/system/bios',
'BOARD_1' : '<inventory_root>/system/chassis/motherboard/cpu0',
'BOARD_2' : '<inventory_root>/system/chassis/motherboard/cpu1',
'CHASSIS_3' : '<inventory_root>/system/chassis/motherboard',
'BOARD_3' : '<inventory_root>/system/misc',
'BOARD_4' : '<inventory_root>/system/chassis/motherboard/membuf0',
'BOARD_5' : '<inventory_root>/system/chassis/motherboard/membuf1',
'BOARD_6' : '<inventory_root>/system/chassis/motherboard/membuf2',
'BOARD_7' : '<inventory_root>/system/chassis/motherboard/membuf3',
'BOARD_8' : '<inventory_root>/system/chassis/motherboard/membuf4',
'BOARD_9' : '<inventory_root>/system/chassis/motherboard/membuf5',
'BOARD_10' : '<inventory_root>/system/chassis/motherboard/membuf6',
'BOARD_11' : '<inventory_root>/system/chassis/motherboard/membuf7',
'PRODUCT_12' : '<inventory_root>/system/chassis/motherboard/dimm0',
'PRODUCT_13' : '<inventory_root>/system/chassis/motherboard/dimm1',
'PRODUCT_14' : '<inventory_root>/system/chassis/motherboard/dimm2',
'PRODUCT_15' : '<inventory_root>/system/chassis/motherboard/dimm3',
'PRODUCT_16' : '<inventory_root>/system/chassis/motherboard/dimm4',
'PRODUCT_17' : '<inventory_root>/system/chassis/motherboard/dimm5',
'PRODUCT_18' : '<inventory_root>/system/chassis/motherboard/dimm6',
'PRODUCT_19' : '<inventory_root>/system/chassis/motherboard/dimm7',
'PRODUCT_20' : '<inventory_root>/system/chassis/motherboard/dimm8',
'PRODUCT_21' : '<inventory_root>/system/chassis/motherboard/dimm9',
'PRODUCT_22' : '<inventory_root>/system/chassis/motherboard/dimm10',
'PRODUCT_23' : '<inventory_root>/system/chassis/motherboard/dimm11',
'PRODUCT_24' : '<inventory_root>/system/chassis/motherboard/dimm12',
'PRODUCT_25' : '<inventory_root>/system/chassis/motherboard/dimm13',
'PRODUCT_26' : '<inventory_root>/system/chassis/motherboard/dimm14',
'PRODUCT_27' : '<inventory_root>/system/chassis/motherboard/dimm15',
'PRODUCT_28' : '<inventory_root>/system/chassis/motherboard/dimm16',
'PRODUCT_29' : '<inventory_root>/system/chassis/motherboard/dimm17',
'PRODUCT_30' : '<inventory_root>/system/chassis/motherboard/dimm18',
'PRODUCT_31' : '<inventory_root>/system/chassis/motherboard/dimm19',
'PRODUCT_32' : '<inventory_root>/system/chassis/motherboard/dimm20',
'PRODUCT_33' : '<inventory_root>/system/chassis/motherboard/dimm21',
'PRODUCT_34' : '<inventory_root>/system/chassis/motherboard/dimm22',
'PRODUCT_35' : '<inventory_root>/system/chassis/motherboard/dimm23',
'PRODUCT_36' : '<inventory_root>/system/chassis/motherboard/dimm24',
'PRODUCT_37' : '<inventory_root>/system/chassis/motherboard/dimm25',
'PRODUCT_38' : '<inventory_root>/system/chassis/motherboard/dimm26',
'PRODUCT_39' : '<inventory_root>/system/chassis/motherboard/dimm27',
'PRODUCT_40' : '<inventory_root>/system/chassis/motherboard/dimm28',
'PRODUCT_41' : '<inventory_root>/system/chassis/motherboard/dimm29',
'PRODUCT_42' : '<inventory_root>/system/chassis/motherboard/dimm30',
'PRODUCT_43' : '<inventory_root>/system/chassis/motherboard/dimm31',
'PRODUCT_47' : '<inventory_root>/system/misc',
},
'SENSOR' : {
0x04 : '/org/openbmc/sensors/host/HostStatus',
0x05 : '/org/openbmc/sensors/host/BootProgress',
0x08 : '/org/openbmc/sensors/host/cpu0/OccStatus',
0x09 : '/org/openbmc/sensors/host/cpu1/OccStatus',
0x0c : '<inventory_root>/system/chassis/motherboard/cpu0',
0x0e : '<inventory_root>/system/chassis/motherboard/cpu1',
0x1e : '<inventory_root>/system/chassis/motherboard/dimm3',
0x1f : '<inventory_root>/system/chassis/motherboard/dimm2',
0x20 : '<inventory_root>/system/chassis/motherboard/dimm1',
0x21 : '<inventory_root>/system/chassis/motherboard/dimm0',
0x22 : '<inventory_root>/system/chassis/motherboard/dimm7',
0x23 : '<inventory_root>/system/chassis/motherboard/dimm6',
0x24 : '<inventory_root>/system/chassis/motherboard/dimm5',
0x25 : '<inventory_root>/system/chassis/motherboard/dimm4',
0x26 : '<inventory_root>/system/chassis/motherboard/dimm11',
0x27 : '<inventory_root>/system/chassis/motherboard/dimm10',
0x28 : '<inventory_root>/system/chassis/motherboard/dimm9',
0x29 : '<inventory_root>/system/chassis/motherboard/dimm8',
0x2a : '<inventory_root>/system/chassis/motherboard/dimm15',
0x2b : '<inventory_root>/system/chassis/motherboard/dimm14',
0x2c : '<inventory_root>/system/chassis/motherboard/dimm13',
0x2d : '<inventory_root>/system/chassis/motherboard/dimm12',
0x2e : '<inventory_root>/system/chassis/motherboard/dimm19',
0x2f : '<inventory_root>/system/chassis/motherboard/dimm18',
0x30 : '<inventory_root>/system/chassis/motherboard/dimm17',
0x31 : '<inventory_root>/system/chassis/motherboard/dimm16',
0x32 : '<inventory_root>/system/chassis/motherboard/dimm23',
0x33 : '<inventory_root>/system/chassis/motherboard/dimm22',
0x34 : '<inventory_root>/system/chassis/motherboard/dimm21',
0x35 : '<inventory_root>/system/chassis/motherboard/dimm20',
0x36 : '<inventory_root>/system/chassis/motherboard/dimm27',
0x37 : '<inventory_root>/system/chassis/motherboard/dimm26',
0x38 : '<inventory_root>/system/chassis/motherboard/dimm25',
0x39 : '<inventory_root>/system/chassis/motherboard/dimm24',
0x3a : '<inventory_root>/system/chassis/motherboard/dimm31',
0x3b : '<inventory_root>/system/chassis/motherboard/dimm30',
0x3c : '<inventory_root>/system/chassis/motherboard/dimm29',
0x3d : '<inventory_root>/system/chassis/motherboard/dimm28',
0x3e : '<inventory_root>/system/chassis/motherboard/cpu0/core0',
0x3f : '<inventory_root>/system/chassis/motherboard/cpu0/core1',
0x40 : '<inventory_root>/system/chassis/motherboard/cpu0/core2',
0x41 : '<inventory_root>/system/chassis/motherboard/cpu0/core3',
0x42 : '<inventory_root>/system/chassis/motherboard/cpu0/core4',
0x43 : '<inventory_root>/system/chassis/motherboard/cpu0/core5',
0x44 : '<inventory_root>/system/chassis/motherboard/cpu0/core6',
0x45 : '<inventory_root>/system/chassis/motherboard/cpu0/core7',
0x46 : '<inventory_root>/system/chassis/motherboard/cpu0/core8',
0x47 : '<inventory_root>/system/chassis/motherboard/cpu0/core9',
0x48 : '<inventory_root>/system/chassis/motherboard/cpu0/core10',
0x49 : '<inventory_root>/system/chassis/motherboard/cpu0/core11',
0x4a : '<inventory_root>/system/chassis/motherboard/cpu1/core0',
0x4b : '<inventory_root>/system/chassis/motherboard/cpu1/core1',
0x4c : '<inventory_root>/system/chassis/motherboard/cpu1/core2',
0x4d : '<inventory_root>/system/chassis/motherboard/cpu1/core3',
0x4e : '<inventory_root>/system/chassis/motherboard/cpu1/core4',
0x4f : '<inventory_root>/system/chassis/motherboard/cpu1/core5',
0x50 : '<inventory_root>/system/chassis/motherboard/cpu1/core6',
0x51 : '<inventory_root>/system/chassis/motherboard/cpu1/core7',
0x52 : '<inventory_root>/system/chassis/motherboard/cpu1/core8',
0x53 : '<inventory_root>/system/chassis/motherboard/cpu1/core9',
0x54 : '<inventory_root>/system/chassis/motherboard/cpu1/core10',
0x55 : '<inventory_root>/system/chassis/motherboard/cpu1/core11',
0x56 : '<inventory_root>/system/chassis/motherboard/membuf0',
0x57 : '<inventory_root>/system/chassis/motherboard/membuf1',
0x58 : '<inventory_root>/system/chassis/motherboard/membuf2',
0x59 : '<inventory_root>/system/chassis/motherboard/membuf3',
0x5a : '<inventory_root>/system/chassis/motherboard/membuf4',
0x5b : '<inventory_root>/system/chassis/motherboard/membuf5',
0x5c : '<inventory_root>/system/chassis/motherboard/membuf6',
0x5d : '<inventory_root>/system/chassis/motherboard/membuf7',
0x5f : '/org/openbmc/sensors/host/BootCount',
0x60 : '<inventory_root>/system/chassis/motherboard',
0x61 : '<inventory_root>/system/systemevent',
0x62 : '<inventory_root>/system/powerlimit',
0x63 : '<inventory_root>/system/chassis/motherboard/refclock',
0x64 : '<inventory_root>/system/chassis/motherboard/pcieclock',
0xb1 : '<inventory_root>/system/chassis/motherboard/todclock',
0xb2 : '<inventory_root>/system/chassis/motherboard/apss',
0xb3 : '/org/openbmc/sensors/host/powercap',
0xb5 : '/org/openbmc/sensors/host/OperatingSystemStatus',
0xb6 : '<inventory_root>/system/chassis/motherboard/pcielink',
},
'GPIO_PRESENT' : {}
}
GPIO_CONFIG = {}
GPIO_CONFIG['BMC_POWER_UP'] = \
{'gpio_pin': 'D1', 'direction': 'out'}
GPIO_CONFIG['SYS_PWROK_BUFF'] = \
{'gpio_pin': 'D2', 'direction': 'in'}
GPIO_CONFIG['BMC_WD_CLEAR_PULSE_N'] = \
{'gpio_pin': 'N4', 'direction': 'out'}
GPIO_CONFIG['CM1_OE_R_N'] = \
{'gpio_pin': 'Q6', 'direction': 'out'}
GPIO_CONFIG['BMC_CP0_RESET_N'] = \
{'gpio_pin': 'O2', 'direction': 'out'}
GPIO_CONFIG['BMC_CFAM_RESET_N_R'] = \
{'gpio_pin': 'J2', 'direction': 'out'}
GPIO_CONFIG['PEX8718_DEVICES_RESET_N'] = \
{'gpio_pin': 'B6', 'direction': 'out'}
GPIO_CONFIG['CP0_DEVICES_RESET_N'] = \
{'gpio_pin': 'N3', 'direction': 'out'}
GPIO_CONFIG['CP1_DEVICES_RESET_N'] = \
{'gpio_pin': 'N5', 'direction': 'out'}
GPIO_CONFIG['FSI_DATA'] = \
{'gpio_pin': 'A5', 'direction': 'out'}
GPIO_CONFIG['FSI_CLK'] = \
{'gpio_pin': 'A4', 'direction': 'out'}
GPIO_CONFIG['FSI_ENABLE'] = \
{'gpio_pin': 'D0', 'direction': 'out'}
GPIO_CONFIG['CRONUS_SEL'] = \
{'gpio_pin': 'A6', 'direction': 'out'}
GPIO_CONFIG['BMC_THROTTLE'] = \
{'gpio_pin': 'J3', 'direction': 'out'}
GPIO_CONFIG['IDBTN'] = \
{ 'gpio_pin': 'Q7', 'direction': 'out' }
GPIO_CONFIG['POWER_BUTTON'] = \
{'gpio_pin': 'E0', 'direction': 'both'}
GPIO_CONFIG['RESET_BUTTON'] = \
{'gpio_pin': 'E4', 'direction': 'both'}
GPIO_CONFIG['PS0_PRES_N'] = \
{'gpio_pin': 'P7', 'direction': 'in'}
GPIO_CONFIG['PS1_PRES_N'] = \
{'gpio_pin': 'N0', 'direction': 'in'}
GPIO_CONFIG['CARD_PRES_N'] = \
{'gpio_pin': 'J0', 'direction': 'in'}
def convertGpio(name):
name = name.upper()
c = name[0:1]
offset = int(name[1:])
a = ord(c)-65
base = a*8+GPIO_BASE
return base+offset
HWMON_CONFIG = {
'4-0050' : {
'names' : {
'caps_curr_powercap' : { 'object_path' : 'powercap/curr_cap','poll_interval' : 10000,'scale' : 1,'units' : 'W' },
'caps_curr_powerreading' : { 'object_path' : 'powercap/system_power','poll_interval' : 10000,'scale' : 1,'units' : 'W' },
'caps_max_powercap' : { 'object_path' : 'powercap/max_cap','poll_interval' : 10000,'scale' : 1,'units' : 'W' },
'caps_min_powercap' : { 'object_path' : 'powercap/min_cap','poll_interval' : 10000,'scale' : 1,'units' : 'W' },
'caps_norm_powercap' : { 'object_path' : 'powercap/n_cap','poll_interval' : 10000,'scale' : 1,'units' : 'W' },
'caps_user_powerlimit' : { 'object_path' : 'powercap/user_cap','poll_interval' : 10000,'scale' : 1,'units' : 'W' },
},
'labels' : {
'176' : { 'object_path' : 'temperature/cpu0/core0','poll_interval' : 5000,'scale' : 1000,'units' : 'C',
'critical_upper' : 100, 'critical_lower' : -100, 'warning_upper' : 90, 'warning_lower' : -99, 'emergency_enabled' : True },
'177' : { 'object_path' : 'temperature/cpu0/core1','poll_interval' : 5000,'scale' : 1000,'units' : 'C',
'critical_upper' : 100, 'critical_lower' : -100, 'warning_upper' : 90, 'warning_lower' : -99, 'emergency_enabled' : True },
'178' : { 'object_path' : 'temperature/cpu0/core2','poll_interval' : 5000,'scale' : 1000,'units' : 'C',
'critical_upper' : 100, 'critical_lower' : -100, 'warning_upper' : 90, 'warning_lower' : -99, 'emergency_enabled' : True },
'179' : { 'object_path' : 'temperature/cpu0/core3','poll_interval' : 5000,'scale' : 1000,'units' : 'C',
'critical_upper' : 100, 'critical_lower' : -100, 'warning_upper' : 90, 'warning_lower' : -99, 'emergency_enabled' : True },
'180' : { 'object_path' : 'temperature/cpu0/core4','poll_interval' : 5000,'scale' : 1000,'units' : 'C',
'critical_upper' : 100, 'critical_lower' : -100, 'warning_upper' : 90, 'warning_lower' : -99, 'emergency_enabled' : True },
'181' : { 'object_path' : 'temperature/cpu0/core5','poll_interval' : 5000,'scale' : 1000,'units' : 'C',
'critical_upper' : 100, 'critical_lower' : -100, 'warning_upper' : 90, 'warning_lower' : -99, 'emergency_enabled' : True },
'182' : { 'object_path' : 'temperature/cpu0/core6','poll_interval' : 5000,'scale' : 1000,'units' : 'C',
'critical_upper' : 100, 'critical_lower' : -100, 'warning_upper' : 90, 'warning_lower' : -99, 'emergency_enabled' : True },
'183' : { 'object_path' : 'temperature/cpu0/core7','poll_interval' : 5000,'scale' : 1000,'units' : 'C',
'critical_upper' : 100, 'critical_lower' : -100, 'warning_upper' : 90, 'warning_lower' : -99, 'emergency_enabled' : True },
'184' : { 'object_path' : 'temperature/cpu0/core8','poll_interval' : 5000,'scale' : 1000,'units' : 'C',
'critical_upper' : 100, 'critical_lower' : -100, 'warning_upper' : 90, 'warning_lower' : -99, 'emergency_enabled' : True },
'185' : { 'object_path' : 'temperature/cpu0/core9','poll_interval' : 5000,'scale' : 1000,'units' : 'C',
'critical_upper' : 100, 'critical_lower' : -100, 'warning_upper' : 90, 'warning_lower' : -99, 'emergency_enabled' : True },
'186' : { 'object_path' : 'temperature/cpu0/core10','poll_interval' : 5000,'scale' : 1000,'units' : 'C',
'critical_upper' : 100, 'critical_lower' : -100, 'warning_upper' : 90, 'warning_lower' : -99, 'emergency_enabled' : True },
'187' : { 'object_path' : 'temperature/cpu0/core11','poll_interval' : 5000,'scale' : 1000,'units' : 'C',
'critical_upper' : 100, 'critical_lower' : -100, 'warning_upper' : 90, 'warning_lower' : -99, 'emergency_enabled' : True },
'102' : { 'object_path' : 'temperature/dimm0','poll_interval' : 5000,'scale' : 1000,'units' : 'C' },
'103' : { 'object_path' : 'temperature/dimm1','poll_interval' : 5000,'scale' : 1000,'units' : 'C' },
'104' : { 'object_path' : 'temperature/dimm2','poll_interval' : 5000,'scale' : 1000,'units' : 'C' },
'105' : { 'object_path' : 'temperature/dimm3','poll_interval' : 5000,'scale' : 1000,'units' : 'C' },
'106' : { 'object_path' : 'temperature/dimm4','poll_interval' : 5000,'scale' : 1000,'units' : 'C' },
'107' : { 'object_path' : 'temperature/dimm5','poll_interval' : 5000,'scale' : 1000,'units' : 'C' },
'108' : { 'object_path' : 'temperature/dimm6','poll_interval' : 5000,'scale' : 1000,'units' : 'C' },
'109' : { 'object_path' : 'temperature/dimm7','poll_interval' : 5000,'scale' : 1000,'units' : 'C' },
'110' : { 'object_path' : 'temperature/dimm8','poll_interval' : 5000,'scale' : 1000,'units' : 'C' },
'111' : { 'object_path' : 'temperature/dimm9','poll_interval' : 5000,'scale' : 1000,'units' : 'C' },
'112' : { 'object_path' : 'temperature/dimm10','poll_interval' : 5000,'scale' : 1000,'units' : 'C' },
'113' : { 'object_path' : 'temperature/dimm11','poll_interval' : 5000,'scale' : 1000,'units' : 'C' },
'114' : { 'object_path' : 'temperature/dimm12','poll_interval' : 5000,'scale' : 1000,'units' : 'C' },
'115' : { 'object_path' : 'temperature/dimm13','poll_interval' : 5000,'scale' : 1000,'units' : 'C' },
'116' : { 'object_path' : 'temperature/dimm14','poll_interval' : 5000,'scale' : 1000,'units' : 'C' },
'117' : { 'object_path' : 'temperature/dimm15','poll_interval' : 5000,'scale' : 1000,'units' : 'C' },
'94' : { 'object_path' : 'temperature/membuf0','poll_interval' : 5000,'scale' : 1000,'units' : 'C' },
'95' : { 'object_path' : 'temperature/membuf1','poll_interval' : 5000,'scale' : 1000,'units' : 'C' },
'96' : { 'object_path' : 'temperature/membuf2','poll_interval' : 5000,'scale' : 1000,'units' : 'C' },
'97' : { 'object_path' : 'temperature/membuf3','poll_interval' : 5000,'scale' : 1000,'units' : 'C' },
}
},
'5-0050' : {
'labels' : {
'188' : { 'object_path' : 'temperature/cpu1/core0','poll_interval' : 5000,'scale' : 1000,'units' : 'C',
'critical_upper' : 100, 'critical_lower' : -100, 'warning_upper' : 90, 'warning_lower' : -99, 'emergency_enabled' : True },
'189' : { 'object_path' : 'temperature/cpu1/core1','poll_interval' : 5000,'scale' : 1000,'units' : 'C',
'critical_upper' : 100, 'critical_lower' : -100, 'warning_upper' : 90, 'warning_lower' : -99, 'emergency_enabled' : True },
'190' : { 'object_path' : 'temperature/cpu1/core2','poll_interval' : 5000,'scale' : 1000,'units' : 'C',
'critical_upper' : 100, 'critical_lower' : -100, 'warning_upper' : 90, 'warning_lower' : -99, 'emergency_enabled' : True },
'191' : { 'object_path' : 'temperature/cpu1/core3','poll_interval' : 5000,'scale' : 1000,'units' : 'C',
'critical_upper' : 100, 'critical_lower' : -100, 'warning_upper' : 90, 'warning_lower' : -99, 'emergency_enabled' : True },
'192' : { 'object_path' : 'temperature/cpu1/core4','poll_interval' : 5000,'scale' : 1000,'units' : 'C',
'critical_upper' : 100, 'critical_lower' : -100, 'warning_upper' : 90, 'warning_lower' : -99, 'emergency_enabled' : True },
'193' : { 'object_path' : 'temperature/cpu1/core5','poll_interval' : 5000,'scale' : 1000,'units' : 'C',
'critical_upper' : 100, 'critical_lower' : -100, 'warning_upper' : 90, 'warning_lower' : -99, 'emergency_enabled' : True },
'194' : { 'object_path' : 'temperature/cpu1/core6','poll_interval' : 5000,'scale' : 1000,'units' : 'C',
'critical_upper' : 100, 'critical_lower' : -100, 'warning_upper' : 90, 'warning_lower' : -99, 'emergency_enabled' : True },
'195' : { 'object_path' : 'temperature/cpu1/core7','poll_interval' : 5000,'scale' : 1000,'units' : 'C',
'critical_upper' : 100, 'critical_lower' : -100, 'warning_upper' : 90, 'warning_lower' : -99, 'emergency_enabled' : True },
'196' : { 'object_path' : 'temperature/cpu1/core8','poll_interval' : 5000,'scale' : 1000,'units' : 'C',
'critical_upper' : 100, 'critical_lower' : -100, 'warning_upper' : 90, 'warning_lower' : -99, 'emergency_enabled' : True },
'197' : { 'object_path' : 'temperature/cpu1/core9','poll_interval' : 5000,'scale' : 1000,'units' : 'C',
'critical_upper' : 100, 'critical_lower' : -100, 'warning_upper' : 90, 'warning_lower' : -99, 'emergency_enabled' : True },
'198' : { 'object_path' : 'temperature/cpu1/core10','poll_interval' : 5000,'scale' : 1000,'units' : 'C',
'critical_upper' : 100, 'critical_lower' : -100, 'warning_upper' : 90, 'warning_lower' : -99, 'emergency_enabled' : True },
'199' : { 'object_path' : 'temperature/cpu1/core11','poll_interval' : 5000,'scale' : 1000,'units' : 'C',
'critical_upper' : 100, 'critical_lower' : -100, 'warning_upper' : 90, 'warning_lower' : -99, 'emergency_enabled' : True },
'118' : { 'object_path' : 'temperature/dimm16','poll_interval' : 5000,'scale' : 1000,'units' : 'C' },
'119' : { 'object_path' : 'temperature/dimm17','poll_interval' : 5000,'scale' : 1000,'units' : 'C' },
'120' : { 'object_path' : 'temperature/dimm18','poll_interval' : 5000,'scale' : 1000,'units' : 'C' },
'121' : { 'object_path' : 'temperature/dimm19','poll_interval' : 5000,'scale' : 1000,'units' : 'C' },
'122' : { 'object_path' : 'temperature/dimm20','poll_interval' : 5000,'scale' : 1000,'units' : 'C' },
'123' : { 'object_path' : 'temperature/dimm21','poll_interval' : 5000,'scale' : 1000,'units' : 'C' },
'124' : { 'object_path' : 'temperature/dimm22','poll_interval' : 5000,'scale' : 1000,'units' : 'C' },
'125' : { 'object_path' : 'temperature/dimm23','poll_interval' : 5000,'scale' : 1000,'units' : 'C' },
'126' : { 'object_path' : 'temperature/dimm24','poll_interval' : 5000,'scale' : 1000,'units' : 'C' },
'127' : { 'object_path' : 'temperature/dimm25','poll_interval' : 5000,'scale' : 1000,'units' : 'C' },
'128' : { 'object_path' : 'temperature/dimm26','poll_interval' : 5000,'scale' : 1000,'units' : 'C' },
'129' : { 'object_path' : 'temperature/dimm27','poll_interval' : 5000,'scale' : 1000,'units' : 'C' },
'130' : { 'object_path' : 'temperature/dimm28','poll_interval' : 5000,'scale' : 1000,'units' : 'C' },
'131' : { 'object_path' : 'temperature/dimm29','poll_interval' : 5000,'scale' : 1000,'units' : 'C' },
'132' : { 'object_path' : 'temperature/dimm30','poll_interval' : 5000,'scale' : 1000,'units' : 'C' },
'133' : { 'object_path' : 'temperature/dimm31','poll_interval' : 5000,'scale' : 1000,'units' : 'C' },
'98' : { 'object_path' : 'temperature/membuf4','poll_interval' : 5000,'scale' : 1000,'units' : 'C' },
'99' : { 'object_path' : 'temperature/membuf5','poll_interval' : 5000,'scale' : 1000,'units' : 'C' },
'100' : { 'object_path' : 'temperature/membuf6','poll_interval' : 5000,'scale' : 1000,'units' : 'C' },
'101' : { 'object_path' : 'temperature/membuf7','poll_interval' : 5000,'scale' : 1000,'units' : 'C' },
}
},
}
# Miscellaneous non-poll sensor with system specific properties.
# The sensor id is the same as those defined in ID_LOOKUP['SENSOR'].
MISC_SENSORS = {
0x5f : { 'class' : 'BootCountSensor' },
0x05 : { 'class' : 'BootProgressSensor' },
0x08 : { 'class' : 'OccStatusSensor',
'os_path' : '/sys/class/i2c-adapter/i2c-3/3-0050/online' },
0x09 : { 'class' : 'OccStatusSensor',
'os_path' : '/sys/class/i2c-adapter/i2c-3/3-0051/online' },
0xb5 : { 'class' : 'OperatingSystemStatusSensor' },
0xb3 : { 'class' : 'PowerCap',
'os_path' : '/sys/class/hwmon/hwmon3/user_powercap' },
}
| home_path = './'
cache_path = '/var/cache/obmc/'
flash_download_path = '/tmp'
gpio_base = 320
system_name = 'Garrison'
system_states = ['BASE_APPS', 'BMC_STARTING', 'BMC_READY', 'HOST_POWERING_ON', 'HOST_POWERED_ON', 'HOST_BOOTING', 'HOST_BOOTED', 'HOST_POWERED_OFF']
exit_state_depend = {'BASE_APPS': {'/org/openbmc/sensors': 0}, 'BMC_STARTING': {'/org/openbmc/control/chassis0': 0, '/org/openbmc/control/power0': 0, '/org/openbmc/control/host0': 0, '/org/openbmc/control/flash/bios': 0}}
enter_state_callback = {'HOST_POWERED_ON': {'boot': {'bus_name': 'org.openbmc.control.Host', 'obj_name': '/org/openbmc/control/host0', 'interface_name': 'org.openbmc.control.Host'}}, 'HOST_POWERED_OFF': {'setOff': {'bus_name': 'org.openbmc.control.led', 'obj_name': '/org/openbmc/control/led/identify', 'interface_name': 'org.openbmc.Led'}}, 'BMC_READY': {'setOn': {'bus_name': 'org.openbmc.control.led', 'obj_name': '/org/openbmc/control/led/beep', 'interface_name': 'org.openbmc.Led'}, 'init': {'bus_name': 'org.openbmc.control.Flash', 'obj_name': '/org/openbmc/control/flash/bios', 'interface_name': 'org.openbmc.Flash'}}}
apps = {'startup_hacks': {'system_state': 'BASE_APPS', 'start_process': True, 'monitor_process': False, 'process_name': 'startup_hacks.sh'}, 'inventory': {'system_state': 'BMC_STARTING', 'start_process': True, 'monitor_process': True, 'process_name': 'inventory_items.py', 'args': [SYSTEM_NAME]}, 'hwmon': {'system_state': 'BMC_STARTING', 'start_process': True, 'monitor_process': True, 'process_name': 'hwmon.py', 'args': [SYSTEM_NAME]}, 'sensor_manager': {'system_state': 'BASE_APPS', 'start_process': True, 'monitor_process': True, 'process_name': 'sensor_manager2.py', 'args': [SYSTEM_NAME]}, 'host_watchdog': {'system_state': 'BMC_STARTING', 'start_process': True, 'monitor_process': True, 'process_name': 'host_watchdog.exe'}, 'power_control': {'system_state': 'BMC_STARTING', 'start_process': True, 'monitor_process': True, 'process_name': 'power_control.exe', 'args': ['3000', '10']}, 'power_button': {'system_state': 'BMC_STARTING', 'start_process': True, 'monitor_process': True, 'process_name': 'button_power.exe'}, 'reset_button': {'system_state': 'BMC_STARTING', 'start_process': True, 'monitor_process': True, 'process_name': 'button_reset.exe'}, 'led_control': {'system_state': 'BMC_STARTING', 'start_process': True, 'monitor_process': True, 'process_name': 'led_controller.exe'}, 'flash_control': {'system_state': 'BMC_STARTING', 'start_process': True, 'monitor_process': True, 'process_name': 'flash_bios.exe'}, 'bmc_flash_control': {'system_state': 'BMC_STARTING', 'start_process': True, 'monitor_process': True, 'process_name': 'bmc_update.py'}, 'download_manager': {'system_state': 'BMC_STARTING', 'start_process': True, 'monitor_process': True, 'process_name': 'download_manager.py', 'args': [SYSTEM_NAME]}, 'host_control': {'system_state': 'BMC_STARTING', 'start_process': True, 'monitor_process': True, 'process_name': 'control_host.exe'}, 'chassis_control': {'system_state': 'BMC_STARTING', 'start_process': True, 'monitor_process': True, 'process_name': 'chassis_control.py'}, 'restore': {'system_state': 'BMC_READY', 'start_process': True, 'monitor_process': False, 'process_name': 'discover_system_state.py'}, 'bmc_control': {'system_state': 'BMC_STARTING', 'start_process': True, 'monitor_process': True, 'process_name': 'control_bmc.exe'}}
cached_interfaces = {'org.openbmc.InventoryItem': True, 'org.openbmc.control.Chassis': True}
inventory_root = '/org/openbmc/inventory'
fru_instances = {'<inventory_root>/system': {'fru_type': 'SYSTEM', 'is_fru': True, 'present': 'True'}, '<inventory_root>/system/bios': {'fru_type': 'SYSTEM', 'is_fru': True, 'present': 'True'}, '<inventory_root>/system/misc': {'fru_type': 'SYSTEM', 'is_fru': False}, '<inventory_root>/system/chassis': {'fru_type': 'SYSTEM', 'is_fru': True, 'present': 'True'}, '<inventory_root>/system/chassis/motherboard': {'fru_type': 'MAIN_PLANAR', 'is_fru': True}, '<inventory_root>/system/systemevent': {'fru_type': 'SYSTEM_EVENT', 'is_fru': False}, '<inventory_root>/system/chassis/motherboard/refclock': {'fru_type': 'MAIN_PLANAR', 'is_fru': False}, '<inventory_root>/system/chassis/motherboard/pcieclock': {'fru_type': 'MAIN_PLANAR', 'is_fru': False}, '<inventory_root>/system/chassis/motherboard/todclock': {'fru_type': 'MAIN_PLANAR', 'is_fru': False}, '<inventory_root>/system/chassis/motherboard/apss': {'fru_type': 'MAIN_PLANAR', 'is_fru': False}, '<inventory_root>/system/chassis/fan0': {'fru_type': 'FAN', 'is_fru': True}, '<inventory_root>/system/chassis/fan1': {'fru_type': 'FAN', 'is_fru': True}, '<inventory_root>/system/chassis/fan2': {'fru_type': 'FAN', 'is_fru': True}, '<inventory_root>/system/chassis/fan3': {'fru_type': 'FAN', 'is_fru': True}, '<inventory_root>/system/chassis/motherboard/bmc': {'fru_type': 'BMC', 'is_fru': False, 'manufacturer': 'ASPEED'}, '<inventory_root>/system/chassis/motherboard/cpu0': {'fru_type': 'CPU', 'is_fru': True}, '<inventory_root>/system/chassis/motherboard/cpu1': {'fru_type': 'CPU', 'is_fru': True}, '<inventory_root>/system/chassis/motherboard/cpu0/core0': {'fru_type': 'CORE', 'is_fru': False}, '<inventory_root>/system/chassis/motherboard/cpu0/core1': {'fru_type': 'CORE', 'is_fru': False}, '<inventory_root>/system/chassis/motherboard/cpu0/core2': {'fru_type': 'CORE', 'is_fru': False}, '<inventory_root>/system/chassis/motherboard/cpu0/core3': {'fru_type': 'CORE', 'is_fru': False}, '<inventory_root>/system/chassis/motherboard/cpu0/core4': {'fru_type': 'CORE', 'is_fru': False}, '<inventory_root>/system/chassis/motherboard/cpu0/core5': {'fru_type': 'CORE', 'is_fru': False}, '<inventory_root>/system/chassis/motherboard/cpu0/core6': {'fru_type': 'CORE', 'is_fru': False}, '<inventory_root>/system/chassis/motherboard/cpu0/core7': {'fru_type': 'CORE', 'is_fru': False}, '<inventory_root>/system/chassis/motherboard/cpu0/core8': {'fru_type': 'CORE', 'is_fru': False}, '<inventory_root>/system/chassis/motherboard/cpu0/core9': {'fru_type': 'CORE', 'is_fru': False}, '<inventory_root>/system/chassis/motherboard/cpu0/core10': {'fru_type': 'CORE', 'is_fru': False}, '<inventory_root>/system/chassis/motherboard/cpu0/core11': {'fru_type': 'CORE', 'is_fru': False}, '<inventory_root>/system/chassis/motherboard/cpu1/core0': {'fru_type': 'CORE', 'is_fru': False}, '<inventory_root>/system/chassis/motherboard/cpu1/core1': {'fru_type': 'CORE', 'is_fru': False}, '<inventory_root>/system/chassis/motherboard/cpu1/core2': {'fru_type': 'CORE', 'is_fru': False}, '<inventory_root>/system/chassis/motherboard/cpu1/core3': {'fru_type': 'CORE', 'is_fru': False}, '<inventory_root>/system/chassis/motherboard/cpu1/core4': {'fru_type': 'CORE', 'is_fru': False}, '<inventory_root>/system/chassis/motherboard/cpu1/core5': {'fru_type': 'CORE', 'is_fru': False}, '<inventory_root>/system/chassis/motherboard/cpu1/core6': {'fru_type': 'CORE', 'is_fru': False}, '<inventory_root>/system/chassis/motherboard/cpu1/core7': {'fru_type': 'CORE', 'is_fru': False}, '<inventory_root>/system/chassis/motherboard/cpu1/core8': {'fru_type': 'CORE', 'is_fru': False}, '<inventory_root>/system/chassis/motherboard/cpu1/core9': {'fru_type': 'CORE', 'is_fru': False}, '<inventory_root>/system/chassis/motherboard/cpu1/core10': {'fru_type': 'CORE', 'is_fru': False}, '<inventory_root>/system/chassis/motherboard/cpu1/core11': {'fru_type': 'CORE', 'is_fru': False}, '<inventory_root>/system/chassis/motherboard/membuf0': {'fru_type': 'MEMORY_BUFFER', 'is_fru': False}, '<inventory_root>/system/chassis/motherboard/membuf1': {'fru_type': 'MEMORY_BUFFER', 'is_fru': False}, '<inventory_root>/system/chassis/motherboard/membuf2': {'fru_type': 'MEMORY_BUFFER', 'is_fru': False}, '<inventory_root>/system/chassis/motherboard/membuf3': {'fru_type': 'MEMORY_BUFFER', 'is_fru': False}, '<inventory_root>/system/chassis/motherboard/membuf4': {'fru_type': 'MEMORY_BUFFER', 'is_fru': False}, '<inventory_root>/system/chassis/motherboard/membuf5': {'fru_type': 'MEMORY_BUFFER', 'is_fru': False}, '<inventory_root>/system/chassis/motherboard/membuf6': {'fru_type': 'MEMORY_BUFFER', 'is_fru': False}, '<inventory_root>/system/chassis/motherboard/membuf7': {'fru_type': 'MEMORY_BUFFER', 'is_fru': False}, '<inventory_root>/system/chassis/motherboard/dimm0': {'fru_type': 'DIMM', 'is_fru': True}, '<inventory_root>/system/chassis/motherboard/dimm1': {'fru_type': 'DIMM', 'is_fru': True}, '<inventory_root>/system/chassis/motherboard/dimm2': {'fru_type': 'DIMM', 'is_fru': True}, '<inventory_root>/system/chassis/motherboard/dimm3': {'fru_type': 'DIMM', 'is_fru': True}, '<inventory_root>/system/chassis/motherboard/dimm4': {'fru_type': 'DIMM', 'is_fru': True}, '<inventory_root>/system/chassis/motherboard/dimm5': {'fru_type': 'DIMM', 'is_fru': True}, '<inventory_root>/system/chassis/motherboard/dimm6': {'fru_type': 'DIMM', 'is_fru': True}, '<inventory_root>/system/chassis/motherboard/dimm7': {'fru_type': 'DIMM', 'is_fru': True}, '<inventory_root>/system/chassis/motherboard/dimm8': {'fru_type': 'DIMM', 'is_fru': True}, '<inventory_root>/system/chassis/motherboard/dimm9': {'fru_type': 'DIMM', 'is_fru': True}, '<inventory_root>/system/chassis/motherboard/dimm10': {'fru_type': 'DIMM', 'is_fru': True}, '<inventory_root>/system/chassis/motherboard/dimm11': {'fru_type': 'DIMM', 'is_fru': True}, '<inventory_root>/system/chassis/motherboard/dimm12': {'fru_type': 'DIMM', 'is_fru': True}, '<inventory_root>/system/chassis/motherboard/dimm13': {'fru_type': 'DIMM', 'is_fru': True}, '<inventory_root>/system/chassis/motherboard/dimm14': {'fru_type': 'DIMM', 'is_fru': True}, '<inventory_root>/system/chassis/motherboard/dimm15': {'fru_type': 'DIMM', 'is_fru': True}, '<inventory_root>/system/chassis/motherboard/dimm16': {'fru_type': 'DIMM', 'is_fru': True}, '<inventory_root>/system/chassis/motherboard/dimm17': {'fru_type': 'DIMM', 'is_fru': True}, '<inventory_root>/system/chassis/motherboard/dimm18': {'fru_type': 'DIMM', 'is_fru': True}, '<inventory_root>/system/chassis/motherboard/dimm19': {'fru_type': 'DIMM', 'is_fru': True}, '<inventory_root>/system/chassis/motherboard/dimm20': {'fru_type': 'DIMM', 'is_fru': True}, '<inventory_root>/system/chassis/motherboard/dimm21': {'fru_type': 'DIMM', 'is_fru': True}, '<inventory_root>/system/chassis/motherboard/dimm22': {'fru_type': 'DIMM', 'is_fru': True}, '<inventory_root>/system/chassis/motherboard/dimm23': {'fru_type': 'DIMM', 'is_fru': True}, '<inventory_root>/system/chassis/motherboard/dimm24': {'fru_type': 'DIMM', 'is_fru': True}, '<inventory_root>/system/chassis/motherboard/dimm25': {'fru_type': 'DIMM', 'is_fru': True}, '<inventory_root>/system/chassis/motherboard/dimm26': {'fru_type': 'DIMM', 'is_fru': True}, '<inventory_root>/system/chassis/motherboard/dimm27': {'fru_type': 'DIMM', 'is_fru': True}, '<inventory_root>/system/chassis/motherboard/dimm28': {'fru_type': 'DIMM', 'is_fru': True}, '<inventory_root>/system/chassis/motherboard/dimm29': {'fru_type': 'DIMM', 'is_fru': True}, '<inventory_root>/system/chassis/motherboard/dimm30': {'fru_type': 'DIMM', 'is_fru': True}, '<inventory_root>/system/chassis/motherboard/dimm31': {'fru_type': 'DIMM', 'is_fru': True}}
id_lookup = {'FRU': {1: '<inventory_root>/system/chassis/motherboard/cpu0', 2: '<inventory_root>/system/chassis/motherboard/cpu1', 3: '<inventory_root>/system/chassis/motherboard', 4: '<inventory_root>/system/chassis/motherboard/membuf0', 5: '<inventory_root>/system/chassis/motherboard/membuf1', 6: '<inventory_root>/system/chassis/motherboard/membuf2', 7: '<inventory_root>/system/chassis/motherboard/membuf3', 8: '<inventory_root>/system/chassis/motherboard/membuf4', 9: '<inventory_root>/system/chassis/motherboard/membuf5', 12: '<inventory_root>/system/chassis/motherboard/dimm0', 13: '<inventory_root>/system/chassis/motherboard/dimm1', 14: '<inventory_root>/system/chassis/motherboard/dimm2', 15: '<inventory_root>/system/chassis/motherboard/dimm3', 16: '<inventory_root>/system/chassis/motherboard/dimm4', 17: '<inventory_root>/system/chassis/motherboard/dimm5', 18: '<inventory_root>/system/chassis/motherboard/dimm6', 19: '<inventory_root>/system/chassis/motherboard/dimm7', 20: '<inventory_root>/system/chassis/motherboard/dimm8', 21: '<inventory_root>/system/chassis/motherboard/dimm9', 22: '<inventory_root>/system/chassis/motherboard/dimm10', 23: '<inventory_root>/system/chassis/motherboard/dimm11', 24: '<inventory_root>/system/chassis/motherboard/dimm12', 25: '<inventory_root>/system/chassis/motherboard/dimm13', 26: '<inventory_root>/system/chassis/motherboard/dimm14', 27: '<inventory_root>/system/chassis/motherboard/dimm15', 28: '<inventory_root>/system/chassis/motherboard/dimm16', 29: '<inventory_root>/system/chassis/motherboard/dimm17', 30: '<inventory_root>/system/chassis/motherboard/dimm18', 31: '<inventory_root>/system/chassis/motherboard/dimm19', 32: '<inventory_root>/system/chassis/motherboard/dimm20', 33: '<inventory_root>/system/chassis/motherboard/dimm21', 34: '<inventory_root>/system/chassis/motherboard/dimm22', 35: '<inventory_root>/system/chassis/motherboard/dimm23', 36: '<inventory_root>/system/chassis/motherboard/dimm24', 37: '<inventory_root>/system/chassis/motherboard/dimm25', 38: '<inventory_root>/system/chassis/motherboard/dimm26', 39: '<inventory_root>/system/chassis/motherboard/dimm27', 40: '<inventory_root>/system/chassis/motherboard/dimm28', 41: '<inventory_root>/system/chassis/motherboard/dimm29', 42: '<inventory_root>/system/chassis/motherboard/dimm30', 43: '<inventory_root>/system/chassis/motherboard/dimm31'}, 'FRU_STR': {'PRODUCT_0': '<inventory_root>/system/bios', 'BOARD_1': '<inventory_root>/system/chassis/motherboard/cpu0', 'BOARD_2': '<inventory_root>/system/chassis/motherboard/cpu1', 'CHASSIS_3': '<inventory_root>/system/chassis/motherboard', 'BOARD_3': '<inventory_root>/system/misc', 'BOARD_4': '<inventory_root>/system/chassis/motherboard/membuf0', 'BOARD_5': '<inventory_root>/system/chassis/motherboard/membuf1', 'BOARD_6': '<inventory_root>/system/chassis/motherboard/membuf2', 'BOARD_7': '<inventory_root>/system/chassis/motherboard/membuf3', 'BOARD_8': '<inventory_root>/system/chassis/motherboard/membuf4', 'BOARD_9': '<inventory_root>/system/chassis/motherboard/membuf5', 'BOARD_10': '<inventory_root>/system/chassis/motherboard/membuf6', 'BOARD_11': '<inventory_root>/system/chassis/motherboard/membuf7', 'PRODUCT_12': '<inventory_root>/system/chassis/motherboard/dimm0', 'PRODUCT_13': '<inventory_root>/system/chassis/motherboard/dimm1', 'PRODUCT_14': '<inventory_root>/system/chassis/motherboard/dimm2', 'PRODUCT_15': '<inventory_root>/system/chassis/motherboard/dimm3', 'PRODUCT_16': '<inventory_root>/system/chassis/motherboard/dimm4', 'PRODUCT_17': '<inventory_root>/system/chassis/motherboard/dimm5', 'PRODUCT_18': '<inventory_root>/system/chassis/motherboard/dimm6', 'PRODUCT_19': '<inventory_root>/system/chassis/motherboard/dimm7', 'PRODUCT_20': '<inventory_root>/system/chassis/motherboard/dimm8', 'PRODUCT_21': '<inventory_root>/system/chassis/motherboard/dimm9', 'PRODUCT_22': '<inventory_root>/system/chassis/motherboard/dimm10', 'PRODUCT_23': '<inventory_root>/system/chassis/motherboard/dimm11', 'PRODUCT_24': '<inventory_root>/system/chassis/motherboard/dimm12', 'PRODUCT_25': '<inventory_root>/system/chassis/motherboard/dimm13', 'PRODUCT_26': '<inventory_root>/system/chassis/motherboard/dimm14', 'PRODUCT_27': '<inventory_root>/system/chassis/motherboard/dimm15', 'PRODUCT_28': '<inventory_root>/system/chassis/motherboard/dimm16', 'PRODUCT_29': '<inventory_root>/system/chassis/motherboard/dimm17', 'PRODUCT_30': '<inventory_root>/system/chassis/motherboard/dimm18', 'PRODUCT_31': '<inventory_root>/system/chassis/motherboard/dimm19', 'PRODUCT_32': '<inventory_root>/system/chassis/motherboard/dimm20', 'PRODUCT_33': '<inventory_root>/system/chassis/motherboard/dimm21', 'PRODUCT_34': '<inventory_root>/system/chassis/motherboard/dimm22', 'PRODUCT_35': '<inventory_root>/system/chassis/motherboard/dimm23', 'PRODUCT_36': '<inventory_root>/system/chassis/motherboard/dimm24', 'PRODUCT_37': '<inventory_root>/system/chassis/motherboard/dimm25', 'PRODUCT_38': '<inventory_root>/system/chassis/motherboard/dimm26', 'PRODUCT_39': '<inventory_root>/system/chassis/motherboard/dimm27', 'PRODUCT_40': '<inventory_root>/system/chassis/motherboard/dimm28', 'PRODUCT_41': '<inventory_root>/system/chassis/motherboard/dimm29', 'PRODUCT_42': '<inventory_root>/system/chassis/motherboard/dimm30', 'PRODUCT_43': '<inventory_root>/system/chassis/motherboard/dimm31', 'PRODUCT_47': '<inventory_root>/system/misc'}, 'SENSOR': {4: '/org/openbmc/sensors/host/HostStatus', 5: '/org/openbmc/sensors/host/BootProgress', 8: '/org/openbmc/sensors/host/cpu0/OccStatus', 9: '/org/openbmc/sensors/host/cpu1/OccStatus', 12: '<inventory_root>/system/chassis/motherboard/cpu0', 14: '<inventory_root>/system/chassis/motherboard/cpu1', 30: '<inventory_root>/system/chassis/motherboard/dimm3', 31: '<inventory_root>/system/chassis/motherboard/dimm2', 32: '<inventory_root>/system/chassis/motherboard/dimm1', 33: '<inventory_root>/system/chassis/motherboard/dimm0', 34: '<inventory_root>/system/chassis/motherboard/dimm7', 35: '<inventory_root>/system/chassis/motherboard/dimm6', 36: '<inventory_root>/system/chassis/motherboard/dimm5', 37: '<inventory_root>/system/chassis/motherboard/dimm4', 38: '<inventory_root>/system/chassis/motherboard/dimm11', 39: '<inventory_root>/system/chassis/motherboard/dimm10', 40: '<inventory_root>/system/chassis/motherboard/dimm9', 41: '<inventory_root>/system/chassis/motherboard/dimm8', 42: '<inventory_root>/system/chassis/motherboard/dimm15', 43: '<inventory_root>/system/chassis/motherboard/dimm14', 44: '<inventory_root>/system/chassis/motherboard/dimm13', 45: '<inventory_root>/system/chassis/motherboard/dimm12', 46: '<inventory_root>/system/chassis/motherboard/dimm19', 47: '<inventory_root>/system/chassis/motherboard/dimm18', 48: '<inventory_root>/system/chassis/motherboard/dimm17', 49: '<inventory_root>/system/chassis/motherboard/dimm16', 50: '<inventory_root>/system/chassis/motherboard/dimm23', 51: '<inventory_root>/system/chassis/motherboard/dimm22', 52: '<inventory_root>/system/chassis/motherboard/dimm21', 53: '<inventory_root>/system/chassis/motherboard/dimm20', 54: '<inventory_root>/system/chassis/motherboard/dimm27', 55: '<inventory_root>/system/chassis/motherboard/dimm26', 56: '<inventory_root>/system/chassis/motherboard/dimm25', 57: '<inventory_root>/system/chassis/motherboard/dimm24', 58: '<inventory_root>/system/chassis/motherboard/dimm31', 59: '<inventory_root>/system/chassis/motherboard/dimm30', 60: '<inventory_root>/system/chassis/motherboard/dimm29', 61: '<inventory_root>/system/chassis/motherboard/dimm28', 62: '<inventory_root>/system/chassis/motherboard/cpu0/core0', 63: '<inventory_root>/system/chassis/motherboard/cpu0/core1', 64: '<inventory_root>/system/chassis/motherboard/cpu0/core2', 65: '<inventory_root>/system/chassis/motherboard/cpu0/core3', 66: '<inventory_root>/system/chassis/motherboard/cpu0/core4', 67: '<inventory_root>/system/chassis/motherboard/cpu0/core5', 68: '<inventory_root>/system/chassis/motherboard/cpu0/core6', 69: '<inventory_root>/system/chassis/motherboard/cpu0/core7', 70: '<inventory_root>/system/chassis/motherboard/cpu0/core8', 71: '<inventory_root>/system/chassis/motherboard/cpu0/core9', 72: '<inventory_root>/system/chassis/motherboard/cpu0/core10', 73: '<inventory_root>/system/chassis/motherboard/cpu0/core11', 74: '<inventory_root>/system/chassis/motherboard/cpu1/core0', 75: '<inventory_root>/system/chassis/motherboard/cpu1/core1', 76: '<inventory_root>/system/chassis/motherboard/cpu1/core2', 77: '<inventory_root>/system/chassis/motherboard/cpu1/core3', 78: '<inventory_root>/system/chassis/motherboard/cpu1/core4', 79: '<inventory_root>/system/chassis/motherboard/cpu1/core5', 80: '<inventory_root>/system/chassis/motherboard/cpu1/core6', 81: '<inventory_root>/system/chassis/motherboard/cpu1/core7', 82: '<inventory_root>/system/chassis/motherboard/cpu1/core8', 83: '<inventory_root>/system/chassis/motherboard/cpu1/core9', 84: '<inventory_root>/system/chassis/motherboard/cpu1/core10', 85: '<inventory_root>/system/chassis/motherboard/cpu1/core11', 86: '<inventory_root>/system/chassis/motherboard/membuf0', 87: '<inventory_root>/system/chassis/motherboard/membuf1', 88: '<inventory_root>/system/chassis/motherboard/membuf2', 89: '<inventory_root>/system/chassis/motherboard/membuf3', 90: '<inventory_root>/system/chassis/motherboard/membuf4', 91: '<inventory_root>/system/chassis/motherboard/membuf5', 92: '<inventory_root>/system/chassis/motherboard/membuf6', 93: '<inventory_root>/system/chassis/motherboard/membuf7', 95: '/org/openbmc/sensors/host/BootCount', 96: '<inventory_root>/system/chassis/motherboard', 97: '<inventory_root>/system/systemevent', 98: '<inventory_root>/system/powerlimit', 99: '<inventory_root>/system/chassis/motherboard/refclock', 100: '<inventory_root>/system/chassis/motherboard/pcieclock', 177: '<inventory_root>/system/chassis/motherboard/todclock', 178: '<inventory_root>/system/chassis/motherboard/apss', 179: '/org/openbmc/sensors/host/powercap', 181: '/org/openbmc/sensors/host/OperatingSystemStatus', 182: '<inventory_root>/system/chassis/motherboard/pcielink'}, 'GPIO_PRESENT': {}}
gpio_config = {}
GPIO_CONFIG['BMC_POWER_UP'] = {'gpio_pin': 'D1', 'direction': 'out'}
GPIO_CONFIG['SYS_PWROK_BUFF'] = {'gpio_pin': 'D2', 'direction': 'in'}
GPIO_CONFIG['BMC_WD_CLEAR_PULSE_N'] = {'gpio_pin': 'N4', 'direction': 'out'}
GPIO_CONFIG['CM1_OE_R_N'] = {'gpio_pin': 'Q6', 'direction': 'out'}
GPIO_CONFIG['BMC_CP0_RESET_N'] = {'gpio_pin': 'O2', 'direction': 'out'}
GPIO_CONFIG['BMC_CFAM_RESET_N_R'] = {'gpio_pin': 'J2', 'direction': 'out'}
GPIO_CONFIG['PEX8718_DEVICES_RESET_N'] = {'gpio_pin': 'B6', 'direction': 'out'}
GPIO_CONFIG['CP0_DEVICES_RESET_N'] = {'gpio_pin': 'N3', 'direction': 'out'}
GPIO_CONFIG['CP1_DEVICES_RESET_N'] = {'gpio_pin': 'N5', 'direction': 'out'}
GPIO_CONFIG['FSI_DATA'] = {'gpio_pin': 'A5', 'direction': 'out'}
GPIO_CONFIG['FSI_CLK'] = {'gpio_pin': 'A4', 'direction': 'out'}
GPIO_CONFIG['FSI_ENABLE'] = {'gpio_pin': 'D0', 'direction': 'out'}
GPIO_CONFIG['CRONUS_SEL'] = {'gpio_pin': 'A6', 'direction': 'out'}
GPIO_CONFIG['BMC_THROTTLE'] = {'gpio_pin': 'J3', 'direction': 'out'}
GPIO_CONFIG['IDBTN'] = {'gpio_pin': 'Q7', 'direction': 'out'}
GPIO_CONFIG['POWER_BUTTON'] = {'gpio_pin': 'E0', 'direction': 'both'}
GPIO_CONFIG['RESET_BUTTON'] = {'gpio_pin': 'E4', 'direction': 'both'}
GPIO_CONFIG['PS0_PRES_N'] = {'gpio_pin': 'P7', 'direction': 'in'}
GPIO_CONFIG['PS1_PRES_N'] = {'gpio_pin': 'N0', 'direction': 'in'}
GPIO_CONFIG['CARD_PRES_N'] = {'gpio_pin': 'J0', 'direction': 'in'}
def convert_gpio(name):
name = name.upper()
c = name[0:1]
offset = int(name[1:])
a = ord(c) - 65
base = a * 8 + GPIO_BASE
return base + offset
hwmon_config = {'4-0050': {'names': {'caps_curr_powercap': {'object_path': 'powercap/curr_cap', 'poll_interval': 10000, 'scale': 1, 'units': 'W'}, 'caps_curr_powerreading': {'object_path': 'powercap/system_power', 'poll_interval': 10000, 'scale': 1, 'units': 'W'}, 'caps_max_powercap': {'object_path': 'powercap/max_cap', 'poll_interval': 10000, 'scale': 1, 'units': 'W'}, 'caps_min_powercap': {'object_path': 'powercap/min_cap', 'poll_interval': 10000, 'scale': 1, 'units': 'W'}, 'caps_norm_powercap': {'object_path': 'powercap/n_cap', 'poll_interval': 10000, 'scale': 1, 'units': 'W'}, 'caps_user_powerlimit': {'object_path': 'powercap/user_cap', 'poll_interval': 10000, 'scale': 1, 'units': 'W'}}, 'labels': {'176': {'object_path': 'temperature/cpu0/core0', 'poll_interval': 5000, 'scale': 1000, 'units': 'C', 'critical_upper': 100, 'critical_lower': -100, 'warning_upper': 90, 'warning_lower': -99, 'emergency_enabled': True}, '177': {'object_path': 'temperature/cpu0/core1', 'poll_interval': 5000, 'scale': 1000, 'units': 'C', 'critical_upper': 100, 'critical_lower': -100, 'warning_upper': 90, 'warning_lower': -99, 'emergency_enabled': True}, '178': {'object_path': 'temperature/cpu0/core2', 'poll_interval': 5000, 'scale': 1000, 'units': 'C', 'critical_upper': 100, 'critical_lower': -100, 'warning_upper': 90, 'warning_lower': -99, 'emergency_enabled': True}, '179': {'object_path': 'temperature/cpu0/core3', 'poll_interval': 5000, 'scale': 1000, 'units': 'C', 'critical_upper': 100, 'critical_lower': -100, 'warning_upper': 90, 'warning_lower': -99, 'emergency_enabled': True}, '180': {'object_path': 'temperature/cpu0/core4', 'poll_interval': 5000, 'scale': 1000, 'units': 'C', 'critical_upper': 100, 'critical_lower': -100, 'warning_upper': 90, 'warning_lower': -99, 'emergency_enabled': True}, '181': {'object_path': 'temperature/cpu0/core5', 'poll_interval': 5000, 'scale': 1000, 'units': 'C', 'critical_upper': 100, 'critical_lower': -100, 'warning_upper': 90, 'warning_lower': -99, 'emergency_enabled': True}, '182': {'object_path': 'temperature/cpu0/core6', 'poll_interval': 5000, 'scale': 1000, 'units': 'C', 'critical_upper': 100, 'critical_lower': -100, 'warning_upper': 90, 'warning_lower': -99, 'emergency_enabled': True}, '183': {'object_path': 'temperature/cpu0/core7', 'poll_interval': 5000, 'scale': 1000, 'units': 'C', 'critical_upper': 100, 'critical_lower': -100, 'warning_upper': 90, 'warning_lower': -99, 'emergency_enabled': True}, '184': {'object_path': 'temperature/cpu0/core8', 'poll_interval': 5000, 'scale': 1000, 'units': 'C', 'critical_upper': 100, 'critical_lower': -100, 'warning_upper': 90, 'warning_lower': -99, 'emergency_enabled': True}, '185': {'object_path': 'temperature/cpu0/core9', 'poll_interval': 5000, 'scale': 1000, 'units': 'C', 'critical_upper': 100, 'critical_lower': -100, 'warning_upper': 90, 'warning_lower': -99, 'emergency_enabled': True}, '186': {'object_path': 'temperature/cpu0/core10', 'poll_interval': 5000, 'scale': 1000, 'units': 'C', 'critical_upper': 100, 'critical_lower': -100, 'warning_upper': 90, 'warning_lower': -99, 'emergency_enabled': True}, '187': {'object_path': 'temperature/cpu0/core11', 'poll_interval': 5000, 'scale': 1000, 'units': 'C', 'critical_upper': 100, 'critical_lower': -100, 'warning_upper': 90, 'warning_lower': -99, 'emergency_enabled': True}, '102': {'object_path': 'temperature/dimm0', 'poll_interval': 5000, 'scale': 1000, 'units': 'C'}, '103': {'object_path': 'temperature/dimm1', 'poll_interval': 5000, 'scale': 1000, 'units': 'C'}, '104': {'object_path': 'temperature/dimm2', 'poll_interval': 5000, 'scale': 1000, 'units': 'C'}, '105': {'object_path': 'temperature/dimm3', 'poll_interval': 5000, 'scale': 1000, 'units': 'C'}, '106': {'object_path': 'temperature/dimm4', 'poll_interval': 5000, 'scale': 1000, 'units': 'C'}, '107': {'object_path': 'temperature/dimm5', 'poll_interval': 5000, 'scale': 1000, 'units': 'C'}, '108': {'object_path': 'temperature/dimm6', 'poll_interval': 5000, 'scale': 1000, 'units': 'C'}, '109': {'object_path': 'temperature/dimm7', 'poll_interval': 5000, 'scale': 1000, 'units': 'C'}, '110': {'object_path': 'temperature/dimm8', 'poll_interval': 5000, 'scale': 1000, 'units': 'C'}, '111': {'object_path': 'temperature/dimm9', 'poll_interval': 5000, 'scale': 1000, 'units': 'C'}, '112': {'object_path': 'temperature/dimm10', 'poll_interval': 5000, 'scale': 1000, 'units': 'C'}, '113': {'object_path': 'temperature/dimm11', 'poll_interval': 5000, 'scale': 1000, 'units': 'C'}, '114': {'object_path': 'temperature/dimm12', 'poll_interval': 5000, 'scale': 1000, 'units': 'C'}, '115': {'object_path': 'temperature/dimm13', 'poll_interval': 5000, 'scale': 1000, 'units': 'C'}, '116': {'object_path': 'temperature/dimm14', 'poll_interval': 5000, 'scale': 1000, 'units': 'C'}, '117': {'object_path': 'temperature/dimm15', 'poll_interval': 5000, 'scale': 1000, 'units': 'C'}, '94': {'object_path': 'temperature/membuf0', 'poll_interval': 5000, 'scale': 1000, 'units': 'C'}, '95': {'object_path': 'temperature/membuf1', 'poll_interval': 5000, 'scale': 1000, 'units': 'C'}, '96': {'object_path': 'temperature/membuf2', 'poll_interval': 5000, 'scale': 1000, 'units': 'C'}, '97': {'object_path': 'temperature/membuf3', 'poll_interval': 5000, 'scale': 1000, 'units': 'C'}}}, '5-0050': {'labels': {'188': {'object_path': 'temperature/cpu1/core0', 'poll_interval': 5000, 'scale': 1000, 'units': 'C', 'critical_upper': 100, 'critical_lower': -100, 'warning_upper': 90, 'warning_lower': -99, 'emergency_enabled': True}, '189': {'object_path': 'temperature/cpu1/core1', 'poll_interval': 5000, 'scale': 1000, 'units': 'C', 'critical_upper': 100, 'critical_lower': -100, 'warning_upper': 90, 'warning_lower': -99, 'emergency_enabled': True}, '190': {'object_path': 'temperature/cpu1/core2', 'poll_interval': 5000, 'scale': 1000, 'units': 'C', 'critical_upper': 100, 'critical_lower': -100, 'warning_upper': 90, 'warning_lower': -99, 'emergency_enabled': True}, '191': {'object_path': 'temperature/cpu1/core3', 'poll_interval': 5000, 'scale': 1000, 'units': 'C', 'critical_upper': 100, 'critical_lower': -100, 'warning_upper': 90, 'warning_lower': -99, 'emergency_enabled': True}, '192': {'object_path': 'temperature/cpu1/core4', 'poll_interval': 5000, 'scale': 1000, 'units': 'C', 'critical_upper': 100, 'critical_lower': -100, 'warning_upper': 90, 'warning_lower': -99, 'emergency_enabled': True}, '193': {'object_path': 'temperature/cpu1/core5', 'poll_interval': 5000, 'scale': 1000, 'units': 'C', 'critical_upper': 100, 'critical_lower': -100, 'warning_upper': 90, 'warning_lower': -99, 'emergency_enabled': True}, '194': {'object_path': 'temperature/cpu1/core6', 'poll_interval': 5000, 'scale': 1000, 'units': 'C', 'critical_upper': 100, 'critical_lower': -100, 'warning_upper': 90, 'warning_lower': -99, 'emergency_enabled': True}, '195': {'object_path': 'temperature/cpu1/core7', 'poll_interval': 5000, 'scale': 1000, 'units': 'C', 'critical_upper': 100, 'critical_lower': -100, 'warning_upper': 90, 'warning_lower': -99, 'emergency_enabled': True}, '196': {'object_path': 'temperature/cpu1/core8', 'poll_interval': 5000, 'scale': 1000, 'units': 'C', 'critical_upper': 100, 'critical_lower': -100, 'warning_upper': 90, 'warning_lower': -99, 'emergency_enabled': True}, '197': {'object_path': 'temperature/cpu1/core9', 'poll_interval': 5000, 'scale': 1000, 'units': 'C', 'critical_upper': 100, 'critical_lower': -100, 'warning_upper': 90, 'warning_lower': -99, 'emergency_enabled': True}, '198': {'object_path': 'temperature/cpu1/core10', 'poll_interval': 5000, 'scale': 1000, 'units': 'C', 'critical_upper': 100, 'critical_lower': -100, 'warning_upper': 90, 'warning_lower': -99, 'emergency_enabled': True}, '199': {'object_path': 'temperature/cpu1/core11', 'poll_interval': 5000, 'scale': 1000, 'units': 'C', 'critical_upper': 100, 'critical_lower': -100, 'warning_upper': 90, 'warning_lower': -99, 'emergency_enabled': True}, '118': {'object_path': 'temperature/dimm16', 'poll_interval': 5000, 'scale': 1000, 'units': 'C'}, '119': {'object_path': 'temperature/dimm17', 'poll_interval': 5000, 'scale': 1000, 'units': 'C'}, '120': {'object_path': 'temperature/dimm18', 'poll_interval': 5000, 'scale': 1000, 'units': 'C'}, '121': {'object_path': 'temperature/dimm19', 'poll_interval': 5000, 'scale': 1000, 'units': 'C'}, '122': {'object_path': 'temperature/dimm20', 'poll_interval': 5000, 'scale': 1000, 'units': 'C'}, '123': {'object_path': 'temperature/dimm21', 'poll_interval': 5000, 'scale': 1000, 'units': 'C'}, '124': {'object_path': 'temperature/dimm22', 'poll_interval': 5000, 'scale': 1000, 'units': 'C'}, '125': {'object_path': 'temperature/dimm23', 'poll_interval': 5000, 'scale': 1000, 'units': 'C'}, '126': {'object_path': 'temperature/dimm24', 'poll_interval': 5000, 'scale': 1000, 'units': 'C'}, '127': {'object_path': 'temperature/dimm25', 'poll_interval': 5000, 'scale': 1000, 'units': 'C'}, '128': {'object_path': 'temperature/dimm26', 'poll_interval': 5000, 'scale': 1000, 'units': 'C'}, '129': {'object_path': 'temperature/dimm27', 'poll_interval': 5000, 'scale': 1000, 'units': 'C'}, '130': {'object_path': 'temperature/dimm28', 'poll_interval': 5000, 'scale': 1000, 'units': 'C'}, '131': {'object_path': 'temperature/dimm29', 'poll_interval': 5000, 'scale': 1000, 'units': 'C'}, '132': {'object_path': 'temperature/dimm30', 'poll_interval': 5000, 'scale': 1000, 'units': 'C'}, '133': {'object_path': 'temperature/dimm31', 'poll_interval': 5000, 'scale': 1000, 'units': 'C'}, '98': {'object_path': 'temperature/membuf4', 'poll_interval': 5000, 'scale': 1000, 'units': 'C'}, '99': {'object_path': 'temperature/membuf5', 'poll_interval': 5000, 'scale': 1000, 'units': 'C'}, '100': {'object_path': 'temperature/membuf6', 'poll_interval': 5000, 'scale': 1000, 'units': 'C'}, '101': {'object_path': 'temperature/membuf7', 'poll_interval': 5000, 'scale': 1000, 'units': 'C'}}}}
misc_sensors = {95: {'class': 'BootCountSensor'}, 5: {'class': 'BootProgressSensor'}, 8: {'class': 'OccStatusSensor', 'os_path': '/sys/class/i2c-adapter/i2c-3/3-0050/online'}, 9: {'class': 'OccStatusSensor', 'os_path': '/sys/class/i2c-adapter/i2c-3/3-0051/online'}, 181: {'class': 'OperatingSystemStatusSensor'}, 179: {'class': 'PowerCap', 'os_path': '/sys/class/hwmon/hwmon3/user_powercap'}} |
A,B,C,D = map(float,input().split())
A = (A*2+B*3+C*4+D*1)/10
print(f'Media: {A:.1f}')
if A>=7.0:
print("Aluno aprovado.")
elif A<5.0:
print("Aluno reprovado.")
elif A>=5.0 and A<7.0:
print("Aluno em exame.")
N = float(input())
print(f'Nota do exame: {N:.1f}')
N = (A+N)/2
if N>=5.0:
print("Aluno aprovado.")
print(f'Media final: {N:.1f}')
else:
print("Aluno reprovado.")
print(f'Media final: {N:.1f}') | (a, b, c, d) = map(float, input().split())
a = (A * 2 + B * 3 + C * 4 + D * 1) / 10
print(f'Media: {A:.1f}')
if A >= 7.0:
print('Aluno aprovado.')
elif A < 5.0:
print('Aluno reprovado.')
elif A >= 5.0 and A < 7.0:
print('Aluno em exame.')
n = float(input())
print(f'Nota do exame: {N:.1f}')
n = (A + N) / 2
if N >= 5.0:
print('Aluno aprovado.')
print(f'Media final: {N:.1f}')
else:
print('Aluno reprovado.')
print(f'Media final: {N:.1f}') |
# this file contains the ascii art for our equipment
# HELMET
#
#
# SHIELD ARMOR WEAPON
#
#
# OTHER ITEMS ......
equipment = {'sword':[ ' /\ ',
' || ',
' || ',
' || ',
' || ',
' || ',
' || ',
' || ',
' || ',
' || ',
' || ',
' || ',
' || ',
'o==o',
' II ',
' II ',
' II ',
' ** ',
],
'shield':[ ' | `-._/\_.-` |',
' | || |',
' | ___o()o___ |',
' | __((<>))__ |',
' | ___o()o___ |',
' | \/ |',
' \ o\/o /',
' \ || /',
' \ || /',
' ".||."',
],
'helmet': [ ' _,. ',
' ,` -.) ',
r' ( _/-\\-._ ',
' /,|`--._,-^|',
' \_| |`-._/||',
' | `-, / |',
' | || |',
' `r-._||/ ',
],
'armor': [ ' /-\__________/-\ ',
r' / \\ ||| ; \ ',
r' /_____\....::../\\ \ ',
' _/____/# \___,,__/--\_\ ',
' /____/ ######## \/\__\ ',
' /____/ ####### .\___\ ',
],
'staff': [ " .||, ",
" \.`',/ ",
" = ,. = ",
" / || \ ",
" || ",
" || ",
" || ",
" || ",
" || ",
" || ",
" || ",
" || ",
" || ",
" || ",
" || ",
" || ",
" || ",
" || ",
],
'axe':[ ' /-./\_',
' : ||,>',
' \.--||',
' ||',
' ||',
' ||',
' ||',
' ||',
' ||',
' ||',
' ||',
' ||',
' ||',
' ||',
' ||',
' ||',
' ||',
],
}
| equipment = {'sword': [' /\\ ', ' || ', ' || ', ' || ', ' || ', ' || ', ' || ', ' || ', ' || ', ' || ', ' || ', ' || ', ' || ', 'o==o', ' II ', ' II ', ' II ', ' ** '], 'shield': [' | `-._/\\_.-` |', ' | || |', ' | ___o()o___ |', ' | __((<>))__ |', ' | ___o()o___ |', ' | \\/ |', ' \\ o\\/o /', ' \\ || /', ' \\ || /', ' ".||."'], 'helmet': [' _,. ', ' ,` -.) ', ' ( _/-\\\\-._ ', ' /,|`--._,-^|', ' \\_| |`-._/||', ' | `-, / |', ' | || |', ' `r-._||/ '], 'armor': [' /-\\__________/-\\ ', ' / \\\\ ||| ; \\ ', ' /_____\\....::../\\\\ \\ ', ' _/____/# \\___,,__/--\\_\\ ', ' /____/ ######## \\/\\__\\ ', ' /____/ ####### .\\___\\ '], 'staff': [' .||, ', " \\.`',/ ", ' = ,. = ', ' / || \\ ', ' || ', ' || ', ' || ', ' || ', ' || ', ' || ', ' || ', ' || ', ' || ', ' || ', ' || ', ' || ', ' || ', ' || '], 'axe': [' /-./\\_', ' : ||,>', ' \\.--||', ' ||', ' ||', ' ||', ' ||', ' ||', ' ||', ' ||', ' ||', ' ||', ' ||', ' ||', ' ||', ' ||', ' ||']} |
'''
Given a fixed length array arr of integers, duplicate each occurrence of zero, shifting the remaining elements to the right.
Note that elements beyond the length of the original array are not written.
Do the above modifications to the input array in place, do not return anything from your function.
Example 1:
Input: [1,0,2,3,0,4,5,0]
Output: null
Explanation: After calling your function, the input array is modified to: [1,0,0,2,3,0,0,4]
Example 2:
Input: [1,2,3]
Output: null
Explanation: After calling your function, the input array is modified to: [1,2,3]
'''
def duplicateZeros2(arr):
z=1
for i in range(1,len(arr)):
if z<len(arr):
print("z is ",z, "and arr[i-1] is ",arr[i-1])
if arr[z-1]==0:
j=len(arr)-1
while j!=z:
arr[j]=arr[j-1]
j-=1
arr[j]=0
z+=1
print(arr)
z+=1
print(arr)
def duplicateZeros(arr):
i=1
while i<len(arr):
print("in while, i is ", i)
if arr[i-1]==0:
arr.insert(i,0)
arr.pop()
i+=1
i+=1
print(arr)
# print(duplicateZeros([1,0,2,3,0,4,5,0]))
print(duplicateZeros([1,5,2,0,6,8,0,6,0]))
# print(duplicateZeros([1,2,3])) | """
Given a fixed length array arr of integers, duplicate each occurrence of zero, shifting the remaining elements to the right.
Note that elements beyond the length of the original array are not written.
Do the above modifications to the input array in place, do not return anything from your function.
Example 1:
Input: [1,0,2,3,0,4,5,0]
Output: null
Explanation: After calling your function, the input array is modified to: [1,0,0,2,3,0,0,4]
Example 2:
Input: [1,2,3]
Output: null
Explanation: After calling your function, the input array is modified to: [1,2,3]
"""
def duplicate_zeros2(arr):
z = 1
for i in range(1, len(arr)):
if z < len(arr):
print('z is ', z, 'and arr[i-1] is ', arr[i - 1])
if arr[z - 1] == 0:
j = len(arr) - 1
while j != z:
arr[j] = arr[j - 1]
j -= 1
arr[j] = 0
z += 1
print(arr)
z += 1
print(arr)
def duplicate_zeros(arr):
i = 1
while i < len(arr):
print('in while, i is ', i)
if arr[i - 1] == 0:
arr.insert(i, 0)
arr.pop()
i += 1
i += 1
print(arr)
print(duplicate_zeros([1, 5, 2, 0, 6, 8, 0, 6, 0])) |
linha1 = input()
linha2 = input()
linha3 = input()
if(linha1 == 'vertebrado'):
if(linha2 == 'ave'):
if(linha3 == 'carnivoro'):
print('aguia')
else:
print('pomba')
else:
if(linha3 == 'onivoro'):
print('homem')
else:
print('vaca')
else:
if (linha2 == 'inseto'):
if (linha3 == 'hematofago'):
print('pulga')
else:
print('lagarta')
else:
if (linha3 == 'hematofago'):
print('sanguessuga')
else:
print('minhoca') | linha1 = input()
linha2 = input()
linha3 = input()
if linha1 == 'vertebrado':
if linha2 == 'ave':
if linha3 == 'carnivoro':
print('aguia')
else:
print('pomba')
elif linha3 == 'onivoro':
print('homem')
else:
print('vaca')
elif linha2 == 'inseto':
if linha3 == 'hematofago':
print('pulga')
else:
print('lagarta')
elif linha3 == 'hematofago':
print('sanguessuga')
else:
print('minhoca') |
# Definition for a binary tree node.
# class TreeNode:
# def __init__(self, val=0, left=None, right=None):
# self.val = val
# self.left = left
# self.right = right
class Solution:
def isUnivalTree(self, root: TreeNode) -> bool:
if root:
self.k=root.val
self.x=[]
self.x.append(root.val)
else:
return True
def abc(root):
if root:
if root.left:
self.x.append(root.left.val)
abc(root.left)
if root.right:
self.x.append(root.right.val)
abc(root.right)
abc(root)
print(len(self.x))
if len(set(self.x))!=1:
return False
return True
| class Solution:
def is_unival_tree(self, root: TreeNode) -> bool:
if root:
self.k = root.val
self.x = []
self.x.append(root.val)
else:
return True
def abc(root):
if root:
if root.left:
self.x.append(root.left.val)
abc(root.left)
if root.right:
self.x.append(root.right.val)
abc(root.right)
abc(root)
print(len(self.x))
if len(set(self.x)) != 1:
return False
return True |
T = int(input())
for _ in range(T):
M, H = map(int, input().split())
B = M//H**2
if B<=18:
print(1)
elif B in range(19, 25):
print(2)
elif B in range(25, 30):
print(3)
else:
print(4) | t = int(input())
for _ in range(T):
(m, h) = map(int, input().split())
b = M // H ** 2
if B <= 18:
print(1)
elif B in range(19, 25):
print(2)
elif B in range(25, 30):
print(3)
else:
print(4) |
ls = open('logs.txt').readlines()
for line in ls:
g = line.strip()
g = "/d/c186/FarnettoApps/" + g
print("echo loading %s"%(g))
print("java -Dserverid=farnetto -cp $CP farnetto.log4jconverter.Loader file:/%s 2>&1 | grep ERROR"%(g))
| ls = open('logs.txt').readlines()
for line in ls:
g = line.strip()
g = '/d/c186/FarnettoApps/' + g
print('echo loading %s' % g)
print('java -Dserverid=farnetto -cp $CP farnetto.log4jconverter.Loader file:/%s 2>&1 | grep ERROR' % g) |
#Your function definition goes here
def valid_date(date_str):
if len(date_str) == 8:
for ch in date_str:
if ch == "/":
return False
if ch.isalpha():
return False
date_str.split(".")
day = int(date_str[:2])
month = int(date_str[3:5])
year = int(date_str[-2:])
if day > 0 and day <= 31 and month >= 1 and month <= 12 and year >= 0 and year <= 99:
return True
return False
date_str = input("Enter a date: ")
if valid_date(date_str):
print("Date is valid")
else:
print("Date is invalid") | def valid_date(date_str):
if len(date_str) == 8:
for ch in date_str:
if ch == '/':
return False
if ch.isalpha():
return False
date_str.split('.')
day = int(date_str[:2])
month = int(date_str[3:5])
year = int(date_str[-2:])
if day > 0 and day <= 31 and (month >= 1) and (month <= 12) and (year >= 0) and (year <= 99):
return True
return False
date_str = input('Enter a date: ')
if valid_date(date_str):
print('Date is valid')
else:
print('Date is invalid') |
#Created with the Terminal ASCII Paint app by Michele Morelli - https://github.com/MicheleMorelli
def draw_house():
print(" "*64+"\n"+" "*64+"\n"+" "*5+"_"*33+" "*26+"\n"+" "*4+"|"+"/"*4+"|"+"#"*28+" "*26+"\n"+" "*4+"|"+"/"*4+"|"+"#"*28+" "*26+"\n"+" "*4+"|"+"/"*4+"|"+"#"*2+" "*2+"|"+"/"+"|"+"#"*2+" "*3+"|"+"/"+"|"+"#"*5+" "*3+"|"+"/"+"|"+"#"*2+" "*26+"\n"+" "*4+"|"+"/"*4+"|"+"#"*2+" "*2+"|"+"/"+"|"+"#"*2+" "*3+"|"+"/"+"|"+"#"*5+" "*3+"|"+"/"+"|"+"#"*2+" "*26+"\n"+" "*4+"|"+"/"*4+"|"+"#"*2+" "*2+"|"+"/"+"|"+"#"*2+" "*3+"|"+"/"+"|"+"#"*5+" "*3+"|"+"/"+"|"+"#"*2+" "*26+"\n"+" "*4+"|"+"/"*4+"|"+"#"*9+" "*3+"|"+"/"+"|"+"#"*13+" "*26+"\n"+" "*4+"|"+"/"*4+"|"+"#"*28+" "*26+"\n"+" "*4+"|"+"/"*4+"|"+"#"*28+" "*26+"\n"+" "*4+"|"+"/"*4+"|"+"#"*9+" "*7+"|"+"/"+"|"+"#"*9+" "*2+"_"*16+" "*8+"\n"+" "*4+"|"+"/"*4+"|"+"#"*9+" "*7+"|"+"/"+"|"+"#"*9+" "+"|"+"/"*2+"|"+"#"*13+"|"+" "*7+"\n"+" "*4+"|"+"/"*4+"|"+"#"*9+" "*7+"|"+"/"+"|"+"#"*9+" "+"|"+"/"*2+"|"+"#"*13+"|"+" "*7+"\n"+" "*4+"|"+"/"*4+"|"+"#"*9+" "*7+"|"+"/"+"|"+"#"*9+" "+"|"+"/"*2+"|"+"#"*13+"|"+" "*7+"\n"+" "*4+"|"+"/"*4+"|"+"#"*9+" "*7+"|"+"/"+"|"+"#"*9+" "+"|"+"/"*2+"|"+"#"*13+"|"+" "*7+"\n")
draw_house()
def draw_sdfsdf():
print(" "*64+"\n"+" "*64+"\n"+" "*64+"\n"+" "*64+"\n"+" "*64+"\n"+" "*64+"\n"+" "*64+"\n"+" "*64+"\n"+" "*64+"\n"+" "*64+"\n"+" "*64+"\n"+" "*64+"\n"+" "*64+"\n"+" "*64+"\n"+" "*64+"\n"+" "*64+"\n")
| def draw_house():
print(' ' * 64 + '\n' + ' ' * 64 + '\n' + ' ' * 5 + '_' * 33 + ' ' * 26 + '\n' + ' ' * 4 + '|' + '/' * 4 + '|' + '#' * 28 + ' ' * 26 + '\n' + ' ' * 4 + '|' + '/' * 4 + '|' + '#' * 28 + ' ' * 26 + '\n' + ' ' * 4 + '|' + '/' * 4 + '|' + '#' * 2 + ' ' * 2 + '|' + '/' + '|' + '#' * 2 + ' ' * 3 + '|' + '/' + '|' + '#' * 5 + ' ' * 3 + '|' + '/' + '|' + '#' * 2 + ' ' * 26 + '\n' + ' ' * 4 + '|' + '/' * 4 + '|' + '#' * 2 + ' ' * 2 + '|' + '/' + '|' + '#' * 2 + ' ' * 3 + '|' + '/' + '|' + '#' * 5 + ' ' * 3 + '|' + '/' + '|' + '#' * 2 + ' ' * 26 + '\n' + ' ' * 4 + '|' + '/' * 4 + '|' + '#' * 2 + ' ' * 2 + '|' + '/' + '|' + '#' * 2 + ' ' * 3 + '|' + '/' + '|' + '#' * 5 + ' ' * 3 + '|' + '/' + '|' + '#' * 2 + ' ' * 26 + '\n' + ' ' * 4 + '|' + '/' * 4 + '|' + '#' * 9 + ' ' * 3 + '|' + '/' + '|' + '#' * 13 + ' ' * 26 + '\n' + ' ' * 4 + '|' + '/' * 4 + '|' + '#' * 28 + ' ' * 26 + '\n' + ' ' * 4 + '|' + '/' * 4 + '|' + '#' * 28 + ' ' * 26 + '\n' + ' ' * 4 + '|' + '/' * 4 + '|' + '#' * 9 + ' ' * 7 + '|' + '/' + '|' + '#' * 9 + ' ' * 2 + '_' * 16 + ' ' * 8 + '\n' + ' ' * 4 + '|' + '/' * 4 + '|' + '#' * 9 + ' ' * 7 + '|' + '/' + '|' + '#' * 9 + ' ' + '|' + '/' * 2 + '|' + '#' * 13 + '|' + ' ' * 7 + '\n' + ' ' * 4 + '|' + '/' * 4 + '|' + '#' * 9 + ' ' * 7 + '|' + '/' + '|' + '#' * 9 + ' ' + '|' + '/' * 2 + '|' + '#' * 13 + '|' + ' ' * 7 + '\n' + ' ' * 4 + '|' + '/' * 4 + '|' + '#' * 9 + ' ' * 7 + '|' + '/' + '|' + '#' * 9 + ' ' + '|' + '/' * 2 + '|' + '#' * 13 + '|' + ' ' * 7 + '\n' + ' ' * 4 + '|' + '/' * 4 + '|' + '#' * 9 + ' ' * 7 + '|' + '/' + '|' + '#' * 9 + ' ' + '|' + '/' * 2 + '|' + '#' * 13 + '|' + ' ' * 7 + '\n')
draw_house()
def draw_sdfsdf():
print(' ' * 64 + '\n' + ' ' * 64 + '\n' + ' ' * 64 + '\n' + ' ' * 64 + '\n' + ' ' * 64 + '\n' + ' ' * 64 + '\n' + ' ' * 64 + '\n' + ' ' * 64 + '\n' + ' ' * 64 + '\n' + ' ' * 64 + '\n' + ' ' * 64 + '\n' + ' ' * 64 + '\n' + ' ' * 64 + '\n' + ' ' * 64 + '\n' + ' ' * 64 + '\n' + ' ' * 64 + '\n') |
class Rectangle:
def __init__(self, width, height):
self.width = width
self.height = height
def set_width(self, width):
self.width = width
def set_height(self, height):
self.height = height
def get_area(self):
return self.height * self.width
def get_perimeter(self):
return 2 * (self.height + self.width)
def get_diagonal(self):
return (self.height ** 2 + self.width ** 2) ** 0.5
def get_picture(self):
ret_val = "*" * self.width
ret_val += "\n"
ret_val = ret_val * self.height
return ret_val
def get_amount_inside(self, shape):
self_area = self.get_area()
shape_area = shape.get_area()
assert(self_area > shape_area)
return self_area // shape_area
def __str__(self):
txt = "{classname} (width={width},height={height})"
return txt.format(classname=self.__class__.__name__, width=self.width, height=self.height)
class Square(Rectangle):
def __init__(self, side):
super().__init__(side, side)
def set_side(self, side):
self.width = side
self.height = side
def __str__(self):
txt = "{classname} (side={side})"
return txt.format(classname=self.__class__.__name__, side=self.width)
| class Rectangle:
def __init__(self, width, height):
self.width = width
self.height = height
def set_width(self, width):
self.width = width
def set_height(self, height):
self.height = height
def get_area(self):
return self.height * self.width
def get_perimeter(self):
return 2 * (self.height + self.width)
def get_diagonal(self):
return (self.height ** 2 + self.width ** 2) ** 0.5
def get_picture(self):
ret_val = '*' * self.width
ret_val += '\n'
ret_val = ret_val * self.height
return ret_val
def get_amount_inside(self, shape):
self_area = self.get_area()
shape_area = shape.get_area()
assert self_area > shape_area
return self_area // shape_area
def __str__(self):
txt = '{classname} (width={width},height={height})'
return txt.format(classname=self.__class__.__name__, width=self.width, height=self.height)
class Square(Rectangle):
def __init__(self, side):
super().__init__(side, side)
def set_side(self, side):
self.width = side
self.height = side
def __str__(self):
txt = '{classname} (side={side})'
return txt.format(classname=self.__class__.__name__, side=self.width) |
def details():
name = input("What is your name? ")
age = input("What is your age? ")
username = input("What is your Reddit username? ")
with open("python_get_details_details.txt", "a+", encoding="utf-8") as file:
file.write(name + " " + age + " " + username + "\n")
print("Your name is " + name + ", you are " + age + " years old, and your username is " + username + "!")
if __name__ == "__main__":
details()
| def details():
name = input('What is your name? ')
age = input('What is your age? ')
username = input('What is your Reddit username? ')
with open('python_get_details_details.txt', 'a+', encoding='utf-8') as file:
file.write(name + ' ' + age + ' ' + username + '\n')
print('Your name is ' + name + ', you are ' + age + ' years old, and your username is ' + username + '!')
if __name__ == '__main__':
details() |
def solve(n):
notebook = {}
for _ in range(n):
student, grade = input().split(' ')
if student not in notebook:
notebook[student] = []
notebook[student] += [float(grade)]
for st, gr in notebook.items():
print(f"{st} ->", end=' ')
[print(f"{x:.2f}", end=' ') for x in gr]
print(f"(avg: {(sum(gr)/len(gr)):.2f})")
solve(int(input()))
| def solve(n):
notebook = {}
for _ in range(n):
(student, grade) = input().split(' ')
if student not in notebook:
notebook[student] = []
notebook[student] += [float(grade)]
for (st, gr) in notebook.items():
print(f'{st} ->', end=' ')
[print(f'{x:.2f}', end=' ') for x in gr]
print(f'(avg: {sum(gr) / len(gr):.2f})')
solve(int(input())) |
class Element():
def __init__(self, identifier, name, symbol):
self.identifier = identifier
self.name = name
self.symbol = symbol
self.metabolites = []
def add_compound(self, compound):
if compound not in self.metabolites:
self.metabolites.append(compound)
def __repr__(self):
return '<{0} {1!r}>'.format(self.__class__.__name__,
(self.identifier, self.name, self.symbol))
| class Element:
def __init__(self, identifier, name, symbol):
self.identifier = identifier
self.name = name
self.symbol = symbol
self.metabolites = []
def add_compound(self, compound):
if compound not in self.metabolites:
self.metabolites.append(compound)
def __repr__(self):
return '<{0} {1!r}>'.format(self.__class__.__name__, (self.identifier, self.name, self.symbol)) |
#Name Cases.
Personal_Name = "joey Tribionny"
print("Person's name in lower case: " + Personal_Name.lower())
print("Person's name in upper case: " + Personal_Name.upper())
print("Person's name in title case: " + Personal_Name.title())
| personal__name = 'joey Tribionny'
print("Person's name in lower case: " + Personal_Name.lower())
print("Person's name in upper case: " + Personal_Name.upper())
print("Person's name in title case: " + Personal_Name.title()) |
# 1) Function that takes a string as a paratmeter and returns true if str contains at least 3 g false otherwise.
# def threeg(stri):
# gsum = 0
# for letter in stri.upper():
# if letter == 'G':
# gsum += 1
# while gsum < 3:
# return False
# print(threeg('ggg')
def g_count(any_str):
gnum = 0 # need to count the g's
for char in any_str.upper(): # char itterates through each char of the string .upper() ensures that no matter which string the format will be recognized.
if char == 'G': # only if char is tha same as the string 'G'
gnum += 1 # gnum increases by one.
if gnum >= 3: # this if must be BEHIND the firs if, so it only starts after first loop is completed.
return True
else:
return False
print(g_count('attggg')) | def g_count(any_str):
gnum = 0
for char in any_str.upper():
if char == 'G':
gnum += 1
if gnum >= 3:
return True
else:
return False
print(g_count('attggg')) |
# import pytest
class TestFormatHandler:
def test_read(self): # synced
assert True
def test_write(self): # synced
assert True
def test_append(self): # synced
assert True
def test_read_help(self): # synced
assert True
def test_write_help(self): # synced
assert True
def test__ensure_format(self): # synced
assert True
def test_add_format(self): # synced
assert True
class TestFormatMeta:
def test___new__(self): # synced
assert True
class TestFormat:
def test_initialize(self): # synced
assert True
def test_read(self): # synced
assert True
def test_read_help(self): # synced
assert True
def test_write(self): # synced
assert True
def test_write_help(self): # synced
assert True
| class Testformathandler:
def test_read(self):
assert True
def test_write(self):
assert True
def test_append(self):
assert True
def test_read_help(self):
assert True
def test_write_help(self):
assert True
def test__ensure_format(self):
assert True
def test_add_format(self):
assert True
class Testformatmeta:
def test___new__(self):
assert True
class Testformat:
def test_initialize(self):
assert True
def test_read(self):
assert True
def test_read_help(self):
assert True
def test_write(self):
assert True
def test_write_help(self):
assert True |
num = []
soma = 0
for i in range(11):
num.append(int(input()))
n = len(num)
for i in num:
soma = soma + i
media = soma / n
print(media)
| num = []
soma = 0
for i in range(11):
num.append(int(input()))
n = len(num)
for i in num:
soma = soma + i
media = soma / n
print(media) |
load("@bazel_skylib//lib:paths.bzl", "paths")
load("@bazel_tools//tools/build_defs/pkg:pkg.bzl", "pkg_tar")
def _pre_render_script_ops_impl(ctx):
output_filename = "{}.yaml".format(ctx.attr.name)
output_yaml = ctx.actions.declare_file(output_filename)
outputs = [output_yaml]
ctx.actions.run(
inputs = [ctx.file.script],
outputs = outputs,
progress_message = "Generating pre_render_script ops-file {}".format(output_filename),
executable = ctx.executable._generator,
env = {
"INSTANCE_GROUP": ctx.attr.instance_group,
"JOB": ctx.attr.job,
"PRE_RENDER_SCRIPT": ctx.file.script.path,
"OUTPUT": output_yaml.path,
"TYPE": ctx.attr.script_type,
},
)
return [DefaultInfo(files = depset(outputs))]
pre_render_script_ops = rule(
implementation = _pre_render_script_ops_impl,
attrs = {
"instance_group": attr.string(
mandatory = True,
),
"job": attr.string(
mandatory = True,
),
"script_type": attr.string(
mandatory = True,
),
"script": attr.label(
allow_single_file = True,
mandatory = True,
),
"_generator": attr.label(
allow_single_file = True,
cfg = "host",
default = "//bosh/releases/generators/pre_render_scripts:generator.sh",
executable = True,
),
},
)
def generate_pre_render_script_ops(name, srcs):
scripts = [_map_pre_render_script(src) for src in srcs]
for script in scripts:
pre_render_script_ops(
name = script.ops_file_target_name,
instance_group = script.instance_group,
job = script.job,
script = script.src_target,
script_type = script.script_type,
)
pkg_tar(
name = name,
package_dir = "assets/operations/pre_render_scripts",
srcs = [":{}".format(script.ops_file_target_name) for script in scripts],
)
def _map_pre_render_script(src):
script_type = paths.basename(paths.dirname(src))
job = paths.basename(paths.dirname(paths.dirname(src)))
instance_group = paths.basename(paths.dirname(paths.dirname(paths.dirname(src))))
src_target = ":{}".format(src)
src_basename = paths.basename(src)
return struct(
job = job,
instance_group = instance_group,
script_type = script_type,
src_target = src_target,
ops_file_target_name = "{}_{}_{}".format(instance_group, job, src_basename.replace(".", "_")),
)
| load('@bazel_skylib//lib:paths.bzl', 'paths')
load('@bazel_tools//tools/build_defs/pkg:pkg.bzl', 'pkg_tar')
def _pre_render_script_ops_impl(ctx):
output_filename = '{}.yaml'.format(ctx.attr.name)
output_yaml = ctx.actions.declare_file(output_filename)
outputs = [output_yaml]
ctx.actions.run(inputs=[ctx.file.script], outputs=outputs, progress_message='Generating pre_render_script ops-file {}'.format(output_filename), executable=ctx.executable._generator, env={'INSTANCE_GROUP': ctx.attr.instance_group, 'JOB': ctx.attr.job, 'PRE_RENDER_SCRIPT': ctx.file.script.path, 'OUTPUT': output_yaml.path, 'TYPE': ctx.attr.script_type})
return [default_info(files=depset(outputs))]
pre_render_script_ops = rule(implementation=_pre_render_script_ops_impl, attrs={'instance_group': attr.string(mandatory=True), 'job': attr.string(mandatory=True), 'script_type': attr.string(mandatory=True), 'script': attr.label(allow_single_file=True, mandatory=True), '_generator': attr.label(allow_single_file=True, cfg='host', default='//bosh/releases/generators/pre_render_scripts:generator.sh', executable=True)})
def generate_pre_render_script_ops(name, srcs):
scripts = [_map_pre_render_script(src) for src in srcs]
for script in scripts:
pre_render_script_ops(name=script.ops_file_target_name, instance_group=script.instance_group, job=script.job, script=script.src_target, script_type=script.script_type)
pkg_tar(name=name, package_dir='assets/operations/pre_render_scripts', srcs=[':{}'.format(script.ops_file_target_name) for script in scripts])
def _map_pre_render_script(src):
script_type = paths.basename(paths.dirname(src))
job = paths.basename(paths.dirname(paths.dirname(src)))
instance_group = paths.basename(paths.dirname(paths.dirname(paths.dirname(src))))
src_target = ':{}'.format(src)
src_basename = paths.basename(src)
return struct(job=job, instance_group=instance_group, script_type=script_type, src_target=src_target, ops_file_target_name='{}_{}_{}'.format(instance_group, job, src_basename.replace('.', '_'))) |
# # # # # a = 215
# # # # a = int(input("Input a"))
# # # a = 9000
# # # a = 3
# # #
# if True: # after : is the code block, must be indented
# print("True")
# print("This always runs because if statement is True")
# print("Still working in if block")
# # # if block has ended
# print("This runs no matter what because we are outside if ")
# # # # # after we go back to our normal indentation the if block is ended
# # # #
# a = 25
# if a > 10: # in Python when you see : next line will be indented
# # runs only when statement after if is True
# print("Do this when a is larger than 10")
# print(f"Still only runs when a > {a}")
# # we can keep doing things when a > 10 here
# # #
# # # # # here we have exited if
# print("This will always print no matter what")
# # # # # # # #
# # # # # # #
# # # # # # a = -333
# # # # # # a = 200
# a = 44
# a = 15
# if a > 10: # in Python when you see : next line will be indented
# # runs only when statement after if is True
# print("Again Do this when a is larger than 10")
# print("Indeed a is", a)
# else: # when a is <= 10
# print("Only when a is less or equal to 10")
# print("Indeed a is only", a)
# # we could do more stuff here when a is not larger than 10
# # # #
# # # # # # a = 10
a = 200
a = -95
a = 10
# # a = -355
# if we need more than 2 distinct paths
# if a > 10: # in Python when you see : next line will be indented
# # runs only when statement after if is True
# print("Again Do this when a is larger than 10", a)
# elif a < 10:
# print("ahh a is less than 10", a)
# else: # so a must be 10 no other choices you do not need to check, after all other choices are exhausted
# print("Only when a is equal to 10 since we checked other cases", a)
# # we could do more stuff here when a is not larger than 10
# # # # # # #
# print("Back to normal program flow which always runs no matter what a is")
# # # # # #
# # # # # #
# # # # # # #
# # # # without else both of these could run
# a = 20
# # # a = 7
# if a > 5:
# print("a is larger than 5")
# # the below if statement is not related to the if statement above
# if a > 10:
# print("a is larger than 10")
# # # # # #
# # # # # #
# # # # # #
# # # # # #
# # # # # #
# # # # # #
# # # # # #
# # # # # #
# # # # # # # if else elif
# # # # # a = 190
# a = int(input("give me an a! "))
# if a > 10:
# print("a is larger than 10")
# print("This will only happen when a > 10")
# if a >= 200: # so we can nest ifs inside another if
# print("a is truly big over or equal 200")
# else:
# print("a is more than 10 but no more than 199")
# elif a < 10:
# print("a is less than 10", a)
# else: # if a == 10
# print("a is equal to 10", a)
# # #
# # # # print("This will always happen no matter the a value")
# # # #
# # # # b = -8500
# # # # b = 6
# # # # b = 555
# # # # b = 9000
# # # # if b < 0:
# # # # print("Less than 0", b)
# # # # elif b < 10:
# # # # print("Less than 10 but more or equal to 0", b)
# # # # elif b < 9000:
# # # # pass # empty operation
# # # # # print("At least 10 but less than 9000", b)
# # # # else:
# # # # print("9000 or more!", b)
# # # # #
# # # # if b < 0:
# # # # print("Less than 0", b)
# # # #
# # # # if b < 10:
# # # # print("Less than 10", b)
# # # #
# # # # if b < 9000:
# # # # print("less than 9000", b)
# # # # else:
# # # # print("9000 or more!", b)
# # # # # #
# # # # c = None
# # # # c = 5
# # # # if c == None:
# # # # print("There is Nothing")
# # # # else:
# # # # print("There is something")
# # # # # #
# # # #
a = -100
if 2 < 3 < 8 < a:
print(f"2 < 3 < 8 < {a} is it a True statement? ", 2 < 3 < 8 < a)
else:
print(f"2 < 3 < 8 < {a} is it a True statement?", 2 < 3 < 8 < a) | a = 200
a = -95
a = 10
a = -100
if 2 < 3 < 8 < a:
print(f'2 < 3 < 8 < {a} is it a True statement? ', 2 < 3 < 8 < a)
else:
print(f'2 < 3 < 8 < {a} is it a True statement?', 2 < 3 < 8 < a) |
def test1():
l = []
for i in range(1000):
l = l + [i]
def test2():
l = []
for i in range(1000):
l.append(i)
def test3():
l = [i for i in range(1000)]
def test4():
l = list(range(1000))
| def test1():
l = []
for i in range(1000):
l = l + [i]
def test2():
l = []
for i in range(1000):
l.append(i)
def test3():
l = [i for i in range(1000)]
def test4():
l = list(range(1000)) |
print("Listing Primes")
prime_list = []
i = 0
while i < 10000:
if i % 1000 == 0:
print("Processed %d primes" % i)
i += 1
prime = True
for n in range(i):
if n != 0 and n!= 1 and n!= i:
if i % n == 0: prime = False
if prime == True:
prime_list.append(i)
for i in range(10):
count = 0
for n in prime_list:
if n == 0: continue
if n % 10 == i: count += 1
print("Number of primes ending in %d: %d" % (i, count))
| print('Listing Primes')
prime_list = []
i = 0
while i < 10000:
if i % 1000 == 0:
print('Processed %d primes' % i)
i += 1
prime = True
for n in range(i):
if n != 0 and n != 1 and (n != i):
if i % n == 0:
prime = False
if prime == True:
prime_list.append(i)
for i in range(10):
count = 0
for n in prime_list:
if n == 0:
continue
if n % 10 == i:
count += 1
print('Number of primes ending in %d: %d' % (i, count)) |
class Verb(object):
def __init__(self, verb, subject):
self.verb = verb
self.subject = subject
self.value = ""
def format(self, context):
subject = self.subject(context).value
if subject.player:
self.value = self.verb
else:
self.value = third_personify(self.verb)
return self
def __str__(self):
return self.value
mapping = {
"y": lambda verb: verb[:-1] + "ies",
"s": lambda verb: verb + "es",
"z": lambda verb: verb + "es",
"h": lambda verb: verb + "es",
"x": lambda verb: verb + "es",
"o": lambda verb: verb + "es",
}
direct_mapping = {
"are": "is"
}
def third_personify(verb):
direct = direct_mapping.get(verb)
if direct is not None:
return direct
last_letter = verb[-1]
result = mapping.get(last_letter, lambda v: v + "s")
return result(verb)
| class Verb(object):
def __init__(self, verb, subject):
self.verb = verb
self.subject = subject
self.value = ''
def format(self, context):
subject = self.subject(context).value
if subject.player:
self.value = self.verb
else:
self.value = third_personify(self.verb)
return self
def __str__(self):
return self.value
mapping = {'y': lambda verb: verb[:-1] + 'ies', 's': lambda verb: verb + 'es', 'z': lambda verb: verb + 'es', 'h': lambda verb: verb + 'es', 'x': lambda verb: verb + 'es', 'o': lambda verb: verb + 'es'}
direct_mapping = {'are': 'is'}
def third_personify(verb):
direct = direct_mapping.get(verb)
if direct is not None:
return direct
last_letter = verb[-1]
result = mapping.get(last_letter, lambda v: v + 's')
return result(verb) |
def is_valid(row, col, size):
return 0 <= row < size and 0 <= col < size
# returns True or False
def explode(row, col, size, matrix_in):
bomb = matrix[row][col]
for r in range(row - 1, row + 2):
for c in range(col - 1, col + 2):
if is_valid(r, c, size) and matrix_in[r][c] > 0:
matrix[r][c] -= bomb
n = int(input())
matrix = []
for _ in range(n):
matrix.append([int(x) for x in input().split()])
bomb_numbers = input().split()
for bomb in bomb_numbers:
tokens = [int(x) for x in bomb.split(',')]
bomb_row = tokens[0]
bomb_col = tokens[1]
if matrix[bomb_row][bomb_col] > 0:
explode(bomb_row, bomb_col, n, matrix)
matrix[bomb_row][bomb_col] = 0
alive_count = 0
alive_sum = 0
for row in range(n):
for col in range(n):
number = matrix[row][col]
if number > 0:
alive_count += 1
alive_sum += number
print(f'Alive cells: {alive_count}')
print(f'Sum: {alive_sum}')
for row in matrix:
print(' '.join([str(x) for x in row]))
| def is_valid(row, col, size):
return 0 <= row < size and 0 <= col < size
def explode(row, col, size, matrix_in):
bomb = matrix[row][col]
for r in range(row - 1, row + 2):
for c in range(col - 1, col + 2):
if is_valid(r, c, size) and matrix_in[r][c] > 0:
matrix[r][c] -= bomb
n = int(input())
matrix = []
for _ in range(n):
matrix.append([int(x) for x in input().split()])
bomb_numbers = input().split()
for bomb in bomb_numbers:
tokens = [int(x) for x in bomb.split(',')]
bomb_row = tokens[0]
bomb_col = tokens[1]
if matrix[bomb_row][bomb_col] > 0:
explode(bomb_row, bomb_col, n, matrix)
matrix[bomb_row][bomb_col] = 0
alive_count = 0
alive_sum = 0
for row in range(n):
for col in range(n):
number = matrix[row][col]
if number > 0:
alive_count += 1
alive_sum += number
print(f'Alive cells: {alive_count}')
print(f'Sum: {alive_sum}')
for row in matrix:
print(' '.join([str(x) for x in row])) |
test_cases = int(input())
for i in range(test_cases):
text = input()
new_text = ''
for l in text:
if l.isalpha():
new_text += chr(ord(l) + 3)
else:
new_text += l
new_text = new_text[::-1]
half = int((len(new_text) / 2))
first_part = new_text[0:half]
second_part = new_text[half:]
third_part = ''
for l in second_part:
third_part += chr(ord(l) - 1)
encrypted_text = first_part + third_part
print(encrypted_text)
| test_cases = int(input())
for i in range(test_cases):
text = input()
new_text = ''
for l in text:
if l.isalpha():
new_text += chr(ord(l) + 3)
else:
new_text += l
new_text = new_text[::-1]
half = int(len(new_text) / 2)
first_part = new_text[0:half]
second_part = new_text[half:]
third_part = ''
for l in second_part:
third_part += chr(ord(l) - 1)
encrypted_text = first_part + third_part
print(encrypted_text) |
name = "signalfx-azure-function-python"
version = "1.0.1"
user_agent = f"signalfx_azure_function/{version}"
| name = 'signalfx-azure-function-python'
version = '1.0.1'
user_agent = f'signalfx_azure_function/{version}' |
# Implement the singleton pattern with a twist. First, instead of storing one
# instance, store two instances. And in every even call of getInstance(), return
# the first instance and in every odd call of getInstance(), return the second
# instance.
class Singleton(type):
_instance = []
odd = True
def __call__(cls, *args, **kwargs):
if len(cls._instance) < 2:
instance = super(Singleton, cls).__call__(*args, **kwargs)
cls._instance.append(instance)
cls.odd = True if not cls.odd else False
return cls._instance[cls.odd]
class Twist(metaclass=Singleton):
def __init__(self, name):
self.name = name
if __name__ == '__main__':
twists = [Twist(i) for i in range(5)]
for t in twists:
print(t.name)
| class Singleton(type):
_instance = []
odd = True
def __call__(cls, *args, **kwargs):
if len(cls._instance) < 2:
instance = super(Singleton, cls).__call__(*args, **kwargs)
cls._instance.append(instance)
cls.odd = True if not cls.odd else False
return cls._instance[cls.odd]
class Twist(metaclass=Singleton):
def __init__(self, name):
self.name = name
if __name__ == '__main__':
twists = [twist(i) for i in range(5)]
for t in twists:
print(t.name) |
def _get_ratio(ratio):
if isinstance(ratio, str):
if ':' in ratio:
r_w, r_h = ratio.split(':')
try:
ratio = float(r_w) / float(r_h)
except:
raise
if not isinstance(ratio, float):
ratio = float(ratio)
return ratio
def centerratio(size, center, ratio=1.0):
def _calc_max_size(size, center):
w, h = size
x_l, y_t = center
x_r, y_b = w-x_l, h-y_t
return min(x_l, x_r)*2, min(y_t, y_b)*2
ratio = _get_ratio(ratio)
width_max, height_max = _calc_max_size(size, center)
width_ratio = round(height_max * ratio)
width = min(width_max, width_ratio)
height = round(width / ratio)
return center[0] - round(width/2), \
center[1] - round(height/2), \
width, height
def expandratio(size, ratio=1.0):
ratio = _get_ratio(ratio)
w, h = size
w_r = round(h * ratio)
if w > w_r:
h_r = round(w / ratio)
return w, h_r, 0, int((h_r-h)/2)
elif w < w_r:
return w_r, h, int((w_r-w)/2), 0
else:
return w, h, 0, 0
| def _get_ratio(ratio):
if isinstance(ratio, str):
if ':' in ratio:
(r_w, r_h) = ratio.split(':')
try:
ratio = float(r_w) / float(r_h)
except:
raise
if not isinstance(ratio, float):
ratio = float(ratio)
return ratio
def centerratio(size, center, ratio=1.0):
def _calc_max_size(size, center):
(w, h) = size
(x_l, y_t) = center
(x_r, y_b) = (w - x_l, h - y_t)
return (min(x_l, x_r) * 2, min(y_t, y_b) * 2)
ratio = _get_ratio(ratio)
(width_max, height_max) = _calc_max_size(size, center)
width_ratio = round(height_max * ratio)
width = min(width_max, width_ratio)
height = round(width / ratio)
return (center[0] - round(width / 2), center[1] - round(height / 2), width, height)
def expandratio(size, ratio=1.0):
ratio = _get_ratio(ratio)
(w, h) = size
w_r = round(h * ratio)
if w > w_r:
h_r = round(w / ratio)
return (w, h_r, 0, int((h_r - h) / 2))
elif w < w_r:
return (w_r, h, int((w_r - w) / 2), 0)
else:
return (w, h, 0, 0) |
class DefaultAlias(object):
''' unless explicitly assigned, this attribute aliases to another. '''
def __init__(self, name):
self.name = name
def __get__(self, inst, cls):
if inst is None:
# attribute accessed on class, return `self' descriptor
return self
return getattr(inst, self.name)
class Alias(DefaultAlias):
''' this attribute unconditionally aliases to another. '''
def __set__(self, inst, value):
setattr(inst, self.name, value)
def __delete__(self, inst):
delattr(inst, self.name)
| class Defaultalias(object):
""" unless explicitly assigned, this attribute aliases to another. """
def __init__(self, name):
self.name = name
def __get__(self, inst, cls):
if inst is None:
return self
return getattr(inst, self.name)
class Alias(DefaultAlias):
""" this attribute unconditionally aliases to another. """
def __set__(self, inst, value):
setattr(inst, self.name, value)
def __delete__(self, inst):
delattr(inst, self.name) |
f1 = open("unprocessed/Cit-HepTh-dates.csv", "w")
f2 = open("unprocessed/Cit-HepTh.csv", "w")
with open("unprocessed/Cit-HepTh-dates.txt", "r") as file:
c = 0
for line in file:
if not c == 0:
l = line.split()
nl = l[0] + "," + l[1] + '\n'
f1.write(nl)
else:
c += 1
with open("unprocessed/Cit-HepTh.txt", "r") as file:
for line in file:
if c > 4:
l = line.split()
nl = l[0] + "," + l[1] + '\n'
f2.write(nl)
else:
c += 1
class Paper:
def __init__(self, id, date, citates):
self.id = id
self.date = date
| f1 = open('unprocessed/Cit-HepTh-dates.csv', 'w')
f2 = open('unprocessed/Cit-HepTh.csv', 'w')
with open('unprocessed/Cit-HepTh-dates.txt', 'r') as file:
c = 0
for line in file:
if not c == 0:
l = line.split()
nl = l[0] + ',' + l[1] + '\n'
f1.write(nl)
else:
c += 1
with open('unprocessed/Cit-HepTh.txt', 'r') as file:
for line in file:
if c > 4:
l = line.split()
nl = l[0] + ',' + l[1] + '\n'
f2.write(nl)
else:
c += 1
class Paper:
def __init__(self, id, date, citates):
self.id = id
self.date = date |
def color_analysis(img):
# obtain the color palatte of the image
palatte = defaultdict(int)
for pixel in img.getdata():
palatte[pixel] += 1
# sort the colors present in the image
sorted_x = sorted(palatte.items(), key=operator.itemgetter(1), reverse = True)
light_shade, dark_shade, shade_count, pixel_limit = 0, 0, 0, 25
for i, x in enumerate(sorted_x[:pixel_limit]):
if all(xx <= 20 for xx in x[0][:3]): ## dull : too much darkness
dark_shade += x[1]
if all(xx >= 240 for xx in x[0][:3]): ## bright : too much whiteness
light_shade += x[1]
shade_count += x[1]
light_percent = round((float(light_shade)/shade_count)*100, 2)
dark_percent = round((float(dark_shade)/shade_count)*100, 2)
return light_percent, dark_percent
| def color_analysis(img):
palatte = defaultdict(int)
for pixel in img.getdata():
palatte[pixel] += 1
sorted_x = sorted(palatte.items(), key=operator.itemgetter(1), reverse=True)
(light_shade, dark_shade, shade_count, pixel_limit) = (0, 0, 0, 25)
for (i, x) in enumerate(sorted_x[:pixel_limit]):
if all((xx <= 20 for xx in x[0][:3])):
dark_shade += x[1]
if all((xx >= 240 for xx in x[0][:3])):
light_shade += x[1]
shade_count += x[1]
light_percent = round(float(light_shade) / shade_count * 100, 2)
dark_percent = round(float(dark_shade) / shade_count * 100, 2)
return (light_percent, dark_percent) |
#Write a program using while loops that asks the user for a positive integer 'n' and prints
#a triangle using numbers from 1 to 'n'.
number = int(input("Give me a number: "))
count = 0
for x in range(1, number+1):
count += 1
dibujar = str(x)
print (dibujar*count)
| number = int(input('Give me a number: '))
count = 0
for x in range(1, number + 1):
count += 1
dibujar = str(x)
print(dibujar * count) |
{
"format_version": "1.16.0",
"minecraft:entity": {
"description": {
"identifier": f"{namespace}:pig_{color}",
"is_spawnable": true,
"is_summonable": true,
"is_experimental": false
},
"components": {
"minecraft:type_family": {
"family": [
f"pig_{color}",
"pig",
"mob"
]
},
"minecraft:breathable": {
"total_supply": 15,
"suffocate_time": 0
},
"minecraft:health": {
"value": 10,
"max": 10
},
"minecraft:hurt_on_condition": {
"damage_conditions": [
{
"filters": {
"test": "in_lava",
"subject": "self",
"operator": "==",
"value": true
},
"cause": "lava",
"damage_per_tick": 4
}
]
},
"minecraft:movement": {
"value": 0.25
},
"minecraft:navigation.walk": {
"can_path_over_water": true,
"avoid_water": true,
"avoid_damage_blocks": true
},
"minecraft:movement.basic": {},
"minecraft:jump.static": {},
"minecraft:can_climb": {},
"minecraft:collision_box": {
"width": 0.9,
"height": 0.9
},
"minecraft:despawn": {
"despawn_from_distance": {}
},
"minecraft:behavior.float": {
"priority": 2
},
"minecraft:behavior.panic": {
"priority": 3,
"speed_multiplier": 1.25
},
"minecraft:behavior.random_stroll": {
"priority": 7,
"speed_multiplier": 1.0
},
"minecraft:behavior.look_at_player": {
"priority": 8,
"look_distance": 6.0,
"probability": 0.02
},
"minecraft:behavior.random_look_around": {
"priority": 9
},
"minecraft:physics": {},
"minecraft:pushable": {
"is_pushable": true,
"is_pushable_by_piston": true
},
"minecraft:conditional_bandwidth_optimization": {}
}
}
} | {'format_version': '1.16.0', 'minecraft:entity': {'description': {'identifier': f'{namespace}:pig_{color}', 'is_spawnable': true, 'is_summonable': true, 'is_experimental': false}, 'components': {'minecraft:type_family': {'family': [f'pig_{color}', 'pig', 'mob']}, 'minecraft:breathable': {'total_supply': 15, 'suffocate_time': 0}, 'minecraft:health': {'value': 10, 'max': 10}, 'minecraft:hurt_on_condition': {'damage_conditions': [{'filters': {'test': 'in_lava', 'subject': 'self', 'operator': '==', 'value': true}, 'cause': 'lava', 'damage_per_tick': 4}]}, 'minecraft:movement': {'value': 0.25}, 'minecraft:navigation.walk': {'can_path_over_water': true, 'avoid_water': true, 'avoid_damage_blocks': true}, 'minecraft:movement.basic': {}, 'minecraft:jump.static': {}, 'minecraft:can_climb': {}, 'minecraft:collision_box': {'width': 0.9, 'height': 0.9}, 'minecraft:despawn': {'despawn_from_distance': {}}, 'minecraft:behavior.float': {'priority': 2}, 'minecraft:behavior.panic': {'priority': 3, 'speed_multiplier': 1.25}, 'minecraft:behavior.random_stroll': {'priority': 7, 'speed_multiplier': 1.0}, 'minecraft:behavior.look_at_player': {'priority': 8, 'look_distance': 6.0, 'probability': 0.02}, 'minecraft:behavior.random_look_around': {'priority': 9}, 'minecraft:physics': {}, 'minecraft:pushable': {'is_pushable': true, 'is_pushable_by_piston': true}, 'minecraft:conditional_bandwidth_optimization': {}}}} |
description = 'The outside temperature on the campus'
group = 'lowlevel'
devices = dict(
OutsideTemp = device('nicos.devices.entangle.Sensor',
description = 'Outdoor air temperature',
tangodevice = 'tango://ictrlfs.ictrl.frm2:10000/frm2/meteo/temp',
),
)
| description = 'The outside temperature on the campus'
group = 'lowlevel'
devices = dict(OutsideTemp=device('nicos.devices.entangle.Sensor', description='Outdoor air temperature', tangodevice='tango://ictrlfs.ictrl.frm2:10000/frm2/meteo/temp')) |
#This is just a demo server file to demonstrate the working of Telopy Backend
#This program consist the last line of Telopy
#import time
#import sys
#cursor = ['|','/','-','\\']
print('Telopy Server is Live ',end="")
#while True:
# for i in cursor:
# print(i+"\x08",end="")
# sys.stdout.flush()
# time.sleep(0.1) | print('Telopy Server is Live ', end='') |
class VersioningError(Exception):
pass
class ClassNotVersioned(VersioningError):
pass
class ImproperlyConfigured(VersioningError):
pass
| class Versioningerror(Exception):
pass
class Classnotversioned(VersioningError):
pass
class Improperlyconfigured(VersioningError):
pass |
fig, axs = plt.subplots(1, 2, figsize=(20,5))
p1=boroughs4.plot(column='Controlled drugs',ax=axs[0],cmap='Blues',legend=True);
p2=boroughs4.plot(column='Stolen goods',ax=axs[1], cmap='Reds',legend=True);
axs[0].set_title('Controlled drugs', fontdict={'fontsize': '12', 'fontweight' : '5'});
axs[1].set_title('Stolen goods', fontdict={'fontsize': '12', 'fontweight' : '5'});
| (fig, axs) = plt.subplots(1, 2, figsize=(20, 5))
p1 = boroughs4.plot(column='Controlled drugs', ax=axs[0], cmap='Blues', legend=True)
p2 = boroughs4.plot(column='Stolen goods', ax=axs[1], cmap='Reds', legend=True)
axs[0].set_title('Controlled drugs', fontdict={'fontsize': '12', 'fontweight': '5'})
axs[1].set_title('Stolen goods', fontdict={'fontsize': '12', 'fontweight': '5'}) |
class Reaction:
def __init__(self):
pass
def from_json(json):
reaction = Reaction()
reaction.reaction = json["reaction"].encode("unicode-escape")
reaction.actor = json["actor"]
return reaction
def list_from_json(json):
reactions = []
for child in json:
reactions.append(Reaction.from_json(child))
return reactions | class Reaction:
def __init__(self):
pass
def from_json(json):
reaction = reaction()
reaction.reaction = json['reaction'].encode('unicode-escape')
reaction.actor = json['actor']
return reaction
def list_from_json(json):
reactions = []
for child in json:
reactions.append(Reaction.from_json(child))
return reactions |
class Triangulo():
def __init__(self, a, b, c):
self.a = a
self.b = b
self.c = c
def semelhantes(self, triangulo):
a, b, c = triangulo.a, triangulo.b, triangulo.c
if ((a % self.a) == 0 ) and ((b % self.b) == 0) and ((c % self.c) == 0):
return True
elif ((a // self.a) == 0 ) and ((b // self.b) == 0) and ((c // self.c) == 0):
return True
return False
# t1 = Triangulo(2, 2, 2)
# t2 = Triangulo(4, 4, 4)
# print(t1.semelhantes(t2))
# t3 = Triangulo(3, 4, 5)
# t4 = Triangulo(3, 4, 5)
# print(t3.semelhantes(t4))
# t5 = Triangulo(6, 8, 10)
# t6 = Triangulo(3, 4, 5)
# print(t5.semelhantes(t6)) | class Triangulo:
def __init__(self, a, b, c):
self.a = a
self.b = b
self.c = c
def semelhantes(self, triangulo):
(a, b, c) = (triangulo.a, triangulo.b, triangulo.c)
if a % self.a == 0 and b % self.b == 0 and (c % self.c == 0):
return True
elif a // self.a == 0 and b // self.b == 0 and (c // self.c == 0):
return True
return False |
age = input("Please enter your age: ")
if age.isdigit():
print(age)
age = int(input("Please enter your age: "))
while(True):
try:
age = int(input("Please enter your age: "))
except ValueError:
print("Sorry, I didn't understand that.")
continue
else:
break
raise Exception("arguments") | age = input('Please enter your age: ')
if age.isdigit():
print(age)
age = int(input('Please enter your age: '))
while True:
try:
age = int(input('Please enter your age: '))
except ValueError:
print("Sorry, I didn't understand that.")
continue
else:
break
raise exception('arguments') |
def fasttsq(M,psi,Y,y,m,c,o,plm):
#TODO
raise NotImplementedError
def fasttsq3d(M,psi,Y,y,m,c,o,plm):
#TODO
raise NotImplementedError
def fasttsqp(M,psi,Y,y,m,c,o,plm):
#TODO
raise NotImplementedError
def fastq(M,psi,Y,y,m,c,o,plm):
#TODO
raise NotImplementedError
def fastq3d(M,psi,Y,y,m,c,o,plm):
#TODO
raise NotImplementedError | def fasttsq(M, psi, Y, y, m, c, o, plm):
raise NotImplementedError
def fasttsq3d(M, psi, Y, y, m, c, o, plm):
raise NotImplementedError
def fasttsqp(M, psi, Y, y, m, c, o, plm):
raise NotImplementedError
def fastq(M, psi, Y, y, m, c, o, plm):
raise NotImplementedError
def fastq3d(M, psi, Y, y, m, c, o, plm):
raise NotImplementedError |
# Heap
class Solution:
def shortestPathLength(self, graph):
memo, final, q = set(), (1 << len(graph)) - 1, [(0, i, 1 << i) for i in range(len(graph))]
while q:
steps, node, state = heapq.heappop(q)
if state == final: return steps
for v in graph[node]:
if (state | 1 << v, v) not in memo:
heapq.heappush(q, (steps + 1, v, state | 1 << v))
memo.add((state | 1 << v, v))
# BFS
class Solution:
def shortestPathLength(self, graph):
memo, final, q, steps = set(), (1 << len(graph)) - 1, [(i, 1 << i) for i in range(len(graph))], 0
while True:
new = []
for node, state in q:
if state == final: return steps
for v in graph[node]:
if (state | 1 << v, v) not in memo:
new.append((v, state | 1 << v))
memo.add((state | 1 << v, v))
q = new
steps += 1
# Deque
class Solution:
def shortestPathLength(self, graph):
memo, final, q = set(), (1 << len(graph)) - 1, collections.deque([(i, 0, 1 << i) for i in range(len(graph))])
while q:
node, steps, state = q.popleft()
if state == final: return steps
for v in graph[node]:
if (state | 1 << v, v) not in memo:
q.append((v, steps + 1, state | 1 << v))
memo.add((state | 1 << v, v))
| class Solution:
def shortest_path_length(self, graph):
(memo, final, q) = (set(), (1 << len(graph)) - 1, [(0, i, 1 << i) for i in range(len(graph))])
while q:
(steps, node, state) = heapq.heappop(q)
if state == final:
return steps
for v in graph[node]:
if (state | 1 << v, v) not in memo:
heapq.heappush(q, (steps + 1, v, state | 1 << v))
memo.add((state | 1 << v, v))
class Solution:
def shortest_path_length(self, graph):
(memo, final, q, steps) = (set(), (1 << len(graph)) - 1, [(i, 1 << i) for i in range(len(graph))], 0)
while True:
new = []
for (node, state) in q:
if state == final:
return steps
for v in graph[node]:
if (state | 1 << v, v) not in memo:
new.append((v, state | 1 << v))
memo.add((state | 1 << v, v))
q = new
steps += 1
class Solution:
def shortest_path_length(self, graph):
(memo, final, q) = (set(), (1 << len(graph)) - 1, collections.deque([(i, 0, 1 << i) for i in range(len(graph))]))
while q:
(node, steps, state) = q.popleft()
if state == final:
return steps
for v in graph[node]:
if (state | 1 << v, v) not in memo:
q.append((v, steps + 1, state | 1 << v))
memo.add((state | 1 << v, v)) |
def test_besthit():
assert False
def test_get_term():
assert False
def test_get_ancestors():
assert False
def test_search():
assert False
def test_suggest():
assert False
def test_select():
assert False
| def test_besthit():
assert False
def test_get_term():
assert False
def test_get_ancestors():
assert False
def test_search():
assert False
def test_suggest():
assert False
def test_select():
assert False |
#
# PySNMP MIB module VISM-SESSION-MIB (http://snmplabs.com/pysmi)
# ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/VISM-SESSION-MIB
# Produced by pysmi-0.3.4 at Mon Apr 29 21:27:36 2019
# On host DAVWANG4-M-1475 platform Darwin version 18.5.0 by user davwang4
# Using Python version 3.7.3 (default, Mar 27 2019, 09:23:15)
#
ObjectIdentifier, Integer, OctetString = mibBuilder.importSymbols("ASN1", "ObjectIdentifier", "Integer", "OctetString")
NamedValues, = mibBuilder.importSymbols("ASN1-ENUMERATION", "NamedValues")
ValueRangeConstraint, ConstraintsIntersection, SingleValueConstraint, ConstraintsUnion, ValueSizeConstraint = mibBuilder.importSymbols("ASN1-REFINEMENT", "ValueRangeConstraint", "ConstraintsIntersection", "SingleValueConstraint", "ConstraintsUnion", "ValueSizeConstraint")
voice, = mibBuilder.importSymbols("BASIS-MIB", "voice")
ModuleCompliance, NotificationGroup = mibBuilder.importSymbols("SNMPv2-CONF", "ModuleCompliance", "NotificationGroup")
iso, Bits, Counter64, ModuleIdentity, IpAddress, MibScalar, MibTable, MibTableRow, MibTableColumn, TimeTicks, Counter32, Integer32, NotificationType, ObjectIdentity, Unsigned32, MibIdentifier, Gauge32 = mibBuilder.importSymbols("SNMPv2-SMI", "iso", "Bits", "Counter64", "ModuleIdentity", "IpAddress", "MibScalar", "MibTable", "MibTableRow", "MibTableColumn", "TimeTicks", "Counter32", "Integer32", "NotificationType", "ObjectIdentity", "Unsigned32", "MibIdentifier", "Gauge32")
DisplayString, TextualConvention = mibBuilder.importSymbols("SNMPv2-TC", "DisplayString", "TextualConvention")
vismSessionGrp = MibIdentifier((1, 3, 6, 1, 4, 1, 351, 110, 5, 5, 11))
class TruthValue(Integer32):
subtypeSpec = Integer32.subtypeSpec + ConstraintsUnion(SingleValueConstraint(1, 2))
namedValues = NamedValues(("true", 1), ("false", 2))
vismSessionSetTable = MibTable((1, 3, 6, 1, 4, 1, 351, 110, 5, 5, 11, 1), )
if mibBuilder.loadTexts: vismSessionSetTable.setStatus('mandatory')
vismSessionSetEntry = MibTableRow((1, 3, 6, 1, 4, 1, 351, 110, 5, 5, 11, 1, 1), ).setIndexNames((0, "VISM-SESSION-MIB", "vismSessionSetNum"))
if mibBuilder.loadTexts: vismSessionSetEntry.setStatus('mandatory')
vismSessionSetNum = MibTableColumn((1, 3, 6, 1, 4, 1, 351, 110, 5, 5, 11, 1, 1, 1), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 65535))).setMaxAccess("readonly")
if mibBuilder.loadTexts: vismSessionSetNum.setStatus('mandatory')
vismSessionSetRowStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 351, 110, 5, 5, 11, 1, 1, 2), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 4, 6))).clone(namedValues=NamedValues(("active", 1), ("createAndGo", 4), ("destroy", 6)))).setMaxAccess("readwrite")
if mibBuilder.loadTexts: vismSessionSetRowStatus.setStatus('mandatory')
vismSessionSetState = MibTableColumn((1, 3, 6, 1, 4, 1, 351, 110, 5, 5, 11, 1, 1, 3), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4, 5, 6))).clone(namedValues=NamedValues(("idle", 1), ("oos", 2), ("activeIs", 3), ("standbyIs", 4), ("fullIs", 5), ("unknown", 6)))).setMaxAccess("readonly")
if mibBuilder.loadTexts: vismSessionSetState.setStatus('mandatory')
vismSessionSetTotalGrps = MibTableColumn((1, 3, 6, 1, 4, 1, 351, 110, 5, 5, 11, 1, 1, 4), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: vismSessionSetTotalGrps.setStatus('mandatory')
vismSessionSetActiveGrp = MibTableColumn((1, 3, 6, 1, 4, 1, 351, 110, 5, 5, 11, 1, 1, 5), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: vismSessionSetActiveGrp.setStatus('mandatory')
vismSessionSetSwitchFails = MibTableColumn((1, 3, 6, 1, 4, 1, 351, 110, 5, 5, 11, 1, 1, 6), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: vismSessionSetSwitchFails.setStatus('mandatory')
vismSessionSetSwitchSuccesses = MibTableColumn((1, 3, 6, 1, 4, 1, 351, 110, 5, 5, 11, 1, 1, 7), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: vismSessionSetSwitchSuccesses.setStatus('mandatory')
vismSessionSetFaultTolerant = MibTableColumn((1, 3, 6, 1, 4, 1, 351, 110, 5, 5, 11, 1, 1, 8), TruthValue()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: vismSessionSetFaultTolerant.setStatus('mandatory')
vismSessionGrpTable = MibTable((1, 3, 6, 1, 4, 1, 351, 110, 5, 5, 11, 2), )
if mibBuilder.loadTexts: vismSessionGrpTable.setStatus('mandatory')
vismSessionGrpEntry = MibTableRow((1, 3, 6, 1, 4, 1, 351, 110, 5, 5, 11, 2, 1), ).setIndexNames((0, "VISM-SESSION-MIB", "vismSessionGrpNum"))
if mibBuilder.loadTexts: vismSessionGrpEntry.setStatus('mandatory')
vismSessionGrpNum = MibTableColumn((1, 3, 6, 1, 4, 1, 351, 110, 5, 5, 11, 2, 1, 1), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 65535))).setMaxAccess("readonly")
if mibBuilder.loadTexts: vismSessionGrpNum.setStatus('mandatory')
vismSessionGrpSetNum = MibTableColumn((1, 3, 6, 1, 4, 1, 351, 110, 5, 5, 11, 2, 1, 2), Integer32()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: vismSessionGrpSetNum.setStatus('mandatory')
vismSessionGrpRowStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 351, 110, 5, 5, 11, 2, 1, 3), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 4, 6))).clone(namedValues=NamedValues(("active", 1), ("createAndGo", 4), ("destroy", 6)))).setMaxAccess("readwrite")
if mibBuilder.loadTexts: vismSessionGrpRowStatus.setStatus('mandatory')
vismSessionGrpState = MibTableColumn((1, 3, 6, 1, 4, 1, 351, 110, 5, 5, 11, 2, 1, 4), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4))).clone(namedValues=NamedValues(("idle", 1), ("oos", 2), ("is", 3), ("unknown", 4)))).setMaxAccess("readonly")
if mibBuilder.loadTexts: vismSessionGrpState.setStatus('mandatory')
vismSessionGrpCurrSession = MibTableColumn((1, 3, 6, 1, 4, 1, 351, 110, 5, 5, 11, 2, 1, 5), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: vismSessionGrpCurrSession.setStatus('mandatory')
vismSessionGrpTotalSessions = MibTableColumn((1, 3, 6, 1, 4, 1, 351, 110, 5, 5, 11, 2, 1, 6), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: vismSessionGrpTotalSessions.setStatus('mandatory')
vismSessionGrpSwitchFails = MibTableColumn((1, 3, 6, 1, 4, 1, 351, 110, 5, 5, 11, 2, 1, 7), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: vismSessionGrpSwitchFails.setStatus('mandatory')
vismSessionGrpSwitchSuccesses = MibTableColumn((1, 3, 6, 1, 4, 1, 351, 110, 5, 5, 11, 2, 1, 8), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: vismSessionGrpSwitchSuccesses.setStatus('mandatory')
vismSessionGrpMgcName = MibTableColumn((1, 3, 6, 1, 4, 1, 351, 110, 5, 5, 11, 2, 1, 9), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(1, 64))).setMaxAccess("readwrite")
if mibBuilder.loadTexts: vismSessionGrpMgcName.setStatus('mandatory')
vismRudpSessionCnfTable = MibTable((1, 3, 6, 1, 4, 1, 351, 110, 5, 5, 11, 3), )
if mibBuilder.loadTexts: vismRudpSessionCnfTable.setStatus('mandatory')
vismRudpSessionCnfEntry = MibTableRow((1, 3, 6, 1, 4, 1, 351, 110, 5, 5, 11, 3, 1), ).setIndexNames((0, "VISM-SESSION-MIB", "vismRudpSessionNum"))
if mibBuilder.loadTexts: vismRudpSessionCnfEntry.setStatus('mandatory')
vismRudpSessionNum = MibTableColumn((1, 3, 6, 1, 4, 1, 351, 110, 5, 5, 11, 3, 1, 1), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 65535))).setMaxAccess("readonly")
if mibBuilder.loadTexts: vismRudpSessionNum.setStatus('mandatory')
vismRudpSessionGrpNum = MibTableColumn((1, 3, 6, 1, 4, 1, 351, 110, 5, 5, 11, 3, 1, 2), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 65535))).setMaxAccess("readwrite")
if mibBuilder.loadTexts: vismRudpSessionGrpNum.setStatus('mandatory')
vismRudpSessionCnfRowStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 351, 110, 5, 5, 11, 3, 1, 3), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 4, 6))).clone(namedValues=NamedValues(("active", 1), ("createAndGo", 4), ("destroy", 6)))).setMaxAccess("readwrite")
if mibBuilder.loadTexts: vismRudpSessionCnfRowStatus.setStatus('mandatory')
vismRudpSessionPriority = MibTableColumn((1, 3, 6, 1, 4, 1, 351, 110, 5, 5, 11, 3, 1, 4), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 65535))).setMaxAccess("readwrite")
if mibBuilder.loadTexts: vismRudpSessionPriority.setStatus('mandatory')
vismRudpSessionState = MibTableColumn((1, 3, 6, 1, 4, 1, 351, 110, 5, 5, 11, 3, 1, 5), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3))).clone(namedValues=NamedValues(("oos", 1), ("is", 2), ("unknown", 3)))).setMaxAccess("readonly")
if mibBuilder.loadTexts: vismRudpSessionState.setStatus('mandatory')
vismRudpSessionCurrSession = MibTableColumn((1, 3, 6, 1, 4, 1, 351, 110, 5, 5, 11, 3, 1, 6), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: vismRudpSessionCurrSession.setStatus('mandatory')
vismRudpSessionLocalIp = MibTableColumn((1, 3, 6, 1, 4, 1, 351, 110, 5, 5, 11, 3, 1, 7), IpAddress()).setMaxAccess("readonly")
if mibBuilder.loadTexts: vismRudpSessionLocalIp.setStatus('mandatory')
vismRudpSessionLocalPort = MibTableColumn((1, 3, 6, 1, 4, 1, 351, 110, 5, 5, 11, 3, 1, 8), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1124, 65535))).setMaxAccess("readwrite")
if mibBuilder.loadTexts: vismRudpSessionLocalPort.setStatus('mandatory')
vismRudpSessionRmtIp = MibTableColumn((1, 3, 6, 1, 4, 1, 351, 110, 5, 5, 11, 3, 1, 9), IpAddress()).setMaxAccess("readonly")
if mibBuilder.loadTexts: vismRudpSessionRmtIp.setStatus('mandatory')
vismRudpSessionRmtPort = MibTableColumn((1, 3, 6, 1, 4, 1, 351, 110, 5, 5, 11, 3, 1, 10), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1124, 65535))).setMaxAccess("readwrite")
if mibBuilder.loadTexts: vismRudpSessionRmtPort.setStatus('mandatory')
vismRudpSessionMaxWindow = MibTableColumn((1, 3, 6, 1, 4, 1, 351, 110, 5, 5, 11, 3, 1, 11), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 64)).clone(32)).setMaxAccess("readwrite")
if mibBuilder.loadTexts: vismRudpSessionMaxWindow.setStatus('mandatory')
vismRudpSessionSyncAttempts = MibTableColumn((1, 3, 6, 1, 4, 1, 351, 110, 5, 5, 11, 3, 1, 12), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 32)).clone(5)).setMaxAccess("readwrite")
if mibBuilder.loadTexts: vismRudpSessionSyncAttempts.setStatus('mandatory')
vismRudpSessionMaxSegSize = MibTableColumn((1, 3, 6, 1, 4, 1, 351, 110, 5, 5, 11, 3, 1, 13), Integer32().subtype(subtypeSpec=ValueRangeConstraint(30, 65535)).clone(384)).setMaxAccess("readwrite")
if mibBuilder.loadTexts: vismRudpSessionMaxSegSize.setStatus('mandatory')
vismRudpSessionMaxAutoReset = MibTableColumn((1, 3, 6, 1, 4, 1, 351, 110, 5, 5, 11, 3, 1, 14), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 255)).clone(5)).setMaxAccess("readwrite")
if mibBuilder.loadTexts: vismRudpSessionMaxAutoReset.setStatus('mandatory')
vismRudpSessionRetransTmout = MibTableColumn((1, 3, 6, 1, 4, 1, 351, 110, 5, 5, 11, 3, 1, 15), Integer32().subtype(subtypeSpec=ValueRangeConstraint(100, 65535)).clone(600)).setMaxAccess("readwrite")
if mibBuilder.loadTexts: vismRudpSessionRetransTmout.setStatus('mandatory')
vismRudpSessionMaxRetrans = MibTableColumn((1, 3, 6, 1, 4, 1, 351, 110, 5, 5, 11, 3, 1, 16), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 255)).clone(3)).setMaxAccess("readwrite")
if mibBuilder.loadTexts: vismRudpSessionMaxRetrans.setStatus('mandatory')
vismRudpSessionMaxCumAck = MibTableColumn((1, 3, 6, 1, 4, 1, 351, 110, 5, 5, 11, 3, 1, 17), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 255)).clone(3)).setMaxAccess("readwrite")
if mibBuilder.loadTexts: vismRudpSessionMaxCumAck.setStatus('mandatory')
vismRudpSessionCumAckTmout = MibTableColumn((1, 3, 6, 1, 4, 1, 351, 110, 5, 5, 11, 3, 1, 18), Integer32().subtype(subtypeSpec=ValueRangeConstraint(100, 65535)).clone(300)).setMaxAccess("readwrite")
if mibBuilder.loadTexts: vismRudpSessionCumAckTmout.setStatus('mandatory')
vismRudpSessionMaxOutOfSeq = MibTableColumn((1, 3, 6, 1, 4, 1, 351, 110, 5, 5, 11, 3, 1, 19), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 255)).clone(4)).setMaxAccess("readwrite")
if mibBuilder.loadTexts: vismRudpSessionMaxOutOfSeq.setStatus('mandatory')
vismRudpSessionNullSegTmout = MibTableColumn((1, 3, 6, 1, 4, 1, 351, 110, 5, 5, 11, 3, 1, 20), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 65535)).clone(2000)).setMaxAccess("readwrite")
if mibBuilder.loadTexts: vismRudpSessionNullSegTmout.setStatus('mandatory')
vismRudpSessionTransStateTmout = MibTableColumn((1, 3, 6, 1, 4, 1, 351, 110, 5, 5, 11, 3, 1, 21), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 65535)).clone(2000)).setMaxAccess("readwrite")
if mibBuilder.loadTexts: vismRudpSessionTransStateTmout.setStatus('mandatory')
vismRudpSessionType = MibTableColumn((1, 3, 6, 1, 4, 1, 351, 110, 5, 5, 11, 3, 1, 22), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("backhaul", 1), ("lapdTrunking", 2))).clone('backhaul')).setMaxAccess("readwrite")
if mibBuilder.loadTexts: vismRudpSessionType.setStatus('mandatory')
vismRudpSessionRmtGwIp = MibTableColumn((1, 3, 6, 1, 4, 1, 351, 110, 5, 5, 11, 3, 1, 23), IpAddress()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: vismRudpSessionRmtGwIp.setStatus('mandatory')
vismRudpSessionStatTable = MibTable((1, 3, 6, 1, 4, 1, 351, 110, 5, 5, 11, 4), )
if mibBuilder.loadTexts: vismRudpSessionStatTable.setStatus('mandatory')
vismRudpSessionStatEntry = MibTableRow((1, 3, 6, 1, 4, 1, 351, 110, 5, 5, 11, 4, 1), ).setIndexNames((0, "VISM-SESSION-MIB", "vismRudpSessionStatNum"))
if mibBuilder.loadTexts: vismRudpSessionStatEntry.setStatus('mandatory')
vismRudpSessionStatNum = MibTableColumn((1, 3, 6, 1, 4, 1, 351, 110, 5, 5, 11, 4, 1, 1), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 65535))).setMaxAccess("readonly")
if mibBuilder.loadTexts: vismRudpSessionStatNum.setStatus('mandatory')
vismRudpSessionAutoResets = MibTableColumn((1, 3, 6, 1, 4, 1, 351, 110, 5, 5, 11, 4, 1, 2), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: vismRudpSessionAutoResets.setStatus('mandatory')
vismRudpSessionRcvdAutoResets = MibTableColumn((1, 3, 6, 1, 4, 1, 351, 110, 5, 5, 11, 4, 1, 3), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: vismRudpSessionRcvdAutoResets.setStatus('mandatory')
vismRudpSessionRcvdInSeqs = MibTableColumn((1, 3, 6, 1, 4, 1, 351, 110, 5, 5, 11, 4, 1, 4), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: vismRudpSessionRcvdInSeqs.setStatus('mandatory')
vismRudpSessionRcvdOutSeqs = MibTableColumn((1, 3, 6, 1, 4, 1, 351, 110, 5, 5, 11, 4, 1, 5), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: vismRudpSessionRcvdOutSeqs.setStatus('mandatory')
vismRudpSessionSentPackets = MibTableColumn((1, 3, 6, 1, 4, 1, 351, 110, 5, 5, 11, 4, 1, 6), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: vismRudpSessionSentPackets.setStatus('mandatory')
vismRudpSessionRcvdPackets = MibTableColumn((1, 3, 6, 1, 4, 1, 351, 110, 5, 5, 11, 4, 1, 7), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: vismRudpSessionRcvdPackets.setStatus('mandatory')
vismRudpSessionSentBytes = MibTableColumn((1, 3, 6, 1, 4, 1, 351, 110, 5, 5, 11, 4, 1, 8), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: vismRudpSessionSentBytes.setStatus('mandatory')
vismRudpSessionRcvdBytes = MibTableColumn((1, 3, 6, 1, 4, 1, 351, 110, 5, 5, 11, 4, 1, 9), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: vismRudpSessionRcvdBytes.setStatus('mandatory')
vismRudpSessionDataSentPkts = MibTableColumn((1, 3, 6, 1, 4, 1, 351, 110, 5, 5, 11, 4, 1, 10), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: vismRudpSessionDataSentPkts.setStatus('mandatory')
vismRudpSessionDataRcvdPkts = MibTableColumn((1, 3, 6, 1, 4, 1, 351, 110, 5, 5, 11, 4, 1, 11), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: vismRudpSessionDataRcvdPkts.setStatus('mandatory')
vismRudpSessionDiscardPkts = MibTableColumn((1, 3, 6, 1, 4, 1, 351, 110, 5, 5, 11, 4, 1, 12), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: vismRudpSessionDiscardPkts.setStatus('mandatory')
vismRudpSessionRetransPkts = MibTableColumn((1, 3, 6, 1, 4, 1, 351, 110, 5, 5, 11, 4, 1, 13), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: vismRudpSessionRetransPkts.setStatus('mandatory')
mibBuilder.exportSymbols("VISM-SESSION-MIB", vismRudpSessionCnfTable=vismRudpSessionCnfTable, vismRudpSessionLocalPort=vismRudpSessionLocalPort, vismRudpSessionCnfRowStatus=vismRudpSessionCnfRowStatus, vismRudpSessionRmtPort=vismRudpSessionRmtPort, vismRudpSessionMaxAutoReset=vismRudpSessionMaxAutoReset, vismRudpSessionAutoResets=vismRudpSessionAutoResets, vismRudpSessionTransStateTmout=vismRudpSessionTransStateTmout, vismRudpSessionRetransTmout=vismRudpSessionRetransTmout, vismRudpSessionNullSegTmout=vismRudpSessionNullSegTmout, vismRudpSessionSentBytes=vismRudpSessionSentBytes, vismSessionSetNum=vismSessionSetNum, vismRudpSessionSyncAttempts=vismRudpSessionSyncAttempts, vismRudpSessionType=vismRudpSessionType, vismRudpSessionDiscardPkts=vismRudpSessionDiscardPkts, vismSessionSetState=vismSessionSetState, vismSessionGrpSwitchSuccesses=vismSessionGrpSwitchSuccesses, vismRudpSessionState=vismRudpSessionState, TruthValue=TruthValue, vismSessionGrpSetNum=vismSessionGrpSetNum, vismRudpSessionRcvdInSeqs=vismRudpSessionRcvdInSeqs, vismRudpSessionRcvdOutSeqs=vismRudpSessionRcvdOutSeqs, vismRudpSessionRetransPkts=vismRudpSessionRetransPkts, vismRudpSessionStatEntry=vismRudpSessionStatEntry, vismSessionGrp=vismSessionGrp, vismRudpSessionGrpNum=vismRudpSessionGrpNum, vismSessionSetFaultTolerant=vismSessionSetFaultTolerant, vismRudpSessionDataRcvdPkts=vismRudpSessionDataRcvdPkts, vismSessionSetRowStatus=vismSessionSetRowStatus, vismRudpSessionLocalIp=vismRudpSessionLocalIp, vismSessionGrpTotalSessions=vismSessionGrpTotalSessions, vismSessionSetTable=vismSessionSetTable, vismRudpSessionMaxOutOfSeq=vismRudpSessionMaxOutOfSeq, vismSessionGrpMgcName=vismSessionGrpMgcName, vismSessionGrpTable=vismSessionGrpTable, vismRudpSessionCnfEntry=vismRudpSessionCnfEntry, vismSessionSetSwitchSuccesses=vismSessionSetSwitchSuccesses, vismRudpSessionRcvdAutoResets=vismRudpSessionRcvdAutoResets, vismRudpSessionCumAckTmout=vismRudpSessionCumAckTmout, vismSessionSetEntry=vismSessionSetEntry, vismRudpSessionStatTable=vismRudpSessionStatTable, vismRudpSessionNum=vismRudpSessionNum, vismRudpSessionMaxWindow=vismRudpSessionMaxWindow, vismSessionGrpCurrSession=vismSessionGrpCurrSession, vismRudpSessionMaxCumAck=vismRudpSessionMaxCumAck, vismSessionSetActiveGrp=vismSessionSetActiveGrp, vismRudpSessionRcvdBytes=vismRudpSessionRcvdBytes, vismSessionGrpNum=vismSessionGrpNum, vismSessionGrpEntry=vismSessionGrpEntry, vismSessionGrpSwitchFails=vismSessionGrpSwitchFails, vismRudpSessionRmtIp=vismRudpSessionRmtIp, vismRudpSessionDataSentPkts=vismRudpSessionDataSentPkts, vismRudpSessionPriority=vismRudpSessionPriority, vismSessionSetSwitchFails=vismSessionSetSwitchFails, vismRudpSessionRcvdPackets=vismRudpSessionRcvdPackets, vismRudpSessionMaxRetrans=vismRudpSessionMaxRetrans, vismRudpSessionMaxSegSize=vismRudpSessionMaxSegSize, vismRudpSessionStatNum=vismRudpSessionStatNum, vismRudpSessionRmtGwIp=vismRudpSessionRmtGwIp, vismRudpSessionCurrSession=vismRudpSessionCurrSession, vismSessionGrpRowStatus=vismSessionGrpRowStatus, vismSessionSetTotalGrps=vismSessionSetTotalGrps, vismSessionGrpState=vismSessionGrpState, vismRudpSessionSentPackets=vismRudpSessionSentPackets)
| (object_identifier, integer, octet_string) = mibBuilder.importSymbols('ASN1', 'ObjectIdentifier', 'Integer', 'OctetString')
(named_values,) = mibBuilder.importSymbols('ASN1-ENUMERATION', 'NamedValues')
(value_range_constraint, constraints_intersection, single_value_constraint, constraints_union, value_size_constraint) = mibBuilder.importSymbols('ASN1-REFINEMENT', 'ValueRangeConstraint', 'ConstraintsIntersection', 'SingleValueConstraint', 'ConstraintsUnion', 'ValueSizeConstraint')
(voice,) = mibBuilder.importSymbols('BASIS-MIB', 'voice')
(module_compliance, notification_group) = mibBuilder.importSymbols('SNMPv2-CONF', 'ModuleCompliance', 'NotificationGroup')
(iso, bits, counter64, module_identity, ip_address, mib_scalar, mib_table, mib_table_row, mib_table_column, time_ticks, counter32, integer32, notification_type, object_identity, unsigned32, mib_identifier, gauge32) = mibBuilder.importSymbols('SNMPv2-SMI', 'iso', 'Bits', 'Counter64', 'ModuleIdentity', 'IpAddress', 'MibScalar', 'MibTable', 'MibTableRow', 'MibTableColumn', 'TimeTicks', 'Counter32', 'Integer32', 'NotificationType', 'ObjectIdentity', 'Unsigned32', 'MibIdentifier', 'Gauge32')
(display_string, textual_convention) = mibBuilder.importSymbols('SNMPv2-TC', 'DisplayString', 'TextualConvention')
vism_session_grp = mib_identifier((1, 3, 6, 1, 4, 1, 351, 110, 5, 5, 11))
class Truthvalue(Integer32):
subtype_spec = Integer32.subtypeSpec + constraints_union(single_value_constraint(1, 2))
named_values = named_values(('true', 1), ('false', 2))
vism_session_set_table = mib_table((1, 3, 6, 1, 4, 1, 351, 110, 5, 5, 11, 1))
if mibBuilder.loadTexts:
vismSessionSetTable.setStatus('mandatory')
vism_session_set_entry = mib_table_row((1, 3, 6, 1, 4, 1, 351, 110, 5, 5, 11, 1, 1)).setIndexNames((0, 'VISM-SESSION-MIB', 'vismSessionSetNum'))
if mibBuilder.loadTexts:
vismSessionSetEntry.setStatus('mandatory')
vism_session_set_num = mib_table_column((1, 3, 6, 1, 4, 1, 351, 110, 5, 5, 11, 1, 1, 1), integer32().subtype(subtypeSpec=value_range_constraint(1, 65535))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
vismSessionSetNum.setStatus('mandatory')
vism_session_set_row_status = mib_table_column((1, 3, 6, 1, 4, 1, 351, 110, 5, 5, 11, 1, 1, 2), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 4, 6))).clone(namedValues=named_values(('active', 1), ('createAndGo', 4), ('destroy', 6)))).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
vismSessionSetRowStatus.setStatus('mandatory')
vism_session_set_state = mib_table_column((1, 3, 6, 1, 4, 1, 351, 110, 5, 5, 11, 1, 1, 3), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3, 4, 5, 6))).clone(namedValues=named_values(('idle', 1), ('oos', 2), ('activeIs', 3), ('standbyIs', 4), ('fullIs', 5), ('unknown', 6)))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
vismSessionSetState.setStatus('mandatory')
vism_session_set_total_grps = mib_table_column((1, 3, 6, 1, 4, 1, 351, 110, 5, 5, 11, 1, 1, 4), integer32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
vismSessionSetTotalGrps.setStatus('mandatory')
vism_session_set_active_grp = mib_table_column((1, 3, 6, 1, 4, 1, 351, 110, 5, 5, 11, 1, 1, 5), integer32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
vismSessionSetActiveGrp.setStatus('mandatory')
vism_session_set_switch_fails = mib_table_column((1, 3, 6, 1, 4, 1, 351, 110, 5, 5, 11, 1, 1, 6), counter32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
vismSessionSetSwitchFails.setStatus('mandatory')
vism_session_set_switch_successes = mib_table_column((1, 3, 6, 1, 4, 1, 351, 110, 5, 5, 11, 1, 1, 7), counter32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
vismSessionSetSwitchSuccesses.setStatus('mandatory')
vism_session_set_fault_tolerant = mib_table_column((1, 3, 6, 1, 4, 1, 351, 110, 5, 5, 11, 1, 1, 8), truth_value()).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
vismSessionSetFaultTolerant.setStatus('mandatory')
vism_session_grp_table = mib_table((1, 3, 6, 1, 4, 1, 351, 110, 5, 5, 11, 2))
if mibBuilder.loadTexts:
vismSessionGrpTable.setStatus('mandatory')
vism_session_grp_entry = mib_table_row((1, 3, 6, 1, 4, 1, 351, 110, 5, 5, 11, 2, 1)).setIndexNames((0, 'VISM-SESSION-MIB', 'vismSessionGrpNum'))
if mibBuilder.loadTexts:
vismSessionGrpEntry.setStatus('mandatory')
vism_session_grp_num = mib_table_column((1, 3, 6, 1, 4, 1, 351, 110, 5, 5, 11, 2, 1, 1), integer32().subtype(subtypeSpec=value_range_constraint(1, 65535))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
vismSessionGrpNum.setStatus('mandatory')
vism_session_grp_set_num = mib_table_column((1, 3, 6, 1, 4, 1, 351, 110, 5, 5, 11, 2, 1, 2), integer32()).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
vismSessionGrpSetNum.setStatus('mandatory')
vism_session_grp_row_status = mib_table_column((1, 3, 6, 1, 4, 1, 351, 110, 5, 5, 11, 2, 1, 3), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 4, 6))).clone(namedValues=named_values(('active', 1), ('createAndGo', 4), ('destroy', 6)))).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
vismSessionGrpRowStatus.setStatus('mandatory')
vism_session_grp_state = mib_table_column((1, 3, 6, 1, 4, 1, 351, 110, 5, 5, 11, 2, 1, 4), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3, 4))).clone(namedValues=named_values(('idle', 1), ('oos', 2), ('is', 3), ('unknown', 4)))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
vismSessionGrpState.setStatus('mandatory')
vism_session_grp_curr_session = mib_table_column((1, 3, 6, 1, 4, 1, 351, 110, 5, 5, 11, 2, 1, 5), integer32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
vismSessionGrpCurrSession.setStatus('mandatory')
vism_session_grp_total_sessions = mib_table_column((1, 3, 6, 1, 4, 1, 351, 110, 5, 5, 11, 2, 1, 6), integer32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
vismSessionGrpTotalSessions.setStatus('mandatory')
vism_session_grp_switch_fails = mib_table_column((1, 3, 6, 1, 4, 1, 351, 110, 5, 5, 11, 2, 1, 7), counter32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
vismSessionGrpSwitchFails.setStatus('mandatory')
vism_session_grp_switch_successes = mib_table_column((1, 3, 6, 1, 4, 1, 351, 110, 5, 5, 11, 2, 1, 8), counter32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
vismSessionGrpSwitchSuccesses.setStatus('mandatory')
vism_session_grp_mgc_name = mib_table_column((1, 3, 6, 1, 4, 1, 351, 110, 5, 5, 11, 2, 1, 9), display_string().subtype(subtypeSpec=value_size_constraint(1, 64))).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
vismSessionGrpMgcName.setStatus('mandatory')
vism_rudp_session_cnf_table = mib_table((1, 3, 6, 1, 4, 1, 351, 110, 5, 5, 11, 3))
if mibBuilder.loadTexts:
vismRudpSessionCnfTable.setStatus('mandatory')
vism_rudp_session_cnf_entry = mib_table_row((1, 3, 6, 1, 4, 1, 351, 110, 5, 5, 11, 3, 1)).setIndexNames((0, 'VISM-SESSION-MIB', 'vismRudpSessionNum'))
if mibBuilder.loadTexts:
vismRudpSessionCnfEntry.setStatus('mandatory')
vism_rudp_session_num = mib_table_column((1, 3, 6, 1, 4, 1, 351, 110, 5, 5, 11, 3, 1, 1), integer32().subtype(subtypeSpec=value_range_constraint(1, 65535))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
vismRudpSessionNum.setStatus('mandatory')
vism_rudp_session_grp_num = mib_table_column((1, 3, 6, 1, 4, 1, 351, 110, 5, 5, 11, 3, 1, 2), integer32().subtype(subtypeSpec=value_range_constraint(1, 65535))).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
vismRudpSessionGrpNum.setStatus('mandatory')
vism_rudp_session_cnf_row_status = mib_table_column((1, 3, 6, 1, 4, 1, 351, 110, 5, 5, 11, 3, 1, 3), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 4, 6))).clone(namedValues=named_values(('active', 1), ('createAndGo', 4), ('destroy', 6)))).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
vismRudpSessionCnfRowStatus.setStatus('mandatory')
vism_rudp_session_priority = mib_table_column((1, 3, 6, 1, 4, 1, 351, 110, 5, 5, 11, 3, 1, 4), integer32().subtype(subtypeSpec=value_range_constraint(1, 65535))).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
vismRudpSessionPriority.setStatus('mandatory')
vism_rudp_session_state = mib_table_column((1, 3, 6, 1, 4, 1, 351, 110, 5, 5, 11, 3, 1, 5), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3))).clone(namedValues=named_values(('oos', 1), ('is', 2), ('unknown', 3)))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
vismRudpSessionState.setStatus('mandatory')
vism_rudp_session_curr_session = mib_table_column((1, 3, 6, 1, 4, 1, 351, 110, 5, 5, 11, 3, 1, 6), integer32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
vismRudpSessionCurrSession.setStatus('mandatory')
vism_rudp_session_local_ip = mib_table_column((1, 3, 6, 1, 4, 1, 351, 110, 5, 5, 11, 3, 1, 7), ip_address()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
vismRudpSessionLocalIp.setStatus('mandatory')
vism_rudp_session_local_port = mib_table_column((1, 3, 6, 1, 4, 1, 351, 110, 5, 5, 11, 3, 1, 8), integer32().subtype(subtypeSpec=value_range_constraint(1124, 65535))).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
vismRudpSessionLocalPort.setStatus('mandatory')
vism_rudp_session_rmt_ip = mib_table_column((1, 3, 6, 1, 4, 1, 351, 110, 5, 5, 11, 3, 1, 9), ip_address()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
vismRudpSessionRmtIp.setStatus('mandatory')
vism_rudp_session_rmt_port = mib_table_column((1, 3, 6, 1, 4, 1, 351, 110, 5, 5, 11, 3, 1, 10), integer32().subtype(subtypeSpec=value_range_constraint(1124, 65535))).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
vismRudpSessionRmtPort.setStatus('mandatory')
vism_rudp_session_max_window = mib_table_column((1, 3, 6, 1, 4, 1, 351, 110, 5, 5, 11, 3, 1, 11), integer32().subtype(subtypeSpec=value_range_constraint(1, 64)).clone(32)).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
vismRudpSessionMaxWindow.setStatus('mandatory')
vism_rudp_session_sync_attempts = mib_table_column((1, 3, 6, 1, 4, 1, 351, 110, 5, 5, 11, 3, 1, 12), integer32().subtype(subtypeSpec=value_range_constraint(1, 32)).clone(5)).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
vismRudpSessionSyncAttempts.setStatus('mandatory')
vism_rudp_session_max_seg_size = mib_table_column((1, 3, 6, 1, 4, 1, 351, 110, 5, 5, 11, 3, 1, 13), integer32().subtype(subtypeSpec=value_range_constraint(30, 65535)).clone(384)).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
vismRudpSessionMaxSegSize.setStatus('mandatory')
vism_rudp_session_max_auto_reset = mib_table_column((1, 3, 6, 1, 4, 1, 351, 110, 5, 5, 11, 3, 1, 14), integer32().subtype(subtypeSpec=value_range_constraint(0, 255)).clone(5)).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
vismRudpSessionMaxAutoReset.setStatus('mandatory')
vism_rudp_session_retrans_tmout = mib_table_column((1, 3, 6, 1, 4, 1, 351, 110, 5, 5, 11, 3, 1, 15), integer32().subtype(subtypeSpec=value_range_constraint(100, 65535)).clone(600)).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
vismRudpSessionRetransTmout.setStatus('mandatory')
vism_rudp_session_max_retrans = mib_table_column((1, 3, 6, 1, 4, 1, 351, 110, 5, 5, 11, 3, 1, 16), integer32().subtype(subtypeSpec=value_range_constraint(0, 255)).clone(3)).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
vismRudpSessionMaxRetrans.setStatus('mandatory')
vism_rudp_session_max_cum_ack = mib_table_column((1, 3, 6, 1, 4, 1, 351, 110, 5, 5, 11, 3, 1, 17), integer32().subtype(subtypeSpec=value_range_constraint(0, 255)).clone(3)).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
vismRudpSessionMaxCumAck.setStatus('mandatory')
vism_rudp_session_cum_ack_tmout = mib_table_column((1, 3, 6, 1, 4, 1, 351, 110, 5, 5, 11, 3, 1, 18), integer32().subtype(subtypeSpec=value_range_constraint(100, 65535)).clone(300)).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
vismRudpSessionCumAckTmout.setStatus('mandatory')
vism_rudp_session_max_out_of_seq = mib_table_column((1, 3, 6, 1, 4, 1, 351, 110, 5, 5, 11, 3, 1, 19), integer32().subtype(subtypeSpec=value_range_constraint(0, 255)).clone(4)).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
vismRudpSessionMaxOutOfSeq.setStatus('mandatory')
vism_rudp_session_null_seg_tmout = mib_table_column((1, 3, 6, 1, 4, 1, 351, 110, 5, 5, 11, 3, 1, 20), integer32().subtype(subtypeSpec=value_range_constraint(0, 65535)).clone(2000)).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
vismRudpSessionNullSegTmout.setStatus('mandatory')
vism_rudp_session_trans_state_tmout = mib_table_column((1, 3, 6, 1, 4, 1, 351, 110, 5, 5, 11, 3, 1, 21), integer32().subtype(subtypeSpec=value_range_constraint(0, 65535)).clone(2000)).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
vismRudpSessionTransStateTmout.setStatus('mandatory')
vism_rudp_session_type = mib_table_column((1, 3, 6, 1, 4, 1, 351, 110, 5, 5, 11, 3, 1, 22), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2))).clone(namedValues=named_values(('backhaul', 1), ('lapdTrunking', 2))).clone('backhaul')).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
vismRudpSessionType.setStatus('mandatory')
vism_rudp_session_rmt_gw_ip = mib_table_column((1, 3, 6, 1, 4, 1, 351, 110, 5, 5, 11, 3, 1, 23), ip_address()).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
vismRudpSessionRmtGwIp.setStatus('mandatory')
vism_rudp_session_stat_table = mib_table((1, 3, 6, 1, 4, 1, 351, 110, 5, 5, 11, 4))
if mibBuilder.loadTexts:
vismRudpSessionStatTable.setStatus('mandatory')
vism_rudp_session_stat_entry = mib_table_row((1, 3, 6, 1, 4, 1, 351, 110, 5, 5, 11, 4, 1)).setIndexNames((0, 'VISM-SESSION-MIB', 'vismRudpSessionStatNum'))
if mibBuilder.loadTexts:
vismRudpSessionStatEntry.setStatus('mandatory')
vism_rudp_session_stat_num = mib_table_column((1, 3, 6, 1, 4, 1, 351, 110, 5, 5, 11, 4, 1, 1), integer32().subtype(subtypeSpec=value_range_constraint(1, 65535))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
vismRudpSessionStatNum.setStatus('mandatory')
vism_rudp_session_auto_resets = mib_table_column((1, 3, 6, 1, 4, 1, 351, 110, 5, 5, 11, 4, 1, 2), counter32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
vismRudpSessionAutoResets.setStatus('mandatory')
vism_rudp_session_rcvd_auto_resets = mib_table_column((1, 3, 6, 1, 4, 1, 351, 110, 5, 5, 11, 4, 1, 3), counter32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
vismRudpSessionRcvdAutoResets.setStatus('mandatory')
vism_rudp_session_rcvd_in_seqs = mib_table_column((1, 3, 6, 1, 4, 1, 351, 110, 5, 5, 11, 4, 1, 4), counter32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
vismRudpSessionRcvdInSeqs.setStatus('mandatory')
vism_rudp_session_rcvd_out_seqs = mib_table_column((1, 3, 6, 1, 4, 1, 351, 110, 5, 5, 11, 4, 1, 5), counter32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
vismRudpSessionRcvdOutSeqs.setStatus('mandatory')
vism_rudp_session_sent_packets = mib_table_column((1, 3, 6, 1, 4, 1, 351, 110, 5, 5, 11, 4, 1, 6), counter32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
vismRudpSessionSentPackets.setStatus('mandatory')
vism_rudp_session_rcvd_packets = mib_table_column((1, 3, 6, 1, 4, 1, 351, 110, 5, 5, 11, 4, 1, 7), counter32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
vismRudpSessionRcvdPackets.setStatus('mandatory')
vism_rudp_session_sent_bytes = mib_table_column((1, 3, 6, 1, 4, 1, 351, 110, 5, 5, 11, 4, 1, 8), counter32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
vismRudpSessionSentBytes.setStatus('mandatory')
vism_rudp_session_rcvd_bytes = mib_table_column((1, 3, 6, 1, 4, 1, 351, 110, 5, 5, 11, 4, 1, 9), counter32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
vismRudpSessionRcvdBytes.setStatus('mandatory')
vism_rudp_session_data_sent_pkts = mib_table_column((1, 3, 6, 1, 4, 1, 351, 110, 5, 5, 11, 4, 1, 10), counter32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
vismRudpSessionDataSentPkts.setStatus('mandatory')
vism_rudp_session_data_rcvd_pkts = mib_table_column((1, 3, 6, 1, 4, 1, 351, 110, 5, 5, 11, 4, 1, 11), counter32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
vismRudpSessionDataRcvdPkts.setStatus('mandatory')
vism_rudp_session_discard_pkts = mib_table_column((1, 3, 6, 1, 4, 1, 351, 110, 5, 5, 11, 4, 1, 12), counter32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
vismRudpSessionDiscardPkts.setStatus('mandatory')
vism_rudp_session_retrans_pkts = mib_table_column((1, 3, 6, 1, 4, 1, 351, 110, 5, 5, 11, 4, 1, 13), counter32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
vismRudpSessionRetransPkts.setStatus('mandatory')
mibBuilder.exportSymbols('VISM-SESSION-MIB', vismRudpSessionCnfTable=vismRudpSessionCnfTable, vismRudpSessionLocalPort=vismRudpSessionLocalPort, vismRudpSessionCnfRowStatus=vismRudpSessionCnfRowStatus, vismRudpSessionRmtPort=vismRudpSessionRmtPort, vismRudpSessionMaxAutoReset=vismRudpSessionMaxAutoReset, vismRudpSessionAutoResets=vismRudpSessionAutoResets, vismRudpSessionTransStateTmout=vismRudpSessionTransStateTmout, vismRudpSessionRetransTmout=vismRudpSessionRetransTmout, vismRudpSessionNullSegTmout=vismRudpSessionNullSegTmout, vismRudpSessionSentBytes=vismRudpSessionSentBytes, vismSessionSetNum=vismSessionSetNum, vismRudpSessionSyncAttempts=vismRudpSessionSyncAttempts, vismRudpSessionType=vismRudpSessionType, vismRudpSessionDiscardPkts=vismRudpSessionDiscardPkts, vismSessionSetState=vismSessionSetState, vismSessionGrpSwitchSuccesses=vismSessionGrpSwitchSuccesses, vismRudpSessionState=vismRudpSessionState, TruthValue=TruthValue, vismSessionGrpSetNum=vismSessionGrpSetNum, vismRudpSessionRcvdInSeqs=vismRudpSessionRcvdInSeqs, vismRudpSessionRcvdOutSeqs=vismRudpSessionRcvdOutSeqs, vismRudpSessionRetransPkts=vismRudpSessionRetransPkts, vismRudpSessionStatEntry=vismRudpSessionStatEntry, vismSessionGrp=vismSessionGrp, vismRudpSessionGrpNum=vismRudpSessionGrpNum, vismSessionSetFaultTolerant=vismSessionSetFaultTolerant, vismRudpSessionDataRcvdPkts=vismRudpSessionDataRcvdPkts, vismSessionSetRowStatus=vismSessionSetRowStatus, vismRudpSessionLocalIp=vismRudpSessionLocalIp, vismSessionGrpTotalSessions=vismSessionGrpTotalSessions, vismSessionSetTable=vismSessionSetTable, vismRudpSessionMaxOutOfSeq=vismRudpSessionMaxOutOfSeq, vismSessionGrpMgcName=vismSessionGrpMgcName, vismSessionGrpTable=vismSessionGrpTable, vismRudpSessionCnfEntry=vismRudpSessionCnfEntry, vismSessionSetSwitchSuccesses=vismSessionSetSwitchSuccesses, vismRudpSessionRcvdAutoResets=vismRudpSessionRcvdAutoResets, vismRudpSessionCumAckTmout=vismRudpSessionCumAckTmout, vismSessionSetEntry=vismSessionSetEntry, vismRudpSessionStatTable=vismRudpSessionStatTable, vismRudpSessionNum=vismRudpSessionNum, vismRudpSessionMaxWindow=vismRudpSessionMaxWindow, vismSessionGrpCurrSession=vismSessionGrpCurrSession, vismRudpSessionMaxCumAck=vismRudpSessionMaxCumAck, vismSessionSetActiveGrp=vismSessionSetActiveGrp, vismRudpSessionRcvdBytes=vismRudpSessionRcvdBytes, vismSessionGrpNum=vismSessionGrpNum, vismSessionGrpEntry=vismSessionGrpEntry, vismSessionGrpSwitchFails=vismSessionGrpSwitchFails, vismRudpSessionRmtIp=vismRudpSessionRmtIp, vismRudpSessionDataSentPkts=vismRudpSessionDataSentPkts, vismRudpSessionPriority=vismRudpSessionPriority, vismSessionSetSwitchFails=vismSessionSetSwitchFails, vismRudpSessionRcvdPackets=vismRudpSessionRcvdPackets, vismRudpSessionMaxRetrans=vismRudpSessionMaxRetrans, vismRudpSessionMaxSegSize=vismRudpSessionMaxSegSize, vismRudpSessionStatNum=vismRudpSessionStatNum, vismRudpSessionRmtGwIp=vismRudpSessionRmtGwIp, vismRudpSessionCurrSession=vismRudpSessionCurrSession, vismSessionGrpRowStatus=vismSessionGrpRowStatus, vismSessionSetTotalGrps=vismSessionSetTotalGrps, vismSessionGrpState=vismSessionGrpState, vismRudpSessionSentPackets=vismRudpSessionSentPackets) |
#---------------------------------
# PIPELINE RUN
#---------------------------------
# The configuration settings to run the pipeline. These options are overwritten
# if a new setting is specified as an argument when running the pipeline.
# These settings include:
# - logDir: The directory where the batch queue scripts are stored, along with
# stdout and stderr dumps after the job is run.
# - logFile: Log file in logDir which all commands submitted are stored.
# - style: the style which the pipeline runs in. One of:
# - 'print': prints the stages which will be run to stdout,
# - 'run': runs the pipeline until the specified stages are finished, and
# - 'flowchart': outputs a flowchart of the pipeline stages specified and
# their dependencies.
# - procs: the number of python processes to run simultaneously. This
# determines the maximum parallelism of the pipeline. For distributed jobs
# it also constrains the maximum total jobs submitted to the queue at any one
# time.
# - verbosity: one of 0 (quiet), 1 (normal), 2 (chatty).
# - end: the desired tasks to be run. Rubra will also run all tasks which are
# dependencies of these tasks.
# - force: tasks which will be forced to run, regardless of timestamps.
# - rebuild: one of 'fromstart','fromend'. Whether to calculate which
# dependencies will be rerun by working back from an end task to the latest
# up-to-date task, or forward from the earliest out-of-date task. 'fromstart'
# is the most conservative and commonly used as it brings all intermediate
# tasks up to date.
# - manager: "pbs" or "slurm"
pipeline = {
"logDir": "log",
"logFile": "pipeline_commands.log",
"style": "print",
"procs": 16,
"verbose": 2,
"end": ["fastQCSummary", "voom", "edgeR", "qcSummary"],
"force": [],
"rebuild": "fromstart",
"manager": "slurm",
}
# This option specifies whether or not you are using VLSCI's Merri or Barcoo
# cluster. If True, this changes java's tmpdir to the job's tmp dir on
# /scratch ($TMPDIR) instead of using the default /tmp which has limited space.
using_merri = True
# Optional parameter governing how Ruffus determines which part of the
# pipeline is out-of-date and needs to be re-run. If set to False, Ruffus
# will work back from the end target tasks and only execute the pipeline
# after the first up-to-date tasks that it encounters.
# Warning: Use with caution! If you don't understand what this option does,
# keep this option as True.
maximal_rebuild_mode = True
#---------------------------------
# CONFIG
#---------------------------------
# Name of analysis. Changing the name will create new sub-directories for
# voom, edgeR, and cuffdiff analysis.
analysis_name = "analysis_v1"
# The directory containing *.fastq.gz read files.
raw_seq_dir = "/path_to_project/fastq_files/"
# Path to the CSV file with sample information regarding condition and
# covariates if available.
samples_csv = "/path_to_project/fastq_files/samples.csv"
# Path to the CSV file with which comparisons to make.
comparisons_csv = "/path_to_project/fastq_files/comparisons.csv"
# The output directory.
output_dir = "/path_to_project/results/"
# Sequencing platform for read group information.
platform = "Illumina"
# If the experiment is paired-end or single-end: True (PE) or False (SE).
paired_end = False
# Whether the experiment is strand specific: "yes", "no", or "reverse".
stranded = "no"
#---------------------------------
# REFERENCE FILES
#---------------------------------
# Most reference files can be obtained from the Illumina iGenomes project:
# http://cufflinks.cbcb.umd.edu/igenomes.html
# Bowtie 2 index files: *.1.bt2, *.2.bt2, *.3.bt2, *.4.bt2, *.rev.1.bt2,
# *.rev.2.bt2.
genome_ref = "/vlsci/VR0002/shared/Reference_Files/Indexed_Ref_Genomes/bowtie_Indexed/human_g1k_v37"
# Genome reference FASTA. Also needs an indexed genome (.fai) and dictionary
# (.dict) file in the same directory.
genome_ref_fa = "/vlsci/VR0002/shared/Reference_Files/Indexed_Ref_Genomes/bowtie_Indexed/human_g1k_v37.fa"
# Gene set reference file (.gtf). Recommend using the GTF file obtained from
# Ensembl as Ensembl gene IDs are used for annotation (if specified).
gene_ref = "/vlsci/VR0002/shared/Reference_Files/Indexed_Ref_Genomes/TuxedoSuite_Ref_Files/Homo_sapiens/Ensembl/GRCh37/Annotation/Genes/genes.gtf"
# Either a rRNA reference fasta (ending in .fasta or .fa) or an GATK interval
# file (ending in .list) containing rRNA intervals to calculate the rRNA
# content. Can set as False if not available.
# rrna_ref = "/vlsci/VR0002/shared/Reference_Files/rRNA/human_all_rRNA.fasta"
rrna_ref = "/vlsci/VR0002/shared/jchung/human_reference_files/human_rRNA.list"
# Optional tRNA and rRNA sequences to filter out in Cuffdiff (.gtf or .gff).
# Set as False if not provided.
cuffdiff_mask_file = False
#---------------------------------
# TRIMMOMATIC PARAMETERS
#---------------------------------
# Parameters for Trimmomatic (a tool for trimming Illumina reads).
# http://www.usadellab.org/cms/index.php?page=trimmomatic
# Path of a FASTA file containing adapter sequences used in sequencing.
adapter_seq = "/vlsci/VR0002/shared/jchung/human_reference_files/TruSeqAdapters.fa"
# The maximum mismatch count which will still allow a full match to be
# performed.
seed_mismatches = 2
# How accurate the match between the two 'adapter ligated' reads must be for
# PE palindrome read alignment.
palendrome_clip_threshold = 30
# How accurate the match between any adapter etc. sequence must be against a
# read.
simple_clip_threshold = 10
# The minimum quality needed to keep a base and the minimum length of reads to
# be kept.
extra_parameters = "LEADING:3 TRAILING:3 SLIDINGWINDOW:4:15 MINLEN:36"
# Output Trimmomatic log file
write_trimmomatic_log = True
#---------------------------------
# R PARAMETERS
#---------------------------------
# Get annotations from Ensembl BioMart. GTF file needs to use IDs from Ensembl.
# Set as False to skip annotation, else
# provide the name of the dataset that will be queried. Attributes to be
# obtained include gene symbol, chromosome name, description, and gene biotype.
# Commonly used datasets:
# human: "hsapiens_gene_ensembl"
# mouse: "mmusculus_gene_ensembl"
# rat: "rnorvegicus_gene_ensembl"
# You can list all available datasets in R by using the listDatasets fuction:
# > library(biomaRt)
# > listDatasets(useMart("ensembl"))
# The gene symbol is obtained from the attribute "hgnc_symbol" (human) or
# "mgi_symbol" (mice/rats) if available. If not, the "external_gene_id" is used
# to obtain the gene symbol. You can change this by editing the script:
# scripts/combine_and_annotate.r
annotation_dataset = "hsapiens_gene_ensembl"
#---------------------------------
# SCRIPT PATHS
#---------------------------------
# Paths to other wrapper scripts needed to run the pipeline. Make sure these
# paths are relative to the directory where you plan to run the pipeline in or
# change them to absolute paths.
html_index_script = "scripts/html_index.py"
index_script = "scripts/build_index.sh"
tophat_script = "scripts/run_tophat.sh"
merge_tophat_script = "scripts/merge_tophat.sh"
fix_tophat_unmapped_reads_script = "scripts/fix_tophat_unmapped_reads.py"
htseq_script = "scripts/run_htseq.sh"
fastqc_parse_script = "scripts/fastqc_parse.py"
qc_parse_script = "scripts/qc_parse.py"
alignment_stats_script = "scripts/alignment_stats.sh"
combine_and_annotate_script = "scripts/combine_and_annotate.R"
de_analysis_script = "scripts/de_analysis.R"
#---------------------------------
# PROGRAM PATHS
#---------------------------------
trimmomatic_path = "/usr/local/trimmomatic/0.30/trimmomatic-0.30.jar"
reorder_sam_path = "/usr/local/picard/1.69/lib/ReorderSam.jar"
mark_duplicates_path = "/usr/local/picard/1.69/lib/MarkDuplicates.jar"
rnaseqc_path = "/usr/local/rnaseqc/1.1.7/RNA-SeQC_v1.1.7.jar"
add_or_replace_read_groups_path = "/usr/local/picard/1.69/lib/AddOrReplaceReadGroups.jar"
| pipeline = {'logDir': 'log', 'logFile': 'pipeline_commands.log', 'style': 'print', 'procs': 16, 'verbose': 2, 'end': ['fastQCSummary', 'voom', 'edgeR', 'qcSummary'], 'force': [], 'rebuild': 'fromstart', 'manager': 'slurm'}
using_merri = True
maximal_rebuild_mode = True
analysis_name = 'analysis_v1'
raw_seq_dir = '/path_to_project/fastq_files/'
samples_csv = '/path_to_project/fastq_files/samples.csv'
comparisons_csv = '/path_to_project/fastq_files/comparisons.csv'
output_dir = '/path_to_project/results/'
platform = 'Illumina'
paired_end = False
stranded = 'no'
genome_ref = '/vlsci/VR0002/shared/Reference_Files/Indexed_Ref_Genomes/bowtie_Indexed/human_g1k_v37'
genome_ref_fa = '/vlsci/VR0002/shared/Reference_Files/Indexed_Ref_Genomes/bowtie_Indexed/human_g1k_v37.fa'
gene_ref = '/vlsci/VR0002/shared/Reference_Files/Indexed_Ref_Genomes/TuxedoSuite_Ref_Files/Homo_sapiens/Ensembl/GRCh37/Annotation/Genes/genes.gtf'
rrna_ref = '/vlsci/VR0002/shared/jchung/human_reference_files/human_rRNA.list'
cuffdiff_mask_file = False
adapter_seq = '/vlsci/VR0002/shared/jchung/human_reference_files/TruSeqAdapters.fa'
seed_mismatches = 2
palendrome_clip_threshold = 30
simple_clip_threshold = 10
extra_parameters = 'LEADING:3 TRAILING:3 SLIDINGWINDOW:4:15 MINLEN:36'
write_trimmomatic_log = True
annotation_dataset = 'hsapiens_gene_ensembl'
html_index_script = 'scripts/html_index.py'
index_script = 'scripts/build_index.sh'
tophat_script = 'scripts/run_tophat.sh'
merge_tophat_script = 'scripts/merge_tophat.sh'
fix_tophat_unmapped_reads_script = 'scripts/fix_tophat_unmapped_reads.py'
htseq_script = 'scripts/run_htseq.sh'
fastqc_parse_script = 'scripts/fastqc_parse.py'
qc_parse_script = 'scripts/qc_parse.py'
alignment_stats_script = 'scripts/alignment_stats.sh'
combine_and_annotate_script = 'scripts/combine_and_annotate.R'
de_analysis_script = 'scripts/de_analysis.R'
trimmomatic_path = '/usr/local/trimmomatic/0.30/trimmomatic-0.30.jar'
reorder_sam_path = '/usr/local/picard/1.69/lib/ReorderSam.jar'
mark_duplicates_path = '/usr/local/picard/1.69/lib/MarkDuplicates.jar'
rnaseqc_path = '/usr/local/rnaseqc/1.1.7/RNA-SeQC_v1.1.7.jar'
add_or_replace_read_groups_path = '/usr/local/picard/1.69/lib/AddOrReplaceReadGroups.jar' |
class DesignOpt:
def __init__(mesh, dofManager, quadRule):
self.mesh = mesh
self.dofManager = dofManager
self.quadRule = quadRule
| class Designopt:
def __init__(mesh, dofManager, quadRule):
self.mesh = mesh
self.dofManager = dofManager
self.quadRule = quadRule |
__author__ = 'rhoerbe' #2013-09-05
# Entity Categories specifying the PVP eGov Token as of "PVP2-Allgemein V2.1.0", http://www.ref.gv.at/
EGOVTOKEN = ["PVP-VERSION",
"PVP-PRINCIPAL-NAME",
"PVP-GIVENNAME",
"PVP-BIRTHDATE",
"PVP-USERID",
"PVP-GID",
"PVP-BPK",
"PVP-MAIL",
"PVP-TEL",
"PVP-PARTICIPANT-ID",
"PVP-PARTICIPANT-OKZ",
"PVP-OU-OKZ",
"PVP-OU",
"PVP-OU-GV-OU-ID",
"PVP-FUNCTION",
"PVP-ROLES",
]
CHARGEATTR = ["PVP-INVOICE-RECPT-ID",
"PVP-COST-CENTER-ID",
"PVP-CHARGE-CODE",
]
# all eGov Token attributes except (1) transaction charging and (2) chaining
PVP2 = "http://www.ref.gv.at/ns/names/agiz/pvp/egovtoken"
# transaction charging extension
PVP2CHARGE = "http://www.ref.gv.at/ns/names/agiz/pvp/egovtoken-charge"
RELEASE = {
PVP2: EGOVTOKEN,
PVP2CHARGE: CHARGEATTR,
}
| __author__ = 'rhoerbe'
egovtoken = ['PVP-VERSION', 'PVP-PRINCIPAL-NAME', 'PVP-GIVENNAME', 'PVP-BIRTHDATE', 'PVP-USERID', 'PVP-GID', 'PVP-BPK', 'PVP-MAIL', 'PVP-TEL', 'PVP-PARTICIPANT-ID', 'PVP-PARTICIPANT-OKZ', 'PVP-OU-OKZ', 'PVP-OU', 'PVP-OU-GV-OU-ID', 'PVP-FUNCTION', 'PVP-ROLES']
chargeattr = ['PVP-INVOICE-RECPT-ID', 'PVP-COST-CENTER-ID', 'PVP-CHARGE-CODE']
pvp2 = 'http://www.ref.gv.at/ns/names/agiz/pvp/egovtoken'
pvp2_charge = 'http://www.ref.gv.at/ns/names/agiz/pvp/egovtoken-charge'
release = {PVP2: EGOVTOKEN, PVP2CHARGE: CHARGEATTR} |
# classes for inline and reply keyboards
class InlineButton:
def __init__(self, text_, callback_data_ = "", url_=""):
self.text = text_
self.callback_data = callback_data_
self.url = url_
if not self.callback_data and not self.url:
raise TypeError("Either callback_data or url must be given")
def __str__(self):
return str(self.toDict())
def toDict(self):
return self.__dict__
class KeyboardButton:
def __init__(self, text_):
self.text = text_
def __str__(self):
return str(self.toDict())
def toDict(self):
return self.__dict__
class ButtonList:
def __init__(self, button_type_: type, button_list_: list = []):
self.__button_type = None
self.__button_type_str = ""
self.__button_list = []
if button_type_ == InlineButton:
self.__button_type = button_type_
self.__button_type_str = "inline"
elif button_type_ == KeyboardButton:
self.__button_type = button_type_
self.__button_type_str = "keyboard"
else:
raise TypeError(
"given button_type is not type InlineButton or KeyboardButton")
if button_list_:
for element in button_list_:
if isinstance(element, self.__button_type):
self.__button_list.append(element)
def __str__(self):
return str(self.toDict())
def toDict(self):
return [button.toDict() for button in self.__button_list]
def addCommand(self, button_):
if isinstance(button_, self.__button_type):
self.__button_list.append(button_)
def bulkAddCommands(self, button_list: list):
for element in button_list:
if isinstance(element, self.__button_type):
self.__button_list.append(element)
def getButtonType(self):
return self.__button_type
def toBotDict(self, special_button: type = None, column_count: int = 3):
button_list = []
button_row = []
for button in self.__button_list:
button_row.append(button.toDict())
if len(button_row) >= column_count or button == self.__button_list[-1]:
button_list.append(button_row[:])
button_row.clear()
if special_button and isinstance(special_button, self.__button_type):
button_list.append([special_button.toDict()])
return {f'{"inline_" if self.__button_type_str == "inline" else ""}keyboard': button_list}
| class Inlinebutton:
def __init__(self, text_, callback_data_='', url_=''):
self.text = text_
self.callback_data = callback_data_
self.url = url_
if not self.callback_data and (not self.url):
raise type_error('Either callback_data or url must be given')
def __str__(self):
return str(self.toDict())
def to_dict(self):
return self.__dict__
class Keyboardbutton:
def __init__(self, text_):
self.text = text_
def __str__(self):
return str(self.toDict())
def to_dict(self):
return self.__dict__
class Buttonlist:
def __init__(self, button_type_: type, button_list_: list=[]):
self.__button_type = None
self.__button_type_str = ''
self.__button_list = []
if button_type_ == InlineButton:
self.__button_type = button_type_
self.__button_type_str = 'inline'
elif button_type_ == KeyboardButton:
self.__button_type = button_type_
self.__button_type_str = 'keyboard'
else:
raise type_error('given button_type is not type InlineButton or KeyboardButton')
if button_list_:
for element in button_list_:
if isinstance(element, self.__button_type):
self.__button_list.append(element)
def __str__(self):
return str(self.toDict())
def to_dict(self):
return [button.toDict() for button in self.__button_list]
def add_command(self, button_):
if isinstance(button_, self.__button_type):
self.__button_list.append(button_)
def bulk_add_commands(self, button_list: list):
for element in button_list:
if isinstance(element, self.__button_type):
self.__button_list.append(element)
def get_button_type(self):
return self.__button_type
def to_bot_dict(self, special_button: type=None, column_count: int=3):
button_list = []
button_row = []
for button in self.__button_list:
button_row.append(button.toDict())
if len(button_row) >= column_count or button == self.__button_list[-1]:
button_list.append(button_row[:])
button_row.clear()
if special_button and isinstance(special_button, self.__button_type):
button_list.append([special_button.toDict()])
return {f"{('inline_' if self.__button_type_str == 'inline' else '')}keyboard": button_list} |
def rank4_simple(a, b):
assert a.shape == b.shape
da, db, dc, dd = a.shape
s = 0
for iia in range(da):
for iib in range(db):
for iic in range(dc):
for iid in range(dd):
s += a[iia, iib, iic, iid] * b[iia, iib, iic, iid]
return s
| def rank4_simple(a, b):
assert a.shape == b.shape
(da, db, dc, dd) = a.shape
s = 0
for iia in range(da):
for iib in range(db):
for iic in range(dc):
for iid in range(dd):
s += a[iia, iib, iic, iid] * b[iia, iib, iic, iid]
return s |
#
# PySNMP MIB module CNTEXT-MIB (http://snmplabs.com/pysmi)
# ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/CNTEXT-MIB
# Produced by pysmi-0.3.4 at Wed May 1 12:25:29 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)
#
cntExt, = mibBuilder.importSymbols("APENT-MIB", "cntExt")
ObjectIdentifier, OctetString, Integer = mibBuilder.importSymbols("ASN1", "ObjectIdentifier", "OctetString", "Integer")
NamedValues, = mibBuilder.importSymbols("ASN1-ENUMERATION", "NamedValues")
ValueSizeConstraint, ConstraintsIntersection, ConstraintsUnion, ValueRangeConstraint, SingleValueConstraint = mibBuilder.importSymbols("ASN1-REFINEMENT", "ValueSizeConstraint", "ConstraintsIntersection", "ConstraintsUnion", "ValueRangeConstraint", "SingleValueConstraint")
ModuleCompliance, NotificationGroup = mibBuilder.importSymbols("SNMPv2-CONF", "ModuleCompliance", "NotificationGroup")
Counter64, NotificationType, Gauge32, ObjectIdentity, TimeTicks, IpAddress, MibIdentifier, Bits, ModuleIdentity, Unsigned32, iso, Counter32, Integer32, MibScalar, MibTable, MibTableRow, MibTableColumn = mibBuilder.importSymbols("SNMPv2-SMI", "Counter64", "NotificationType", "Gauge32", "ObjectIdentity", "TimeTicks", "IpAddress", "MibIdentifier", "Bits", "ModuleIdentity", "Unsigned32", "iso", "Counter32", "Integer32", "MibScalar", "MibTable", "MibTableRow", "MibTableColumn")
TextualConvention, RowStatus, DisplayString = mibBuilder.importSymbols("SNMPv2-TC", "TextualConvention", "RowStatus", "DisplayString")
apCntExtMib = ModuleIdentity((1, 3, 6, 1, 4, 1, 2467, 1, 16, 1))
if mibBuilder.loadTexts: apCntExtMib.setLastUpdated('9710092000Z')
if mibBuilder.loadTexts: apCntExtMib.setOrganization('ArrowPoint Communications Inc.')
if mibBuilder.loadTexts: apCntExtMib.setContactInfo(' Postal: ArrowPoint Communications Inc. 50 Nagog Park Acton, Massachusetts 01720 Tel: +1 978-206-3000 option 1 E-Mail: support@arrowpoint.com')
if mibBuilder.loadTexts: apCntExtMib.setDescription('The MIB module used to describe the ArrowPoint Communications content rule table')
apCntRuleOrder = MibScalar((1, 3, 6, 1, 4, 1, 2467, 1, 16, 2), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 1))).clone(namedValues=NamedValues(("hierarchicalFirst", 0), ("cacheRuleFirst", 1))).clone('cacheRuleFirst')).setMaxAccess("readwrite")
if mibBuilder.loadTexts: apCntRuleOrder.setStatus('current')
if mibBuilder.loadTexts: apCntRuleOrder.setDescription('Affects which ruleset is consulted first when categorizing flows')
apCntTable = MibTable((1, 3, 6, 1, 4, 1, 2467, 1, 16, 4), )
if mibBuilder.loadTexts: apCntTable.setStatus('current')
if mibBuilder.loadTexts: apCntTable.setDescription('A list of content rule entries.')
apCntEntry = MibTableRow((1, 3, 6, 1, 4, 1, 2467, 1, 16, 4, 1), ).setIndexNames((0, "CNTEXT-MIB", "apCntOwner"), (0, "CNTEXT-MIB", "apCntName"))
if mibBuilder.loadTexts: apCntEntry.setStatus('current')
if mibBuilder.loadTexts: apCntEntry.setDescription('A group of information to uniquely identify a content providing service.')
apCntOwner = MibTableColumn((1, 3, 6, 1, 4, 1, 2467, 1, 16, 4, 1, 1), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(1, 31))).setMaxAccess("readcreate")
if mibBuilder.loadTexts: apCntOwner.setStatus('current')
if mibBuilder.loadTexts: apCntOwner.setDescription('The name of the contents administrative owner.')
apCntName = MibTableColumn((1, 3, 6, 1, 4, 1, 2467, 1, 16, 4, 1, 2), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(1, 31))).setMaxAccess("readcreate")
if mibBuilder.loadTexts: apCntName.setStatus('current')
if mibBuilder.loadTexts: apCntName.setDescription('The name of the content providing service.')
apCntIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 2467, 1, 16, 4, 1, 3), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: apCntIndex.setStatus('current')
if mibBuilder.loadTexts: apCntIndex.setDescription('The unique service index assigned to the name by the SCM.')
apCntIPAddress = MibTableColumn((1, 3, 6, 1, 4, 1, 2467, 1, 16, 4, 1, 4), IpAddress()).setMaxAccess("readcreate")
if mibBuilder.loadTexts: apCntIPAddress.setStatus('current')
if mibBuilder.loadTexts: apCntIPAddress.setDescription('The IP Address the of the content providing service.')
apCntIPProtocol = MibTableColumn((1, 3, 6, 1, 4, 1, 2467, 1, 16, 4, 1, 5), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 6, 17))).clone(namedValues=NamedValues(("any", 0), ("tcp", 6), ("udp", 17))).clone('any')).setMaxAccess("readcreate")
if mibBuilder.loadTexts: apCntIPProtocol.setStatus('current')
if mibBuilder.loadTexts: apCntIPProtocol.setDescription('The IP Protocol the of the content providing service.')
apCntPort = MibTableColumn((1, 3, 6, 1, 4, 1, 2467, 1, 16, 4, 1, 6), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 65535))).setMaxAccess("readcreate")
if mibBuilder.loadTexts: apCntPort.setStatus('current')
if mibBuilder.loadTexts: apCntPort.setDescription('The UDP or TCP port of the content providing service.')
apCntUrl = MibTableColumn((1, 3, 6, 1, 4, 1, 2467, 1, 16, 4, 1, 7), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 255))).setMaxAccess("readcreate")
if mibBuilder.loadTexts: apCntUrl.setStatus('current')
if mibBuilder.loadTexts: apCntUrl.setDescription('The name of the content providing service.')
apCntSticky = MibTableColumn((1, 3, 6, 1, 4, 1, 2467, 1, 16, 4, 1, 8), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4, 5, 6, 7, 8))).clone(namedValues=NamedValues(("none", 1), ("ssl", 2), ("cookieurl", 3), ("url", 4), ("cookies", 5), ("sticky-srcip-dstport", 6), ("sticky-srcip", 7), ("arrowpoint-cookie", 8))).clone('none')).setMaxAccess("readcreate")
if mibBuilder.loadTexts: apCntSticky.setStatus('current')
if mibBuilder.loadTexts: apCntSticky.setDescription('The sticky attribute controls whether source addresses stick to a server once they go to it initially based on load balancing.')
apCntBalance = MibTableColumn((1, 3, 6, 1, 4, 1, 2467, 1, 16, 4, 1, 9), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4, 5, 6, 7, 8, 9, 10))).clone(namedValues=NamedValues(("roundrobin", 1), ("aca", 2), ("destip", 3), ("srcip", 4), ("domain", 5), ("url", 6), ("leastconn", 7), ("weightedrr", 8), ("domainhash", 9), ("urlhash", 10))).clone('roundrobin')).setMaxAccess("readcreate")
if mibBuilder.loadTexts: apCntBalance.setStatus('current')
if mibBuilder.loadTexts: apCntBalance.setDescription('The load distribution algorithm to use for this content.')
apCntQOSTag = MibTableColumn((1, 3, 6, 1, 4, 1, 2467, 1, 16, 4, 1, 10), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 7)).clone(7)).setMaxAccess("readcreate")
if mibBuilder.loadTexts: apCntQOSTag.setStatus('current')
if mibBuilder.loadTexts: apCntQOSTag.setDescription('The QOS tag to associate with this content definition.')
apCntEnable = MibTableColumn((1, 3, 6, 1, 4, 1, 2467, 1, 16, 4, 1, 11), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 1))).clone(namedValues=NamedValues(("disable", 0), ("enable", 1))).clone('disable')).setMaxAccess("readcreate")
if mibBuilder.loadTexts: apCntEnable.setStatus('current')
if mibBuilder.loadTexts: apCntEnable.setDescription('The state of the service, either enable or disabled')
apCntRedirect = MibTableColumn((1, 3, 6, 1, 4, 1, 2467, 1, 16, 4, 1, 12), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 64))).setMaxAccess("readcreate")
if mibBuilder.loadTexts: apCntRedirect.setStatus('current')
if mibBuilder.loadTexts: apCntRedirect.setDescription('Where to 302 redirect any requests for this content')
apCntDrop = MibTableColumn((1, 3, 6, 1, 4, 1, 2467, 1, 16, 4, 1, 13), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 64))).setMaxAccess("readcreate")
if mibBuilder.loadTexts: apCntDrop.setStatus('current')
if mibBuilder.loadTexts: apCntDrop.setDescription('Specify that requests for this content receive a 404 message and the txt to include')
apCntSize = MibTableColumn((1, 3, 6, 1, 4, 1, 2467, 1, 16, 4, 1, 14), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 65535)).clone(4000)).setMaxAccess("readcreate")
if mibBuilder.loadTexts: apCntSize.setStatus('obsolete')
if mibBuilder.loadTexts: apCntSize.setDescription('This object is obsolete.')
apCntPersistence = MibTableColumn((1, 3, 6, 1, 4, 1, 2467, 1, 16, 4, 1, 15), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 1))).clone(namedValues=NamedValues(("disable", 0), ("enable", 1))).clone('disable')).setMaxAccess("readcreate")
if mibBuilder.loadTexts: apCntPersistence.setStatus('current')
if mibBuilder.loadTexts: apCntPersistence.setDescription('Controls whether each GET is inspected individuallly or else GETs may be pipelined on a single persistent TCP connection')
apCntAuthor = MibTableColumn((1, 3, 6, 1, 4, 1, 2467, 1, 16, 4, 1, 16), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(1, 16))).setMaxAccess("readcreate")
if mibBuilder.loadTexts: apCntAuthor.setStatus('current')
if mibBuilder.loadTexts: apCntAuthor.setDescription('The name of the author of this content rule.')
apCntSpider = MibTableColumn((1, 3, 6, 1, 4, 1, 2467, 1, 16, 4, 1, 17), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 1))).clone(namedValues=NamedValues(("disable", 0), ("enable", 1))).clone('disable')).setMaxAccess("readcreate")
if mibBuilder.loadTexts: apCntSpider.setStatus('current')
if mibBuilder.loadTexts: apCntSpider.setDescription('Controls whether the content will be spidered at rule activation time.')
apCntHits = MibTableColumn((1, 3, 6, 1, 4, 1, 2467, 1, 16, 4, 1, 18), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: apCntHits.setStatus('current')
if mibBuilder.loadTexts: apCntHits.setDescription('Number of times user request was detected which invoked this content rule.')
apCntRedirects = MibTableColumn((1, 3, 6, 1, 4, 1, 2467, 1, 16, 4, 1, 19), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: apCntRedirects.setStatus('current')
if mibBuilder.loadTexts: apCntRedirects.setDescription('Number of times this content rule caused a redirect request.')
apCntDrops = MibTableColumn((1, 3, 6, 1, 4, 1, 2467, 1, 16, 4, 1, 20), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: apCntDrops.setStatus('current')
if mibBuilder.loadTexts: apCntDrops.setDescription('Number of times this content rule was unable to establish a connection.')
apCntRejNoServices = MibTableColumn((1, 3, 6, 1, 4, 1, 2467, 1, 16, 4, 1, 21), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: apCntRejNoServices.setStatus('current')
if mibBuilder.loadTexts: apCntRejNoServices.setDescription('Number of times this content rule rejected a connection for want of a service.')
apCntRejServOverload = MibTableColumn((1, 3, 6, 1, 4, 1, 2467, 1, 16, 4, 1, 22), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: apCntRejServOverload.setStatus('current')
if mibBuilder.loadTexts: apCntRejServOverload.setDescription('Number of times this content rule rejected a connection because of overload on the designated service(s).')
apCntSpoofs = MibTableColumn((1, 3, 6, 1, 4, 1, 2467, 1, 16, 4, 1, 23), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: apCntSpoofs.setStatus('current')
if mibBuilder.loadTexts: apCntSpoofs.setDescription('Number of times a connection was created using this content rule.')
apCntNats = MibTableColumn((1, 3, 6, 1, 4, 1, 2467, 1, 16, 4, 1, 24), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: apCntNats.setStatus('current')
if mibBuilder.loadTexts: apCntNats.setDescription('Number of times network address translation was performed using this content rule.')
apCntByteCount = MibTableColumn((1, 3, 6, 1, 4, 1, 2467, 1, 16, 4, 1, 25), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: apCntByteCount.setStatus('current')
if mibBuilder.loadTexts: apCntByteCount.setDescription('Total number of bytes passed using this content rule.')
apCntFrameCount = MibTableColumn((1, 3, 6, 1, 4, 1, 2467, 1, 16, 4, 1, 26), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: apCntFrameCount.setStatus('current')
if mibBuilder.loadTexts: apCntFrameCount.setDescription('Total number of frames passed using this content rule.')
apCntZeroButton = MibTableColumn((1, 3, 6, 1, 4, 1, 2467, 1, 16, 4, 1, 27), Integer32()).setMaxAccess("readcreate")
if mibBuilder.loadTexts: apCntZeroButton.setStatus('current')
if mibBuilder.loadTexts: apCntZeroButton.setDescription('Number of time counters for this content rule have been zeroed.')
apCntHotListEnabled = MibTableColumn((1, 3, 6, 1, 4, 1, 2467, 1, 16, 4, 1, 28), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 1))).clone(namedValues=NamedValues(("disable", 0), ("enable", 1))).clone('disable')).setMaxAccess("readcreate")
if mibBuilder.loadTexts: apCntHotListEnabled.setStatus('current')
if mibBuilder.loadTexts: apCntHotListEnabled.setDescription('Controls whether a hotlist will be maintained for this content rule.')
apCntHotListSize = MibTableColumn((1, 3, 6, 1, 4, 1, 2467, 1, 16, 4, 1, 29), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 100)).clone(10)).setMaxAccess("readcreate")
if mibBuilder.loadTexts: apCntHotListSize.setStatus('current')
if mibBuilder.loadTexts: apCntHotListSize.setDescription('Total number of hotlist entries which will be maintainted for this rule.')
apCntHotListThreshold = MibTableColumn((1, 3, 6, 1, 4, 1, 2467, 1, 16, 4, 1, 30), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 65535))).setMaxAccess("readcreate")
if mibBuilder.loadTexts: apCntHotListThreshold.setStatus('current')
if mibBuilder.loadTexts: apCntHotListThreshold.setDescription('The threshold under which an item is not considered hot.')
apCntHotListType = MibTableColumn((1, 3, 6, 1, 4, 1, 2467, 1, 16, 4, 1, 31), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0))).clone(namedValues=NamedValues(("hitCount", 0))).clone('hitCount')).setMaxAccess("readcreate")
if mibBuilder.loadTexts: apCntHotListType.setStatus('current')
if mibBuilder.loadTexts: apCntHotListType.setDescription('Configures how a determination of hotness will be done.')
apCntHotListInterval = MibTableColumn((1, 3, 6, 1, 4, 1, 2467, 1, 16, 4, 1, 32), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 60)).clone(1)).setMaxAccess("readcreate")
if mibBuilder.loadTexts: apCntHotListInterval.setStatus('current')
if mibBuilder.loadTexts: apCntHotListInterval.setDescription('The interval in units of minutes used to refreshing the hot list.')
apCntFlowTrack = MibTableColumn((1, 3, 6, 1, 4, 1, 2467, 1, 16, 4, 1, 33), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 1))).clone(namedValues=NamedValues(("disable", 0), ("enable", 1))).clone('disable')).setMaxAccess("readcreate")
if mibBuilder.loadTexts: apCntFlowTrack.setStatus('current')
if mibBuilder.loadTexts: apCntFlowTrack.setDescription('Controls whether arrowflow reporting will be done for this content rule.')
apCntWeightMask = MibTableColumn((1, 3, 6, 1, 4, 1, 2467, 1, 16, 4, 1, 34), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(1, 8))).setMaxAccess("readcreate")
if mibBuilder.loadTexts: apCntWeightMask.setStatus('current')
if mibBuilder.loadTexts: apCntWeightMask.setDescription('This object specifies a bitmask used to determine the type of metric to be used for load balancing.')
apCntStickyMask = MibTableColumn((1, 3, 6, 1, 4, 1, 2467, 1, 16, 4, 1, 35), IpAddress()).setMaxAccess("readcreate")
if mibBuilder.loadTexts: apCntStickyMask.setStatus('current')
if mibBuilder.loadTexts: apCntStickyMask.setDescription('This object specifies the sticky mask used to determine the portion of the IP Address which denotes stickness between the server and client.')
apCntCookieStartPos = MibTableColumn((1, 3, 6, 1, 4, 1, 2467, 1, 16, 4, 1, 36), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 600)).clone(1)).setMaxAccess("readcreate")
if mibBuilder.loadTexts: apCntCookieStartPos.setStatus('current')
if mibBuilder.loadTexts: apCntCookieStartPos.setDescription('This object specifies the start of a cookie.')
apCntHeuristicCookieFence = MibTableColumn((1, 3, 6, 1, 4, 1, 2467, 1, 16, 4, 1, 37), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 1000)).clone(100)).setMaxAccess("readcreate")
if mibBuilder.loadTexts: apCntHeuristicCookieFence.setStatus('current')
if mibBuilder.loadTexts: apCntHeuristicCookieFence.setDescription('This object specifies the end of a Heuristic Cookie Fence.')
apCntEqlName = MibTableColumn((1, 3, 6, 1, 4, 1, 2467, 1, 16, 4, 1, 38), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 32))).setMaxAccess("readcreate")
if mibBuilder.loadTexts: apCntEqlName.setStatus('current')
if mibBuilder.loadTexts: apCntEqlName.setDescription('The name of the EQL associated with this content rule')
apCntCacheFalloverType = MibTableColumn((1, 3, 6, 1, 4, 1, 2467, 1, 16, 4, 1, 39), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3))).clone(namedValues=NamedValues(("linear", 1), ("next", 2), ("bypass", 3))).clone('linear')).setMaxAccess("readcreate")
if mibBuilder.loadTexts: apCntCacheFalloverType.setStatus('current')
if mibBuilder.loadTexts: apCntCacheFalloverType.setDescription('The type of fallover to use with division balancing')
apCntLocalLoadThreshold = MibTableColumn((1, 3, 6, 1, 4, 1, 2467, 1, 16, 4, 1, 40), Integer32().subtype(subtypeSpec=ValueRangeConstraint(2, 254)).clone(254)).setMaxAccess("readcreate")
if mibBuilder.loadTexts: apCntLocalLoadThreshold.setStatus('current')
if mibBuilder.loadTexts: apCntLocalLoadThreshold.setDescription('Redirect services are preferred when all local services exceed this thrreshold.')
apCntStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 2467, 1, 16, 4, 1, 41), RowStatus()).setMaxAccess("readcreate")
if mibBuilder.loadTexts: apCntStatus.setStatus('current')
if mibBuilder.loadTexts: apCntStatus.setDescription('Status entry for this row ')
apCntRedirectLoadThreshold = MibTableColumn((1, 3, 6, 1, 4, 1, 2467, 1, 16, 4, 1, 42), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 255)).clone(255)).setMaxAccess("readcreate")
if mibBuilder.loadTexts: apCntRedirectLoadThreshold.setStatus('current')
if mibBuilder.loadTexts: apCntRedirectLoadThreshold.setDescription('Redirect services are eligible when their load is below this thrreshold.')
apCntContentType = MibTableColumn((1, 3, 6, 1, 4, 1, 2467, 1, 16, 4, 1, 43), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4, 5, 6))).clone(namedValues=NamedValues(("http", 1), ("ftp-control", 2), ("realaudio-control", 3), ("ssl", 4), ("bypass", 5), ("ftp-publish", 6))).clone('http')).setMaxAccess("readcreate")
if mibBuilder.loadTexts: apCntContentType.setStatus('current')
if mibBuilder.loadTexts: apCntContentType.setDescription('The type of flow associated with this rule')
apCntStickyInactivity = MibTableColumn((1, 3, 6, 1, 4, 1, 2467, 1, 16, 4, 1, 44), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 65535))).setMaxAccess("readcreate")
if mibBuilder.loadTexts: apCntStickyInactivity.setStatus('current')
if mibBuilder.loadTexts: apCntStickyInactivity.setDescription('The maximun inactivity on a sticky connection (in minutes)')
apCntDNSBalance = MibTableColumn((1, 3, 6, 1, 4, 1, 2467, 1, 16, 4, 1, 45), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4))).clone(namedValues=NamedValues(("preferlocal", 1), ("roundrobin", 2), ("useownerdnsbalance", 3), ("leastloaded", 4))).clone('useownerdnsbalance')).setMaxAccess("readcreate")
if mibBuilder.loadTexts: apCntDNSBalance.setStatus('current')
if mibBuilder.loadTexts: apCntDNSBalance.setDescription('The DNS distribution algorithm to use for this content rule.')
apCntStickyGroup = MibTableColumn((1, 3, 6, 1, 4, 1, 2467, 1, 16, 4, 1, 46), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 65535))).setMaxAccess("readcreate")
if mibBuilder.loadTexts: apCntStickyGroup.setStatus('current')
if mibBuilder.loadTexts: apCntStickyGroup.setDescription('The sticky group number of a rule, 0 means not being used')
apCntAppTypeBypasses = MibTableColumn((1, 3, 6, 1, 4, 1, 2467, 1, 16, 4, 1, 47), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: apCntAppTypeBypasses.setStatus('current')
if mibBuilder.loadTexts: apCntAppTypeBypasses.setDescription('Total number of frames bypassed directly by matching this content rule.')
apCntNoSvcBypasses = MibTableColumn((1, 3, 6, 1, 4, 1, 2467, 1, 16, 4, 1, 48), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: apCntNoSvcBypasses.setStatus('current')
if mibBuilder.loadTexts: apCntNoSvcBypasses.setDescription('Total number of frames bypassed due to no services available on this content rule.')
apCntSvcLoadBypasses = MibTableColumn((1, 3, 6, 1, 4, 1, 2467, 1, 16, 4, 1, 49), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: apCntSvcLoadBypasses.setStatus('current')
if mibBuilder.loadTexts: apCntSvcLoadBypasses.setDescription('Total number of frames bypassed due to overloaded services on this content rule.')
apCntConnCtBypasses = MibTableColumn((1, 3, 6, 1, 4, 1, 2467, 1, 16, 4, 1, 50), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: apCntConnCtBypasses.setStatus('current')
if mibBuilder.loadTexts: apCntConnCtBypasses.setDescription('Total number of frames bypassed due to connection count on this content rule.')
apCntUrqlTblName = MibTableColumn((1, 3, 6, 1, 4, 1, 2467, 1, 16, 4, 1, 51), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 31))).setMaxAccess("readcreate")
if mibBuilder.loadTexts: apCntUrqlTblName.setStatus('current')
if mibBuilder.loadTexts: apCntUrqlTblName.setDescription('The name of the URQL table associated with this content rule')
apCntStickyStrPre = MibTableColumn((1, 3, 6, 1, 4, 1, 2467, 1, 16, 4, 1, 52), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 32))).setMaxAccess("readcreate")
if mibBuilder.loadTexts: apCntStickyStrPre.setStatus('current')
if mibBuilder.loadTexts: apCntStickyStrPre.setDescription('The string prefix for sticky string operation')
apCntStickyStrEos = MibTableColumn((1, 3, 6, 1, 4, 1, 2467, 1, 16, 4, 1, 53), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 5))).setMaxAccess("readcreate")
if mibBuilder.loadTexts: apCntStickyStrEos.setStatus('current')
if mibBuilder.loadTexts: apCntStickyStrEos.setDescription('The End-Of-String characters')
apCntStickyStrSkipLen = MibTableColumn((1, 3, 6, 1, 4, 1, 2467, 1, 16, 4, 1, 54), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 64))).setMaxAccess("readcreate")
if mibBuilder.loadTexts: apCntStickyStrSkipLen.setStatus('current')
if mibBuilder.loadTexts: apCntStickyStrSkipLen.setDescription('The number of bytes to be skipped before sticky operation')
apCntStickyStrProcLen = MibTableColumn((1, 3, 6, 1, 4, 1, 2467, 1, 16, 4, 1, 55), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 64))).setMaxAccess("readcreate")
if mibBuilder.loadTexts: apCntStickyStrProcLen.setStatus('current')
if mibBuilder.loadTexts: apCntStickyStrProcLen.setDescription('The number of bytes to be processed by the string action')
apCntStickyStrAction = MibTableColumn((1, 3, 6, 1, 4, 1, 2467, 1, 16, 4, 1, 56), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4))).clone(namedValues=NamedValues(("hash-a", 1), ("hash-xor", 2), ("hash-crc32", 3), ("match-service-cookie", 4))).clone('match-service-cookie')).setMaxAccess("readcreate")
if mibBuilder.loadTexts: apCntStickyStrAction.setStatus('current')
if mibBuilder.loadTexts: apCntStickyStrAction.setDescription('The sticky operation to be applied on the sticky cookie/string')
apCntStickyStrAsciiConv = MibTableColumn((1, 3, 6, 1, 4, 1, 2467, 1, 16, 4, 1, 57), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("enable", 1), ("disable", 2))).clone('enable')).setMaxAccess("readcreate")
if mibBuilder.loadTexts: apCntStickyStrAsciiConv.setStatus('current')
if mibBuilder.loadTexts: apCntStickyStrAsciiConv.setDescription('To convert the escaped ASCII code to its char in sticky string')
apCntPrimarySorryServer = MibTableColumn((1, 3, 6, 1, 4, 1, 2467, 1, 16, 4, 1, 58), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 31))).setMaxAccess("readcreate")
if mibBuilder.loadTexts: apCntPrimarySorryServer.setStatus('current')
if mibBuilder.loadTexts: apCntPrimarySorryServer.setDescription('The last chance server which will be chosen if all other servers fail')
apCntSecondSorryServer = MibTableColumn((1, 3, 6, 1, 4, 1, 2467, 1, 16, 4, 1, 59), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 31))).setMaxAccess("readcreate")
if mibBuilder.loadTexts: apCntSecondSorryServer.setStatus('current')
if mibBuilder.loadTexts: apCntSecondSorryServer.setDescription('The backup for the primary sorry server')
apCntPrimarySorryHits = MibTableColumn((1, 3, 6, 1, 4, 1, 2467, 1, 16, 4, 1, 60), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: apCntPrimarySorryHits.setStatus('current')
if mibBuilder.loadTexts: apCntPrimarySorryHits.setDescription('Total number of hits to the primary sorry server')
apCntSecondSorryHits = MibTableColumn((1, 3, 6, 1, 4, 1, 2467, 1, 16, 4, 1, 61), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: apCntSecondSorryHits.setStatus('current')
if mibBuilder.loadTexts: apCntSecondSorryHits.setDescription('Total number of hits to the secondary sorry server')
apCntStickySrvrDownFailover = MibTableColumn((1, 3, 6, 1, 4, 1, 2467, 1, 16, 4, 1, 62), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4, 5))).clone(namedValues=NamedValues(("reject", 1), ("redirect", 2), ("balance", 3), ("sticky-srcip", 4), ("sticky-srcip-dstport", 5))).clone('balance')).setMaxAccess("readcreate")
if mibBuilder.loadTexts: apCntStickySrvrDownFailover.setStatus('current')
if mibBuilder.loadTexts: apCntStickySrvrDownFailover.setDescription('The failover mechanism used when sticky server is not active')
apCntStickyStrType = MibTableColumn((1, 3, 6, 1, 4, 1, 2467, 1, 16, 4, 1, 63), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3))).clone(namedValues=NamedValues(("cookieurl", 1), ("url", 2), ("cookies", 3))).clone('cookieurl')).setMaxAccess("readcreate")
if mibBuilder.loadTexts: apCntStickyStrType.setStatus('current')
if mibBuilder.loadTexts: apCntStickyStrType.setDescription('The type of string that strig criteria applies to')
apCntParamBypass = MibTableColumn((1, 3, 6, 1, 4, 1, 2467, 1, 16, 4, 1, 64), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("enable", 1), ("disable", 2))).clone('disable')).setMaxAccess("readcreate")
if mibBuilder.loadTexts: apCntParamBypass.setStatus('current')
if mibBuilder.loadTexts: apCntParamBypass.setDescription("Specifies that content requests which contain the special terminators '?' or '#' indicating arguments in the request are to bypass transparent caches and are to be sent directly to the origin server.")
apCntAvgLocalLoad = MibTableColumn((1, 3, 6, 1, 4, 1, 2467, 1, 16, 4, 1, 65), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 255))).setMaxAccess("readonly")
if mibBuilder.loadTexts: apCntAvgLocalLoad.setStatus('current')
if mibBuilder.loadTexts: apCntAvgLocalLoad.setDescription('The currently sensed average load for all local services under this rule')
apCntAvgRemoteLoad = MibTableColumn((1, 3, 6, 1, 4, 1, 2467, 1, 16, 4, 1, 66), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 255))).setMaxAccess("readonly")
if mibBuilder.loadTexts: apCntAvgRemoteLoad.setStatus('current')
if mibBuilder.loadTexts: apCntAvgRemoteLoad.setDescription('The currently sensed average load for all remote services under this rule')
apCntDqlName = MibTableColumn((1, 3, 6, 1, 4, 1, 2467, 1, 16, 4, 1, 67), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 31))).setMaxAccess("readcreate")
if mibBuilder.loadTexts: apCntDqlName.setStatus('current')
if mibBuilder.loadTexts: apCntDqlName.setDescription('The name of the DQL table associated with this content rule')
apCntIPAddressRange = MibTableColumn((1, 3, 6, 1, 4, 1, 2467, 1, 16, 4, 1, 68), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 65535)).clone(1)).setMaxAccess("readcreate")
if mibBuilder.loadTexts: apCntIPAddressRange.setStatus('current')
if mibBuilder.loadTexts: apCntIPAddressRange.setDescription('The range of IP Addresses of the content providing service.')
apCntTagListName = MibTableColumn((1, 3, 6, 1, 4, 1, 2467, 1, 16, 4, 1, 69), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 31))).setMaxAccess("readcreate")
if mibBuilder.loadTexts: apCntTagListName.setStatus('current')
if mibBuilder.loadTexts: apCntTagListName.setDescription('The name of the tag list to be used with this content rule')
apCntStickyNoCookieAction = MibTableColumn((1, 3, 6, 1, 4, 1, 2467, 1, 16, 4, 1, 70), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4))).clone(namedValues=NamedValues(("loadbalance", 1), ("reject", 2), ("redirect", 3), ("service", 4))).clone('loadbalance')).setMaxAccess("readcreate")
if mibBuilder.loadTexts: apCntStickyNoCookieAction.setStatus('current')
if mibBuilder.loadTexts: apCntStickyNoCookieAction.setDescription('The action to be taken when no cookie found with sticky cookie config.')
apCntStickyNoCookieString = MibTableColumn((1, 3, 6, 1, 4, 1, 2467, 1, 16, 4, 1, 71), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 64))).setMaxAccess("readcreate")
if mibBuilder.loadTexts: apCntStickyNoCookieString.setStatus('current')
if mibBuilder.loadTexts: apCntStickyNoCookieString.setDescription('The String used by sticky no cookie redirect action')
apCntStickyCookiePath = MibTableColumn((1, 3, 6, 1, 4, 1, 2467, 1, 16, 4, 1, 72), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 99))).setMaxAccess("readcreate")
if mibBuilder.loadTexts: apCntStickyCookiePath.setStatus('current')
if mibBuilder.loadTexts: apCntStickyCookiePath.setDescription('The value to be used as the Cookie Path Attribute.')
apCntStickyCookieExp = MibTableColumn((1, 3, 6, 1, 4, 1, 2467, 1, 16, 4, 1, 73), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(11, 11)).setFixedLength(11)).setMaxAccess("readcreate")
if mibBuilder.loadTexts: apCntStickyCookieExp.setStatus('current')
if mibBuilder.loadTexts: apCntStickyCookieExp.setDescription('The value to be used as the Cookie Experation Attribute. Format - dd:hh:mm:ss')
apCntStickyCacheExp = MibTableColumn((1, 3, 6, 1, 4, 1, 2467, 1, 16, 4, 1, 74), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 60)).clone(3)).setMaxAccess("readcreate")
if mibBuilder.loadTexts: apCntStickyCacheExp.setStatus('current')
if mibBuilder.loadTexts: apCntStickyCacheExp.setDescription('The value used to time out entries in the Cookie Cache.')
apCntTagWeight = MibTableColumn((1, 3, 6, 1, 4, 1, 2467, 1, 16, 4, 1, 75), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 1024))).setMaxAccess("readcreate")
if mibBuilder.loadTexts: apCntTagWeight.setStatus('current')
if mibBuilder.loadTexts: apCntTagWeight.setDescription('The weight assigned to the rule using header-field-group.')
apCntAclBypassCt = MibScalar((1, 3, 6, 1, 4, 1, 2467, 1, 16, 5), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: apCntAclBypassCt.setStatus('current')
if mibBuilder.loadTexts: apCntAclBypassCt.setDescription('Total number of frames bypassed due to ACL restrictions.')
apCntNoRuleBypassCt = MibScalar((1, 3, 6, 1, 4, 1, 2467, 1, 16, 6), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: apCntNoRuleBypassCt.setStatus('current')
if mibBuilder.loadTexts: apCntNoRuleBypassCt.setDescription('Total number of frames bypassed due to no rule matches.')
apCntCacheMissBypassCt = MibScalar((1, 3, 6, 1, 4, 1, 2467, 1, 16, 7), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: apCntCacheMissBypassCt.setStatus('current')
if mibBuilder.loadTexts: apCntCacheMissBypassCt.setDescription('Total number of frames bypassed due to returning from a transparent cache.')
apCntGarbageBypassCt = MibScalar((1, 3, 6, 1, 4, 1, 2467, 1, 16, 8), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: apCntGarbageBypassCt.setStatus('current')
if mibBuilder.loadTexts: apCntGarbageBypassCt.setDescription('Total number of frames bypassed due to unknown info found in the URL.')
apCntUrlParamsBypassCt = MibScalar((1, 3, 6, 1, 4, 1, 2467, 1, 16, 9), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: apCntUrlParamsBypassCt.setStatus('current')
if mibBuilder.loadTexts: apCntUrlParamsBypassCt.setDescription('Total number of frames bypassed due to paramters found in the URL.')
apCntBypassConnectionPersistence = MibScalar((1, 3, 6, 1, 4, 1, 2467, 1, 16, 10), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 1))).clone(namedValues=NamedValues(("disable", 0), ("enable", 1))).clone('enable')).setMaxAccess("readwrite")
if mibBuilder.loadTexts: apCntBypassConnectionPersistence.setStatus('current')
if mibBuilder.loadTexts: apCntBypassConnectionPersistence.setDescription('Affects which ruleset is consulted first when categorizing flows')
apCntPersistenceResetMethod = MibScalar((1, 3, 6, 1, 4, 1, 2467, 1, 16, 11), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 1))).clone(namedValues=NamedValues(("redirect", 0), ("remap", 1))).clone('redirect')).setMaxAccess("readwrite")
if mibBuilder.loadTexts: apCntPersistenceResetMethod.setStatus('current')
if mibBuilder.loadTexts: apCntPersistenceResetMethod.setDescription('Affects which ruleset is consulted first when categorizing flows')
mibBuilder.exportSymbols("CNTEXT-MIB", apCntHits=apCntHits, apCntSecondSorryHits=apCntSecondSorryHits, apCntSpoofs=apCntSpoofs, apCntStickyNoCookieString=apCntStickyNoCookieString, apCntStickyMask=apCntStickyMask, apCntCacheFalloverType=apCntCacheFalloverType, apCntName=apCntName, apCntHotListInterval=apCntHotListInterval, apCntUrlParamsBypassCt=apCntUrlParamsBypassCt, apCntStickyStrEos=apCntStickyStrEos, PYSNMP_MODULE_ID=apCntExtMib, apCntCacheMissBypassCt=apCntCacheMissBypassCt, apCntRedirectLoadThreshold=apCntRedirectLoadThreshold, apCntSpider=apCntSpider, apCntAuthor=apCntAuthor, apCntAppTypeBypasses=apCntAppTypeBypasses, apCntExtMib=apCntExtMib, apCntStickyStrAsciiConv=apCntStickyStrAsciiConv, apCntStickyCookiePath=apCntStickyCookiePath, apCntStickyStrPre=apCntStickyStrPre, apCntIPAddressRange=apCntIPAddressRange, apCntIPProtocol=apCntIPProtocol, apCntTable=apCntTable, apCntStickyNoCookieAction=apCntStickyNoCookieAction, apCntStickyCacheExp=apCntStickyCacheExp, apCntPrimarySorryServer=apCntPrimarySorryServer, apCntCookieStartPos=apCntCookieStartPos, apCntPrimarySorryHits=apCntPrimarySorryHits, apCntAclBypassCt=apCntAclBypassCt, apCntRejServOverload=apCntRejServOverload, apCntHotListThreshold=apCntHotListThreshold, apCntUrl=apCntUrl, apCntDrops=apCntDrops, apCntSvcLoadBypasses=apCntSvcLoadBypasses, apCntEnable=apCntEnable, apCntFrameCount=apCntFrameCount, apCntSize=apCntSize, apCntEqlName=apCntEqlName, apCntWeightMask=apCntWeightMask, apCntPersistence=apCntPersistence, apCntStickyGroup=apCntStickyGroup, apCntSecondSorryServer=apCntSecondSorryServer, apCntStickyStrAction=apCntStickyStrAction, apCntHotListType=apCntHotListType, apCntParamBypass=apCntParamBypass, apCntQOSTag=apCntQOSTag, apCntGarbageBypassCt=apCntGarbageBypassCt, apCntConnCtBypasses=apCntConnCtBypasses, apCntRedirect=apCntRedirect, apCntEntry=apCntEntry, apCntNats=apCntNats, apCntStickyInactivity=apCntStickyInactivity, apCntPort=apCntPort, apCntNoRuleBypassCt=apCntNoRuleBypassCt, apCntHeuristicCookieFence=apCntHeuristicCookieFence, apCntStatus=apCntStatus, apCntZeroButton=apCntZeroButton, apCntRejNoServices=apCntRejNoServices, apCntIPAddress=apCntIPAddress, apCntFlowTrack=apCntFlowTrack, apCntContentType=apCntContentType, apCntBypassConnectionPersistence=apCntBypassConnectionPersistence, apCntRuleOrder=apCntRuleOrder, apCntAvgRemoteLoad=apCntAvgRemoteLoad, apCntDrop=apCntDrop, apCntStickyStrProcLen=apCntStickyStrProcLen, apCntSticky=apCntSticky, apCntStickyStrSkipLen=apCntStickyStrSkipLen, apCntStickyStrType=apCntStickyStrType, apCntLocalLoadThreshold=apCntLocalLoadThreshold, apCntOwner=apCntOwner, apCntTagListName=apCntTagListName, apCntNoSvcBypasses=apCntNoSvcBypasses, apCntDqlName=apCntDqlName, apCntDNSBalance=apCntDNSBalance, apCntRedirects=apCntRedirects, apCntByteCount=apCntByteCount, apCntStickySrvrDownFailover=apCntStickySrvrDownFailover, apCntTagWeight=apCntTagWeight, apCntStickyCookieExp=apCntStickyCookieExp, apCntIndex=apCntIndex, apCntHotListEnabled=apCntHotListEnabled, apCntBalance=apCntBalance, apCntAvgLocalLoad=apCntAvgLocalLoad, apCntHotListSize=apCntHotListSize, apCntPersistenceResetMethod=apCntPersistenceResetMethod, apCntUrqlTblName=apCntUrqlTblName)
| (cnt_ext,) = mibBuilder.importSymbols('APENT-MIB', 'cntExt')
(object_identifier, octet_string, integer) = mibBuilder.importSymbols('ASN1', 'ObjectIdentifier', 'OctetString', 'Integer')
(named_values,) = mibBuilder.importSymbols('ASN1-ENUMERATION', 'NamedValues')
(value_size_constraint, constraints_intersection, constraints_union, value_range_constraint, single_value_constraint) = mibBuilder.importSymbols('ASN1-REFINEMENT', 'ValueSizeConstraint', 'ConstraintsIntersection', 'ConstraintsUnion', 'ValueRangeConstraint', 'SingleValueConstraint')
(module_compliance, notification_group) = mibBuilder.importSymbols('SNMPv2-CONF', 'ModuleCompliance', 'NotificationGroup')
(counter64, notification_type, gauge32, object_identity, time_ticks, ip_address, mib_identifier, bits, module_identity, unsigned32, iso, counter32, integer32, mib_scalar, mib_table, mib_table_row, mib_table_column) = mibBuilder.importSymbols('SNMPv2-SMI', 'Counter64', 'NotificationType', 'Gauge32', 'ObjectIdentity', 'TimeTicks', 'IpAddress', 'MibIdentifier', 'Bits', 'ModuleIdentity', 'Unsigned32', 'iso', 'Counter32', 'Integer32', 'MibScalar', 'MibTable', 'MibTableRow', 'MibTableColumn')
(textual_convention, row_status, display_string) = mibBuilder.importSymbols('SNMPv2-TC', 'TextualConvention', 'RowStatus', 'DisplayString')
ap_cnt_ext_mib = module_identity((1, 3, 6, 1, 4, 1, 2467, 1, 16, 1))
if mibBuilder.loadTexts:
apCntExtMib.setLastUpdated('9710092000Z')
if mibBuilder.loadTexts:
apCntExtMib.setOrganization('ArrowPoint Communications Inc.')
if mibBuilder.loadTexts:
apCntExtMib.setContactInfo(' Postal: ArrowPoint Communications Inc. 50 Nagog Park Acton, Massachusetts 01720 Tel: +1 978-206-3000 option 1 E-Mail: support@arrowpoint.com')
if mibBuilder.loadTexts:
apCntExtMib.setDescription('The MIB module used to describe the ArrowPoint Communications content rule table')
ap_cnt_rule_order = mib_scalar((1, 3, 6, 1, 4, 1, 2467, 1, 16, 2), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(0, 1))).clone(namedValues=named_values(('hierarchicalFirst', 0), ('cacheRuleFirst', 1))).clone('cacheRuleFirst')).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
apCntRuleOrder.setStatus('current')
if mibBuilder.loadTexts:
apCntRuleOrder.setDescription('Affects which ruleset is consulted first when categorizing flows')
ap_cnt_table = mib_table((1, 3, 6, 1, 4, 1, 2467, 1, 16, 4))
if mibBuilder.loadTexts:
apCntTable.setStatus('current')
if mibBuilder.loadTexts:
apCntTable.setDescription('A list of content rule entries.')
ap_cnt_entry = mib_table_row((1, 3, 6, 1, 4, 1, 2467, 1, 16, 4, 1)).setIndexNames((0, 'CNTEXT-MIB', 'apCntOwner'), (0, 'CNTEXT-MIB', 'apCntName'))
if mibBuilder.loadTexts:
apCntEntry.setStatus('current')
if mibBuilder.loadTexts:
apCntEntry.setDescription('A group of information to uniquely identify a content providing service.')
ap_cnt_owner = mib_table_column((1, 3, 6, 1, 4, 1, 2467, 1, 16, 4, 1, 1), display_string().subtype(subtypeSpec=value_size_constraint(1, 31))).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
apCntOwner.setStatus('current')
if mibBuilder.loadTexts:
apCntOwner.setDescription('The name of the contents administrative owner.')
ap_cnt_name = mib_table_column((1, 3, 6, 1, 4, 1, 2467, 1, 16, 4, 1, 2), display_string().subtype(subtypeSpec=value_size_constraint(1, 31))).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
apCntName.setStatus('current')
if mibBuilder.loadTexts:
apCntName.setDescription('The name of the content providing service.')
ap_cnt_index = mib_table_column((1, 3, 6, 1, 4, 1, 2467, 1, 16, 4, 1, 3), integer32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
apCntIndex.setStatus('current')
if mibBuilder.loadTexts:
apCntIndex.setDescription('The unique service index assigned to the name by the SCM.')
ap_cnt_ip_address = mib_table_column((1, 3, 6, 1, 4, 1, 2467, 1, 16, 4, 1, 4), ip_address()).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
apCntIPAddress.setStatus('current')
if mibBuilder.loadTexts:
apCntIPAddress.setDescription('The IP Address the of the content providing service.')
ap_cnt_ip_protocol = mib_table_column((1, 3, 6, 1, 4, 1, 2467, 1, 16, 4, 1, 5), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(0, 6, 17))).clone(namedValues=named_values(('any', 0), ('tcp', 6), ('udp', 17))).clone('any')).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
apCntIPProtocol.setStatus('current')
if mibBuilder.loadTexts:
apCntIPProtocol.setDescription('The IP Protocol the of the content providing service.')
ap_cnt_port = mib_table_column((1, 3, 6, 1, 4, 1, 2467, 1, 16, 4, 1, 6), integer32().subtype(subtypeSpec=value_range_constraint(0, 65535))).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
apCntPort.setStatus('current')
if mibBuilder.loadTexts:
apCntPort.setDescription('The UDP or TCP port of the content providing service.')
ap_cnt_url = mib_table_column((1, 3, 6, 1, 4, 1, 2467, 1, 16, 4, 1, 7), display_string().subtype(subtypeSpec=value_size_constraint(0, 255))).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
apCntUrl.setStatus('current')
if mibBuilder.loadTexts:
apCntUrl.setDescription('The name of the content providing service.')
ap_cnt_sticky = mib_table_column((1, 3, 6, 1, 4, 1, 2467, 1, 16, 4, 1, 8), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3, 4, 5, 6, 7, 8))).clone(namedValues=named_values(('none', 1), ('ssl', 2), ('cookieurl', 3), ('url', 4), ('cookies', 5), ('sticky-srcip-dstport', 6), ('sticky-srcip', 7), ('arrowpoint-cookie', 8))).clone('none')).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
apCntSticky.setStatus('current')
if mibBuilder.loadTexts:
apCntSticky.setDescription('The sticky attribute controls whether source addresses stick to a server once they go to it initially based on load balancing.')
ap_cnt_balance = mib_table_column((1, 3, 6, 1, 4, 1, 2467, 1, 16, 4, 1, 9), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3, 4, 5, 6, 7, 8, 9, 10))).clone(namedValues=named_values(('roundrobin', 1), ('aca', 2), ('destip', 3), ('srcip', 4), ('domain', 5), ('url', 6), ('leastconn', 7), ('weightedrr', 8), ('domainhash', 9), ('urlhash', 10))).clone('roundrobin')).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
apCntBalance.setStatus('current')
if mibBuilder.loadTexts:
apCntBalance.setDescription('The load distribution algorithm to use for this content.')
ap_cnt_qos_tag = mib_table_column((1, 3, 6, 1, 4, 1, 2467, 1, 16, 4, 1, 10), integer32().subtype(subtypeSpec=value_range_constraint(0, 7)).clone(7)).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
apCntQOSTag.setStatus('current')
if mibBuilder.loadTexts:
apCntQOSTag.setDescription('The QOS tag to associate with this content definition.')
ap_cnt_enable = mib_table_column((1, 3, 6, 1, 4, 1, 2467, 1, 16, 4, 1, 11), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(0, 1))).clone(namedValues=named_values(('disable', 0), ('enable', 1))).clone('disable')).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
apCntEnable.setStatus('current')
if mibBuilder.loadTexts:
apCntEnable.setDescription('The state of the service, either enable or disabled')
ap_cnt_redirect = mib_table_column((1, 3, 6, 1, 4, 1, 2467, 1, 16, 4, 1, 12), display_string().subtype(subtypeSpec=value_size_constraint(0, 64))).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
apCntRedirect.setStatus('current')
if mibBuilder.loadTexts:
apCntRedirect.setDescription('Where to 302 redirect any requests for this content')
ap_cnt_drop = mib_table_column((1, 3, 6, 1, 4, 1, 2467, 1, 16, 4, 1, 13), display_string().subtype(subtypeSpec=value_size_constraint(0, 64))).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
apCntDrop.setStatus('current')
if mibBuilder.loadTexts:
apCntDrop.setDescription('Specify that requests for this content receive a 404 message and the txt to include')
ap_cnt_size = mib_table_column((1, 3, 6, 1, 4, 1, 2467, 1, 16, 4, 1, 14), integer32().subtype(subtypeSpec=value_range_constraint(0, 65535)).clone(4000)).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
apCntSize.setStatus('obsolete')
if mibBuilder.loadTexts:
apCntSize.setDescription('This object is obsolete.')
ap_cnt_persistence = mib_table_column((1, 3, 6, 1, 4, 1, 2467, 1, 16, 4, 1, 15), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(0, 1))).clone(namedValues=named_values(('disable', 0), ('enable', 1))).clone('disable')).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
apCntPersistence.setStatus('current')
if mibBuilder.loadTexts:
apCntPersistence.setDescription('Controls whether each GET is inspected individuallly or else GETs may be pipelined on a single persistent TCP connection')
ap_cnt_author = mib_table_column((1, 3, 6, 1, 4, 1, 2467, 1, 16, 4, 1, 16), display_string().subtype(subtypeSpec=value_size_constraint(1, 16))).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
apCntAuthor.setStatus('current')
if mibBuilder.loadTexts:
apCntAuthor.setDescription('The name of the author of this content rule.')
ap_cnt_spider = mib_table_column((1, 3, 6, 1, 4, 1, 2467, 1, 16, 4, 1, 17), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(0, 1))).clone(namedValues=named_values(('disable', 0), ('enable', 1))).clone('disable')).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
apCntSpider.setStatus('current')
if mibBuilder.loadTexts:
apCntSpider.setDescription('Controls whether the content will be spidered at rule activation time.')
ap_cnt_hits = mib_table_column((1, 3, 6, 1, 4, 1, 2467, 1, 16, 4, 1, 18), counter32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
apCntHits.setStatus('current')
if mibBuilder.loadTexts:
apCntHits.setDescription('Number of times user request was detected which invoked this content rule.')
ap_cnt_redirects = mib_table_column((1, 3, 6, 1, 4, 1, 2467, 1, 16, 4, 1, 19), counter32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
apCntRedirects.setStatus('current')
if mibBuilder.loadTexts:
apCntRedirects.setDescription('Number of times this content rule caused a redirect request.')
ap_cnt_drops = mib_table_column((1, 3, 6, 1, 4, 1, 2467, 1, 16, 4, 1, 20), counter32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
apCntDrops.setStatus('current')
if mibBuilder.loadTexts:
apCntDrops.setDescription('Number of times this content rule was unable to establish a connection.')
ap_cnt_rej_no_services = mib_table_column((1, 3, 6, 1, 4, 1, 2467, 1, 16, 4, 1, 21), counter32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
apCntRejNoServices.setStatus('current')
if mibBuilder.loadTexts:
apCntRejNoServices.setDescription('Number of times this content rule rejected a connection for want of a service.')
ap_cnt_rej_serv_overload = mib_table_column((1, 3, 6, 1, 4, 1, 2467, 1, 16, 4, 1, 22), counter32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
apCntRejServOverload.setStatus('current')
if mibBuilder.loadTexts:
apCntRejServOverload.setDescription('Number of times this content rule rejected a connection because of overload on the designated service(s).')
ap_cnt_spoofs = mib_table_column((1, 3, 6, 1, 4, 1, 2467, 1, 16, 4, 1, 23), counter32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
apCntSpoofs.setStatus('current')
if mibBuilder.loadTexts:
apCntSpoofs.setDescription('Number of times a connection was created using this content rule.')
ap_cnt_nats = mib_table_column((1, 3, 6, 1, 4, 1, 2467, 1, 16, 4, 1, 24), counter32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
apCntNats.setStatus('current')
if mibBuilder.loadTexts:
apCntNats.setDescription('Number of times network address translation was performed using this content rule.')
ap_cnt_byte_count = mib_table_column((1, 3, 6, 1, 4, 1, 2467, 1, 16, 4, 1, 25), counter32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
apCntByteCount.setStatus('current')
if mibBuilder.loadTexts:
apCntByteCount.setDescription('Total number of bytes passed using this content rule.')
ap_cnt_frame_count = mib_table_column((1, 3, 6, 1, 4, 1, 2467, 1, 16, 4, 1, 26), counter32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
apCntFrameCount.setStatus('current')
if mibBuilder.loadTexts:
apCntFrameCount.setDescription('Total number of frames passed using this content rule.')
ap_cnt_zero_button = mib_table_column((1, 3, 6, 1, 4, 1, 2467, 1, 16, 4, 1, 27), integer32()).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
apCntZeroButton.setStatus('current')
if mibBuilder.loadTexts:
apCntZeroButton.setDescription('Number of time counters for this content rule have been zeroed.')
ap_cnt_hot_list_enabled = mib_table_column((1, 3, 6, 1, 4, 1, 2467, 1, 16, 4, 1, 28), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(0, 1))).clone(namedValues=named_values(('disable', 0), ('enable', 1))).clone('disable')).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
apCntHotListEnabled.setStatus('current')
if mibBuilder.loadTexts:
apCntHotListEnabled.setDescription('Controls whether a hotlist will be maintained for this content rule.')
ap_cnt_hot_list_size = mib_table_column((1, 3, 6, 1, 4, 1, 2467, 1, 16, 4, 1, 29), integer32().subtype(subtypeSpec=value_range_constraint(1, 100)).clone(10)).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
apCntHotListSize.setStatus('current')
if mibBuilder.loadTexts:
apCntHotListSize.setDescription('Total number of hotlist entries which will be maintainted for this rule.')
ap_cnt_hot_list_threshold = mib_table_column((1, 3, 6, 1, 4, 1, 2467, 1, 16, 4, 1, 30), integer32().subtype(subtypeSpec=value_range_constraint(0, 65535))).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
apCntHotListThreshold.setStatus('current')
if mibBuilder.loadTexts:
apCntHotListThreshold.setDescription('The threshold under which an item is not considered hot.')
ap_cnt_hot_list_type = mib_table_column((1, 3, 6, 1, 4, 1, 2467, 1, 16, 4, 1, 31), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(0))).clone(namedValues=named_values(('hitCount', 0))).clone('hitCount')).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
apCntHotListType.setStatus('current')
if mibBuilder.loadTexts:
apCntHotListType.setDescription('Configures how a determination of hotness will be done.')
ap_cnt_hot_list_interval = mib_table_column((1, 3, 6, 1, 4, 1, 2467, 1, 16, 4, 1, 32), integer32().subtype(subtypeSpec=value_range_constraint(1, 60)).clone(1)).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
apCntHotListInterval.setStatus('current')
if mibBuilder.loadTexts:
apCntHotListInterval.setDescription('The interval in units of minutes used to refreshing the hot list.')
ap_cnt_flow_track = mib_table_column((1, 3, 6, 1, 4, 1, 2467, 1, 16, 4, 1, 33), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(0, 1))).clone(namedValues=named_values(('disable', 0), ('enable', 1))).clone('disable')).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
apCntFlowTrack.setStatus('current')
if mibBuilder.loadTexts:
apCntFlowTrack.setDescription('Controls whether arrowflow reporting will be done for this content rule.')
ap_cnt_weight_mask = mib_table_column((1, 3, 6, 1, 4, 1, 2467, 1, 16, 4, 1, 34), display_string().subtype(subtypeSpec=value_size_constraint(1, 8))).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
apCntWeightMask.setStatus('current')
if mibBuilder.loadTexts:
apCntWeightMask.setDescription('This object specifies a bitmask used to determine the type of metric to be used for load balancing.')
ap_cnt_sticky_mask = mib_table_column((1, 3, 6, 1, 4, 1, 2467, 1, 16, 4, 1, 35), ip_address()).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
apCntStickyMask.setStatus('current')
if mibBuilder.loadTexts:
apCntStickyMask.setDescription('This object specifies the sticky mask used to determine the portion of the IP Address which denotes stickness between the server and client.')
ap_cnt_cookie_start_pos = mib_table_column((1, 3, 6, 1, 4, 1, 2467, 1, 16, 4, 1, 36), integer32().subtype(subtypeSpec=value_range_constraint(1, 600)).clone(1)).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
apCntCookieStartPos.setStatus('current')
if mibBuilder.loadTexts:
apCntCookieStartPos.setDescription('This object specifies the start of a cookie.')
ap_cnt_heuristic_cookie_fence = mib_table_column((1, 3, 6, 1, 4, 1, 2467, 1, 16, 4, 1, 37), integer32().subtype(subtypeSpec=value_range_constraint(1, 1000)).clone(100)).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
apCntHeuristicCookieFence.setStatus('current')
if mibBuilder.loadTexts:
apCntHeuristicCookieFence.setDescription('This object specifies the end of a Heuristic Cookie Fence.')
ap_cnt_eql_name = mib_table_column((1, 3, 6, 1, 4, 1, 2467, 1, 16, 4, 1, 38), display_string().subtype(subtypeSpec=value_size_constraint(0, 32))).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
apCntEqlName.setStatus('current')
if mibBuilder.loadTexts:
apCntEqlName.setDescription('The name of the EQL associated with this content rule')
ap_cnt_cache_fallover_type = mib_table_column((1, 3, 6, 1, 4, 1, 2467, 1, 16, 4, 1, 39), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3))).clone(namedValues=named_values(('linear', 1), ('next', 2), ('bypass', 3))).clone('linear')).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
apCntCacheFalloverType.setStatus('current')
if mibBuilder.loadTexts:
apCntCacheFalloverType.setDescription('The type of fallover to use with division balancing')
ap_cnt_local_load_threshold = mib_table_column((1, 3, 6, 1, 4, 1, 2467, 1, 16, 4, 1, 40), integer32().subtype(subtypeSpec=value_range_constraint(2, 254)).clone(254)).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
apCntLocalLoadThreshold.setStatus('current')
if mibBuilder.loadTexts:
apCntLocalLoadThreshold.setDescription('Redirect services are preferred when all local services exceed this thrreshold.')
ap_cnt_status = mib_table_column((1, 3, 6, 1, 4, 1, 2467, 1, 16, 4, 1, 41), row_status()).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
apCntStatus.setStatus('current')
if mibBuilder.loadTexts:
apCntStatus.setDescription('Status entry for this row ')
ap_cnt_redirect_load_threshold = mib_table_column((1, 3, 6, 1, 4, 1, 2467, 1, 16, 4, 1, 42), integer32().subtype(subtypeSpec=value_range_constraint(0, 255)).clone(255)).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
apCntRedirectLoadThreshold.setStatus('current')
if mibBuilder.loadTexts:
apCntRedirectLoadThreshold.setDescription('Redirect services are eligible when their load is below this thrreshold.')
ap_cnt_content_type = mib_table_column((1, 3, 6, 1, 4, 1, 2467, 1, 16, 4, 1, 43), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3, 4, 5, 6))).clone(namedValues=named_values(('http', 1), ('ftp-control', 2), ('realaudio-control', 3), ('ssl', 4), ('bypass', 5), ('ftp-publish', 6))).clone('http')).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
apCntContentType.setStatus('current')
if mibBuilder.loadTexts:
apCntContentType.setDescription('The type of flow associated with this rule')
ap_cnt_sticky_inactivity = mib_table_column((1, 3, 6, 1, 4, 1, 2467, 1, 16, 4, 1, 44), integer32().subtype(subtypeSpec=value_range_constraint(0, 65535))).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
apCntStickyInactivity.setStatus('current')
if mibBuilder.loadTexts:
apCntStickyInactivity.setDescription('The maximun inactivity on a sticky connection (in minutes)')
ap_cnt_dns_balance = mib_table_column((1, 3, 6, 1, 4, 1, 2467, 1, 16, 4, 1, 45), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3, 4))).clone(namedValues=named_values(('preferlocal', 1), ('roundrobin', 2), ('useownerdnsbalance', 3), ('leastloaded', 4))).clone('useownerdnsbalance')).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
apCntDNSBalance.setStatus('current')
if mibBuilder.loadTexts:
apCntDNSBalance.setDescription('The DNS distribution algorithm to use for this content rule.')
ap_cnt_sticky_group = mib_table_column((1, 3, 6, 1, 4, 1, 2467, 1, 16, 4, 1, 46), integer32().subtype(subtypeSpec=value_range_constraint(0, 65535))).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
apCntStickyGroup.setStatus('current')
if mibBuilder.loadTexts:
apCntStickyGroup.setDescription('The sticky group number of a rule, 0 means not being used')
ap_cnt_app_type_bypasses = mib_table_column((1, 3, 6, 1, 4, 1, 2467, 1, 16, 4, 1, 47), counter32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
apCntAppTypeBypasses.setStatus('current')
if mibBuilder.loadTexts:
apCntAppTypeBypasses.setDescription('Total number of frames bypassed directly by matching this content rule.')
ap_cnt_no_svc_bypasses = mib_table_column((1, 3, 6, 1, 4, 1, 2467, 1, 16, 4, 1, 48), counter32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
apCntNoSvcBypasses.setStatus('current')
if mibBuilder.loadTexts:
apCntNoSvcBypasses.setDescription('Total number of frames bypassed due to no services available on this content rule.')
ap_cnt_svc_load_bypasses = mib_table_column((1, 3, 6, 1, 4, 1, 2467, 1, 16, 4, 1, 49), counter32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
apCntSvcLoadBypasses.setStatus('current')
if mibBuilder.loadTexts:
apCntSvcLoadBypasses.setDescription('Total number of frames bypassed due to overloaded services on this content rule.')
ap_cnt_conn_ct_bypasses = mib_table_column((1, 3, 6, 1, 4, 1, 2467, 1, 16, 4, 1, 50), counter32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
apCntConnCtBypasses.setStatus('current')
if mibBuilder.loadTexts:
apCntConnCtBypasses.setDescription('Total number of frames bypassed due to connection count on this content rule.')
ap_cnt_urql_tbl_name = mib_table_column((1, 3, 6, 1, 4, 1, 2467, 1, 16, 4, 1, 51), display_string().subtype(subtypeSpec=value_size_constraint(0, 31))).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
apCntUrqlTblName.setStatus('current')
if mibBuilder.loadTexts:
apCntUrqlTblName.setDescription('The name of the URQL table associated with this content rule')
ap_cnt_sticky_str_pre = mib_table_column((1, 3, 6, 1, 4, 1, 2467, 1, 16, 4, 1, 52), display_string().subtype(subtypeSpec=value_size_constraint(0, 32))).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
apCntStickyStrPre.setStatus('current')
if mibBuilder.loadTexts:
apCntStickyStrPre.setDescription('The string prefix for sticky string operation')
ap_cnt_sticky_str_eos = mib_table_column((1, 3, 6, 1, 4, 1, 2467, 1, 16, 4, 1, 53), display_string().subtype(subtypeSpec=value_size_constraint(0, 5))).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
apCntStickyStrEos.setStatus('current')
if mibBuilder.loadTexts:
apCntStickyStrEos.setDescription('The End-Of-String characters')
ap_cnt_sticky_str_skip_len = mib_table_column((1, 3, 6, 1, 4, 1, 2467, 1, 16, 4, 1, 54), integer32().subtype(subtypeSpec=value_range_constraint(0, 64))).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
apCntStickyStrSkipLen.setStatus('current')
if mibBuilder.loadTexts:
apCntStickyStrSkipLen.setDescription('The number of bytes to be skipped before sticky operation')
ap_cnt_sticky_str_proc_len = mib_table_column((1, 3, 6, 1, 4, 1, 2467, 1, 16, 4, 1, 55), integer32().subtype(subtypeSpec=value_range_constraint(0, 64))).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
apCntStickyStrProcLen.setStatus('current')
if mibBuilder.loadTexts:
apCntStickyStrProcLen.setDescription('The number of bytes to be processed by the string action')
ap_cnt_sticky_str_action = mib_table_column((1, 3, 6, 1, 4, 1, 2467, 1, 16, 4, 1, 56), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3, 4))).clone(namedValues=named_values(('hash-a', 1), ('hash-xor', 2), ('hash-crc32', 3), ('match-service-cookie', 4))).clone('match-service-cookie')).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
apCntStickyStrAction.setStatus('current')
if mibBuilder.loadTexts:
apCntStickyStrAction.setDescription('The sticky operation to be applied on the sticky cookie/string')
ap_cnt_sticky_str_ascii_conv = mib_table_column((1, 3, 6, 1, 4, 1, 2467, 1, 16, 4, 1, 57), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2))).clone(namedValues=named_values(('enable', 1), ('disable', 2))).clone('enable')).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
apCntStickyStrAsciiConv.setStatus('current')
if mibBuilder.loadTexts:
apCntStickyStrAsciiConv.setDescription('To convert the escaped ASCII code to its char in sticky string')
ap_cnt_primary_sorry_server = mib_table_column((1, 3, 6, 1, 4, 1, 2467, 1, 16, 4, 1, 58), display_string().subtype(subtypeSpec=value_size_constraint(0, 31))).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
apCntPrimarySorryServer.setStatus('current')
if mibBuilder.loadTexts:
apCntPrimarySorryServer.setDescription('The last chance server which will be chosen if all other servers fail')
ap_cnt_second_sorry_server = mib_table_column((1, 3, 6, 1, 4, 1, 2467, 1, 16, 4, 1, 59), display_string().subtype(subtypeSpec=value_size_constraint(0, 31))).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
apCntSecondSorryServer.setStatus('current')
if mibBuilder.loadTexts:
apCntSecondSorryServer.setDescription('The backup for the primary sorry server')
ap_cnt_primary_sorry_hits = mib_table_column((1, 3, 6, 1, 4, 1, 2467, 1, 16, 4, 1, 60), counter32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
apCntPrimarySorryHits.setStatus('current')
if mibBuilder.loadTexts:
apCntPrimarySorryHits.setDescription('Total number of hits to the primary sorry server')
ap_cnt_second_sorry_hits = mib_table_column((1, 3, 6, 1, 4, 1, 2467, 1, 16, 4, 1, 61), counter32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
apCntSecondSorryHits.setStatus('current')
if mibBuilder.loadTexts:
apCntSecondSorryHits.setDescription('Total number of hits to the secondary sorry server')
ap_cnt_sticky_srvr_down_failover = mib_table_column((1, 3, 6, 1, 4, 1, 2467, 1, 16, 4, 1, 62), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3, 4, 5))).clone(namedValues=named_values(('reject', 1), ('redirect', 2), ('balance', 3), ('sticky-srcip', 4), ('sticky-srcip-dstport', 5))).clone('balance')).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
apCntStickySrvrDownFailover.setStatus('current')
if mibBuilder.loadTexts:
apCntStickySrvrDownFailover.setDescription('The failover mechanism used when sticky server is not active')
ap_cnt_sticky_str_type = mib_table_column((1, 3, 6, 1, 4, 1, 2467, 1, 16, 4, 1, 63), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3))).clone(namedValues=named_values(('cookieurl', 1), ('url', 2), ('cookies', 3))).clone('cookieurl')).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
apCntStickyStrType.setStatus('current')
if mibBuilder.loadTexts:
apCntStickyStrType.setDescription('The type of string that strig criteria applies to')
ap_cnt_param_bypass = mib_table_column((1, 3, 6, 1, 4, 1, 2467, 1, 16, 4, 1, 64), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2))).clone(namedValues=named_values(('enable', 1), ('disable', 2))).clone('disable')).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
apCntParamBypass.setStatus('current')
if mibBuilder.loadTexts:
apCntParamBypass.setDescription("Specifies that content requests which contain the special terminators '?' or '#' indicating arguments in the request are to bypass transparent caches and are to be sent directly to the origin server.")
ap_cnt_avg_local_load = mib_table_column((1, 3, 6, 1, 4, 1, 2467, 1, 16, 4, 1, 65), integer32().subtype(subtypeSpec=value_range_constraint(0, 255))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
apCntAvgLocalLoad.setStatus('current')
if mibBuilder.loadTexts:
apCntAvgLocalLoad.setDescription('The currently sensed average load for all local services under this rule')
ap_cnt_avg_remote_load = mib_table_column((1, 3, 6, 1, 4, 1, 2467, 1, 16, 4, 1, 66), integer32().subtype(subtypeSpec=value_range_constraint(0, 255))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
apCntAvgRemoteLoad.setStatus('current')
if mibBuilder.loadTexts:
apCntAvgRemoteLoad.setDescription('The currently sensed average load for all remote services under this rule')
ap_cnt_dql_name = mib_table_column((1, 3, 6, 1, 4, 1, 2467, 1, 16, 4, 1, 67), display_string().subtype(subtypeSpec=value_size_constraint(0, 31))).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
apCntDqlName.setStatus('current')
if mibBuilder.loadTexts:
apCntDqlName.setDescription('The name of the DQL table associated with this content rule')
ap_cnt_ip_address_range = mib_table_column((1, 3, 6, 1, 4, 1, 2467, 1, 16, 4, 1, 68), integer32().subtype(subtypeSpec=value_range_constraint(1, 65535)).clone(1)).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
apCntIPAddressRange.setStatus('current')
if mibBuilder.loadTexts:
apCntIPAddressRange.setDescription('The range of IP Addresses of the content providing service.')
ap_cnt_tag_list_name = mib_table_column((1, 3, 6, 1, 4, 1, 2467, 1, 16, 4, 1, 69), display_string().subtype(subtypeSpec=value_size_constraint(0, 31))).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
apCntTagListName.setStatus('current')
if mibBuilder.loadTexts:
apCntTagListName.setDescription('The name of the tag list to be used with this content rule')
ap_cnt_sticky_no_cookie_action = mib_table_column((1, 3, 6, 1, 4, 1, 2467, 1, 16, 4, 1, 70), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3, 4))).clone(namedValues=named_values(('loadbalance', 1), ('reject', 2), ('redirect', 3), ('service', 4))).clone('loadbalance')).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
apCntStickyNoCookieAction.setStatus('current')
if mibBuilder.loadTexts:
apCntStickyNoCookieAction.setDescription('The action to be taken when no cookie found with sticky cookie config.')
ap_cnt_sticky_no_cookie_string = mib_table_column((1, 3, 6, 1, 4, 1, 2467, 1, 16, 4, 1, 71), display_string().subtype(subtypeSpec=value_size_constraint(0, 64))).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
apCntStickyNoCookieString.setStatus('current')
if mibBuilder.loadTexts:
apCntStickyNoCookieString.setDescription('The String used by sticky no cookie redirect action')
ap_cnt_sticky_cookie_path = mib_table_column((1, 3, 6, 1, 4, 1, 2467, 1, 16, 4, 1, 72), display_string().subtype(subtypeSpec=value_size_constraint(0, 99))).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
apCntStickyCookiePath.setStatus('current')
if mibBuilder.loadTexts:
apCntStickyCookiePath.setDescription('The value to be used as the Cookie Path Attribute.')
ap_cnt_sticky_cookie_exp = mib_table_column((1, 3, 6, 1, 4, 1, 2467, 1, 16, 4, 1, 73), display_string().subtype(subtypeSpec=value_size_constraint(11, 11)).setFixedLength(11)).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
apCntStickyCookieExp.setStatus('current')
if mibBuilder.loadTexts:
apCntStickyCookieExp.setDescription('The value to be used as the Cookie Experation Attribute. Format - dd:hh:mm:ss')
ap_cnt_sticky_cache_exp = mib_table_column((1, 3, 6, 1, 4, 1, 2467, 1, 16, 4, 1, 74), integer32().subtype(subtypeSpec=value_range_constraint(0, 60)).clone(3)).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
apCntStickyCacheExp.setStatus('current')
if mibBuilder.loadTexts:
apCntStickyCacheExp.setDescription('The value used to time out entries in the Cookie Cache.')
ap_cnt_tag_weight = mib_table_column((1, 3, 6, 1, 4, 1, 2467, 1, 16, 4, 1, 75), integer32().subtype(subtypeSpec=value_range_constraint(0, 1024))).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
apCntTagWeight.setStatus('current')
if mibBuilder.loadTexts:
apCntTagWeight.setDescription('The weight assigned to the rule using header-field-group.')
ap_cnt_acl_bypass_ct = mib_scalar((1, 3, 6, 1, 4, 1, 2467, 1, 16, 5), counter32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
apCntAclBypassCt.setStatus('current')
if mibBuilder.loadTexts:
apCntAclBypassCt.setDescription('Total number of frames bypassed due to ACL restrictions.')
ap_cnt_no_rule_bypass_ct = mib_scalar((1, 3, 6, 1, 4, 1, 2467, 1, 16, 6), counter32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
apCntNoRuleBypassCt.setStatus('current')
if mibBuilder.loadTexts:
apCntNoRuleBypassCt.setDescription('Total number of frames bypassed due to no rule matches.')
ap_cnt_cache_miss_bypass_ct = mib_scalar((1, 3, 6, 1, 4, 1, 2467, 1, 16, 7), counter32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
apCntCacheMissBypassCt.setStatus('current')
if mibBuilder.loadTexts:
apCntCacheMissBypassCt.setDescription('Total number of frames bypassed due to returning from a transparent cache.')
ap_cnt_garbage_bypass_ct = mib_scalar((1, 3, 6, 1, 4, 1, 2467, 1, 16, 8), counter32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
apCntGarbageBypassCt.setStatus('current')
if mibBuilder.loadTexts:
apCntGarbageBypassCt.setDescription('Total number of frames bypassed due to unknown info found in the URL.')
ap_cnt_url_params_bypass_ct = mib_scalar((1, 3, 6, 1, 4, 1, 2467, 1, 16, 9), counter32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
apCntUrlParamsBypassCt.setStatus('current')
if mibBuilder.loadTexts:
apCntUrlParamsBypassCt.setDescription('Total number of frames bypassed due to paramters found in the URL.')
ap_cnt_bypass_connection_persistence = mib_scalar((1, 3, 6, 1, 4, 1, 2467, 1, 16, 10), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(0, 1))).clone(namedValues=named_values(('disable', 0), ('enable', 1))).clone('enable')).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
apCntBypassConnectionPersistence.setStatus('current')
if mibBuilder.loadTexts:
apCntBypassConnectionPersistence.setDescription('Affects which ruleset is consulted first when categorizing flows')
ap_cnt_persistence_reset_method = mib_scalar((1, 3, 6, 1, 4, 1, 2467, 1, 16, 11), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(0, 1))).clone(namedValues=named_values(('redirect', 0), ('remap', 1))).clone('redirect')).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
apCntPersistenceResetMethod.setStatus('current')
if mibBuilder.loadTexts:
apCntPersistenceResetMethod.setDescription('Affects which ruleset is consulted first when categorizing flows')
mibBuilder.exportSymbols('CNTEXT-MIB', apCntHits=apCntHits, apCntSecondSorryHits=apCntSecondSorryHits, apCntSpoofs=apCntSpoofs, apCntStickyNoCookieString=apCntStickyNoCookieString, apCntStickyMask=apCntStickyMask, apCntCacheFalloverType=apCntCacheFalloverType, apCntName=apCntName, apCntHotListInterval=apCntHotListInterval, apCntUrlParamsBypassCt=apCntUrlParamsBypassCt, apCntStickyStrEos=apCntStickyStrEos, PYSNMP_MODULE_ID=apCntExtMib, apCntCacheMissBypassCt=apCntCacheMissBypassCt, apCntRedirectLoadThreshold=apCntRedirectLoadThreshold, apCntSpider=apCntSpider, apCntAuthor=apCntAuthor, apCntAppTypeBypasses=apCntAppTypeBypasses, apCntExtMib=apCntExtMib, apCntStickyStrAsciiConv=apCntStickyStrAsciiConv, apCntStickyCookiePath=apCntStickyCookiePath, apCntStickyStrPre=apCntStickyStrPre, apCntIPAddressRange=apCntIPAddressRange, apCntIPProtocol=apCntIPProtocol, apCntTable=apCntTable, apCntStickyNoCookieAction=apCntStickyNoCookieAction, apCntStickyCacheExp=apCntStickyCacheExp, apCntPrimarySorryServer=apCntPrimarySorryServer, apCntCookieStartPos=apCntCookieStartPos, apCntPrimarySorryHits=apCntPrimarySorryHits, apCntAclBypassCt=apCntAclBypassCt, apCntRejServOverload=apCntRejServOverload, apCntHotListThreshold=apCntHotListThreshold, apCntUrl=apCntUrl, apCntDrops=apCntDrops, apCntSvcLoadBypasses=apCntSvcLoadBypasses, apCntEnable=apCntEnable, apCntFrameCount=apCntFrameCount, apCntSize=apCntSize, apCntEqlName=apCntEqlName, apCntWeightMask=apCntWeightMask, apCntPersistence=apCntPersistence, apCntStickyGroup=apCntStickyGroup, apCntSecondSorryServer=apCntSecondSorryServer, apCntStickyStrAction=apCntStickyStrAction, apCntHotListType=apCntHotListType, apCntParamBypass=apCntParamBypass, apCntQOSTag=apCntQOSTag, apCntGarbageBypassCt=apCntGarbageBypassCt, apCntConnCtBypasses=apCntConnCtBypasses, apCntRedirect=apCntRedirect, apCntEntry=apCntEntry, apCntNats=apCntNats, apCntStickyInactivity=apCntStickyInactivity, apCntPort=apCntPort, apCntNoRuleBypassCt=apCntNoRuleBypassCt, apCntHeuristicCookieFence=apCntHeuristicCookieFence, apCntStatus=apCntStatus, apCntZeroButton=apCntZeroButton, apCntRejNoServices=apCntRejNoServices, apCntIPAddress=apCntIPAddress, apCntFlowTrack=apCntFlowTrack, apCntContentType=apCntContentType, apCntBypassConnectionPersistence=apCntBypassConnectionPersistence, apCntRuleOrder=apCntRuleOrder, apCntAvgRemoteLoad=apCntAvgRemoteLoad, apCntDrop=apCntDrop, apCntStickyStrProcLen=apCntStickyStrProcLen, apCntSticky=apCntSticky, apCntStickyStrSkipLen=apCntStickyStrSkipLen, apCntStickyStrType=apCntStickyStrType, apCntLocalLoadThreshold=apCntLocalLoadThreshold, apCntOwner=apCntOwner, apCntTagListName=apCntTagListName, apCntNoSvcBypasses=apCntNoSvcBypasses, apCntDqlName=apCntDqlName, apCntDNSBalance=apCntDNSBalance, apCntRedirects=apCntRedirects, apCntByteCount=apCntByteCount, apCntStickySrvrDownFailover=apCntStickySrvrDownFailover, apCntTagWeight=apCntTagWeight, apCntStickyCookieExp=apCntStickyCookieExp, apCntIndex=apCntIndex, apCntHotListEnabled=apCntHotListEnabled, apCntBalance=apCntBalance, apCntAvgLocalLoad=apCntAvgLocalLoad, apCntHotListSize=apCntHotListSize, apCntPersistenceResetMethod=apCntPersistenceResetMethod, apCntUrqlTblName=apCntUrqlTblName) |
def get_dict_pos(lst, key, value):
return next((index for (index, d) in enumerate(lst) if d[key] == value), None)
def search_engine(search_term, data_key, data):
a = filter(lambda search_found: search_term in search_found[data_key], data)
return list(a)
| def get_dict_pos(lst, key, value):
return next((index for (index, d) in enumerate(lst) if d[key] == value), None)
def search_engine(search_term, data_key, data):
a = filter(lambda search_found: search_term in search_found[data_key], data)
return list(a) |
#
# PySNMP MIB module F10-BPSTATS-MIB (http://snmplabs.com/pysmi)
# ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/F10-BPSTATS-MIB
# Produced by pysmi-0.3.4 at Wed May 1 13:11: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)
#
ObjectIdentifier, Integer, OctetString = mibBuilder.importSymbols("ASN1", "ObjectIdentifier", "Integer", "OctetString")
NamedValues, = mibBuilder.importSymbols("ASN1-ENUMERATION", "NamedValues")
ValueSizeConstraint, SingleValueConstraint, ConstraintsIntersection, ValueRangeConstraint, ConstraintsUnion = mibBuilder.importSymbols("ASN1-REFINEMENT", "ValueSizeConstraint", "SingleValueConstraint", "ConstraintsIntersection", "ValueRangeConstraint", "ConstraintsUnion")
f10Mgmt, = mibBuilder.importSymbols("FORCE10-SMI", "f10Mgmt")
NotificationGroup, ModuleCompliance = mibBuilder.importSymbols("SNMPv2-CONF", "NotificationGroup", "ModuleCompliance")
Counter64, Bits, iso, Unsigned32, MibIdentifier, Counter32, TimeTicks, Gauge32, MibScalar, MibTable, MibTableRow, MibTableColumn, IpAddress, ModuleIdentity, Integer32, NotificationType, ObjectIdentity = mibBuilder.importSymbols("SNMPv2-SMI", "Counter64", "Bits", "iso", "Unsigned32", "MibIdentifier", "Counter32", "TimeTicks", "Gauge32", "MibScalar", "MibTable", "MibTableRow", "MibTableColumn", "IpAddress", "ModuleIdentity", "Integer32", "NotificationType", "ObjectIdentity")
TimeStamp, DisplayString, TextualConvention = mibBuilder.importSymbols("SNMPv2-TC", "TimeStamp", "DisplayString", "TextualConvention")
f10BpStatsMib = ModuleIdentity((1, 3, 6, 1, 4, 1, 6027, 3, 24))
f10BpStatsMib.setRevisions(('2013-05-22 12:48',))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
if mibBuilder.loadTexts: f10BpStatsMib.setRevisionsDescriptions(('Initial version of this mib.',))
if mibBuilder.loadTexts: f10BpStatsMib.setLastUpdated('201309181248Z')
if mibBuilder.loadTexts: f10BpStatsMib.setOrganization('Dell Inc')
if mibBuilder.loadTexts: f10BpStatsMib.setContactInfo('http://www.force10networks.com/support')
if mibBuilder.loadTexts: f10BpStatsMib.setDescription('Dell Networking OS Back plane statistics mib. This is MIB shall use for all back plane statistics related activities. This includes the BP ports traffic statistics. BP link bundle monitoring based on BP port statistics. Queue statistics and buffer utilization on BP ports etc ..')
f10BpStatsLinkBundleObjects = MibIdentifier((1, 3, 6, 1, 4, 1, 6027, 3, 24, 1))
f10BpStatsObjects = MibIdentifier((1, 3, 6, 1, 4, 1, 6027, 3, 24, 2))
f10BpStatsAlarms = MibIdentifier((1, 3, 6, 1, 4, 1, 6027, 3, 24, 3))
bpLinkBundleObjects = MibIdentifier((1, 3, 6, 1, 4, 1, 6027, 3, 24, 1, 1))
bpLinkBundleRateInterval = MibScalar((1, 3, 6, 1, 4, 1, 6027, 3, 24, 1, 1, 1), Integer32().subtype(subtypeSpec=ValueRangeConstraint(10, 299))).setMaxAccess("readwrite")
if mibBuilder.loadTexts: bpLinkBundleRateInterval.setStatus('current')
if mibBuilder.loadTexts: bpLinkBundleRateInterval.setDescription('The rate interval for polling the Bp link bundle Monitoring.')
bpLinkBundleTriggerThreshold = MibScalar((1, 3, 6, 1, 4, 1, 6027, 3, 24, 1, 1, 2), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 90))).setUnits('percent').setMaxAccess("readwrite")
if mibBuilder.loadTexts: bpLinkBundleTriggerThreshold.setStatus('current')
if mibBuilder.loadTexts: bpLinkBundleTriggerThreshold.setDescription('The traffic distribution trigger threshold for Bp link bundle Monitoring.In percentage of total bandwidth of the link Bundle')
bpStatsObjects = MibIdentifier((1, 3, 6, 1, 4, 1, 6027, 3, 24, 2, 1))
bpDropsTable = MibTable((1, 3, 6, 1, 4, 1, 6027, 3, 24, 2, 1, 1), )
if mibBuilder.loadTexts: bpDropsTable.setStatus('current')
if mibBuilder.loadTexts: bpDropsTable.setDescription('The back plane drops table contains the list of various drops per BP higig port per BCM unit in a stack unit(card type).')
bpDropsEntry = MibTableRow((1, 3, 6, 1, 4, 1, 6027, 3, 24, 2, 1, 1, 1), ).setIndexNames((0, "F10-BPSTATS-MIB", "bpDropsStackUnitIndex"), (0, "F10-BPSTATS-MIB", "bpDropsPortPipe"), (0, "F10-BPSTATS-MIB", "bpDropsPortIndex"))
if mibBuilder.loadTexts: bpDropsEntry.setStatus('current')
if mibBuilder.loadTexts: bpDropsEntry.setDescription('Each drops entry is being indexed by StackUnit(card Type) BCM unit ID and local Port Id')
bpDropsStackUnitIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 6027, 3, 24, 2, 1, 1, 1, 1), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 12)))
if mibBuilder.loadTexts: bpDropsStackUnitIndex.setStatus('current')
if mibBuilder.loadTexts: bpDropsStackUnitIndex.setDescription('Stack unit(Card Type Id) number where this port present Each card shall contain more than one BCM units')
bpDropsPortPipe = MibTableColumn((1, 3, 6, 1, 4, 1, 6027, 3, 24, 2, 1, 1, 1, 2), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 6)))
if mibBuilder.loadTexts: bpDropsPortPipe.setStatus('current')
if mibBuilder.loadTexts: bpDropsPortPipe.setDescription('bpPortPipe denotes the BCM unit in the stack unit(card Type) Each BCM unit shall contain 1-128 local ports, which includes BP as well as front end ports')
bpDropsPortIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 6027, 3, 24, 2, 1, 1, 1, 3), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 128)))
if mibBuilder.loadTexts: bpDropsPortIndex.setStatus('current')
if mibBuilder.loadTexts: bpDropsPortIndex.setDescription('BP port number. Maximum ports shall support by Trident2 BCM npu is 128. This address space includes FE ports also, which are invalid ports as far as BP is concern. For Z9000 leaf BCM units, 34 to 41 are the valid BP port numbers and for spine BCM units, 1 to 16 are the valid BP ports ')
bpDropsInDrops = MibTableColumn((1, 3, 6, 1, 4, 1, 6027, 3, 24, 2, 1, 1, 1, 4), Counter64()).setMaxAccess("readonly")
if mibBuilder.loadTexts: bpDropsInDrops.setStatus('current')
if mibBuilder.loadTexts: bpDropsInDrops.setDescription('The No of Ingress packet Drops')
bpDropsInUnKnownHgHdr = MibTableColumn((1, 3, 6, 1, 4, 1, 6027, 3, 24, 2, 1, 1, 1, 5), Counter64()).setMaxAccess("readonly")
if mibBuilder.loadTexts: bpDropsInUnKnownHgHdr.setStatus('current')
if mibBuilder.loadTexts: bpDropsInUnKnownHgHdr.setDescription('The No of Unknown hiGig header Ingress packet Drops')
bpDropsInUnKnownHgOpcode = MibTableColumn((1, 3, 6, 1, 4, 1, 6027, 3, 24, 2, 1, 1, 1, 6), Counter64()).setMaxAccess("readonly")
if mibBuilder.loadTexts: bpDropsInUnKnownHgOpcode.setStatus('current')
if mibBuilder.loadTexts: bpDropsInUnKnownHgOpcode.setDescription('The No of Unknown hiGig Opcode Ingress packet Drops')
bpDropsInMTUExceeds = MibTableColumn((1, 3, 6, 1, 4, 1, 6027, 3, 24, 2, 1, 1, 1, 7), Counter64()).setMaxAccess("readonly")
if mibBuilder.loadTexts: bpDropsInMTUExceeds.setStatus('current')
if mibBuilder.loadTexts: bpDropsInMTUExceeds.setDescription('No of packets dropped on Ingress because of MTUExceeds')
bpDropsInMacDrops = MibTableColumn((1, 3, 6, 1, 4, 1, 6027, 3, 24, 2, 1, 1, 1, 8), Counter64()).setMaxAccess("readonly")
if mibBuilder.loadTexts: bpDropsInMacDrops.setStatus('current')
if mibBuilder.loadTexts: bpDropsInMacDrops.setDescription('No of packets dropped on Ingress MAC')
bpDropsMMUHOLDrops = MibTableColumn((1, 3, 6, 1, 4, 1, 6027, 3, 24, 2, 1, 1, 1, 9), Counter64()).setMaxAccess("readonly")
if mibBuilder.loadTexts: bpDropsMMUHOLDrops.setStatus('current')
if mibBuilder.loadTexts: bpDropsMMUHOLDrops.setDescription('No of packets dropped in MMU because of MMU HOL Drops')
bpDropsEgMacDrops = MibTableColumn((1, 3, 6, 1, 4, 1, 6027, 3, 24, 2, 1, 1, 1, 10), Counter64()).setMaxAccess("readonly")
if mibBuilder.loadTexts: bpDropsEgMacDrops.setStatus('current')
if mibBuilder.loadTexts: bpDropsEgMacDrops.setDescription('No of packets dropped on Egress MAC')
bpDropsEgTxAgedCounter = MibTableColumn((1, 3, 6, 1, 4, 1, 6027, 3, 24, 2, 1, 1, 1, 11), Counter64()).setMaxAccess("readonly")
if mibBuilder.loadTexts: bpDropsEgTxAgedCounter.setStatus('current')
if mibBuilder.loadTexts: bpDropsEgTxAgedCounter.setDescription('No of Aged packets dropped on Egress')
bpDropsEgTxErrCounter = MibTableColumn((1, 3, 6, 1, 4, 1, 6027, 3, 24, 2, 1, 1, 1, 12), Counter64()).setMaxAccess("readonly")
if mibBuilder.loadTexts: bpDropsEgTxErrCounter.setStatus('current')
if mibBuilder.loadTexts: bpDropsEgTxErrCounter.setDescription('No of Error packets dropped on Egress')
bpDropsEgTxMACUnderflow = MibTableColumn((1, 3, 6, 1, 4, 1, 6027, 3, 24, 2, 1, 1, 1, 13), Counter64()).setMaxAccess("readonly")
if mibBuilder.loadTexts: bpDropsEgTxMACUnderflow.setStatus('current')
if mibBuilder.loadTexts: bpDropsEgTxMACUnderflow.setDescription('No of MAC underflow packets dropped on Egress')
bpDropsEgTxErrPktCounter = MibTableColumn((1, 3, 6, 1, 4, 1, 6027, 3, 24, 2, 1, 1, 1, 14), Counter64()).setMaxAccess("readonly")
if mibBuilder.loadTexts: bpDropsEgTxErrPktCounter.setStatus('current')
if mibBuilder.loadTexts: bpDropsEgTxErrPktCounter.setDescription('No of total packets dropped in Egress')
bpIfStatsTable = MibTable((1, 3, 6, 1, 4, 1, 6027, 3, 24, 2, 1, 2), )
if mibBuilder.loadTexts: bpIfStatsTable.setStatus('current')
if mibBuilder.loadTexts: bpIfStatsTable.setDescription('The back plane counter statistics table contains the list of various counters per BP higig port per BCM unit in a stack unit(card type).')
bpIfStatsEntry = MibTableRow((1, 3, 6, 1, 4, 1, 6027, 3, 24, 2, 1, 2, 1), ).setIndexNames((0, "F10-BPSTATS-MIB", "bpIfStatsStackUnitIndex"), (0, "F10-BPSTATS-MIB", "bpIfStatsPortPipe"), (0, "F10-BPSTATS-MIB", "bpIfStatsPortIndex"))
if mibBuilder.loadTexts: bpIfStatsEntry.setStatus('current')
if mibBuilder.loadTexts: bpIfStatsEntry.setDescription('Each Stats entry is being indexed by StackUnit(card Type) BCM unit ID and local Port Id')
bpIfStatsStackUnitIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 6027, 3, 24, 2, 1, 2, 1, 1), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 12)))
if mibBuilder.loadTexts: bpIfStatsStackUnitIndex.setStatus('current')
if mibBuilder.loadTexts: bpIfStatsStackUnitIndex.setDescription('Stack unit(Card Type Id) number where this port present Each card shall contain more than one BCM units')
bpIfStatsPortPipe = MibTableColumn((1, 3, 6, 1, 4, 1, 6027, 3, 24, 2, 1, 2, 1, 2), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 6)))
if mibBuilder.loadTexts: bpIfStatsPortPipe.setStatus('current')
if mibBuilder.loadTexts: bpIfStatsPortPipe.setDescription('bpPortPipe denotes the BCM unit in the stack unit(card Type) Each BCM unit shall contain 1-128 local ports, which includes BP as well as front end ports')
bpIfStatsPortIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 6027, 3, 24, 2, 1, 2, 1, 3), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 128)))
if mibBuilder.loadTexts: bpIfStatsPortIndex.setStatus('current')
if mibBuilder.loadTexts: bpIfStatsPortIndex.setDescription('BP port number. Maximum ports shall support by Trident2 BCM npu is 128. This address space includes FE ports also, which are invalid ports as far as BP is concern. For Z9000 leaf BCM units, 34 to 41 are the valid BP port numbers and for spine BCM units, 1 to 16 are the valid BP ports ')
bpIfStatsIn64BytePkts = MibTableColumn((1, 3, 6, 1, 4, 1, 6027, 3, 24, 2, 1, 2, 1, 4), Counter64()).setMaxAccess("readonly")
if mibBuilder.loadTexts: bpIfStatsIn64BytePkts.setStatus('current')
if mibBuilder.loadTexts: bpIfStatsIn64BytePkts.setDescription('The total number of frames (including bad frames) received that were 64 octets in length (excluding framing bits but including FCS octets).')
bpIfStatsIn65To127BytePkts = MibTableColumn((1, 3, 6, 1, 4, 1, 6027, 3, 24, 2, 1, 2, 1, 5), Counter64()).setMaxAccess("readonly")
if mibBuilder.loadTexts: bpIfStatsIn65To127BytePkts.setStatus('current')
if mibBuilder.loadTexts: bpIfStatsIn65To127BytePkts.setDescription('The total number of frames (including bad frames) received that were between 65 and 127 octets in length inclusive (excluding framing bits but including FCS octets).')
bpIfStatsIn128To255BytePkts = MibTableColumn((1, 3, 6, 1, 4, 1, 6027, 3, 24, 2, 1, 2, 1, 6), Counter64()).setMaxAccess("readonly")
if mibBuilder.loadTexts: bpIfStatsIn128To255BytePkts.setStatus('current')
if mibBuilder.loadTexts: bpIfStatsIn128To255BytePkts.setDescription('The total number of frames (including bad frames) received that were between 128 and 255 octets in length inclusive (excluding framing bits but including FCS octets).')
bpIfStatsIn256To511BytePkts = MibTableColumn((1, 3, 6, 1, 4, 1, 6027, 3, 24, 2, 1, 2, 1, 7), Counter64()).setMaxAccess("readonly")
if mibBuilder.loadTexts: bpIfStatsIn256To511BytePkts.setStatus('current')
if mibBuilder.loadTexts: bpIfStatsIn256To511BytePkts.setDescription('The total number of frames (including bad frames) received that were between 256 and 511 octets in length inclusive (excluding framing bits but including FCS octets).')
bpIfStatsIn512To1023BytePkts = MibTableColumn((1, 3, 6, 1, 4, 1, 6027, 3, 24, 2, 1, 2, 1, 8), Counter64()).setMaxAccess("readonly")
if mibBuilder.loadTexts: bpIfStatsIn512To1023BytePkts.setStatus('current')
if mibBuilder.loadTexts: bpIfStatsIn512To1023BytePkts.setDescription('The total number of frames (including bad frames) received that were between 512 and 1023 octets in length inclusive (excluding framing bits but including FCS octets).')
bpIfStatsInOver1023BytePkts = MibTableColumn((1, 3, 6, 1, 4, 1, 6027, 3, 24, 2, 1, 2, 1, 9), Counter64()).setMaxAccess("readonly")
if mibBuilder.loadTexts: bpIfStatsInOver1023BytePkts.setStatus('current')
if mibBuilder.loadTexts: bpIfStatsInOver1023BytePkts.setDescription('The total number of frames received that were longer than 1023 (1025 Bytes in case of VLAN Tag) octets (excluding framing bits, but including FCS octets) and were otherwise well formed. This counter is not incremented for too long frames.')
bpIfStatsInThrottles = MibTableColumn((1, 3, 6, 1, 4, 1, 6027, 3, 24, 2, 1, 2, 1, 10), Counter64()).setMaxAccess("readonly")
if mibBuilder.loadTexts: bpIfStatsInThrottles.setStatus('current')
if mibBuilder.loadTexts: bpIfStatsInThrottles.setDescription('This counter is incremented when a valid frame with a length or type field value equal to 0x8808 (Control Frame) is received.')
bpIfStatsInRunts = MibTableColumn((1, 3, 6, 1, 4, 1, 6027, 3, 24, 2, 1, 2, 1, 11), Counter64()).setMaxAccess("readonly")
if mibBuilder.loadTexts: bpIfStatsInRunts.setStatus('current')
if mibBuilder.loadTexts: bpIfStatsInRunts.setDescription('The total number of frames received that were less than 64 octets long (excluding framing bits, but including FCS octets) and were otherwise well formed.')
bpIfStatsInGiants = MibTableColumn((1, 3, 6, 1, 4, 1, 6027, 3, 24, 2, 1, 2, 1, 12), Counter64()).setMaxAccess("readonly")
if mibBuilder.loadTexts: bpIfStatsInGiants.setStatus('current')
if mibBuilder.loadTexts: bpIfStatsInGiants.setDescription('The total number of frames received that were longer than 1518 (1522 Bytes in case of VLAN Tag) octets (excluding framing bits, but including FCS octets) and were otherwise well formed. This counter is not incremented for too long frames.')
bpIfStatsInCRC = MibTableColumn((1, 3, 6, 1, 4, 1, 6027, 3, 24, 2, 1, 2, 1, 13), Counter64()).setMaxAccess("readonly")
if mibBuilder.loadTexts: bpIfStatsInCRC.setStatus('current')
if mibBuilder.loadTexts: bpIfStatsInCRC.setDescription('The total number of frames received that had a length (excluding framing bits, but including FCS octets) of between 64 and 1518 octets, inclusive, but had a bad CRC.')
bpIfStatsInOverruns = MibTableColumn((1, 3, 6, 1, 4, 1, 6027, 3, 24, 2, 1, 2, 1, 14), Counter64()).setMaxAccess("readonly")
if mibBuilder.loadTexts: bpIfStatsInOverruns.setStatus('current')
if mibBuilder.loadTexts: bpIfStatsInOverruns.setDescription('The total number of frames has been chosen to be dropped by detecting the buffer issue')
bpIfStatsOutUnderruns = MibTableColumn((1, 3, 6, 1, 4, 1, 6027, 3, 24, 2, 1, 2, 1, 15), Counter64()).setMaxAccess("readonly")
if mibBuilder.loadTexts: bpIfStatsOutUnderruns.setStatus('current')
if mibBuilder.loadTexts: bpIfStatsOutUnderruns.setDescription('The total number of frames dropped because of buffer underrun.')
bpIfStatsOutUnicasts = MibTableColumn((1, 3, 6, 1, 4, 1, 6027, 3, 24, 2, 1, 2, 1, 16), Counter64()).setMaxAccess("readonly")
if mibBuilder.loadTexts: bpIfStatsOutUnicasts.setStatus('current')
if mibBuilder.loadTexts: bpIfStatsOutUnicasts.setDescription('The total number of Unicast frames are transmitted out of the interface')
bpIfStatsOutCollisions = MibTableColumn((1, 3, 6, 1, 4, 1, 6027, 3, 24, 2, 1, 2, 1, 17), Counter64()).setMaxAccess("readonly")
if mibBuilder.loadTexts: bpIfStatsOutCollisions.setStatus('current')
if mibBuilder.loadTexts: bpIfStatsOutCollisions.setDescription('A count of the frames that due to excessive or late collisions are not transmitted successfully.')
bpIfStatsOutWredDrops = MibTableColumn((1, 3, 6, 1, 4, 1, 6027, 3, 24, 2, 1, 2, 1, 18), Counter64()).setMaxAccess("readonly")
if mibBuilder.loadTexts: bpIfStatsOutWredDrops.setStatus('current')
if mibBuilder.loadTexts: bpIfStatsOutWredDrops.setDescription('The total number of frames are dropped by using WRED policy due to excessive traffic.')
bpIfStatsOut64BytePkts = MibTableColumn((1, 3, 6, 1, 4, 1, 6027, 3, 24, 2, 1, 2, 1, 19), Counter64()).setMaxAccess("readonly")
if mibBuilder.loadTexts: bpIfStatsOut64BytePkts.setStatus('current')
if mibBuilder.loadTexts: bpIfStatsOut64BytePkts.setDescription('The total number of valid frames with the block of 64 byte size is transmitted')
bpIfStatsOut65To127BytePkts = MibTableColumn((1, 3, 6, 1, 4, 1, 6027, 3, 24, 2, 1, 2, 1, 20), Counter64()).setMaxAccess("readonly")
if mibBuilder.loadTexts: bpIfStatsOut65To127BytePkts.setStatus('current')
if mibBuilder.loadTexts: bpIfStatsOut65To127BytePkts.setDescription('The total of valid frame with the block size of range between 65 and 127 bytes are transmitted.')
bpIfStatsOut128To255BytePkts = MibTableColumn((1, 3, 6, 1, 4, 1, 6027, 3, 24, 2, 1, 2, 1, 21), Counter64()).setMaxAccess("readonly")
if mibBuilder.loadTexts: bpIfStatsOut128To255BytePkts.setStatus('current')
if mibBuilder.loadTexts: bpIfStatsOut128To255BytePkts.setDescription('The total of valid frame with the block size of range between 128 and 255 bytes are transmitted')
bpIfStatsOut256To511BytePkts = MibTableColumn((1, 3, 6, 1, 4, 1, 6027, 3, 24, 2, 1, 2, 1, 22), Counter64()).setMaxAccess("readonly")
if mibBuilder.loadTexts: bpIfStatsOut256To511BytePkts.setStatus('current')
if mibBuilder.loadTexts: bpIfStatsOut256To511BytePkts.setDescription('The total of valid frame with the block size of range between 256 and 511 bytes are transmitted')
bpIfStatsOut512To1023BytePkts = MibTableColumn((1, 3, 6, 1, 4, 1, 6027, 3, 24, 2, 1, 2, 1, 23), Counter64()).setMaxAccess("readonly")
if mibBuilder.loadTexts: bpIfStatsOut512To1023BytePkts.setStatus('current')
if mibBuilder.loadTexts: bpIfStatsOut512To1023BytePkts.setDescription('The total of valid frame with the block size of range between 512 and 1023 bytes are transmitted')
bpIfStatsOutOver1023BytePkts = MibTableColumn((1, 3, 6, 1, 4, 1, 6027, 3, 24, 2, 1, 2, 1, 24), Counter64()).setMaxAccess("readonly")
if mibBuilder.loadTexts: bpIfStatsOutOver1023BytePkts.setStatus('current')
if mibBuilder.loadTexts: bpIfStatsOutOver1023BytePkts.setDescription('The total of valid frame with the block size of greater than 1023 bytes are transmitted.')
bpIfStatsOutThrottles = MibTableColumn((1, 3, 6, 1, 4, 1, 6027, 3, 24, 2, 1, 2, 1, 25), Counter64()).setMaxAccess("readonly")
if mibBuilder.loadTexts: bpIfStatsOutThrottles.setStatus('current')
if mibBuilder.loadTexts: bpIfStatsOutThrottles.setDescription('This counter is incremented when a valid frame with a length or type field value equal to 0x8808 (Control Frame) is sent.')
bpIfStatsLastDiscontinuityTime = MibTableColumn((1, 3, 6, 1, 4, 1, 6027, 3, 24, 2, 1, 2, 1, 26), TimeStamp()).setMaxAccess("readonly")
if mibBuilder.loadTexts: bpIfStatsLastDiscontinuityTime.setStatus('current')
if mibBuilder.loadTexts: bpIfStatsLastDiscontinuityTime.setDescription("The value of sysUpTime on the most recent occasion at which this interface's counters suffered a discontinuity via a reset. If no such discontinuities have occurred since the last reinitialization of the local management subsystem, then this object contains a zero value.")
bpIfStatsInCentRate = MibTableColumn((1, 3, 6, 1, 4, 1, 6027, 3, 24, 2, 1, 2, 1, 27), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 100))).setMaxAccess("readonly")
if mibBuilder.loadTexts: bpIfStatsInCentRate.setStatus('current')
if mibBuilder.loadTexts: bpIfStatsInCentRate.setDescription('This is the percentage of maximum line rate at which data is receiving on the Interface. For Z9000 - BP hiGig line rate is 42G. This is an integer value which can go from 0% to 100%.')
bpIfStatsOutCentRate = MibTableColumn((1, 3, 6, 1, 4, 1, 6027, 3, 24, 2, 1, 2, 1, 28), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 100))).setMaxAccess("readonly")
if mibBuilder.loadTexts: bpIfStatsOutCentRate.setStatus('current')
if mibBuilder.loadTexts: bpIfStatsOutCentRate.setDescription('This is the percentage of maximum line rate at which data is sending on the Interface. For Z9000 - BP hiGig line rate is 42G. This is an integer value which can go from 0% to 100%.')
bpIfStatsLastChange = MibTableColumn((1, 3, 6, 1, 4, 1, 6027, 3, 24, 2, 1, 2, 1, 29), TimeStamp()).setMaxAccess("readonly")
if mibBuilder.loadTexts: bpIfStatsLastChange.setStatus('current')
if mibBuilder.loadTexts: bpIfStatsLastChange.setDescription('The value of sysUpTime, on which all the counters are updated recently')
bpPacketBufferTable = MibTable((1, 3, 6, 1, 4, 1, 6027, 3, 24, 2, 1, 3), )
if mibBuilder.loadTexts: bpPacketBufferTable.setStatus('current')
if mibBuilder.loadTexts: bpPacketBufferTable.setDescription('The packet buffer table contains the modular packet buffers details per stack unit and the mode of allocation.')
bpPacketBufferEntry = MibTableRow((1, 3, 6, 1, 4, 1, 6027, 3, 24, 2, 1, 3, 1), ).setIndexNames((0, "F10-BPSTATS-MIB", "bpPacketBufferStackUnitIndex"), (0, "F10-BPSTATS-MIB", "bpPacketBufferPortPipe"))
if mibBuilder.loadTexts: bpPacketBufferEntry.setStatus('current')
if mibBuilder.loadTexts: bpPacketBufferEntry.setDescription('Packet buffer details per NPU unit.')
bpPacketBufferStackUnitIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 6027, 3, 24, 2, 1, 3, 1, 1), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 12)))
if mibBuilder.loadTexts: bpPacketBufferStackUnitIndex.setStatus('current')
if mibBuilder.loadTexts: bpPacketBufferStackUnitIndex.setDescription('Stack unit(Card Type Id) number where this port present Each card shall contain more than one BCM units')
bpPacketBufferPortPipe = MibTableColumn((1, 3, 6, 1, 4, 1, 6027, 3, 24, 2, 1, 3, 1, 2), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 6)))
if mibBuilder.loadTexts: bpPacketBufferPortPipe.setStatus('current')
if mibBuilder.loadTexts: bpPacketBufferPortPipe.setDescription('bpPortPipe denotes the BCM unit in the stack unit(card Type) Each BCM unit shall contain 1-128 local ports, which includes BP as well as front end ports')
bpPacketBufferTotalPacketBuffer = MibTableColumn((1, 3, 6, 1, 4, 1, 6027, 3, 24, 2, 1, 3, 1, 3), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: bpPacketBufferTotalPacketBuffer.setStatus('current')
if mibBuilder.loadTexts: bpPacketBufferTotalPacketBuffer.setDescription('Total packet buffer in this NPU unit.')
bpPacketBufferCurrentAvailBuffer = MibTableColumn((1, 3, 6, 1, 4, 1, 6027, 3, 24, 2, 1, 3, 1, 4), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: bpPacketBufferCurrentAvailBuffer.setStatus('current')
if mibBuilder.loadTexts: bpPacketBufferCurrentAvailBuffer.setDescription('Current available buffer in this NPU unit.')
bpPacketBufferPacketBufferAlloc = MibTableColumn((1, 3, 6, 1, 4, 1, 6027, 3, 24, 2, 1, 3, 1, 5), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: bpPacketBufferPacketBufferAlloc.setStatus('current')
if mibBuilder.loadTexts: bpPacketBufferPacketBufferAlloc.setDescription('Static or Dynamic allocation.')
bpBufferStatsTable = MibTable((1, 3, 6, 1, 4, 1, 6027, 3, 24, 2, 1, 4), )
if mibBuilder.loadTexts: bpBufferStatsTable.setStatus('current')
if mibBuilder.loadTexts: bpBufferStatsTable.setDescription('The back plane stats per port table contains the packet buffer usage per bp port per NPU unit.')
bpBufferStatsEntry = MibTableRow((1, 3, 6, 1, 4, 1, 6027, 3, 24, 2, 1, 4, 1), ).setIndexNames((0, "F10-BPSTATS-MIB", "bpBufferStatsStackUnitIndex"), (0, "F10-BPSTATS-MIB", "bpBufferStatsPortPipe"), (0, "F10-BPSTATS-MIB", "bpBufferStatsPortIndex"))
if mibBuilder.loadTexts: bpBufferStatsEntry.setStatus('current')
if mibBuilder.loadTexts: bpBufferStatsEntry.setDescription('Per bp port buffer stats ')
bpBufferStatsStackUnitIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 6027, 3, 24, 2, 1, 4, 1, 1), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 12)))
if mibBuilder.loadTexts: bpBufferStatsStackUnitIndex.setStatus('current')
if mibBuilder.loadTexts: bpBufferStatsStackUnitIndex.setDescription('Stack unit(Card Type Id) number where this port present Each card shall contain more than one BCM units')
bpBufferStatsPortPipe = MibTableColumn((1, 3, 6, 1, 4, 1, 6027, 3, 24, 2, 1, 4, 1, 2), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 6)))
if mibBuilder.loadTexts: bpBufferStatsPortPipe.setStatus('current')
if mibBuilder.loadTexts: bpBufferStatsPortPipe.setDescription('bpPortPipe denotes the BCM unit in the stack unit(card Type) Each BCM unit shall contain 1-128 local ports, which includes BP as well as front end ports')
bpBufferStatsPortIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 6027, 3, 24, 2, 1, 4, 1, 3), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 128)))
if mibBuilder.loadTexts: bpBufferStatsPortIndex.setStatus('current')
if mibBuilder.loadTexts: bpBufferStatsPortIndex.setDescription('BP port number. Maximum ports shall support by Trident2 BCM npu is 128. This address space includes FE ports also, which are invalid ports as far as BP is concern. For Z9000 leaf BCM units, 34 to 41 are the valid BP port numbers and for spine BCM units, 1 to 16 are the valid BP ports ')
bpBufferStatsCurrentUsagePerPort = MibTableColumn((1, 3, 6, 1, 4, 1, 6027, 3, 24, 2, 1, 4, 1, 4), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: bpBufferStatsCurrentUsagePerPort.setStatus('current')
if mibBuilder.loadTexts: bpBufferStatsCurrentUsagePerPort.setDescription('Current buffer usage per bp port.')
bpBufferStatsDefaultPacketBuffAlloc = MibTableColumn((1, 3, 6, 1, 4, 1, 6027, 3, 24, 2, 1, 4, 1, 5), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: bpBufferStatsDefaultPacketBuffAlloc.setStatus('current')
if mibBuilder.loadTexts: bpBufferStatsDefaultPacketBuffAlloc.setDescription('Default packet buffer allocated.')
bpBufferStatsMaxLimitPerPort = MibTableColumn((1, 3, 6, 1, 4, 1, 6027, 3, 24, 2, 1, 4, 1, 6), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: bpBufferStatsMaxLimitPerPort.setStatus('current')
if mibBuilder.loadTexts: bpBufferStatsMaxLimitPerPort.setDescription('Max buffer limit per bp port.')
bpCosStatsTable = MibTable((1, 3, 6, 1, 4, 1, 6027, 3, 24, 2, 1, 5), )
if mibBuilder.loadTexts: bpCosStatsTable.setStatus('current')
if mibBuilder.loadTexts: bpCosStatsTable.setDescription('The back plane statistics per COS table gives packet buffer statistics per COS per bp port.')
bpCosStatsEntry = MibTableRow((1, 3, 6, 1, 4, 1, 6027, 3, 24, 2, 1, 5, 1), ).setIndexNames((0, "F10-BPSTATS-MIB", "bpCosStatsStackUnitIndex"), (0, "F10-BPSTATS-MIB", "bpCosStatsPortPipe"), (0, "F10-BPSTATS-MIB", "bpCosStatsPortIndex"), (0, "F10-BPSTATS-MIB", "bpCosStatsCOSNumber"))
if mibBuilder.loadTexts: bpCosStatsEntry.setStatus('current')
if mibBuilder.loadTexts: bpCosStatsEntry.setDescription('Per bp port buffer stats and per COS buffer stats.')
bpCosStatsStackUnitIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 6027, 3, 24, 2, 1, 5, 1, 1), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 12)))
if mibBuilder.loadTexts: bpCosStatsStackUnitIndex.setStatus('current')
if mibBuilder.loadTexts: bpCosStatsStackUnitIndex.setDescription('Stack unit(Card Type Id) number where this port present Each card shall contain more than one BCM units')
bpCosStatsPortPipe = MibTableColumn((1, 3, 6, 1, 4, 1, 6027, 3, 24, 2, 1, 5, 1, 2), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 6)))
if mibBuilder.loadTexts: bpCosStatsPortPipe.setStatus('current')
if mibBuilder.loadTexts: bpCosStatsPortPipe.setDescription('bpPortPipe denotes the BCM unit in the stack unit(card Type) Each BCM unit shall contain 1-128 local ports, which includes BP as well as front end ports')
bpCosStatsPortIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 6027, 3, 24, 2, 1, 5, 1, 3), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 128)))
if mibBuilder.loadTexts: bpCosStatsPortIndex.setStatus('current')
if mibBuilder.loadTexts: bpCosStatsPortIndex.setDescription('BP port number. Maximum ports shall support by Trident2 BCM npu is 128. This address space includes FE ports also, which are invalid ports as far as BP is concern. For Z9000 leaf BCM units, 34 to 41 are the valid BP port numbers and for spine BCM units, 1 to 16 are the valid BP ports ')
bpCosStatsCOSNumber = MibTableColumn((1, 3, 6, 1, 4, 1, 6027, 3, 24, 2, 1, 5, 1, 4), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 15)))
if mibBuilder.loadTexts: bpCosStatsCOSNumber.setStatus('current')
if mibBuilder.loadTexts: bpCosStatsCOSNumber.setDescription('COS queue number, There shall 10 unicast and 5 multicast queues per port in Trident2')
bpCosStatsCurrentUsage = MibTableColumn((1, 3, 6, 1, 4, 1, 6027, 3, 24, 2, 1, 5, 1, 5), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: bpCosStatsCurrentUsage.setStatus('current')
if mibBuilder.loadTexts: bpCosStatsCurrentUsage.setDescription('Current buffer usage per COS per bp port.')
bpCosStatsDefaultPacketBuffAlloc = MibTableColumn((1, 3, 6, 1, 4, 1, 6027, 3, 24, 2, 1, 5, 1, 6), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: bpCosStatsDefaultPacketBuffAlloc.setStatus('current')
if mibBuilder.loadTexts: bpCosStatsDefaultPacketBuffAlloc.setDescription('Default packet buffer allocated per COS queue')
bpCosStatsMaxLimit = MibTableColumn((1, 3, 6, 1, 4, 1, 6027, 3, 24, 2, 1, 5, 1, 7), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: bpCosStatsMaxLimit.setStatus('current')
if mibBuilder.loadTexts: bpCosStatsMaxLimit.setDescription('Max buffer utilization limit per bp port.')
bpCosStatsHOLDDrops = MibTableColumn((1, 3, 6, 1, 4, 1, 6027, 3, 24, 2, 1, 5, 1, 8), Counter64()).setMaxAccess("readonly")
if mibBuilder.loadTexts: bpCosStatsHOLDDrops.setStatus('current')
if mibBuilder.loadTexts: bpCosStatsHOLDDrops.setDescription('HOLD Drops Per Queue.')
bpLinkBundleNotifications = MibIdentifier((1, 3, 6, 1, 4, 1, 6027, 3, 24, 3, 1))
bpLinkBundleAlarmVariable = MibIdentifier((1, 3, 6, 1, 4, 1, 6027, 3, 24, 3, 2))
bpLinkBundleType = MibScalar((1, 3, 6, 1, 4, 1, 6027, 3, 24, 3, 2, 1), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("unknown", 1), ("bpHgBundle", 2)))).setMaxAccess("accessiblefornotify")
if mibBuilder.loadTexts: bpLinkBundleType.setStatus('current')
if mibBuilder.loadTexts: bpLinkBundleType.setDescription('Indicates Type of Back plane HiGig link bundle')
bpLinkBundleSlot = MibScalar((1, 3, 6, 1, 4, 1, 6027, 3, 24, 3, 2, 2), Integer32()).setMaxAccess("accessiblefornotify")
if mibBuilder.loadTexts: bpLinkBundleSlot.setStatus('current')
if mibBuilder.loadTexts: bpLinkBundleSlot.setDescription('The SlotId on which Link Bundle is overloaded')
bpLinkBundleNpuUnit = MibScalar((1, 3, 6, 1, 4, 1, 6027, 3, 24, 3, 2, 3), Integer32()).setMaxAccess("accessiblefornotify")
if mibBuilder.loadTexts: bpLinkBundleNpuUnit.setStatus('current')
if mibBuilder.loadTexts: bpLinkBundleNpuUnit.setDescription('The npuUnitId(BCM unit Id) on which Link Bundle is overloaded')
bpLinkBundleLocalId = MibScalar((1, 3, 6, 1, 4, 1, 6027, 3, 24, 3, 2, 4), Integer32()).setMaxAccess("accessiblefornotify")
if mibBuilder.loadTexts: bpLinkBundleLocalId.setStatus('current')
if mibBuilder.loadTexts: bpLinkBundleLocalId.setDescription('The local linkBundle Id which is overloaded')
bpLinkBundleImbalance = NotificationType((1, 3, 6, 1, 4, 1, 6027, 3, 24, 3, 1, 1)).setObjects(("F10-BPSTATS-MIB", "bpLinkBundleType"), ("F10-BPSTATS-MIB", "bpLinkBundleSlot"), ("F10-BPSTATS-MIB", "bpLinkBundleNpuUnit"), ("F10-BPSTATS-MIB", "bpLinkBundleLocalId"))
if mibBuilder.loadTexts: bpLinkBundleImbalance.setStatus('current')
if mibBuilder.loadTexts: bpLinkBundleImbalance.setDescription('Trap generated when traffic imbalance observed in BP Link Bundles')
bpLinkBundleImbalanceClear = NotificationType((1, 3, 6, 1, 4, 1, 6027, 3, 24, 3, 1, 2)).setObjects(("F10-BPSTATS-MIB", "bpLinkBundleType"), ("F10-BPSTATS-MIB", "bpLinkBundleSlot"), ("F10-BPSTATS-MIB", "bpLinkBundleNpuUnit"), ("F10-BPSTATS-MIB", "bpLinkBundleLocalId"))
if mibBuilder.loadTexts: bpLinkBundleImbalanceClear.setStatus('current')
if mibBuilder.loadTexts: bpLinkBundleImbalanceClear.setDescription('Trap generated when traffic imbalance is no longer observed on Bp Link bundles')
mibBuilder.exportSymbols("F10-BPSTATS-MIB", bpIfStatsOutCentRate=bpIfStatsOutCentRate, bpCosStatsHOLDDrops=bpCosStatsHOLDDrops, bpLinkBundleLocalId=bpLinkBundleLocalId, bpBufferStatsStackUnitIndex=bpBufferStatsStackUnitIndex, bpIfStatsIn256To511BytePkts=bpIfStatsIn256To511BytePkts, bpIfStatsInGiants=bpIfStatsInGiants, bpBufferStatsDefaultPacketBuffAlloc=bpBufferStatsDefaultPacketBuffAlloc, bpCosStatsDefaultPacketBuffAlloc=bpCosStatsDefaultPacketBuffAlloc, bpDropsInUnKnownHgOpcode=bpDropsInUnKnownHgOpcode, bpCosStatsEntry=bpCosStatsEntry, bpBufferStatsCurrentUsagePerPort=bpBufferStatsCurrentUsagePerPort, bpLinkBundleType=bpLinkBundleType, PYSNMP_MODULE_ID=f10BpStatsMib, bpDropsEgTxErrPktCounter=bpDropsEgTxErrPktCounter, bpDropsTable=bpDropsTable, bpDropsEgTxAgedCounter=bpDropsEgTxAgedCounter, bpCosStatsCOSNumber=bpCosStatsCOSNumber, bpLinkBundleTriggerThreshold=bpLinkBundleTriggerThreshold, bpLinkBundleNpuUnit=bpLinkBundleNpuUnit, bpDropsInMacDrops=bpDropsInMacDrops, bpPacketBufferEntry=bpPacketBufferEntry, bpIfStatsOutWredDrops=bpIfStatsOutWredDrops, bpCosStatsStackUnitIndex=bpCosStatsStackUnitIndex, bpCosStatsMaxLimit=bpCosStatsMaxLimit, bpBufferStatsTable=bpBufferStatsTable, bpIfStatsOutUnderruns=bpIfStatsOutUnderruns, bpDropsPortIndex=bpDropsPortIndex, bpPacketBufferStackUnitIndex=bpPacketBufferStackUnitIndex, bpDropsEgMacDrops=bpDropsEgMacDrops, bpDropsInMTUExceeds=bpDropsInMTUExceeds, bpLinkBundleNotifications=bpLinkBundleNotifications, bpIfStatsInCentRate=bpIfStatsInCentRate, bpIfStatsStackUnitIndex=bpIfStatsStackUnitIndex, bpCosStatsCurrentUsage=bpCosStatsCurrentUsage, bpDropsEntry=bpDropsEntry, bpPacketBufferTotalPacketBuffer=bpPacketBufferTotalPacketBuffer, bpIfStatsOut256To511BytePkts=bpIfStatsOut256To511BytePkts, bpIfStatsTable=bpIfStatsTable, bpIfStatsLastDiscontinuityTime=bpIfStatsLastDiscontinuityTime, bpLinkBundleImbalanceClear=bpLinkBundleImbalanceClear, bpIfStatsInOverruns=bpIfStatsInOverruns, bpIfStatsIn64BytePkts=bpIfStatsIn64BytePkts, bpIfStatsIn512To1023BytePkts=bpIfStatsIn512To1023BytePkts, bpBufferStatsMaxLimitPerPort=bpBufferStatsMaxLimitPerPort, bpBufferStatsPortIndex=bpBufferStatsPortIndex, bpDropsEgTxErrCounter=bpDropsEgTxErrCounter, bpIfStatsPortPipe=bpIfStatsPortPipe, bpIfStatsLastChange=bpIfStatsLastChange, bpDropsInDrops=bpDropsInDrops, bpIfStatsInRunts=bpIfStatsInRunts, bpLinkBundleImbalance=bpLinkBundleImbalance, f10BpStatsLinkBundleObjects=f10BpStatsLinkBundleObjects, f10BpStatsObjects=f10BpStatsObjects, bpIfStatsOutOver1023BytePkts=bpIfStatsOutOver1023BytePkts, bpDropsInUnKnownHgHdr=bpDropsInUnKnownHgHdr, bpIfStatsIn65To127BytePkts=bpIfStatsIn65To127BytePkts, bpDropsStackUnitIndex=bpDropsStackUnitIndex, bpIfStatsEntry=bpIfStatsEntry, bpIfStatsIn128To255BytePkts=bpIfStatsIn128To255BytePkts, f10BpStatsMib=f10BpStatsMib, bpBufferStatsEntry=bpBufferStatsEntry, bpPacketBufferTable=bpPacketBufferTable, bpLinkBundleRateInterval=bpLinkBundleRateInterval, bpCosStatsPortIndex=bpCosStatsPortIndex, bpLinkBundleAlarmVariable=bpLinkBundleAlarmVariable, bpDropsPortPipe=bpDropsPortPipe, bpStatsObjects=bpStatsObjects, bpIfStatsOutCollisions=bpIfStatsOutCollisions, f10BpStatsAlarms=f10BpStatsAlarms, bpIfStatsInCRC=bpIfStatsInCRC, bpIfStatsOut512To1023BytePkts=bpIfStatsOut512To1023BytePkts, bpPacketBufferCurrentAvailBuffer=bpPacketBufferCurrentAvailBuffer, bpIfStatsOutUnicasts=bpIfStatsOutUnicasts, bpIfStatsInOver1023BytePkts=bpIfStatsInOver1023BytePkts, bpDropsEgTxMACUnderflow=bpDropsEgTxMACUnderflow, bpCosStatsTable=bpCosStatsTable, bpIfStatsOut128To255BytePkts=bpIfStatsOut128To255BytePkts, bpIfStatsInThrottles=bpIfStatsInThrottles, bpIfStatsPortIndex=bpIfStatsPortIndex, bpBufferStatsPortPipe=bpBufferStatsPortPipe, bpPacketBufferPortPipe=bpPacketBufferPortPipe, bpCosStatsPortPipe=bpCosStatsPortPipe, bpLinkBundleObjects=bpLinkBundleObjects, bpIfStatsOutThrottles=bpIfStatsOutThrottles, bpDropsMMUHOLDrops=bpDropsMMUHOLDrops, bpIfStatsOut64BytePkts=bpIfStatsOut64BytePkts, bpPacketBufferPacketBufferAlloc=bpPacketBufferPacketBufferAlloc, bpIfStatsOut65To127BytePkts=bpIfStatsOut65To127BytePkts, bpLinkBundleSlot=bpLinkBundleSlot)
| (object_identifier, integer, octet_string) = mibBuilder.importSymbols('ASN1', 'ObjectIdentifier', 'Integer', 'OctetString')
(named_values,) = mibBuilder.importSymbols('ASN1-ENUMERATION', 'NamedValues')
(value_size_constraint, single_value_constraint, constraints_intersection, value_range_constraint, constraints_union) = mibBuilder.importSymbols('ASN1-REFINEMENT', 'ValueSizeConstraint', 'SingleValueConstraint', 'ConstraintsIntersection', 'ValueRangeConstraint', 'ConstraintsUnion')
(f10_mgmt,) = mibBuilder.importSymbols('FORCE10-SMI', 'f10Mgmt')
(notification_group, module_compliance) = mibBuilder.importSymbols('SNMPv2-CONF', 'NotificationGroup', 'ModuleCompliance')
(counter64, bits, iso, unsigned32, mib_identifier, counter32, time_ticks, gauge32, mib_scalar, mib_table, mib_table_row, mib_table_column, ip_address, module_identity, integer32, notification_type, object_identity) = mibBuilder.importSymbols('SNMPv2-SMI', 'Counter64', 'Bits', 'iso', 'Unsigned32', 'MibIdentifier', 'Counter32', 'TimeTicks', 'Gauge32', 'MibScalar', 'MibTable', 'MibTableRow', 'MibTableColumn', 'IpAddress', 'ModuleIdentity', 'Integer32', 'NotificationType', 'ObjectIdentity')
(time_stamp, display_string, textual_convention) = mibBuilder.importSymbols('SNMPv2-TC', 'TimeStamp', 'DisplayString', 'TextualConvention')
f10_bp_stats_mib = module_identity((1, 3, 6, 1, 4, 1, 6027, 3, 24))
f10BpStatsMib.setRevisions(('2013-05-22 12:48',))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
if mibBuilder.loadTexts:
f10BpStatsMib.setRevisionsDescriptions(('Initial version of this mib.',))
if mibBuilder.loadTexts:
f10BpStatsMib.setLastUpdated('201309181248Z')
if mibBuilder.loadTexts:
f10BpStatsMib.setOrganization('Dell Inc')
if mibBuilder.loadTexts:
f10BpStatsMib.setContactInfo('http://www.force10networks.com/support')
if mibBuilder.loadTexts:
f10BpStatsMib.setDescription('Dell Networking OS Back plane statistics mib. This is MIB shall use for all back plane statistics related activities. This includes the BP ports traffic statistics. BP link bundle monitoring based on BP port statistics. Queue statistics and buffer utilization on BP ports etc ..')
f10_bp_stats_link_bundle_objects = mib_identifier((1, 3, 6, 1, 4, 1, 6027, 3, 24, 1))
f10_bp_stats_objects = mib_identifier((1, 3, 6, 1, 4, 1, 6027, 3, 24, 2))
f10_bp_stats_alarms = mib_identifier((1, 3, 6, 1, 4, 1, 6027, 3, 24, 3))
bp_link_bundle_objects = mib_identifier((1, 3, 6, 1, 4, 1, 6027, 3, 24, 1, 1))
bp_link_bundle_rate_interval = mib_scalar((1, 3, 6, 1, 4, 1, 6027, 3, 24, 1, 1, 1), integer32().subtype(subtypeSpec=value_range_constraint(10, 299))).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
bpLinkBundleRateInterval.setStatus('current')
if mibBuilder.loadTexts:
bpLinkBundleRateInterval.setDescription('The rate interval for polling the Bp link bundle Monitoring.')
bp_link_bundle_trigger_threshold = mib_scalar((1, 3, 6, 1, 4, 1, 6027, 3, 24, 1, 1, 2), integer32().subtype(subtypeSpec=value_range_constraint(1, 90))).setUnits('percent').setMaxAccess('readwrite')
if mibBuilder.loadTexts:
bpLinkBundleTriggerThreshold.setStatus('current')
if mibBuilder.loadTexts:
bpLinkBundleTriggerThreshold.setDescription('The traffic distribution trigger threshold for Bp link bundle Monitoring.In percentage of total bandwidth of the link Bundle')
bp_stats_objects = mib_identifier((1, 3, 6, 1, 4, 1, 6027, 3, 24, 2, 1))
bp_drops_table = mib_table((1, 3, 6, 1, 4, 1, 6027, 3, 24, 2, 1, 1))
if mibBuilder.loadTexts:
bpDropsTable.setStatus('current')
if mibBuilder.loadTexts:
bpDropsTable.setDescription('The back plane drops table contains the list of various drops per BP higig port per BCM unit in a stack unit(card type).')
bp_drops_entry = mib_table_row((1, 3, 6, 1, 4, 1, 6027, 3, 24, 2, 1, 1, 1)).setIndexNames((0, 'F10-BPSTATS-MIB', 'bpDropsStackUnitIndex'), (0, 'F10-BPSTATS-MIB', 'bpDropsPortPipe'), (0, 'F10-BPSTATS-MIB', 'bpDropsPortIndex'))
if mibBuilder.loadTexts:
bpDropsEntry.setStatus('current')
if mibBuilder.loadTexts:
bpDropsEntry.setDescription('Each drops entry is being indexed by StackUnit(card Type) BCM unit ID and local Port Id')
bp_drops_stack_unit_index = mib_table_column((1, 3, 6, 1, 4, 1, 6027, 3, 24, 2, 1, 1, 1, 1), integer32().subtype(subtypeSpec=value_range_constraint(1, 12)))
if mibBuilder.loadTexts:
bpDropsStackUnitIndex.setStatus('current')
if mibBuilder.loadTexts:
bpDropsStackUnitIndex.setDescription('Stack unit(Card Type Id) number where this port present Each card shall contain more than one BCM units')
bp_drops_port_pipe = mib_table_column((1, 3, 6, 1, 4, 1, 6027, 3, 24, 2, 1, 1, 1, 2), integer32().subtype(subtypeSpec=value_range_constraint(1, 6)))
if mibBuilder.loadTexts:
bpDropsPortPipe.setStatus('current')
if mibBuilder.loadTexts:
bpDropsPortPipe.setDescription('bpPortPipe denotes the BCM unit in the stack unit(card Type) Each BCM unit shall contain 1-128 local ports, which includes BP as well as front end ports')
bp_drops_port_index = mib_table_column((1, 3, 6, 1, 4, 1, 6027, 3, 24, 2, 1, 1, 1, 3), integer32().subtype(subtypeSpec=value_range_constraint(1, 128)))
if mibBuilder.loadTexts:
bpDropsPortIndex.setStatus('current')
if mibBuilder.loadTexts:
bpDropsPortIndex.setDescription('BP port number. Maximum ports shall support by Trident2 BCM npu is 128. This address space includes FE ports also, which are invalid ports as far as BP is concern. For Z9000 leaf BCM units, 34 to 41 are the valid BP port numbers and for spine BCM units, 1 to 16 are the valid BP ports ')
bp_drops_in_drops = mib_table_column((1, 3, 6, 1, 4, 1, 6027, 3, 24, 2, 1, 1, 1, 4), counter64()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
bpDropsInDrops.setStatus('current')
if mibBuilder.loadTexts:
bpDropsInDrops.setDescription('The No of Ingress packet Drops')
bp_drops_in_un_known_hg_hdr = mib_table_column((1, 3, 6, 1, 4, 1, 6027, 3, 24, 2, 1, 1, 1, 5), counter64()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
bpDropsInUnKnownHgHdr.setStatus('current')
if mibBuilder.loadTexts:
bpDropsInUnKnownHgHdr.setDescription('The No of Unknown hiGig header Ingress packet Drops')
bp_drops_in_un_known_hg_opcode = mib_table_column((1, 3, 6, 1, 4, 1, 6027, 3, 24, 2, 1, 1, 1, 6), counter64()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
bpDropsInUnKnownHgOpcode.setStatus('current')
if mibBuilder.loadTexts:
bpDropsInUnKnownHgOpcode.setDescription('The No of Unknown hiGig Opcode Ingress packet Drops')
bp_drops_in_mtu_exceeds = mib_table_column((1, 3, 6, 1, 4, 1, 6027, 3, 24, 2, 1, 1, 1, 7), counter64()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
bpDropsInMTUExceeds.setStatus('current')
if mibBuilder.loadTexts:
bpDropsInMTUExceeds.setDescription('No of packets dropped on Ingress because of MTUExceeds')
bp_drops_in_mac_drops = mib_table_column((1, 3, 6, 1, 4, 1, 6027, 3, 24, 2, 1, 1, 1, 8), counter64()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
bpDropsInMacDrops.setStatus('current')
if mibBuilder.loadTexts:
bpDropsInMacDrops.setDescription('No of packets dropped on Ingress MAC')
bp_drops_mmuhol_drops = mib_table_column((1, 3, 6, 1, 4, 1, 6027, 3, 24, 2, 1, 1, 1, 9), counter64()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
bpDropsMMUHOLDrops.setStatus('current')
if mibBuilder.loadTexts:
bpDropsMMUHOLDrops.setDescription('No of packets dropped in MMU because of MMU HOL Drops')
bp_drops_eg_mac_drops = mib_table_column((1, 3, 6, 1, 4, 1, 6027, 3, 24, 2, 1, 1, 1, 10), counter64()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
bpDropsEgMacDrops.setStatus('current')
if mibBuilder.loadTexts:
bpDropsEgMacDrops.setDescription('No of packets dropped on Egress MAC')
bp_drops_eg_tx_aged_counter = mib_table_column((1, 3, 6, 1, 4, 1, 6027, 3, 24, 2, 1, 1, 1, 11), counter64()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
bpDropsEgTxAgedCounter.setStatus('current')
if mibBuilder.loadTexts:
bpDropsEgTxAgedCounter.setDescription('No of Aged packets dropped on Egress')
bp_drops_eg_tx_err_counter = mib_table_column((1, 3, 6, 1, 4, 1, 6027, 3, 24, 2, 1, 1, 1, 12), counter64()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
bpDropsEgTxErrCounter.setStatus('current')
if mibBuilder.loadTexts:
bpDropsEgTxErrCounter.setDescription('No of Error packets dropped on Egress')
bp_drops_eg_tx_mac_underflow = mib_table_column((1, 3, 6, 1, 4, 1, 6027, 3, 24, 2, 1, 1, 1, 13), counter64()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
bpDropsEgTxMACUnderflow.setStatus('current')
if mibBuilder.loadTexts:
bpDropsEgTxMACUnderflow.setDescription('No of MAC underflow packets dropped on Egress')
bp_drops_eg_tx_err_pkt_counter = mib_table_column((1, 3, 6, 1, 4, 1, 6027, 3, 24, 2, 1, 1, 1, 14), counter64()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
bpDropsEgTxErrPktCounter.setStatus('current')
if mibBuilder.loadTexts:
bpDropsEgTxErrPktCounter.setDescription('No of total packets dropped in Egress')
bp_if_stats_table = mib_table((1, 3, 6, 1, 4, 1, 6027, 3, 24, 2, 1, 2))
if mibBuilder.loadTexts:
bpIfStatsTable.setStatus('current')
if mibBuilder.loadTexts:
bpIfStatsTable.setDescription('The back plane counter statistics table contains the list of various counters per BP higig port per BCM unit in a stack unit(card type).')
bp_if_stats_entry = mib_table_row((1, 3, 6, 1, 4, 1, 6027, 3, 24, 2, 1, 2, 1)).setIndexNames((0, 'F10-BPSTATS-MIB', 'bpIfStatsStackUnitIndex'), (0, 'F10-BPSTATS-MIB', 'bpIfStatsPortPipe'), (0, 'F10-BPSTATS-MIB', 'bpIfStatsPortIndex'))
if mibBuilder.loadTexts:
bpIfStatsEntry.setStatus('current')
if mibBuilder.loadTexts:
bpIfStatsEntry.setDescription('Each Stats entry is being indexed by StackUnit(card Type) BCM unit ID and local Port Id')
bp_if_stats_stack_unit_index = mib_table_column((1, 3, 6, 1, 4, 1, 6027, 3, 24, 2, 1, 2, 1, 1), integer32().subtype(subtypeSpec=value_range_constraint(1, 12)))
if mibBuilder.loadTexts:
bpIfStatsStackUnitIndex.setStatus('current')
if mibBuilder.loadTexts:
bpIfStatsStackUnitIndex.setDescription('Stack unit(Card Type Id) number where this port present Each card shall contain more than one BCM units')
bp_if_stats_port_pipe = mib_table_column((1, 3, 6, 1, 4, 1, 6027, 3, 24, 2, 1, 2, 1, 2), integer32().subtype(subtypeSpec=value_range_constraint(1, 6)))
if mibBuilder.loadTexts:
bpIfStatsPortPipe.setStatus('current')
if mibBuilder.loadTexts:
bpIfStatsPortPipe.setDescription('bpPortPipe denotes the BCM unit in the stack unit(card Type) Each BCM unit shall contain 1-128 local ports, which includes BP as well as front end ports')
bp_if_stats_port_index = mib_table_column((1, 3, 6, 1, 4, 1, 6027, 3, 24, 2, 1, 2, 1, 3), integer32().subtype(subtypeSpec=value_range_constraint(1, 128)))
if mibBuilder.loadTexts:
bpIfStatsPortIndex.setStatus('current')
if mibBuilder.loadTexts:
bpIfStatsPortIndex.setDescription('BP port number. Maximum ports shall support by Trident2 BCM npu is 128. This address space includes FE ports also, which are invalid ports as far as BP is concern. For Z9000 leaf BCM units, 34 to 41 are the valid BP port numbers and for spine BCM units, 1 to 16 are the valid BP ports ')
bp_if_stats_in64_byte_pkts = mib_table_column((1, 3, 6, 1, 4, 1, 6027, 3, 24, 2, 1, 2, 1, 4), counter64()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
bpIfStatsIn64BytePkts.setStatus('current')
if mibBuilder.loadTexts:
bpIfStatsIn64BytePkts.setDescription('The total number of frames (including bad frames) received that were 64 octets in length (excluding framing bits but including FCS octets).')
bp_if_stats_in65_to127_byte_pkts = mib_table_column((1, 3, 6, 1, 4, 1, 6027, 3, 24, 2, 1, 2, 1, 5), counter64()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
bpIfStatsIn65To127BytePkts.setStatus('current')
if mibBuilder.loadTexts:
bpIfStatsIn65To127BytePkts.setDescription('The total number of frames (including bad frames) received that were between 65 and 127 octets in length inclusive (excluding framing bits but including FCS octets).')
bp_if_stats_in128_to255_byte_pkts = mib_table_column((1, 3, 6, 1, 4, 1, 6027, 3, 24, 2, 1, 2, 1, 6), counter64()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
bpIfStatsIn128To255BytePkts.setStatus('current')
if mibBuilder.loadTexts:
bpIfStatsIn128To255BytePkts.setDescription('The total number of frames (including bad frames) received that were between 128 and 255 octets in length inclusive (excluding framing bits but including FCS octets).')
bp_if_stats_in256_to511_byte_pkts = mib_table_column((1, 3, 6, 1, 4, 1, 6027, 3, 24, 2, 1, 2, 1, 7), counter64()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
bpIfStatsIn256To511BytePkts.setStatus('current')
if mibBuilder.loadTexts:
bpIfStatsIn256To511BytePkts.setDescription('The total number of frames (including bad frames) received that were between 256 and 511 octets in length inclusive (excluding framing bits but including FCS octets).')
bp_if_stats_in512_to1023_byte_pkts = mib_table_column((1, 3, 6, 1, 4, 1, 6027, 3, 24, 2, 1, 2, 1, 8), counter64()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
bpIfStatsIn512To1023BytePkts.setStatus('current')
if mibBuilder.loadTexts:
bpIfStatsIn512To1023BytePkts.setDescription('The total number of frames (including bad frames) received that were between 512 and 1023 octets in length inclusive (excluding framing bits but including FCS octets).')
bp_if_stats_in_over1023_byte_pkts = mib_table_column((1, 3, 6, 1, 4, 1, 6027, 3, 24, 2, 1, 2, 1, 9), counter64()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
bpIfStatsInOver1023BytePkts.setStatus('current')
if mibBuilder.loadTexts:
bpIfStatsInOver1023BytePkts.setDescription('The total number of frames received that were longer than 1023 (1025 Bytes in case of VLAN Tag) octets (excluding framing bits, but including FCS octets) and were otherwise well formed. This counter is not incremented for too long frames.')
bp_if_stats_in_throttles = mib_table_column((1, 3, 6, 1, 4, 1, 6027, 3, 24, 2, 1, 2, 1, 10), counter64()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
bpIfStatsInThrottles.setStatus('current')
if mibBuilder.loadTexts:
bpIfStatsInThrottles.setDescription('This counter is incremented when a valid frame with a length or type field value equal to 0x8808 (Control Frame) is received.')
bp_if_stats_in_runts = mib_table_column((1, 3, 6, 1, 4, 1, 6027, 3, 24, 2, 1, 2, 1, 11), counter64()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
bpIfStatsInRunts.setStatus('current')
if mibBuilder.loadTexts:
bpIfStatsInRunts.setDescription('The total number of frames received that were less than 64 octets long (excluding framing bits, but including FCS octets) and were otherwise well formed.')
bp_if_stats_in_giants = mib_table_column((1, 3, 6, 1, 4, 1, 6027, 3, 24, 2, 1, 2, 1, 12), counter64()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
bpIfStatsInGiants.setStatus('current')
if mibBuilder.loadTexts:
bpIfStatsInGiants.setDescription('The total number of frames received that were longer than 1518 (1522 Bytes in case of VLAN Tag) octets (excluding framing bits, but including FCS octets) and were otherwise well formed. This counter is not incremented for too long frames.')
bp_if_stats_in_crc = mib_table_column((1, 3, 6, 1, 4, 1, 6027, 3, 24, 2, 1, 2, 1, 13), counter64()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
bpIfStatsInCRC.setStatus('current')
if mibBuilder.loadTexts:
bpIfStatsInCRC.setDescription('The total number of frames received that had a length (excluding framing bits, but including FCS octets) of between 64 and 1518 octets, inclusive, but had a bad CRC.')
bp_if_stats_in_overruns = mib_table_column((1, 3, 6, 1, 4, 1, 6027, 3, 24, 2, 1, 2, 1, 14), counter64()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
bpIfStatsInOverruns.setStatus('current')
if mibBuilder.loadTexts:
bpIfStatsInOverruns.setDescription('The total number of frames has been chosen to be dropped by detecting the buffer issue')
bp_if_stats_out_underruns = mib_table_column((1, 3, 6, 1, 4, 1, 6027, 3, 24, 2, 1, 2, 1, 15), counter64()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
bpIfStatsOutUnderruns.setStatus('current')
if mibBuilder.loadTexts:
bpIfStatsOutUnderruns.setDescription('The total number of frames dropped because of buffer underrun.')
bp_if_stats_out_unicasts = mib_table_column((1, 3, 6, 1, 4, 1, 6027, 3, 24, 2, 1, 2, 1, 16), counter64()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
bpIfStatsOutUnicasts.setStatus('current')
if mibBuilder.loadTexts:
bpIfStatsOutUnicasts.setDescription('The total number of Unicast frames are transmitted out of the interface')
bp_if_stats_out_collisions = mib_table_column((1, 3, 6, 1, 4, 1, 6027, 3, 24, 2, 1, 2, 1, 17), counter64()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
bpIfStatsOutCollisions.setStatus('current')
if mibBuilder.loadTexts:
bpIfStatsOutCollisions.setDescription('A count of the frames that due to excessive or late collisions are not transmitted successfully.')
bp_if_stats_out_wred_drops = mib_table_column((1, 3, 6, 1, 4, 1, 6027, 3, 24, 2, 1, 2, 1, 18), counter64()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
bpIfStatsOutWredDrops.setStatus('current')
if mibBuilder.loadTexts:
bpIfStatsOutWredDrops.setDescription('The total number of frames are dropped by using WRED policy due to excessive traffic.')
bp_if_stats_out64_byte_pkts = mib_table_column((1, 3, 6, 1, 4, 1, 6027, 3, 24, 2, 1, 2, 1, 19), counter64()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
bpIfStatsOut64BytePkts.setStatus('current')
if mibBuilder.loadTexts:
bpIfStatsOut64BytePkts.setDescription('The total number of valid frames with the block of 64 byte size is transmitted')
bp_if_stats_out65_to127_byte_pkts = mib_table_column((1, 3, 6, 1, 4, 1, 6027, 3, 24, 2, 1, 2, 1, 20), counter64()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
bpIfStatsOut65To127BytePkts.setStatus('current')
if mibBuilder.loadTexts:
bpIfStatsOut65To127BytePkts.setDescription('The total of valid frame with the block size of range between 65 and 127 bytes are transmitted.')
bp_if_stats_out128_to255_byte_pkts = mib_table_column((1, 3, 6, 1, 4, 1, 6027, 3, 24, 2, 1, 2, 1, 21), counter64()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
bpIfStatsOut128To255BytePkts.setStatus('current')
if mibBuilder.loadTexts:
bpIfStatsOut128To255BytePkts.setDescription('The total of valid frame with the block size of range between 128 and 255 bytes are transmitted')
bp_if_stats_out256_to511_byte_pkts = mib_table_column((1, 3, 6, 1, 4, 1, 6027, 3, 24, 2, 1, 2, 1, 22), counter64()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
bpIfStatsOut256To511BytePkts.setStatus('current')
if mibBuilder.loadTexts:
bpIfStatsOut256To511BytePkts.setDescription('The total of valid frame with the block size of range between 256 and 511 bytes are transmitted')
bp_if_stats_out512_to1023_byte_pkts = mib_table_column((1, 3, 6, 1, 4, 1, 6027, 3, 24, 2, 1, 2, 1, 23), counter64()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
bpIfStatsOut512To1023BytePkts.setStatus('current')
if mibBuilder.loadTexts:
bpIfStatsOut512To1023BytePkts.setDescription('The total of valid frame with the block size of range between 512 and 1023 bytes are transmitted')
bp_if_stats_out_over1023_byte_pkts = mib_table_column((1, 3, 6, 1, 4, 1, 6027, 3, 24, 2, 1, 2, 1, 24), counter64()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
bpIfStatsOutOver1023BytePkts.setStatus('current')
if mibBuilder.loadTexts:
bpIfStatsOutOver1023BytePkts.setDescription('The total of valid frame with the block size of greater than 1023 bytes are transmitted.')
bp_if_stats_out_throttles = mib_table_column((1, 3, 6, 1, 4, 1, 6027, 3, 24, 2, 1, 2, 1, 25), counter64()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
bpIfStatsOutThrottles.setStatus('current')
if mibBuilder.loadTexts:
bpIfStatsOutThrottles.setDescription('This counter is incremented when a valid frame with a length or type field value equal to 0x8808 (Control Frame) is sent.')
bp_if_stats_last_discontinuity_time = mib_table_column((1, 3, 6, 1, 4, 1, 6027, 3, 24, 2, 1, 2, 1, 26), time_stamp()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
bpIfStatsLastDiscontinuityTime.setStatus('current')
if mibBuilder.loadTexts:
bpIfStatsLastDiscontinuityTime.setDescription("The value of sysUpTime on the most recent occasion at which this interface's counters suffered a discontinuity via a reset. If no such discontinuities have occurred since the last reinitialization of the local management subsystem, then this object contains a zero value.")
bp_if_stats_in_cent_rate = mib_table_column((1, 3, 6, 1, 4, 1, 6027, 3, 24, 2, 1, 2, 1, 27), integer32().subtype(subtypeSpec=value_range_constraint(0, 100))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
bpIfStatsInCentRate.setStatus('current')
if mibBuilder.loadTexts:
bpIfStatsInCentRate.setDescription('This is the percentage of maximum line rate at which data is receiving on the Interface. For Z9000 - BP hiGig line rate is 42G. This is an integer value which can go from 0% to 100%.')
bp_if_stats_out_cent_rate = mib_table_column((1, 3, 6, 1, 4, 1, 6027, 3, 24, 2, 1, 2, 1, 28), integer32().subtype(subtypeSpec=value_range_constraint(0, 100))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
bpIfStatsOutCentRate.setStatus('current')
if mibBuilder.loadTexts:
bpIfStatsOutCentRate.setDescription('This is the percentage of maximum line rate at which data is sending on the Interface. For Z9000 - BP hiGig line rate is 42G. This is an integer value which can go from 0% to 100%.')
bp_if_stats_last_change = mib_table_column((1, 3, 6, 1, 4, 1, 6027, 3, 24, 2, 1, 2, 1, 29), time_stamp()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
bpIfStatsLastChange.setStatus('current')
if mibBuilder.loadTexts:
bpIfStatsLastChange.setDescription('The value of sysUpTime, on which all the counters are updated recently')
bp_packet_buffer_table = mib_table((1, 3, 6, 1, 4, 1, 6027, 3, 24, 2, 1, 3))
if mibBuilder.loadTexts:
bpPacketBufferTable.setStatus('current')
if mibBuilder.loadTexts:
bpPacketBufferTable.setDescription('The packet buffer table contains the modular packet buffers details per stack unit and the mode of allocation.')
bp_packet_buffer_entry = mib_table_row((1, 3, 6, 1, 4, 1, 6027, 3, 24, 2, 1, 3, 1)).setIndexNames((0, 'F10-BPSTATS-MIB', 'bpPacketBufferStackUnitIndex'), (0, 'F10-BPSTATS-MIB', 'bpPacketBufferPortPipe'))
if mibBuilder.loadTexts:
bpPacketBufferEntry.setStatus('current')
if mibBuilder.loadTexts:
bpPacketBufferEntry.setDescription('Packet buffer details per NPU unit.')
bp_packet_buffer_stack_unit_index = mib_table_column((1, 3, 6, 1, 4, 1, 6027, 3, 24, 2, 1, 3, 1, 1), integer32().subtype(subtypeSpec=value_range_constraint(1, 12)))
if mibBuilder.loadTexts:
bpPacketBufferStackUnitIndex.setStatus('current')
if mibBuilder.loadTexts:
bpPacketBufferStackUnitIndex.setDescription('Stack unit(Card Type Id) number where this port present Each card shall contain more than one BCM units')
bp_packet_buffer_port_pipe = mib_table_column((1, 3, 6, 1, 4, 1, 6027, 3, 24, 2, 1, 3, 1, 2), integer32().subtype(subtypeSpec=value_range_constraint(1, 6)))
if mibBuilder.loadTexts:
bpPacketBufferPortPipe.setStatus('current')
if mibBuilder.loadTexts:
bpPacketBufferPortPipe.setDescription('bpPortPipe denotes the BCM unit in the stack unit(card Type) Each BCM unit shall contain 1-128 local ports, which includes BP as well as front end ports')
bp_packet_buffer_total_packet_buffer = mib_table_column((1, 3, 6, 1, 4, 1, 6027, 3, 24, 2, 1, 3, 1, 3), counter32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
bpPacketBufferTotalPacketBuffer.setStatus('current')
if mibBuilder.loadTexts:
bpPacketBufferTotalPacketBuffer.setDescription('Total packet buffer in this NPU unit.')
bp_packet_buffer_current_avail_buffer = mib_table_column((1, 3, 6, 1, 4, 1, 6027, 3, 24, 2, 1, 3, 1, 4), counter32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
bpPacketBufferCurrentAvailBuffer.setStatus('current')
if mibBuilder.loadTexts:
bpPacketBufferCurrentAvailBuffer.setDescription('Current available buffer in this NPU unit.')
bp_packet_buffer_packet_buffer_alloc = mib_table_column((1, 3, 6, 1, 4, 1, 6027, 3, 24, 2, 1, 3, 1, 5), counter32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
bpPacketBufferPacketBufferAlloc.setStatus('current')
if mibBuilder.loadTexts:
bpPacketBufferPacketBufferAlloc.setDescription('Static or Dynamic allocation.')
bp_buffer_stats_table = mib_table((1, 3, 6, 1, 4, 1, 6027, 3, 24, 2, 1, 4))
if mibBuilder.loadTexts:
bpBufferStatsTable.setStatus('current')
if mibBuilder.loadTexts:
bpBufferStatsTable.setDescription('The back plane stats per port table contains the packet buffer usage per bp port per NPU unit.')
bp_buffer_stats_entry = mib_table_row((1, 3, 6, 1, 4, 1, 6027, 3, 24, 2, 1, 4, 1)).setIndexNames((0, 'F10-BPSTATS-MIB', 'bpBufferStatsStackUnitIndex'), (0, 'F10-BPSTATS-MIB', 'bpBufferStatsPortPipe'), (0, 'F10-BPSTATS-MIB', 'bpBufferStatsPortIndex'))
if mibBuilder.loadTexts:
bpBufferStatsEntry.setStatus('current')
if mibBuilder.loadTexts:
bpBufferStatsEntry.setDescription('Per bp port buffer stats ')
bp_buffer_stats_stack_unit_index = mib_table_column((1, 3, 6, 1, 4, 1, 6027, 3, 24, 2, 1, 4, 1, 1), integer32().subtype(subtypeSpec=value_range_constraint(1, 12)))
if mibBuilder.loadTexts:
bpBufferStatsStackUnitIndex.setStatus('current')
if mibBuilder.loadTexts:
bpBufferStatsStackUnitIndex.setDescription('Stack unit(Card Type Id) number where this port present Each card shall contain more than one BCM units')
bp_buffer_stats_port_pipe = mib_table_column((1, 3, 6, 1, 4, 1, 6027, 3, 24, 2, 1, 4, 1, 2), integer32().subtype(subtypeSpec=value_range_constraint(1, 6)))
if mibBuilder.loadTexts:
bpBufferStatsPortPipe.setStatus('current')
if mibBuilder.loadTexts:
bpBufferStatsPortPipe.setDescription('bpPortPipe denotes the BCM unit in the stack unit(card Type) Each BCM unit shall contain 1-128 local ports, which includes BP as well as front end ports')
bp_buffer_stats_port_index = mib_table_column((1, 3, 6, 1, 4, 1, 6027, 3, 24, 2, 1, 4, 1, 3), integer32().subtype(subtypeSpec=value_range_constraint(1, 128)))
if mibBuilder.loadTexts:
bpBufferStatsPortIndex.setStatus('current')
if mibBuilder.loadTexts:
bpBufferStatsPortIndex.setDescription('BP port number. Maximum ports shall support by Trident2 BCM npu is 128. This address space includes FE ports also, which are invalid ports as far as BP is concern. For Z9000 leaf BCM units, 34 to 41 are the valid BP port numbers and for spine BCM units, 1 to 16 are the valid BP ports ')
bp_buffer_stats_current_usage_per_port = mib_table_column((1, 3, 6, 1, 4, 1, 6027, 3, 24, 2, 1, 4, 1, 4), counter32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
bpBufferStatsCurrentUsagePerPort.setStatus('current')
if mibBuilder.loadTexts:
bpBufferStatsCurrentUsagePerPort.setDescription('Current buffer usage per bp port.')
bp_buffer_stats_default_packet_buff_alloc = mib_table_column((1, 3, 6, 1, 4, 1, 6027, 3, 24, 2, 1, 4, 1, 5), counter32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
bpBufferStatsDefaultPacketBuffAlloc.setStatus('current')
if mibBuilder.loadTexts:
bpBufferStatsDefaultPacketBuffAlloc.setDescription('Default packet buffer allocated.')
bp_buffer_stats_max_limit_per_port = mib_table_column((1, 3, 6, 1, 4, 1, 6027, 3, 24, 2, 1, 4, 1, 6), counter32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
bpBufferStatsMaxLimitPerPort.setStatus('current')
if mibBuilder.loadTexts:
bpBufferStatsMaxLimitPerPort.setDescription('Max buffer limit per bp port.')
bp_cos_stats_table = mib_table((1, 3, 6, 1, 4, 1, 6027, 3, 24, 2, 1, 5))
if mibBuilder.loadTexts:
bpCosStatsTable.setStatus('current')
if mibBuilder.loadTexts:
bpCosStatsTable.setDescription('The back plane statistics per COS table gives packet buffer statistics per COS per bp port.')
bp_cos_stats_entry = mib_table_row((1, 3, 6, 1, 4, 1, 6027, 3, 24, 2, 1, 5, 1)).setIndexNames((0, 'F10-BPSTATS-MIB', 'bpCosStatsStackUnitIndex'), (0, 'F10-BPSTATS-MIB', 'bpCosStatsPortPipe'), (0, 'F10-BPSTATS-MIB', 'bpCosStatsPortIndex'), (0, 'F10-BPSTATS-MIB', 'bpCosStatsCOSNumber'))
if mibBuilder.loadTexts:
bpCosStatsEntry.setStatus('current')
if mibBuilder.loadTexts:
bpCosStatsEntry.setDescription('Per bp port buffer stats and per COS buffer stats.')
bp_cos_stats_stack_unit_index = mib_table_column((1, 3, 6, 1, 4, 1, 6027, 3, 24, 2, 1, 5, 1, 1), integer32().subtype(subtypeSpec=value_range_constraint(1, 12)))
if mibBuilder.loadTexts:
bpCosStatsStackUnitIndex.setStatus('current')
if mibBuilder.loadTexts:
bpCosStatsStackUnitIndex.setDescription('Stack unit(Card Type Id) number where this port present Each card shall contain more than one BCM units')
bp_cos_stats_port_pipe = mib_table_column((1, 3, 6, 1, 4, 1, 6027, 3, 24, 2, 1, 5, 1, 2), integer32().subtype(subtypeSpec=value_range_constraint(1, 6)))
if mibBuilder.loadTexts:
bpCosStatsPortPipe.setStatus('current')
if mibBuilder.loadTexts:
bpCosStatsPortPipe.setDescription('bpPortPipe denotes the BCM unit in the stack unit(card Type) Each BCM unit shall contain 1-128 local ports, which includes BP as well as front end ports')
bp_cos_stats_port_index = mib_table_column((1, 3, 6, 1, 4, 1, 6027, 3, 24, 2, 1, 5, 1, 3), integer32().subtype(subtypeSpec=value_range_constraint(1, 128)))
if mibBuilder.loadTexts:
bpCosStatsPortIndex.setStatus('current')
if mibBuilder.loadTexts:
bpCosStatsPortIndex.setDescription('BP port number. Maximum ports shall support by Trident2 BCM npu is 128. This address space includes FE ports also, which are invalid ports as far as BP is concern. For Z9000 leaf BCM units, 34 to 41 are the valid BP port numbers and for spine BCM units, 1 to 16 are the valid BP ports ')
bp_cos_stats_cos_number = mib_table_column((1, 3, 6, 1, 4, 1, 6027, 3, 24, 2, 1, 5, 1, 4), integer32().subtype(subtypeSpec=value_range_constraint(1, 15)))
if mibBuilder.loadTexts:
bpCosStatsCOSNumber.setStatus('current')
if mibBuilder.loadTexts:
bpCosStatsCOSNumber.setDescription('COS queue number, There shall 10 unicast and 5 multicast queues per port in Trident2')
bp_cos_stats_current_usage = mib_table_column((1, 3, 6, 1, 4, 1, 6027, 3, 24, 2, 1, 5, 1, 5), counter32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
bpCosStatsCurrentUsage.setStatus('current')
if mibBuilder.loadTexts:
bpCosStatsCurrentUsage.setDescription('Current buffer usage per COS per bp port.')
bp_cos_stats_default_packet_buff_alloc = mib_table_column((1, 3, 6, 1, 4, 1, 6027, 3, 24, 2, 1, 5, 1, 6), counter32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
bpCosStatsDefaultPacketBuffAlloc.setStatus('current')
if mibBuilder.loadTexts:
bpCosStatsDefaultPacketBuffAlloc.setDescription('Default packet buffer allocated per COS queue')
bp_cos_stats_max_limit = mib_table_column((1, 3, 6, 1, 4, 1, 6027, 3, 24, 2, 1, 5, 1, 7), counter32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
bpCosStatsMaxLimit.setStatus('current')
if mibBuilder.loadTexts:
bpCosStatsMaxLimit.setDescription('Max buffer utilization limit per bp port.')
bp_cos_stats_hold_drops = mib_table_column((1, 3, 6, 1, 4, 1, 6027, 3, 24, 2, 1, 5, 1, 8), counter64()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
bpCosStatsHOLDDrops.setStatus('current')
if mibBuilder.loadTexts:
bpCosStatsHOLDDrops.setDescription('HOLD Drops Per Queue.')
bp_link_bundle_notifications = mib_identifier((1, 3, 6, 1, 4, 1, 6027, 3, 24, 3, 1))
bp_link_bundle_alarm_variable = mib_identifier((1, 3, 6, 1, 4, 1, 6027, 3, 24, 3, 2))
bp_link_bundle_type = mib_scalar((1, 3, 6, 1, 4, 1, 6027, 3, 24, 3, 2, 1), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2))).clone(namedValues=named_values(('unknown', 1), ('bpHgBundle', 2)))).setMaxAccess('accessiblefornotify')
if mibBuilder.loadTexts:
bpLinkBundleType.setStatus('current')
if mibBuilder.loadTexts:
bpLinkBundleType.setDescription('Indicates Type of Back plane HiGig link bundle')
bp_link_bundle_slot = mib_scalar((1, 3, 6, 1, 4, 1, 6027, 3, 24, 3, 2, 2), integer32()).setMaxAccess('accessiblefornotify')
if mibBuilder.loadTexts:
bpLinkBundleSlot.setStatus('current')
if mibBuilder.loadTexts:
bpLinkBundleSlot.setDescription('The SlotId on which Link Bundle is overloaded')
bp_link_bundle_npu_unit = mib_scalar((1, 3, 6, 1, 4, 1, 6027, 3, 24, 3, 2, 3), integer32()).setMaxAccess('accessiblefornotify')
if mibBuilder.loadTexts:
bpLinkBundleNpuUnit.setStatus('current')
if mibBuilder.loadTexts:
bpLinkBundleNpuUnit.setDescription('The npuUnitId(BCM unit Id) on which Link Bundle is overloaded')
bp_link_bundle_local_id = mib_scalar((1, 3, 6, 1, 4, 1, 6027, 3, 24, 3, 2, 4), integer32()).setMaxAccess('accessiblefornotify')
if mibBuilder.loadTexts:
bpLinkBundleLocalId.setStatus('current')
if mibBuilder.loadTexts:
bpLinkBundleLocalId.setDescription('The local linkBundle Id which is overloaded')
bp_link_bundle_imbalance = notification_type((1, 3, 6, 1, 4, 1, 6027, 3, 24, 3, 1, 1)).setObjects(('F10-BPSTATS-MIB', 'bpLinkBundleType'), ('F10-BPSTATS-MIB', 'bpLinkBundleSlot'), ('F10-BPSTATS-MIB', 'bpLinkBundleNpuUnit'), ('F10-BPSTATS-MIB', 'bpLinkBundleLocalId'))
if mibBuilder.loadTexts:
bpLinkBundleImbalance.setStatus('current')
if mibBuilder.loadTexts:
bpLinkBundleImbalance.setDescription('Trap generated when traffic imbalance observed in BP Link Bundles')
bp_link_bundle_imbalance_clear = notification_type((1, 3, 6, 1, 4, 1, 6027, 3, 24, 3, 1, 2)).setObjects(('F10-BPSTATS-MIB', 'bpLinkBundleType'), ('F10-BPSTATS-MIB', 'bpLinkBundleSlot'), ('F10-BPSTATS-MIB', 'bpLinkBundleNpuUnit'), ('F10-BPSTATS-MIB', 'bpLinkBundleLocalId'))
if mibBuilder.loadTexts:
bpLinkBundleImbalanceClear.setStatus('current')
if mibBuilder.loadTexts:
bpLinkBundleImbalanceClear.setDescription('Trap generated when traffic imbalance is no longer observed on Bp Link bundles')
mibBuilder.exportSymbols('F10-BPSTATS-MIB', bpIfStatsOutCentRate=bpIfStatsOutCentRate, bpCosStatsHOLDDrops=bpCosStatsHOLDDrops, bpLinkBundleLocalId=bpLinkBundleLocalId, bpBufferStatsStackUnitIndex=bpBufferStatsStackUnitIndex, bpIfStatsIn256To511BytePkts=bpIfStatsIn256To511BytePkts, bpIfStatsInGiants=bpIfStatsInGiants, bpBufferStatsDefaultPacketBuffAlloc=bpBufferStatsDefaultPacketBuffAlloc, bpCosStatsDefaultPacketBuffAlloc=bpCosStatsDefaultPacketBuffAlloc, bpDropsInUnKnownHgOpcode=bpDropsInUnKnownHgOpcode, bpCosStatsEntry=bpCosStatsEntry, bpBufferStatsCurrentUsagePerPort=bpBufferStatsCurrentUsagePerPort, bpLinkBundleType=bpLinkBundleType, PYSNMP_MODULE_ID=f10BpStatsMib, bpDropsEgTxErrPktCounter=bpDropsEgTxErrPktCounter, bpDropsTable=bpDropsTable, bpDropsEgTxAgedCounter=bpDropsEgTxAgedCounter, bpCosStatsCOSNumber=bpCosStatsCOSNumber, bpLinkBundleTriggerThreshold=bpLinkBundleTriggerThreshold, bpLinkBundleNpuUnit=bpLinkBundleNpuUnit, bpDropsInMacDrops=bpDropsInMacDrops, bpPacketBufferEntry=bpPacketBufferEntry, bpIfStatsOutWredDrops=bpIfStatsOutWredDrops, bpCosStatsStackUnitIndex=bpCosStatsStackUnitIndex, bpCosStatsMaxLimit=bpCosStatsMaxLimit, bpBufferStatsTable=bpBufferStatsTable, bpIfStatsOutUnderruns=bpIfStatsOutUnderruns, bpDropsPortIndex=bpDropsPortIndex, bpPacketBufferStackUnitIndex=bpPacketBufferStackUnitIndex, bpDropsEgMacDrops=bpDropsEgMacDrops, bpDropsInMTUExceeds=bpDropsInMTUExceeds, bpLinkBundleNotifications=bpLinkBundleNotifications, bpIfStatsInCentRate=bpIfStatsInCentRate, bpIfStatsStackUnitIndex=bpIfStatsStackUnitIndex, bpCosStatsCurrentUsage=bpCosStatsCurrentUsage, bpDropsEntry=bpDropsEntry, bpPacketBufferTotalPacketBuffer=bpPacketBufferTotalPacketBuffer, bpIfStatsOut256To511BytePkts=bpIfStatsOut256To511BytePkts, bpIfStatsTable=bpIfStatsTable, bpIfStatsLastDiscontinuityTime=bpIfStatsLastDiscontinuityTime, bpLinkBundleImbalanceClear=bpLinkBundleImbalanceClear, bpIfStatsInOverruns=bpIfStatsInOverruns, bpIfStatsIn64BytePkts=bpIfStatsIn64BytePkts, bpIfStatsIn512To1023BytePkts=bpIfStatsIn512To1023BytePkts, bpBufferStatsMaxLimitPerPort=bpBufferStatsMaxLimitPerPort, bpBufferStatsPortIndex=bpBufferStatsPortIndex, bpDropsEgTxErrCounter=bpDropsEgTxErrCounter, bpIfStatsPortPipe=bpIfStatsPortPipe, bpIfStatsLastChange=bpIfStatsLastChange, bpDropsInDrops=bpDropsInDrops, bpIfStatsInRunts=bpIfStatsInRunts, bpLinkBundleImbalance=bpLinkBundleImbalance, f10BpStatsLinkBundleObjects=f10BpStatsLinkBundleObjects, f10BpStatsObjects=f10BpStatsObjects, bpIfStatsOutOver1023BytePkts=bpIfStatsOutOver1023BytePkts, bpDropsInUnKnownHgHdr=bpDropsInUnKnownHgHdr, bpIfStatsIn65To127BytePkts=bpIfStatsIn65To127BytePkts, bpDropsStackUnitIndex=bpDropsStackUnitIndex, bpIfStatsEntry=bpIfStatsEntry, bpIfStatsIn128To255BytePkts=bpIfStatsIn128To255BytePkts, f10BpStatsMib=f10BpStatsMib, bpBufferStatsEntry=bpBufferStatsEntry, bpPacketBufferTable=bpPacketBufferTable, bpLinkBundleRateInterval=bpLinkBundleRateInterval, bpCosStatsPortIndex=bpCosStatsPortIndex, bpLinkBundleAlarmVariable=bpLinkBundleAlarmVariable, bpDropsPortPipe=bpDropsPortPipe, bpStatsObjects=bpStatsObjects, bpIfStatsOutCollisions=bpIfStatsOutCollisions, f10BpStatsAlarms=f10BpStatsAlarms, bpIfStatsInCRC=bpIfStatsInCRC, bpIfStatsOut512To1023BytePkts=bpIfStatsOut512To1023BytePkts, bpPacketBufferCurrentAvailBuffer=bpPacketBufferCurrentAvailBuffer, bpIfStatsOutUnicasts=bpIfStatsOutUnicasts, bpIfStatsInOver1023BytePkts=bpIfStatsInOver1023BytePkts, bpDropsEgTxMACUnderflow=bpDropsEgTxMACUnderflow, bpCosStatsTable=bpCosStatsTable, bpIfStatsOut128To255BytePkts=bpIfStatsOut128To255BytePkts, bpIfStatsInThrottles=bpIfStatsInThrottles, bpIfStatsPortIndex=bpIfStatsPortIndex, bpBufferStatsPortPipe=bpBufferStatsPortPipe, bpPacketBufferPortPipe=bpPacketBufferPortPipe, bpCosStatsPortPipe=bpCosStatsPortPipe, bpLinkBundleObjects=bpLinkBundleObjects, bpIfStatsOutThrottles=bpIfStatsOutThrottles, bpDropsMMUHOLDrops=bpDropsMMUHOLDrops, bpIfStatsOut64BytePkts=bpIfStatsOut64BytePkts, bpPacketBufferPacketBufferAlloc=bpPacketBufferPacketBufferAlloc, bpIfStatsOut65To127BytePkts=bpIfStatsOut65To127BytePkts, bpLinkBundleSlot=bpLinkBundleSlot) |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
#3.1.1 => updates from 2016 to 2018
#3.1.2 => fix to pip distribution
__version__ = '3.1.2'
| __version__ = '3.1.2' |
if __name__ == '__main__':
print("{file} is main".format(file=__file__))
else:
print("{file} is loaded".format(file=__file__)) | if __name__ == '__main__':
print('{file} is main'.format(file=__file__))
else:
print('{file} is loaded'.format(file=__file__)) |
with open('.\\DARKCPU\\DARKCPU.bin', 'rb') as inputFile:
with open('image.bin', 'wb') as outputFile:
while True:
bufA = inputFile.read(1)
bufB = inputFile.read(1)
if bufA == "" or bufB == "":
break;
outputFile.write(bufB)
outputFile.write(bufA)
print("Done")
| with open('.\\DARKCPU\\DARKCPU.bin', 'rb') as input_file:
with open('image.bin', 'wb') as output_file:
while True:
buf_a = inputFile.read(1)
buf_b = inputFile.read(1)
if bufA == '' or bufB == '':
break
outputFile.write(bufB)
outputFile.write(bufA)
print('Done') |
# problem description can be added if required
n = int(input())
hou = [int(i) for i in input().split()]
p = int(input())
for i in range(p):
a, b = [int(i) for i in input().split()]
print(sum(hou[a - 1:b])) # sum was to be including both the 'a'th and 'b'th index
| n = int(input())
hou = [int(i) for i in input().split()]
p = int(input())
for i in range(p):
(a, b) = [int(i) for i in input().split()]
print(sum(hou[a - 1:b])) |
''' Base Class method Proxy'''
#method 1, not recommand!
class A:
def spam(self, x):
pass
def foo(self):
pass
class B:
def __init__(self):
self._a = A()
def spam(self, x):
# Delegate to the internal self._a instance
return self._a.spam(x)
def foo(self):
# Delegate to the internal self._a instance
return self._a.foo()
def bar(self):
pass
#method 2, better
class A:
def spam(self, x):
pass
def foo(self):
pass
class B:
def __init__(self):
self._a = A()
def bar(self):
pass
#Expose all of the methods defined on Class A,like virtual method fields filled
def __getattr__(self, item):
return getattr( self._a, item )
#method 3, common Proxy
# A proxy class that wraps around another object, but
# exposes its public attributes
class Proxy:
def __init__(self, obj):
self._obj = obj
# Delegate attribute lookup to internal obj
def __getattr__(self, name):
print('getattr:', name)
return getattr(self._obj, name)
# Delegate attribute assignment
def __setattr__(self, name, value):
if name.startswith('_'):
super().__setattr__(name, value)
else:
print('setattr:', name, value)
setattr(self._obj, name, value)
# Delegate attribute deletion
def __delattr__(self, name):
if name.startswith('_'):
super().__delattr__(name)
else:
print('delattr:', name)
delattr(self._obj, name)
class Spam:
def __init__(self, x):
self.x = x
def bar(self, y):
print('Spam.bar:', self.x, y)
# Create an instance
s = Spam(2)
# Create a proxy around it
p = Proxy(s)
# Access the proxy
print(p.x) # Outputs 2
p.bar(3) # Outputs "Spam.bar: 2 3"
p.x = 37 # Changes s.x to 37
#Example for ListLike
'''TODO:: All functions starts with __ must defined by hand~~'''
class ListLike:
def __init__(self):
self._items = []
def __getattr__(self, name):
return getattr(self._items, name)
# Added special methods to support certain list operations
def __len__(self):
return len(self._items)
def __getitem__(self, index):
return self._items[index]
def __setitem__(self, index, value):
self._items[index] = value
def __delitem__(self, index):
del self._items[index] | """ Base Class method Proxy"""
class A:
def spam(self, x):
pass
def foo(self):
pass
class B:
def __init__(self):
self._a = a()
def spam(self, x):
return self._a.spam(x)
def foo(self):
return self._a.foo()
def bar(self):
pass
class A:
def spam(self, x):
pass
def foo(self):
pass
class B:
def __init__(self):
self._a = a()
def bar(self):
pass
def __getattr__(self, item):
return getattr(self._a, item)
class Proxy:
def __init__(self, obj):
self._obj = obj
def __getattr__(self, name):
print('getattr:', name)
return getattr(self._obj, name)
def __setattr__(self, name, value):
if name.startswith('_'):
super().__setattr__(name, value)
else:
print('setattr:', name, value)
setattr(self._obj, name, value)
def __delattr__(self, name):
if name.startswith('_'):
super().__delattr__(name)
else:
print('delattr:', name)
delattr(self._obj, name)
class Spam:
def __init__(self, x):
self.x = x
def bar(self, y):
print('Spam.bar:', self.x, y)
s = spam(2)
p = proxy(s)
print(p.x)
p.bar(3)
p.x = 37
'TODO:: All functions starts with __ must defined by hand~~'
class Listlike:
def __init__(self):
self._items = []
def __getattr__(self, name):
return getattr(self._items, name)
def __len__(self):
return len(self._items)
def __getitem__(self, index):
return self._items[index]
def __setitem__(self, index, value):
self._items[index] = value
def __delitem__(self, index):
del self._items[index] |
class Customer:
def __init__(self, customer_id, first, last, email, address, city, state, zip_code, phone):
self.id = customer_id
self.first = first
self.last = last
self.email = email
self.address = address
self.city = city
self.state = state
self.zip = zip_code
self.phone = phone
def as_dict(self):
return vars(self)
| class Customer:
def __init__(self, customer_id, first, last, email, address, city, state, zip_code, phone):
self.id = customer_id
self.first = first
self.last = last
self.email = email
self.address = address
self.city = city
self.state = state
self.zip = zip_code
self.phone = phone
def as_dict(self):
return vars(self) |
def solution(x):
answer = True
temp = 0
copy = x
while copy != 0:
r = copy % 10
copy //= 10
temp += r
if x % temp != 0:
answer = False
return answer
print(solution(13)) | def solution(x):
answer = True
temp = 0
copy = x
while copy != 0:
r = copy % 10
copy //= 10
temp += r
if x % temp != 0:
answer = False
return answer
print(solution(13)) |
input = '''10 3 15 10 5 15 5 15 9 2 5 8 5 2 3 6'''
memory = [int(x) for x in input.split('\t')]
memory_status = []
def update_memoery(memory):
highest_bank = max(memory)
highest_index = memory.index(highest_bank)
memory[highest_index] = 0
i = 0
while i < highest_bank:
memory[(highest_index + i + 1) % len(memory)] += 1
i += 1
return tuple(memory)
def find_steps(memory):
steps = 0
memory_history = [tuple(memory)]
#while memory not in memory_status:
while True:
new_memory = update_memoery(memory)
steps += 1
if new_memory in memory_history:
break
else:
memory_history.append(new_memory)
return steps
if __name__ == '__main__':
print(find_steps(memory))
| input = '10\t3\t15\t10\t5\t15\t5\t15\t9\t2\t5\t8\t5\t2\t3\t6'
memory = [int(x) for x in input.split('\t')]
memory_status = []
def update_memoery(memory):
highest_bank = max(memory)
highest_index = memory.index(highest_bank)
memory[highest_index] = 0
i = 0
while i < highest_bank:
memory[(highest_index + i + 1) % len(memory)] += 1
i += 1
return tuple(memory)
def find_steps(memory):
steps = 0
memory_history = [tuple(memory)]
while True:
new_memory = update_memoery(memory)
steps += 1
if new_memory in memory_history:
break
else:
memory_history.append(new_memory)
return steps
if __name__ == '__main__':
print(find_steps(memory)) |
for _ in range(int(input())):
n,x = [int(x) for x in input().split()]
dp = {}
s = input()
dp[x] = 1
for i in s:
if(i == "R"): x += 1
else:x -= 1
if(not dp.get(x)):dp[x] = 1
print(len(dp)) | for _ in range(int(input())):
(n, x) = [int(x) for x in input().split()]
dp = {}
s = input()
dp[x] = 1
for i in s:
if i == 'R':
x += 1
else:
x -= 1
if not dp.get(x):
dp[x] = 1
print(len(dp)) |
def median(array):
array = sorted(array)
if len(array) % 2 == 0:
return (array[(len(array) - 1) // 2] + array[len(array) // 2]) / 2
else:
return array[len(array) // 2]
| def median(array):
array = sorted(array)
if len(array) % 2 == 0:
return (array[(len(array) - 1) // 2] + array[len(array) // 2]) / 2
else:
return array[len(array) // 2] |
# Copyright 2019 VMware, Inc.
# SPDX-License-Identifier: BSD-2-Clause
class PrePostProcessor(object):
def pre_process(self, data):
type(self)
return data
def post_process(self, data):
type(self)
return data
| class Prepostprocessor(object):
def pre_process(self, data):
type(self)
return data
def post_process(self, data):
type(self)
return data |
def find_digits(digits1, digits2, digit_quantity_to_find):
print('Inputs:')
print('\tdigits1 = %s' % (digits1))
print('\tdigits2 = %s' % (digits2))
print('\tdigit_quantity_to_find = %d' % (digit_quantity_to_find))
digit_count_by_input = [len(digits1), len(digits2)]
positions_by_digit_input = [[[], []] for _ in range(10)]
for i in range(digit_count_by_input[0]):
positions_by_digit_input[digits1[i]][0].append(digit_count_by_input[0] - i - 1)
for i in range(digit_count_by_input[1]):
positions_by_digit_input[digits2[i]][1].append(digit_count_by_input[1] - i - 1)
digits_found = []
digit_quantity_left_to_find = digit_quantity_to_find
digit_quantity_remaining_by_input = list(digit_count_by_input)
# Search for the greatest available digit, given the constraint that a
# digit can't be chosen if its selection would result in too few digits
# remaining to construct a number of the specified length. If multiple
# candidates are found for the greatest digit, choose the one that is
# furthest to the left in the input list, since its selection maximizes
# the number of remaining digits for consideration in subsequent
# positions. If no candidates are found for the search digit, try again
# using the next greatest digit. If a digit is found, for the next
# position, start a new search using the greatest digit again.
search_digit = 9
while digit_quantity_left_to_find > 0:
print('digits_found = %s, digit_quantity_left_to_find = %d, search_digit = %d' % (digits_found, digit_quantity_left_to_find, search_digit))
print('digit_quantity_remaining_by_input = %s' % (digit_quantity_remaining_by_input))
final_candidates = [-1, -1]
winner_index = -1
for i in range(2):
positions = positions_by_digit_input[search_digit][i]
print('Step 0: positions_by_digit_input[%d][%d] = %s' % (search_digit, i, positions))
# Remove digits whose positions have already been passed. These
# cannot be used now or in subsequent positions, so permanently
# eliminate them from consideration.
while len(positions) > 0 and positions[0] >= digit_quantity_remaining_by_input[i]:
del positions[0]
print('Step 1: positions_by_digit_input[%d][%d] = %s' % (search_digit, i, positions))
# Filter out digits that, if chosen, would not leave enough
# remaining digits to construct a number of the specified length.
# These digits may be needed in subsequent positions, so just
# eliminate them from consideration for now.
candidates = list(positions)
min_remaining_digits_in_list = digit_quantity_left_to_find - digit_quantity_remaining_by_input[(i + 1) % 2]
candidates = [positions[j] for j in range(len(positions)) if positions[j] + 1 >= min_remaining_digits_in_list]
print('Step 2: positions = %s' % (positions))
# Given how the position list was initially built, elements that
# are further to the left after filtering correspond to digits
# that are further to the left in the input list. Hence, choose
# the first element of the list, if any, as this will maximize the
# number of remaining digits for consideration in subsequent
# positions.
if len(candidates) > 0:
final_candidates[i] = candidates[0]
winner_index = i
print('Step 3: final_candidates = %s, winner_index = %d' % (final_candidates, winner_index))
# If a candidate was chosen from both lists, one must now be chosen as
# the winner. The best candidate is the one belonging to a list whose
# remaining digits include a digit greater than the candidate digit.
# If this is is the situation for both candidates, then the candidate
# with the nearest greater digit is best.
if final_candidates[0] != -1 and final_candidates[1] != -1:
shortest_distances = [0, 0]
for i in range(2):
for j in range(digit_count_by_input[i] - final_candidates[i], digit_count_by_input[i]):
print(i, digit_count_by_input[i], digit_quantity_remaining_by_input[i], j)
if (digits1, digits2)[i][j] > search_digit:
shortest_distances[i] = final_candidates[i] - j
break
winner_index = (0, 1)[shortest_distances[0] < shortest_distances[1]]
print('Step 4: final_candidates = %s, winner_index = %d' % (final_candidates, winner_index))
if winner_index != -1:
digit_quantity_left_to_find -= 1
digit_quantity_remaining_by_input[winner_index] = final_candidates[winner_index]
digits_found.append(search_digit)
search_digit = 9
else:
search_digit -= 1
print('Output:\t%s' % (digits_found))
return digits_found
if __name__ == '__main__':
print(find_digits([3, 4, 6, 5], [9, 1, 2, 5, 8, 3], 5))
print(find_digits([6, 7], [6, 0, 4], 5))
print(find_digits([3, 9], [8, 9], 3))
print(find_digits([1,1,1,9,1], [1,1,9,1,1], 6))
print(find_digits([1,1,1,9,1,0,0], [1,1,9,1,1,0,0], 10))
print(find_digits([1,1,1,9,1,9,1], [1,1,9,1,1,9,1], 10))
print(find_digits([6, 7], [6, 0, 8], 5))
print(find_digits([6, 7], [6, 7, 8], 5))
| def find_digits(digits1, digits2, digit_quantity_to_find):
print('Inputs:')
print('\tdigits1 = %s' % digits1)
print('\tdigits2 = %s' % digits2)
print('\tdigit_quantity_to_find = %d' % digit_quantity_to_find)
digit_count_by_input = [len(digits1), len(digits2)]
positions_by_digit_input = [[[], []] for _ in range(10)]
for i in range(digit_count_by_input[0]):
positions_by_digit_input[digits1[i]][0].append(digit_count_by_input[0] - i - 1)
for i in range(digit_count_by_input[1]):
positions_by_digit_input[digits2[i]][1].append(digit_count_by_input[1] - i - 1)
digits_found = []
digit_quantity_left_to_find = digit_quantity_to_find
digit_quantity_remaining_by_input = list(digit_count_by_input)
search_digit = 9
while digit_quantity_left_to_find > 0:
print('digits_found = %s, digit_quantity_left_to_find = %d, search_digit = %d' % (digits_found, digit_quantity_left_to_find, search_digit))
print('digit_quantity_remaining_by_input = %s' % digit_quantity_remaining_by_input)
final_candidates = [-1, -1]
winner_index = -1
for i in range(2):
positions = positions_by_digit_input[search_digit][i]
print('Step 0: positions_by_digit_input[%d][%d] = %s' % (search_digit, i, positions))
while len(positions) > 0 and positions[0] >= digit_quantity_remaining_by_input[i]:
del positions[0]
print('Step 1: positions_by_digit_input[%d][%d] = %s' % (search_digit, i, positions))
candidates = list(positions)
min_remaining_digits_in_list = digit_quantity_left_to_find - digit_quantity_remaining_by_input[(i + 1) % 2]
candidates = [positions[j] for j in range(len(positions)) if positions[j] + 1 >= min_remaining_digits_in_list]
print('Step 2: positions = %s' % positions)
if len(candidates) > 0:
final_candidates[i] = candidates[0]
winner_index = i
print('Step 3: final_candidates = %s, winner_index = %d' % (final_candidates, winner_index))
if final_candidates[0] != -1 and final_candidates[1] != -1:
shortest_distances = [0, 0]
for i in range(2):
for j in range(digit_count_by_input[i] - final_candidates[i], digit_count_by_input[i]):
print(i, digit_count_by_input[i], digit_quantity_remaining_by_input[i], j)
if (digits1, digits2)[i][j] > search_digit:
shortest_distances[i] = final_candidates[i] - j
break
winner_index = (0, 1)[shortest_distances[0] < shortest_distances[1]]
print('Step 4: final_candidates = %s, winner_index = %d' % (final_candidates, winner_index))
if winner_index != -1:
digit_quantity_left_to_find -= 1
digit_quantity_remaining_by_input[winner_index] = final_candidates[winner_index]
digits_found.append(search_digit)
search_digit = 9
else:
search_digit -= 1
print('Output:\t%s' % digits_found)
return digits_found
if __name__ == '__main__':
print(find_digits([3, 4, 6, 5], [9, 1, 2, 5, 8, 3], 5))
print(find_digits([6, 7], [6, 0, 4], 5))
print(find_digits([3, 9], [8, 9], 3))
print(find_digits([1, 1, 1, 9, 1], [1, 1, 9, 1, 1], 6))
print(find_digits([1, 1, 1, 9, 1, 0, 0], [1, 1, 9, 1, 1, 0, 0], 10))
print(find_digits([1, 1, 1, 9, 1, 9, 1], [1, 1, 9, 1, 1, 9, 1], 10))
print(find_digits([6, 7], [6, 0, 8], 5))
print(find_digits([6, 7], [6, 7, 8], 5)) |
# (c) 2012 Urban Airship and Contributors
__version__ = (0, 2, 0)
class RequestIPStorage(object):
def __init__(self):
self.ip = None
def set(self, ip):
self.ip = ip
def get(self):
return self.ip
_request_ip_storage = RequestIPStorage()
get_current_ip = _request_ip_storage.get
set_current_ip = _request_ip_storage.set
| __version__ = (0, 2, 0)
class Requestipstorage(object):
def __init__(self):
self.ip = None
def set(self, ip):
self.ip = ip
def get(self):
return self.ip
_request_ip_storage = request_ip_storage()
get_current_ip = _request_ip_storage.get
set_current_ip = _request_ip_storage.set |
def sum_of_squares(value):
sum = 0
for _ in range(value + 1):
sum = sum + _ ** 2
return sum
def summed_squares(value):
sum = 0
for _ in range(value + 1):
sum += _
return sum ** 2
print(summed_squares(100) - sum_of_squares(100)) | def sum_of_squares(value):
sum = 0
for _ in range(value + 1):
sum = sum + _ ** 2
return sum
def summed_squares(value):
sum = 0
for _ in range(value + 1):
sum += _
return sum ** 2
print(summed_squares(100) - sum_of_squares(100)) |
# Part 1
data = data.split("\r\n\r\n")
nums = list(map(int, data[0].split(",")))
boards = []
for k in data[1:]:
boards.append([])
for j in k.splitlines():
boards[-1].append(list(map(int, j.split())))
for num in nums:
for board in boards:
for row in board:
for i in range(len(row)):
if row[i] == num:
row[i] = None
if any(all(x == None for x in row) for row in board) or any(all(row[i] == None for row in board) for i in range(len(board[0]))):
print(sum(x or 0 for row in board for x in row) * num)
exit(0)
# Part 2
data = data.split("\r\n\r\n")
nums = list(map(int, data[0].split(",")))
boards = []
for k in data[1:]:
boards.append([])
for j in k.splitlines():
boards[-1].append(list(map(int, j.split())))
lb = None
for num in nums:
bi = 0
while bi < len(boards):
board = boards[bi]
for row in board:
for i in range(len(row)):
if row[i] == num:
row[i] = None
if any(all(x == None for x in row) for row in board) or any(all(row[i] == None for row in board) for i in range(len(board[0]))):
lb = board
del boards[bi]
else:
bi += 1
if len(boards) == 0:
break
print(sum(x or 0 for row in lb for x in row) * num)
| data = data.split('\r\n\r\n')
nums = list(map(int, data[0].split(',')))
boards = []
for k in data[1:]:
boards.append([])
for j in k.splitlines():
boards[-1].append(list(map(int, j.split())))
for num in nums:
for board in boards:
for row in board:
for i in range(len(row)):
if row[i] == num:
row[i] = None
if any((all((x == None for x in row)) for row in board)) or any((all((row[i] == None for row in board)) for i in range(len(board[0])))):
print(sum((x or 0 for row in board for x in row)) * num)
exit(0)
data = data.split('\r\n\r\n')
nums = list(map(int, data[0].split(',')))
boards = []
for k in data[1:]:
boards.append([])
for j in k.splitlines():
boards[-1].append(list(map(int, j.split())))
lb = None
for num in nums:
bi = 0
while bi < len(boards):
board = boards[bi]
for row in board:
for i in range(len(row)):
if row[i] == num:
row[i] = None
if any((all((x == None for x in row)) for row in board)) or any((all((row[i] == None for row in board)) for i in range(len(board[0])))):
lb = board
del boards[bi]
else:
bi += 1
if len(boards) == 0:
break
print(sum((x or 0 for row in lb for x in row)) * num) |
def test_000_a_test_can_pass():
print("This test should always pass!")
assert True
def test_001_can_see_the_internet(selenium):
selenium.get('http://www.example.com')
| def test_000_a_test_can_pass():
print('This test should always pass!')
assert True
def test_001_can_see_the_internet(selenium):
selenium.get('http://www.example.com') |
f = open("shaam.txt")
# tell() tell the position of our f pointer
# print(f.readline())
# print(f.tell())
# print(f.readline())
# print(f.tell())
# seek() point the pointer to given index
f.seek(5)
print(f.readline())
f.close() | f = open('shaam.txt')
f.seek(5)
print(f.readline())
f.close() |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.