content
stringlengths 7
1.05M
| fixed_cases
stringlengths 1
1.28M
|
---|---|
def extract_coupon(description):
coupon = ''
for s in range(len(description)):
if description[s].isnumeric() or description[s] == '.':
coupon = coupon + description[s]
#print(c)
if description[s] == '%':
break
try:
float(coupon)
except:
coupon = coupon[1:]
float(coupon)
return coupon | def extract_coupon(description):
coupon = ''
for s in range(len(description)):
if description[s].isnumeric() or description[s] == '.':
coupon = coupon + description[s]
if description[s] == '%':
break
try:
float(coupon)
except:
coupon = coupon[1:]
float(coupon)
return coupon |
key = [int(num) for num in input().split()]
data = input()
length = len(key)
results_dict = {}
while not data == 'find':
message = ""
counter = 0
for el in data:
if counter == length:
counter = 0
asc = ord(el)
asc -= key[counter]
ord_asc = chr(asc)
message += ord_asc
counter += 1
find_item = message.find('&')
find_position = message.find('<')
type_found = ""
coordinates = ""
for sym in range(find_item + 1, len(message) + 1):
if message[sym] == "&":
break
type_found += message[sym]
for sym in range(find_position + 1, len(message) + 1):
if message[sym] == ">":
break
coordinates += message[sym]
if type_found not in results_dict:
results_dict[type_found] = coordinates
data = input()
for item, numbers in results_dict.items():
print(f"Found {item} at {numbers}")
| key = [int(num) for num in input().split()]
data = input()
length = len(key)
results_dict = {}
while not data == 'find':
message = ''
counter = 0
for el in data:
if counter == length:
counter = 0
asc = ord(el)
asc -= key[counter]
ord_asc = chr(asc)
message += ord_asc
counter += 1
find_item = message.find('&')
find_position = message.find('<')
type_found = ''
coordinates = ''
for sym in range(find_item + 1, len(message) + 1):
if message[sym] == '&':
break
type_found += message[sym]
for sym in range(find_position + 1, len(message) + 1):
if message[sym] == '>':
break
coordinates += message[sym]
if type_found not in results_dict:
results_dict[type_found] = coordinates
data = input()
for (item, numbers) in results_dict.items():
print(f'Found {item} at {numbers}') |
# use the with key word to open file ass mb_object
with open("mbox-short.txt", "r") as mb_object:
# Iterate over each line and remove leading spaces;
# print contents after converting them to uppercase
for line in mb_object:
line = line.strip()
print(line.upper()) | with open('mbox-short.txt', 'r') as mb_object:
for line in mb_object:
line = line.strip()
print(line.upper()) |
################
# First class functions allow us to treat functions as any other variables or objects
# Closures are functions that are local inner functions within outer functions that remember the arguments passed to the outer functions
#################
def square(x):
return x*x
def my_map_function(func , arg_list):
result = []
for item in arg_list:
result.append(func(item))
return result
int_array = [1,2,3,4,5]
f = my_map_function(square , int_array)
#print(f)
#print(my_map_function(square , int_array))
def logger(msg):
def log_message():
print('Log:' , msg)
return log_message
log_hi = logger('Hi')
log_hi()
#Closure Example
def my_log(msg):
def logging(*args):
print('Log Message {} , Logging Message {} '.format(msg , args))
return logging
log_hi = my_log('Console 1')
log_hi('Hi')
| def square(x):
return x * x
def my_map_function(func, arg_list):
result = []
for item in arg_list:
result.append(func(item))
return result
int_array = [1, 2, 3, 4, 5]
f = my_map_function(square, int_array)
def logger(msg):
def log_message():
print('Log:', msg)
return log_message
log_hi = logger('Hi')
log_hi()
def my_log(msg):
def logging(*args):
print('Log Message {} , Logging Message {} '.format(msg, args))
return logging
log_hi = my_log('Console 1')
log_hi('Hi') |
class AbstractPlayer:
def __init__(self):
raise NotImplementedError()
def explain(self, word, n_words):
raise NotImplementedError()
def guess(self, words, n_words):
raise NotImplementedError()
class LocalDummyPlayer(AbstractPlayer):
def __init__(self):
pass
def explain(self, word, n_words):
return "Hi! My name is LocalDummyPlayer! What's yours?".split()[:n_words]
def guess(self, words, n_words):
return "I guess it's a word, but don't have any idea which one!".split()[:n_words]
class LocalFasttextPlayer(AbstractPlayer):
def __init__(self, model):
self.model = model
def find_words_for_sentence(self, sentence, n_closest):
neighbours = self.model.get_nearest_neighbors(sentence)
words = [word for similariry, word in neighbours][:n_closest]
return words
def explain(self, word, n_words):
return self.find_words_for_sentence(word, n_words)
def guess(self, words, n_words):
words_for_sentence = self.find_words_for_sentence(" ".join(words), n_words)
return words_for_sentence
| class Abstractplayer:
def __init__(self):
raise not_implemented_error()
def explain(self, word, n_words):
raise not_implemented_error()
def guess(self, words, n_words):
raise not_implemented_error()
class Localdummyplayer(AbstractPlayer):
def __init__(self):
pass
def explain(self, word, n_words):
return "Hi! My name is LocalDummyPlayer! What's yours?".split()[:n_words]
def guess(self, words, n_words):
return "I guess it's a word, but don't have any idea which one!".split()[:n_words]
class Localfasttextplayer(AbstractPlayer):
def __init__(self, model):
self.model = model
def find_words_for_sentence(self, sentence, n_closest):
neighbours = self.model.get_nearest_neighbors(sentence)
words = [word for (similariry, word) in neighbours][:n_closest]
return words
def explain(self, word, n_words):
return self.find_words_for_sentence(word, n_words)
def guess(self, words, n_words):
words_for_sentence = self.find_words_for_sentence(' '.join(words), n_words)
return words_for_sentence |
# Acesso as elementos da tupla
numeros = 1,2,3,5,7,11
print(numeros[0])
print(numeros[1])
print(numeros[2])
print(numeros[3])
print(numeros[4])
print(numeros[5]) | numeros = (1, 2, 3, 5, 7, 11)
print(numeros[0])
print(numeros[1])
print(numeros[2])
print(numeros[3])
print(numeros[4])
print(numeros[5]) |
__title__ = 'contactTree-api'
__package_name = 'contactTree-api'
__version__ = '0.1.0'
__description__ = ''
__author__ = 'Dionisis Pettas'
__email__ = ''
__github__ = 'https://github.com/deepettas/contact-tree'
__licence__ = 'MIT' | __title__ = 'contactTree-api'
__package_name = 'contactTree-api'
__version__ = '0.1.0'
__description__ = ''
__author__ = 'Dionisis Pettas'
__email__ = ''
__github__ = 'https://github.com/deepettas/contact-tree'
__licence__ = 'MIT' |
def add_native_methods(clazz):
def nOpen__int__(a0, a1):
raise NotImplementedError()
def nClose__long__(a0, a1):
raise NotImplementedError()
def nSendShortMessage__long__int__long__(a0, a1, a2, a3):
raise NotImplementedError()
def nSendLongMessage__long__byte____int__long__(a0, a1, a2, a3, a4):
raise NotImplementedError()
def nGetTimeStamp__long__(a0, a1):
raise NotImplementedError()
clazz.nOpen__int__ = nOpen__int__
clazz.nClose__long__ = nClose__long__
clazz.nSendShortMessage__long__int__long__ = nSendShortMessage__long__int__long__
clazz.nSendLongMessage__long__byte____int__long__ = nSendLongMessage__long__byte____int__long__
clazz.nGetTimeStamp__long__ = nGetTimeStamp__long__
| def add_native_methods(clazz):
def n_open__int__(a0, a1):
raise not_implemented_error()
def n_close__long__(a0, a1):
raise not_implemented_error()
def n_send_short_message__long__int__long__(a0, a1, a2, a3):
raise not_implemented_error()
def n_send_long_message__long__byte____int__long__(a0, a1, a2, a3, a4):
raise not_implemented_error()
def n_get_time_stamp__long__(a0, a1):
raise not_implemented_error()
clazz.nOpen__int__ = nOpen__int__
clazz.nClose__long__ = nClose__long__
clazz.nSendShortMessage__long__int__long__ = nSendShortMessage__long__int__long__
clazz.nSendLongMessage__long__byte____int__long__ = nSendLongMessage__long__byte____int__long__
clazz.nGetTimeStamp__long__ = nGetTimeStamp__long__ |
i = 4 # variation on testWhile.py
while (i < 9):
i = i+2
print(i)
| i = 4
while i < 9:
i = i + 2
print(i) |
class RelayOutput:
def enable_relay(self, name: str):
pass
def reset(self):
pass
| class Relayoutput:
def enable_relay(self, name: str):
pass
def reset(self):
pass |
'''
Create a tuple with some words. Show for each word its vowels.
'''
vowels = ('a', 'e', 'i', 'o', 'u')
words = (
'Learn', 'Programming', 'Language', 'Python', 'Course', 'Free',
'Study', 'Practice', 'Work', 'Market', 'Programmer', 'Future'
)
for word in words:
print(f'\nThe word \033[34m{word}\033[m contains', end=' -> ')
for letter in word:
if letter in vowels:
print(f'\033[32m{letter}\033[m', end=' ')
| """
Create a tuple with some words. Show for each word its vowels.
"""
vowels = ('a', 'e', 'i', 'o', 'u')
words = ('Learn', 'Programming', 'Language', 'Python', 'Course', 'Free', 'Study', 'Practice', 'Work', 'Market', 'Programmer', 'Future')
for word in words:
print(f'\nThe word \x1b[34m{word}\x1b[m contains', end=' -> ')
for letter in word:
if letter in vowels:
print(f'\x1b[32m{letter}\x1b[m', end=' ') |
f = open('surf.txt')
maior = 0
for linha in f:
nome, pontos = linha.split()
if float(pontos) > maior:
maior = float(pontos)
f.close()
print (maior)
| f = open('surf.txt')
maior = 0
for linha in f:
(nome, pontos) = linha.split()
if float(pontos) > maior:
maior = float(pontos)
f.close()
print(maior) |
'''https://leetcode.com/problems/palindrome-linked-list/'''
# Definition for singly-linked list.
# class ListNode:
# def __init__(self, x):
# self.val = x
# self.next = None
# Solution 1
# Time Complexity - O(n)
# Space Complexity - O(n)
class Solution:
def isPalindrome(self, head: ListNode) -> bool:
s = []
while head:
s+= [head.val]
head = head.next
return s==s[::-1]
# Solution 1
# Time Complexity - O(n)
# Space Complexity - O(1)
class Solution:
def isPalindrome(self, head: ListNode) -> bool:
#find mid element
slow = fast = head
while fast and fast.next:
slow = slow.next
fast = fast.next.next
#reverse second half
prev = None #will store the reversed array
while slow:
nxt = slow.next
slow.next = prev
prev = slow
slow = nxt
#compare first half and reversed second half
while head and prev:
if prev.val != head.val:
return False
head = head.next
prev = prev.next
return True
| """https://leetcode.com/problems/palindrome-linked-list/"""
class Solution:
def is_palindrome(self, head: ListNode) -> bool:
s = []
while head:
s += [head.val]
head = head.next
return s == s[::-1]
class Solution:
def is_palindrome(self, head: ListNode) -> bool:
slow = fast = head
while fast and fast.next:
slow = slow.next
fast = fast.next.next
prev = None
while slow:
nxt = slow.next
slow.next = prev
prev = slow
slow = nxt
while head and prev:
if prev.val != head.val:
return False
head = head.next
prev = prev.next
return True |
def calculate(**kwargs):
operation_lookup = {
'add': kwargs.get('first', 0) + kwargs.get('second', 0),
'subtract': kwargs.get('first', 0) - kwargs.get('second', 0),
'divide': kwargs.get('first', 0) / kwargs.get('second', 1),
'multiply': kwargs.get('first', 0) * kwargs.get('second', 0)
}
is_float = kwargs.get('make_float', False)
operation_value = operation_lookup[kwargs.get('operation', '')]
if is_float:
final = "{} {}".format(kwargs.get(
'message', 'The result is'), float(operation_value))
else:
final = "{} {}".format(kwargs.get(
'message', 'the result is'), int(operation_value))
return final
# print(calculate(make_float=False, operation='add', message='You just added',
# first=2, second=4))
# "You just added 6"
# print(calculate(make_float=True, operation='divide',
# first=3.5, second=5))
# "The result is 0.7"
def greet_boss(employee = None, boss = None):
print(f"{employee} greets {boss}")
names = {"boss": "Bob", "employee": "Colt"}
greet_boss()
greet_boss(**names)
cube = lambda num: num**3
print(cube(2))
print(cube(3))
print(cube(8)) | def calculate(**kwargs):
operation_lookup = {'add': kwargs.get('first', 0) + kwargs.get('second', 0), 'subtract': kwargs.get('first', 0) - kwargs.get('second', 0), 'divide': kwargs.get('first', 0) / kwargs.get('second', 1), 'multiply': kwargs.get('first', 0) * kwargs.get('second', 0)}
is_float = kwargs.get('make_float', False)
operation_value = operation_lookup[kwargs.get('operation', '')]
if is_float:
final = '{} {}'.format(kwargs.get('message', 'The result is'), float(operation_value))
else:
final = '{} {}'.format(kwargs.get('message', 'the result is'), int(operation_value))
return final
def greet_boss(employee=None, boss=None):
print(f'{employee} greets {boss}')
names = {'boss': 'Bob', 'employee': 'Colt'}
greet_boss()
greet_boss(**names)
cube = lambda num: num ** 3
print(cube(2))
print(cube(3))
print(cube(8)) |
# ---------------------------------------------------------------------------------------
#
# Title: Permutations
#
# Link: https://leetcode.com/problems/permutations/
#
# Difficulty: Medium
#
# Language: Python
#
# ---------------------------------------------------------------------------------------
class Permutations:
def permute(self, nums):
return self.phelper(nums, [], [])
def phelper(self, nums, x, y):
for i in nums:
if i not in x:
x.append(i)
if len(x) == len(nums):
y.append(x.copy())
else:
y = self.phelper(nums,x,y)
del x[len(x)-1]
return y
if __name__ == "__main__":
p = [1,2,3]
z = Permutations()
print( z.permute(p) )
| class Permutations:
def permute(self, nums):
return self.phelper(nums, [], [])
def phelper(self, nums, x, y):
for i in nums:
if i not in x:
x.append(i)
if len(x) == len(nums):
y.append(x.copy())
else:
y = self.phelper(nums, x, y)
del x[len(x) - 1]
return y
if __name__ == '__main__':
p = [1, 2, 3]
z = permutations()
print(z.permute(p)) |
'''
modifier: 01
eqtime: 25
'''
def main():
info('Jan Air Script x1')
gosub('jan:WaitForMiniboneAccess')
gosub('jan:PrepareForAirShot')
gosub('jan:EvacPipette2')
gosub('common:FillPipette2')
gosub('jan:PrepareForAirShotExpansion')
gosub('common:ExpandPipette2')
| """
modifier: 01
eqtime: 25
"""
def main():
info('Jan Air Script x1')
gosub('jan:WaitForMiniboneAccess')
gosub('jan:PrepareForAirShot')
gosub('jan:EvacPipette2')
gosub('common:FillPipette2')
gosub('jan:PrepareForAirShotExpansion')
gosub('common:ExpandPipette2') |
def SaveOrder(orderDict):
file = open("orderLog.txt", 'w')
total = 0
for item, price in orderDict.items():
file.write(item+'-->'+str(price)+'\n')
total += price
file.write('Total = '+str(total))
file.close()
def main():
order = {
'Pizza':100,
'Snaks':200,
'Pasta':500,
'Coke' :50
}
SaveOrder(order)
print("Log successfully added")
main()
| def save_order(orderDict):
file = open('orderLog.txt', 'w')
total = 0
for (item, price) in orderDict.items():
file.write(item + '-->' + str(price) + '\n')
total += price
file.write('Total = ' + str(total))
file.close()
def main():
order = {'Pizza': 100, 'Snaks': 200, 'Pasta': 500, 'Coke': 50}
save_order(order)
print('Log successfully added')
main() |
# Generator A starts with 783
# Generator B starts with 325
REAL_START=[783, 325]
SAMPLE_START=[65, 8921]
FACTORS=[16807, 48271]
DIVISOR=2147483647 # 0b1111111111111111111111111111111 2^31
def next_a_value(val, factor):
while True:
val = (val * factor) % DIVISOR
if val & 3 == 0:
return val
def next_b_value(val, factor):
while True:
val = (val * factor) % DIVISOR
if val & 7 == 0:
return val
def calc_16_bit_matches(times, start):
matches = 0
a, b = start
for i in range(times):
a = next_a_value(a, FACTORS[0])
b = next_b_value(b, FACTORS[1])
if a & 0b1111111111111111 == b & 0b1111111111111111:
matches +=1
return matches
print(calc_16_bit_matches(5_000_000, REAL_START)) # 336
| real_start = [783, 325]
sample_start = [65, 8921]
factors = [16807, 48271]
divisor = 2147483647
def next_a_value(val, factor):
while True:
val = val * factor % DIVISOR
if val & 3 == 0:
return val
def next_b_value(val, factor):
while True:
val = val * factor % DIVISOR
if val & 7 == 0:
return val
def calc_16_bit_matches(times, start):
matches = 0
(a, b) = start
for i in range(times):
a = next_a_value(a, FACTORS[0])
b = next_b_value(b, FACTORS[1])
if a & 65535 == b & 65535:
matches += 1
return matches
print(calc_16_bit_matches(5000000, REAL_START)) |
# -*- coding: utf-8 -*-
class ArgumentTypeError(TypeError):
pass
class ArgumentValueError(ValueError):
pass
| class Argumenttypeerror(TypeError):
pass
class Argumentvalueerror(ValueError):
pass |
# VALIDAR SE A CIDADE DIGITADA INICIA COM O NOME SANTO:
cidade = str(input('Digite a cidade em que nasceu... ')).strip()
print(cidade[:5].upper() == 'SANTO')
| cidade = str(input('Digite a cidade em que nasceu... ')).strip()
print(cidade[:5].upper() == 'SANTO') |
ls = list(map(int, input().split()))
count = 0
for i in ls:
if ls[i] == 1:
count += 1
print(count)
| ls = list(map(int, input().split()))
count = 0
for i in ls:
if ls[i] == 1:
count += 1
print(count) |
def abc(a,b,c):
for i in a:
b(a)
if c():
if b(a) > 100:
b(a)
elif 100 > 0:
b(a)
else:
b(a)
else:
b(100)
return 100
def ex():
try:
fh = open("testfile", "w")
fh.write("a")
except IOError:
print("b")
else:
print("c")
fh.close()
def funa(a):
b = a(3)
def funab(f):
return f(5)
def funac(f):
return f(5)
def funcb(f):
return funab(f)
return funab(b)
def funb():
while 1:
for i in range(10):
if 1:
for j in range(100):
print(j)
return 1
elif 2:
return 2
else:
return 3
def func():
if 1:
for j in range(100):
print(j)
return 1
elif 2:
return 2
else:
return 3
| def abc(a, b, c):
for i in a:
b(a)
if c():
if b(a) > 100:
b(a)
elif 100 > 0:
b(a)
else:
b(a)
else:
b(100)
return 100
def ex():
try:
fh = open('testfile', 'w')
fh.write('a')
except IOError:
print('b')
else:
print('c')
fh.close()
def funa(a):
b = a(3)
def funab(f):
return f(5)
def funac(f):
return f(5)
def funcb(f):
return funab(f)
return funab(b)
def funb():
while 1:
for i in range(10):
if 1:
for j in range(100):
print(j)
return 1
elif 2:
return 2
else:
return 3
def func():
if 1:
for j in range(100):
print(j)
return 1
elif 2:
return 2
else:
return 3 |
# 4. Write a Python program to check a list is empty or not. Take few lists with one of them empty.
fruits = ['apple', 'cherry', 'pear', 'lemon', 'banana']
fruits1 = []
fruits2 = ['mango', 'strawberry', 'peach']
# print (fruits[3])
# print (fruits[-2])
# print (fruits[1])
# #
# print (fruits[0])
# print (fruits)
#
# fruits = []
# print (fruits)
fruits. append('apple')
fruits.append('banana')
fruits.append ('pear')
fruits.append('cherry')
print(fruits)
fruits. append('apple')
fruits.append('banana')
fruits.append ('pear')
fruits.append('cherry')
print(fruits)
# #
# print (fruits[0])
# print (fruits2[2])
#
| fruits = ['apple', 'cherry', 'pear', 'lemon', 'banana']
fruits1 = []
fruits2 = ['mango', 'strawberry', 'peach']
fruits.append('apple')
fruits.append('banana')
fruits.append('pear')
fruits.append('cherry')
print(fruits)
fruits.append('apple')
fruits.append('banana')
fruits.append('pear')
fruits.append('cherry')
print(fruits) |
include("common.py")
def cyanamidationGen():
r = RuleGen("Cyanamidation")
r.left.extend([
'# H2NCN',
'edge [ source 0 target 1 label "#" ]',
'# The other',
'edge [ source 105 target 150 label "-" ]',
])
r.context.extend([
'# H2NCN',
'node [ id 0 label "N" ]',
'node [ id 1 label "C" ]',
'node [ id 2 label "N" ]',
'node [ id 3 label "H" ]',
'node [ id 4 label "H" ]',
'edge [ source 2 target 3 label "-" ]',
'edge [ source 2 target 4 label "-" ]',
'edge [ source 1 target 2 label "-" ]',
'# The other',
'node [ id 150 label "H" ]',
])
r.right.extend([
'edge [ source 0 target 1 label "=" ]',
'edge [ source 0 target 150 label "-" ]',
'edge [ source 1 target 105 label "-" ]',
])
rOld = r
for atom in "SN":
r = rOld.clone()
r.name += ", %s" % atom
r.context.extend([
'node [ id 105 label "%s" ]' % atom,
])
if atom == "S":
for end in "CH":
r1 = r.clone()
r1.name += end
r1.context.extend([
'# C or H',
'node [ id 100 label "%s" ]' % end,
'edge [ source 100 target 105 label "-" ]',
])
yield r1.loadRule()
continue
assert atom == "N"
for r in attach_2_H_C(r, 105, 100, True):
yield r.loadRule()
cyanamidation = [a for a in cyanamidationGen()] | include('common.py')
def cyanamidation_gen():
r = rule_gen('Cyanamidation')
r.left.extend(['# H2NCN', 'edge [ source 0 target 1 label "#" ]', '# The other', 'edge [ source 105 target 150 label "-" ]'])
r.context.extend(['# H2NCN', 'node [ id 0 label "N" ]', 'node [ id 1 label "C" ]', 'node [ id 2 label "N" ]', 'node [ id 3 label "H" ]', 'node [ id 4 label "H" ]', 'edge [ source 2 target 3 label "-" ]', 'edge [ source 2 target 4 label "-" ]', 'edge [ source 1 target 2 label "-" ]', '# The other', 'node [ id 150 label "H" ]'])
r.right.extend(['edge [ source 0 target 1 label "=" ]', 'edge [ source 0 target 150 label "-" ]', 'edge [ source 1 target 105 label "-" ]'])
r_old = r
for atom in 'SN':
r = rOld.clone()
r.name += ', %s' % atom
r.context.extend(['node [ id 105 label "%s" ]' % atom])
if atom == 'S':
for end in 'CH':
r1 = r.clone()
r1.name += end
r1.context.extend(['# C or H', 'node [ id 100 label "%s" ]' % end, 'edge [ source 100 target 105 label "-" ]'])
yield r1.loadRule()
continue
assert atom == 'N'
for r in attach_2_h_c(r, 105, 100, True):
yield r.loadRule()
cyanamidation = [a for a in cyanamidation_gen()] |
number = int(input())
divider = number // 2
numbers = ''
while divider != 1:
if 0 == number % divider:
numbers += " " + str(divider)
divider -= 1
if 0 == len(numbers):
print('Prime Number')
else:
print(numbers[1:])
| number = int(input())
divider = number // 2
numbers = ''
while divider != 1:
if 0 == number % divider:
numbers += ' ' + str(divider)
divider -= 1
if 0 == len(numbers):
print('Prime Number')
else:
print(numbers[1:]) |
class Solution:
def XXX(self, nums: List[int]) -> List[List[int]]:
return reduce(lambda x, y: x + [i + [y] for i in x], nums, [[]])
| class Solution:
def xxx(self, nums: List[int]) -> List[List[int]]:
return reduce(lambda x, y: x + [i + [y] for i in x], nums, [[]]) |
HEARTBEAT = "0"
TESTREQUEST = "1"
RESENDREQUEST = "2"
REJECT = "3"
SEQUENCERESET = "4"
LOGOUT = "5"
IOI = "6"
ADVERTISEMENT = "7"
EXECUTIONREPORT = "8"
ORDERCANCELREJECT = "9"
QUOTESTATUSREQUEST = "a"
LOGON = "A"
DERIVATIVESECURITYLIST = "AA"
NEWORDERMULTILEG = "AB"
MULTILEGORDERCANCELREPLACE = "AC"
TRADECAPTUREREPORTREQUEST = "AD"
TRADECAPTUREREPORT = "AE"
ORDERMASSSTATUSREQUEST = "AF"
QUOTEREQUESTREJECT = "AG"
RFQREQUEST = "AH"
QUOTESTATUSREPORT = "AI"
QUOTERESPONSE = "AJ"
CONFIRMATION = "AK"
POSITIONMAINTENANCEREQUEST = "AL"
POSITIONMAINTENANCEREPORT = "AM"
REQUESTFORPOSITIONS = "AN"
REQUESTFORPOSITIONSACK = "AO"
POSITIONREPORT = "AP"
TRADECAPTUREREPORTREQUESTACK = "AQ"
TRADECAPTUREREPORTACK = "AR"
ALLOCATIONREPORT = "AS"
ALLOCATIONREPORTACK = "AT"
CONFIRMATIONACK = "AU"
SETTLEMENTINSTRUCTIONREQUEST = "AV"
ASSIGNMENTREPORT = "AW"
COLLATERALREQUEST = "AX"
COLLATERALASSIGNMENT = "AY"
COLLATERALRESPONSE = "AZ"
NEWS = "B"
MASSQUOTEACKNOWLEDGEMENT = "b"
COLLATERALREPORT = "BA"
COLLATERALINQUIRY = "BB"
NETWORKCOUNTERPARTYSYSTEMSTATUSREQUEST = "BC"
NETWORKCOUNTERPARTYSYSTEMSTATUSRESPONSE = "BD"
USERREQUEST = "BE"
USERRESPONSE = "BF"
COLLATERALINQUIRYACK = "BG"
CONFIRMATIONREQUEST = "BH"
EMAIL = "C"
SECURITYDEFINITIONREQUEST = "c"
SECURITYDEFINITION = "d"
NEWORDERSINGLE = "D"
SECURITYSTATUSREQUEST = "e"
NEWORDERLIST = "E"
ORDERCANCELREQUEST = "F"
SECURITYSTATUS = "f"
ORDERCANCELREPLACEREQUEST = "G"
TRADINGSESSIONSTATUSREQUEST = "g"
ORDERSTATUSREQUEST = "H"
TRADINGSESSIONSTATUS = "h"
MASSQUOTE = "i"
BUSINESSMESSAGEREJECT = "j"
ALLOCATIONINSTRUCTION = "J"
BIDREQUEST = "k"
LISTCANCELREQUEST = "K"
BIDRESPONSE = "l"
LISTEXECUTE = "L"
LISTSTRIKEPRICE = "m"
LISTSTATUSREQUEST = "M"
XMLNONFIX = "n"
LISTSTATUS = "N"
REGISTRATIONINSTRUCTIONS = "o"
REGISTRATIONINSTRUCTIONSRESPONSE = "p"
ALLOCATIONINSTRUCTIONACK = "P"
ORDERMASSCANCELREQUEST = "q"
DONTKNOWTRADEDK = "Q"
QUOTEREQUEST = "R"
ORDERMASSCANCELREPORT = "r"
QUOTE = "S"
NEWORDERCROSS = "s"
SETTLEMENTINSTRUCTIONS = "T"
CROSSORDERCANCELREPLACEREQUEST = "t"
CROSSORDERCANCELREQUEST = "u"
MARKETDATAREQUEST = "V"
SECURITYTYPEREQUEST = "v"
SECURITYTYPES = "w"
MARKETDATASNAPSHOTFULLREFRESH = "W"
SECURITYLISTREQUEST = "x"
MARKETDATAINCREMENTALREFRESH = "X"
MARKETDATAREQUESTREJECT = "Y"
SECURITYLIST = "y"
QUOTECANCEL = "Z"
DERIVATIVESECURITYLISTREQUEST = "z"
sessionMessageTypes = [HEARTBEAT, TESTREQUEST, RESENDREQUEST, REJECT, SEQUENCERESET, LOGOUT, LOGON, XMLNONFIX]
tags = {}
for x in dir():
tags[str(globals()[x])] = x
def msgTypeToName(n):
try:
return tags[n]
except KeyError:
return str(n)
| heartbeat = '0'
testrequest = '1'
resendrequest = '2'
reject = '3'
sequencereset = '4'
logout = '5'
ioi = '6'
advertisement = '7'
executionreport = '8'
ordercancelreject = '9'
quotestatusrequest = 'a'
logon = 'A'
derivativesecuritylist = 'AA'
newordermultileg = 'AB'
multilegordercancelreplace = 'AC'
tradecapturereportrequest = 'AD'
tradecapturereport = 'AE'
ordermassstatusrequest = 'AF'
quoterequestreject = 'AG'
rfqrequest = 'AH'
quotestatusreport = 'AI'
quoteresponse = 'AJ'
confirmation = 'AK'
positionmaintenancerequest = 'AL'
positionmaintenancereport = 'AM'
requestforpositions = 'AN'
requestforpositionsack = 'AO'
positionreport = 'AP'
tradecapturereportrequestack = 'AQ'
tradecapturereportack = 'AR'
allocationreport = 'AS'
allocationreportack = 'AT'
confirmationack = 'AU'
settlementinstructionrequest = 'AV'
assignmentreport = 'AW'
collateralrequest = 'AX'
collateralassignment = 'AY'
collateralresponse = 'AZ'
news = 'B'
massquoteacknowledgement = 'b'
collateralreport = 'BA'
collateralinquiry = 'BB'
networkcounterpartysystemstatusrequest = 'BC'
networkcounterpartysystemstatusresponse = 'BD'
userrequest = 'BE'
userresponse = 'BF'
collateralinquiryack = 'BG'
confirmationrequest = 'BH'
email = 'C'
securitydefinitionrequest = 'c'
securitydefinition = 'd'
newordersingle = 'D'
securitystatusrequest = 'e'
neworderlist = 'E'
ordercancelrequest = 'F'
securitystatus = 'f'
ordercancelreplacerequest = 'G'
tradingsessionstatusrequest = 'g'
orderstatusrequest = 'H'
tradingsessionstatus = 'h'
massquote = 'i'
businessmessagereject = 'j'
allocationinstruction = 'J'
bidrequest = 'k'
listcancelrequest = 'K'
bidresponse = 'l'
listexecute = 'L'
liststrikeprice = 'm'
liststatusrequest = 'M'
xmlnonfix = 'n'
liststatus = 'N'
registrationinstructions = 'o'
registrationinstructionsresponse = 'p'
allocationinstructionack = 'P'
ordermasscancelrequest = 'q'
dontknowtradedk = 'Q'
quoterequest = 'R'
ordermasscancelreport = 'r'
quote = 'S'
newordercross = 's'
settlementinstructions = 'T'
crossordercancelreplacerequest = 't'
crossordercancelrequest = 'u'
marketdatarequest = 'V'
securitytyperequest = 'v'
securitytypes = 'w'
marketdatasnapshotfullrefresh = 'W'
securitylistrequest = 'x'
marketdataincrementalrefresh = 'X'
marketdatarequestreject = 'Y'
securitylist = 'y'
quotecancel = 'Z'
derivativesecuritylistrequest = 'z'
session_message_types = [HEARTBEAT, TESTREQUEST, RESENDREQUEST, REJECT, SEQUENCERESET, LOGOUT, LOGON, XMLNONFIX]
tags = {}
for x in dir():
tags[str(globals()[x])] = x
def msg_type_to_name(n):
try:
return tags[n]
except KeyError:
return str(n) |
# Given two integers, swap them with no additional variable
# 1. With temporal variable t
def swap(a,b):
t = b
a = b
b = t
return a, b
# 2. With no variable
def swap(a,b):
a = b - a
b = b - a # b = b -(b-a) = a
a = b + a # b = a + b - a = b...Swapped
return a, b
# With bitwise operator XOR
def swap(a,b):
a = a ^ b
b = a ^ b # b = a ^ b ^ b = a ^ 0 = a
a = b ^ a # a = a ^ a^ b = a^a^b = b^0 = b
return a, b | def swap(a, b):
t = b
a = b
b = t
return (a, b)
def swap(a, b):
a = b - a
b = b - a
a = b + a
return (a, b)
def swap(a, b):
a = a ^ b
b = a ^ b
a = b ^ a
return (a, b) |
# coding: utf-8
def test_default_value(printer):
assert printer._inverse is False
def test_changing_no_value(printer):
printer.inverse()
assert printer._inverse is False
def test_changing_state_on(printer):
printer.inverse(True)
assert printer._inverse is True
def test_changing_state_off(printer):
printer.inverse(False)
assert printer._inverse is False
def test_reset_value(printer):
printer.reset()
assert printer._inverse is False
| def test_default_value(printer):
assert printer._inverse is False
def test_changing_no_value(printer):
printer.inverse()
assert printer._inverse is False
def test_changing_state_on(printer):
printer.inverse(True)
assert printer._inverse is True
def test_changing_state_off(printer):
printer.inverse(False)
assert printer._inverse is False
def test_reset_value(printer):
printer.reset()
assert printer._inverse is False |
# program to merge two linked list
class Node:
def __init__(self, data, next):
self.data = data
self.next = next
def merge(L1,L2):
L3 = Node(None, None)
prev = L3
while L1 != None and L2 != None:
if L1.data <= L2.data:
prev.next = L2.data
L1 = L1.next
else:
prev.data = L1.data
L2 = L2.next
prev = prev.next
if L1.data == None:
prev.next = L2
elif L2.data == None:
prev.next = L1
return L3.next
if __name__ == '__main__':
n3 = Node(10, None)
n2 = Node(n3, 7)
n1 = Node(n2, 5)
L1 = n1
n7 = Node(12, None)
n6 = Node(n7, 9)
n5 = Node(n6, 6)
n4 = Node(n5, 2)
L2 = n4
merged = merge(L1, L2)
while merged != None:
print(str(merged.data) + '->')
merged = merged.next
print('None') | class Node:
def __init__(self, data, next):
self.data = data
self.next = next
def merge(L1, L2):
l3 = node(None, None)
prev = L3
while L1 != None and L2 != None:
if L1.data <= L2.data:
prev.next = L2.data
l1 = L1.next
else:
prev.data = L1.data
l2 = L2.next
prev = prev.next
if L1.data == None:
prev.next = L2
elif L2.data == None:
prev.next = L1
return L3.next
if __name__ == '__main__':
n3 = node(10, None)
n2 = node(n3, 7)
n1 = node(n2, 5)
l1 = n1
n7 = node(12, None)
n6 = node(n7, 9)
n5 = node(n6, 6)
n4 = node(n5, 2)
l2 = n4
merged = merge(L1, L2)
while merged != None:
print(str(merged.data) + '->')
merged = merged.next
print('None') |
local_webserver = '/var/www/html'
ssh = dict(
host = '',
username = '',
password = '',
remote_path = ''
)
| local_webserver = '/var/www/html'
ssh = dict(host='', username='', password='', remote_path='') |
class FibIterator(object):
def __init__(self, n):
self.n = n
self.current = 0
self.num1 = 0
self.num2 = 1
def __next__(self):
if self.current < self.n:
item = self.num1
self.num1, self.num2 = self.num2, self.num1+self.num2
self.current += 1
return item
else:
raise StopIteration
def __iter__(self):
return self
if __name__ == '__main__':
fib = FibIterator(20)
for num in fib:
print(num, end=" ")
print("\n", list(FibIterator(10)))
| class Fibiterator(object):
def __init__(self, n):
self.n = n
self.current = 0
self.num1 = 0
self.num2 = 1
def __next__(self):
if self.current < self.n:
item = self.num1
(self.num1, self.num2) = (self.num2, self.num1 + self.num2)
self.current += 1
return item
else:
raise StopIteration
def __iter__(self):
return self
if __name__ == '__main__':
fib = fib_iterator(20)
for num in fib:
print(num, end=' ')
print('\n', list(fib_iterator(10))) |
cpgf._import(None, "builtin.debug");
cpgf._import(None, "builtin.core");
class SAppContext:
device = None,
counter = 0,
listbox = None
Context = SAppContext();
GUI_ID_QUIT_BUTTON = 101;
GUI_ID_NEW_WINDOW_BUTTON = 102;
GUI_ID_FILE_OPEN_BUTTON = 103;
GUI_ID_TRANSPARENCY_SCROLL_BAR = 104;
def makeMyEventReceiver(receiver) :
def OnEvent(me, event) :
if event.EventType == irr.EET_GUI_EVENT :
id = event.GUIEvent.Caller.getID();
env = Context.device.getGUIEnvironment();
if event.GUIEvent.EventType == irr.EGET_SCROLL_BAR_CHANGED :
if id == GUI_ID_TRANSPARENCY_SCROLL_BAR :
pos = cpgf.cast(event.GUIEvent.Caller, irr.IGUIScrollBar).getPos();
skin = env.getSkin();
for i in range(irr.EGDC_COUNT) :
col = skin.getColor(i);
col.setAlpha(pos);
skin.setColor(i, col);
elif event.GUIEvent.EventType == irr.EGET_BUTTON_CLICKED :
if id == GUI_ID_QUIT_BUTTON :
Context.device.closeDevice();
return True;
elif id == GUI_ID_NEW_WINDOW_BUTTON :
Context.listbox.addItem("Window created");
Context.counter = Context.counter + 30;
if Context.counter > 200 :
Context.counter = 0;
window = env.addWindow(irr.rect_s32(100 + Context.counter, 100 + Context.counter, 300 + Context.counter, 200 + Context.counter), False, "Test window");
env.addStaticText("Please close me", irr.rect_s32(35,35,140,50), True, False, window);
return True;
elif id == GUI_ID_FILE_OPEN_BUTTON :
Context.listbox.addItem("File open");
env.addFileOpenDialog("Please choose a file.");
return True;
return False;
receiver.OnEvent = OnEvent;
def start() :
driverType = irr.driverChoiceConsole();
if driverType == irr.EDT_COUNT :
return 1;
device = irr.createDevice(driverType, irr.dimension2d_u32(640, 480));
if device == None :
return 1;
device.setWindowCaption("cpgf Irrlicht Python Binding - User Interface Demo");
device.setResizable(True);
driver = device.getVideoDriver();
env = device.getGUIEnvironment();
skin = env.getSkin();
font = env.getFont("../../media/fonthaettenschweiler.bmp");
if font :
skin.setFont(font);
skin.setFont(env.getBuiltInFont(), irr.EGDF_TOOLTIP);
env.addButton(irr.rect_s32(10,240,110,240 + 32), None, GUI_ID_QUIT_BUTTON, "Quit", "Exits Program");
env.addButton(irr.rect_s32(10,280,110,280 + 32), None, GUI_ID_NEW_WINDOW_BUTTON, "New Window", "Launches a Window");
env.addButton(irr.rect_s32(10,320,110,320 + 32), None, GUI_ID_FILE_OPEN_BUTTON, "File Open", "Opens a file");
env.addStaticText("Transparent Control:", irr.rect_s32(150,20,350,40), True);
scrollbar = env.addScrollBar(True, irr.rect_s32(150, 45, 350, 60), None, GUI_ID_TRANSPARENCY_SCROLL_BAR);
scrollbar.setMax(255);
scrollbar.setPos(env.getSkin().getColor(irr.EGDC_WINDOW).getAlpha());
env.addStaticText("Logging ListBox:", irr.rect_s32(50,110,250,130), True);
listbox = env.addListBox(irr.rect_s32(50, 140, 250, 210));
env.addEditBox("Editable Text", irr.rect_s32(350, 80, 550, 100));
Context.device = device;
Context.counter = 0;
Context.listbox = listbox;
MyEventReceiver = cpgf.cloneClass(irr.IEventReceiverWrapper);
makeMyEventReceiver(MyEventReceiver);
receiver = MyEventReceiver();
device.setEventReceiver(receiver);
env.addImage(driver.getTexture("../../media/irrlichtlogo2.png"), irr.position2d_s32(10,10));
while device.run() and driver :
if device.isWindowActive() :
driver.beginScene(True, True, irr.SColor(0,200,200,200));
env.drawAll();
driver.endScene();
device.drop();
return 0;
start();
| cpgf._import(None, 'builtin.debug')
cpgf._import(None, 'builtin.core')
class Sappcontext:
device = (None,)
counter = (0,)
listbox = None
context = s_app_context()
gui_id_quit_button = 101
gui_id_new_window_button = 102
gui_id_file_open_button = 103
gui_id_transparency_scroll_bar = 104
def make_my_event_receiver(receiver):
def on_event(me, event):
if event.EventType == irr.EET_GUI_EVENT:
id = event.GUIEvent.Caller.getID()
env = Context.device.getGUIEnvironment()
if event.GUIEvent.EventType == irr.EGET_SCROLL_BAR_CHANGED:
if id == GUI_ID_TRANSPARENCY_SCROLL_BAR:
pos = cpgf.cast(event.GUIEvent.Caller, irr.IGUIScrollBar).getPos()
skin = env.getSkin()
for i in range(irr.EGDC_COUNT):
col = skin.getColor(i)
col.setAlpha(pos)
skin.setColor(i, col)
elif event.GUIEvent.EventType == irr.EGET_BUTTON_CLICKED:
if id == GUI_ID_QUIT_BUTTON:
Context.device.closeDevice()
return True
elif id == GUI_ID_NEW_WINDOW_BUTTON:
Context.listbox.addItem('Window created')
Context.counter = Context.counter + 30
if Context.counter > 200:
Context.counter = 0
window = env.addWindow(irr.rect_s32(100 + Context.counter, 100 + Context.counter, 300 + Context.counter, 200 + Context.counter), False, 'Test window')
env.addStaticText('Please close me', irr.rect_s32(35, 35, 140, 50), True, False, window)
return True
elif id == GUI_ID_FILE_OPEN_BUTTON:
Context.listbox.addItem('File open')
env.addFileOpenDialog('Please choose a file.')
return True
return False
receiver.OnEvent = OnEvent
def start():
driver_type = irr.driverChoiceConsole()
if driverType == irr.EDT_COUNT:
return 1
device = irr.createDevice(driverType, irr.dimension2d_u32(640, 480))
if device == None:
return 1
device.setWindowCaption('cpgf Irrlicht Python Binding - User Interface Demo')
device.setResizable(True)
driver = device.getVideoDriver()
env = device.getGUIEnvironment()
skin = env.getSkin()
font = env.getFont('../../media/fonthaettenschweiler.bmp')
if font:
skin.setFont(font)
skin.setFont(env.getBuiltInFont(), irr.EGDF_TOOLTIP)
env.addButton(irr.rect_s32(10, 240, 110, 240 + 32), None, GUI_ID_QUIT_BUTTON, 'Quit', 'Exits Program')
env.addButton(irr.rect_s32(10, 280, 110, 280 + 32), None, GUI_ID_NEW_WINDOW_BUTTON, 'New Window', 'Launches a Window')
env.addButton(irr.rect_s32(10, 320, 110, 320 + 32), None, GUI_ID_FILE_OPEN_BUTTON, 'File Open', 'Opens a file')
env.addStaticText('Transparent Control:', irr.rect_s32(150, 20, 350, 40), True)
scrollbar = env.addScrollBar(True, irr.rect_s32(150, 45, 350, 60), None, GUI_ID_TRANSPARENCY_SCROLL_BAR)
scrollbar.setMax(255)
scrollbar.setPos(env.getSkin().getColor(irr.EGDC_WINDOW).getAlpha())
env.addStaticText('Logging ListBox:', irr.rect_s32(50, 110, 250, 130), True)
listbox = env.addListBox(irr.rect_s32(50, 140, 250, 210))
env.addEditBox('Editable Text', irr.rect_s32(350, 80, 550, 100))
Context.device = device
Context.counter = 0
Context.listbox = listbox
my_event_receiver = cpgf.cloneClass(irr.IEventReceiverWrapper)
make_my_event_receiver(MyEventReceiver)
receiver = my_event_receiver()
device.setEventReceiver(receiver)
env.addImage(driver.getTexture('../../media/irrlichtlogo2.png'), irr.position2d_s32(10, 10))
while device.run() and driver:
if device.isWindowActive():
driver.beginScene(True, True, irr.SColor(0, 200, 200, 200))
env.drawAll()
driver.endScene()
device.drop()
return 0
start() |
class SoftplusParams:
__slots__ = ["beta"]
def __init__(self, beta=100):
self.beta = beta
class GeometricInitParams:
__slots__ = ["bias"]
def __init__(self, bias=0.6):
self.bias = bias
class IDRHyperParams:
def __init__(self, softplus=None, geometric_init=None):
self.softplus = softplus
if softplus is None:
self.softplus = SoftplusParams()
self.geometric_init = geometric_init
if geometric_init is None:
self.geometric_init = GeometricInitParams()
| class Softplusparams:
__slots__ = ['beta']
def __init__(self, beta=100):
self.beta = beta
class Geometricinitparams:
__slots__ = ['bias']
def __init__(self, bias=0.6):
self.bias = bias
class Idrhyperparams:
def __init__(self, softplus=None, geometric_init=None):
self.softplus = softplus
if softplus is None:
self.softplus = softplus_params()
self.geometric_init = geometric_init
if geometric_init is None:
self.geometric_init = geometric_init_params() |
# Coin Change 8
class Solution:
def change(self, amount, coins):
# Classic DP problem?
dp = [0] * (amount + 1)
dp[0] = 1
for coin in coins:
for am in range(1, amount + 1):
if am >= coin:
dp[am] += dp[am - coin]
return dp[amount]
if __name__ == "__main__":
sol = Solution()
amount = 5
coins = [1, 2, 5]
print(sol.change(amount, coins))
| class Solution:
def change(self, amount, coins):
dp = [0] * (amount + 1)
dp[0] = 1
for coin in coins:
for am in range(1, amount + 1):
if am >= coin:
dp[am] += dp[am - coin]
return dp[amount]
if __name__ == '__main__':
sol = solution()
amount = 5
coins = [1, 2, 5]
print(sol.change(amount, coins)) |
# Definition for a binary tree node.
class TreeNode:
def __init__(self, x):
self.val = x
self.left = None
self.right = None
class Solution:
def insertIntoMaxTree(self, root: TreeNode, val: int) -> TreeNode:
if root is None or root.val < val:
node = TreeNode(val)
node.left = root
return node
else:
root.right = self.insertIntoMaxTree(root.right, val)
return root
class Solution2:
def insertIntoMaxTree(self, root: TreeNode, val: int) -> TreeNode:
prev = None
curr = root
while curr and curr.val > val:
prev = curr
curr = curr.right
node = TreeNode(val)
node.left = curr
if prev:
prev.right = node
return root if prev else node
| class Treenode:
def __init__(self, x):
self.val = x
self.left = None
self.right = None
class Solution:
def insert_into_max_tree(self, root: TreeNode, val: int) -> TreeNode:
if root is None or root.val < val:
node = tree_node(val)
node.left = root
return node
else:
root.right = self.insertIntoMaxTree(root.right, val)
return root
class Solution2:
def insert_into_max_tree(self, root: TreeNode, val: int) -> TreeNode:
prev = None
curr = root
while curr and curr.val > val:
prev = curr
curr = curr.right
node = tree_node(val)
node.left = curr
if prev:
prev.right = node
return root if prev else node |
#-------------------------------------------------------------
# Name: Michael Dinh
# Date: 10/10/2018
# Reference: Pg. 169, Problem #6
# Title: Book Club Points
# Inputs: User inputs number of books bought from a store
# Processes: Determines point value based on number of books bought
# Outputs: Number of points user earns in correlation to number of books input
#-------------------------------------------------------------
#Start defining modules
#getBooks() prompts the user for the number of books bought
def getBooks():
books = int(input("Welcome to the Serendipity Booksellers Book Club Awards Points Calculator! Please enter the number of books you've purchased today: "))
return books
#defPoints() determines what points tier a user qualifies for based on book value
def detPoints(books):
if books < 1:
print("You've earned 0 points; buy at least one book to qualify!")
elif books == 1:
print("You've earned 5 points!")
elif books == 2:
print("You've earned 15 points!")
elif books == 3:
print("You've earned 30 points!")
elif books > 3:
print("Super reader! You've earned 60 points!")
else:
print("Error!")
#Define main()
def main():
#Intialize local variable
books = 0.0
#Begin calling modules
books = getBooks()
detPoints(books)
#Call main
main() | def get_books():
books = int(input("Welcome to the Serendipity Booksellers Book Club Awards Points Calculator! Please enter the number of books you've purchased today: "))
return books
def det_points(books):
if books < 1:
print("You've earned 0 points; buy at least one book to qualify!")
elif books == 1:
print("You've earned 5 points!")
elif books == 2:
print("You've earned 15 points!")
elif books == 3:
print("You've earned 30 points!")
elif books > 3:
print("Super reader! You've earned 60 points!")
else:
print('Error!')
def main():
books = 0.0
books = get_books()
det_points(books)
main() |
def arraypermute(collection, key):
return [ str(i) + str(j) for i in collection for j in key ]
class FilterModule(object):
def filters(self):
return {
'arraypermute': arraypermute
} | def arraypermute(collection, key):
return [str(i) + str(j) for i in collection for j in key]
class Filtermodule(object):
def filters(self):
return {'arraypermute': arraypermute} |
#
# PySNMP MIB module SNIA-SML-MIB (http://snmplabs.com/pysmi)
# ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/SNIA-SML-MIB
# Produced by pysmi-0.3.4 at Mon Apr 29 21:00:04 2019
# On host DAVWANG4-M-1475 platform Darwin version 18.5.0 by user davwang4
# Using Python version 3.7.3 (default, Mar 27 2019, 09:23:15)
#
OctetString, Integer, ObjectIdentifier = mibBuilder.importSymbols("ASN1", "OctetString", "Integer", "ObjectIdentifier")
NamedValues, = mibBuilder.importSymbols("ASN1-ENUMERATION", "NamedValues")
ConstraintsUnion, ValueSizeConstraint, ConstraintsIntersection, SingleValueConstraint, ValueRangeConstraint = mibBuilder.importSymbols("ASN1-REFINEMENT", "ConstraintsUnion", "ValueSizeConstraint", "ConstraintsIntersection", "SingleValueConstraint", "ValueRangeConstraint")
ModuleCompliance, NotificationGroup = mibBuilder.importSymbols("SNMPv2-CONF", "ModuleCompliance", "NotificationGroup")
NotificationType, MibIdentifier, ObjectIdentity, Bits, iso, TimeTicks, enterprises, MibScalar, MibTable, MibTableRow, MibTableColumn, Integer32, Counter32, Gauge32, ModuleIdentity, Counter64, Unsigned32, IpAddress = mibBuilder.importSymbols("SNMPv2-SMI", "NotificationType", "MibIdentifier", "ObjectIdentity", "Bits", "iso", "TimeTicks", "enterprises", "MibScalar", "MibTable", "MibTableRow", "MibTableColumn", "Integer32", "Counter32", "Gauge32", "ModuleIdentity", "Counter64", "Unsigned32", "IpAddress")
TextualConvention, DisplayString = mibBuilder.importSymbols("SNMPv2-TC", "TextualConvention", "DisplayString")
class UShortReal(Integer32):
subtypeSpec = Integer32.subtypeSpec + ValueRangeConstraint(0, 65535)
class CimDateTime(OctetString):
subtypeSpec = OctetString.subtypeSpec + ValueSizeConstraint(24, 24)
fixedLength = 24
class UINT64(OctetString):
subtypeSpec = OctetString.subtypeSpec + ValueSizeConstraint(8, 8)
fixedLength = 8
class UINT32(Integer32):
subtypeSpec = Integer32.subtypeSpec + ValueRangeConstraint(0, 2147483647)
class UINT16(Integer32):
subtypeSpec = Integer32.subtypeSpec + ValueRangeConstraint(0, 65535)
snia = MibIdentifier((1, 3, 6, 1, 4, 1, 14851))
experimental = MibIdentifier((1, 3, 6, 1, 4, 1, 14851, 1))
common = MibIdentifier((1, 3, 6, 1, 4, 1, 14851, 2))
libraries = MibIdentifier((1, 3, 6, 1, 4, 1, 14851, 3))
smlRoot = MibIdentifier((1, 3, 6, 1, 4, 1, 14851, 3, 1))
smlMibVersion = MibScalar((1, 3, 6, 1, 4, 1, 14851, 3, 1, 1), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 4))).setMaxAccess("readonly")
if mibBuilder.loadTexts: smlMibVersion.setStatus('mandatory')
smlCimVersion = MibScalar((1, 3, 6, 1, 4, 1, 14851, 3, 1, 2), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 4))).setMaxAccess("readonly")
if mibBuilder.loadTexts: smlCimVersion.setStatus('mandatory')
productGroup = MibIdentifier((1, 3, 6, 1, 4, 1, 14851, 3, 1, 3))
product_Name = MibScalar((1, 3, 6, 1, 4, 1, 14851, 3, 1, 3, 1), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 255))).setLabel("product-Name").setMaxAccess("readonly")
if mibBuilder.loadTexts: product_Name.setStatus('mandatory')
product_IdentifyingNumber = MibScalar((1, 3, 6, 1, 4, 1, 14851, 3, 1, 3, 2), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 255))).setLabel("product-IdentifyingNumber").setMaxAccess("readonly")
if mibBuilder.loadTexts: product_IdentifyingNumber.setStatus('mandatory')
product_Vendor = MibScalar((1, 3, 6, 1, 4, 1, 14851, 3, 1, 3, 3), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 255))).setLabel("product-Vendor").setMaxAccess("readonly")
if mibBuilder.loadTexts: product_Vendor.setStatus('mandatory')
product_Version = MibScalar((1, 3, 6, 1, 4, 1, 14851, 3, 1, 3, 4), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 255))).setLabel("product-Version").setMaxAccess("readonly")
if mibBuilder.loadTexts: product_Version.setStatus('mandatory')
product_ElementName = MibScalar((1, 3, 6, 1, 4, 1, 14851, 3, 1, 3, 5), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 255))).setLabel("product-ElementName").setMaxAccess("readonly")
if mibBuilder.loadTexts: product_ElementName.setStatus('mandatory')
chassisGroup = MibIdentifier((1, 3, 6, 1, 4, 1, 14851, 3, 1, 4))
chassis_Manufacturer = MibScalar((1, 3, 6, 1, 4, 1, 14851, 3, 1, 4, 1), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 255))).setLabel("chassis-Manufacturer").setMaxAccess("readonly")
if mibBuilder.loadTexts: chassis_Manufacturer.setStatus('mandatory')
chassis_Model = MibScalar((1, 3, 6, 1, 4, 1, 14851, 3, 1, 4, 2), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 64))).setLabel("chassis-Model").setMaxAccess("readonly")
if mibBuilder.loadTexts: chassis_Model.setStatus('mandatory')
chassis_SerialNumber = MibScalar((1, 3, 6, 1, 4, 1, 14851, 3, 1, 4, 3), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 64))).setLabel("chassis-SerialNumber").setMaxAccess("readonly")
if mibBuilder.loadTexts: chassis_SerialNumber.setStatus('mandatory')
chassis_LockPresent = MibScalar((1, 3, 6, 1, 4, 1, 14851, 3, 1, 4, 4), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 1, 2))).clone(namedValues=NamedValues(("unknown", 0), ("true", 1), ("false", 2)))).setLabel("chassis-LockPresent").setMaxAccess("readonly")
if mibBuilder.loadTexts: chassis_LockPresent.setStatus('mandatory')
chassis_SecurityBreach = MibScalar((1, 3, 6, 1, 4, 1, 14851, 3, 1, 4, 5), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4, 5))).clone(namedValues=NamedValues(("unknown", 1), ("other", 2), ("noBreach", 3), ("breachAttempted", 4), ("breachSuccessful", 5)))).setLabel("chassis-SecurityBreach").setMaxAccess("readonly")
if mibBuilder.loadTexts: chassis_SecurityBreach.setStatus('mandatory')
chassis_IsLocked = MibScalar((1, 3, 6, 1, 4, 1, 14851, 3, 1, 4, 6), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 1, 2))).clone(namedValues=NamedValues(("unknown", 0), ("true", 1), ("false", 2)))).setLabel("chassis-IsLocked").setMaxAccess("readonly")
if mibBuilder.loadTexts: chassis_IsLocked.setStatus('mandatory')
chassis_Tag = MibScalar((1, 3, 6, 1, 4, 1, 14851, 3, 1, 4, 7), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 255))).setLabel("chassis-Tag").setMaxAccess("readonly")
if mibBuilder.loadTexts: chassis_Tag.setStatus('mandatory')
chassis_ElementName = MibScalar((1, 3, 6, 1, 4, 1, 14851, 3, 1, 4, 8), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 255))).setLabel("chassis-ElementName").setMaxAccess("readonly")
if mibBuilder.loadTexts: chassis_ElementName.setStatus('mandatory')
numberOfsubChassis = MibScalar((1, 3, 6, 1, 4, 1, 14851, 3, 1, 4, 9), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: numberOfsubChassis.setStatus('mandatory')
subChassisTable = MibTable((1, 3, 6, 1, 4, 1, 14851, 3, 1, 4, 10), )
if mibBuilder.loadTexts: subChassisTable.setStatus('mandatory')
subChassisEntry = MibTableRow((1, 3, 6, 1, 4, 1, 14851, 3, 1, 4, 10, 1), ).setIndexNames((0, "SNIA-SML-MIB", "subChassisIndex"))
if mibBuilder.loadTexts: subChassisEntry.setStatus('mandatory')
subChassisIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 14851, 3, 1, 4, 10, 1, 1), UINT32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: subChassisIndex.setStatus('mandatory')
subChassis_Manufacturer = MibScalar((1, 3, 6, 1, 4, 1, 14851, 3, 1, 4, 10, 1, 2), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 255))).setLabel("subChassis-Manufacturer").setMaxAccess("readonly")
if mibBuilder.loadTexts: subChassis_Manufacturer.setStatus('mandatory')
subChassis_Model = MibScalar((1, 3, 6, 1, 4, 1, 14851, 3, 1, 4, 10, 1, 3), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 64))).setLabel("subChassis-Model").setMaxAccess("readonly")
if mibBuilder.loadTexts: subChassis_Model.setStatus('mandatory')
subChassis_SerialNumber = MibScalar((1, 3, 6, 1, 4, 1, 14851, 3, 1, 4, 10, 1, 4), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 64))).setLabel("subChassis-SerialNumber").setMaxAccess("readonly")
if mibBuilder.loadTexts: subChassis_SerialNumber.setStatus('mandatory')
subChassis_LockPresent = MibScalar((1, 3, 6, 1, 4, 1, 14851, 3, 1, 4, 10, 1, 5), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 1, 2))).clone(namedValues=NamedValues(("unknown", 0), ("true", 1), ("false", 2)))).setLabel("subChassis-LockPresent").setMaxAccess("readonly")
if mibBuilder.loadTexts: subChassis_LockPresent.setStatus('mandatory')
subChassis_SecurityBreach = MibScalar((1, 3, 6, 1, 4, 1, 14851, 3, 1, 4, 10, 1, 6), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4, 5))).clone(namedValues=NamedValues(("unknown", 1), ("other", 2), ("noBreach", 3), ("breachAttempted", 4), ("breachSuccessful", 5)))).setLabel("subChassis-SecurityBreach").setMaxAccess("readonly")
if mibBuilder.loadTexts: subChassis_SecurityBreach.setStatus('mandatory')
subChassis_IsLocked = MibScalar((1, 3, 6, 1, 4, 1, 14851, 3, 1, 4, 10, 1, 7), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 1, 2))).clone(namedValues=NamedValues(("unknown", 0), ("true", 1), ("false", 2)))).setLabel("subChassis-IsLocked").setMaxAccess("readonly")
if mibBuilder.loadTexts: subChassis_IsLocked.setStatus('mandatory')
subChassis_Tag = MibScalar((1, 3, 6, 1, 4, 1, 14851, 3, 1, 4, 10, 1, 8), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 255))).setLabel("subChassis-Tag").setMaxAccess("readonly")
if mibBuilder.loadTexts: subChassis_Tag.setStatus('mandatory')
subChassis_ElementName = MibScalar((1, 3, 6, 1, 4, 1, 14851, 3, 1, 4, 10, 1, 9), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 255))).setLabel("subChassis-ElementName").setMaxAccess("readonly")
if mibBuilder.loadTexts: subChassis_ElementName.setStatus('mandatory')
subChassis_OperationalStatus = MibScalar((1, 3, 6, 1, 4, 1, 14851, 3, 1, 4, 10, 1, 10), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 32768))).clone(namedValues=NamedValues(("unknown", 0), ("other", 1), ("ok", 2), ("degraded", 3), ("stressed", 4), ("predictiveFailure", 5), ("error", 6), ("non-RecoverableError", 7), ("starting", 8), ("stopping", 9), ("stopped", 10), ("inService", 11), ("noContact", 12), ("lostCommunication", 13), ("aborted", 14), ("dormant", 15), ("supportingEntityInError", 16), ("completed", 17), ("powerMode", 18), ("dMTFReserved", 19), ("vendorReserved", 32768)))).setLabel("subChassis-OperationalStatus").setMaxAccess("readonly")
if mibBuilder.loadTexts: subChassis_OperationalStatus.setStatus('mandatory')
subChassis_PackageType = MibScalar((1, 3, 6, 1, 4, 1, 14851, 3, 1, 4, 10, 1, 11), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 17, 18, 19, 32769))).clone(namedValues=NamedValues(("unknown", 0), ("mainSystemChassis", 17), ("expansionChassis", 18), ("subChassis", 19), ("serviceBay", 32769)))).setLabel("subChassis-PackageType").setMaxAccess("readonly")
if mibBuilder.loadTexts: subChassis_PackageType.setStatus('mandatory')
storageLibraryGroup = MibIdentifier((1, 3, 6, 1, 4, 1, 14851, 3, 1, 5))
storageLibrary_Name = MibScalar((1, 3, 6, 1, 4, 1, 14851, 3, 1, 5, 1), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 255))).setLabel("storageLibrary-Name").setMaxAccess("readonly")
if mibBuilder.loadTexts: storageLibrary_Name.setStatus('deprecated')
storageLibrary_Description = MibScalar((1, 3, 6, 1, 4, 1, 14851, 3, 1, 5, 2), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 255))).setLabel("storageLibrary-Description").setMaxAccess("readonly")
if mibBuilder.loadTexts: storageLibrary_Description.setStatus('deprecated')
storageLibrary_Caption = MibScalar((1, 3, 6, 1, 4, 1, 14851, 3, 1, 5, 3), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 64))).setLabel("storageLibrary-Caption").setMaxAccess("readonly")
if mibBuilder.loadTexts: storageLibrary_Caption.setStatus('deprecated')
storageLibrary_Status = MibScalar((1, 3, 6, 1, 4, 1, 14851, 3, 1, 5, 4), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 10))).setLabel("storageLibrary-Status").setMaxAccess("readonly")
if mibBuilder.loadTexts: storageLibrary_Status.setStatus('deprecated')
storageLibrary_InstallDate = MibScalar((1, 3, 6, 1, 4, 1, 14851, 3, 1, 5, 5), CimDateTime()).setLabel("storageLibrary-InstallDate").setMaxAccess("readonly")
if mibBuilder.loadTexts: storageLibrary_InstallDate.setStatus('deprecated')
mediaAccessDeviceGroup = MibIdentifier((1, 3, 6, 1, 4, 1, 14851, 3, 1, 6))
numberOfMediaAccessDevices = MibScalar((1, 3, 6, 1, 4, 1, 14851, 3, 1, 6, 1), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: numberOfMediaAccessDevices.setStatus('mandatory')
mediaAccessDeviceTable = MibTable((1, 3, 6, 1, 4, 1, 14851, 3, 1, 6, 2), )
if mibBuilder.loadTexts: mediaAccessDeviceTable.setStatus('mandatory')
mediaAccessDeviceEntry = MibTableRow((1, 3, 6, 1, 4, 1, 14851, 3, 1, 6, 2, 1), ).setIndexNames((0, "SNIA-SML-MIB", "mediaAccessDeviceIndex"))
if mibBuilder.loadTexts: mediaAccessDeviceEntry.setStatus('mandatory')
mediaAccessDeviceIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 14851, 3, 1, 6, 2, 1, 1), UINT32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: mediaAccessDeviceIndex.setStatus('mandatory')
mediaAccessDeviceObjectType = MibTableColumn((1, 3, 6, 1, 4, 1, 14851, 3, 1, 6, 2, 1, 2), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 1, 2, 3, 4, 5))).clone(namedValues=NamedValues(("unknown", 0), ("wormDrive", 1), ("magnetoOpticalDrive", 2), ("tapeDrive", 3), ("dvdDrive", 4), ("cdromDrive", 5)))).setMaxAccess("readonly")
if mibBuilder.loadTexts: mediaAccessDeviceObjectType.setStatus('mandatory')
mediaAccessDevice_Name = MibScalar((1, 3, 6, 1, 4, 1, 14851, 3, 1, 6, 2, 1, 3), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 255))).setLabel("mediaAccessDevice-Name").setMaxAccess("readonly")
if mibBuilder.loadTexts: mediaAccessDevice_Name.setStatus('deprecated')
mediaAccessDevice_Status = MibScalar((1, 3, 6, 1, 4, 1, 14851, 3, 1, 6, 2, 1, 4), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 10))).setLabel("mediaAccessDevice-Status").setMaxAccess("readonly")
if mibBuilder.loadTexts: mediaAccessDevice_Status.setStatus('deprecated')
mediaAccessDevice_Availability = MibScalar((1, 3, 6, 1, 4, 1, 14851, 3, 1, 6, 2, 1, 5), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21))).clone(namedValues=NamedValues(("other", 1), ("unknown", 2), ("runningFullPower", 3), ("warning", 4), ("inTest", 5), ("notApplicable", 6), ("powerOff", 7), ("offLine", 8), ("offDuty", 9), ("degraded", 10), ("notInstalled", 11), ("installError", 12), ("powerSaveUnknown", 13), ("powerSaveLowPowerMode", 14), ("powerSaveStandby", 15), ("powerCycle", 16), ("powerSaveWarning", 17), ("paused", 18), ("notReady", 19), ("notConfigured", 20), ("quiesced", 21)))).setLabel("mediaAccessDevice-Availability").setMaxAccess("readonly")
if mibBuilder.loadTexts: mediaAccessDevice_Availability.setStatus('mandatory')
mediaAccessDevice_NeedsCleaning = MibScalar((1, 3, 6, 1, 4, 1, 14851, 3, 1, 6, 2, 1, 6), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 1, 2))).clone(namedValues=NamedValues(("unknown", 0), ("true", 1), ("false", 2)))).setLabel("mediaAccessDevice-NeedsCleaning").setMaxAccess("readonly")
if mibBuilder.loadTexts: mediaAccessDevice_NeedsCleaning.setStatus('mandatory')
mediaAccessDevice_MountCount = MibScalar((1, 3, 6, 1, 4, 1, 14851, 3, 1, 6, 2, 1, 7), UINT64()).setLabel("mediaAccessDevice-MountCount").setMaxAccess("readonly")
if mibBuilder.loadTexts: mediaAccessDevice_MountCount.setStatus('mandatory')
mediaAccessDevice_DeviceID = MibScalar((1, 3, 6, 1, 4, 1, 14851, 3, 1, 6, 2, 1, 8), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 64))).setLabel("mediaAccessDevice-DeviceID").setMaxAccess("readonly")
if mibBuilder.loadTexts: mediaAccessDevice_DeviceID.setStatus('mandatory')
mediaAccessDevice_PowerOnHours = MibScalar((1, 3, 6, 1, 4, 1, 14851, 3, 1, 6, 2, 1, 9), UINT64()).setLabel("mediaAccessDevice-PowerOnHours").setMaxAccess("readonly")
if mibBuilder.loadTexts: mediaAccessDevice_PowerOnHours.setStatus('mandatory')
mediaAccessDevice_TotalPowerOnHours = MibScalar((1, 3, 6, 1, 4, 1, 14851, 3, 1, 6, 2, 1, 10), UINT64()).setLabel("mediaAccessDevice-TotalPowerOnHours").setMaxAccess("readonly")
if mibBuilder.loadTexts: mediaAccessDevice_TotalPowerOnHours.setStatus('mandatory')
mediaAccessDevice_OperationalStatus = MibScalar((1, 3, 6, 1, 4, 1, 14851, 3, 1, 6, 2, 1, 11), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 32768))).clone(namedValues=NamedValues(("unknown", 0), ("other", 1), ("ok", 2), ("degraded", 3), ("stressed", 4), ("predictiveFailure", 5), ("error", 6), ("non-RecoverableError", 7), ("starting", 8), ("stopping", 9), ("stopped", 10), ("inService", 11), ("noContact", 12), ("lostCommunication", 13), ("aborted", 14), ("dormant", 15), ("supportingEntityInError", 16), ("completed", 17), ("powerMode", 18), ("dMTFReserved", 19), ("vendorReserved", 32768)))).setLabel("mediaAccessDevice-OperationalStatus").setMaxAccess("readonly")
if mibBuilder.loadTexts: mediaAccessDevice_OperationalStatus.setStatus('mandatory')
mediaAccessDevice_Realizes_StorageLocationIndex = MibScalar((1, 3, 6, 1, 4, 1, 14851, 3, 1, 6, 2, 1, 12), UINT32()).setLabel("mediaAccessDevice-Realizes-StorageLocationIndex").setMaxAccess("readonly")
if mibBuilder.loadTexts: mediaAccessDevice_Realizes_StorageLocationIndex.setStatus('mandatory')
mediaAccessDevice_Realizes_softwareElementIndex = MibScalar((1, 3, 6, 1, 4, 1, 14851, 3, 1, 6, 2, 1, 13), UINT32()).setLabel("mediaAccessDevice-Realizes-softwareElementIndex").setMaxAccess("readonly")
if mibBuilder.loadTexts: mediaAccessDevice_Realizes_softwareElementIndex.setStatus('mandatory')
physicalPackageGroup = MibIdentifier((1, 3, 6, 1, 4, 1, 14851, 3, 1, 8))
numberOfPhysicalPackages = MibScalar((1, 3, 6, 1, 4, 1, 14851, 3, 1, 8, 1), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: numberOfPhysicalPackages.setStatus('mandatory')
physicalPackageTable = MibTable((1, 3, 6, 1, 4, 1, 14851, 3, 1, 8, 2), )
if mibBuilder.loadTexts: physicalPackageTable.setStatus('mandatory')
physicalPackageEntry = MibTableRow((1, 3, 6, 1, 4, 1, 14851, 3, 1, 8, 2, 1), ).setIndexNames((0, "SNIA-SML-MIB", "physicalPackageIndex"))
if mibBuilder.loadTexts: physicalPackageEntry.setStatus('mandatory')
physicalPackageIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 14851, 3, 1, 8, 2, 1, 1), UINT32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: physicalPackageIndex.setStatus('mandatory')
physicalPackage_Manufacturer = MibScalar((1, 3, 6, 1, 4, 1, 14851, 3, 1, 8, 2, 1, 2), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 255))).setLabel("physicalPackage-Manufacturer").setMaxAccess("readonly")
if mibBuilder.loadTexts: physicalPackage_Manufacturer.setStatus('mandatory')
physicalPackage_Model = MibScalar((1, 3, 6, 1, 4, 1, 14851, 3, 1, 8, 2, 1, 3), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 64))).setLabel("physicalPackage-Model").setMaxAccess("readonly")
if mibBuilder.loadTexts: physicalPackage_Model.setStatus('mandatory')
physicalPackage_SerialNumber = MibScalar((1, 3, 6, 1, 4, 1, 14851, 3, 1, 8, 2, 1, 4), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 64))).setLabel("physicalPackage-SerialNumber").setMaxAccess("readonly")
if mibBuilder.loadTexts: physicalPackage_SerialNumber.setStatus('mandatory')
physicalPackage_Realizes_MediaAccessDeviceIndex = MibScalar((1, 3, 6, 1, 4, 1, 14851, 3, 1, 8, 2, 1, 5), Integer32()).setLabel("physicalPackage-Realizes-MediaAccessDeviceIndex").setMaxAccess("readonly")
if mibBuilder.loadTexts: physicalPackage_Realizes_MediaAccessDeviceIndex.setStatus('mandatory')
physicalPackage_Tag = MibScalar((1, 3, 6, 1, 4, 1, 14851, 3, 1, 8, 2, 1, 6), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 255))).setLabel("physicalPackage-Tag").setMaxAccess("readonly")
if mibBuilder.loadTexts: physicalPackage_Tag.setStatus('mandatory')
softwareElementGroup = MibIdentifier((1, 3, 6, 1, 4, 1, 14851, 3, 1, 9))
numberOfSoftwareElements = MibScalar((1, 3, 6, 1, 4, 1, 14851, 3, 1, 9, 1), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: numberOfSoftwareElements.setStatus('mandatory')
softwareElementTable = MibTable((1, 3, 6, 1, 4, 1, 14851, 3, 1, 9, 2), )
if mibBuilder.loadTexts: softwareElementTable.setStatus('mandatory')
softwareElementEntry = MibTableRow((1, 3, 6, 1, 4, 1, 14851, 3, 1, 9, 2, 1), ).setIndexNames((0, "SNIA-SML-MIB", "softwareElementIndex"))
if mibBuilder.loadTexts: softwareElementEntry.setStatus('mandatory')
softwareElementIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 14851, 3, 1, 9, 2, 1, 1), UINT32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: softwareElementIndex.setStatus('mandatory')
softwareElement_Name = MibScalar((1, 3, 6, 1, 4, 1, 14851, 3, 1, 9, 2, 1, 2), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 255))).setLabel("softwareElement-Name").setMaxAccess("readonly")
if mibBuilder.loadTexts: softwareElement_Name.setStatus('deprecated')
softwareElement_Version = MibScalar((1, 3, 6, 1, 4, 1, 14851, 3, 1, 9, 2, 1, 3), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 255))).setLabel("softwareElement-Version").setMaxAccess("readonly")
if mibBuilder.loadTexts: softwareElement_Version.setStatus('mandatory')
softwareElement_SoftwareElementID = MibScalar((1, 3, 6, 1, 4, 1, 14851, 3, 1, 9, 2, 1, 4), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 255))).setLabel("softwareElement-SoftwareElementID").setMaxAccess("readonly")
if mibBuilder.loadTexts: softwareElement_SoftwareElementID.setStatus('mandatory')
softwareElement_Manufacturer = MibScalar((1, 3, 6, 1, 4, 1, 14851, 3, 1, 9, 2, 1, 5), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 64))).setLabel("softwareElement-Manufacturer").setMaxAccess("readonly")
if mibBuilder.loadTexts: softwareElement_Manufacturer.setStatus('mandatory')
softwareElement_BuildNumber = MibScalar((1, 3, 6, 1, 4, 1, 14851, 3, 1, 9, 2, 1, 6), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 64))).setLabel("softwareElement-BuildNumber").setMaxAccess("readonly")
if mibBuilder.loadTexts: softwareElement_BuildNumber.setStatus('mandatory')
softwareElement_SerialNumber = MibScalar((1, 3, 6, 1, 4, 1, 14851, 3, 1, 9, 2, 1, 7), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 64))).setLabel("softwareElement-SerialNumber").setMaxAccess("readonly")
if mibBuilder.loadTexts: softwareElement_SerialNumber.setStatus('mandatory')
softwareElement_CodeSet = MibScalar((1, 3, 6, 1, 4, 1, 14851, 3, 1, 9, 2, 1, 8), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 64))).setLabel("softwareElement-CodeSet").setMaxAccess("readonly")
if mibBuilder.loadTexts: softwareElement_CodeSet.setStatus('deprecated')
softwareElement_IdentificationCode = MibScalar((1, 3, 6, 1, 4, 1, 14851, 3, 1, 9, 2, 1, 9), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 64))).setLabel("softwareElement-IdentificationCode").setMaxAccess("readonly")
if mibBuilder.loadTexts: softwareElement_IdentificationCode.setStatus('deprecated')
softwareElement_LanguageEdition = MibScalar((1, 3, 6, 1, 4, 1, 14851, 3, 1, 9, 2, 1, 10), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 32))).setLabel("softwareElement-LanguageEdition").setMaxAccess("readonly")
if mibBuilder.loadTexts: softwareElement_LanguageEdition.setStatus('deprecated')
softwareElement_InstanceID = MibScalar((1, 3, 6, 1, 4, 1, 14851, 3, 1, 9, 2, 1, 11), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 255))).setLabel("softwareElement-InstanceID").setMaxAccess("readonly")
if mibBuilder.loadTexts: softwareElement_InstanceID.setStatus('mandatory')
computerSystemGroup = MibIdentifier((1, 3, 6, 1, 4, 1, 14851, 3, 1, 10))
computerSystem_ElementName = MibScalar((1, 3, 6, 1, 4, 1, 14851, 3, 1, 10, 1), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 255))).setLabel("computerSystem-ElementName").setMaxAccess("readonly")
if mibBuilder.loadTexts: computerSystem_ElementName.setStatus('mandatory')
computerSystem_OperationalStatus = MibScalar((1, 3, 6, 1, 4, 1, 14851, 3, 1, 10, 2), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 32768))).clone(namedValues=NamedValues(("unknown", 0), ("other", 1), ("ok", 2), ("degraded", 3), ("stressed", 4), ("predictiveFailure", 5), ("error", 6), ("non-RecoverableError", 7), ("starting", 8), ("stopping", 9), ("stopped", 10), ("inService", 11), ("noContact", 12), ("lostCommunication", 13), ("aborted", 14), ("dormant", 15), ("supportingEntityInError", 16), ("completed", 17), ("powerMode", 18), ("dMTFReserved", 19), ("vendorReserved", 32768)))).setLabel("computerSystem-OperationalStatus").setMaxAccess("readonly")
if mibBuilder.loadTexts: computerSystem_OperationalStatus.setStatus('mandatory')
computerSystem_Name = MibScalar((1, 3, 6, 1, 4, 1, 14851, 3, 1, 10, 3), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 255))).setLabel("computerSystem-Name").setMaxAccess("readonly")
if mibBuilder.loadTexts: computerSystem_Name.setStatus('mandatory')
computerSystem_NameFormat = MibScalar((1, 3, 6, 1, 4, 1, 14851, 3, 1, 10, 4), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 255))).setLabel("computerSystem-NameFormat").setMaxAccess("readonly")
if mibBuilder.loadTexts: computerSystem_NameFormat.setStatus('mandatory')
computerSystem_Dedicated = MibScalar((1, 3, 6, 1, 4, 1, 14851, 3, 1, 10, 5), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20))).clone(namedValues=NamedValues(("notDedicated", 0), ("unknown", 1), ("other", 2), ("storage", 3), ("router", 4), ("switch", 5), ("layer3switch", 6), ("centralOfficeSwitch", 7), ("hub", 8), ("accessServer", 9), ("firewall", 10), ("print", 11), ("io", 12), ("webCaching", 13), ("management", 14), ("blockServer", 15), ("fileServer", 16), ("mobileUserDevice", 17), ("repeater", 18), ("bridgeExtender", 19), ("gateway", 20)))).setLabel("computerSystem-Dedicated").setMaxAccess("readonly")
if mibBuilder.loadTexts: computerSystem_Dedicated.setStatus('mandatory')
computerSystem_PrimaryOwnerContact = MibScalar((1, 3, 6, 1, 4, 1, 14851, 3, 1, 10, 6), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 255))).setLabel("computerSystem-PrimaryOwnerContact").setMaxAccess("readonly")
if mibBuilder.loadTexts: computerSystem_PrimaryOwnerContact.setStatus('mandatory')
computerSystem_PrimaryOwnerName = MibScalar((1, 3, 6, 1, 4, 1, 14851, 3, 1, 10, 7), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 255))).setLabel("computerSystem-PrimaryOwnerName").setMaxAccess("readonly")
if mibBuilder.loadTexts: computerSystem_PrimaryOwnerName.setStatus('mandatory')
computerSystem_Description = MibScalar((1, 3, 6, 1, 4, 1, 14851, 3, 1, 10, 8), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 255))).setLabel("computerSystem-Description").setMaxAccess("readonly")
if mibBuilder.loadTexts: computerSystem_Description.setStatus('mandatory')
computerSystem_Caption = MibScalar((1, 3, 6, 1, 4, 1, 14851, 3, 1, 10, 9), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 64))).setLabel("computerSystem-Caption").setMaxAccess("readonly")
if mibBuilder.loadTexts: computerSystem_Caption.setStatus('mandatory')
computerSystem_Realizes_softwareElementIndex = MibScalar((1, 3, 6, 1, 4, 1, 14851, 3, 1, 10, 10), UINT32()).setLabel("computerSystem-Realizes-softwareElementIndex").setMaxAccess("readonly")
if mibBuilder.loadTexts: computerSystem_Realizes_softwareElementIndex.setStatus('mandatory')
changerDeviceGroup = MibIdentifier((1, 3, 6, 1, 4, 1, 14851, 3, 1, 11))
numberOfChangerDevices = MibScalar((1, 3, 6, 1, 4, 1, 14851, 3, 1, 11, 1), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: numberOfChangerDevices.setStatus('mandatory')
changerDeviceTable = MibTable((1, 3, 6, 1, 4, 1, 14851, 3, 1, 11, 2), )
if mibBuilder.loadTexts: changerDeviceTable.setStatus('mandatory')
changerDeviceEntry = MibTableRow((1, 3, 6, 1, 4, 1, 14851, 3, 1, 11, 2, 1), ).setIndexNames((0, "SNIA-SML-MIB", "changerDeviceIndex"))
if mibBuilder.loadTexts: changerDeviceEntry.setStatus('mandatory')
changerDeviceIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 14851, 3, 1, 11, 2, 1, 1), UINT32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: changerDeviceIndex.setStatus('mandatory')
changerDevice_DeviceID = MibScalar((1, 3, 6, 1, 4, 1, 14851, 3, 1, 11, 2, 1, 2), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 64))).setLabel("changerDevice-DeviceID").setMaxAccess("readonly")
if mibBuilder.loadTexts: changerDevice_DeviceID.setStatus('mandatory')
changerDevice_MediaFlipSupported = MibScalar((1, 3, 6, 1, 4, 1, 14851, 3, 1, 11, 2, 1, 3), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("true", 1), ("false", 2)))).setLabel("changerDevice-MediaFlipSupported").setMaxAccess("readonly")
if mibBuilder.loadTexts: changerDevice_MediaFlipSupported.setStatus('mandatory')
changerDevice_ElementName = MibScalar((1, 3, 6, 1, 4, 1, 14851, 3, 1, 11, 2, 1, 4), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 255))).setLabel("changerDevice-ElementName").setMaxAccess("readonly")
if mibBuilder.loadTexts: changerDevice_ElementName.setStatus('mandatory')
changerDevice_Caption = MibScalar((1, 3, 6, 1, 4, 1, 14851, 3, 1, 11, 2, 1, 5), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 64))).setLabel("changerDevice-Caption").setMaxAccess("readonly")
if mibBuilder.loadTexts: changerDevice_Caption.setStatus('mandatory')
changerDevice_Description = MibScalar((1, 3, 6, 1, 4, 1, 14851, 3, 1, 11, 2, 1, 6), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 255))).setLabel("changerDevice-Description").setMaxAccess("readonly")
if mibBuilder.loadTexts: changerDevice_Description.setStatus('mandatory')
changerDevice_Availability = MibScalar((1, 3, 6, 1, 4, 1, 14851, 3, 1, 11, 2, 1, 8), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21))).clone(namedValues=NamedValues(("other", 1), ("unknown", 2), ("runningFullPower", 3), ("warning", 4), ("inTest", 5), ("notApplicable", 6), ("powerOff", 7), ("offLine", 8), ("offDuty", 9), ("degraded", 10), ("notInstalled", 11), ("installError", 12), ("powerSaveUnknown", 13), ("powerSaveLowPowerMode", 14), ("powerSaveStandby", 15), ("powerCycle", 16), ("powerSaveWarning", 17), ("paused", 18), ("notReady", 19), ("notConfigured", 20), ("quiesced", 21)))).setLabel("changerDevice-Availability").setMaxAccess("readonly")
if mibBuilder.loadTexts: changerDevice_Availability.setStatus('mandatory')
changerDevice_OperationalStatus = MibScalar((1, 3, 6, 1, 4, 1, 14851, 3, 1, 11, 2, 1, 9), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 32768))).clone(namedValues=NamedValues(("unknown", 0), ("other", 1), ("ok", 2), ("degraded", 3), ("stressed", 4), ("predictiveFailure", 5), ("error", 6), ("non-RecoverableError", 7), ("starting", 8), ("stopping", 9), ("stopped", 10), ("inService", 11), ("noContact", 12), ("lostCommunication", 13), ("aborted", 14), ("dormant", 15), ("supportingEntityInError", 16), ("completed", 17), ("powerMode", 18), ("dMTFReserved", 19), ("vendorReserved", 32768)))).setLabel("changerDevice-OperationalStatus").setMaxAccess("readonly")
if mibBuilder.loadTexts: changerDevice_OperationalStatus.setStatus('mandatory')
changerDevice_Realizes_StorageLocationIndex = MibScalar((1, 3, 6, 1, 4, 1, 14851, 3, 1, 11, 2, 1, 10), UINT32()).setLabel("changerDevice-Realizes-StorageLocationIndex").setMaxAccess("readonly")
if mibBuilder.loadTexts: changerDevice_Realizes_StorageLocationIndex.setStatus('mandatory')
scsiProtocolControllerGroup = MibIdentifier((1, 3, 6, 1, 4, 1, 14851, 3, 1, 12))
numberOfSCSIProtocolControllers = MibScalar((1, 3, 6, 1, 4, 1, 14851, 3, 1, 12, 1), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: numberOfSCSIProtocolControllers.setStatus('mandatory')
scsiProtocolControllerTable = MibTable((1, 3, 6, 1, 4, 1, 14851, 3, 1, 12, 2), )
if mibBuilder.loadTexts: scsiProtocolControllerTable.setStatus('mandatory')
scsiProtocolControllerEntry = MibTableRow((1, 3, 6, 1, 4, 1, 14851, 3, 1, 12, 2, 1), ).setIndexNames((0, "SNIA-SML-MIB", "scsiProtocolControllerIndex"))
if mibBuilder.loadTexts: scsiProtocolControllerEntry.setStatus('mandatory')
scsiProtocolControllerIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 14851, 3, 1, 12, 2, 1, 1), UINT32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: scsiProtocolControllerIndex.setStatus('mandatory')
scsiProtocolController_DeviceID = MibScalar((1, 3, 6, 1, 4, 1, 14851, 3, 1, 12, 2, 1, 2), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 64))).setLabel("scsiProtocolController-DeviceID").setMaxAccess("readonly")
if mibBuilder.loadTexts: scsiProtocolController_DeviceID.setStatus('mandatory')
scsiProtocolController_ElementName = MibScalar((1, 3, 6, 1, 4, 1, 14851, 3, 1, 12, 2, 1, 3), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 255))).setLabel("scsiProtocolController-ElementName").setMaxAccess("readonly")
if mibBuilder.loadTexts: scsiProtocolController_ElementName.setStatus('mandatory')
scsiProtocolController_OperationalStatus = MibScalar((1, 3, 6, 1, 4, 1, 14851, 3, 1, 12, 2, 1, 4), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 32768))).clone(namedValues=NamedValues(("unknown", 0), ("other", 1), ("ok", 2), ("degraded", 3), ("stressed", 4), ("predictiveFailure", 5), ("error", 6), ("non-RecoverableError", 7), ("starting", 8), ("stopping", 9), ("stopped", 10), ("inService", 11), ("noContact", 12), ("lostCommunication", 13), ("aborted", 14), ("dormant", 15), ("supportingEntityInError", 16), ("completed", 17), ("powerMode", 18), ("dMTFReserved", 19), ("vendorReserved", 32768)))).setLabel("scsiProtocolController-OperationalStatus").setMaxAccess("readonly")
if mibBuilder.loadTexts: scsiProtocolController_OperationalStatus.setStatus('mandatory')
scsiProtocolController_Description = MibScalar((1, 3, 6, 1, 4, 1, 14851, 3, 1, 12, 2, 1, 5), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 255))).setLabel("scsiProtocolController-Description").setMaxAccess("readonly")
if mibBuilder.loadTexts: scsiProtocolController_Description.setStatus('mandatory')
scsiProtocolController_Availability = MibScalar((1, 3, 6, 1, 4, 1, 14851, 3, 1, 12, 2, 1, 6), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21))).clone(namedValues=NamedValues(("other", 1), ("unknown", 2), ("runningFullPower", 3), ("warning", 4), ("inTest", 5), ("notApplicable", 6), ("powerOff", 7), ("offLine", 8), ("offDuty", 9), ("degraded", 10), ("notInstalled", 11), ("installError", 12), ("powerSaveUnknown", 13), ("powerSaveLowPowerMode", 14), ("powerSaveStandby", 15), ("powerCycle", 16), ("powerSaveWarning", 17), ("paused", 18), ("notReady", 19), ("notConfigured", 20), ("quiesced", 21)))).setLabel("scsiProtocolController-Availability").setMaxAccess("readonly")
if mibBuilder.loadTexts: scsiProtocolController_Availability.setStatus('mandatory')
scsiProtocolController_Realizes_ChangerDeviceIndex = MibScalar((1, 3, 6, 1, 4, 1, 14851, 3, 1, 12, 2, 1, 7), UINT32()).setLabel("scsiProtocolController-Realizes-ChangerDeviceIndex").setMaxAccess("readonly")
if mibBuilder.loadTexts: scsiProtocolController_Realizes_ChangerDeviceIndex.setStatus('mandatory')
scsiProtocolController_Realizes_MediaAccessDeviceIndex = MibScalar((1, 3, 6, 1, 4, 1, 14851, 3, 1, 12, 2, 1, 8), UINT32()).setLabel("scsiProtocolController-Realizes-MediaAccessDeviceIndex").setMaxAccess("readonly")
if mibBuilder.loadTexts: scsiProtocolController_Realizes_MediaAccessDeviceIndex.setStatus('mandatory')
storageMediaLocationGroup = MibIdentifier((1, 3, 6, 1, 4, 1, 14851, 3, 1, 13))
numberOfStorageMediaLocations = MibScalar((1, 3, 6, 1, 4, 1, 14851, 3, 1, 13, 1), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: numberOfStorageMediaLocations.setStatus('mandatory')
numberOfPhysicalMedias = MibScalar((1, 3, 6, 1, 4, 1, 14851, 3, 1, 13, 2), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: numberOfPhysicalMedias.setStatus('mandatory')
storageMediaLocationTable = MibTable((1, 3, 6, 1, 4, 1, 14851, 3, 1, 13, 3), )
if mibBuilder.loadTexts: storageMediaLocationTable.setStatus('mandatory')
storageMediaLocationEntry = MibTableRow((1, 3, 6, 1, 4, 1, 14851, 3, 1, 13, 3, 1), ).setIndexNames((0, "SNIA-SML-MIB", "storageMediaLocationIndex"))
if mibBuilder.loadTexts: storageMediaLocationEntry.setStatus('mandatory')
storageMediaLocationIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 14851, 3, 1, 13, 3, 1, 1), UINT32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: storageMediaLocationIndex.setStatus('mandatory')
storageMediaLocation_Tag = MibScalar((1, 3, 6, 1, 4, 1, 14851, 3, 1, 13, 3, 1, 2), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 255))).setLabel("storageMediaLocation-Tag").setMaxAccess("readonly")
if mibBuilder.loadTexts: storageMediaLocation_Tag.setStatus('mandatory')
storageMediaLocation_LocationType = MibScalar((1, 3, 6, 1, 4, 1, 14851, 3, 1, 13, 3, 1, 3), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 1, 2, 3, 4, 5, 6, 7, 8, 9))).clone(namedValues=NamedValues(("unknown", 0), ("other", 1), ("slot", 2), ("magazine", 3), ("mediaAccessDevice", 4), ("interLibraryPort", 5), ("limitedAccessPort", 6), ("door", 7), ("shelf", 8), ("vault", 9)))).setLabel("storageMediaLocation-LocationType").setMaxAccess("readonly")
if mibBuilder.loadTexts: storageMediaLocation_LocationType.setStatus('mandatory')
storageMediaLocation_LocationCoordinates = MibScalar((1, 3, 6, 1, 4, 1, 14851, 3, 1, 13, 3, 1, 4), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 255))).setLabel("storageMediaLocation-LocationCoordinates").setMaxAccess("readonly")
if mibBuilder.loadTexts: storageMediaLocation_LocationCoordinates.setStatus('mandatory')
storageMediaLocation_MediaTypesSupported = MibScalar((1, 3, 6, 1, 4, 1, 14851, 3, 1, 13, 3, 1, 5), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66))).clone(namedValues=NamedValues(("unknown", 0), ("other", 1), ("tape", 2), ("qic", 3), ("ait", 4), ("dtf", 5), ("dat", 6), ("eightmmTape", 7), ("nineteenmmTape", 8), ("dlt", 9), ("halfInchMO", 10), ("catridgeDisk", 11), ("jazDisk", 12), ("zipDisk", 13), ("syQuestDisk", 14), ("winchesterDisk", 15), ("cdRom", 16), ("cdRomXA", 17), ("cdI", 18), ("cdRecordable", 19), ("wORM", 20), ("magneto-Optical", 21), ("dvd", 22), ("dvdRWPlus", 23), ("dvdRAM", 24), ("dvdROM", 25), ("dvdVideo", 26), ("divx", 27), ("floppyDiskette", 28), ("hardDisk", 29), ("memoryCard", 30), ("hardCopy", 31), ("clikDisk", 32), ("cdRW", 33), ("cdDA", 34), ("cdPlus", 35), ("dvdRecordable", 36), ("dvdRW", 37), ("dvdAudio", 38), ("dvd5", 39), ("dvd9", 40), ("dvd10", 41), ("dvd18", 42), ("moRewriteable", 43), ("moWriteOnce", 44), ("moLIMDOW", 45), ("phaseChangeWO", 46), ("phaseChangeRewriteable", 47), ("phaseChangeDualRewriteable", 48), ("ablativeWriteOnce", 49), ("nearField", 50), ("miniQic", 51), ("travan", 52), ("eightmmMetal", 53), ("eightmmAdvanced", 54), ("nctp", 55), ("ltoUltrium", 56), ("ltoAccelis", 57), ("tape9Track", 58), ("tape18Track", 59), ("tape36Track", 60), ("magstar3590", 61), ("magstarMP", 62), ("d2Tape", 63), ("dstSmall", 64), ("dstMedium", 65), ("dstLarge", 66)))).setLabel("storageMediaLocation-MediaTypesSupported").setMaxAccess("readonly")
if mibBuilder.loadTexts: storageMediaLocation_MediaTypesSupported.setStatus('mandatory')
storageMediaLocation_MediaCapacity = MibScalar((1, 3, 6, 1, 4, 1, 14851, 3, 1, 13, 3, 1, 6), UINT32()).setLabel("storageMediaLocation-MediaCapacity").setMaxAccess("readonly")
if mibBuilder.loadTexts: storageMediaLocation_MediaCapacity.setStatus('mandatory')
storageMediaLocation_Association_ChangerDeviceIndex = MibScalar((1, 3, 6, 1, 4, 1, 14851, 3, 1, 13, 3, 1, 7), UINT32()).setLabel("storageMediaLocation-Association-ChangerDeviceIndex").setMaxAccess("readonly")
if mibBuilder.loadTexts: storageMediaLocation_Association_ChangerDeviceIndex.setStatus('mandatory')
storageMediaLocation_PhysicalMediaPresent = MibScalar((1, 3, 6, 1, 4, 1, 14851, 3, 1, 13, 3, 1, 10), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("true", 1), ("false", 2)))).setLabel("storageMediaLocation-PhysicalMediaPresent").setMaxAccess("readonly")
if mibBuilder.loadTexts: storageMediaLocation_PhysicalMediaPresent.setStatus('mandatory')
storageMediaLocation_PhysicalMedia_Removable = MibScalar((1, 3, 6, 1, 4, 1, 14851, 3, 1, 13, 3, 1, 11), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 1, 2))).clone(namedValues=NamedValues(("unknown", 0), ("true", 1), ("false", 2)))).setLabel("storageMediaLocation-PhysicalMedia-Removable").setMaxAccess("readonly")
if mibBuilder.loadTexts: storageMediaLocation_PhysicalMedia_Removable.setStatus('mandatory')
storageMediaLocation_PhysicalMedia_Replaceable = MibScalar((1, 3, 6, 1, 4, 1, 14851, 3, 1, 13, 3, 1, 12), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 1, 2))).clone(namedValues=NamedValues(("unknown", 0), ("true", 1), ("false", 2)))).setLabel("storageMediaLocation-PhysicalMedia-Replaceable").setMaxAccess("readonly")
if mibBuilder.loadTexts: storageMediaLocation_PhysicalMedia_Replaceable.setStatus('mandatory')
storageMediaLocation_PhysicalMedia_HotSwappable = MibScalar((1, 3, 6, 1, 4, 1, 14851, 3, 1, 13, 3, 1, 13), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 1, 2))).clone(namedValues=NamedValues(("unknown", 0), ("true", 1), ("false", 2)))).setLabel("storageMediaLocation-PhysicalMedia-HotSwappable").setMaxAccess("readonly")
if mibBuilder.loadTexts: storageMediaLocation_PhysicalMedia_HotSwappable.setStatus('mandatory')
storageMediaLocation_PhysicalMedia_Capacity = MibScalar((1, 3, 6, 1, 4, 1, 14851, 3, 1, 13, 3, 1, 14), UINT64()).setLabel("storageMediaLocation-PhysicalMedia-Capacity").setMaxAccess("readonly")
if mibBuilder.loadTexts: storageMediaLocation_PhysicalMedia_Capacity.setStatus('mandatory')
storageMediaLocation_PhysicalMedia_MediaType = MibScalar((1, 3, 6, 1, 4, 1, 14851, 3, 1, 13, 3, 1, 15), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66))).clone(namedValues=NamedValues(("unknown", 0), ("other", 1), ("tape", 2), ("qic", 3), ("ait", 4), ("dtf", 5), ("dat", 6), ("eightmmTape", 7), ("nineteenmmTape", 8), ("dlt", 9), ("halfInchMO", 10), ("catridgeDisk", 11), ("jazDisk", 12), ("zipDisk", 13), ("syQuestDisk", 14), ("winchesterDisk", 15), ("cdRom", 16), ("cdRomXA", 17), ("cdI", 18), ("cdRecordable", 19), ("wORM", 20), ("magneto-Optical", 21), ("dvd", 22), ("dvdRWPlus", 23), ("dvdRAM", 24), ("dvdROM", 25), ("dvdVideo", 26), ("divx", 27), ("floppyDiskette", 28), ("hardDisk", 29), ("memoryCard", 30), ("hardCopy", 31), ("clikDisk", 32), ("cdRW", 33), ("cdDA", 34), ("cdPlus", 35), ("dvdRecordable", 36), ("dvdRW", 37), ("dvdAudio", 38), ("dvd5", 39), ("dvd9", 40), ("dvd10", 41), ("dvd18", 42), ("moRewriteable", 43), ("moWriteOnce", 44), ("moLIMDOW", 45), ("phaseChangeWO", 46), ("phaseChangeRewriteable", 47), ("phaseChangeDualRewriteable", 48), ("ablativeWriteOnce", 49), ("nearField", 50), ("miniQic", 51), ("travan", 52), ("eightmmMetal", 53), ("eightmmAdvanced", 54), ("nctp", 55), ("ltoUltrium", 56), ("ltoAccelis", 57), ("tape9Track", 58), ("tape18Track", 59), ("tape36Track", 60), ("magstar3590", 61), ("magstarMP", 62), ("d2Tape", 63), ("dstSmall", 64), ("dstMedium", 65), ("dstLarge", 66)))).setLabel("storageMediaLocation-PhysicalMedia-MediaType").setMaxAccess("readonly")
if mibBuilder.loadTexts: storageMediaLocation_PhysicalMedia_MediaType.setStatus('mandatory')
storageMediaLocation_PhysicalMedia_MediaDescription = MibScalar((1, 3, 6, 1, 4, 1, 14851, 3, 1, 13, 3, 1, 16), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 255))).setLabel("storageMediaLocation-PhysicalMedia-MediaDescription").setMaxAccess("readonly")
if mibBuilder.loadTexts: storageMediaLocation_PhysicalMedia_MediaDescription.setStatus('mandatory')
storageMediaLocation_PhysicalMedia_CleanerMedia = MibScalar((1, 3, 6, 1, 4, 1, 14851, 3, 1, 13, 3, 1, 17), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 1, 2))).clone(namedValues=NamedValues(("unknown", 0), ("true", 1), ("false", 2)))).setLabel("storageMediaLocation-PhysicalMedia-CleanerMedia").setMaxAccess("readonly")
if mibBuilder.loadTexts: storageMediaLocation_PhysicalMedia_CleanerMedia.setStatus('mandatory')
storageMediaLocation_PhysicalMedia_DualSided = MibScalar((1, 3, 6, 1, 4, 1, 14851, 3, 1, 13, 3, 1, 18), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 1, 2))).clone(namedValues=NamedValues(("unknown", 0), ("true", 1), ("false", 2)))).setLabel("storageMediaLocation-PhysicalMedia-DualSided").setMaxAccess("readonly")
if mibBuilder.loadTexts: storageMediaLocation_PhysicalMedia_DualSided.setStatus('mandatory')
storageMediaLocation_PhysicalMedia_PhysicalLabel = MibScalar((1, 3, 6, 1, 4, 1, 14851, 3, 1, 13, 3, 1, 19), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 255))).setLabel("storageMediaLocation-PhysicalMedia-PhysicalLabel").setMaxAccess("readonly")
if mibBuilder.loadTexts: storageMediaLocation_PhysicalMedia_PhysicalLabel.setStatus('mandatory')
storageMediaLocation_PhysicalMedia_Tag = MibScalar((1, 3, 6, 1, 4, 1, 14851, 3, 1, 13, 3, 1, 20), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 255))).setLabel("storageMediaLocation-PhysicalMedia-Tag").setMaxAccess("readonly")
if mibBuilder.loadTexts: storageMediaLocation_PhysicalMedia_Tag.setStatus('mandatory')
limitedAccessPortGroup = MibIdentifier((1, 3, 6, 1, 4, 1, 14851, 3, 1, 14))
numberOflimitedAccessPorts = MibScalar((1, 3, 6, 1, 4, 1, 14851, 3, 1, 14, 1), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: numberOflimitedAccessPorts.setStatus('mandatory')
limitedAccessPortTable = MibTable((1, 3, 6, 1, 4, 1, 14851, 3, 1, 14, 2), )
if mibBuilder.loadTexts: limitedAccessPortTable.setStatus('mandatory')
limitedAccessPortEntry = MibTableRow((1, 3, 6, 1, 4, 1, 14851, 3, 1, 14, 2, 1), ).setIndexNames((0, "SNIA-SML-MIB", "limitedAccessPortIndex"))
if mibBuilder.loadTexts: limitedAccessPortEntry.setStatus('mandatory')
limitedAccessPortIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 14851, 3, 1, 14, 2, 1, 1), UINT32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: limitedAccessPortIndex.setStatus('mandatory')
limitedAccessPort_DeviceID = MibScalar((1, 3, 6, 1, 4, 1, 14851, 3, 1, 14, 2, 1, 2), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 64))).setLabel("limitedAccessPort-DeviceID").setMaxAccess("readonly")
if mibBuilder.loadTexts: limitedAccessPort_DeviceID.setStatus('mandatory')
limitedAccessPort_Extended = MibScalar((1, 3, 6, 1, 4, 1, 14851, 3, 1, 14, 2, 1, 3), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("true", 1), ("false", 2)))).setLabel("limitedAccessPort-Extended").setMaxAccess("readonly")
if mibBuilder.loadTexts: limitedAccessPort_Extended.setStatus('mandatory')
limitedAccessPort_ElementName = MibScalar((1, 3, 6, 1, 4, 1, 14851, 3, 1, 14, 2, 1, 4), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 255))).setLabel("limitedAccessPort-ElementName").setMaxAccess("readonly")
if mibBuilder.loadTexts: limitedAccessPort_ElementName.setStatus('mandatory')
limitedAccessPort_Caption = MibScalar((1, 3, 6, 1, 4, 1, 14851, 3, 1, 14, 2, 1, 5), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 64))).setLabel("limitedAccessPort-Caption").setMaxAccess("readonly")
if mibBuilder.loadTexts: limitedAccessPort_Caption.setStatus('mandatory')
limitedAccessPort_Description = MibScalar((1, 3, 6, 1, 4, 1, 14851, 3, 1, 14, 2, 1, 6), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 255))).setLabel("limitedAccessPort-Description").setMaxAccess("readonly")
if mibBuilder.loadTexts: limitedAccessPort_Description.setStatus('mandatory')
limitedAccessPort_Realizes_StorageLocationIndex = MibScalar((1, 3, 6, 1, 4, 1, 14851, 3, 1, 14, 2, 1, 7), UINT32()).setLabel("limitedAccessPort-Realizes-StorageLocationIndex").setMaxAccess("readonly")
if mibBuilder.loadTexts: limitedAccessPort_Realizes_StorageLocationIndex.setStatus('mandatory')
fCPortGroup = MibIdentifier((1, 3, 6, 1, 4, 1, 14851, 3, 1, 15))
numberOffCPorts = MibScalar((1, 3, 6, 1, 4, 1, 14851, 3, 1, 15, 1), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: numberOffCPorts.setStatus('mandatory')
fCPortTable = MibTable((1, 3, 6, 1, 4, 1, 14851, 3, 1, 15, 2), )
if mibBuilder.loadTexts: fCPortTable.setStatus('mandatory')
fCPortEntry = MibTableRow((1, 3, 6, 1, 4, 1, 14851, 3, 1, 15, 2, 1), ).setIndexNames((0, "SNIA-SML-MIB", "fCPortIndex"))
if mibBuilder.loadTexts: fCPortEntry.setStatus('mandatory')
fCPortIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 14851, 3, 1, 15, 2, 1, 1), UINT32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: fCPortIndex.setStatus('mandatory')
fCPort_DeviceID = MibScalar((1, 3, 6, 1, 4, 1, 14851, 3, 1, 15, 2, 1, 2), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 64))).setLabel("fCPort-DeviceID").setMaxAccess("readonly")
if mibBuilder.loadTexts: fCPort_DeviceID.setStatus('mandatory')
fCPort_ElementName = MibScalar((1, 3, 6, 1, 4, 1, 14851, 3, 1, 15, 2, 1, 3), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 255))).setLabel("fCPort-ElementName").setMaxAccess("readonly")
if mibBuilder.loadTexts: fCPort_ElementName.setStatus('mandatory')
fCPort_Caption = MibScalar((1, 3, 6, 1, 4, 1, 14851, 3, 1, 15, 2, 1, 4), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 64))).setLabel("fCPort-Caption").setMaxAccess("readonly")
if mibBuilder.loadTexts: fCPort_Caption.setStatus('mandatory')
fCPort_Description = MibScalar((1, 3, 6, 1, 4, 1, 14851, 3, 1, 15, 2, 1, 5), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 255))).setLabel("fCPort-Description").setMaxAccess("readonly")
if mibBuilder.loadTexts: fCPort_Description.setStatus('mandatory')
fCPortController_OperationalStatus = MibScalar((1, 3, 6, 1, 4, 1, 14851, 3, 1, 15, 2, 1, 6), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 32768))).clone(namedValues=NamedValues(("unknown", 0), ("other", 1), ("ok", 2), ("degraded", 3), ("stressed", 4), ("predictiveFailure", 5), ("error", 6), ("non-RecoverableError", 7), ("starting", 8), ("stopping", 9), ("stopped", 10), ("inService", 11), ("noContact", 12), ("lostCommunication", 13), ("aborted", 14), ("dormant", 15), ("supportingEntityInError", 16), ("completed", 17), ("powerMode", 18), ("dMTFReserved", 19), ("vendorReserved", 32768)))).setLabel("fCPortController-OperationalStatus").setMaxAccess("readonly")
if mibBuilder.loadTexts: fCPortController_OperationalStatus.setStatus('mandatory')
fCPort_PermanentAddress = MibScalar((1, 3, 6, 1, 4, 1, 14851, 3, 1, 15, 2, 1, 7), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 64))).setLabel("fCPort-PermanentAddress").setMaxAccess("readonly")
if mibBuilder.loadTexts: fCPort_PermanentAddress.setStatus('mandatory')
fCPort_Realizes_scsiProtocolControllerIndex = MibScalar((1, 3, 6, 1, 4, 1, 14851, 3, 1, 15, 2, 1, 8), UINT32()).setLabel("fCPort-Realizes-scsiProtocolControllerIndex").setMaxAccess("readonly")
if mibBuilder.loadTexts: fCPort_Realizes_scsiProtocolControllerIndex.setStatus('mandatory')
trapGroup = MibIdentifier((1, 3, 6, 1, 4, 1, 14851, 3, 1, 16))
trapsEnabled = MibScalar((1, 3, 6, 1, 4, 1, 14851, 3, 1, 16, 1), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("enabled", 1), ("disabled", 2)))).setMaxAccess("readwrite")
if mibBuilder.loadTexts: trapsEnabled.setStatus('mandatory')
trapDriveAlertSummary = MibScalar((1, 3, 6, 1, 4, 1, 14851, 3, 1, 16, 2), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60))).clone(namedValues=NamedValues(("readWarning", 1), ("writeWarning", 2), ("hardError", 3), ("media", 4), ("readFailure", 5), ("writeFailure", 6), ("mediaLife", 7), ("notDataGrade", 8), ("writeProtect", 9), ("noRemoval", 10), ("cleaningMedia", 11), ("unsupportedFormat", 12), ("recoverableSnappedTape", 13), ("unrecoverableSnappedTape", 14), ("memoryChipInCartridgeFailure", 15), ("forcedEject", 16), ("readOnlyFormat", 17), ("directoryCorruptedOnLoad", 18), ("nearingMediaLife", 19), ("cleanNow", 20), ("cleanPeriodic", 21), ("expiredCleaningMedia", 22), ("invalidCleaningMedia", 23), ("retentionRequested", 24), ("dualPortInterfaceError", 25), ("coolingFanError", 26), ("powerSupplyFailure", 27), ("powerConsumption", 28), ("driveMaintenance", 29), ("hardwareA", 30), ("hardwareB", 31), ("interface", 32), ("ejectMedia", 33), ("downloadFailure", 34), ("driveHumidity", 35), ("driveTemperature", 36), ("driveVoltage", 37), ("predictiveFailure", 38), ("diagnosticsRequired", 39), ("lostStatistics", 50), ("mediaDirectoryInvalidAtUnload", 51), ("mediaSystemAreaWriteFailure", 52), ("mediaSystemAreaReadFailure", 53), ("noStartOfData", 54), ("loadingFailure", 55), ("unrecoverableUnloadFailure", 56), ("automationInterfaceFailure", 57), ("firmwareFailure", 58), ("wormMediumIntegrityCheckFailed", 59), ("wormMediumOverwriteAttempted", 60)))).setMaxAccess("readonly")
if mibBuilder.loadTexts: trapDriveAlertSummary.setStatus('mandatory')
trap_Association_MediaAccessDeviceIndex = MibScalar((1, 3, 6, 1, 4, 1, 14851, 3, 1, 16, 3), UINT32()).setLabel("trap-Association-MediaAccessDeviceIndex").setMaxAccess("readonly")
if mibBuilder.loadTexts: trap_Association_MediaAccessDeviceIndex.setStatus('mandatory')
trapChangerAlertSummary = MibScalar((1, 3, 6, 1, 4, 1, 14851, 3, 1, 16, 4), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32))).clone(namedValues=NamedValues(("libraryHardwareA", 1), ("libraryHardwareB", 2), ("libraryHardwareC", 3), ("libraryHardwareD", 4), ("libraryDiagnosticsRequired", 5), ("libraryInterface", 6), ("failurePrediction", 7), ("libraryMaintenance", 8), ("libraryHumidityLimits", 9), ("libraryTemperatureLimits", 10), ("libraryVoltageLimits", 11), ("libraryStrayMedia", 12), ("libraryPickRetry", 13), ("libraryPlaceRetry", 14), ("libraryLoadRetry", 15), ("libraryDoor", 16), ("libraryMailslot", 17), ("libraryMagazine", 18), ("librarySecurity", 19), ("librarySecurityMode", 20), ("libraryOffline", 21), ("libraryDriveOffline", 22), ("libraryScanRetry", 23), ("libraryInventory", 24), ("libraryIllegalOperation", 25), ("dualPortInterfaceError", 26), ("coolingFanFailure", 27), ("powerSupply", 28), ("powerConsumption", 29), ("passThroughMechanismFailure", 30), ("cartridgeInPassThroughMechanism", 31), ("unreadableBarCodeLabels", 32)))).setMaxAccess("readonly")
if mibBuilder.loadTexts: trapChangerAlertSummary.setStatus('mandatory')
trap_Association_ChangerDeviceIndex = MibScalar((1, 3, 6, 1, 4, 1, 14851, 3, 1, 16, 5), UINT32()).setLabel("trap-Association-ChangerDeviceIndex").setMaxAccess("readonly")
if mibBuilder.loadTexts: trap_Association_ChangerDeviceIndex.setStatus('mandatory')
trapPerceivedSeverity = MibScalar((1, 3, 6, 1, 4, 1, 14851, 3, 1, 16, 6), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 1, 2, 3, 4, 5, 6, 7))).clone(namedValues=NamedValues(("unknown", 0), ("other", 1), ("information", 2), ("degradedWarning", 3), ("minor", 4), ("major", 5), ("critical", 6), ("fatalNonRecoverable", 7)))).setMaxAccess("readonly")
if mibBuilder.loadTexts: trapPerceivedSeverity.setStatus('mandatory')
trapDestinationTable = MibTable((1, 3, 6, 1, 4, 1, 14851, 3, 1, 16, 7), )
if mibBuilder.loadTexts: trapDestinationTable.setStatus('mandatory')
trapDestinationEntry = MibTableRow((1, 3, 6, 1, 4, 1, 14851, 3, 1, 16, 7, 1), ).setIndexNames((0, "SNIA-SML-MIB", "numberOfTrapDestinations"))
if mibBuilder.loadTexts: trapDestinationEntry.setStatus('mandatory')
numberOfTrapDestinations = MibTableColumn((1, 3, 6, 1, 4, 1, 14851, 3, 1, 16, 7, 1, 1), Integer32()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: numberOfTrapDestinations.setStatus('mandatory')
trapDestinationHostType = MibTableColumn((1, 3, 6, 1, 4, 1, 14851, 3, 1, 16, 7, 1, 2), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("iPv4", 1), ("iPv6", 2)))).setMaxAccess("readwrite")
if mibBuilder.loadTexts: trapDestinationHostType.setStatus('mandatory')
trapDestinationHostAddr = MibTableColumn((1, 3, 6, 1, 4, 1, 14851, 3, 1, 16, 7, 1, 3), DisplayString()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: trapDestinationHostAddr.setStatus('mandatory')
trapDestinationPort = MibTableColumn((1, 3, 6, 1, 4, 1, 14851, 3, 1, 16, 7, 1, 4), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 65535))).setMaxAccess("readwrite")
if mibBuilder.loadTexts: trapDestinationPort.setStatus('mandatory')
driveAlert = NotificationType((1, 3, 6, 1, 4, 1, 14851, 3, 1) + (0,0)).setObjects(("SNIA-SML-MIB", "trapDriveAlertSummary"), ("SNIA-SML-MIB", "trap_Association_MediaAccessDeviceIndex"), ("SNIA-SML-MIB", "trapPerceivedSeverity"))
changerAlert = NotificationType((1, 3, 6, 1, 4, 1, 14851, 3, 1) + (0,1)).setObjects(("SNIA-SML-MIB", "trapChangerAlertSummary"), ("SNIA-SML-MIB", "trap_Association_ChangerDeviceIndex"), ("SNIA-SML-MIB", "trapPerceivedSeverity"))
trapObjects = MibIdentifier((1, 3, 6, 1, 4, 1, 14851, 3, 1, 16, 8))
currentOperationalStatus = MibScalar((1, 3, 6, 1, 4, 1, 14851, 3, 1, 16, 8, 1), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 32768))).clone(namedValues=NamedValues(("unknown", 0), ("other", 1), ("ok", 2), ("degraded", 3), ("stressed", 4), ("predictiveFailure", 5), ("error", 6), ("non-RecoverableError", 7), ("starting", 8), ("stopping", 9), ("stopped", 10), ("inService", 11), ("noContact", 12), ("lostCommunication", 13), ("aborted", 14), ("dormant", 15), ("supportingEntityInError", 16), ("completed", 17), ("powerMode", 18), ("dMTFReserved", 19), ("vendorReserved", 32768)))).setMaxAccess("readonly")
if mibBuilder.loadTexts: currentOperationalStatus.setStatus('mandatory')
oldOperationalStatus = MibScalar((1, 3, 6, 1, 4, 1, 14851, 3, 1, 16, 8, 2), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 32768))).clone(namedValues=NamedValues(("unknown", 0), ("other", 1), ("ok", 2), ("degraded", 3), ("stressed", 4), ("predictiveFailure", 5), ("error", 6), ("non-RecoverableError", 7), ("starting", 8), ("stopping", 9), ("stopped", 10), ("inService", 11), ("noContact", 12), ("lostCommunication", 13), ("aborted", 14), ("dormant", 15), ("supportingEntityInError", 16), ("completed", 17), ("powerMode", 18), ("dMTFReserved", 19), ("vendorReserved", 32768)))).setMaxAccess("readonly")
if mibBuilder.loadTexts: oldOperationalStatus.setStatus('mandatory')
libraryAddedTrap = NotificationType((1, 3, 6, 1, 4, 1, 14851, 3, 1, 16) + (0,3)).setObjects(("SNIA-SML-MIB", "storageLibrary_Name"))
libraryDeletedTrap = NotificationType((1, 3, 6, 1, 4, 1, 14851, 3, 1, 16) + (0,4)).setObjects(("SNIA-SML-MIB", "storageLibrary_Name"))
libraryOpStatusChangedTrap = NotificationType((1, 3, 6, 1, 4, 1, 14851, 3, 1, 16) + (0,5)).setObjects(("SNIA-SML-MIB", "storageLibrary_Name"), ("SNIA-SML-MIB", "currentOperationalStatus"), ("SNIA-SML-MIB", "oldOperationalStatus"))
driveAddedTrap = NotificationType((1, 3, 6, 1, 4, 1, 14851, 3, 1, 16) + (0,6)).setObjects(("SNIA-SML-MIB", "storageLibrary_Name"), ("SNIA-SML-MIB", "mediaAccessDevice_DeviceID"))
driveDeletedTrap = NotificationType((1, 3, 6, 1, 4, 1, 14851, 3, 1, 16) + (0,7)).setObjects(("SNIA-SML-MIB", "storageLibrary_Name"), ("SNIA-SML-MIB", "mediaAccessDevice_DeviceID"))
driveOpStatusChangedTrap = NotificationType((1, 3, 6, 1, 4, 1, 14851, 3, 1, 16) + (0,8)).setObjects(("SNIA-SML-MIB", "storageLibrary_Name"), ("SNIA-SML-MIB", "mediaAccessDevice_DeviceID"), ("SNIA-SML-MIB", "currentOperationalStatus"), ("SNIA-SML-MIB", "oldOperationalStatus"))
changerAddedTrap = NotificationType((1, 3, 6, 1, 4, 1, 14851, 3, 1, 16) + (0,9)).setObjects(("SNIA-SML-MIB", "storageLibrary_Name"), ("SNIA-SML-MIB", "changerDevice_DeviceID"))
changerDeletedTrap = NotificationType((1, 3, 6, 1, 4, 1, 14851, 3, 1, 16) + (0,10)).setObjects(("SNIA-SML-MIB", "storageLibrary_Name"), ("SNIA-SML-MIB", "changerDevice_DeviceID"))
changerOpStatusChangedTrap = NotificationType((1, 3, 6, 1, 4, 1, 14851, 3, 1, 16) + (0,11)).setObjects(("SNIA-SML-MIB", "storageLibrary_Name"), ("SNIA-SML-MIB", "changerDevice_DeviceID"), ("SNIA-SML-MIB", "currentOperationalStatus"), ("SNIA-SML-MIB", "oldOperationalStatus"))
physicalMediaAddedTrap = NotificationType((1, 3, 6, 1, 4, 1, 14851, 3, 1, 16) + (0,12)).setObjects(("SNIA-SML-MIB", "storageMediaLocation_PhysicalMedia_Tag"))
physicalMediaDeletedTrap = NotificationType((1, 3, 6, 1, 4, 1, 14851, 3, 1, 16) + (0,13)).setObjects(("SNIA-SML-MIB", "storageMediaLocation_PhysicalMedia_Tag"))
endOfSmlMib = MibScalar((1, 3, 6, 1, 4, 1, 14851, 3, 1, 17), ObjectIdentifier())
if mibBuilder.loadTexts: endOfSmlMib.setStatus('mandatory')
mibBuilder.exportSymbols("SNIA-SML-MIB", storageMediaLocation_PhysicalMedia_CleanerMedia=storageMediaLocation_PhysicalMedia_CleanerMedia, scsiProtocolController_ElementName=scsiProtocolController_ElementName, smlCimVersion=smlCimVersion, product_ElementName=product_ElementName, physicalPackageIndex=physicalPackageIndex, trapDestinationPort=trapDestinationPort, trap_Association_ChangerDeviceIndex=trap_Association_ChangerDeviceIndex, storageLibrary_Caption=storageLibrary_Caption, experimental=experimental, numberOfSoftwareElements=numberOfSoftwareElements, changerDevice_Realizes_StorageLocationIndex=changerDevice_Realizes_StorageLocationIndex, storageMediaLocation_PhysicalMedia_DualSided=storageMediaLocation_PhysicalMedia_DualSided, storageMediaLocation_MediaCapacity=storageMediaLocation_MediaCapacity, subChassis_Manufacturer=subChassis_Manufacturer, chassis_SecurityBreach=chassis_SecurityBreach, scsiProtocolController_DeviceID=scsiProtocolController_DeviceID, mediaAccessDevice_DeviceID=mediaAccessDevice_DeviceID, storageMediaLocation_Association_ChangerDeviceIndex=storageMediaLocation_Association_ChangerDeviceIndex, driveAddedTrap=driveAddedTrap, subChassisIndex=subChassisIndex, subChassis_OperationalStatus=subChassis_OperationalStatus, mediaAccessDevice_MountCount=mediaAccessDevice_MountCount, storageMediaLocationEntry=storageMediaLocationEntry, product_Version=product_Version, mediaAccessDeviceGroup=mediaAccessDeviceGroup, scsiProtocolController_Realizes_MediaAccessDeviceIndex=scsiProtocolController_Realizes_MediaAccessDeviceIndex, trapDestinationHostType=trapDestinationHostType, softwareElementGroup=softwareElementGroup, limitedAccessPort_Extended=limitedAccessPort_Extended, softwareElement_Version=softwareElement_Version, driveOpStatusChangedTrap=driveOpStatusChangedTrap, CimDateTime=CimDateTime, smlMibVersion=smlMibVersion, physicalPackage_Model=physicalPackage_Model, mediaAccessDevice_Realizes_softwareElementIndex=mediaAccessDevice_Realizes_softwareElementIndex, changerDevice_Caption=changerDevice_Caption, scsiProtocolController_Description=scsiProtocolController_Description, mediaAccessDevice_PowerOnHours=mediaAccessDevice_PowerOnHours, libraryOpStatusChangedTrap=libraryOpStatusChangedTrap, physicalMediaAddedTrap=physicalMediaAddedTrap, changerDevice_Availability=changerDevice_Availability, trapGroup=trapGroup, fCPortGroup=fCPortGroup, changerDevice_Description=changerDevice_Description, subChassisEntry=subChassisEntry, fCPortIndex=fCPortIndex, storageMediaLocation_PhysicalMedia_Replaceable=storageMediaLocation_PhysicalMedia_Replaceable, subChassis_SecurityBreach=subChassis_SecurityBreach, storageLibrary_Name=storageLibrary_Name, numberOfSCSIProtocolControllers=numberOfSCSIProtocolControllers, storageLibraryGroup=storageLibraryGroup, computerSystem_OperationalStatus=computerSystem_OperationalStatus, storageMediaLocation_PhysicalMedia_Capacity=storageMediaLocation_PhysicalMedia_Capacity, driveAlert=driveAlert, limitedAccessPort_Realizes_StorageLocationIndex=limitedAccessPort_Realizes_StorageLocationIndex, storageMediaLocation_PhysicalMedia_MediaDescription=storageMediaLocation_PhysicalMedia_MediaDescription, changerDeviceIndex=changerDeviceIndex, numberOfTrapDestinations=numberOfTrapDestinations, limitedAccessPort_ElementName=limitedAccessPort_ElementName, numberOffCPorts=numberOffCPorts, scsiProtocolControllerEntry=scsiProtocolControllerEntry, chassis_IsLocked=chassis_IsLocked, numberOfMediaAccessDevices=numberOfMediaAccessDevices, scsiProtocolController_OperationalStatus=scsiProtocolController_OperationalStatus, changerAddedTrap=changerAddedTrap, trapDriveAlertSummary=trapDriveAlertSummary, trapDestinationHostAddr=trapDestinationHostAddr, physicalPackageGroup=physicalPackageGroup, softwareElementEntry=softwareElementEntry, trapPerceivedSeverity=trapPerceivedSeverity, trapsEnabled=trapsEnabled, UShortReal=UShortReal, fCPort_Caption=fCPort_Caption, subChassis_Model=subChassis_Model, scsiProtocolController_Realizes_ChangerDeviceIndex=scsiProtocolController_Realizes_ChangerDeviceIndex, computerSystem_Caption=computerSystem_Caption, product_IdentifyingNumber=product_IdentifyingNumber, mediaAccessDevice_TotalPowerOnHours=mediaAccessDevice_TotalPowerOnHours, storageMediaLocation_LocationType=storageMediaLocation_LocationType, limitedAccessPortEntry=limitedAccessPortEntry, computerSystem_Name=computerSystem_Name, numberOflimitedAccessPorts=numberOflimitedAccessPorts, numberOfPhysicalPackages=numberOfPhysicalPackages, limitedAccessPort_Description=limitedAccessPort_Description, storageMediaLocation_PhysicalMedia_Removable=storageMediaLocation_PhysicalMedia_Removable, computerSystem_PrimaryOwnerContact=computerSystem_PrimaryOwnerContact, storageMediaLocation_PhysicalMedia_PhysicalLabel=storageMediaLocation_PhysicalMedia_PhysicalLabel, limitedAccessPort_Caption=limitedAccessPort_Caption, productGroup=productGroup, fCPort_PermanentAddress=fCPort_PermanentAddress, libraryAddedTrap=libraryAddedTrap, computerSystem_NameFormat=computerSystem_NameFormat, smlRoot=smlRoot, oldOperationalStatus=oldOperationalStatus, libraries=libraries, mediaAccessDeviceEntry=mediaAccessDeviceEntry, softwareElement_InstanceID=softwareElement_InstanceID, UINT64=UINT64, mediaAccessDeviceIndex=mediaAccessDeviceIndex, storageLibrary_Description=storageLibrary_Description, numberOfPhysicalMedias=numberOfPhysicalMedias, changerDeviceGroup=changerDeviceGroup, changerAlert=changerAlert, mediaAccessDevice_Availability=mediaAccessDevice_Availability, storageMediaLocation_PhysicalMediaPresent=storageMediaLocation_PhysicalMediaPresent, fCPort_Description=fCPort_Description, softwareElement_CodeSet=softwareElement_CodeSet, storageMediaLocation_PhysicalMedia_HotSwappable=storageMediaLocation_PhysicalMedia_HotSwappable, fCPort_Realizes_scsiProtocolControllerIndex=fCPort_Realizes_scsiProtocolControllerIndex, softwareElement_Manufacturer=softwareElement_Manufacturer, changerDeviceEntry=changerDeviceEntry, mediaAccessDevice_Realizes_StorageLocationIndex=mediaAccessDevice_Realizes_StorageLocationIndex, scsiProtocolControllerIndex=scsiProtocolControllerIndex, driveDeletedTrap=driveDeletedTrap, storageMediaLocationGroup=storageMediaLocationGroup, softwareElement_IdentificationCode=softwareElement_IdentificationCode, chassis_ElementName=chassis_ElementName, computerSystemGroup=computerSystemGroup, storageMediaLocationTable=storageMediaLocationTable, subChassis_LockPresent=subChassis_LockPresent, subChassis_IsLocked=subChassis_IsLocked, numberOfStorageMediaLocations=numberOfStorageMediaLocations, trap_Association_MediaAccessDeviceIndex=trap_Association_MediaAccessDeviceIndex, fCPort_ElementName=fCPort_ElementName, UINT32=UINT32, trapChangerAlertSummary=trapChangerAlertSummary, storageMediaLocation_PhysicalMedia_Tag=storageMediaLocation_PhysicalMedia_Tag, endOfSmlMib=endOfSmlMib, softwareElementTable=softwareElementTable, numberOfChangerDevices=numberOfChangerDevices, changerDevice_DeviceID=changerDevice_DeviceID, mediaAccessDevice_Name=mediaAccessDevice_Name, softwareElement_SoftwareElementID=softwareElement_SoftwareElementID, mediaAccessDevice_Status=mediaAccessDevice_Status, limitedAccessPortIndex=limitedAccessPortIndex, product_Name=product_Name, storageLibrary_InstallDate=storageLibrary_InstallDate, subChassis_ElementName=subChassis_ElementName, mediaAccessDevice_OperationalStatus=mediaAccessDevice_OperationalStatus, storageMediaLocation_MediaTypesSupported=storageMediaLocation_MediaTypesSupported, mediaAccessDeviceObjectType=mediaAccessDeviceObjectType, mediaAccessDevice_NeedsCleaning=mediaAccessDevice_NeedsCleaning, physicalMediaDeletedTrap=physicalMediaDeletedTrap, chassis_Manufacturer=chassis_Manufacturer, subChassis_Tag=subChassis_Tag, computerSystem_Dedicated=computerSystem_Dedicated, computerSystem_Description=computerSystem_Description, fCPortController_OperationalStatus=fCPortController_OperationalStatus, snia=snia, changerDevice_MediaFlipSupported=changerDevice_MediaFlipSupported, limitedAccessPortGroup=limitedAccessPortGroup, currentOperationalStatus=currentOperationalStatus, computerSystem_ElementName=computerSystem_ElementName, physicalPackage_Manufacturer=physicalPackage_Manufacturer, scsiProtocolControllerTable=scsiProtocolControllerTable, physicalPackage_SerialNumber=physicalPackage_SerialNumber, computerSystem_Realizes_softwareElementIndex=computerSystem_Realizes_softwareElementIndex, physicalPackage_Realizes_MediaAccessDeviceIndex=physicalPackage_Realizes_MediaAccessDeviceIndex, chassis_LockPresent=chassis_LockPresent, softwareElement_LanguageEdition=softwareElement_LanguageEdition, trapObjects=trapObjects, subChassisTable=subChassisTable, softwareElement_Name=softwareElement_Name, changerDevice_ElementName=changerDevice_ElementName, fCPortTable=fCPortTable, mediaAccessDeviceTable=mediaAccessDeviceTable, softwareElement_SerialNumber=softwareElement_SerialNumber, fCPortEntry=fCPortEntry, storageMediaLocationIndex=storageMediaLocationIndex, physicalPackageEntry=physicalPackageEntry, softwareElement_BuildNumber=softwareElement_BuildNumber, subChassis_SerialNumber=subChassis_SerialNumber, changerDeviceTable=changerDeviceTable, libraryDeletedTrap=libraryDeletedTrap, chassis_Model=chassis_Model, trapDestinationEntry=trapDestinationEntry, scsiProtocolController_Availability=scsiProtocolController_Availability, changerDevice_OperationalStatus=changerDevice_OperationalStatus, changerDeletedTrap=changerDeletedTrap, limitedAccessPort_DeviceID=limitedAccessPort_DeviceID, trapDestinationTable=trapDestinationTable, numberOfsubChassis=numberOfsubChassis, storageMediaLocation_PhysicalMedia_MediaType=storageMediaLocation_PhysicalMedia_MediaType, chassis_Tag=chassis_Tag, scsiProtocolControllerGroup=scsiProtocolControllerGroup, fCPort_DeviceID=fCPort_DeviceID, chassisGroup=chassisGroup, physicalPackage_Tag=physicalPackage_Tag, limitedAccessPortTable=limitedAccessPortTable, computerSystem_PrimaryOwnerName=computerSystem_PrimaryOwnerName, subChassis_PackageType=subChassis_PackageType, UINT16=UINT16, product_Vendor=product_Vendor, chassis_SerialNumber=chassis_SerialNumber, changerOpStatusChangedTrap=changerOpStatusChangedTrap, softwareElementIndex=softwareElementIndex, storageLibrary_Status=storageLibrary_Status, storageMediaLocation_LocationCoordinates=storageMediaLocation_LocationCoordinates, storageMediaLocation_Tag=storageMediaLocation_Tag, physicalPackageTable=physicalPackageTable, common=common)
| (octet_string, integer, object_identifier) = mibBuilder.importSymbols('ASN1', 'OctetString', 'Integer', 'ObjectIdentifier')
(named_values,) = mibBuilder.importSymbols('ASN1-ENUMERATION', 'NamedValues')
(constraints_union, value_size_constraint, constraints_intersection, single_value_constraint, value_range_constraint) = mibBuilder.importSymbols('ASN1-REFINEMENT', 'ConstraintsUnion', 'ValueSizeConstraint', 'ConstraintsIntersection', 'SingleValueConstraint', 'ValueRangeConstraint')
(module_compliance, notification_group) = mibBuilder.importSymbols('SNMPv2-CONF', 'ModuleCompliance', 'NotificationGroup')
(notification_type, mib_identifier, object_identity, bits, iso, time_ticks, enterprises, mib_scalar, mib_table, mib_table_row, mib_table_column, integer32, counter32, gauge32, module_identity, counter64, unsigned32, ip_address) = mibBuilder.importSymbols('SNMPv2-SMI', 'NotificationType', 'MibIdentifier', 'ObjectIdentity', 'Bits', 'iso', 'TimeTicks', 'enterprises', 'MibScalar', 'MibTable', 'MibTableRow', 'MibTableColumn', 'Integer32', 'Counter32', 'Gauge32', 'ModuleIdentity', 'Counter64', 'Unsigned32', 'IpAddress')
(textual_convention, display_string) = mibBuilder.importSymbols('SNMPv2-TC', 'TextualConvention', 'DisplayString')
class Ushortreal(Integer32):
subtype_spec = Integer32.subtypeSpec + value_range_constraint(0, 65535)
class Cimdatetime(OctetString):
subtype_spec = OctetString.subtypeSpec + value_size_constraint(24, 24)
fixed_length = 24
class Uint64(OctetString):
subtype_spec = OctetString.subtypeSpec + value_size_constraint(8, 8)
fixed_length = 8
class Uint32(Integer32):
subtype_spec = Integer32.subtypeSpec + value_range_constraint(0, 2147483647)
class Uint16(Integer32):
subtype_spec = Integer32.subtypeSpec + value_range_constraint(0, 65535)
snia = mib_identifier((1, 3, 6, 1, 4, 1, 14851))
experimental = mib_identifier((1, 3, 6, 1, 4, 1, 14851, 1))
common = mib_identifier((1, 3, 6, 1, 4, 1, 14851, 2))
libraries = mib_identifier((1, 3, 6, 1, 4, 1, 14851, 3))
sml_root = mib_identifier((1, 3, 6, 1, 4, 1, 14851, 3, 1))
sml_mib_version = mib_scalar((1, 3, 6, 1, 4, 1, 14851, 3, 1, 1), display_string().subtype(subtypeSpec=value_size_constraint(0, 4))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
smlMibVersion.setStatus('mandatory')
sml_cim_version = mib_scalar((1, 3, 6, 1, 4, 1, 14851, 3, 1, 2), display_string().subtype(subtypeSpec=value_size_constraint(0, 4))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
smlCimVersion.setStatus('mandatory')
product_group = mib_identifier((1, 3, 6, 1, 4, 1, 14851, 3, 1, 3))
product__name = mib_scalar((1, 3, 6, 1, 4, 1, 14851, 3, 1, 3, 1), display_string().subtype(subtypeSpec=value_size_constraint(0, 255))).setLabel('product-Name').setMaxAccess('readonly')
if mibBuilder.loadTexts:
product_Name.setStatus('mandatory')
product__identifying_number = mib_scalar((1, 3, 6, 1, 4, 1, 14851, 3, 1, 3, 2), display_string().subtype(subtypeSpec=value_size_constraint(0, 255))).setLabel('product-IdentifyingNumber').setMaxAccess('readonly')
if mibBuilder.loadTexts:
product_IdentifyingNumber.setStatus('mandatory')
product__vendor = mib_scalar((1, 3, 6, 1, 4, 1, 14851, 3, 1, 3, 3), display_string().subtype(subtypeSpec=value_size_constraint(0, 255))).setLabel('product-Vendor').setMaxAccess('readonly')
if mibBuilder.loadTexts:
product_Vendor.setStatus('mandatory')
product__version = mib_scalar((1, 3, 6, 1, 4, 1, 14851, 3, 1, 3, 4), display_string().subtype(subtypeSpec=value_size_constraint(0, 255))).setLabel('product-Version').setMaxAccess('readonly')
if mibBuilder.loadTexts:
product_Version.setStatus('mandatory')
product__element_name = mib_scalar((1, 3, 6, 1, 4, 1, 14851, 3, 1, 3, 5), display_string().subtype(subtypeSpec=value_size_constraint(0, 255))).setLabel('product-ElementName').setMaxAccess('readonly')
if mibBuilder.loadTexts:
product_ElementName.setStatus('mandatory')
chassis_group = mib_identifier((1, 3, 6, 1, 4, 1, 14851, 3, 1, 4))
chassis__manufacturer = mib_scalar((1, 3, 6, 1, 4, 1, 14851, 3, 1, 4, 1), display_string().subtype(subtypeSpec=value_size_constraint(0, 255))).setLabel('chassis-Manufacturer').setMaxAccess('readonly')
if mibBuilder.loadTexts:
chassis_Manufacturer.setStatus('mandatory')
chassis__model = mib_scalar((1, 3, 6, 1, 4, 1, 14851, 3, 1, 4, 2), display_string().subtype(subtypeSpec=value_size_constraint(0, 64))).setLabel('chassis-Model').setMaxAccess('readonly')
if mibBuilder.loadTexts:
chassis_Model.setStatus('mandatory')
chassis__serial_number = mib_scalar((1, 3, 6, 1, 4, 1, 14851, 3, 1, 4, 3), display_string().subtype(subtypeSpec=value_size_constraint(0, 64))).setLabel('chassis-SerialNumber').setMaxAccess('readonly')
if mibBuilder.loadTexts:
chassis_SerialNumber.setStatus('mandatory')
chassis__lock_present = mib_scalar((1, 3, 6, 1, 4, 1, 14851, 3, 1, 4, 4), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(0, 1, 2))).clone(namedValues=named_values(('unknown', 0), ('true', 1), ('false', 2)))).setLabel('chassis-LockPresent').setMaxAccess('readonly')
if mibBuilder.loadTexts:
chassis_LockPresent.setStatus('mandatory')
chassis__security_breach = mib_scalar((1, 3, 6, 1, 4, 1, 14851, 3, 1, 4, 5), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3, 4, 5))).clone(namedValues=named_values(('unknown', 1), ('other', 2), ('noBreach', 3), ('breachAttempted', 4), ('breachSuccessful', 5)))).setLabel('chassis-SecurityBreach').setMaxAccess('readonly')
if mibBuilder.loadTexts:
chassis_SecurityBreach.setStatus('mandatory')
chassis__is_locked = mib_scalar((1, 3, 6, 1, 4, 1, 14851, 3, 1, 4, 6), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(0, 1, 2))).clone(namedValues=named_values(('unknown', 0), ('true', 1), ('false', 2)))).setLabel('chassis-IsLocked').setMaxAccess('readonly')
if mibBuilder.loadTexts:
chassis_IsLocked.setStatus('mandatory')
chassis__tag = mib_scalar((1, 3, 6, 1, 4, 1, 14851, 3, 1, 4, 7), display_string().subtype(subtypeSpec=value_size_constraint(0, 255))).setLabel('chassis-Tag').setMaxAccess('readonly')
if mibBuilder.loadTexts:
chassis_Tag.setStatus('mandatory')
chassis__element_name = mib_scalar((1, 3, 6, 1, 4, 1, 14851, 3, 1, 4, 8), display_string().subtype(subtypeSpec=value_size_constraint(0, 255))).setLabel('chassis-ElementName').setMaxAccess('readonly')
if mibBuilder.loadTexts:
chassis_ElementName.setStatus('mandatory')
number_ofsub_chassis = mib_scalar((1, 3, 6, 1, 4, 1, 14851, 3, 1, 4, 9), integer32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
numberOfsubChassis.setStatus('mandatory')
sub_chassis_table = mib_table((1, 3, 6, 1, 4, 1, 14851, 3, 1, 4, 10))
if mibBuilder.loadTexts:
subChassisTable.setStatus('mandatory')
sub_chassis_entry = mib_table_row((1, 3, 6, 1, 4, 1, 14851, 3, 1, 4, 10, 1)).setIndexNames((0, 'SNIA-SML-MIB', 'subChassisIndex'))
if mibBuilder.loadTexts:
subChassisEntry.setStatus('mandatory')
sub_chassis_index = mib_table_column((1, 3, 6, 1, 4, 1, 14851, 3, 1, 4, 10, 1, 1), uint32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
subChassisIndex.setStatus('mandatory')
sub_chassis__manufacturer = mib_scalar((1, 3, 6, 1, 4, 1, 14851, 3, 1, 4, 10, 1, 2), display_string().subtype(subtypeSpec=value_size_constraint(0, 255))).setLabel('subChassis-Manufacturer').setMaxAccess('readonly')
if mibBuilder.loadTexts:
subChassis_Manufacturer.setStatus('mandatory')
sub_chassis__model = mib_scalar((1, 3, 6, 1, 4, 1, 14851, 3, 1, 4, 10, 1, 3), display_string().subtype(subtypeSpec=value_size_constraint(0, 64))).setLabel('subChassis-Model').setMaxAccess('readonly')
if mibBuilder.loadTexts:
subChassis_Model.setStatus('mandatory')
sub_chassis__serial_number = mib_scalar((1, 3, 6, 1, 4, 1, 14851, 3, 1, 4, 10, 1, 4), display_string().subtype(subtypeSpec=value_size_constraint(0, 64))).setLabel('subChassis-SerialNumber').setMaxAccess('readonly')
if mibBuilder.loadTexts:
subChassis_SerialNumber.setStatus('mandatory')
sub_chassis__lock_present = mib_scalar((1, 3, 6, 1, 4, 1, 14851, 3, 1, 4, 10, 1, 5), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(0, 1, 2))).clone(namedValues=named_values(('unknown', 0), ('true', 1), ('false', 2)))).setLabel('subChassis-LockPresent').setMaxAccess('readonly')
if mibBuilder.loadTexts:
subChassis_LockPresent.setStatus('mandatory')
sub_chassis__security_breach = mib_scalar((1, 3, 6, 1, 4, 1, 14851, 3, 1, 4, 10, 1, 6), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3, 4, 5))).clone(namedValues=named_values(('unknown', 1), ('other', 2), ('noBreach', 3), ('breachAttempted', 4), ('breachSuccessful', 5)))).setLabel('subChassis-SecurityBreach').setMaxAccess('readonly')
if mibBuilder.loadTexts:
subChassis_SecurityBreach.setStatus('mandatory')
sub_chassis__is_locked = mib_scalar((1, 3, 6, 1, 4, 1, 14851, 3, 1, 4, 10, 1, 7), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(0, 1, 2))).clone(namedValues=named_values(('unknown', 0), ('true', 1), ('false', 2)))).setLabel('subChassis-IsLocked').setMaxAccess('readonly')
if mibBuilder.loadTexts:
subChassis_IsLocked.setStatus('mandatory')
sub_chassis__tag = mib_scalar((1, 3, 6, 1, 4, 1, 14851, 3, 1, 4, 10, 1, 8), display_string().subtype(subtypeSpec=value_size_constraint(0, 255))).setLabel('subChassis-Tag').setMaxAccess('readonly')
if mibBuilder.loadTexts:
subChassis_Tag.setStatus('mandatory')
sub_chassis__element_name = mib_scalar((1, 3, 6, 1, 4, 1, 14851, 3, 1, 4, 10, 1, 9), display_string().subtype(subtypeSpec=value_size_constraint(0, 255))).setLabel('subChassis-ElementName').setMaxAccess('readonly')
if mibBuilder.loadTexts:
subChassis_ElementName.setStatus('mandatory')
sub_chassis__operational_status = mib_scalar((1, 3, 6, 1, 4, 1, 14851, 3, 1, 4, 10, 1, 10), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 32768))).clone(namedValues=named_values(('unknown', 0), ('other', 1), ('ok', 2), ('degraded', 3), ('stressed', 4), ('predictiveFailure', 5), ('error', 6), ('non-RecoverableError', 7), ('starting', 8), ('stopping', 9), ('stopped', 10), ('inService', 11), ('noContact', 12), ('lostCommunication', 13), ('aborted', 14), ('dormant', 15), ('supportingEntityInError', 16), ('completed', 17), ('powerMode', 18), ('dMTFReserved', 19), ('vendorReserved', 32768)))).setLabel('subChassis-OperationalStatus').setMaxAccess('readonly')
if mibBuilder.loadTexts:
subChassis_OperationalStatus.setStatus('mandatory')
sub_chassis__package_type = mib_scalar((1, 3, 6, 1, 4, 1, 14851, 3, 1, 4, 10, 1, 11), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(0, 17, 18, 19, 32769))).clone(namedValues=named_values(('unknown', 0), ('mainSystemChassis', 17), ('expansionChassis', 18), ('subChassis', 19), ('serviceBay', 32769)))).setLabel('subChassis-PackageType').setMaxAccess('readonly')
if mibBuilder.loadTexts:
subChassis_PackageType.setStatus('mandatory')
storage_library_group = mib_identifier((1, 3, 6, 1, 4, 1, 14851, 3, 1, 5))
storage_library__name = mib_scalar((1, 3, 6, 1, 4, 1, 14851, 3, 1, 5, 1), display_string().subtype(subtypeSpec=value_size_constraint(0, 255))).setLabel('storageLibrary-Name').setMaxAccess('readonly')
if mibBuilder.loadTexts:
storageLibrary_Name.setStatus('deprecated')
storage_library__description = mib_scalar((1, 3, 6, 1, 4, 1, 14851, 3, 1, 5, 2), display_string().subtype(subtypeSpec=value_size_constraint(0, 255))).setLabel('storageLibrary-Description').setMaxAccess('readonly')
if mibBuilder.loadTexts:
storageLibrary_Description.setStatus('deprecated')
storage_library__caption = mib_scalar((1, 3, 6, 1, 4, 1, 14851, 3, 1, 5, 3), display_string().subtype(subtypeSpec=value_size_constraint(0, 64))).setLabel('storageLibrary-Caption').setMaxAccess('readonly')
if mibBuilder.loadTexts:
storageLibrary_Caption.setStatus('deprecated')
storage_library__status = mib_scalar((1, 3, 6, 1, 4, 1, 14851, 3, 1, 5, 4), display_string().subtype(subtypeSpec=value_size_constraint(0, 10))).setLabel('storageLibrary-Status').setMaxAccess('readonly')
if mibBuilder.loadTexts:
storageLibrary_Status.setStatus('deprecated')
storage_library__install_date = mib_scalar((1, 3, 6, 1, 4, 1, 14851, 3, 1, 5, 5), cim_date_time()).setLabel('storageLibrary-InstallDate').setMaxAccess('readonly')
if mibBuilder.loadTexts:
storageLibrary_InstallDate.setStatus('deprecated')
media_access_device_group = mib_identifier((1, 3, 6, 1, 4, 1, 14851, 3, 1, 6))
number_of_media_access_devices = mib_scalar((1, 3, 6, 1, 4, 1, 14851, 3, 1, 6, 1), integer32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
numberOfMediaAccessDevices.setStatus('mandatory')
media_access_device_table = mib_table((1, 3, 6, 1, 4, 1, 14851, 3, 1, 6, 2))
if mibBuilder.loadTexts:
mediaAccessDeviceTable.setStatus('mandatory')
media_access_device_entry = mib_table_row((1, 3, 6, 1, 4, 1, 14851, 3, 1, 6, 2, 1)).setIndexNames((0, 'SNIA-SML-MIB', 'mediaAccessDeviceIndex'))
if mibBuilder.loadTexts:
mediaAccessDeviceEntry.setStatus('mandatory')
media_access_device_index = mib_table_column((1, 3, 6, 1, 4, 1, 14851, 3, 1, 6, 2, 1, 1), uint32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
mediaAccessDeviceIndex.setStatus('mandatory')
media_access_device_object_type = mib_table_column((1, 3, 6, 1, 4, 1, 14851, 3, 1, 6, 2, 1, 2), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(0, 1, 2, 3, 4, 5))).clone(namedValues=named_values(('unknown', 0), ('wormDrive', 1), ('magnetoOpticalDrive', 2), ('tapeDrive', 3), ('dvdDrive', 4), ('cdromDrive', 5)))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
mediaAccessDeviceObjectType.setStatus('mandatory')
media_access_device__name = mib_scalar((1, 3, 6, 1, 4, 1, 14851, 3, 1, 6, 2, 1, 3), display_string().subtype(subtypeSpec=value_size_constraint(0, 255))).setLabel('mediaAccessDevice-Name').setMaxAccess('readonly')
if mibBuilder.loadTexts:
mediaAccessDevice_Name.setStatus('deprecated')
media_access_device__status = mib_scalar((1, 3, 6, 1, 4, 1, 14851, 3, 1, 6, 2, 1, 4), display_string().subtype(subtypeSpec=value_size_constraint(0, 10))).setLabel('mediaAccessDevice-Status').setMaxAccess('readonly')
if mibBuilder.loadTexts:
mediaAccessDevice_Status.setStatus('deprecated')
media_access_device__availability = mib_scalar((1, 3, 6, 1, 4, 1, 14851, 3, 1, 6, 2, 1, 5), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21))).clone(namedValues=named_values(('other', 1), ('unknown', 2), ('runningFullPower', 3), ('warning', 4), ('inTest', 5), ('notApplicable', 6), ('powerOff', 7), ('offLine', 8), ('offDuty', 9), ('degraded', 10), ('notInstalled', 11), ('installError', 12), ('powerSaveUnknown', 13), ('powerSaveLowPowerMode', 14), ('powerSaveStandby', 15), ('powerCycle', 16), ('powerSaveWarning', 17), ('paused', 18), ('notReady', 19), ('notConfigured', 20), ('quiesced', 21)))).setLabel('mediaAccessDevice-Availability').setMaxAccess('readonly')
if mibBuilder.loadTexts:
mediaAccessDevice_Availability.setStatus('mandatory')
media_access_device__needs_cleaning = mib_scalar((1, 3, 6, 1, 4, 1, 14851, 3, 1, 6, 2, 1, 6), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(0, 1, 2))).clone(namedValues=named_values(('unknown', 0), ('true', 1), ('false', 2)))).setLabel('mediaAccessDevice-NeedsCleaning').setMaxAccess('readonly')
if mibBuilder.loadTexts:
mediaAccessDevice_NeedsCleaning.setStatus('mandatory')
media_access_device__mount_count = mib_scalar((1, 3, 6, 1, 4, 1, 14851, 3, 1, 6, 2, 1, 7), uint64()).setLabel('mediaAccessDevice-MountCount').setMaxAccess('readonly')
if mibBuilder.loadTexts:
mediaAccessDevice_MountCount.setStatus('mandatory')
media_access_device__device_id = mib_scalar((1, 3, 6, 1, 4, 1, 14851, 3, 1, 6, 2, 1, 8), display_string().subtype(subtypeSpec=value_size_constraint(0, 64))).setLabel('mediaAccessDevice-DeviceID').setMaxAccess('readonly')
if mibBuilder.loadTexts:
mediaAccessDevice_DeviceID.setStatus('mandatory')
media_access_device__power_on_hours = mib_scalar((1, 3, 6, 1, 4, 1, 14851, 3, 1, 6, 2, 1, 9), uint64()).setLabel('mediaAccessDevice-PowerOnHours').setMaxAccess('readonly')
if mibBuilder.loadTexts:
mediaAccessDevice_PowerOnHours.setStatus('mandatory')
media_access_device__total_power_on_hours = mib_scalar((1, 3, 6, 1, 4, 1, 14851, 3, 1, 6, 2, 1, 10), uint64()).setLabel('mediaAccessDevice-TotalPowerOnHours').setMaxAccess('readonly')
if mibBuilder.loadTexts:
mediaAccessDevice_TotalPowerOnHours.setStatus('mandatory')
media_access_device__operational_status = mib_scalar((1, 3, 6, 1, 4, 1, 14851, 3, 1, 6, 2, 1, 11), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 32768))).clone(namedValues=named_values(('unknown', 0), ('other', 1), ('ok', 2), ('degraded', 3), ('stressed', 4), ('predictiveFailure', 5), ('error', 6), ('non-RecoverableError', 7), ('starting', 8), ('stopping', 9), ('stopped', 10), ('inService', 11), ('noContact', 12), ('lostCommunication', 13), ('aborted', 14), ('dormant', 15), ('supportingEntityInError', 16), ('completed', 17), ('powerMode', 18), ('dMTFReserved', 19), ('vendorReserved', 32768)))).setLabel('mediaAccessDevice-OperationalStatus').setMaxAccess('readonly')
if mibBuilder.loadTexts:
mediaAccessDevice_OperationalStatus.setStatus('mandatory')
media_access_device__realizes__storage_location_index = mib_scalar((1, 3, 6, 1, 4, 1, 14851, 3, 1, 6, 2, 1, 12), uint32()).setLabel('mediaAccessDevice-Realizes-StorageLocationIndex').setMaxAccess('readonly')
if mibBuilder.loadTexts:
mediaAccessDevice_Realizes_StorageLocationIndex.setStatus('mandatory')
media_access_device__realizes_software_element_index = mib_scalar((1, 3, 6, 1, 4, 1, 14851, 3, 1, 6, 2, 1, 13), uint32()).setLabel('mediaAccessDevice-Realizes-softwareElementIndex').setMaxAccess('readonly')
if mibBuilder.loadTexts:
mediaAccessDevice_Realizes_softwareElementIndex.setStatus('mandatory')
physical_package_group = mib_identifier((1, 3, 6, 1, 4, 1, 14851, 3, 1, 8))
number_of_physical_packages = mib_scalar((1, 3, 6, 1, 4, 1, 14851, 3, 1, 8, 1), integer32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
numberOfPhysicalPackages.setStatus('mandatory')
physical_package_table = mib_table((1, 3, 6, 1, 4, 1, 14851, 3, 1, 8, 2))
if mibBuilder.loadTexts:
physicalPackageTable.setStatus('mandatory')
physical_package_entry = mib_table_row((1, 3, 6, 1, 4, 1, 14851, 3, 1, 8, 2, 1)).setIndexNames((0, 'SNIA-SML-MIB', 'physicalPackageIndex'))
if mibBuilder.loadTexts:
physicalPackageEntry.setStatus('mandatory')
physical_package_index = mib_table_column((1, 3, 6, 1, 4, 1, 14851, 3, 1, 8, 2, 1, 1), uint32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
physicalPackageIndex.setStatus('mandatory')
physical_package__manufacturer = mib_scalar((1, 3, 6, 1, 4, 1, 14851, 3, 1, 8, 2, 1, 2), display_string().subtype(subtypeSpec=value_size_constraint(0, 255))).setLabel('physicalPackage-Manufacturer').setMaxAccess('readonly')
if mibBuilder.loadTexts:
physicalPackage_Manufacturer.setStatus('mandatory')
physical_package__model = mib_scalar((1, 3, 6, 1, 4, 1, 14851, 3, 1, 8, 2, 1, 3), display_string().subtype(subtypeSpec=value_size_constraint(0, 64))).setLabel('physicalPackage-Model').setMaxAccess('readonly')
if mibBuilder.loadTexts:
physicalPackage_Model.setStatus('mandatory')
physical_package__serial_number = mib_scalar((1, 3, 6, 1, 4, 1, 14851, 3, 1, 8, 2, 1, 4), display_string().subtype(subtypeSpec=value_size_constraint(0, 64))).setLabel('physicalPackage-SerialNumber').setMaxAccess('readonly')
if mibBuilder.loadTexts:
physicalPackage_SerialNumber.setStatus('mandatory')
physical_package__realizes__media_access_device_index = mib_scalar((1, 3, 6, 1, 4, 1, 14851, 3, 1, 8, 2, 1, 5), integer32()).setLabel('physicalPackage-Realizes-MediaAccessDeviceIndex').setMaxAccess('readonly')
if mibBuilder.loadTexts:
physicalPackage_Realizes_MediaAccessDeviceIndex.setStatus('mandatory')
physical_package__tag = mib_scalar((1, 3, 6, 1, 4, 1, 14851, 3, 1, 8, 2, 1, 6), display_string().subtype(subtypeSpec=value_size_constraint(0, 255))).setLabel('physicalPackage-Tag').setMaxAccess('readonly')
if mibBuilder.loadTexts:
physicalPackage_Tag.setStatus('mandatory')
software_element_group = mib_identifier((1, 3, 6, 1, 4, 1, 14851, 3, 1, 9))
number_of_software_elements = mib_scalar((1, 3, 6, 1, 4, 1, 14851, 3, 1, 9, 1), integer32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
numberOfSoftwareElements.setStatus('mandatory')
software_element_table = mib_table((1, 3, 6, 1, 4, 1, 14851, 3, 1, 9, 2))
if mibBuilder.loadTexts:
softwareElementTable.setStatus('mandatory')
software_element_entry = mib_table_row((1, 3, 6, 1, 4, 1, 14851, 3, 1, 9, 2, 1)).setIndexNames((0, 'SNIA-SML-MIB', 'softwareElementIndex'))
if mibBuilder.loadTexts:
softwareElementEntry.setStatus('mandatory')
software_element_index = mib_table_column((1, 3, 6, 1, 4, 1, 14851, 3, 1, 9, 2, 1, 1), uint32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
softwareElementIndex.setStatus('mandatory')
software_element__name = mib_scalar((1, 3, 6, 1, 4, 1, 14851, 3, 1, 9, 2, 1, 2), display_string().subtype(subtypeSpec=value_size_constraint(0, 255))).setLabel('softwareElement-Name').setMaxAccess('readonly')
if mibBuilder.loadTexts:
softwareElement_Name.setStatus('deprecated')
software_element__version = mib_scalar((1, 3, 6, 1, 4, 1, 14851, 3, 1, 9, 2, 1, 3), display_string().subtype(subtypeSpec=value_size_constraint(0, 255))).setLabel('softwareElement-Version').setMaxAccess('readonly')
if mibBuilder.loadTexts:
softwareElement_Version.setStatus('mandatory')
software_element__software_element_id = mib_scalar((1, 3, 6, 1, 4, 1, 14851, 3, 1, 9, 2, 1, 4), display_string().subtype(subtypeSpec=value_size_constraint(0, 255))).setLabel('softwareElement-SoftwareElementID').setMaxAccess('readonly')
if mibBuilder.loadTexts:
softwareElement_SoftwareElementID.setStatus('mandatory')
software_element__manufacturer = mib_scalar((1, 3, 6, 1, 4, 1, 14851, 3, 1, 9, 2, 1, 5), display_string().subtype(subtypeSpec=value_size_constraint(0, 64))).setLabel('softwareElement-Manufacturer').setMaxAccess('readonly')
if mibBuilder.loadTexts:
softwareElement_Manufacturer.setStatus('mandatory')
software_element__build_number = mib_scalar((1, 3, 6, 1, 4, 1, 14851, 3, 1, 9, 2, 1, 6), display_string().subtype(subtypeSpec=value_size_constraint(0, 64))).setLabel('softwareElement-BuildNumber').setMaxAccess('readonly')
if mibBuilder.loadTexts:
softwareElement_BuildNumber.setStatus('mandatory')
software_element__serial_number = mib_scalar((1, 3, 6, 1, 4, 1, 14851, 3, 1, 9, 2, 1, 7), display_string().subtype(subtypeSpec=value_size_constraint(0, 64))).setLabel('softwareElement-SerialNumber').setMaxAccess('readonly')
if mibBuilder.loadTexts:
softwareElement_SerialNumber.setStatus('mandatory')
software_element__code_set = mib_scalar((1, 3, 6, 1, 4, 1, 14851, 3, 1, 9, 2, 1, 8), display_string().subtype(subtypeSpec=value_size_constraint(0, 64))).setLabel('softwareElement-CodeSet').setMaxAccess('readonly')
if mibBuilder.loadTexts:
softwareElement_CodeSet.setStatus('deprecated')
software_element__identification_code = mib_scalar((1, 3, 6, 1, 4, 1, 14851, 3, 1, 9, 2, 1, 9), display_string().subtype(subtypeSpec=value_size_constraint(0, 64))).setLabel('softwareElement-IdentificationCode').setMaxAccess('readonly')
if mibBuilder.loadTexts:
softwareElement_IdentificationCode.setStatus('deprecated')
software_element__language_edition = mib_scalar((1, 3, 6, 1, 4, 1, 14851, 3, 1, 9, 2, 1, 10), display_string().subtype(subtypeSpec=value_size_constraint(0, 32))).setLabel('softwareElement-LanguageEdition').setMaxAccess('readonly')
if mibBuilder.loadTexts:
softwareElement_LanguageEdition.setStatus('deprecated')
software_element__instance_id = mib_scalar((1, 3, 6, 1, 4, 1, 14851, 3, 1, 9, 2, 1, 11), display_string().subtype(subtypeSpec=value_size_constraint(0, 255))).setLabel('softwareElement-InstanceID').setMaxAccess('readonly')
if mibBuilder.loadTexts:
softwareElement_InstanceID.setStatus('mandatory')
computer_system_group = mib_identifier((1, 3, 6, 1, 4, 1, 14851, 3, 1, 10))
computer_system__element_name = mib_scalar((1, 3, 6, 1, 4, 1, 14851, 3, 1, 10, 1), display_string().subtype(subtypeSpec=value_size_constraint(0, 255))).setLabel('computerSystem-ElementName').setMaxAccess('readonly')
if mibBuilder.loadTexts:
computerSystem_ElementName.setStatus('mandatory')
computer_system__operational_status = mib_scalar((1, 3, 6, 1, 4, 1, 14851, 3, 1, 10, 2), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 32768))).clone(namedValues=named_values(('unknown', 0), ('other', 1), ('ok', 2), ('degraded', 3), ('stressed', 4), ('predictiveFailure', 5), ('error', 6), ('non-RecoverableError', 7), ('starting', 8), ('stopping', 9), ('stopped', 10), ('inService', 11), ('noContact', 12), ('lostCommunication', 13), ('aborted', 14), ('dormant', 15), ('supportingEntityInError', 16), ('completed', 17), ('powerMode', 18), ('dMTFReserved', 19), ('vendorReserved', 32768)))).setLabel('computerSystem-OperationalStatus').setMaxAccess('readonly')
if mibBuilder.loadTexts:
computerSystem_OperationalStatus.setStatus('mandatory')
computer_system__name = mib_scalar((1, 3, 6, 1, 4, 1, 14851, 3, 1, 10, 3), display_string().subtype(subtypeSpec=value_size_constraint(0, 255))).setLabel('computerSystem-Name').setMaxAccess('readonly')
if mibBuilder.loadTexts:
computerSystem_Name.setStatus('mandatory')
computer_system__name_format = mib_scalar((1, 3, 6, 1, 4, 1, 14851, 3, 1, 10, 4), display_string().subtype(subtypeSpec=value_size_constraint(0, 255))).setLabel('computerSystem-NameFormat').setMaxAccess('readonly')
if mibBuilder.loadTexts:
computerSystem_NameFormat.setStatus('mandatory')
computer_system__dedicated = mib_scalar((1, 3, 6, 1, 4, 1, 14851, 3, 1, 10, 5), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20))).clone(namedValues=named_values(('notDedicated', 0), ('unknown', 1), ('other', 2), ('storage', 3), ('router', 4), ('switch', 5), ('layer3switch', 6), ('centralOfficeSwitch', 7), ('hub', 8), ('accessServer', 9), ('firewall', 10), ('print', 11), ('io', 12), ('webCaching', 13), ('management', 14), ('blockServer', 15), ('fileServer', 16), ('mobileUserDevice', 17), ('repeater', 18), ('bridgeExtender', 19), ('gateway', 20)))).setLabel('computerSystem-Dedicated').setMaxAccess('readonly')
if mibBuilder.loadTexts:
computerSystem_Dedicated.setStatus('mandatory')
computer_system__primary_owner_contact = mib_scalar((1, 3, 6, 1, 4, 1, 14851, 3, 1, 10, 6), display_string().subtype(subtypeSpec=value_size_constraint(0, 255))).setLabel('computerSystem-PrimaryOwnerContact').setMaxAccess('readonly')
if mibBuilder.loadTexts:
computerSystem_PrimaryOwnerContact.setStatus('mandatory')
computer_system__primary_owner_name = mib_scalar((1, 3, 6, 1, 4, 1, 14851, 3, 1, 10, 7), display_string().subtype(subtypeSpec=value_size_constraint(0, 255))).setLabel('computerSystem-PrimaryOwnerName').setMaxAccess('readonly')
if mibBuilder.loadTexts:
computerSystem_PrimaryOwnerName.setStatus('mandatory')
computer_system__description = mib_scalar((1, 3, 6, 1, 4, 1, 14851, 3, 1, 10, 8), display_string().subtype(subtypeSpec=value_size_constraint(0, 255))).setLabel('computerSystem-Description').setMaxAccess('readonly')
if mibBuilder.loadTexts:
computerSystem_Description.setStatus('mandatory')
computer_system__caption = mib_scalar((1, 3, 6, 1, 4, 1, 14851, 3, 1, 10, 9), display_string().subtype(subtypeSpec=value_size_constraint(0, 64))).setLabel('computerSystem-Caption').setMaxAccess('readonly')
if mibBuilder.loadTexts:
computerSystem_Caption.setStatus('mandatory')
computer_system__realizes_software_element_index = mib_scalar((1, 3, 6, 1, 4, 1, 14851, 3, 1, 10, 10), uint32()).setLabel('computerSystem-Realizes-softwareElementIndex').setMaxAccess('readonly')
if mibBuilder.loadTexts:
computerSystem_Realizes_softwareElementIndex.setStatus('mandatory')
changer_device_group = mib_identifier((1, 3, 6, 1, 4, 1, 14851, 3, 1, 11))
number_of_changer_devices = mib_scalar((1, 3, 6, 1, 4, 1, 14851, 3, 1, 11, 1), integer32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
numberOfChangerDevices.setStatus('mandatory')
changer_device_table = mib_table((1, 3, 6, 1, 4, 1, 14851, 3, 1, 11, 2))
if mibBuilder.loadTexts:
changerDeviceTable.setStatus('mandatory')
changer_device_entry = mib_table_row((1, 3, 6, 1, 4, 1, 14851, 3, 1, 11, 2, 1)).setIndexNames((0, 'SNIA-SML-MIB', 'changerDeviceIndex'))
if mibBuilder.loadTexts:
changerDeviceEntry.setStatus('mandatory')
changer_device_index = mib_table_column((1, 3, 6, 1, 4, 1, 14851, 3, 1, 11, 2, 1, 1), uint32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
changerDeviceIndex.setStatus('mandatory')
changer_device__device_id = mib_scalar((1, 3, 6, 1, 4, 1, 14851, 3, 1, 11, 2, 1, 2), display_string().subtype(subtypeSpec=value_size_constraint(0, 64))).setLabel('changerDevice-DeviceID').setMaxAccess('readonly')
if mibBuilder.loadTexts:
changerDevice_DeviceID.setStatus('mandatory')
changer_device__media_flip_supported = mib_scalar((1, 3, 6, 1, 4, 1, 14851, 3, 1, 11, 2, 1, 3), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2))).clone(namedValues=named_values(('true', 1), ('false', 2)))).setLabel('changerDevice-MediaFlipSupported').setMaxAccess('readonly')
if mibBuilder.loadTexts:
changerDevice_MediaFlipSupported.setStatus('mandatory')
changer_device__element_name = mib_scalar((1, 3, 6, 1, 4, 1, 14851, 3, 1, 11, 2, 1, 4), display_string().subtype(subtypeSpec=value_size_constraint(0, 255))).setLabel('changerDevice-ElementName').setMaxAccess('readonly')
if mibBuilder.loadTexts:
changerDevice_ElementName.setStatus('mandatory')
changer_device__caption = mib_scalar((1, 3, 6, 1, 4, 1, 14851, 3, 1, 11, 2, 1, 5), display_string().subtype(subtypeSpec=value_size_constraint(0, 64))).setLabel('changerDevice-Caption').setMaxAccess('readonly')
if mibBuilder.loadTexts:
changerDevice_Caption.setStatus('mandatory')
changer_device__description = mib_scalar((1, 3, 6, 1, 4, 1, 14851, 3, 1, 11, 2, 1, 6), display_string().subtype(subtypeSpec=value_size_constraint(0, 255))).setLabel('changerDevice-Description').setMaxAccess('readonly')
if mibBuilder.loadTexts:
changerDevice_Description.setStatus('mandatory')
changer_device__availability = mib_scalar((1, 3, 6, 1, 4, 1, 14851, 3, 1, 11, 2, 1, 8), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21))).clone(namedValues=named_values(('other', 1), ('unknown', 2), ('runningFullPower', 3), ('warning', 4), ('inTest', 5), ('notApplicable', 6), ('powerOff', 7), ('offLine', 8), ('offDuty', 9), ('degraded', 10), ('notInstalled', 11), ('installError', 12), ('powerSaveUnknown', 13), ('powerSaveLowPowerMode', 14), ('powerSaveStandby', 15), ('powerCycle', 16), ('powerSaveWarning', 17), ('paused', 18), ('notReady', 19), ('notConfigured', 20), ('quiesced', 21)))).setLabel('changerDevice-Availability').setMaxAccess('readonly')
if mibBuilder.loadTexts:
changerDevice_Availability.setStatus('mandatory')
changer_device__operational_status = mib_scalar((1, 3, 6, 1, 4, 1, 14851, 3, 1, 11, 2, 1, 9), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 32768))).clone(namedValues=named_values(('unknown', 0), ('other', 1), ('ok', 2), ('degraded', 3), ('stressed', 4), ('predictiveFailure', 5), ('error', 6), ('non-RecoverableError', 7), ('starting', 8), ('stopping', 9), ('stopped', 10), ('inService', 11), ('noContact', 12), ('lostCommunication', 13), ('aborted', 14), ('dormant', 15), ('supportingEntityInError', 16), ('completed', 17), ('powerMode', 18), ('dMTFReserved', 19), ('vendorReserved', 32768)))).setLabel('changerDevice-OperationalStatus').setMaxAccess('readonly')
if mibBuilder.loadTexts:
changerDevice_OperationalStatus.setStatus('mandatory')
changer_device__realizes__storage_location_index = mib_scalar((1, 3, 6, 1, 4, 1, 14851, 3, 1, 11, 2, 1, 10), uint32()).setLabel('changerDevice-Realizes-StorageLocationIndex').setMaxAccess('readonly')
if mibBuilder.loadTexts:
changerDevice_Realizes_StorageLocationIndex.setStatus('mandatory')
scsi_protocol_controller_group = mib_identifier((1, 3, 6, 1, 4, 1, 14851, 3, 1, 12))
number_of_scsi_protocol_controllers = mib_scalar((1, 3, 6, 1, 4, 1, 14851, 3, 1, 12, 1), integer32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
numberOfSCSIProtocolControllers.setStatus('mandatory')
scsi_protocol_controller_table = mib_table((1, 3, 6, 1, 4, 1, 14851, 3, 1, 12, 2))
if mibBuilder.loadTexts:
scsiProtocolControllerTable.setStatus('mandatory')
scsi_protocol_controller_entry = mib_table_row((1, 3, 6, 1, 4, 1, 14851, 3, 1, 12, 2, 1)).setIndexNames((0, 'SNIA-SML-MIB', 'scsiProtocolControllerIndex'))
if mibBuilder.loadTexts:
scsiProtocolControllerEntry.setStatus('mandatory')
scsi_protocol_controller_index = mib_table_column((1, 3, 6, 1, 4, 1, 14851, 3, 1, 12, 2, 1, 1), uint32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
scsiProtocolControllerIndex.setStatus('mandatory')
scsi_protocol_controller__device_id = mib_scalar((1, 3, 6, 1, 4, 1, 14851, 3, 1, 12, 2, 1, 2), display_string().subtype(subtypeSpec=value_size_constraint(0, 64))).setLabel('scsiProtocolController-DeviceID').setMaxAccess('readonly')
if mibBuilder.loadTexts:
scsiProtocolController_DeviceID.setStatus('mandatory')
scsi_protocol_controller__element_name = mib_scalar((1, 3, 6, 1, 4, 1, 14851, 3, 1, 12, 2, 1, 3), display_string().subtype(subtypeSpec=value_size_constraint(0, 255))).setLabel('scsiProtocolController-ElementName').setMaxAccess('readonly')
if mibBuilder.loadTexts:
scsiProtocolController_ElementName.setStatus('mandatory')
scsi_protocol_controller__operational_status = mib_scalar((1, 3, 6, 1, 4, 1, 14851, 3, 1, 12, 2, 1, 4), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 32768))).clone(namedValues=named_values(('unknown', 0), ('other', 1), ('ok', 2), ('degraded', 3), ('stressed', 4), ('predictiveFailure', 5), ('error', 6), ('non-RecoverableError', 7), ('starting', 8), ('stopping', 9), ('stopped', 10), ('inService', 11), ('noContact', 12), ('lostCommunication', 13), ('aborted', 14), ('dormant', 15), ('supportingEntityInError', 16), ('completed', 17), ('powerMode', 18), ('dMTFReserved', 19), ('vendorReserved', 32768)))).setLabel('scsiProtocolController-OperationalStatus').setMaxAccess('readonly')
if mibBuilder.loadTexts:
scsiProtocolController_OperationalStatus.setStatus('mandatory')
scsi_protocol_controller__description = mib_scalar((1, 3, 6, 1, 4, 1, 14851, 3, 1, 12, 2, 1, 5), display_string().subtype(subtypeSpec=value_size_constraint(0, 255))).setLabel('scsiProtocolController-Description').setMaxAccess('readonly')
if mibBuilder.loadTexts:
scsiProtocolController_Description.setStatus('mandatory')
scsi_protocol_controller__availability = mib_scalar((1, 3, 6, 1, 4, 1, 14851, 3, 1, 12, 2, 1, 6), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21))).clone(namedValues=named_values(('other', 1), ('unknown', 2), ('runningFullPower', 3), ('warning', 4), ('inTest', 5), ('notApplicable', 6), ('powerOff', 7), ('offLine', 8), ('offDuty', 9), ('degraded', 10), ('notInstalled', 11), ('installError', 12), ('powerSaveUnknown', 13), ('powerSaveLowPowerMode', 14), ('powerSaveStandby', 15), ('powerCycle', 16), ('powerSaveWarning', 17), ('paused', 18), ('notReady', 19), ('notConfigured', 20), ('quiesced', 21)))).setLabel('scsiProtocolController-Availability').setMaxAccess('readonly')
if mibBuilder.loadTexts:
scsiProtocolController_Availability.setStatus('mandatory')
scsi_protocol_controller__realizes__changer_device_index = mib_scalar((1, 3, 6, 1, 4, 1, 14851, 3, 1, 12, 2, 1, 7), uint32()).setLabel('scsiProtocolController-Realizes-ChangerDeviceIndex').setMaxAccess('readonly')
if mibBuilder.loadTexts:
scsiProtocolController_Realizes_ChangerDeviceIndex.setStatus('mandatory')
scsi_protocol_controller__realizes__media_access_device_index = mib_scalar((1, 3, 6, 1, 4, 1, 14851, 3, 1, 12, 2, 1, 8), uint32()).setLabel('scsiProtocolController-Realizes-MediaAccessDeviceIndex').setMaxAccess('readonly')
if mibBuilder.loadTexts:
scsiProtocolController_Realizes_MediaAccessDeviceIndex.setStatus('mandatory')
storage_media_location_group = mib_identifier((1, 3, 6, 1, 4, 1, 14851, 3, 1, 13))
number_of_storage_media_locations = mib_scalar((1, 3, 6, 1, 4, 1, 14851, 3, 1, 13, 1), integer32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
numberOfStorageMediaLocations.setStatus('mandatory')
number_of_physical_medias = mib_scalar((1, 3, 6, 1, 4, 1, 14851, 3, 1, 13, 2), integer32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
numberOfPhysicalMedias.setStatus('mandatory')
storage_media_location_table = mib_table((1, 3, 6, 1, 4, 1, 14851, 3, 1, 13, 3))
if mibBuilder.loadTexts:
storageMediaLocationTable.setStatus('mandatory')
storage_media_location_entry = mib_table_row((1, 3, 6, 1, 4, 1, 14851, 3, 1, 13, 3, 1)).setIndexNames((0, 'SNIA-SML-MIB', 'storageMediaLocationIndex'))
if mibBuilder.loadTexts:
storageMediaLocationEntry.setStatus('mandatory')
storage_media_location_index = mib_table_column((1, 3, 6, 1, 4, 1, 14851, 3, 1, 13, 3, 1, 1), uint32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
storageMediaLocationIndex.setStatus('mandatory')
storage_media_location__tag = mib_scalar((1, 3, 6, 1, 4, 1, 14851, 3, 1, 13, 3, 1, 2), display_string().subtype(subtypeSpec=value_size_constraint(0, 255))).setLabel('storageMediaLocation-Tag').setMaxAccess('readonly')
if mibBuilder.loadTexts:
storageMediaLocation_Tag.setStatus('mandatory')
storage_media_location__location_type = mib_scalar((1, 3, 6, 1, 4, 1, 14851, 3, 1, 13, 3, 1, 3), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(0, 1, 2, 3, 4, 5, 6, 7, 8, 9))).clone(namedValues=named_values(('unknown', 0), ('other', 1), ('slot', 2), ('magazine', 3), ('mediaAccessDevice', 4), ('interLibraryPort', 5), ('limitedAccessPort', 6), ('door', 7), ('shelf', 8), ('vault', 9)))).setLabel('storageMediaLocation-LocationType').setMaxAccess('readonly')
if mibBuilder.loadTexts:
storageMediaLocation_LocationType.setStatus('mandatory')
storage_media_location__location_coordinates = mib_scalar((1, 3, 6, 1, 4, 1, 14851, 3, 1, 13, 3, 1, 4), display_string().subtype(subtypeSpec=value_size_constraint(0, 255))).setLabel('storageMediaLocation-LocationCoordinates').setMaxAccess('readonly')
if mibBuilder.loadTexts:
storageMediaLocation_LocationCoordinates.setStatus('mandatory')
storage_media_location__media_types_supported = mib_scalar((1, 3, 6, 1, 4, 1, 14851, 3, 1, 13, 3, 1, 5), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66))).clone(namedValues=named_values(('unknown', 0), ('other', 1), ('tape', 2), ('qic', 3), ('ait', 4), ('dtf', 5), ('dat', 6), ('eightmmTape', 7), ('nineteenmmTape', 8), ('dlt', 9), ('halfInchMO', 10), ('catridgeDisk', 11), ('jazDisk', 12), ('zipDisk', 13), ('syQuestDisk', 14), ('winchesterDisk', 15), ('cdRom', 16), ('cdRomXA', 17), ('cdI', 18), ('cdRecordable', 19), ('wORM', 20), ('magneto-Optical', 21), ('dvd', 22), ('dvdRWPlus', 23), ('dvdRAM', 24), ('dvdROM', 25), ('dvdVideo', 26), ('divx', 27), ('floppyDiskette', 28), ('hardDisk', 29), ('memoryCard', 30), ('hardCopy', 31), ('clikDisk', 32), ('cdRW', 33), ('cdDA', 34), ('cdPlus', 35), ('dvdRecordable', 36), ('dvdRW', 37), ('dvdAudio', 38), ('dvd5', 39), ('dvd9', 40), ('dvd10', 41), ('dvd18', 42), ('moRewriteable', 43), ('moWriteOnce', 44), ('moLIMDOW', 45), ('phaseChangeWO', 46), ('phaseChangeRewriteable', 47), ('phaseChangeDualRewriteable', 48), ('ablativeWriteOnce', 49), ('nearField', 50), ('miniQic', 51), ('travan', 52), ('eightmmMetal', 53), ('eightmmAdvanced', 54), ('nctp', 55), ('ltoUltrium', 56), ('ltoAccelis', 57), ('tape9Track', 58), ('tape18Track', 59), ('tape36Track', 60), ('magstar3590', 61), ('magstarMP', 62), ('d2Tape', 63), ('dstSmall', 64), ('dstMedium', 65), ('dstLarge', 66)))).setLabel('storageMediaLocation-MediaTypesSupported').setMaxAccess('readonly')
if mibBuilder.loadTexts:
storageMediaLocation_MediaTypesSupported.setStatus('mandatory')
storage_media_location__media_capacity = mib_scalar((1, 3, 6, 1, 4, 1, 14851, 3, 1, 13, 3, 1, 6), uint32()).setLabel('storageMediaLocation-MediaCapacity').setMaxAccess('readonly')
if mibBuilder.loadTexts:
storageMediaLocation_MediaCapacity.setStatus('mandatory')
storage_media_location__association__changer_device_index = mib_scalar((1, 3, 6, 1, 4, 1, 14851, 3, 1, 13, 3, 1, 7), uint32()).setLabel('storageMediaLocation-Association-ChangerDeviceIndex').setMaxAccess('readonly')
if mibBuilder.loadTexts:
storageMediaLocation_Association_ChangerDeviceIndex.setStatus('mandatory')
storage_media_location__physical_media_present = mib_scalar((1, 3, 6, 1, 4, 1, 14851, 3, 1, 13, 3, 1, 10), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2))).clone(namedValues=named_values(('true', 1), ('false', 2)))).setLabel('storageMediaLocation-PhysicalMediaPresent').setMaxAccess('readonly')
if mibBuilder.loadTexts:
storageMediaLocation_PhysicalMediaPresent.setStatus('mandatory')
storage_media_location__physical_media__removable = mib_scalar((1, 3, 6, 1, 4, 1, 14851, 3, 1, 13, 3, 1, 11), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(0, 1, 2))).clone(namedValues=named_values(('unknown', 0), ('true', 1), ('false', 2)))).setLabel('storageMediaLocation-PhysicalMedia-Removable').setMaxAccess('readonly')
if mibBuilder.loadTexts:
storageMediaLocation_PhysicalMedia_Removable.setStatus('mandatory')
storage_media_location__physical_media__replaceable = mib_scalar((1, 3, 6, 1, 4, 1, 14851, 3, 1, 13, 3, 1, 12), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(0, 1, 2))).clone(namedValues=named_values(('unknown', 0), ('true', 1), ('false', 2)))).setLabel('storageMediaLocation-PhysicalMedia-Replaceable').setMaxAccess('readonly')
if mibBuilder.loadTexts:
storageMediaLocation_PhysicalMedia_Replaceable.setStatus('mandatory')
storage_media_location__physical_media__hot_swappable = mib_scalar((1, 3, 6, 1, 4, 1, 14851, 3, 1, 13, 3, 1, 13), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(0, 1, 2))).clone(namedValues=named_values(('unknown', 0), ('true', 1), ('false', 2)))).setLabel('storageMediaLocation-PhysicalMedia-HotSwappable').setMaxAccess('readonly')
if mibBuilder.loadTexts:
storageMediaLocation_PhysicalMedia_HotSwappable.setStatus('mandatory')
storage_media_location__physical_media__capacity = mib_scalar((1, 3, 6, 1, 4, 1, 14851, 3, 1, 13, 3, 1, 14), uint64()).setLabel('storageMediaLocation-PhysicalMedia-Capacity').setMaxAccess('readonly')
if mibBuilder.loadTexts:
storageMediaLocation_PhysicalMedia_Capacity.setStatus('mandatory')
storage_media_location__physical_media__media_type = mib_scalar((1, 3, 6, 1, 4, 1, 14851, 3, 1, 13, 3, 1, 15), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66))).clone(namedValues=named_values(('unknown', 0), ('other', 1), ('tape', 2), ('qic', 3), ('ait', 4), ('dtf', 5), ('dat', 6), ('eightmmTape', 7), ('nineteenmmTape', 8), ('dlt', 9), ('halfInchMO', 10), ('catridgeDisk', 11), ('jazDisk', 12), ('zipDisk', 13), ('syQuestDisk', 14), ('winchesterDisk', 15), ('cdRom', 16), ('cdRomXA', 17), ('cdI', 18), ('cdRecordable', 19), ('wORM', 20), ('magneto-Optical', 21), ('dvd', 22), ('dvdRWPlus', 23), ('dvdRAM', 24), ('dvdROM', 25), ('dvdVideo', 26), ('divx', 27), ('floppyDiskette', 28), ('hardDisk', 29), ('memoryCard', 30), ('hardCopy', 31), ('clikDisk', 32), ('cdRW', 33), ('cdDA', 34), ('cdPlus', 35), ('dvdRecordable', 36), ('dvdRW', 37), ('dvdAudio', 38), ('dvd5', 39), ('dvd9', 40), ('dvd10', 41), ('dvd18', 42), ('moRewriteable', 43), ('moWriteOnce', 44), ('moLIMDOW', 45), ('phaseChangeWO', 46), ('phaseChangeRewriteable', 47), ('phaseChangeDualRewriteable', 48), ('ablativeWriteOnce', 49), ('nearField', 50), ('miniQic', 51), ('travan', 52), ('eightmmMetal', 53), ('eightmmAdvanced', 54), ('nctp', 55), ('ltoUltrium', 56), ('ltoAccelis', 57), ('tape9Track', 58), ('tape18Track', 59), ('tape36Track', 60), ('magstar3590', 61), ('magstarMP', 62), ('d2Tape', 63), ('dstSmall', 64), ('dstMedium', 65), ('dstLarge', 66)))).setLabel('storageMediaLocation-PhysicalMedia-MediaType').setMaxAccess('readonly')
if mibBuilder.loadTexts:
storageMediaLocation_PhysicalMedia_MediaType.setStatus('mandatory')
storage_media_location__physical_media__media_description = mib_scalar((1, 3, 6, 1, 4, 1, 14851, 3, 1, 13, 3, 1, 16), display_string().subtype(subtypeSpec=value_size_constraint(0, 255))).setLabel('storageMediaLocation-PhysicalMedia-MediaDescription').setMaxAccess('readonly')
if mibBuilder.loadTexts:
storageMediaLocation_PhysicalMedia_MediaDescription.setStatus('mandatory')
storage_media_location__physical_media__cleaner_media = mib_scalar((1, 3, 6, 1, 4, 1, 14851, 3, 1, 13, 3, 1, 17), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(0, 1, 2))).clone(namedValues=named_values(('unknown', 0), ('true', 1), ('false', 2)))).setLabel('storageMediaLocation-PhysicalMedia-CleanerMedia').setMaxAccess('readonly')
if mibBuilder.loadTexts:
storageMediaLocation_PhysicalMedia_CleanerMedia.setStatus('mandatory')
storage_media_location__physical_media__dual_sided = mib_scalar((1, 3, 6, 1, 4, 1, 14851, 3, 1, 13, 3, 1, 18), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(0, 1, 2))).clone(namedValues=named_values(('unknown', 0), ('true', 1), ('false', 2)))).setLabel('storageMediaLocation-PhysicalMedia-DualSided').setMaxAccess('readonly')
if mibBuilder.loadTexts:
storageMediaLocation_PhysicalMedia_DualSided.setStatus('mandatory')
storage_media_location__physical_media__physical_label = mib_scalar((1, 3, 6, 1, 4, 1, 14851, 3, 1, 13, 3, 1, 19), display_string().subtype(subtypeSpec=value_size_constraint(0, 255))).setLabel('storageMediaLocation-PhysicalMedia-PhysicalLabel').setMaxAccess('readonly')
if mibBuilder.loadTexts:
storageMediaLocation_PhysicalMedia_PhysicalLabel.setStatus('mandatory')
storage_media_location__physical_media__tag = mib_scalar((1, 3, 6, 1, 4, 1, 14851, 3, 1, 13, 3, 1, 20), display_string().subtype(subtypeSpec=value_size_constraint(0, 255))).setLabel('storageMediaLocation-PhysicalMedia-Tag').setMaxAccess('readonly')
if mibBuilder.loadTexts:
storageMediaLocation_PhysicalMedia_Tag.setStatus('mandatory')
limited_access_port_group = mib_identifier((1, 3, 6, 1, 4, 1, 14851, 3, 1, 14))
number_oflimited_access_ports = mib_scalar((1, 3, 6, 1, 4, 1, 14851, 3, 1, 14, 1), integer32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
numberOflimitedAccessPorts.setStatus('mandatory')
limited_access_port_table = mib_table((1, 3, 6, 1, 4, 1, 14851, 3, 1, 14, 2))
if mibBuilder.loadTexts:
limitedAccessPortTable.setStatus('mandatory')
limited_access_port_entry = mib_table_row((1, 3, 6, 1, 4, 1, 14851, 3, 1, 14, 2, 1)).setIndexNames((0, 'SNIA-SML-MIB', 'limitedAccessPortIndex'))
if mibBuilder.loadTexts:
limitedAccessPortEntry.setStatus('mandatory')
limited_access_port_index = mib_table_column((1, 3, 6, 1, 4, 1, 14851, 3, 1, 14, 2, 1, 1), uint32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
limitedAccessPortIndex.setStatus('mandatory')
limited_access_port__device_id = mib_scalar((1, 3, 6, 1, 4, 1, 14851, 3, 1, 14, 2, 1, 2), display_string().subtype(subtypeSpec=value_size_constraint(0, 64))).setLabel('limitedAccessPort-DeviceID').setMaxAccess('readonly')
if mibBuilder.loadTexts:
limitedAccessPort_DeviceID.setStatus('mandatory')
limited_access_port__extended = mib_scalar((1, 3, 6, 1, 4, 1, 14851, 3, 1, 14, 2, 1, 3), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2))).clone(namedValues=named_values(('true', 1), ('false', 2)))).setLabel('limitedAccessPort-Extended').setMaxAccess('readonly')
if mibBuilder.loadTexts:
limitedAccessPort_Extended.setStatus('mandatory')
limited_access_port__element_name = mib_scalar((1, 3, 6, 1, 4, 1, 14851, 3, 1, 14, 2, 1, 4), display_string().subtype(subtypeSpec=value_size_constraint(0, 255))).setLabel('limitedAccessPort-ElementName').setMaxAccess('readonly')
if mibBuilder.loadTexts:
limitedAccessPort_ElementName.setStatus('mandatory')
limited_access_port__caption = mib_scalar((1, 3, 6, 1, 4, 1, 14851, 3, 1, 14, 2, 1, 5), display_string().subtype(subtypeSpec=value_size_constraint(0, 64))).setLabel('limitedAccessPort-Caption').setMaxAccess('readonly')
if mibBuilder.loadTexts:
limitedAccessPort_Caption.setStatus('mandatory')
limited_access_port__description = mib_scalar((1, 3, 6, 1, 4, 1, 14851, 3, 1, 14, 2, 1, 6), display_string().subtype(subtypeSpec=value_size_constraint(0, 255))).setLabel('limitedAccessPort-Description').setMaxAccess('readonly')
if mibBuilder.loadTexts:
limitedAccessPort_Description.setStatus('mandatory')
limited_access_port__realizes__storage_location_index = mib_scalar((1, 3, 6, 1, 4, 1, 14851, 3, 1, 14, 2, 1, 7), uint32()).setLabel('limitedAccessPort-Realizes-StorageLocationIndex').setMaxAccess('readonly')
if mibBuilder.loadTexts:
limitedAccessPort_Realizes_StorageLocationIndex.setStatus('mandatory')
f_c_port_group = mib_identifier((1, 3, 6, 1, 4, 1, 14851, 3, 1, 15))
number_off_c_ports = mib_scalar((1, 3, 6, 1, 4, 1, 14851, 3, 1, 15, 1), integer32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
numberOffCPorts.setStatus('mandatory')
f_c_port_table = mib_table((1, 3, 6, 1, 4, 1, 14851, 3, 1, 15, 2))
if mibBuilder.loadTexts:
fCPortTable.setStatus('mandatory')
f_c_port_entry = mib_table_row((1, 3, 6, 1, 4, 1, 14851, 3, 1, 15, 2, 1)).setIndexNames((0, 'SNIA-SML-MIB', 'fCPortIndex'))
if mibBuilder.loadTexts:
fCPortEntry.setStatus('mandatory')
f_c_port_index = mib_table_column((1, 3, 6, 1, 4, 1, 14851, 3, 1, 15, 2, 1, 1), uint32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
fCPortIndex.setStatus('mandatory')
f_c_port__device_id = mib_scalar((1, 3, 6, 1, 4, 1, 14851, 3, 1, 15, 2, 1, 2), display_string().subtype(subtypeSpec=value_size_constraint(0, 64))).setLabel('fCPort-DeviceID').setMaxAccess('readonly')
if mibBuilder.loadTexts:
fCPort_DeviceID.setStatus('mandatory')
f_c_port__element_name = mib_scalar((1, 3, 6, 1, 4, 1, 14851, 3, 1, 15, 2, 1, 3), display_string().subtype(subtypeSpec=value_size_constraint(0, 255))).setLabel('fCPort-ElementName').setMaxAccess('readonly')
if mibBuilder.loadTexts:
fCPort_ElementName.setStatus('mandatory')
f_c_port__caption = mib_scalar((1, 3, 6, 1, 4, 1, 14851, 3, 1, 15, 2, 1, 4), display_string().subtype(subtypeSpec=value_size_constraint(0, 64))).setLabel('fCPort-Caption').setMaxAccess('readonly')
if mibBuilder.loadTexts:
fCPort_Caption.setStatus('mandatory')
f_c_port__description = mib_scalar((1, 3, 6, 1, 4, 1, 14851, 3, 1, 15, 2, 1, 5), display_string().subtype(subtypeSpec=value_size_constraint(0, 255))).setLabel('fCPort-Description').setMaxAccess('readonly')
if mibBuilder.loadTexts:
fCPort_Description.setStatus('mandatory')
f_c_port_controller__operational_status = mib_scalar((1, 3, 6, 1, 4, 1, 14851, 3, 1, 15, 2, 1, 6), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 32768))).clone(namedValues=named_values(('unknown', 0), ('other', 1), ('ok', 2), ('degraded', 3), ('stressed', 4), ('predictiveFailure', 5), ('error', 6), ('non-RecoverableError', 7), ('starting', 8), ('stopping', 9), ('stopped', 10), ('inService', 11), ('noContact', 12), ('lostCommunication', 13), ('aborted', 14), ('dormant', 15), ('supportingEntityInError', 16), ('completed', 17), ('powerMode', 18), ('dMTFReserved', 19), ('vendorReserved', 32768)))).setLabel('fCPortController-OperationalStatus').setMaxAccess('readonly')
if mibBuilder.loadTexts:
fCPortController_OperationalStatus.setStatus('mandatory')
f_c_port__permanent_address = mib_scalar((1, 3, 6, 1, 4, 1, 14851, 3, 1, 15, 2, 1, 7), display_string().subtype(subtypeSpec=value_size_constraint(0, 64))).setLabel('fCPort-PermanentAddress').setMaxAccess('readonly')
if mibBuilder.loadTexts:
fCPort_PermanentAddress.setStatus('mandatory')
f_c_port__realizes_scsi_protocol_controller_index = mib_scalar((1, 3, 6, 1, 4, 1, 14851, 3, 1, 15, 2, 1, 8), uint32()).setLabel('fCPort-Realizes-scsiProtocolControllerIndex').setMaxAccess('readonly')
if mibBuilder.loadTexts:
fCPort_Realizes_scsiProtocolControllerIndex.setStatus('mandatory')
trap_group = mib_identifier((1, 3, 6, 1, 4, 1, 14851, 3, 1, 16))
traps_enabled = mib_scalar((1, 3, 6, 1, 4, 1, 14851, 3, 1, 16, 1), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2))).clone(namedValues=named_values(('enabled', 1), ('disabled', 2)))).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
trapsEnabled.setStatus('mandatory')
trap_drive_alert_summary = mib_scalar((1, 3, 6, 1, 4, 1, 14851, 3, 1, 16, 2), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60))).clone(namedValues=named_values(('readWarning', 1), ('writeWarning', 2), ('hardError', 3), ('media', 4), ('readFailure', 5), ('writeFailure', 6), ('mediaLife', 7), ('notDataGrade', 8), ('writeProtect', 9), ('noRemoval', 10), ('cleaningMedia', 11), ('unsupportedFormat', 12), ('recoverableSnappedTape', 13), ('unrecoverableSnappedTape', 14), ('memoryChipInCartridgeFailure', 15), ('forcedEject', 16), ('readOnlyFormat', 17), ('directoryCorruptedOnLoad', 18), ('nearingMediaLife', 19), ('cleanNow', 20), ('cleanPeriodic', 21), ('expiredCleaningMedia', 22), ('invalidCleaningMedia', 23), ('retentionRequested', 24), ('dualPortInterfaceError', 25), ('coolingFanError', 26), ('powerSupplyFailure', 27), ('powerConsumption', 28), ('driveMaintenance', 29), ('hardwareA', 30), ('hardwareB', 31), ('interface', 32), ('ejectMedia', 33), ('downloadFailure', 34), ('driveHumidity', 35), ('driveTemperature', 36), ('driveVoltage', 37), ('predictiveFailure', 38), ('diagnosticsRequired', 39), ('lostStatistics', 50), ('mediaDirectoryInvalidAtUnload', 51), ('mediaSystemAreaWriteFailure', 52), ('mediaSystemAreaReadFailure', 53), ('noStartOfData', 54), ('loadingFailure', 55), ('unrecoverableUnloadFailure', 56), ('automationInterfaceFailure', 57), ('firmwareFailure', 58), ('wormMediumIntegrityCheckFailed', 59), ('wormMediumOverwriteAttempted', 60)))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
trapDriveAlertSummary.setStatus('mandatory')
trap__association__media_access_device_index = mib_scalar((1, 3, 6, 1, 4, 1, 14851, 3, 1, 16, 3), uint32()).setLabel('trap-Association-MediaAccessDeviceIndex').setMaxAccess('readonly')
if mibBuilder.loadTexts:
trap_Association_MediaAccessDeviceIndex.setStatus('mandatory')
trap_changer_alert_summary = mib_scalar((1, 3, 6, 1, 4, 1, 14851, 3, 1, 16, 4), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32))).clone(namedValues=named_values(('libraryHardwareA', 1), ('libraryHardwareB', 2), ('libraryHardwareC', 3), ('libraryHardwareD', 4), ('libraryDiagnosticsRequired', 5), ('libraryInterface', 6), ('failurePrediction', 7), ('libraryMaintenance', 8), ('libraryHumidityLimits', 9), ('libraryTemperatureLimits', 10), ('libraryVoltageLimits', 11), ('libraryStrayMedia', 12), ('libraryPickRetry', 13), ('libraryPlaceRetry', 14), ('libraryLoadRetry', 15), ('libraryDoor', 16), ('libraryMailslot', 17), ('libraryMagazine', 18), ('librarySecurity', 19), ('librarySecurityMode', 20), ('libraryOffline', 21), ('libraryDriveOffline', 22), ('libraryScanRetry', 23), ('libraryInventory', 24), ('libraryIllegalOperation', 25), ('dualPortInterfaceError', 26), ('coolingFanFailure', 27), ('powerSupply', 28), ('powerConsumption', 29), ('passThroughMechanismFailure', 30), ('cartridgeInPassThroughMechanism', 31), ('unreadableBarCodeLabels', 32)))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
trapChangerAlertSummary.setStatus('mandatory')
trap__association__changer_device_index = mib_scalar((1, 3, 6, 1, 4, 1, 14851, 3, 1, 16, 5), uint32()).setLabel('trap-Association-ChangerDeviceIndex').setMaxAccess('readonly')
if mibBuilder.loadTexts:
trap_Association_ChangerDeviceIndex.setStatus('mandatory')
trap_perceived_severity = mib_scalar((1, 3, 6, 1, 4, 1, 14851, 3, 1, 16, 6), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(0, 1, 2, 3, 4, 5, 6, 7))).clone(namedValues=named_values(('unknown', 0), ('other', 1), ('information', 2), ('degradedWarning', 3), ('minor', 4), ('major', 5), ('critical', 6), ('fatalNonRecoverable', 7)))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
trapPerceivedSeverity.setStatus('mandatory')
trap_destination_table = mib_table((1, 3, 6, 1, 4, 1, 14851, 3, 1, 16, 7))
if mibBuilder.loadTexts:
trapDestinationTable.setStatus('mandatory')
trap_destination_entry = mib_table_row((1, 3, 6, 1, 4, 1, 14851, 3, 1, 16, 7, 1)).setIndexNames((0, 'SNIA-SML-MIB', 'numberOfTrapDestinations'))
if mibBuilder.loadTexts:
trapDestinationEntry.setStatus('mandatory')
number_of_trap_destinations = mib_table_column((1, 3, 6, 1, 4, 1, 14851, 3, 1, 16, 7, 1, 1), integer32()).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
numberOfTrapDestinations.setStatus('mandatory')
trap_destination_host_type = mib_table_column((1, 3, 6, 1, 4, 1, 14851, 3, 1, 16, 7, 1, 2), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2))).clone(namedValues=named_values(('iPv4', 1), ('iPv6', 2)))).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
trapDestinationHostType.setStatus('mandatory')
trap_destination_host_addr = mib_table_column((1, 3, 6, 1, 4, 1, 14851, 3, 1, 16, 7, 1, 3), display_string()).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
trapDestinationHostAddr.setStatus('mandatory')
trap_destination_port = mib_table_column((1, 3, 6, 1, 4, 1, 14851, 3, 1, 16, 7, 1, 4), integer32().subtype(subtypeSpec=value_range_constraint(0, 65535))).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
trapDestinationPort.setStatus('mandatory')
drive_alert = notification_type((1, 3, 6, 1, 4, 1, 14851, 3, 1) + (0, 0)).setObjects(('SNIA-SML-MIB', 'trapDriveAlertSummary'), ('SNIA-SML-MIB', 'trap_Association_MediaAccessDeviceIndex'), ('SNIA-SML-MIB', 'trapPerceivedSeverity'))
changer_alert = notification_type((1, 3, 6, 1, 4, 1, 14851, 3, 1) + (0, 1)).setObjects(('SNIA-SML-MIB', 'trapChangerAlertSummary'), ('SNIA-SML-MIB', 'trap_Association_ChangerDeviceIndex'), ('SNIA-SML-MIB', 'trapPerceivedSeverity'))
trap_objects = mib_identifier((1, 3, 6, 1, 4, 1, 14851, 3, 1, 16, 8))
current_operational_status = mib_scalar((1, 3, 6, 1, 4, 1, 14851, 3, 1, 16, 8, 1), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 32768))).clone(namedValues=named_values(('unknown', 0), ('other', 1), ('ok', 2), ('degraded', 3), ('stressed', 4), ('predictiveFailure', 5), ('error', 6), ('non-RecoverableError', 7), ('starting', 8), ('stopping', 9), ('stopped', 10), ('inService', 11), ('noContact', 12), ('lostCommunication', 13), ('aborted', 14), ('dormant', 15), ('supportingEntityInError', 16), ('completed', 17), ('powerMode', 18), ('dMTFReserved', 19), ('vendorReserved', 32768)))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
currentOperationalStatus.setStatus('mandatory')
old_operational_status = mib_scalar((1, 3, 6, 1, 4, 1, 14851, 3, 1, 16, 8, 2), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 32768))).clone(namedValues=named_values(('unknown', 0), ('other', 1), ('ok', 2), ('degraded', 3), ('stressed', 4), ('predictiveFailure', 5), ('error', 6), ('non-RecoverableError', 7), ('starting', 8), ('stopping', 9), ('stopped', 10), ('inService', 11), ('noContact', 12), ('lostCommunication', 13), ('aborted', 14), ('dormant', 15), ('supportingEntityInError', 16), ('completed', 17), ('powerMode', 18), ('dMTFReserved', 19), ('vendorReserved', 32768)))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
oldOperationalStatus.setStatus('mandatory')
library_added_trap = notification_type((1, 3, 6, 1, 4, 1, 14851, 3, 1, 16) + (0, 3)).setObjects(('SNIA-SML-MIB', 'storageLibrary_Name'))
library_deleted_trap = notification_type((1, 3, 6, 1, 4, 1, 14851, 3, 1, 16) + (0, 4)).setObjects(('SNIA-SML-MIB', 'storageLibrary_Name'))
library_op_status_changed_trap = notification_type((1, 3, 6, 1, 4, 1, 14851, 3, 1, 16) + (0, 5)).setObjects(('SNIA-SML-MIB', 'storageLibrary_Name'), ('SNIA-SML-MIB', 'currentOperationalStatus'), ('SNIA-SML-MIB', 'oldOperationalStatus'))
drive_added_trap = notification_type((1, 3, 6, 1, 4, 1, 14851, 3, 1, 16) + (0, 6)).setObjects(('SNIA-SML-MIB', 'storageLibrary_Name'), ('SNIA-SML-MIB', 'mediaAccessDevice_DeviceID'))
drive_deleted_trap = notification_type((1, 3, 6, 1, 4, 1, 14851, 3, 1, 16) + (0, 7)).setObjects(('SNIA-SML-MIB', 'storageLibrary_Name'), ('SNIA-SML-MIB', 'mediaAccessDevice_DeviceID'))
drive_op_status_changed_trap = notification_type((1, 3, 6, 1, 4, 1, 14851, 3, 1, 16) + (0, 8)).setObjects(('SNIA-SML-MIB', 'storageLibrary_Name'), ('SNIA-SML-MIB', 'mediaAccessDevice_DeviceID'), ('SNIA-SML-MIB', 'currentOperationalStatus'), ('SNIA-SML-MIB', 'oldOperationalStatus'))
changer_added_trap = notification_type((1, 3, 6, 1, 4, 1, 14851, 3, 1, 16) + (0, 9)).setObjects(('SNIA-SML-MIB', 'storageLibrary_Name'), ('SNIA-SML-MIB', 'changerDevice_DeviceID'))
changer_deleted_trap = notification_type((1, 3, 6, 1, 4, 1, 14851, 3, 1, 16) + (0, 10)).setObjects(('SNIA-SML-MIB', 'storageLibrary_Name'), ('SNIA-SML-MIB', 'changerDevice_DeviceID'))
changer_op_status_changed_trap = notification_type((1, 3, 6, 1, 4, 1, 14851, 3, 1, 16) + (0, 11)).setObjects(('SNIA-SML-MIB', 'storageLibrary_Name'), ('SNIA-SML-MIB', 'changerDevice_DeviceID'), ('SNIA-SML-MIB', 'currentOperationalStatus'), ('SNIA-SML-MIB', 'oldOperationalStatus'))
physical_media_added_trap = notification_type((1, 3, 6, 1, 4, 1, 14851, 3, 1, 16) + (0, 12)).setObjects(('SNIA-SML-MIB', 'storageMediaLocation_PhysicalMedia_Tag'))
physical_media_deleted_trap = notification_type((1, 3, 6, 1, 4, 1, 14851, 3, 1, 16) + (0, 13)).setObjects(('SNIA-SML-MIB', 'storageMediaLocation_PhysicalMedia_Tag'))
end_of_sml_mib = mib_scalar((1, 3, 6, 1, 4, 1, 14851, 3, 1, 17), object_identifier())
if mibBuilder.loadTexts:
endOfSmlMib.setStatus('mandatory')
mibBuilder.exportSymbols('SNIA-SML-MIB', storageMediaLocation_PhysicalMedia_CleanerMedia=storageMediaLocation_PhysicalMedia_CleanerMedia, scsiProtocolController_ElementName=scsiProtocolController_ElementName, smlCimVersion=smlCimVersion, product_ElementName=product_ElementName, physicalPackageIndex=physicalPackageIndex, trapDestinationPort=trapDestinationPort, trap_Association_ChangerDeviceIndex=trap_Association_ChangerDeviceIndex, storageLibrary_Caption=storageLibrary_Caption, experimental=experimental, numberOfSoftwareElements=numberOfSoftwareElements, changerDevice_Realizes_StorageLocationIndex=changerDevice_Realizes_StorageLocationIndex, storageMediaLocation_PhysicalMedia_DualSided=storageMediaLocation_PhysicalMedia_DualSided, storageMediaLocation_MediaCapacity=storageMediaLocation_MediaCapacity, subChassis_Manufacturer=subChassis_Manufacturer, chassis_SecurityBreach=chassis_SecurityBreach, scsiProtocolController_DeviceID=scsiProtocolController_DeviceID, mediaAccessDevice_DeviceID=mediaAccessDevice_DeviceID, storageMediaLocation_Association_ChangerDeviceIndex=storageMediaLocation_Association_ChangerDeviceIndex, driveAddedTrap=driveAddedTrap, subChassisIndex=subChassisIndex, subChassis_OperationalStatus=subChassis_OperationalStatus, mediaAccessDevice_MountCount=mediaAccessDevice_MountCount, storageMediaLocationEntry=storageMediaLocationEntry, product_Version=product_Version, mediaAccessDeviceGroup=mediaAccessDeviceGroup, scsiProtocolController_Realizes_MediaAccessDeviceIndex=scsiProtocolController_Realizes_MediaAccessDeviceIndex, trapDestinationHostType=trapDestinationHostType, softwareElementGroup=softwareElementGroup, limitedAccessPort_Extended=limitedAccessPort_Extended, softwareElement_Version=softwareElement_Version, driveOpStatusChangedTrap=driveOpStatusChangedTrap, CimDateTime=CimDateTime, smlMibVersion=smlMibVersion, physicalPackage_Model=physicalPackage_Model, mediaAccessDevice_Realizes_softwareElementIndex=mediaAccessDevice_Realizes_softwareElementIndex, changerDevice_Caption=changerDevice_Caption, scsiProtocolController_Description=scsiProtocolController_Description, mediaAccessDevice_PowerOnHours=mediaAccessDevice_PowerOnHours, libraryOpStatusChangedTrap=libraryOpStatusChangedTrap, physicalMediaAddedTrap=physicalMediaAddedTrap, changerDevice_Availability=changerDevice_Availability, trapGroup=trapGroup, fCPortGroup=fCPortGroup, changerDevice_Description=changerDevice_Description, subChassisEntry=subChassisEntry, fCPortIndex=fCPortIndex, storageMediaLocation_PhysicalMedia_Replaceable=storageMediaLocation_PhysicalMedia_Replaceable, subChassis_SecurityBreach=subChassis_SecurityBreach, storageLibrary_Name=storageLibrary_Name, numberOfSCSIProtocolControllers=numberOfSCSIProtocolControllers, storageLibraryGroup=storageLibraryGroup, computerSystem_OperationalStatus=computerSystem_OperationalStatus, storageMediaLocation_PhysicalMedia_Capacity=storageMediaLocation_PhysicalMedia_Capacity, driveAlert=driveAlert, limitedAccessPort_Realizes_StorageLocationIndex=limitedAccessPort_Realizes_StorageLocationIndex, storageMediaLocation_PhysicalMedia_MediaDescription=storageMediaLocation_PhysicalMedia_MediaDescription, changerDeviceIndex=changerDeviceIndex, numberOfTrapDestinations=numberOfTrapDestinations, limitedAccessPort_ElementName=limitedAccessPort_ElementName, numberOffCPorts=numberOffCPorts, scsiProtocolControllerEntry=scsiProtocolControllerEntry, chassis_IsLocked=chassis_IsLocked, numberOfMediaAccessDevices=numberOfMediaAccessDevices, scsiProtocolController_OperationalStatus=scsiProtocolController_OperationalStatus, changerAddedTrap=changerAddedTrap, trapDriveAlertSummary=trapDriveAlertSummary, trapDestinationHostAddr=trapDestinationHostAddr, physicalPackageGroup=physicalPackageGroup, softwareElementEntry=softwareElementEntry, trapPerceivedSeverity=trapPerceivedSeverity, trapsEnabled=trapsEnabled, UShortReal=UShortReal, fCPort_Caption=fCPort_Caption, subChassis_Model=subChassis_Model, scsiProtocolController_Realizes_ChangerDeviceIndex=scsiProtocolController_Realizes_ChangerDeviceIndex, computerSystem_Caption=computerSystem_Caption, product_IdentifyingNumber=product_IdentifyingNumber, mediaAccessDevice_TotalPowerOnHours=mediaAccessDevice_TotalPowerOnHours, storageMediaLocation_LocationType=storageMediaLocation_LocationType, limitedAccessPortEntry=limitedAccessPortEntry, computerSystem_Name=computerSystem_Name, numberOflimitedAccessPorts=numberOflimitedAccessPorts, numberOfPhysicalPackages=numberOfPhysicalPackages, limitedAccessPort_Description=limitedAccessPort_Description, storageMediaLocation_PhysicalMedia_Removable=storageMediaLocation_PhysicalMedia_Removable, computerSystem_PrimaryOwnerContact=computerSystem_PrimaryOwnerContact, storageMediaLocation_PhysicalMedia_PhysicalLabel=storageMediaLocation_PhysicalMedia_PhysicalLabel, limitedAccessPort_Caption=limitedAccessPort_Caption, productGroup=productGroup, fCPort_PermanentAddress=fCPort_PermanentAddress, libraryAddedTrap=libraryAddedTrap, computerSystem_NameFormat=computerSystem_NameFormat, smlRoot=smlRoot, oldOperationalStatus=oldOperationalStatus, libraries=libraries, mediaAccessDeviceEntry=mediaAccessDeviceEntry, softwareElement_InstanceID=softwareElement_InstanceID, UINT64=UINT64, mediaAccessDeviceIndex=mediaAccessDeviceIndex, storageLibrary_Description=storageLibrary_Description, numberOfPhysicalMedias=numberOfPhysicalMedias, changerDeviceGroup=changerDeviceGroup, changerAlert=changerAlert, mediaAccessDevice_Availability=mediaAccessDevice_Availability, storageMediaLocation_PhysicalMediaPresent=storageMediaLocation_PhysicalMediaPresent, fCPort_Description=fCPort_Description, softwareElement_CodeSet=softwareElement_CodeSet, storageMediaLocation_PhysicalMedia_HotSwappable=storageMediaLocation_PhysicalMedia_HotSwappable, fCPort_Realizes_scsiProtocolControllerIndex=fCPort_Realizes_scsiProtocolControllerIndex, softwareElement_Manufacturer=softwareElement_Manufacturer, changerDeviceEntry=changerDeviceEntry, mediaAccessDevice_Realizes_StorageLocationIndex=mediaAccessDevice_Realizes_StorageLocationIndex, scsiProtocolControllerIndex=scsiProtocolControllerIndex, driveDeletedTrap=driveDeletedTrap, storageMediaLocationGroup=storageMediaLocationGroup, softwareElement_IdentificationCode=softwareElement_IdentificationCode, chassis_ElementName=chassis_ElementName, computerSystemGroup=computerSystemGroup, storageMediaLocationTable=storageMediaLocationTable, subChassis_LockPresent=subChassis_LockPresent, subChassis_IsLocked=subChassis_IsLocked, numberOfStorageMediaLocations=numberOfStorageMediaLocations, trap_Association_MediaAccessDeviceIndex=trap_Association_MediaAccessDeviceIndex, fCPort_ElementName=fCPort_ElementName, UINT32=UINT32, trapChangerAlertSummary=trapChangerAlertSummary, storageMediaLocation_PhysicalMedia_Tag=storageMediaLocation_PhysicalMedia_Tag, endOfSmlMib=endOfSmlMib, softwareElementTable=softwareElementTable, numberOfChangerDevices=numberOfChangerDevices, changerDevice_DeviceID=changerDevice_DeviceID, mediaAccessDevice_Name=mediaAccessDevice_Name, softwareElement_SoftwareElementID=softwareElement_SoftwareElementID, mediaAccessDevice_Status=mediaAccessDevice_Status, limitedAccessPortIndex=limitedAccessPortIndex, product_Name=product_Name, storageLibrary_InstallDate=storageLibrary_InstallDate, subChassis_ElementName=subChassis_ElementName, mediaAccessDevice_OperationalStatus=mediaAccessDevice_OperationalStatus, storageMediaLocation_MediaTypesSupported=storageMediaLocation_MediaTypesSupported, mediaAccessDeviceObjectType=mediaAccessDeviceObjectType, mediaAccessDevice_NeedsCleaning=mediaAccessDevice_NeedsCleaning, physicalMediaDeletedTrap=physicalMediaDeletedTrap, chassis_Manufacturer=chassis_Manufacturer, subChassis_Tag=subChassis_Tag, computerSystem_Dedicated=computerSystem_Dedicated, computerSystem_Description=computerSystem_Description, fCPortController_OperationalStatus=fCPortController_OperationalStatus, snia=snia, changerDevice_MediaFlipSupported=changerDevice_MediaFlipSupported, limitedAccessPortGroup=limitedAccessPortGroup, currentOperationalStatus=currentOperationalStatus, computerSystem_ElementName=computerSystem_ElementName, physicalPackage_Manufacturer=physicalPackage_Manufacturer, scsiProtocolControllerTable=scsiProtocolControllerTable, physicalPackage_SerialNumber=physicalPackage_SerialNumber, computerSystem_Realizes_softwareElementIndex=computerSystem_Realizes_softwareElementIndex, physicalPackage_Realizes_MediaAccessDeviceIndex=physicalPackage_Realizes_MediaAccessDeviceIndex, chassis_LockPresent=chassis_LockPresent, softwareElement_LanguageEdition=softwareElement_LanguageEdition, trapObjects=trapObjects, subChassisTable=subChassisTable, softwareElement_Name=softwareElement_Name, changerDevice_ElementName=changerDevice_ElementName, fCPortTable=fCPortTable, mediaAccessDeviceTable=mediaAccessDeviceTable, softwareElement_SerialNumber=softwareElement_SerialNumber, fCPortEntry=fCPortEntry, storageMediaLocationIndex=storageMediaLocationIndex, physicalPackageEntry=physicalPackageEntry, softwareElement_BuildNumber=softwareElement_BuildNumber, subChassis_SerialNumber=subChassis_SerialNumber, changerDeviceTable=changerDeviceTable, libraryDeletedTrap=libraryDeletedTrap, chassis_Model=chassis_Model, trapDestinationEntry=trapDestinationEntry, scsiProtocolController_Availability=scsiProtocolController_Availability, changerDevice_OperationalStatus=changerDevice_OperationalStatus, changerDeletedTrap=changerDeletedTrap, limitedAccessPort_DeviceID=limitedAccessPort_DeviceID, trapDestinationTable=trapDestinationTable, numberOfsubChassis=numberOfsubChassis, storageMediaLocation_PhysicalMedia_MediaType=storageMediaLocation_PhysicalMedia_MediaType, chassis_Tag=chassis_Tag, scsiProtocolControllerGroup=scsiProtocolControllerGroup, fCPort_DeviceID=fCPort_DeviceID, chassisGroup=chassisGroup, physicalPackage_Tag=physicalPackage_Tag, limitedAccessPortTable=limitedAccessPortTable, computerSystem_PrimaryOwnerName=computerSystem_PrimaryOwnerName, subChassis_PackageType=subChassis_PackageType, UINT16=UINT16, product_Vendor=product_Vendor, chassis_SerialNumber=chassis_SerialNumber, changerOpStatusChangedTrap=changerOpStatusChangedTrap, softwareElementIndex=softwareElementIndex, storageLibrary_Status=storageLibrary_Status, storageMediaLocation_LocationCoordinates=storageMediaLocation_LocationCoordinates, storageMediaLocation_Tag=storageMediaLocation_Tag, physicalPackageTable=physicalPackageTable, common=common) |
class Solution:
def twoSum(self, nums: List[int], target: int) -> List[int]:
dic = {}
for i in range(len(nums)):
if dic.get(target - nums[i]) is not None:
return [dic[target - nums[i]], i]
dic[nums[i]] = i
| class Solution:
def two_sum(self, nums: List[int], target: int) -> List[int]:
dic = {}
for i in range(len(nums)):
if dic.get(target - nums[i]) is not None:
return [dic[target - nums[i]], i]
dic[nums[i]] = i |
#!/usr/bin/env python3
ARP = [
{'mac_addr': '0062.ec29.70fe', 'ip_addr': '10.220.88.1', 'interface': 'gi0/0/0'},
{'mac_addr': 'c89c.1dea.0eb6', 'ip_addr': '10.220.88.20', 'interface': 'gi0/0/0'},
{'mac_addr': 'a093.5141.b780', 'ip_addr': '10.220.88.22', 'interface': 'gi0/0/0'},
{'mac_addr': '0001.00ff.0001', 'ip_addr': '10.220.88.37', 'interface': 'gi0/0/0'},
{'mac_addr': '0002.00ff.0001', 'ip_addr': '10.220.88.38', 'interface': 'gi0/0/0'},
]
print(ARP)
x = type(ARP)
print(x)
y = len(ARP)
print(y)
| arp = [{'mac_addr': '0062.ec29.70fe', 'ip_addr': '10.220.88.1', 'interface': 'gi0/0/0'}, {'mac_addr': 'c89c.1dea.0eb6', 'ip_addr': '10.220.88.20', 'interface': 'gi0/0/0'}, {'mac_addr': 'a093.5141.b780', 'ip_addr': '10.220.88.22', 'interface': 'gi0/0/0'}, {'mac_addr': '0001.00ff.0001', 'ip_addr': '10.220.88.37', 'interface': 'gi0/0/0'}, {'mac_addr': '0002.00ff.0001', 'ip_addr': '10.220.88.38', 'interface': 'gi0/0/0'}]
print(ARP)
x = type(ARP)
print(x)
y = len(ARP)
print(y) |
#!/usr/bin/env python
# encoding: utf-8
def run(whatweb, pluginname):
whatweb.recog_from_file(pluginname, "Script/FocusSlide.js", "southidc")
whatweb.recog_from_content(pluginname, "southidc")
whatweb.recog_from_file(pluginname,"Script/Html.js", "southidc")
| def run(whatweb, pluginname):
whatweb.recog_from_file(pluginname, 'Script/FocusSlide.js', 'southidc')
whatweb.recog_from_content(pluginname, 'southidc')
whatweb.recog_from_file(pluginname, 'Script/Html.js', 'southidc') |
'''
width search
Explore all of the neighbors nodes at the present depth '''
three_d_array = [[[i for k in range(4)] for j in range(4)] for i in range(4)]
sum = three_d_array[1][2][3] + three_d_array[2][3][1] + three_d_array[0][0][0]
print(sum) | """
width search
Explore all of the neighbors nodes at the present depth """
three_d_array = [[[i for k in range(4)] for j in range(4)] for i in range(4)]
sum = three_d_array[1][2][3] + three_d_array[2][3][1] + three_d_array[0][0][0]
print(sum) |
def f(x):
print('a')
y = x
print('b')
while y > 0:
print('c')
y -= 1
print('d')
yield y
print('e')
print('f')
return None
for val in f(3):
print(val)
#gen = f(3)
#print(gen)
#print(gen.__next__())
#print(gen.__next__())
#print(gen.__next__())
#print(gen.__next__())
# test printing, but only the first chars that match CPython
print(repr(f(0))[0:17])
print("PASS") | def f(x):
print('a')
y = x
print('b')
while y > 0:
print('c')
y -= 1
print('d')
yield y
print('e')
print('f')
return None
for val in f(3):
print(val)
print(repr(f(0))[0:17])
print('PASS') |
file = open("test/TopCompiler/"+input("filename: "), mode= "w")
sizeOfFunc = input("size of func: ")
lines = input("lines of code: ")
out = []
for i in range(int(int(lines) / int(sizeOfFunc)+2)):
out.append("def func"+str(i)+"() =\n")
for c in range(int(sizeOfFunc)):
out.append(' println "hello world" \n')
file.write("".join(out))
file.close() | file = open('test/TopCompiler/' + input('filename: '), mode='w')
size_of_func = input('size of func: ')
lines = input('lines of code: ')
out = []
for i in range(int(int(lines) / int(sizeOfFunc) + 2)):
out.append('def func' + str(i) + '() =\n')
for c in range(int(sizeOfFunc)):
out.append(' println "hello world" \n')
file.write(''.join(out))
file.close() |
#! /usr/bin/env python3
'''
Disjoint Set Class that provides basic functionality.
Implemented according the functionality provided here:
https://en.wikipedia.org/wiki/Disjoint-set_data_structure
@author: Paul Miller (github.com/138paulmiller)
'''
class DisjointSet:
'''
Disjoint Set : Utility class that helps implement Kruskal MST algorithm
Allows to check whether to keys belong to the same set and to union
sets together
'''
class Element:
def __init__(self, key):
self.key = key
self.parent = self
self.rank = 0
def __eq__(self, other):
return self.key == other.key
def __ne__(self, other):
return self.key != other.key
def __init__(self):
'''
Tree = element map where each node is a (key, parent, rank)
Sets are represented as subtrees whose root is identified with
a self referential parent
'''
self.tree = {}
def make_set(self, key):
'''
Creates a new singleton set.
@params
key : id of the element
@return
None
'''
# Create and add a new element to the tree
e = self.Element(key)
if not key in self.tree.keys():
self.tree[key] = e
def find(self, key):
'''
Finds a given element in the tree by the key.
@params
key(hashable) : id of the element
@return
Element : root of the set which contains element with the key
'''
if key in self.tree.keys():
element = self.tree[key]
# root is element with itself as parent
# if not root continue
if element.parent != element:
element.parent = self.find(element.parent.key)
return element.parent
def union(self, element_a, element_b):
'''
Creates a new set that contains all elements in both element_a and element_b's sets
Pass into union the Elements returned by the find operation
@params
element_a(Element) : Element or key of set a
element_b(Element) : Element of set b
@return
None
'''
root_a = self.find(element_a.key)
root_b = self.find(element_b.key)
# if not in the same subtree (set)
if root_a != root_b:
#merge the sets
if root_a.rank < root_b.rank:
root_a.parent = root_b
elif root_a.rank > root_b.rank:
root_b.parent = root_a
else:
# same rank, set and increment arbitrary root as parent
root_b.parent = root_a
root_a.rank+=1
| """
Disjoint Set Class that provides basic functionality.
Implemented according the functionality provided here:
https://en.wikipedia.org/wiki/Disjoint-set_data_structure
@author: Paul Miller (github.com/138paulmiller)
"""
class Disjointset:
"""
Disjoint Set : Utility class that helps implement Kruskal MST algorithm
Allows to check whether to keys belong to the same set and to union
sets together
"""
class Element:
def __init__(self, key):
self.key = key
self.parent = self
self.rank = 0
def __eq__(self, other):
return self.key == other.key
def __ne__(self, other):
return self.key != other.key
def __init__(self):
"""
Tree = element map where each node is a (key, parent, rank)
Sets are represented as subtrees whose root is identified with
a self referential parent
"""
self.tree = {}
def make_set(self, key):
"""
Creates a new singleton set.
@params
key : id of the element
@return
None
"""
e = self.Element(key)
if not key in self.tree.keys():
self.tree[key] = e
def find(self, key):
"""
Finds a given element in the tree by the key.
@params
key(hashable) : id of the element
@return
Element : root of the set which contains element with the key
"""
if key in self.tree.keys():
element = self.tree[key]
if element.parent != element:
element.parent = self.find(element.parent.key)
return element.parent
def union(self, element_a, element_b):
"""
Creates a new set that contains all elements in both element_a and element_b's sets
Pass into union the Elements returned by the find operation
@params
element_a(Element) : Element or key of set a
element_b(Element) : Element of set b
@return
None
"""
root_a = self.find(element_a.key)
root_b = self.find(element_b.key)
if root_a != root_b:
if root_a.rank < root_b.rank:
root_a.parent = root_b
elif root_a.rank > root_b.rank:
root_b.parent = root_a
else:
root_b.parent = root_a
root_a.rank += 1 |
#!/usr/bin/python
# https://code.google.com/codejam/contest/2933486/dashboard
# application of insertion sort
N = int(input().strip())
for i in range(N):
M = int(input().strip())
deck = []
count = 0
for j in range(M):
deck.append(input().strip())
p = 0
for k in range(len(deck)):
if k > 0 and deck[k] < deck[p]:
count += 1
else:
p = k
print(f'Case #{i + 1}: {count}')
| n = int(input().strip())
for i in range(N):
m = int(input().strip())
deck = []
count = 0
for j in range(M):
deck.append(input().strip())
p = 0
for k in range(len(deck)):
if k > 0 and deck[k] < deck[p]:
count += 1
else:
p = k
print(f'Case #{i + 1}: {count}') |
def sum(arr: list, start: int, end: int)->int:
if start > end:
return 0
elif start == end:
return arr[start]
else:
midpoint: int = int(start + (end - start) / 2)
return sum(arr, start, midpoint) + sum(arr, midpoint + 1, end)
numbers1: list = []
numbers2: list = [1]
numbers3: list = [1, 2, 3]
print(sum(numbers1, 0, len(numbers1) - 1))
print(sum(numbers2, 0, len(numbers2) - 1))
print(sum(numbers3, 0, len(numbers3) - 1)) | def sum(arr: list, start: int, end: int) -> int:
if start > end:
return 0
elif start == end:
return arr[start]
else:
midpoint: int = int(start + (end - start) / 2)
return sum(arr, start, midpoint) + sum(arr, midpoint + 1, end)
numbers1: list = []
numbers2: list = [1]
numbers3: list = [1, 2, 3]
print(sum(numbers1, 0, len(numbers1) - 1))
print(sum(numbers2, 0, len(numbers2) - 1))
print(sum(numbers3, 0, len(numbers3) - 1)) |
class Car:
def __init__(self, pMake, pModel, pColor, pPrice):
self.make = pMake
self.model = pModel
self.color = pColor
self.price = pPrice
def __str__(self):
return 'Make = %s, Model = %s, Color = %s, Price = %s' %(self.make, self.model, self.color, self.price)
def selecColor(self):
self.color = input('What is the new color? ')
def calculateTax(self):
priceWithTax = 1.1*self.price
return priceWithTax
myFirstCar = Car(pMake = 'Honda', pModel = 'Civic', pColor = 'White', pPrice = '15000')
print(myFirstCar)
# changing the price from 15000 to 18000
myFirstCar.price = 18000
print(myFirstCar)
myFirstCar.color = 'Orange'
print(myFirstCar)
finalPrice = myFirstCar.calculateTax()
print('The final price is $%s' %(finalPrice)) | class Car:
def __init__(self, pMake, pModel, pColor, pPrice):
self.make = pMake
self.model = pModel
self.color = pColor
self.price = pPrice
def __str__(self):
return 'Make = %s, Model = %s, Color = %s, Price = %s' % (self.make, self.model, self.color, self.price)
def selec_color(self):
self.color = input('What is the new color? ')
def calculate_tax(self):
price_with_tax = 1.1 * self.price
return priceWithTax
my_first_car = car(pMake='Honda', pModel='Civic', pColor='White', pPrice='15000')
print(myFirstCar)
myFirstCar.price = 18000
print(myFirstCar)
myFirstCar.color = 'Orange'
print(myFirstCar)
final_price = myFirstCar.calculateTax()
print('The final price is $%s' % finalPrice) |
class SimpleTreeNode:
def __init__(self, val, left=None, right=None) -> None:
self.val = val
self.left = left
self.right = right
class AdvanceTreeNode:
def __init__(self, val, parent=None, left=None, right=None) -> None:
self.val = val
self.parent: AdvanceTreeNode = parent
self.left: AdvanceTreeNode = left
self.right: AdvanceTreeNode = right
class SingleListNode:
def __init__(self, val, next=None) -> None:
self.val = val
self.next = next
class DoubleListNode:
def __init__(self, val, next=None, prev=None) -> None:
self.val = val
self.next = next
self.prev = prev
| class Simpletreenode:
def __init__(self, val, left=None, right=None) -> None:
self.val = val
self.left = left
self.right = right
class Advancetreenode:
def __init__(self, val, parent=None, left=None, right=None) -> None:
self.val = val
self.parent: AdvanceTreeNode = parent
self.left: AdvanceTreeNode = left
self.right: AdvanceTreeNode = right
class Singlelistnode:
def __init__(self, val, next=None) -> None:
self.val = val
self.next = next
class Doublelistnode:
def __init__(self, val, next=None, prev=None) -> None:
self.val = val
self.next = next
self.prev = prev |
#
# PySNMP MIB module CISCO-OPTICAL-MONITOR-MIB (http://snmplabs.com/pysmi)
# ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/CISCO-OPTICAL-MONITOR-MIB
# Produced by pysmi-0.3.4 at Wed May 1 12:08:51 2019
# On host DAVWANG4-M-1475 platform Darwin version 18.5.0 by user davwang4
# Using Python version 3.7.3 (default, Mar 27 2019, 09:23:15)
#
Integer, ObjectIdentifier, OctetString = mibBuilder.importSymbols("ASN1", "Integer", "ObjectIdentifier", "OctetString")
NamedValues, = mibBuilder.importSymbols("ASN1-ENUMERATION", "NamedValues")
SingleValueConstraint, ValueSizeConstraint, ConstraintsUnion, ValueRangeConstraint, ConstraintsIntersection = mibBuilder.importSymbols("ASN1-REFINEMENT", "SingleValueConstraint", "ValueSizeConstraint", "ConstraintsUnion", "ValueRangeConstraint", "ConstraintsIntersection")
ciscoMgmt, = mibBuilder.importSymbols("CISCO-SMI", "ciscoMgmt")
ifIndex, = mibBuilder.importSymbols("IF-MIB", "ifIndex")
ObjectGroup, NotificationGroup, ModuleCompliance = mibBuilder.importSymbols("SNMPv2-CONF", "ObjectGroup", "NotificationGroup", "ModuleCompliance")
Unsigned32, Bits, ObjectIdentity, MibIdentifier, ModuleIdentity, TimeTicks, Counter32, NotificationType, MibScalar, MibTable, MibTableRow, MibTableColumn, IpAddress, iso, Gauge32, Integer32, Counter64 = mibBuilder.importSymbols("SNMPv2-SMI", "Unsigned32", "Bits", "ObjectIdentity", "MibIdentifier", "ModuleIdentity", "TimeTicks", "Counter32", "NotificationType", "MibScalar", "MibTable", "MibTableRow", "MibTableColumn", "IpAddress", "iso", "Gauge32", "Integer32", "Counter64")
TextualConvention, TimeStamp, DisplayString = mibBuilder.importSymbols("SNMPv2-TC", "TextualConvention", "TimeStamp", "DisplayString")
ciscoOpticalMonitorMIB = ModuleIdentity((1, 3, 6, 1, 4, 1, 9, 9, 264))
ciscoOpticalMonitorMIB.setRevisions(('2007-01-02 00:00', '2002-05-10 00:00',))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
if mibBuilder.loadTexts: ciscoOpticalMonitorMIB.setRevisionsDescriptions(('Add cOpticalMonIfTimeGroup, cOpticalMIBEnableConfigGroup, cOpticalMIBIntervalConfigGroup, cOpticalMonThreshSourceGroup.', 'The initial revision of this MIB.',))
if mibBuilder.loadTexts: ciscoOpticalMonitorMIB.setLastUpdated('200701020000Z')
if mibBuilder.loadTexts: ciscoOpticalMonitorMIB.setOrganization('Cisco Systems, Inc.')
if mibBuilder.loadTexts: ciscoOpticalMonitorMIB.setContactInfo('Cisco Systems Customer Service Postal: 170 W Tasman Drive San Jose, CA 95134 Tel: +1 800 553-NETS E-mail: [email protected]')
if mibBuilder.loadTexts: ciscoOpticalMonitorMIB.setDescription('This MIB module defines objects to monitor optical characteristics and set corresponding thresholds on the optical interfaces in a network element. ')
class OpticalParameterType(TextualConvention, Integer32):
description = 'This value indicates the optical parameter that is being monitored. Valid values are - power (1) : Optical Power (AC + DC) in 1/10ths of dBm acPower (2) : Optical AC Power in 1/10ths of dBm ambientTemp (3) : Ambient Temperature in 1/10ths of degrees centigrade laserTemp (4) : Laser Temperature in 1/10ths of degrees centigrade biasCurrent (5) : Laser bias current in 100s of microamperes peltierCurrent (6) : Laser peltier current in milliamperes xcvrVoltage (7) : Transceiver voltage in millivolts '
status = 'current'
subtypeSpec = Integer32.subtypeSpec + ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4, 5, 6, 7))
namedValues = NamedValues(("power", 1), ("acPower", 2), ("ambientTemp", 3), ("laserTemp", 4), ("biasCurrent", 5), ("peltierCurrent", 6), ("xcvrVoltage", 7))
class OpticalParameterValue(TextualConvention, Integer32):
description = "The value of the optical parameter that is being monitored. The range of values varies depending on the type of optical parameter being monitored, as identified by a corresponding object with syntax OpticalParameterType. When the optical parameter being monitored is 'power' or 'acPower', the supported range is from -400 to 250, in 1/10ths of dBm. Example: A value of -300 represents a power level of -30.0 dBm. When the optical parameter being monitored is 'laserTemp' or 'ambientTemp', the supported range is from -500 to 850, in 1/10ths of degrees centigrade. Example: A value of 235 represents a temperature reading of 23.5 degrees C. When the optical parameter being monitored is 'biasCurrent', the supported range is from 0 to 10000, in 100s of microamperes. Example: A value of 500 represents a bias current reading of 50,000 microamperes. When the optical parameter being monitored is 'peltierCurrent', the supported range is from -10000 to 10000, in milliamperes. When the optical parameter being monitored is 'xcvrVoltage', the supported range is from 0 to 10000, in millivolts. The distinguished value of '-1000000' indicates that the object has not yet been initialized or does not apply. "
status = 'current'
subtypeSpec = Integer32.subtypeSpec + ValueRangeConstraint(-1000000, 1000000)
class OpticalIfDirection(TextualConvention, Integer32):
description = 'This value indicates the direction being monitored at the optical interface. '
status = 'current'
subtypeSpec = Integer32.subtypeSpec + ConstraintsUnion(SingleValueConstraint(1, 2, 3))
namedValues = NamedValues(("receive", 1), ("transmit", 2), ("notApplicable", 3))
class OpticalIfMonLocation(TextualConvention, Integer32):
description = "This value applies when there are multiple points at which optical characteristics can be measured, in the given direction, at an interface. It indicates whether the optical characteristics are measured before or after adjustment (e.g. optical amplification or attenuation). The codepoint 'notApplicable' should be used if no amplifier/attenuator exists at an interface. "
status = 'current'
subtypeSpec = Integer32.subtypeSpec + ConstraintsUnion(SingleValueConstraint(1, 2, 3))
namedValues = NamedValues(("beforeAdjustment", 1), ("afterAdjustment", 2), ("notApplicable", 3))
class OpticalAlarmStatus(TextualConvention, OctetString):
reference = 'Telcordia Technologies Generic Requirements GR-2918-CORE, Issue 4, December 1999, Section 8.11'
description = 'A bitmap that indicates the current status of thresholds on an interface. The bit is set to 1 if the threshold is currently being exceeded on the interface and will be set to 0 otherwise. (MSB) (LSB) 7 6 5 4 3 2 1 0 +----------------------+ | | +----------------------+ | | | | | | | +-- High alarm threshold | | +----- High warning threshold | +-------- Low alarm threshold +----------- Low warning threshold To minimize the probability of prematurely reacting to momentary signal variations, a soak time may be incorporated into the status indications in the following manner. The indication is set when the threshold violation persists for a period of time that exceeds the set soak interval. The indication is cleared when no threshold violation occurs for a period of time which exceeds the clear soak interval. In GR-2918-CORE, the recommended set soak interval is 2.5 seconds (plus/minus 0.5 seconds), and the recommended clear soak interval is 10 seconds (plus/minus 0.5 seconds). '
status = 'current'
subtypeSpec = OctetString.subtypeSpec + ValueSizeConstraint(1, 1)
fixedLength = 1
class OpticalAlarmSeverity(TextualConvention, Integer32):
reference = 'Telcordia Technologies Generic Requirements GR-474-CORE, Issue 1, December 1997, Section 2.2'
description = "The severity of a trouble condition. A smaller enumerated integer value indicates that the condition is more severe. The severities are defined as follows: 'critical' An alarm used to indicate a severe, service-affecting condition has occurred and that immediate corrective action is imperative, regardless of the time of day or day of the week. 'major' An alarm used for hardware or software conditions that indicate a serious disruption of service or malfunctioning or failure of important hardware. These troubles require the immediate attention and response of a technician to restore or maintain system capability. The urgency is less than in critical situations because of a lesser immediate or impending effect on service or system performance. 'minor' An alarm used for troubles that do not have a serious effect on service to customers or for troubles in hardware that are not essential to the operation of the system. 'notAlarmed' An event used for troubles that do not require action, for troubles that are reported as a result of manually initiated diagnostics, or for transient events such as crossing warning thresholds. This event can also be used to raise attention to a condition that could possibly be an impending problem. 'notReported' An event used for troubles similar to those described under 'notAlarmed', and that do not cause notifications to be generated. The information for these events is retrievable from the network element. 'cleared' This value indicates that a previously occuring alarm condition has been cleared, or that no trouble condition is present. "
status = 'current'
subtypeSpec = Integer32.subtypeSpec + ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4, 5, 6))
namedValues = NamedValues(("critical", 1), ("major", 2), ("minor", 3), ("notAlarmed", 4), ("notReported", 5), ("cleared", 6))
class OpticalAlarmSeverityOrZero(TextualConvention, Integer32):
description = "A value of either '0' or a valid optical alarm severity."
status = 'current'
subtypeSpec = Integer32.subtypeSpec + ValueRangeConstraint(0, 6)
class OpticalPMPeriod(TextualConvention, Integer32):
description = 'This value indicates the time period over which performance monitoring data has been collected.'
status = 'current'
subtypeSpec = Integer32.subtypeSpec + ConstraintsUnion(SingleValueConstraint(1, 2))
namedValues = NamedValues(("fifteenMin", 1), ("twentyFourHour", 2))
cOpticalMonitorMIBObjects = MibIdentifier((1, 3, 6, 1, 4, 1, 9, 9, 264, 1))
cOpticalMonGroup = MibIdentifier((1, 3, 6, 1, 4, 1, 9, 9, 264, 1, 1))
cOpticalPMGroup = MibIdentifier((1, 3, 6, 1, 4, 1, 9, 9, 264, 1, 2))
cOpticalMonTable = MibTable((1, 3, 6, 1, 4, 1, 9, 9, 264, 1, 1, 1), )
if mibBuilder.loadTexts: cOpticalMonTable.setStatus('current')
if mibBuilder.loadTexts: cOpticalMonTable.setDescription('This table provides objects to monitor optical parameters in a network element. It also provides objects for setting high and low threshold levels, with configurable severities, on these monitored parameters.')
cOpticalMonEntry = MibTableRow((1, 3, 6, 1, 4, 1, 9, 9, 264, 1, 1, 1, 1), ).setIndexNames((0, "IF-MIB", "ifIndex"), (0, "CISCO-OPTICAL-MONITOR-MIB", "cOpticalMonDirection"), (0, "CISCO-OPTICAL-MONITOR-MIB", "cOpticalMonLocation"), (0, "CISCO-OPTICAL-MONITOR-MIB", "cOpticalMonParameterType"))
if mibBuilder.loadTexts: cOpticalMonEntry.setStatus('current')
if mibBuilder.loadTexts: cOpticalMonEntry.setDescription('An entry in the cOpticalMonTable provides objects to monitor an optical parameter and set threshold levels on that parameter, at an optical interface. Note that the set of monitored optical parameters may vary based on interface type, direction, and monitoring location. Examples of interfaces that can have an entry in this table include optical transceivers, interfaces before and after optical amplifiers, and interfaces before and after optical attenuators.')
cOpticalMonDirection = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 264, 1, 1, 1, 1, 1), OpticalIfDirection())
if mibBuilder.loadTexts: cOpticalMonDirection.setStatus('current')
if mibBuilder.loadTexts: cOpticalMonDirection.setDescription('This object indicates the direction monitored for the optical interface, in this entry.')
cOpticalMonLocation = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 264, 1, 1, 1, 1, 2), OpticalIfMonLocation())
if mibBuilder.loadTexts: cOpticalMonLocation.setStatus('current')
if mibBuilder.loadTexts: cOpticalMonLocation.setDescription('This object indicates whether the optical characteristics are measured before or after adjustment (e.g. optical amplification or attenuation), at this interface.')
cOpticalMonParameterType = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 264, 1, 1, 1, 1, 3), OpticalParameterType())
if mibBuilder.loadTexts: cOpticalMonParameterType.setStatus('current')
if mibBuilder.loadTexts: cOpticalMonParameterType.setDescription('This object specifies the optical parameter that is being monitored in this entry.')
cOpticalParameterValue = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 264, 1, 1, 1, 1, 4), OpticalParameterValue()).setMaxAccess("readonly")
if mibBuilder.loadTexts: cOpticalParameterValue.setStatus('current')
if mibBuilder.loadTexts: cOpticalParameterValue.setDescription('This object gives the value measured for the particular optical parameter specified by the cOpticalMonParameterType object.')
cOpticalParamHighAlarmThresh = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 264, 1, 1, 1, 1, 5), OpticalParameterValue()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: cOpticalParamHighAlarmThresh.setStatus('current')
if mibBuilder.loadTexts: cOpticalParamHighAlarmThresh.setDescription("This object is used to set a high alarm threshold on the optical parameter being monitored. An alarm condition will be raised if the value given by cOpticalParameterValue goes from below the value configured in this object to above the value configured in this object, or if the initial value of cOpticalParameterValue exceeds the value configured in this object. For network elements that incorporate a soak time in the status indications, this alarm will be indicated in the cOpticalParamAlarmStatus object only after it persists for a period of time that equals the set soak interval. The severity level of the alarm is specified by the cOpticalParamHighAlarmSev object. When the cOpticalMonParameterType object is set to 'power' for the receive direction at a transceiver, this object specifies the receiver saturation level.")
cOpticalParamHighAlarmSev = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 264, 1, 1, 1, 1, 6), OpticalAlarmSeverity()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: cOpticalParamHighAlarmSev.setStatus('current')
if mibBuilder.loadTexts: cOpticalParamHighAlarmSev.setDescription("This object is used to specify a severity level associated with the high alarm threshold given by the cOpticalParamHighAlarmThresh object. The values 'notAlarmed', 'notReported', and 'cleared' do not apply. The severity level configured in this object must be higher than the level configured in the cOpticalParamHighWarningSev object.")
cOpticalParamHighWarningThresh = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 264, 1, 1, 1, 1, 7), OpticalParameterValue()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: cOpticalParamHighWarningThresh.setStatus('current')
if mibBuilder.loadTexts: cOpticalParamHighWarningThresh.setDescription('This object is used to set a high warning threshold on the optical parameter being monitored. A threshold crossing condition will be indicated if the value given by cOpticalParameterValue goes from below the value configured in this object to above the value configured in this object, or if the initial value of cOpticalParameterValue exceeds the value configured in this object. For network elements that incorporate a soak time in the status indications, this threshold violation will be indicated in the cOpticalParamAlarmStatus object only after it persists for a period of time that equals the set soak interval. This threshold crossing may or may not be alarmed or reported, based on the severity level specified by the cOpticalParamHighWarningSev object.')
cOpticalParamHighWarningSev = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 264, 1, 1, 1, 1, 8), OpticalAlarmSeverity()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: cOpticalParamHighWarningSev.setStatus('current')
if mibBuilder.loadTexts: cOpticalParamHighWarningSev.setDescription("This object is used to specify a severity level associated with the high warning threshold given by the cOpticalParamHighWarningThresh object. The values 'critical', 'major', and 'cleared' do not apply. The severity level configured in this object must be lower than the level configured in the cOpticalParamHighAlarmSev object. If this object is set to 'notReported', no notifications will be generated when this threshold is exceeded, irrespective of the value configured in the cOpticalNotifyEnable object.")
cOpticalParamLowAlarmThresh = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 264, 1, 1, 1, 1, 9), OpticalParameterValue()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: cOpticalParamLowAlarmThresh.setStatus('current')
if mibBuilder.loadTexts: cOpticalParamLowAlarmThresh.setDescription("This object is used to set a low alarm threshold on the optical parameter being monitored. An alarm condition will be raised if the value given by cOpticalParameterValue goes from above the value configured in this object to below the value configured in this object, or if the initial value of cOpticalParameterValue is lower than the value configured in this object. For network elements that incorporate a soak time in the status indications, this alarm will be indicated in the cOpticalParamAlarmStatus object only after it persists for a period of time that equals the set soak interval. The severity level of this alarm is specified by the cOpticalParamLowAlarmSev object. When the cOpticalMonParameterType object is set to 'power' for the receive direction and when the interface supports alarms based on loss of light, this object specifies the optical power threshold for declaring loss of light. Also, when optical amplifiers are present in the network, in the receive direction, this value may need to be configured, since the noise floor may be higher than the minimum sensitivity of the receiver.")
cOpticalParamLowAlarmSev = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 264, 1, 1, 1, 1, 10), OpticalAlarmSeverity()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: cOpticalParamLowAlarmSev.setStatus('current')
if mibBuilder.loadTexts: cOpticalParamLowAlarmSev.setDescription("This object is used to specify a severity level associated with the low alarm threshold given by the cOpticalParamLowAlarmThresh object. The values 'notAlarmed', 'notReported', and 'cleared' do not apply. The severity level configured in this object must be higher than the level configured in the cOpticalParamLowWarningSev object.")
cOpticalParamLowWarningThresh = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 264, 1, 1, 1, 1, 11), OpticalParameterValue()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: cOpticalParamLowWarningThresh.setStatus('current')
if mibBuilder.loadTexts: cOpticalParamLowWarningThresh.setDescription('This object is used to set a low warning threshold on the optical parameter being monitored. A threshold crossing condition will be indicated if the value given by cOpticalParameterValue goes from above the value configured in this object to below the value configured in this object, or if the initial value of cOpticalParameterValue object is lower than the value configured in this object. For network elements that incorporate a soak time in the status indications, this threshold violation will be indicated in the cOpticalParamAlarmStatus object only after it persists for a period of time that equals the set soak interval. This threshold crossing may or may not be alarmed or reported, based on the severity level specified by the cOpticalParamLowWarningSev object.')
cOpticalParamLowWarningSev = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 264, 1, 1, 1, 1, 12), OpticalAlarmSeverity()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: cOpticalParamLowWarningSev.setStatus('current')
if mibBuilder.loadTexts: cOpticalParamLowWarningSev.setDescription("This object is used to specify a severity level associated with the low warning threshold given by the cOpticalParamLowWarningThresh object. The values 'critical', 'major', and 'cleared' do not apply. The severity level configured in this object must be lower than the level configured in the cOpticalParamLowAlarmSev object. If this object is set to 'notReported', no notifications will be generated when this threshold is exceeded, irrespective of the value configured in the cOpticalNotifyEnable object.")
cOpticalParamAlarmStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 264, 1, 1, 1, 1, 13), OpticalAlarmStatus()).setMaxAccess("readonly")
if mibBuilder.loadTexts: cOpticalParamAlarmStatus.setStatus('current')
if mibBuilder.loadTexts: cOpticalParamAlarmStatus.setDescription('This object is used to indicate the current status of the thresholds for the monitored optical parameter on the interface. If a threshold is currently being exceeded on the interface, the corresponding bit in this object will be set to 1. Otherwise, the bit will be set to 0.')
cOpticalParamAlarmCurMaxThresh = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 264, 1, 1, 1, 1, 14), OpticalParameterValue()).setMaxAccess("readonly")
if mibBuilder.loadTexts: cOpticalParamAlarmCurMaxThresh.setStatus('current')
if mibBuilder.loadTexts: cOpticalParamAlarmCurMaxThresh.setDescription("This object indicates the threshold value of the highest severity threshold that is currently being exceeded on the interface, for the optical parameter. If no threshold value is currently being exceeded, then the value '-1000000' is returned.")
cOpticalParamAlarmCurMaxSev = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 264, 1, 1, 1, 1, 15), OpticalAlarmSeverity()).setMaxAccess("readonly")
if mibBuilder.loadTexts: cOpticalParamAlarmCurMaxSev.setStatus('current')
if mibBuilder.loadTexts: cOpticalParamAlarmCurMaxSev.setDescription('This object indicates the maximum severity of any thresholds that are currently being exceeded on the interface, for the optical parameter.')
cOpticalParamAlarmLastChange = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 264, 1, 1, 1, 1, 16), TimeStamp()).setMaxAccess("readonly")
if mibBuilder.loadTexts: cOpticalParamAlarmLastChange.setStatus('current')
if mibBuilder.loadTexts: cOpticalParamAlarmLastChange.setDescription('This object specifies the value of sysUpTime at the last time a threshold related to a particular optical parameter was exceeded or cleared on the interface.')
cOpticalMon15MinValidIntervals = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 264, 1, 1, 1, 1, 17), Unsigned32().subtype(subtypeSpec=ValueRangeConstraint(0, 96))).setMaxAccess("readonly")
if mibBuilder.loadTexts: cOpticalMon15MinValidIntervals.setStatus('current')
if mibBuilder.loadTexts: cOpticalMon15MinValidIntervals.setDescription('This object gives the number of previous 15 minute intervals for which valid performance monitoring data has been stored on the interface. The value of this object will be n (where n is the maximum number of 15 minute intervals supported at this interface), unless the measurement was (re-)started within the last (nx15) minutes, in which case the value will be the number of previous 15 minute intervals for which the agent has some data.')
cOpticalMon24HrValidIntervals = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 264, 1, 1, 1, 1, 18), Unsigned32().subtype(subtypeSpec=ValueRangeConstraint(0, 1))).setMaxAccess("readonly")
if mibBuilder.loadTexts: cOpticalMon24HrValidIntervals.setStatus('current')
if mibBuilder.loadTexts: cOpticalMon24HrValidIntervals.setDescription('This object gives the number of previous 24 hour intervals for which valid performance monitoring data has been stored on the interface. The value of this object will be 0 if the measurement was (re-)started within the last 24 hours, or 1 otherwise.')
cOpticalParamThreshSource = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 264, 1, 1, 1, 1, 19), Bits().clone(namedValues=NamedValues(("highAlarmDefThresh", 0), ("highWarnDefThresh", 1), ("lowAlarmDefThresh", 2), ("lowWarnDefThresh", 3)))).setMaxAccess("readwrite")
if mibBuilder.loadTexts: cOpticalParamThreshSource.setStatus('current')
if mibBuilder.loadTexts: cOpticalParamThreshSource.setDescription("This object indicates if the current value of a particular threshold in this entry is user configured value or it is a system default value. It also allows user to specify the list of thresholds for this entry which should be restored to their system default values. The bit 'highAlarmThresh' corresponds to the object cOpticalParamHighAlarmThresh. The bit 'highWarnThresh' corresponds to the object cOpticalParamHighWarningThresh. The bit 'lowAlarmThresh' corresponds to the object cOpticalParamLowAlarmThresh. The bit 'lowWarnThresh' corresponds to the object cOpticalParamLowWarningThresh. A value of 0 for a bit indicates that corresponding object has system default value of threshold. A value of 1 for a bit indicates that corresponding object has user configured threshold value. A user may only change value of each of the bits to zero. Setting a bit to 0 will reset the corresponding threshold to its default value. System will change a bit from 0 to 1 when its corresponding threshold is changed by user from its default to any other value.")
cOpticalNotifyEnable = MibScalar((1, 3, 6, 1, 4, 1, 9, 9, 264, 1, 1, 2), OpticalAlarmSeverityOrZero()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: cOpticalNotifyEnable.setStatus('current')
if mibBuilder.loadTexts: cOpticalNotifyEnable.setDescription("This object specifies the minimum severity threshold governing the generation of cOpticalMonParameterStatus notifications. For example, if the value of this object is set to 'major', then the agent generates these notifications if and only if the severity of the alarm being indicated is 'major' or 'critical'. The values of 'notReported', and 'cleared' do not apply. The value of '0' disables the generation of notifications.")
cOpticalMonEnable = MibScalar((1, 3, 6, 1, 4, 1, 9, 9, 264, 1, 1, 3), Bits().clone(namedValues=NamedValues(("all", 0)))).setMaxAccess("readwrite")
if mibBuilder.loadTexts: cOpticalMonEnable.setStatus('current')
if mibBuilder.loadTexts: cOpticalMonEnable.setDescription("This object specifies the types of transceivers for which optical monitoring is enabled. A value of 1 for the bit 'all', specifies that optical monitoring functionality is enabled for all the types of transceivers which are supported by system and have optical monitoring capability.")
cOpticalMonPollInterval = MibScalar((1, 3, 6, 1, 4, 1, 9, 9, 264, 1, 1, 4), Unsigned32()).setUnits('minutes').setMaxAccess("readwrite")
if mibBuilder.loadTexts: cOpticalMonPollInterval.setStatus('current')
if mibBuilder.loadTexts: cOpticalMonPollInterval.setDescription('This object specifies the interval in minutes after which optical transceiver data will be polled by system repeatedly and updated in cOpticalMonTable when one or more bits in cOpticalMonEnable is set.')
cOpticalMonIfTable = MibTable((1, 3, 6, 1, 4, 1, 9, 9, 264, 1, 1, 5), )
if mibBuilder.loadTexts: cOpticalMonIfTable.setStatus('current')
if mibBuilder.loadTexts: cOpticalMonIfTable.setDescription('This table contains the list of optical interfaces populated in cOpticalMonTable.')
cOpticalMonIfEntry = MibTableRow((1, 3, 6, 1, 4, 1, 9, 9, 264, 1, 1, 5, 1), ).setIndexNames((0, "IF-MIB", "ifIndex"))
if mibBuilder.loadTexts: cOpticalMonIfEntry.setStatus('current')
if mibBuilder.loadTexts: cOpticalMonIfEntry.setDescription('An entry containing the information for a particular optical interface.')
cOpticalMonIfTimeInSlot = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 264, 1, 1, 5, 1, 1), Unsigned32()).setUnits('seconds').setMaxAccess("readonly")
if mibBuilder.loadTexts: cOpticalMonIfTimeInSlot.setStatus('current')
if mibBuilder.loadTexts: cOpticalMonIfTimeInSlot.setDescription('This object indicates when this optical transceiver was detected by the system.')
cOpticalPMCurrentTable = MibTable((1, 3, 6, 1, 4, 1, 9, 9, 264, 1, 2, 1), )
if mibBuilder.loadTexts: cOpticalPMCurrentTable.setStatus('current')
if mibBuilder.loadTexts: cOpticalPMCurrentTable.setDescription('This table contains performance monitoring data for the various optical parameters, collected over the current 15 minute or the current 24 hour interval.')
cOpticalPMCurrentEntry = MibTableRow((1, 3, 6, 1, 4, 1, 9, 9, 264, 1, 2, 1, 1), ).setIndexNames((0, "CISCO-OPTICAL-MONITOR-MIB", "cOpticalPMCurrentPeriod"), (0, "IF-MIB", "ifIndex"), (0, "CISCO-OPTICAL-MONITOR-MIB", "cOpticalPMCurrentDirection"), (0, "CISCO-OPTICAL-MONITOR-MIB", "cOpticalPMCurrentLocation"), (0, "CISCO-OPTICAL-MONITOR-MIB", "cOpticalPMCurrentParamType"))
if mibBuilder.loadTexts: cOpticalPMCurrentEntry.setStatus('current')
if mibBuilder.loadTexts: cOpticalPMCurrentEntry.setDescription('An entry in the cOpticalPMCurrentTable. It contains performance monitoring data for a monitored optical parameter at an interface, collected over the current 15 minute or the current 24 hour interval. Note that the set of monitored optical parameters may vary based on interface type, direction, and monitoring location. Examples of interfaces that can have an entry in this table include optical transceivers, interfaces before and after optical amplifiers, and interfaces before and after optical attenuators.')
cOpticalPMCurrentPeriod = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 264, 1, 2, 1, 1, 1), OpticalPMPeriod())
if mibBuilder.loadTexts: cOpticalPMCurrentPeriod.setStatus('current')
if mibBuilder.loadTexts: cOpticalPMCurrentPeriod.setDescription('This object indicates whether the optical parameter values given in this entry are collected over the current 15 minute or the current 24 hour interval.')
cOpticalPMCurrentDirection = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 264, 1, 2, 1, 1, 2), OpticalIfDirection())
if mibBuilder.loadTexts: cOpticalPMCurrentDirection.setStatus('current')
if mibBuilder.loadTexts: cOpticalPMCurrentDirection.setDescription('This object indicates the direction monitored for the optical interface, in this entry.')
cOpticalPMCurrentLocation = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 264, 1, 2, 1, 1, 3), OpticalIfMonLocation())
if mibBuilder.loadTexts: cOpticalPMCurrentLocation.setStatus('current')
if mibBuilder.loadTexts: cOpticalPMCurrentLocation.setDescription('This object indicates whether the optical characteristics are measured before or after adjustment (e.g. optical amplification or attenuation), at this interface.')
cOpticalPMCurrentParamType = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 264, 1, 2, 1, 1, 4), OpticalParameterType())
if mibBuilder.loadTexts: cOpticalPMCurrentParamType.setStatus('current')
if mibBuilder.loadTexts: cOpticalPMCurrentParamType.setDescription('This object specifies the optical parameter that is being monitored, in this entry.')
cOpticalPMCurrentMaxParam = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 264, 1, 2, 1, 1, 5), OpticalParameterValue()).setMaxAccess("readonly")
if mibBuilder.loadTexts: cOpticalPMCurrentMaxParam.setStatus('current')
if mibBuilder.loadTexts: cOpticalPMCurrentMaxParam.setDescription('This object gives the maximum value measured for the monitored optical parameter, in the current 15 minute or the current 24 hour interval.')
cOpticalPMCurrentMinParam = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 264, 1, 2, 1, 1, 6), OpticalParameterValue()).setMaxAccess("readonly")
if mibBuilder.loadTexts: cOpticalPMCurrentMinParam.setStatus('current')
if mibBuilder.loadTexts: cOpticalPMCurrentMinParam.setDescription('This object gives the minimum value measured for the monitored optical parameter, in the current 15 minute or the current 24 hour interval.')
cOpticalPMCurrentMeanParam = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 264, 1, 2, 1, 1, 7), OpticalParameterValue()).setMaxAccess("readonly")
if mibBuilder.loadTexts: cOpticalPMCurrentMeanParam.setStatus('current')
if mibBuilder.loadTexts: cOpticalPMCurrentMeanParam.setDescription('This object gives the average value of the monitored optical parameter, in the current 15 minute or the current 24 hour interval.')
cOpticalPMCurrentUnavailSecs = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 264, 1, 2, 1, 1, 8), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 86400))).setMaxAccess("readonly")
if mibBuilder.loadTexts: cOpticalPMCurrentUnavailSecs.setStatus('current')
if mibBuilder.loadTexts: cOpticalPMCurrentUnavailSecs.setDescription('This object is used to indicate the number of seconds, in the current 15 minute or the current 24 hour interval, for which the optical performance data is not accounted for. In the receive direction, the performance data could be unavailable during these periods for multiple reasons like the interface being administratively down or if there is a Loss of Light alarm on the interface. In the transmit direction, performance data could be unavailable when the laser is shutdown.')
cOpticalPMIntervalTable = MibTable((1, 3, 6, 1, 4, 1, 9, 9, 264, 1, 2, 2), )
if mibBuilder.loadTexts: cOpticalPMIntervalTable.setStatus('current')
if mibBuilder.loadTexts: cOpticalPMIntervalTable.setDescription('This table stores performance monitoring data for the various optical parameters, collected over previous intervals. This table can have entries for one complete 24 hour interval and up to 96 complete 15 minute intervals. A system is required to store at least 4 completed 15 minute intervals. The number of valid 15 minute intervals in this table is indicated by the cOpticalMon15MinValidIntervals object and the number of valid 24 hour intervals is indicated by the cOpticalMon24HrValidIntervals object.')
cOpticalPMIntervalEntry = MibTableRow((1, 3, 6, 1, 4, 1, 9, 9, 264, 1, 2, 2, 1), ).setIndexNames((0, "CISCO-OPTICAL-MONITOR-MIB", "cOpticalPMIntervalPeriod"), (0, "CISCO-OPTICAL-MONITOR-MIB", "cOpticalPMIntervalNumber"), (0, "IF-MIB", "ifIndex"), (0, "CISCO-OPTICAL-MONITOR-MIB", "cOpticalPMIntervalDirection"), (0, "CISCO-OPTICAL-MONITOR-MIB", "cOpticalPMIntervalLocation"), (0, "CISCO-OPTICAL-MONITOR-MIB", "cOpticalPMIntervalParamType"))
if mibBuilder.loadTexts: cOpticalPMIntervalEntry.setStatus('current')
if mibBuilder.loadTexts: cOpticalPMIntervalEntry.setDescription('An entry in the cOpticalPMIntervalTable. It contains performance monitoring data for an optical parameter, collected over a previous interval. Note that the set of monitored optical parameters may vary based on interface type, direction, and monitoring location. Examples of interfaces that can have an entry in this table include optical transceivers, interfaces before and after optical amplifiers, and interfaces before and after optical attenuators.')
cOpticalPMIntervalPeriod = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 264, 1, 2, 2, 1, 1), OpticalPMPeriod())
if mibBuilder.loadTexts: cOpticalPMIntervalPeriod.setStatus('current')
if mibBuilder.loadTexts: cOpticalPMIntervalPeriod.setDescription('This object indicates whether the optical parameter values, given in this entry, are collected over a period of 15 minutes or 24 hours.')
cOpticalPMIntervalNumber = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 264, 1, 2, 2, 1, 2), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 96)))
if mibBuilder.loadTexts: cOpticalPMIntervalNumber.setStatus('current')
if mibBuilder.loadTexts: cOpticalPMIntervalNumber.setDescription('A number between 1 and 96, which identifies the interval for which the set of optical parameter values is available. The interval identified by 1 is the most recently completed 15 minute or 24 hour interval, and the interval identified by N is the interval immediately preceding the one identified by N-1.')
cOpticalPMIntervalDirection = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 264, 1, 2, 2, 1, 3), OpticalIfDirection())
if mibBuilder.loadTexts: cOpticalPMIntervalDirection.setStatus('current')
if mibBuilder.loadTexts: cOpticalPMIntervalDirection.setDescription('This object indicates the direction monitored for the optical interface, in this entry.')
cOpticalPMIntervalLocation = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 264, 1, 2, 2, 1, 4), OpticalIfMonLocation())
if mibBuilder.loadTexts: cOpticalPMIntervalLocation.setStatus('current')
if mibBuilder.loadTexts: cOpticalPMIntervalLocation.setDescription('This object indicates whether the optical characteristics are measured before or after adjustment (e.g. optical amplification or attenuation), at this interface.')
cOpticalPMIntervalParamType = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 264, 1, 2, 2, 1, 5), OpticalParameterType())
if mibBuilder.loadTexts: cOpticalPMIntervalParamType.setStatus('current')
if mibBuilder.loadTexts: cOpticalPMIntervalParamType.setDescription('This object specifies the optical parameter that is being monitored, in this entry.')
cOpticalPMIntervalMaxParam = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 264, 1, 2, 2, 1, 6), OpticalParameterValue()).setMaxAccess("readonly")
if mibBuilder.loadTexts: cOpticalPMIntervalMaxParam.setStatus('current')
if mibBuilder.loadTexts: cOpticalPMIntervalMaxParam.setDescription('This object gives the maximum value measured for the optical parameter, in a particular 15 minute or 24 hour interval.')
cOpticalPMIntervalMinParam = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 264, 1, 2, 2, 1, 7), OpticalParameterValue()).setMaxAccess("readonly")
if mibBuilder.loadTexts: cOpticalPMIntervalMinParam.setStatus('current')
if mibBuilder.loadTexts: cOpticalPMIntervalMinParam.setDescription('This object gives the minimum value measured for the optical parameter, in a particular 15 minute or 24 hour interval.')
cOpticalPMIntervalMeanParam = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 264, 1, 2, 2, 1, 8), OpticalParameterValue()).setMaxAccess("readonly")
if mibBuilder.loadTexts: cOpticalPMIntervalMeanParam.setStatus('current')
if mibBuilder.loadTexts: cOpticalPMIntervalMeanParam.setDescription('This object gives the average value of the measured optical parameter, in a particular 15 minute or 24 hour interval.')
cOpticalPMIntervalUnavailSecs = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 264, 1, 2, 2, 1, 9), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 86400))).setMaxAccess("readonly")
if mibBuilder.loadTexts: cOpticalPMIntervalUnavailSecs.setStatus('current')
if mibBuilder.loadTexts: cOpticalPMIntervalUnavailSecs.setDescription('This object is used to indicate the number of seconds, in the particular 15 minute or 24 hour interval, for which the optical performance data is not accounted for. In the receive direction, the performance data could be unavailable during these periods for multiple reasons like the interface being administratively down or if there is a Loss of Light alarm on the interface. In the transmit direction, performance data could be unavailable when the laser is shutdown.')
cOpticalMonitorMIBNotifications = MibIdentifier((1, 3, 6, 1, 4, 1, 9, 9, 264, 2))
cOpticalMonNotificationPrefix = MibIdentifier((1, 3, 6, 1, 4, 1, 9, 9, 264, 2, 0))
cOpticalMonParameterStatus = NotificationType((1, 3, 6, 1, 4, 1, 9, 9, 264, 2, 0, 1)).setObjects(("CISCO-OPTICAL-MONITOR-MIB", "cOpticalParameterValue"), ("CISCO-OPTICAL-MONITOR-MIB", "cOpticalParamAlarmStatus"), ("CISCO-OPTICAL-MONITOR-MIB", "cOpticalParamAlarmCurMaxThresh"), ("CISCO-OPTICAL-MONITOR-MIB", "cOpticalParamAlarmCurMaxSev"), ("CISCO-OPTICAL-MONITOR-MIB", "cOpticalParamAlarmLastChange"))
if mibBuilder.loadTexts: cOpticalMonParameterStatus.setStatus('current')
if mibBuilder.loadTexts: cOpticalMonParameterStatus.setDescription("This notification is sent when any threshold related to an optical parameter is exceeded or cleared on an interface. This notification may be suppressed under the following conditions: - depending on the value of the cOpticalNotifyEnable object, or - if the severity of the threshold as specified by the cOpticalParamHighWarningSev or cOpticalParamLowWarningSev object is 'notReported'. ")
cOpticalMonitorMIBConformance = MibIdentifier((1, 3, 6, 1, 4, 1, 9, 9, 264, 3))
cOpticalMonitorMIBCompliances = MibIdentifier((1, 3, 6, 1, 4, 1, 9, 9, 264, 3, 1))
cOpticalMonitorMIBGroups = MibIdentifier((1, 3, 6, 1, 4, 1, 9, 9, 264, 3, 2))
cOpticalMonitorMIBCompliance = ModuleCompliance((1, 3, 6, 1, 4, 1, 9, 9, 264, 3, 1, 1)).setObjects(("CISCO-OPTICAL-MONITOR-MIB", "cOpticalMIBMonGroup"), ("CISCO-OPTICAL-MONITOR-MIB", "cOpticalMIBThresholdGroup"), ("CISCO-OPTICAL-MONITOR-MIB", "cOpticalMIBSeverityGroup"), ("CISCO-OPTICAL-MONITOR-MIB", "cOpticalMIBPMGroup"), ("CISCO-OPTICAL-MONITOR-MIB", "cOpticalMIBNotifyEnableGroup"), ("CISCO-OPTICAL-MONITOR-MIB", "cOpticalMIBNotifGroup"))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
cOpticalMonitorMIBCompliance = cOpticalMonitorMIBCompliance.setStatus('deprecated')
if mibBuilder.loadTexts: cOpticalMonitorMIBCompliance.setDescription('The compliance statement for network elements that monitor optical characteristics and set thresholds on the optical interfaces in a network element.')
cOpticalMonitorMIBComplianceRev = ModuleCompliance((1, 3, 6, 1, 4, 1, 9, 9, 264, 3, 1, 2)).setObjects(("CISCO-OPTICAL-MONITOR-MIB", "cOpticalMIBMonGroup"), ("CISCO-OPTICAL-MONITOR-MIB", "cOpticalMIBThresholdGroup"), ("CISCO-OPTICAL-MONITOR-MIB", "cOpticalMIBSeverityGroup"), ("CISCO-OPTICAL-MONITOR-MIB", "cOpticalMIBPMGroup"), ("CISCO-OPTICAL-MONITOR-MIB", "cOpticalMonIfTimeGroup"), ("CISCO-OPTICAL-MONITOR-MIB", "cOpticalMIBNotifyEnableGroup"), ("CISCO-OPTICAL-MONITOR-MIB", "cOpticalMIBNotifGroup"), ("CISCO-OPTICAL-MONITOR-MIB", "cOpticalMIBEnableConfigGroup"), ("CISCO-OPTICAL-MONITOR-MIB", "cOpticalMIBIntervalConfigGroup"), ("CISCO-OPTICAL-MONITOR-MIB", "cOpticalMonThreshSourceGroup"))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
cOpticalMonitorMIBComplianceRev = cOpticalMonitorMIBComplianceRev.setStatus('current')
if mibBuilder.loadTexts: cOpticalMonitorMIBComplianceRev.setDescription('The compliance statement for network elements that monitor optical characteristics and set thresholds on the optical interfaces in a network element.')
cOpticalMIBMonGroup = ObjectGroup((1, 3, 6, 1, 4, 1, 9, 9, 264, 3, 2, 1)).setObjects(("CISCO-OPTICAL-MONITOR-MIB", "cOpticalParameterValue"))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
cOpticalMIBMonGroup = cOpticalMIBMonGroup.setStatus('current')
if mibBuilder.loadTexts: cOpticalMIBMonGroup.setDescription('A mandatory object that provides monitoring of optical characteristics.')
cOpticalMIBThresholdGroup = ObjectGroup((1, 3, 6, 1, 4, 1, 9, 9, 264, 3, 2, 2)).setObjects(("CISCO-OPTICAL-MONITOR-MIB", "cOpticalParamHighAlarmThresh"), ("CISCO-OPTICAL-MONITOR-MIB", "cOpticalParamHighWarningThresh"), ("CISCO-OPTICAL-MONITOR-MIB", "cOpticalParamLowAlarmThresh"), ("CISCO-OPTICAL-MONITOR-MIB", "cOpticalParamLowWarningThresh"), ("CISCO-OPTICAL-MONITOR-MIB", "cOpticalParamAlarmStatus"), ("CISCO-OPTICAL-MONITOR-MIB", "cOpticalParamAlarmCurMaxThresh"), ("CISCO-OPTICAL-MONITOR-MIB", "cOpticalParamAlarmLastChange"))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
cOpticalMIBThresholdGroup = cOpticalMIBThresholdGroup.setStatus('current')
if mibBuilder.loadTexts: cOpticalMIBThresholdGroup.setDescription('A collection of objects that support thresholds on optical parameters and provide status information when the thresholds are exceeded or cleared.')
cOpticalMIBSeverityGroup = ObjectGroup((1, 3, 6, 1, 4, 1, 9, 9, 264, 3, 2, 3)).setObjects(("CISCO-OPTICAL-MONITOR-MIB", "cOpticalParamHighAlarmSev"), ("CISCO-OPTICAL-MONITOR-MIB", "cOpticalParamHighWarningSev"), ("CISCO-OPTICAL-MONITOR-MIB", "cOpticalParamLowAlarmSev"), ("CISCO-OPTICAL-MONITOR-MIB", "cOpticalParamLowWarningSev"), ("CISCO-OPTICAL-MONITOR-MIB", "cOpticalParamAlarmCurMaxSev"))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
cOpticalMIBSeverityGroup = cOpticalMIBSeverityGroup.setStatus('current')
if mibBuilder.loadTexts: cOpticalMIBSeverityGroup.setDescription('A collection of objects that support severities for thresholds on optical parameters.')
cOpticalMIBPMGroup = ObjectGroup((1, 3, 6, 1, 4, 1, 9, 9, 264, 3, 2, 4)).setObjects(("CISCO-OPTICAL-MONITOR-MIB", "cOpticalMon15MinValidIntervals"), ("CISCO-OPTICAL-MONITOR-MIB", "cOpticalMon24HrValidIntervals"), ("CISCO-OPTICAL-MONITOR-MIB", "cOpticalPMCurrentMaxParam"), ("CISCO-OPTICAL-MONITOR-MIB", "cOpticalPMCurrentMinParam"), ("CISCO-OPTICAL-MONITOR-MIB", "cOpticalPMCurrentMeanParam"), ("CISCO-OPTICAL-MONITOR-MIB", "cOpticalPMCurrentUnavailSecs"), ("CISCO-OPTICAL-MONITOR-MIB", "cOpticalPMIntervalMaxParam"), ("CISCO-OPTICAL-MONITOR-MIB", "cOpticalPMIntervalMinParam"), ("CISCO-OPTICAL-MONITOR-MIB", "cOpticalPMIntervalMeanParam"), ("CISCO-OPTICAL-MONITOR-MIB", "cOpticalPMIntervalUnavailSecs"))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
cOpticalMIBPMGroup = cOpticalMIBPMGroup.setStatus('current')
if mibBuilder.loadTexts: cOpticalMIBPMGroup.setDescription('A collection of objects that provide optical performance monitoring data for 15 minute and 24 hour intervals.')
cOpticalMIBNotifyEnableGroup = ObjectGroup((1, 3, 6, 1, 4, 1, 9, 9, 264, 3, 2, 5)).setObjects(("CISCO-OPTICAL-MONITOR-MIB", "cOpticalNotifyEnable"))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
cOpticalMIBNotifyEnableGroup = cOpticalMIBNotifyEnableGroup.setStatus('current')
if mibBuilder.loadTexts: cOpticalMIBNotifyEnableGroup.setDescription('An object to control the generation of notifications.')
cOpticalMIBNotifGroup = NotificationGroup((1, 3, 6, 1, 4, 1, 9, 9, 264, 3, 2, 6)).setObjects(("CISCO-OPTICAL-MONITOR-MIB", "cOpticalMonParameterStatus"))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
cOpticalMIBNotifGroup = cOpticalMIBNotifGroup.setStatus('current')
if mibBuilder.loadTexts: cOpticalMIBNotifGroup.setDescription('A notification generated when a threshold on an optical parameter is exceeded or cleared.')
cOpticalMonIfTimeGroup = ObjectGroup((1, 3, 6, 1, 4, 1, 9, 9, 264, 3, 2, 7)).setObjects(("CISCO-OPTICAL-MONITOR-MIB", "cOpticalMonIfTimeInSlot"))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
cOpticalMonIfTimeGroup = cOpticalMonIfTimeGroup.setStatus('current')
if mibBuilder.loadTexts: cOpticalMonIfTimeGroup.setDescription('A collection of object(s) that provide time related information for transceivers in the system.')
cOpticalMIBEnableConfigGroup = ObjectGroup((1, 3, 6, 1, 4, 1, 9, 9, 264, 3, 2, 8)).setObjects(("CISCO-OPTICAL-MONITOR-MIB", "cOpticalMonEnable"))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
cOpticalMIBEnableConfigGroup = cOpticalMIBEnableConfigGroup.setStatus('current')
if mibBuilder.loadTexts: cOpticalMIBEnableConfigGroup.setDescription('A collection of object(s) to enable/disable optical monitoring.')
cOpticalMIBIntervalConfigGroup = ObjectGroup((1, 3, 6, 1, 4, 1, 9, 9, 264, 3, 2, 9)).setObjects(("CISCO-OPTICAL-MONITOR-MIB", "cOpticalMonPollInterval"))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
cOpticalMIBIntervalConfigGroup = cOpticalMIBIntervalConfigGroup.setStatus('current')
if mibBuilder.loadTexts: cOpticalMIBIntervalConfigGroup.setDescription('A collection of object(s) to specify polling interval for monitoring optical transceivers.')
cOpticalMonThreshSourceGroup = ObjectGroup((1, 3, 6, 1, 4, 1, 9, 9, 264, 3, 2, 10)).setObjects(("CISCO-OPTICAL-MONITOR-MIB", "cOpticalParamThreshSource"))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
cOpticalMonThreshSourceGroup = cOpticalMonThreshSourceGroup.setStatus('current')
if mibBuilder.loadTexts: cOpticalMonThreshSourceGroup.setDescription('A collection of object(s) to restore a given threshold to its default value.')
mibBuilder.exportSymbols("CISCO-OPTICAL-MONITOR-MIB", OpticalParameterValue=OpticalParameterValue, cOpticalMonitorMIBComplianceRev=cOpticalMonitorMIBComplianceRev, cOpticalPMCurrentParamType=cOpticalPMCurrentParamType, cOpticalPMIntervalLocation=cOpticalPMIntervalLocation, cOpticalPMCurrentTable=cOpticalPMCurrentTable, OpticalAlarmSeverityOrZero=OpticalAlarmSeverityOrZero, cOpticalPMIntervalUnavailSecs=cOpticalPMIntervalUnavailSecs, cOpticalMonGroup=cOpticalMonGroup, cOpticalParamThreshSource=cOpticalParamThreshSource, cOpticalMonThreshSourceGroup=cOpticalMonThreshSourceGroup, cOpticalPMCurrentMaxParam=cOpticalPMCurrentMaxParam, cOpticalMIBMonGroup=cOpticalMIBMonGroup, cOpticalMon15MinValidIntervals=cOpticalMon15MinValidIntervals, cOpticalParamLowAlarmThresh=cOpticalParamLowAlarmThresh, OpticalIfDirection=OpticalIfDirection, cOpticalMonIfEntry=cOpticalMonIfEntry, cOpticalPMCurrentLocation=cOpticalPMCurrentLocation, cOpticalPMGroup=cOpticalPMGroup, cOpticalParamAlarmStatus=cOpticalParamAlarmStatus, cOpticalPMIntervalParamType=cOpticalPMIntervalParamType, cOpticalMIBEnableConfigGroup=cOpticalMIBEnableConfigGroup, cOpticalMonParameterType=cOpticalMonParameterType, OpticalIfMonLocation=OpticalIfMonLocation, ciscoOpticalMonitorMIB=ciscoOpticalMonitorMIB, cOpticalMIBThresholdGroup=cOpticalMIBThresholdGroup, cOpticalPMCurrentDirection=cOpticalPMCurrentDirection, cOpticalPMCurrentMinParam=cOpticalPMCurrentMinParam, cOpticalMIBNotifGroup=cOpticalMIBNotifGroup, OpticalPMPeriod=OpticalPMPeriod, cOpticalParamHighAlarmThresh=cOpticalParamHighAlarmThresh, cOpticalMonitorMIBObjects=cOpticalMonitorMIBObjects, cOpticalPMIntervalEntry=cOpticalPMIntervalEntry, cOpticalParamLowWarningSev=cOpticalParamLowWarningSev, cOpticalPMCurrentUnavailSecs=cOpticalPMCurrentUnavailSecs, cOpticalMonIfTimeInSlot=cOpticalMonIfTimeInSlot, OpticalParameterType=OpticalParameterType, cOpticalNotifyEnable=cOpticalNotifyEnable, cOpticalParamHighAlarmSev=cOpticalParamHighAlarmSev, cOpticalPMIntervalTable=cOpticalPMIntervalTable, cOpticalMonIfTable=cOpticalMonIfTable, cOpticalPMIntervalMaxParam=cOpticalPMIntervalMaxParam, cOpticalMonitorMIBNotifications=cOpticalMonitorMIBNotifications, cOpticalMonPollInterval=cOpticalMonPollInterval, cOpticalParamAlarmCurMaxThresh=cOpticalParamAlarmCurMaxThresh, cOpticalParamAlarmLastChange=cOpticalParamAlarmLastChange, cOpticalMIBSeverityGroup=cOpticalMIBSeverityGroup, cOpticalMIBIntervalConfigGroup=cOpticalMIBIntervalConfigGroup, cOpticalPMCurrentPeriod=cOpticalPMCurrentPeriod, cOpticalMon24HrValidIntervals=cOpticalMon24HrValidIntervals, cOpticalMonDirection=cOpticalMonDirection, cOpticalPMIntervalPeriod=cOpticalPMIntervalPeriod, cOpticalParamHighWarningSev=cOpticalParamHighWarningSev, cOpticalMonitorMIBCompliance=cOpticalMonitorMIBCompliance, cOpticalMonitorMIBCompliances=cOpticalMonitorMIBCompliances, OpticalAlarmSeverity=OpticalAlarmSeverity, OpticalAlarmStatus=OpticalAlarmStatus, PYSNMP_MODULE_ID=ciscoOpticalMonitorMIB, cOpticalPMIntervalMinParam=cOpticalPMIntervalMinParam, cOpticalMonEntry=cOpticalMonEntry, cOpticalMonNotificationPrefix=cOpticalMonNotificationPrefix, cOpticalParamLowWarningThresh=cOpticalParamLowWarningThresh, cOpticalParamLowAlarmSev=cOpticalParamLowAlarmSev, cOpticalPMCurrentEntry=cOpticalPMCurrentEntry, cOpticalMIBNotifyEnableGroup=cOpticalMIBNotifyEnableGroup, cOpticalMIBPMGroup=cOpticalMIBPMGroup, cOpticalParamAlarmCurMaxSev=cOpticalParamAlarmCurMaxSev, cOpticalMonIfTimeGroup=cOpticalMonIfTimeGroup, cOpticalParameterValue=cOpticalParameterValue, cOpticalMonitorMIBConformance=cOpticalMonitorMIBConformance, cOpticalPMIntervalDirection=cOpticalPMIntervalDirection, cOpticalParamHighWarningThresh=cOpticalParamHighWarningThresh, cOpticalPMIntervalMeanParam=cOpticalPMIntervalMeanParam, cOpticalPMIntervalNumber=cOpticalPMIntervalNumber, cOpticalMonParameterStatus=cOpticalMonParameterStatus, cOpticalMonTable=cOpticalMonTable, cOpticalMonLocation=cOpticalMonLocation, cOpticalMonEnable=cOpticalMonEnable, cOpticalMonitorMIBGroups=cOpticalMonitorMIBGroups, cOpticalPMCurrentMeanParam=cOpticalPMCurrentMeanParam)
| (integer, object_identifier, octet_string) = mibBuilder.importSymbols('ASN1', 'Integer', 'ObjectIdentifier', 'OctetString')
(named_values,) = mibBuilder.importSymbols('ASN1-ENUMERATION', 'NamedValues')
(single_value_constraint, value_size_constraint, constraints_union, value_range_constraint, constraints_intersection) = mibBuilder.importSymbols('ASN1-REFINEMENT', 'SingleValueConstraint', 'ValueSizeConstraint', 'ConstraintsUnion', 'ValueRangeConstraint', 'ConstraintsIntersection')
(cisco_mgmt,) = mibBuilder.importSymbols('CISCO-SMI', 'ciscoMgmt')
(if_index,) = mibBuilder.importSymbols('IF-MIB', 'ifIndex')
(object_group, notification_group, module_compliance) = mibBuilder.importSymbols('SNMPv2-CONF', 'ObjectGroup', 'NotificationGroup', 'ModuleCompliance')
(unsigned32, bits, object_identity, mib_identifier, module_identity, time_ticks, counter32, notification_type, mib_scalar, mib_table, mib_table_row, mib_table_column, ip_address, iso, gauge32, integer32, counter64) = mibBuilder.importSymbols('SNMPv2-SMI', 'Unsigned32', 'Bits', 'ObjectIdentity', 'MibIdentifier', 'ModuleIdentity', 'TimeTicks', 'Counter32', 'NotificationType', 'MibScalar', 'MibTable', 'MibTableRow', 'MibTableColumn', 'IpAddress', 'iso', 'Gauge32', 'Integer32', 'Counter64')
(textual_convention, time_stamp, display_string) = mibBuilder.importSymbols('SNMPv2-TC', 'TextualConvention', 'TimeStamp', 'DisplayString')
cisco_optical_monitor_mib = module_identity((1, 3, 6, 1, 4, 1, 9, 9, 264))
ciscoOpticalMonitorMIB.setRevisions(('2007-01-02 00:00', '2002-05-10 00:00'))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
if mibBuilder.loadTexts:
ciscoOpticalMonitorMIB.setRevisionsDescriptions(('Add cOpticalMonIfTimeGroup, cOpticalMIBEnableConfigGroup, cOpticalMIBIntervalConfigGroup, cOpticalMonThreshSourceGroup.', 'The initial revision of this MIB.'))
if mibBuilder.loadTexts:
ciscoOpticalMonitorMIB.setLastUpdated('200701020000Z')
if mibBuilder.loadTexts:
ciscoOpticalMonitorMIB.setOrganization('Cisco Systems, Inc.')
if mibBuilder.loadTexts:
ciscoOpticalMonitorMIB.setContactInfo('Cisco Systems Customer Service Postal: 170 W Tasman Drive San Jose, CA 95134 Tel: +1 800 553-NETS E-mail: [email protected]')
if mibBuilder.loadTexts:
ciscoOpticalMonitorMIB.setDescription('This MIB module defines objects to monitor optical characteristics and set corresponding thresholds on the optical interfaces in a network element. ')
class Opticalparametertype(TextualConvention, Integer32):
description = 'This value indicates the optical parameter that is being monitored. Valid values are - power (1) : Optical Power (AC + DC) in 1/10ths of dBm acPower (2) : Optical AC Power in 1/10ths of dBm ambientTemp (3) : Ambient Temperature in 1/10ths of degrees centigrade laserTemp (4) : Laser Temperature in 1/10ths of degrees centigrade biasCurrent (5) : Laser bias current in 100s of microamperes peltierCurrent (6) : Laser peltier current in milliamperes xcvrVoltage (7) : Transceiver voltage in millivolts '
status = 'current'
subtype_spec = Integer32.subtypeSpec + constraints_union(single_value_constraint(1, 2, 3, 4, 5, 6, 7))
named_values = named_values(('power', 1), ('acPower', 2), ('ambientTemp', 3), ('laserTemp', 4), ('biasCurrent', 5), ('peltierCurrent', 6), ('xcvrVoltage', 7))
class Opticalparametervalue(TextualConvention, Integer32):
description = "The value of the optical parameter that is being monitored. The range of values varies depending on the type of optical parameter being monitored, as identified by a corresponding object with syntax OpticalParameterType. When the optical parameter being monitored is 'power' or 'acPower', the supported range is from -400 to 250, in 1/10ths of dBm. Example: A value of -300 represents a power level of -30.0 dBm. When the optical parameter being monitored is 'laserTemp' or 'ambientTemp', the supported range is from -500 to 850, in 1/10ths of degrees centigrade. Example: A value of 235 represents a temperature reading of 23.5 degrees C. When the optical parameter being monitored is 'biasCurrent', the supported range is from 0 to 10000, in 100s of microamperes. Example: A value of 500 represents a bias current reading of 50,000 microamperes. When the optical parameter being monitored is 'peltierCurrent', the supported range is from -10000 to 10000, in milliamperes. When the optical parameter being monitored is 'xcvrVoltage', the supported range is from 0 to 10000, in millivolts. The distinguished value of '-1000000' indicates that the object has not yet been initialized or does not apply. "
status = 'current'
subtype_spec = Integer32.subtypeSpec + value_range_constraint(-1000000, 1000000)
class Opticalifdirection(TextualConvention, Integer32):
description = 'This value indicates the direction being monitored at the optical interface. '
status = 'current'
subtype_spec = Integer32.subtypeSpec + constraints_union(single_value_constraint(1, 2, 3))
named_values = named_values(('receive', 1), ('transmit', 2), ('notApplicable', 3))
class Opticalifmonlocation(TextualConvention, Integer32):
description = "This value applies when there are multiple points at which optical characteristics can be measured, in the given direction, at an interface. It indicates whether the optical characteristics are measured before or after adjustment (e.g. optical amplification or attenuation). The codepoint 'notApplicable' should be used if no amplifier/attenuator exists at an interface. "
status = 'current'
subtype_spec = Integer32.subtypeSpec + constraints_union(single_value_constraint(1, 2, 3))
named_values = named_values(('beforeAdjustment', 1), ('afterAdjustment', 2), ('notApplicable', 3))
class Opticalalarmstatus(TextualConvention, OctetString):
reference = 'Telcordia Technologies Generic Requirements GR-2918-CORE, Issue 4, December 1999, Section 8.11'
description = 'A bitmap that indicates the current status of thresholds on an interface. The bit is set to 1 if the threshold is currently being exceeded on the interface and will be set to 0 otherwise. (MSB) (LSB) 7 6 5 4 3 2 1 0 +----------------------+ | | +----------------------+ | | | | | | | +-- High alarm threshold | | +----- High warning threshold | +-------- Low alarm threshold +----------- Low warning threshold To minimize the probability of prematurely reacting to momentary signal variations, a soak time may be incorporated into the status indications in the following manner. The indication is set when the threshold violation persists for a period of time that exceeds the set soak interval. The indication is cleared when no threshold violation occurs for a period of time which exceeds the clear soak interval. In GR-2918-CORE, the recommended set soak interval is 2.5 seconds (plus/minus 0.5 seconds), and the recommended clear soak interval is 10 seconds (plus/minus 0.5 seconds). '
status = 'current'
subtype_spec = OctetString.subtypeSpec + value_size_constraint(1, 1)
fixed_length = 1
class Opticalalarmseverity(TextualConvention, Integer32):
reference = 'Telcordia Technologies Generic Requirements GR-474-CORE, Issue 1, December 1997, Section 2.2'
description = "The severity of a trouble condition. A smaller enumerated integer value indicates that the condition is more severe. The severities are defined as follows: 'critical' An alarm used to indicate a severe, service-affecting condition has occurred and that immediate corrective action is imperative, regardless of the time of day or day of the week. 'major' An alarm used for hardware or software conditions that indicate a serious disruption of service or malfunctioning or failure of important hardware. These troubles require the immediate attention and response of a technician to restore or maintain system capability. The urgency is less than in critical situations because of a lesser immediate or impending effect on service or system performance. 'minor' An alarm used for troubles that do not have a serious effect on service to customers or for troubles in hardware that are not essential to the operation of the system. 'notAlarmed' An event used for troubles that do not require action, for troubles that are reported as a result of manually initiated diagnostics, or for transient events such as crossing warning thresholds. This event can also be used to raise attention to a condition that could possibly be an impending problem. 'notReported' An event used for troubles similar to those described under 'notAlarmed', and that do not cause notifications to be generated. The information for these events is retrievable from the network element. 'cleared' This value indicates that a previously occuring alarm condition has been cleared, or that no trouble condition is present. "
status = 'current'
subtype_spec = Integer32.subtypeSpec + constraints_union(single_value_constraint(1, 2, 3, 4, 5, 6))
named_values = named_values(('critical', 1), ('major', 2), ('minor', 3), ('notAlarmed', 4), ('notReported', 5), ('cleared', 6))
class Opticalalarmseverityorzero(TextualConvention, Integer32):
description = "A value of either '0' or a valid optical alarm severity."
status = 'current'
subtype_spec = Integer32.subtypeSpec + value_range_constraint(0, 6)
class Opticalpmperiod(TextualConvention, Integer32):
description = 'This value indicates the time period over which performance monitoring data has been collected.'
status = 'current'
subtype_spec = Integer32.subtypeSpec + constraints_union(single_value_constraint(1, 2))
named_values = named_values(('fifteenMin', 1), ('twentyFourHour', 2))
c_optical_monitor_mib_objects = mib_identifier((1, 3, 6, 1, 4, 1, 9, 9, 264, 1))
c_optical_mon_group = mib_identifier((1, 3, 6, 1, 4, 1, 9, 9, 264, 1, 1))
c_optical_pm_group = mib_identifier((1, 3, 6, 1, 4, 1, 9, 9, 264, 1, 2))
c_optical_mon_table = mib_table((1, 3, 6, 1, 4, 1, 9, 9, 264, 1, 1, 1))
if mibBuilder.loadTexts:
cOpticalMonTable.setStatus('current')
if mibBuilder.loadTexts:
cOpticalMonTable.setDescription('This table provides objects to monitor optical parameters in a network element. It also provides objects for setting high and low threshold levels, with configurable severities, on these monitored parameters.')
c_optical_mon_entry = mib_table_row((1, 3, 6, 1, 4, 1, 9, 9, 264, 1, 1, 1, 1)).setIndexNames((0, 'IF-MIB', 'ifIndex'), (0, 'CISCO-OPTICAL-MONITOR-MIB', 'cOpticalMonDirection'), (0, 'CISCO-OPTICAL-MONITOR-MIB', 'cOpticalMonLocation'), (0, 'CISCO-OPTICAL-MONITOR-MIB', 'cOpticalMonParameterType'))
if mibBuilder.loadTexts:
cOpticalMonEntry.setStatus('current')
if mibBuilder.loadTexts:
cOpticalMonEntry.setDescription('An entry in the cOpticalMonTable provides objects to monitor an optical parameter and set threshold levels on that parameter, at an optical interface. Note that the set of monitored optical parameters may vary based on interface type, direction, and monitoring location. Examples of interfaces that can have an entry in this table include optical transceivers, interfaces before and after optical amplifiers, and interfaces before and after optical attenuators.')
c_optical_mon_direction = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 264, 1, 1, 1, 1, 1), optical_if_direction())
if mibBuilder.loadTexts:
cOpticalMonDirection.setStatus('current')
if mibBuilder.loadTexts:
cOpticalMonDirection.setDescription('This object indicates the direction monitored for the optical interface, in this entry.')
c_optical_mon_location = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 264, 1, 1, 1, 1, 2), optical_if_mon_location())
if mibBuilder.loadTexts:
cOpticalMonLocation.setStatus('current')
if mibBuilder.loadTexts:
cOpticalMonLocation.setDescription('This object indicates whether the optical characteristics are measured before or after adjustment (e.g. optical amplification or attenuation), at this interface.')
c_optical_mon_parameter_type = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 264, 1, 1, 1, 1, 3), optical_parameter_type())
if mibBuilder.loadTexts:
cOpticalMonParameterType.setStatus('current')
if mibBuilder.loadTexts:
cOpticalMonParameterType.setDescription('This object specifies the optical parameter that is being monitored in this entry.')
c_optical_parameter_value = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 264, 1, 1, 1, 1, 4), optical_parameter_value()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
cOpticalParameterValue.setStatus('current')
if mibBuilder.loadTexts:
cOpticalParameterValue.setDescription('This object gives the value measured for the particular optical parameter specified by the cOpticalMonParameterType object.')
c_optical_param_high_alarm_thresh = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 264, 1, 1, 1, 1, 5), optical_parameter_value()).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
cOpticalParamHighAlarmThresh.setStatus('current')
if mibBuilder.loadTexts:
cOpticalParamHighAlarmThresh.setDescription("This object is used to set a high alarm threshold on the optical parameter being monitored. An alarm condition will be raised if the value given by cOpticalParameterValue goes from below the value configured in this object to above the value configured in this object, or if the initial value of cOpticalParameterValue exceeds the value configured in this object. For network elements that incorporate a soak time in the status indications, this alarm will be indicated in the cOpticalParamAlarmStatus object only after it persists for a period of time that equals the set soak interval. The severity level of the alarm is specified by the cOpticalParamHighAlarmSev object. When the cOpticalMonParameterType object is set to 'power' for the receive direction at a transceiver, this object specifies the receiver saturation level.")
c_optical_param_high_alarm_sev = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 264, 1, 1, 1, 1, 6), optical_alarm_severity()).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
cOpticalParamHighAlarmSev.setStatus('current')
if mibBuilder.loadTexts:
cOpticalParamHighAlarmSev.setDescription("This object is used to specify a severity level associated with the high alarm threshold given by the cOpticalParamHighAlarmThresh object. The values 'notAlarmed', 'notReported', and 'cleared' do not apply. The severity level configured in this object must be higher than the level configured in the cOpticalParamHighWarningSev object.")
c_optical_param_high_warning_thresh = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 264, 1, 1, 1, 1, 7), optical_parameter_value()).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
cOpticalParamHighWarningThresh.setStatus('current')
if mibBuilder.loadTexts:
cOpticalParamHighWarningThresh.setDescription('This object is used to set a high warning threshold on the optical parameter being monitored. A threshold crossing condition will be indicated if the value given by cOpticalParameterValue goes from below the value configured in this object to above the value configured in this object, or if the initial value of cOpticalParameterValue exceeds the value configured in this object. For network elements that incorporate a soak time in the status indications, this threshold violation will be indicated in the cOpticalParamAlarmStatus object only after it persists for a period of time that equals the set soak interval. This threshold crossing may or may not be alarmed or reported, based on the severity level specified by the cOpticalParamHighWarningSev object.')
c_optical_param_high_warning_sev = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 264, 1, 1, 1, 1, 8), optical_alarm_severity()).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
cOpticalParamHighWarningSev.setStatus('current')
if mibBuilder.loadTexts:
cOpticalParamHighWarningSev.setDescription("This object is used to specify a severity level associated with the high warning threshold given by the cOpticalParamHighWarningThresh object. The values 'critical', 'major', and 'cleared' do not apply. The severity level configured in this object must be lower than the level configured in the cOpticalParamHighAlarmSev object. If this object is set to 'notReported', no notifications will be generated when this threshold is exceeded, irrespective of the value configured in the cOpticalNotifyEnable object.")
c_optical_param_low_alarm_thresh = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 264, 1, 1, 1, 1, 9), optical_parameter_value()).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
cOpticalParamLowAlarmThresh.setStatus('current')
if mibBuilder.loadTexts:
cOpticalParamLowAlarmThresh.setDescription("This object is used to set a low alarm threshold on the optical parameter being monitored. An alarm condition will be raised if the value given by cOpticalParameterValue goes from above the value configured in this object to below the value configured in this object, or if the initial value of cOpticalParameterValue is lower than the value configured in this object. For network elements that incorporate a soak time in the status indications, this alarm will be indicated in the cOpticalParamAlarmStatus object only after it persists for a period of time that equals the set soak interval. The severity level of this alarm is specified by the cOpticalParamLowAlarmSev object. When the cOpticalMonParameterType object is set to 'power' for the receive direction and when the interface supports alarms based on loss of light, this object specifies the optical power threshold for declaring loss of light. Also, when optical amplifiers are present in the network, in the receive direction, this value may need to be configured, since the noise floor may be higher than the minimum sensitivity of the receiver.")
c_optical_param_low_alarm_sev = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 264, 1, 1, 1, 1, 10), optical_alarm_severity()).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
cOpticalParamLowAlarmSev.setStatus('current')
if mibBuilder.loadTexts:
cOpticalParamLowAlarmSev.setDescription("This object is used to specify a severity level associated with the low alarm threshold given by the cOpticalParamLowAlarmThresh object. The values 'notAlarmed', 'notReported', and 'cleared' do not apply. The severity level configured in this object must be higher than the level configured in the cOpticalParamLowWarningSev object.")
c_optical_param_low_warning_thresh = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 264, 1, 1, 1, 1, 11), optical_parameter_value()).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
cOpticalParamLowWarningThresh.setStatus('current')
if mibBuilder.loadTexts:
cOpticalParamLowWarningThresh.setDescription('This object is used to set a low warning threshold on the optical parameter being monitored. A threshold crossing condition will be indicated if the value given by cOpticalParameterValue goes from above the value configured in this object to below the value configured in this object, or if the initial value of cOpticalParameterValue object is lower than the value configured in this object. For network elements that incorporate a soak time in the status indications, this threshold violation will be indicated in the cOpticalParamAlarmStatus object only after it persists for a period of time that equals the set soak interval. This threshold crossing may or may not be alarmed or reported, based on the severity level specified by the cOpticalParamLowWarningSev object.')
c_optical_param_low_warning_sev = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 264, 1, 1, 1, 1, 12), optical_alarm_severity()).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
cOpticalParamLowWarningSev.setStatus('current')
if mibBuilder.loadTexts:
cOpticalParamLowWarningSev.setDescription("This object is used to specify a severity level associated with the low warning threshold given by the cOpticalParamLowWarningThresh object. The values 'critical', 'major', and 'cleared' do not apply. The severity level configured in this object must be lower than the level configured in the cOpticalParamLowAlarmSev object. If this object is set to 'notReported', no notifications will be generated when this threshold is exceeded, irrespective of the value configured in the cOpticalNotifyEnable object.")
c_optical_param_alarm_status = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 264, 1, 1, 1, 1, 13), optical_alarm_status()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
cOpticalParamAlarmStatus.setStatus('current')
if mibBuilder.loadTexts:
cOpticalParamAlarmStatus.setDescription('This object is used to indicate the current status of the thresholds for the monitored optical parameter on the interface. If a threshold is currently being exceeded on the interface, the corresponding bit in this object will be set to 1. Otherwise, the bit will be set to 0.')
c_optical_param_alarm_cur_max_thresh = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 264, 1, 1, 1, 1, 14), optical_parameter_value()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
cOpticalParamAlarmCurMaxThresh.setStatus('current')
if mibBuilder.loadTexts:
cOpticalParamAlarmCurMaxThresh.setDescription("This object indicates the threshold value of the highest severity threshold that is currently being exceeded on the interface, for the optical parameter. If no threshold value is currently being exceeded, then the value '-1000000' is returned.")
c_optical_param_alarm_cur_max_sev = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 264, 1, 1, 1, 1, 15), optical_alarm_severity()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
cOpticalParamAlarmCurMaxSev.setStatus('current')
if mibBuilder.loadTexts:
cOpticalParamAlarmCurMaxSev.setDescription('This object indicates the maximum severity of any thresholds that are currently being exceeded on the interface, for the optical parameter.')
c_optical_param_alarm_last_change = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 264, 1, 1, 1, 1, 16), time_stamp()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
cOpticalParamAlarmLastChange.setStatus('current')
if mibBuilder.loadTexts:
cOpticalParamAlarmLastChange.setDescription('This object specifies the value of sysUpTime at the last time a threshold related to a particular optical parameter was exceeded or cleared on the interface.')
c_optical_mon15_min_valid_intervals = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 264, 1, 1, 1, 1, 17), unsigned32().subtype(subtypeSpec=value_range_constraint(0, 96))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
cOpticalMon15MinValidIntervals.setStatus('current')
if mibBuilder.loadTexts:
cOpticalMon15MinValidIntervals.setDescription('This object gives the number of previous 15 minute intervals for which valid performance monitoring data has been stored on the interface. The value of this object will be n (where n is the maximum number of 15 minute intervals supported at this interface), unless the measurement was (re-)started within the last (nx15) minutes, in which case the value will be the number of previous 15 minute intervals for which the agent has some data.')
c_optical_mon24_hr_valid_intervals = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 264, 1, 1, 1, 1, 18), unsigned32().subtype(subtypeSpec=value_range_constraint(0, 1))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
cOpticalMon24HrValidIntervals.setStatus('current')
if mibBuilder.loadTexts:
cOpticalMon24HrValidIntervals.setDescription('This object gives the number of previous 24 hour intervals for which valid performance monitoring data has been stored on the interface. The value of this object will be 0 if the measurement was (re-)started within the last 24 hours, or 1 otherwise.')
c_optical_param_thresh_source = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 264, 1, 1, 1, 1, 19), bits().clone(namedValues=named_values(('highAlarmDefThresh', 0), ('highWarnDefThresh', 1), ('lowAlarmDefThresh', 2), ('lowWarnDefThresh', 3)))).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
cOpticalParamThreshSource.setStatus('current')
if mibBuilder.loadTexts:
cOpticalParamThreshSource.setDescription("This object indicates if the current value of a particular threshold in this entry is user configured value or it is a system default value. It also allows user to specify the list of thresholds for this entry which should be restored to their system default values. The bit 'highAlarmThresh' corresponds to the object cOpticalParamHighAlarmThresh. The bit 'highWarnThresh' corresponds to the object cOpticalParamHighWarningThresh. The bit 'lowAlarmThresh' corresponds to the object cOpticalParamLowAlarmThresh. The bit 'lowWarnThresh' corresponds to the object cOpticalParamLowWarningThresh. A value of 0 for a bit indicates that corresponding object has system default value of threshold. A value of 1 for a bit indicates that corresponding object has user configured threshold value. A user may only change value of each of the bits to zero. Setting a bit to 0 will reset the corresponding threshold to its default value. System will change a bit from 0 to 1 when its corresponding threshold is changed by user from its default to any other value.")
c_optical_notify_enable = mib_scalar((1, 3, 6, 1, 4, 1, 9, 9, 264, 1, 1, 2), optical_alarm_severity_or_zero()).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
cOpticalNotifyEnable.setStatus('current')
if mibBuilder.loadTexts:
cOpticalNotifyEnable.setDescription("This object specifies the minimum severity threshold governing the generation of cOpticalMonParameterStatus notifications. For example, if the value of this object is set to 'major', then the agent generates these notifications if and only if the severity of the alarm being indicated is 'major' or 'critical'. The values of 'notReported', and 'cleared' do not apply. The value of '0' disables the generation of notifications.")
c_optical_mon_enable = mib_scalar((1, 3, 6, 1, 4, 1, 9, 9, 264, 1, 1, 3), bits().clone(namedValues=named_values(('all', 0)))).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
cOpticalMonEnable.setStatus('current')
if mibBuilder.loadTexts:
cOpticalMonEnable.setDescription("This object specifies the types of transceivers for which optical monitoring is enabled. A value of 1 for the bit 'all', specifies that optical monitoring functionality is enabled for all the types of transceivers which are supported by system and have optical monitoring capability.")
c_optical_mon_poll_interval = mib_scalar((1, 3, 6, 1, 4, 1, 9, 9, 264, 1, 1, 4), unsigned32()).setUnits('minutes').setMaxAccess('readwrite')
if mibBuilder.loadTexts:
cOpticalMonPollInterval.setStatus('current')
if mibBuilder.loadTexts:
cOpticalMonPollInterval.setDescription('This object specifies the interval in minutes after which optical transceiver data will be polled by system repeatedly and updated in cOpticalMonTable when one or more bits in cOpticalMonEnable is set.')
c_optical_mon_if_table = mib_table((1, 3, 6, 1, 4, 1, 9, 9, 264, 1, 1, 5))
if mibBuilder.loadTexts:
cOpticalMonIfTable.setStatus('current')
if mibBuilder.loadTexts:
cOpticalMonIfTable.setDescription('This table contains the list of optical interfaces populated in cOpticalMonTable.')
c_optical_mon_if_entry = mib_table_row((1, 3, 6, 1, 4, 1, 9, 9, 264, 1, 1, 5, 1)).setIndexNames((0, 'IF-MIB', 'ifIndex'))
if mibBuilder.loadTexts:
cOpticalMonIfEntry.setStatus('current')
if mibBuilder.loadTexts:
cOpticalMonIfEntry.setDescription('An entry containing the information for a particular optical interface.')
c_optical_mon_if_time_in_slot = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 264, 1, 1, 5, 1, 1), unsigned32()).setUnits('seconds').setMaxAccess('readonly')
if mibBuilder.loadTexts:
cOpticalMonIfTimeInSlot.setStatus('current')
if mibBuilder.loadTexts:
cOpticalMonIfTimeInSlot.setDescription('This object indicates when this optical transceiver was detected by the system.')
c_optical_pm_current_table = mib_table((1, 3, 6, 1, 4, 1, 9, 9, 264, 1, 2, 1))
if mibBuilder.loadTexts:
cOpticalPMCurrentTable.setStatus('current')
if mibBuilder.loadTexts:
cOpticalPMCurrentTable.setDescription('This table contains performance monitoring data for the various optical parameters, collected over the current 15 minute or the current 24 hour interval.')
c_optical_pm_current_entry = mib_table_row((1, 3, 6, 1, 4, 1, 9, 9, 264, 1, 2, 1, 1)).setIndexNames((0, 'CISCO-OPTICAL-MONITOR-MIB', 'cOpticalPMCurrentPeriod'), (0, 'IF-MIB', 'ifIndex'), (0, 'CISCO-OPTICAL-MONITOR-MIB', 'cOpticalPMCurrentDirection'), (0, 'CISCO-OPTICAL-MONITOR-MIB', 'cOpticalPMCurrentLocation'), (0, 'CISCO-OPTICAL-MONITOR-MIB', 'cOpticalPMCurrentParamType'))
if mibBuilder.loadTexts:
cOpticalPMCurrentEntry.setStatus('current')
if mibBuilder.loadTexts:
cOpticalPMCurrentEntry.setDescription('An entry in the cOpticalPMCurrentTable. It contains performance monitoring data for a monitored optical parameter at an interface, collected over the current 15 minute or the current 24 hour interval. Note that the set of monitored optical parameters may vary based on interface type, direction, and monitoring location. Examples of interfaces that can have an entry in this table include optical transceivers, interfaces before and after optical amplifiers, and interfaces before and after optical attenuators.')
c_optical_pm_current_period = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 264, 1, 2, 1, 1, 1), optical_pm_period())
if mibBuilder.loadTexts:
cOpticalPMCurrentPeriod.setStatus('current')
if mibBuilder.loadTexts:
cOpticalPMCurrentPeriod.setDescription('This object indicates whether the optical parameter values given in this entry are collected over the current 15 minute or the current 24 hour interval.')
c_optical_pm_current_direction = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 264, 1, 2, 1, 1, 2), optical_if_direction())
if mibBuilder.loadTexts:
cOpticalPMCurrentDirection.setStatus('current')
if mibBuilder.loadTexts:
cOpticalPMCurrentDirection.setDescription('This object indicates the direction monitored for the optical interface, in this entry.')
c_optical_pm_current_location = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 264, 1, 2, 1, 1, 3), optical_if_mon_location())
if mibBuilder.loadTexts:
cOpticalPMCurrentLocation.setStatus('current')
if mibBuilder.loadTexts:
cOpticalPMCurrentLocation.setDescription('This object indicates whether the optical characteristics are measured before or after adjustment (e.g. optical amplification or attenuation), at this interface.')
c_optical_pm_current_param_type = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 264, 1, 2, 1, 1, 4), optical_parameter_type())
if mibBuilder.loadTexts:
cOpticalPMCurrentParamType.setStatus('current')
if mibBuilder.loadTexts:
cOpticalPMCurrentParamType.setDescription('This object specifies the optical parameter that is being monitored, in this entry.')
c_optical_pm_current_max_param = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 264, 1, 2, 1, 1, 5), optical_parameter_value()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
cOpticalPMCurrentMaxParam.setStatus('current')
if mibBuilder.loadTexts:
cOpticalPMCurrentMaxParam.setDescription('This object gives the maximum value measured for the monitored optical parameter, in the current 15 minute or the current 24 hour interval.')
c_optical_pm_current_min_param = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 264, 1, 2, 1, 1, 6), optical_parameter_value()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
cOpticalPMCurrentMinParam.setStatus('current')
if mibBuilder.loadTexts:
cOpticalPMCurrentMinParam.setDescription('This object gives the minimum value measured for the monitored optical parameter, in the current 15 minute or the current 24 hour interval.')
c_optical_pm_current_mean_param = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 264, 1, 2, 1, 1, 7), optical_parameter_value()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
cOpticalPMCurrentMeanParam.setStatus('current')
if mibBuilder.loadTexts:
cOpticalPMCurrentMeanParam.setDescription('This object gives the average value of the monitored optical parameter, in the current 15 minute or the current 24 hour interval.')
c_optical_pm_current_unavail_secs = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 264, 1, 2, 1, 1, 8), integer32().subtype(subtypeSpec=value_range_constraint(0, 86400))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
cOpticalPMCurrentUnavailSecs.setStatus('current')
if mibBuilder.loadTexts:
cOpticalPMCurrentUnavailSecs.setDescription('This object is used to indicate the number of seconds, in the current 15 minute or the current 24 hour interval, for which the optical performance data is not accounted for. In the receive direction, the performance data could be unavailable during these periods for multiple reasons like the interface being administratively down or if there is a Loss of Light alarm on the interface. In the transmit direction, performance data could be unavailable when the laser is shutdown.')
c_optical_pm_interval_table = mib_table((1, 3, 6, 1, 4, 1, 9, 9, 264, 1, 2, 2))
if mibBuilder.loadTexts:
cOpticalPMIntervalTable.setStatus('current')
if mibBuilder.loadTexts:
cOpticalPMIntervalTable.setDescription('This table stores performance monitoring data for the various optical parameters, collected over previous intervals. This table can have entries for one complete 24 hour interval and up to 96 complete 15 minute intervals. A system is required to store at least 4 completed 15 minute intervals. The number of valid 15 minute intervals in this table is indicated by the cOpticalMon15MinValidIntervals object and the number of valid 24 hour intervals is indicated by the cOpticalMon24HrValidIntervals object.')
c_optical_pm_interval_entry = mib_table_row((1, 3, 6, 1, 4, 1, 9, 9, 264, 1, 2, 2, 1)).setIndexNames((0, 'CISCO-OPTICAL-MONITOR-MIB', 'cOpticalPMIntervalPeriod'), (0, 'CISCO-OPTICAL-MONITOR-MIB', 'cOpticalPMIntervalNumber'), (0, 'IF-MIB', 'ifIndex'), (0, 'CISCO-OPTICAL-MONITOR-MIB', 'cOpticalPMIntervalDirection'), (0, 'CISCO-OPTICAL-MONITOR-MIB', 'cOpticalPMIntervalLocation'), (0, 'CISCO-OPTICAL-MONITOR-MIB', 'cOpticalPMIntervalParamType'))
if mibBuilder.loadTexts:
cOpticalPMIntervalEntry.setStatus('current')
if mibBuilder.loadTexts:
cOpticalPMIntervalEntry.setDescription('An entry in the cOpticalPMIntervalTable. It contains performance monitoring data for an optical parameter, collected over a previous interval. Note that the set of monitored optical parameters may vary based on interface type, direction, and monitoring location. Examples of interfaces that can have an entry in this table include optical transceivers, interfaces before and after optical amplifiers, and interfaces before and after optical attenuators.')
c_optical_pm_interval_period = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 264, 1, 2, 2, 1, 1), optical_pm_period())
if mibBuilder.loadTexts:
cOpticalPMIntervalPeriod.setStatus('current')
if mibBuilder.loadTexts:
cOpticalPMIntervalPeriod.setDescription('This object indicates whether the optical parameter values, given in this entry, are collected over a period of 15 minutes or 24 hours.')
c_optical_pm_interval_number = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 264, 1, 2, 2, 1, 2), integer32().subtype(subtypeSpec=value_range_constraint(1, 96)))
if mibBuilder.loadTexts:
cOpticalPMIntervalNumber.setStatus('current')
if mibBuilder.loadTexts:
cOpticalPMIntervalNumber.setDescription('A number between 1 and 96, which identifies the interval for which the set of optical parameter values is available. The interval identified by 1 is the most recently completed 15 minute or 24 hour interval, and the interval identified by N is the interval immediately preceding the one identified by N-1.')
c_optical_pm_interval_direction = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 264, 1, 2, 2, 1, 3), optical_if_direction())
if mibBuilder.loadTexts:
cOpticalPMIntervalDirection.setStatus('current')
if mibBuilder.loadTexts:
cOpticalPMIntervalDirection.setDescription('This object indicates the direction monitored for the optical interface, in this entry.')
c_optical_pm_interval_location = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 264, 1, 2, 2, 1, 4), optical_if_mon_location())
if mibBuilder.loadTexts:
cOpticalPMIntervalLocation.setStatus('current')
if mibBuilder.loadTexts:
cOpticalPMIntervalLocation.setDescription('This object indicates whether the optical characteristics are measured before or after adjustment (e.g. optical amplification or attenuation), at this interface.')
c_optical_pm_interval_param_type = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 264, 1, 2, 2, 1, 5), optical_parameter_type())
if mibBuilder.loadTexts:
cOpticalPMIntervalParamType.setStatus('current')
if mibBuilder.loadTexts:
cOpticalPMIntervalParamType.setDescription('This object specifies the optical parameter that is being monitored, in this entry.')
c_optical_pm_interval_max_param = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 264, 1, 2, 2, 1, 6), optical_parameter_value()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
cOpticalPMIntervalMaxParam.setStatus('current')
if mibBuilder.loadTexts:
cOpticalPMIntervalMaxParam.setDescription('This object gives the maximum value measured for the optical parameter, in a particular 15 minute or 24 hour interval.')
c_optical_pm_interval_min_param = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 264, 1, 2, 2, 1, 7), optical_parameter_value()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
cOpticalPMIntervalMinParam.setStatus('current')
if mibBuilder.loadTexts:
cOpticalPMIntervalMinParam.setDescription('This object gives the minimum value measured for the optical parameter, in a particular 15 minute or 24 hour interval.')
c_optical_pm_interval_mean_param = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 264, 1, 2, 2, 1, 8), optical_parameter_value()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
cOpticalPMIntervalMeanParam.setStatus('current')
if mibBuilder.loadTexts:
cOpticalPMIntervalMeanParam.setDescription('This object gives the average value of the measured optical parameter, in a particular 15 minute or 24 hour interval.')
c_optical_pm_interval_unavail_secs = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 264, 1, 2, 2, 1, 9), integer32().subtype(subtypeSpec=value_range_constraint(0, 86400))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
cOpticalPMIntervalUnavailSecs.setStatus('current')
if mibBuilder.loadTexts:
cOpticalPMIntervalUnavailSecs.setDescription('This object is used to indicate the number of seconds, in the particular 15 minute or 24 hour interval, for which the optical performance data is not accounted for. In the receive direction, the performance data could be unavailable during these periods for multiple reasons like the interface being administratively down or if there is a Loss of Light alarm on the interface. In the transmit direction, performance data could be unavailable when the laser is shutdown.')
c_optical_monitor_mib_notifications = mib_identifier((1, 3, 6, 1, 4, 1, 9, 9, 264, 2))
c_optical_mon_notification_prefix = mib_identifier((1, 3, 6, 1, 4, 1, 9, 9, 264, 2, 0))
c_optical_mon_parameter_status = notification_type((1, 3, 6, 1, 4, 1, 9, 9, 264, 2, 0, 1)).setObjects(('CISCO-OPTICAL-MONITOR-MIB', 'cOpticalParameterValue'), ('CISCO-OPTICAL-MONITOR-MIB', 'cOpticalParamAlarmStatus'), ('CISCO-OPTICAL-MONITOR-MIB', 'cOpticalParamAlarmCurMaxThresh'), ('CISCO-OPTICAL-MONITOR-MIB', 'cOpticalParamAlarmCurMaxSev'), ('CISCO-OPTICAL-MONITOR-MIB', 'cOpticalParamAlarmLastChange'))
if mibBuilder.loadTexts:
cOpticalMonParameterStatus.setStatus('current')
if mibBuilder.loadTexts:
cOpticalMonParameterStatus.setDescription("This notification is sent when any threshold related to an optical parameter is exceeded or cleared on an interface. This notification may be suppressed under the following conditions: - depending on the value of the cOpticalNotifyEnable object, or - if the severity of the threshold as specified by the cOpticalParamHighWarningSev or cOpticalParamLowWarningSev object is 'notReported'. ")
c_optical_monitor_mib_conformance = mib_identifier((1, 3, 6, 1, 4, 1, 9, 9, 264, 3))
c_optical_monitor_mib_compliances = mib_identifier((1, 3, 6, 1, 4, 1, 9, 9, 264, 3, 1))
c_optical_monitor_mib_groups = mib_identifier((1, 3, 6, 1, 4, 1, 9, 9, 264, 3, 2))
c_optical_monitor_mib_compliance = module_compliance((1, 3, 6, 1, 4, 1, 9, 9, 264, 3, 1, 1)).setObjects(('CISCO-OPTICAL-MONITOR-MIB', 'cOpticalMIBMonGroup'), ('CISCO-OPTICAL-MONITOR-MIB', 'cOpticalMIBThresholdGroup'), ('CISCO-OPTICAL-MONITOR-MIB', 'cOpticalMIBSeverityGroup'), ('CISCO-OPTICAL-MONITOR-MIB', 'cOpticalMIBPMGroup'), ('CISCO-OPTICAL-MONITOR-MIB', 'cOpticalMIBNotifyEnableGroup'), ('CISCO-OPTICAL-MONITOR-MIB', 'cOpticalMIBNotifGroup'))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
c_optical_monitor_mib_compliance = cOpticalMonitorMIBCompliance.setStatus('deprecated')
if mibBuilder.loadTexts:
cOpticalMonitorMIBCompliance.setDescription('The compliance statement for network elements that monitor optical characteristics and set thresholds on the optical interfaces in a network element.')
c_optical_monitor_mib_compliance_rev = module_compliance((1, 3, 6, 1, 4, 1, 9, 9, 264, 3, 1, 2)).setObjects(('CISCO-OPTICAL-MONITOR-MIB', 'cOpticalMIBMonGroup'), ('CISCO-OPTICAL-MONITOR-MIB', 'cOpticalMIBThresholdGroup'), ('CISCO-OPTICAL-MONITOR-MIB', 'cOpticalMIBSeverityGroup'), ('CISCO-OPTICAL-MONITOR-MIB', 'cOpticalMIBPMGroup'), ('CISCO-OPTICAL-MONITOR-MIB', 'cOpticalMonIfTimeGroup'), ('CISCO-OPTICAL-MONITOR-MIB', 'cOpticalMIBNotifyEnableGroup'), ('CISCO-OPTICAL-MONITOR-MIB', 'cOpticalMIBNotifGroup'), ('CISCO-OPTICAL-MONITOR-MIB', 'cOpticalMIBEnableConfigGroup'), ('CISCO-OPTICAL-MONITOR-MIB', 'cOpticalMIBIntervalConfigGroup'), ('CISCO-OPTICAL-MONITOR-MIB', 'cOpticalMonThreshSourceGroup'))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
c_optical_monitor_mib_compliance_rev = cOpticalMonitorMIBComplianceRev.setStatus('current')
if mibBuilder.loadTexts:
cOpticalMonitorMIBComplianceRev.setDescription('The compliance statement for network elements that monitor optical characteristics and set thresholds on the optical interfaces in a network element.')
c_optical_mib_mon_group = object_group((1, 3, 6, 1, 4, 1, 9, 9, 264, 3, 2, 1)).setObjects(('CISCO-OPTICAL-MONITOR-MIB', 'cOpticalParameterValue'))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
c_optical_mib_mon_group = cOpticalMIBMonGroup.setStatus('current')
if mibBuilder.loadTexts:
cOpticalMIBMonGroup.setDescription('A mandatory object that provides monitoring of optical characteristics.')
c_optical_mib_threshold_group = object_group((1, 3, 6, 1, 4, 1, 9, 9, 264, 3, 2, 2)).setObjects(('CISCO-OPTICAL-MONITOR-MIB', 'cOpticalParamHighAlarmThresh'), ('CISCO-OPTICAL-MONITOR-MIB', 'cOpticalParamHighWarningThresh'), ('CISCO-OPTICAL-MONITOR-MIB', 'cOpticalParamLowAlarmThresh'), ('CISCO-OPTICAL-MONITOR-MIB', 'cOpticalParamLowWarningThresh'), ('CISCO-OPTICAL-MONITOR-MIB', 'cOpticalParamAlarmStatus'), ('CISCO-OPTICAL-MONITOR-MIB', 'cOpticalParamAlarmCurMaxThresh'), ('CISCO-OPTICAL-MONITOR-MIB', 'cOpticalParamAlarmLastChange'))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
c_optical_mib_threshold_group = cOpticalMIBThresholdGroup.setStatus('current')
if mibBuilder.loadTexts:
cOpticalMIBThresholdGroup.setDescription('A collection of objects that support thresholds on optical parameters and provide status information when the thresholds are exceeded or cleared.')
c_optical_mib_severity_group = object_group((1, 3, 6, 1, 4, 1, 9, 9, 264, 3, 2, 3)).setObjects(('CISCO-OPTICAL-MONITOR-MIB', 'cOpticalParamHighAlarmSev'), ('CISCO-OPTICAL-MONITOR-MIB', 'cOpticalParamHighWarningSev'), ('CISCO-OPTICAL-MONITOR-MIB', 'cOpticalParamLowAlarmSev'), ('CISCO-OPTICAL-MONITOR-MIB', 'cOpticalParamLowWarningSev'), ('CISCO-OPTICAL-MONITOR-MIB', 'cOpticalParamAlarmCurMaxSev'))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
c_optical_mib_severity_group = cOpticalMIBSeverityGroup.setStatus('current')
if mibBuilder.loadTexts:
cOpticalMIBSeverityGroup.setDescription('A collection of objects that support severities for thresholds on optical parameters.')
c_optical_mibpm_group = object_group((1, 3, 6, 1, 4, 1, 9, 9, 264, 3, 2, 4)).setObjects(('CISCO-OPTICAL-MONITOR-MIB', 'cOpticalMon15MinValidIntervals'), ('CISCO-OPTICAL-MONITOR-MIB', 'cOpticalMon24HrValidIntervals'), ('CISCO-OPTICAL-MONITOR-MIB', 'cOpticalPMCurrentMaxParam'), ('CISCO-OPTICAL-MONITOR-MIB', 'cOpticalPMCurrentMinParam'), ('CISCO-OPTICAL-MONITOR-MIB', 'cOpticalPMCurrentMeanParam'), ('CISCO-OPTICAL-MONITOR-MIB', 'cOpticalPMCurrentUnavailSecs'), ('CISCO-OPTICAL-MONITOR-MIB', 'cOpticalPMIntervalMaxParam'), ('CISCO-OPTICAL-MONITOR-MIB', 'cOpticalPMIntervalMinParam'), ('CISCO-OPTICAL-MONITOR-MIB', 'cOpticalPMIntervalMeanParam'), ('CISCO-OPTICAL-MONITOR-MIB', 'cOpticalPMIntervalUnavailSecs'))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
c_optical_mibpm_group = cOpticalMIBPMGroup.setStatus('current')
if mibBuilder.loadTexts:
cOpticalMIBPMGroup.setDescription('A collection of objects that provide optical performance monitoring data for 15 minute and 24 hour intervals.')
c_optical_mib_notify_enable_group = object_group((1, 3, 6, 1, 4, 1, 9, 9, 264, 3, 2, 5)).setObjects(('CISCO-OPTICAL-MONITOR-MIB', 'cOpticalNotifyEnable'))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
c_optical_mib_notify_enable_group = cOpticalMIBNotifyEnableGroup.setStatus('current')
if mibBuilder.loadTexts:
cOpticalMIBNotifyEnableGroup.setDescription('An object to control the generation of notifications.')
c_optical_mib_notif_group = notification_group((1, 3, 6, 1, 4, 1, 9, 9, 264, 3, 2, 6)).setObjects(('CISCO-OPTICAL-MONITOR-MIB', 'cOpticalMonParameterStatus'))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
c_optical_mib_notif_group = cOpticalMIBNotifGroup.setStatus('current')
if mibBuilder.loadTexts:
cOpticalMIBNotifGroup.setDescription('A notification generated when a threshold on an optical parameter is exceeded or cleared.')
c_optical_mon_if_time_group = object_group((1, 3, 6, 1, 4, 1, 9, 9, 264, 3, 2, 7)).setObjects(('CISCO-OPTICAL-MONITOR-MIB', 'cOpticalMonIfTimeInSlot'))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
c_optical_mon_if_time_group = cOpticalMonIfTimeGroup.setStatus('current')
if mibBuilder.loadTexts:
cOpticalMonIfTimeGroup.setDescription('A collection of object(s) that provide time related information for transceivers in the system.')
c_optical_mib_enable_config_group = object_group((1, 3, 6, 1, 4, 1, 9, 9, 264, 3, 2, 8)).setObjects(('CISCO-OPTICAL-MONITOR-MIB', 'cOpticalMonEnable'))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
c_optical_mib_enable_config_group = cOpticalMIBEnableConfigGroup.setStatus('current')
if mibBuilder.loadTexts:
cOpticalMIBEnableConfigGroup.setDescription('A collection of object(s) to enable/disable optical monitoring.')
c_optical_mib_interval_config_group = object_group((1, 3, 6, 1, 4, 1, 9, 9, 264, 3, 2, 9)).setObjects(('CISCO-OPTICAL-MONITOR-MIB', 'cOpticalMonPollInterval'))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
c_optical_mib_interval_config_group = cOpticalMIBIntervalConfigGroup.setStatus('current')
if mibBuilder.loadTexts:
cOpticalMIBIntervalConfigGroup.setDescription('A collection of object(s) to specify polling interval for monitoring optical transceivers.')
c_optical_mon_thresh_source_group = object_group((1, 3, 6, 1, 4, 1, 9, 9, 264, 3, 2, 10)).setObjects(('CISCO-OPTICAL-MONITOR-MIB', 'cOpticalParamThreshSource'))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
c_optical_mon_thresh_source_group = cOpticalMonThreshSourceGroup.setStatus('current')
if mibBuilder.loadTexts:
cOpticalMonThreshSourceGroup.setDescription('A collection of object(s) to restore a given threshold to its default value.')
mibBuilder.exportSymbols('CISCO-OPTICAL-MONITOR-MIB', OpticalParameterValue=OpticalParameterValue, cOpticalMonitorMIBComplianceRev=cOpticalMonitorMIBComplianceRev, cOpticalPMCurrentParamType=cOpticalPMCurrentParamType, cOpticalPMIntervalLocation=cOpticalPMIntervalLocation, cOpticalPMCurrentTable=cOpticalPMCurrentTable, OpticalAlarmSeverityOrZero=OpticalAlarmSeverityOrZero, cOpticalPMIntervalUnavailSecs=cOpticalPMIntervalUnavailSecs, cOpticalMonGroup=cOpticalMonGroup, cOpticalParamThreshSource=cOpticalParamThreshSource, cOpticalMonThreshSourceGroup=cOpticalMonThreshSourceGroup, cOpticalPMCurrentMaxParam=cOpticalPMCurrentMaxParam, cOpticalMIBMonGroup=cOpticalMIBMonGroup, cOpticalMon15MinValidIntervals=cOpticalMon15MinValidIntervals, cOpticalParamLowAlarmThresh=cOpticalParamLowAlarmThresh, OpticalIfDirection=OpticalIfDirection, cOpticalMonIfEntry=cOpticalMonIfEntry, cOpticalPMCurrentLocation=cOpticalPMCurrentLocation, cOpticalPMGroup=cOpticalPMGroup, cOpticalParamAlarmStatus=cOpticalParamAlarmStatus, cOpticalPMIntervalParamType=cOpticalPMIntervalParamType, cOpticalMIBEnableConfigGroup=cOpticalMIBEnableConfigGroup, cOpticalMonParameterType=cOpticalMonParameterType, OpticalIfMonLocation=OpticalIfMonLocation, ciscoOpticalMonitorMIB=ciscoOpticalMonitorMIB, cOpticalMIBThresholdGroup=cOpticalMIBThresholdGroup, cOpticalPMCurrentDirection=cOpticalPMCurrentDirection, cOpticalPMCurrentMinParam=cOpticalPMCurrentMinParam, cOpticalMIBNotifGroup=cOpticalMIBNotifGroup, OpticalPMPeriod=OpticalPMPeriod, cOpticalParamHighAlarmThresh=cOpticalParamHighAlarmThresh, cOpticalMonitorMIBObjects=cOpticalMonitorMIBObjects, cOpticalPMIntervalEntry=cOpticalPMIntervalEntry, cOpticalParamLowWarningSev=cOpticalParamLowWarningSev, cOpticalPMCurrentUnavailSecs=cOpticalPMCurrentUnavailSecs, cOpticalMonIfTimeInSlot=cOpticalMonIfTimeInSlot, OpticalParameterType=OpticalParameterType, cOpticalNotifyEnable=cOpticalNotifyEnable, cOpticalParamHighAlarmSev=cOpticalParamHighAlarmSev, cOpticalPMIntervalTable=cOpticalPMIntervalTable, cOpticalMonIfTable=cOpticalMonIfTable, cOpticalPMIntervalMaxParam=cOpticalPMIntervalMaxParam, cOpticalMonitorMIBNotifications=cOpticalMonitorMIBNotifications, cOpticalMonPollInterval=cOpticalMonPollInterval, cOpticalParamAlarmCurMaxThresh=cOpticalParamAlarmCurMaxThresh, cOpticalParamAlarmLastChange=cOpticalParamAlarmLastChange, cOpticalMIBSeverityGroup=cOpticalMIBSeverityGroup, cOpticalMIBIntervalConfigGroup=cOpticalMIBIntervalConfigGroup, cOpticalPMCurrentPeriod=cOpticalPMCurrentPeriod, cOpticalMon24HrValidIntervals=cOpticalMon24HrValidIntervals, cOpticalMonDirection=cOpticalMonDirection, cOpticalPMIntervalPeriod=cOpticalPMIntervalPeriod, cOpticalParamHighWarningSev=cOpticalParamHighWarningSev, cOpticalMonitorMIBCompliance=cOpticalMonitorMIBCompliance, cOpticalMonitorMIBCompliances=cOpticalMonitorMIBCompliances, OpticalAlarmSeverity=OpticalAlarmSeverity, OpticalAlarmStatus=OpticalAlarmStatus, PYSNMP_MODULE_ID=ciscoOpticalMonitorMIB, cOpticalPMIntervalMinParam=cOpticalPMIntervalMinParam, cOpticalMonEntry=cOpticalMonEntry, cOpticalMonNotificationPrefix=cOpticalMonNotificationPrefix, cOpticalParamLowWarningThresh=cOpticalParamLowWarningThresh, cOpticalParamLowAlarmSev=cOpticalParamLowAlarmSev, cOpticalPMCurrentEntry=cOpticalPMCurrentEntry, cOpticalMIBNotifyEnableGroup=cOpticalMIBNotifyEnableGroup, cOpticalMIBPMGroup=cOpticalMIBPMGroup, cOpticalParamAlarmCurMaxSev=cOpticalParamAlarmCurMaxSev, cOpticalMonIfTimeGroup=cOpticalMonIfTimeGroup, cOpticalParameterValue=cOpticalParameterValue, cOpticalMonitorMIBConformance=cOpticalMonitorMIBConformance, cOpticalPMIntervalDirection=cOpticalPMIntervalDirection, cOpticalParamHighWarningThresh=cOpticalParamHighWarningThresh, cOpticalPMIntervalMeanParam=cOpticalPMIntervalMeanParam, cOpticalPMIntervalNumber=cOpticalPMIntervalNumber, cOpticalMonParameterStatus=cOpticalMonParameterStatus, cOpticalMonTable=cOpticalMonTable, cOpticalMonLocation=cOpticalMonLocation, cOpticalMonEnable=cOpticalMonEnable, cOpticalMonitorMIBGroups=cOpticalMonitorMIBGroups, cOpticalPMCurrentMeanParam=cOpticalPMCurrentMeanParam) |
name = 'Bob'
if name == 'Alice':
print('Hi Alice')
print('Done')
| name = 'Bob'
if name == 'Alice':
print('Hi Alice')
print('Done') |
def tup(name, len):
ret = '('
for i in range(len):
ret += f'{name}{i}, '
return ret + ')'
for i in range(10):
print(
f'impl_unzip!({tup("T",i)}, {tup("A",i)}, {tup("s",i)}, {tup("t",i)});')
| def tup(name, len):
ret = '('
for i in range(len):
ret += f'{name}{i}, '
return ret + ')'
for i in range(10):
print(f"impl_unzip!({tup('T', i)}, {tup('A', i)}, {tup('s', i)}, {tup('t', i)});") |
class SubrectangleQueries:
def __init__(self, rectangle: List[List[int]]):
self.rec = rectangle
self.newRec = []
def updateSubrectangle(self, row1: int, col1: int, row2: int, col2: int, newValue: int) -> None:
self.newRec.append((row1, col1, row2, col2, newValue))
def getValue(self, row: int, col: int) -> int:
for i in range(len(self.newRec) - 1, -1, -1):
if self.newRec[i][0] <= row <= self.newRec[i][2] and self.newRec[i][1] <= col <= self.newRec[i][3]:
return self.newRec[i][4]
return self.rec[row][col]
# Your SubrectangleQueries object will be instantiated and called as such:
# obj = SubrectangleQueries(rectangle)
# obj.updateSubrectangle(row1,col1,row2,col2,newValue)
# param_2 = obj.getValue(row,col)
| class Subrectanglequeries:
def __init__(self, rectangle: List[List[int]]):
self.rec = rectangle
self.newRec = []
def update_subrectangle(self, row1: int, col1: int, row2: int, col2: int, newValue: int) -> None:
self.newRec.append((row1, col1, row2, col2, newValue))
def get_value(self, row: int, col: int) -> int:
for i in range(len(self.newRec) - 1, -1, -1):
if self.newRec[i][0] <= row <= self.newRec[i][2] and self.newRec[i][1] <= col <= self.newRec[i][3]:
return self.newRec[i][4]
return self.rec[row][col] |
# model
model = Model()
i0 = Input("op_shape", "TENSOR_INT32", "{4}")
weights = Parameter("ker", "TENSOR_FLOAT32", "{1, 3, 3, 1}", [1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0])
i1 = Input("in", "TENSOR_FLOAT32", "{1, 4, 4, 1}" )
pad = Int32Scalar("pad_same", 1)
s_x = Int32Scalar("stride_x", 1)
s_y = Int32Scalar("stride_y", 1)
i2 = Output("op", "TENSOR_FLOAT32", "{1, 4, 4, 1}")
model = model.Operation("TRANSPOSE_CONV_EX", i0, weights, i1, pad, s_x, s_y).To(i2)
# Example 1. Input in operand 0,
input0 = {i0: # output shape
[1, 4, 4, 1],
i1: # input 0
[1.0, 2.0, 3.0, 4.0,
5.0, 6.0, 7.0, 8.0,
9.0, 10.0, 11.0, 12.0,
13.0, 14.0, 15.0, 16.0]}
output0 = {i2: # output 0
[29.0, 62.0, 83.0, 75.0,
99.0, 192.0, 237.0, 198.0,
207.0, 372.0, 417.0, 330.0,
263.0, 446.0, 485.0, 365.0]}
# Instantiate an example
Example((input0, output0))
| model = model()
i0 = input('op_shape', 'TENSOR_INT32', '{4}')
weights = parameter('ker', 'TENSOR_FLOAT32', '{1, 3, 3, 1}', [1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0])
i1 = input('in', 'TENSOR_FLOAT32', '{1, 4, 4, 1}')
pad = int32_scalar('pad_same', 1)
s_x = int32_scalar('stride_x', 1)
s_y = int32_scalar('stride_y', 1)
i2 = output('op', 'TENSOR_FLOAT32', '{1, 4, 4, 1}')
model = model.Operation('TRANSPOSE_CONV_EX', i0, weights, i1, pad, s_x, s_y).To(i2)
input0 = {i0: [1, 4, 4, 1], i1: [1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 10.0, 11.0, 12.0, 13.0, 14.0, 15.0, 16.0]}
output0 = {i2: [29.0, 62.0, 83.0, 75.0, 99.0, 192.0, 237.0, 198.0, 207.0, 372.0, 417.0, 330.0, 263.0, 446.0, 485.0, 365.0]}
example((input0, output0)) |
{
"targets": [
{
"target_name": "cityhash",
"include_dirs": ["cityhash/"],
"sources": [
"binding.cc",
"cityhash/city.cc"
]
}
]
}
| {'targets': [{'target_name': 'cityhash', 'include_dirs': ['cityhash/'], 'sources': ['binding.cc', 'cityhash/city.cc']}]} |
# def positive_or_negative(value):
# if value > 0:
# return "Positive!"
# elif value < 0:
# return "Negative!"
# else:
# return "It's zero!"
# number = int(input("Wprowadz liczbe: "))
# print(positive_or_negative(number))
def calculator(operation, a, b):
if operation == "add":
return a + b
elif operation == "subtract":
return a - b
elif operation == "multiple":
return a * b
elif operation == "divide":
return a / b
else:
print("There is no such an operation!")
operacja = str(input("Co chcesz zrobic? "))
num1 = int(input("Pierwszy skladnik: "))
num2 = int(input("Drugi skladnik: "))
print(calculator(operacja, num1, num2))
| def calculator(operation, a, b):
if operation == 'add':
return a + b
elif operation == 'subtract':
return a - b
elif operation == 'multiple':
return a * b
elif operation == 'divide':
return a / b
else:
print('There is no such an operation!')
operacja = str(input('Co chcesz zrobic? '))
num1 = int(input('Pierwszy skladnik: '))
num2 = int(input('Drugi skladnik: '))
print(calculator(operacja, num1, num2)) |
pkgname = "eventlog"
pkgver = "0.2.13"
pkgrel = 0
_commit = "a5c19163ba131f79452c6dfe4e31c2b4ce4be741"
build_style = "gnu_configure"
hostmakedepends = ["pkgconf", "automake", "libtool"]
pkgdesc = "API to format and send structured log messages"
maintainer = "q66 <[email protected]>"
license = "BSD-3-Clause"
url = "https://github.com/balabit/eventlog"
source = f"{url}/archive/{_commit}.tar.gz"
sha256 = "ddd8c19cf70adced542eeb067df275cb2c0d37a5efe1ba9123102eb9b4967c7b"
def pre_configure(self):
self.do("autoreconf", "-if")
def post_install(self):
self.install_license("COPYING")
@subpackage("eventlog-devel")
def _devel(self):
return self.default_devel()
| pkgname = 'eventlog'
pkgver = '0.2.13'
pkgrel = 0
_commit = 'a5c19163ba131f79452c6dfe4e31c2b4ce4be741'
build_style = 'gnu_configure'
hostmakedepends = ['pkgconf', 'automake', 'libtool']
pkgdesc = 'API to format and send structured log messages'
maintainer = 'q66 <[email protected]>'
license = 'BSD-3-Clause'
url = 'https://github.com/balabit/eventlog'
source = f'{url}/archive/{_commit}.tar.gz'
sha256 = 'ddd8c19cf70adced542eeb067df275cb2c0d37a5efe1ba9123102eb9b4967c7b'
def pre_configure(self):
self.do('autoreconf', '-if')
def post_install(self):
self.install_license('COPYING')
@subpackage('eventlog-devel')
def _devel(self):
return self.default_devel() |
#
# PySNMP MIB module CISCO-COMPRESSION-SERVICE-ADAPTER-MIB (http://snmplabs.com/pysmi)
# ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/CISCO-COMPRESSION-SERVICE-ADAPTER-MIB
# Produced by pysmi-0.3.4 at Mon Apr 29 17:36:21 2019
# On host DAVWANG4-M-1475 platform Darwin version 18.5.0 by user davwang4
# Using Python version 3.7.3 (default, Mar 27 2019, 09:23:15)
#
ObjectIdentifier, OctetString, Integer = mibBuilder.importSymbols("ASN1", "ObjectIdentifier", "OctetString", "Integer")
NamedValues, = mibBuilder.importSymbols("ASN1-ENUMERATION", "NamedValues")
ConstraintsUnion, ValueSizeConstraint, ValueRangeConstraint, SingleValueConstraint, ConstraintsIntersection = mibBuilder.importSymbols("ASN1-REFINEMENT", "ConstraintsUnion", "ValueSizeConstraint", "ValueRangeConstraint", "SingleValueConstraint", "ConstraintsIntersection")
ciscoMgmt, = mibBuilder.importSymbols("CISCO-SMI", "ciscoMgmt")
cardIndex, = mibBuilder.importSymbols("OLD-CISCO-CHASSIS-MIB", "cardIndex")
NotificationGroup, ObjectGroup, ModuleCompliance = mibBuilder.importSymbols("SNMPv2-CONF", "NotificationGroup", "ObjectGroup", "ModuleCompliance")
ModuleIdentity, TimeTicks, MibIdentifier, Gauge32, Counter32, iso, Bits, IpAddress, MibScalar, MibTable, MibTableRow, MibTableColumn, ObjectIdentity, NotificationType, Unsigned32, Integer32, Counter64 = mibBuilder.importSymbols("SNMPv2-SMI", "ModuleIdentity", "TimeTicks", "MibIdentifier", "Gauge32", "Counter32", "iso", "Bits", "IpAddress", "MibScalar", "MibTable", "MibTableRow", "MibTableColumn", "ObjectIdentity", "NotificationType", "Unsigned32", "Integer32", "Counter64")
DisplayString, TruthValue, TextualConvention = mibBuilder.importSymbols("SNMPv2-TC", "DisplayString", "TruthValue", "TextualConvention")
ciscoCompressionServiceAdapterMIB = ModuleIdentity((1, 3, 6, 1, 4, 1, 9, 9, 57))
if mibBuilder.loadTexts: ciscoCompressionServiceAdapterMIB.setLastUpdated('9608150000Z')
if mibBuilder.loadTexts: ciscoCompressionServiceAdapterMIB.setOrganization('Cisco Systems, Inc.')
ciscoCSAMIBObjects = MibIdentifier((1, 3, 6, 1, 4, 1, 9, 9, 57, 1))
csaStats = MibIdentifier((1, 3, 6, 1, 4, 1, 9, 9, 57, 1, 1))
csaStatsTable = MibTable((1, 3, 6, 1, 4, 1, 9, 9, 57, 1, 1, 1), )
if mibBuilder.loadTexts: csaStatsTable.setStatus('current')
csaStatsEntry = MibTableRow((1, 3, 6, 1, 4, 1, 9, 9, 57, 1, 1, 1, 1), ).setIndexNames((0, "OLD-CISCO-CHASSIS-MIB", "cardIndex"))
if mibBuilder.loadTexts: csaStatsEntry.setStatus('current')
csaInOctets = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 57, 1, 1, 1, 1, 1), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: csaInOctets.setStatus('current')
csaOutOctets = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 57, 1, 1, 1, 1, 2), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: csaOutOctets.setStatus('current')
csaInPackets = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 57, 1, 1, 1, 1, 3), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: csaInPackets.setStatus('current')
csaOutPackets = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 57, 1, 1, 1, 1, 4), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: csaOutPackets.setStatus('current')
csaInPacketsDrop = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 57, 1, 1, 1, 1, 5), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: csaInPacketsDrop.setStatus('current')
csaOutPacketsDrop = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 57, 1, 1, 1, 1, 6), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: csaOutPacketsDrop.setStatus('current')
csaNumberOfRestarts = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 57, 1, 1, 1, 1, 7), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: csaNumberOfRestarts.setStatus('current')
csaCompressionRatio = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 57, 1, 1, 1, 1, 8), Gauge32().subtype(subtypeSpec=ValueRangeConstraint(0, 100))).setMaxAccess("readonly")
if mibBuilder.loadTexts: csaCompressionRatio.setStatus('current')
csaDecompressionRatio = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 57, 1, 1, 1, 1, 9), Gauge32().subtype(subtypeSpec=ValueRangeConstraint(0, 100))).setMaxAccess("readonly")
if mibBuilder.loadTexts: csaDecompressionRatio.setStatus('current')
csaEnable = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 57, 1, 1, 1, 1, 10), TruthValue()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: csaEnable.setStatus('current')
ciscoCSAMIBConformance = MibIdentifier((1, 3, 6, 1, 4, 1, 9, 9, 57, 3))
csaMIBCompliances = MibIdentifier((1, 3, 6, 1, 4, 1, 9, 9, 57, 3, 1))
csaMIBGroups = MibIdentifier((1, 3, 6, 1, 4, 1, 9, 9, 57, 3, 2))
csaMIBCompliance = ModuleCompliance((1, 3, 6, 1, 4, 1, 9, 9, 57, 3, 1, 1)).setObjects(("CISCO-COMPRESSION-SERVICE-ADAPTER-MIB", "csaMIBGroup"))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
csaMIBCompliance = csaMIBCompliance.setStatus('current')
csaMIBGroup = ObjectGroup((1, 3, 6, 1, 4, 1, 9, 9, 57, 3, 2, 1)).setObjects(("CISCO-COMPRESSION-SERVICE-ADAPTER-MIB", "csaInOctets"), ("CISCO-COMPRESSION-SERVICE-ADAPTER-MIB", "csaOutOctets"), ("CISCO-COMPRESSION-SERVICE-ADAPTER-MIB", "csaInPackets"), ("CISCO-COMPRESSION-SERVICE-ADAPTER-MIB", "csaOutPackets"), ("CISCO-COMPRESSION-SERVICE-ADAPTER-MIB", "csaInPacketsDrop"), ("CISCO-COMPRESSION-SERVICE-ADAPTER-MIB", "csaOutPacketsDrop"), ("CISCO-COMPRESSION-SERVICE-ADAPTER-MIB", "csaNumberOfRestarts"), ("CISCO-COMPRESSION-SERVICE-ADAPTER-MIB", "csaCompressionRatio"), ("CISCO-COMPRESSION-SERVICE-ADAPTER-MIB", "csaDecompressionRatio"), ("CISCO-COMPRESSION-SERVICE-ADAPTER-MIB", "csaEnable"))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
csaMIBGroup = csaMIBGroup.setStatus('current')
mibBuilder.exportSymbols("CISCO-COMPRESSION-SERVICE-ADAPTER-MIB", ciscoCompressionServiceAdapterMIB=ciscoCompressionServiceAdapterMIB, csaOutPacketsDrop=csaOutPacketsDrop, csaStatsTable=csaStatsTable, csaInPacketsDrop=csaInPacketsDrop, csaNumberOfRestarts=csaNumberOfRestarts, csaMIBGroups=csaMIBGroups, csaStatsEntry=csaStatsEntry, csaInOctets=csaInOctets, csaEnable=csaEnable, csaMIBCompliance=csaMIBCompliance, ciscoCSAMIBConformance=ciscoCSAMIBConformance, csaDecompressionRatio=csaDecompressionRatio, csaMIBCompliances=csaMIBCompliances, ciscoCSAMIBObjects=ciscoCSAMIBObjects, csaCompressionRatio=csaCompressionRatio, csaOutOctets=csaOutOctets, csaOutPackets=csaOutPackets, csaStats=csaStats, csaMIBGroup=csaMIBGroup, PYSNMP_MODULE_ID=ciscoCompressionServiceAdapterMIB, csaInPackets=csaInPackets)
| (object_identifier, octet_string, integer) = mibBuilder.importSymbols('ASN1', 'ObjectIdentifier', 'OctetString', 'Integer')
(named_values,) = mibBuilder.importSymbols('ASN1-ENUMERATION', 'NamedValues')
(constraints_union, value_size_constraint, value_range_constraint, single_value_constraint, constraints_intersection) = mibBuilder.importSymbols('ASN1-REFINEMENT', 'ConstraintsUnion', 'ValueSizeConstraint', 'ValueRangeConstraint', 'SingleValueConstraint', 'ConstraintsIntersection')
(cisco_mgmt,) = mibBuilder.importSymbols('CISCO-SMI', 'ciscoMgmt')
(card_index,) = mibBuilder.importSymbols('OLD-CISCO-CHASSIS-MIB', 'cardIndex')
(notification_group, object_group, module_compliance) = mibBuilder.importSymbols('SNMPv2-CONF', 'NotificationGroup', 'ObjectGroup', 'ModuleCompliance')
(module_identity, time_ticks, mib_identifier, gauge32, counter32, iso, bits, ip_address, mib_scalar, mib_table, mib_table_row, mib_table_column, object_identity, notification_type, unsigned32, integer32, counter64) = mibBuilder.importSymbols('SNMPv2-SMI', 'ModuleIdentity', 'TimeTicks', 'MibIdentifier', 'Gauge32', 'Counter32', 'iso', 'Bits', 'IpAddress', 'MibScalar', 'MibTable', 'MibTableRow', 'MibTableColumn', 'ObjectIdentity', 'NotificationType', 'Unsigned32', 'Integer32', 'Counter64')
(display_string, truth_value, textual_convention) = mibBuilder.importSymbols('SNMPv2-TC', 'DisplayString', 'TruthValue', 'TextualConvention')
cisco_compression_service_adapter_mib = module_identity((1, 3, 6, 1, 4, 1, 9, 9, 57))
if mibBuilder.loadTexts:
ciscoCompressionServiceAdapterMIB.setLastUpdated('9608150000Z')
if mibBuilder.loadTexts:
ciscoCompressionServiceAdapterMIB.setOrganization('Cisco Systems, Inc.')
cisco_csamib_objects = mib_identifier((1, 3, 6, 1, 4, 1, 9, 9, 57, 1))
csa_stats = mib_identifier((1, 3, 6, 1, 4, 1, 9, 9, 57, 1, 1))
csa_stats_table = mib_table((1, 3, 6, 1, 4, 1, 9, 9, 57, 1, 1, 1))
if mibBuilder.loadTexts:
csaStatsTable.setStatus('current')
csa_stats_entry = mib_table_row((1, 3, 6, 1, 4, 1, 9, 9, 57, 1, 1, 1, 1)).setIndexNames((0, 'OLD-CISCO-CHASSIS-MIB', 'cardIndex'))
if mibBuilder.loadTexts:
csaStatsEntry.setStatus('current')
csa_in_octets = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 57, 1, 1, 1, 1, 1), counter32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
csaInOctets.setStatus('current')
csa_out_octets = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 57, 1, 1, 1, 1, 2), counter32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
csaOutOctets.setStatus('current')
csa_in_packets = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 57, 1, 1, 1, 1, 3), counter32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
csaInPackets.setStatus('current')
csa_out_packets = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 57, 1, 1, 1, 1, 4), counter32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
csaOutPackets.setStatus('current')
csa_in_packets_drop = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 57, 1, 1, 1, 1, 5), counter32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
csaInPacketsDrop.setStatus('current')
csa_out_packets_drop = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 57, 1, 1, 1, 1, 6), counter32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
csaOutPacketsDrop.setStatus('current')
csa_number_of_restarts = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 57, 1, 1, 1, 1, 7), counter32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
csaNumberOfRestarts.setStatus('current')
csa_compression_ratio = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 57, 1, 1, 1, 1, 8), gauge32().subtype(subtypeSpec=value_range_constraint(0, 100))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
csaCompressionRatio.setStatus('current')
csa_decompression_ratio = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 57, 1, 1, 1, 1, 9), gauge32().subtype(subtypeSpec=value_range_constraint(0, 100))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
csaDecompressionRatio.setStatus('current')
csa_enable = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 57, 1, 1, 1, 1, 10), truth_value()).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
csaEnable.setStatus('current')
cisco_csamib_conformance = mib_identifier((1, 3, 6, 1, 4, 1, 9, 9, 57, 3))
csa_mib_compliances = mib_identifier((1, 3, 6, 1, 4, 1, 9, 9, 57, 3, 1))
csa_mib_groups = mib_identifier((1, 3, 6, 1, 4, 1, 9, 9, 57, 3, 2))
csa_mib_compliance = module_compliance((1, 3, 6, 1, 4, 1, 9, 9, 57, 3, 1, 1)).setObjects(('CISCO-COMPRESSION-SERVICE-ADAPTER-MIB', 'csaMIBGroup'))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
csa_mib_compliance = csaMIBCompliance.setStatus('current')
csa_mib_group = object_group((1, 3, 6, 1, 4, 1, 9, 9, 57, 3, 2, 1)).setObjects(('CISCO-COMPRESSION-SERVICE-ADAPTER-MIB', 'csaInOctets'), ('CISCO-COMPRESSION-SERVICE-ADAPTER-MIB', 'csaOutOctets'), ('CISCO-COMPRESSION-SERVICE-ADAPTER-MIB', 'csaInPackets'), ('CISCO-COMPRESSION-SERVICE-ADAPTER-MIB', 'csaOutPackets'), ('CISCO-COMPRESSION-SERVICE-ADAPTER-MIB', 'csaInPacketsDrop'), ('CISCO-COMPRESSION-SERVICE-ADAPTER-MIB', 'csaOutPacketsDrop'), ('CISCO-COMPRESSION-SERVICE-ADAPTER-MIB', 'csaNumberOfRestarts'), ('CISCO-COMPRESSION-SERVICE-ADAPTER-MIB', 'csaCompressionRatio'), ('CISCO-COMPRESSION-SERVICE-ADAPTER-MIB', 'csaDecompressionRatio'), ('CISCO-COMPRESSION-SERVICE-ADAPTER-MIB', 'csaEnable'))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
csa_mib_group = csaMIBGroup.setStatus('current')
mibBuilder.exportSymbols('CISCO-COMPRESSION-SERVICE-ADAPTER-MIB', ciscoCompressionServiceAdapterMIB=ciscoCompressionServiceAdapterMIB, csaOutPacketsDrop=csaOutPacketsDrop, csaStatsTable=csaStatsTable, csaInPacketsDrop=csaInPacketsDrop, csaNumberOfRestarts=csaNumberOfRestarts, csaMIBGroups=csaMIBGroups, csaStatsEntry=csaStatsEntry, csaInOctets=csaInOctets, csaEnable=csaEnable, csaMIBCompliance=csaMIBCompliance, ciscoCSAMIBConformance=ciscoCSAMIBConformance, csaDecompressionRatio=csaDecompressionRatio, csaMIBCompliances=csaMIBCompliances, ciscoCSAMIBObjects=ciscoCSAMIBObjects, csaCompressionRatio=csaCompressionRatio, csaOutOctets=csaOutOctets, csaOutPackets=csaOutPackets, csaStats=csaStats, csaMIBGroup=csaMIBGroup, PYSNMP_MODULE_ID=ciscoCompressionServiceAdapterMIB, csaInPackets=csaInPackets) |
user_input = '5,4,25,18,22,9'
user_numbers = user_input.split(',')
user_numbers_as_int = []
for number in user_numbers:
user_numbers_as_int.append(int(number))
print(user_numbers_as_int)
print([number for number in user_numbers])
print([number*2 for number in user_numbers])
print([int(number) for number in user_numbers])
| user_input = '5,4,25,18,22,9'
user_numbers = user_input.split(',')
user_numbers_as_int = []
for number in user_numbers:
user_numbers_as_int.append(int(number))
print(user_numbers_as_int)
print([number for number in user_numbers])
print([number * 2 for number in user_numbers])
print([int(number) for number in user_numbers]) |
line = "Please have a nice day"
# This takes a parameter, what prefix we're looking for.
line_new = line.startswith('Please')
print(line_new)
#Does it start with a lowercase p?
# And then we get back a False because,
# no, it doesn't start with a lowercase p
line_new = line.startswith('p')
print(line_new)
| line = 'Please have a nice day'
line_new = line.startswith('Please')
print(line_new)
line_new = line.startswith('p')
print(line_new) |
a=[1,2]
for i,s in enumerate(a):
print(i,"index contains",s)
| a = [1, 2]
for (i, s) in enumerate(a):
print(i, 'index contains', s) |
def gen_help(bot_name):
return'''
Hello!
I am a telegram bot that generates duckduckgo links from tg directly.
I am an inline bot, you can access it via @{bot_name}.
If you have any questions feel free to leave issue at http://github.com/cleac/tgsearchbot
'''.format(bot_name=bot_name)
| def gen_help(bot_name):
return '\nHello!\n\nI am a telegram bot that generates duckduckgo links from tg directly.\nI am an inline bot, you can access it via @{bot_name}.\n\nIf you have any questions feel free to leave issue at http://github.com/cleac/tgsearchbot\n '.format(bot_name=bot_name) |
#class Solution:
# def checkPowersOfThree(self, n: int) -> bool:
#def checkPowersOfThree(n):
# def divisible_by_3(k):
# return k % 3 == 0
# #if 1 <= n <= 2:
# if n == 2:
# return False
# if divisible_by_3(n):
# return checkPowersOfThree(n//3)
# else:
# n = n - 1
# if divisible_by_3(n):
# return checkPowersOfThree(n//3)
# else:
# return False
qualified = {1, 3, 4, 9}
def checkPowersOfThree(n):
if n in qualified:
return True
remainder = n % 3
if remainder == 2:
return False
#elif remainder == 1:
# reduced = (n-1) // 3
# if checkPowersOfThree(reduced):
# qualified.add(reduced)
# return True
# else:
# return False
else:
reduced = (n-remainder) // 3
if checkPowersOfThree(reduced):
qualified.add(reduced)
return True
else:
return False
if __name__ == "__main__":
n = 12
print(f"{checkPowersOfThree(n)}")
n = 91
print(f"{checkPowersOfThree(n)}")
n = 21
print(f"{checkPowersOfThree(n)}")
| qualified = {1, 3, 4, 9}
def check_powers_of_three(n):
if n in qualified:
return True
remainder = n % 3
if remainder == 2:
return False
else:
reduced = (n - remainder) // 3
if check_powers_of_three(reduced):
qualified.add(reduced)
return True
else:
return False
if __name__ == '__main__':
n = 12
print(f'{check_powers_of_three(n)}')
n = 91
print(f'{check_powers_of_three(n)}')
n = 21
print(f'{check_powers_of_three(n)}') |
n = int(input('Enter A Number:'))
count = 1
for i in range(count, 11, 1):
print (f'{n} * {count} = {n*count}')
count +=1 | n = int(input('Enter A Number:'))
count = 1
for i in range(count, 11, 1):
print(f'{n} * {count} = {n * count}')
count += 1 |
# Sum of the diagonals of a spiral square diagonal
# OPTIMAL (<0.1s)
#
# APPROACH:
# Generate the numbers in the spiral with a simple algorithm until
# the desdired side is obtained,
SQUARE_SIDE = 1001
DUMMY_SQUARE_SIDE = 5
DUMMY_RESULT = 101
def generate_numbers(limit):
current = 1
internal_square = 1
steps = 0
while internal_square <= limit:
yield current
if current == internal_square**2:
internal_square += 2
steps += 2
current += steps
def sum_diagonals(square_side):
return sum(generate_numbers(square_side))
assert sum_diagonals(DUMMY_SQUARE_SIDE) == DUMMY_RESULT
result = sum_diagonals(SQUARE_SIDE) | square_side = 1001
dummy_square_side = 5
dummy_result = 101
def generate_numbers(limit):
current = 1
internal_square = 1
steps = 0
while internal_square <= limit:
yield current
if current == internal_square ** 2:
internal_square += 2
steps += 2
current += steps
def sum_diagonals(square_side):
return sum(generate_numbers(square_side))
assert sum_diagonals(DUMMY_SQUARE_SIDE) == DUMMY_RESULT
result = sum_diagonals(SQUARE_SIDE) |
PI = 3.14
SALES_TAX = 6
if __name__ == '__main__':
print('Constant file directly executed')
else:
print('Constant file is imported') | pi = 3.14
sales_tax = 6
if __name__ == '__main__':
print('Constant file directly executed')
else:
print('Constant file is imported') |
{
'targets': [
{
'target_name': 'electron-dragdrop-win',
'include_dirs': [
'<!(node -e "require(\'nan\')")',
],
'defines': [ 'UNICODE', '_UNICODE'],
'sources': [
],
'conditions': [
['OS=="win"', {
'sources': [
"src/addon.cpp",
"src/Worker.cpp",
"src/v8utils.cpp",
"src/ole/DataObject.cpp",
"src/ole/DropSource.cpp",
"src/ole/EnumFormat.cpp",
"src/ole/Stream.cpp",
"src/ole/ole.cpp"
],
}],
['OS!="win"', {
'sources': [
"src/addon-unsupported-platform.cc"
],
}]
]
}
]
}
| {'targets': [{'target_name': 'electron-dragdrop-win', 'include_dirs': ['<!(node -e "require(\'nan\')")'], 'defines': ['UNICODE', '_UNICODE'], 'sources': [], 'conditions': [['OS=="win"', {'sources': ['src/addon.cpp', 'src/Worker.cpp', 'src/v8utils.cpp', 'src/ole/DataObject.cpp', 'src/ole/DropSource.cpp', 'src/ole/EnumFormat.cpp', 'src/ole/Stream.cpp', 'src/ole/ole.cpp']}], ['OS!="win"', {'sources': ['src/addon-unsupported-platform.cc']}]]}]} |
def format_reader_port_message(message, reader_port, error):
return f'{message} with {reader_port}. Error: {error}'
def format_reader_message(message, vendor_id, product_id, serial_number):
return f'{message} with ' \
f'vendor_id={vendor_id}, ' \
f'product_id={product_id} and ' \
f'serial_number={serial_number}'
class ReaderNotFound(Exception):
def __init__(self, vendor_id, product_id, serial_number):
super(ReaderNotFound, self).__init__(
format_reader_message('No RFID Reader found', vendor_id, product_id, serial_number)
)
class ReaderCouldNotConnect(Exception):
def __init__(self, reader_port, error):
super(ReaderCouldNotConnect, self).__init__(
format_reader_port_message('Could not connect to reader', reader_port, error)
)
| def format_reader_port_message(message, reader_port, error):
return f'{message} with {reader_port}. Error: {error}'
def format_reader_message(message, vendor_id, product_id, serial_number):
return f'{message} with vendor_id={vendor_id}, product_id={product_id} and serial_number={serial_number}'
class Readernotfound(Exception):
def __init__(self, vendor_id, product_id, serial_number):
super(ReaderNotFound, self).__init__(format_reader_message('No RFID Reader found', vendor_id, product_id, serial_number))
class Readercouldnotconnect(Exception):
def __init__(self, reader_port, error):
super(ReaderCouldNotConnect, self).__init__(format_reader_port_message('Could not connect to reader', reader_port, error)) |
word="boy"
print(word)
reverse=[]
l=list(word)
for i in l:
reverse=[i]+reverse
reverse="".join(reverse)
print(reverse)
l=[1,2,3,4]
print(l)
r=[]
for i in l:
r=[i]+r
print(r) | word = 'boy'
print(word)
reverse = []
l = list(word)
for i in l:
reverse = [i] + reverse
reverse = ''.join(reverse)
print(reverse)
l = [1, 2, 3, 4]
print(l)
r = []
for i in l:
r = [i] + r
print(r) |
path = '08-File-Handling-Lab-Resources/File Reader/numbers.txt'
file = open(path, 'r')
num_sum = 0
for num in file:
num_sum += int(num)
print(num) # read
print(num_sum)
print(file.read()) # .read(n) n = number
| path = '08-File-Handling-Lab-Resources/File Reader/numbers.txt'
file = open(path, 'r')
num_sum = 0
for num in file:
num_sum += int(num)
print(num)
print(num_sum)
print(file.read()) |
class BindingTypes:
JSFunction = 1
JSObject = 2
class Binding(object):
def __init__(self, type, src, dest):
self.type = type
self.src = src
self.dest = dest
| class Bindingtypes:
js_function = 1
js_object = 2
class Binding(object):
def __init__(self, type, src, dest):
self.type = type
self.src = src
self.dest = dest |
def faculty_evaluation_result(nev, rar, som, oft, voft, alw):
''' Write code to calculate faculty evaluation rating according to asssignment instructions
:param nev: Never
:param rar: Rarely
:param som: Sometimes
:param oft: Often
:param voft: Very Often
:param alw: Always
:return: rating as a string'''
total = nev + rar + som + oft + voft + alw
nev_ratio = nev / total
rar_ratio = rar / total
som_ratio = som / total
oft_ratio = oft / total
voft_ratio = voft / total
alw_ratio = alw / total
if alw_ratio + voft_ratio >= 0.9:
return "Excellent"
elif alw_ratio + voft_ratio + oft_ratio >= 0.8:
return "Very Good"
elif alw_ratio + voft_ratio + oft_ratio + som_ratio >= 0.7:
return "Good"
elif alw_ratio + voft_ratio + oft_ratio + som_ratio + rar_ratio >= 0.6:
return "Needs Improvement"
else:
return "Unacceptable"
def get_ratings(nev,rar,som, oft,voft, alw):
'''
Students aren't expected to know this material yet!
'''
ratings = []
total = nev + rar + som + oft + voft + alw
ratings.append(round(alw / total, 2))
ratings.append(round(voft / total, 2))
ratings.append(round(oft / total, 2))
ratings.append(round(som / total, 2))
ratings.append(round(rar / total, 2))
ratings.append(round(nev / total, 2))
return ratings
| def faculty_evaluation_result(nev, rar, som, oft, voft, alw):
""" Write code to calculate faculty evaluation rating according to asssignment instructions
:param nev: Never
:param rar: Rarely
:param som: Sometimes
:param oft: Often
:param voft: Very Often
:param alw: Always
:return: rating as a string"""
total = nev + rar + som + oft + voft + alw
nev_ratio = nev / total
rar_ratio = rar / total
som_ratio = som / total
oft_ratio = oft / total
voft_ratio = voft / total
alw_ratio = alw / total
if alw_ratio + voft_ratio >= 0.9:
return 'Excellent'
elif alw_ratio + voft_ratio + oft_ratio >= 0.8:
return 'Very Good'
elif alw_ratio + voft_ratio + oft_ratio + som_ratio >= 0.7:
return 'Good'
elif alw_ratio + voft_ratio + oft_ratio + som_ratio + rar_ratio >= 0.6:
return 'Needs Improvement'
else:
return 'Unacceptable'
def get_ratings(nev, rar, som, oft, voft, alw):
"""
Students aren't expected to know this material yet!
"""
ratings = []
total = nev + rar + som + oft + voft + alw
ratings.append(round(alw / total, 2))
ratings.append(round(voft / total, 2))
ratings.append(round(oft / total, 2))
ratings.append(round(som / total, 2))
ratings.append(round(rar / total, 2))
ratings.append(round(nev / total, 2))
return ratings |
HTTP_HOST = ''
HTTP_PORT = 8080
FLASKY_MAIL_SUBJECT_PREFIX = "(Info)"
FLASKY_MAIL_SENDER = '[email protected]'
FLASKY_ADMIN = '[email protected]'
SECRET_KEY = "\x02|\x86.\\\xea\xba\x89\xa3\xfc\r%s\x9e\x06\x9d\x01\x9c\x84\xa1b+uC"
LOG = "/var/flasky"
# WSGI Settings
WSGI_LOG = 'default'
# Flask-Log Settings
LOG_LEVEL = 'debug'
LOG_FILENAME = "logs/error.log"
LOG_BACKUP_COUNT = 10
LOG_MAX_BYTE = 1024 * 1024 * 10
LOG_FORMATTER = '%(asctime)s - %(levelname)s - %(message)s'
LOG_ENABLE_CONSOLE = True
# Flask-Mail settings
MAIL_SERVER = 'smtp.126.com'
MAIL_PORT = 25
MAIL_USE_TLS = False
MAIL_USE_SSL = False
MAIL_USERNAME = '[email protected]'
MAIL_PASSWORD = 'Newegg@123456$'
| http_host = ''
http_port = 8080
flasky_mail_subject_prefix = '(Info)'
flasky_mail_sender = '[email protected]'
flasky_admin = '[email protected]'
secret_key = '\x02|\x86.\\êº\x89£ü\r%s\x9e\x06\x9d\x01\x9c\x84¡b+uC'
log = '/var/flasky'
wsgi_log = 'default'
log_level = 'debug'
log_filename = 'logs/error.log'
log_backup_count = 10
log_max_byte = 1024 * 1024 * 10
log_formatter = '%(asctime)s - %(levelname)s - %(message)s'
log_enable_console = True
mail_server = 'smtp.126.com'
mail_port = 25
mail_use_tls = False
mail_use_ssl = False
mail_username = '[email protected]'
mail_password = 'Newegg@123456$' |
class Action:
def __init__(self, fun, id=None):
self._fun = fun
self._id = id
def fun(self):
return self._fun
def id(self):
return self._id
| class Action:
def __init__(self, fun, id=None):
self._fun = fun
self._id = id
def fun(self):
return self._fun
def id(self):
return self._id |
class dotIFC2X3_Product_t(object):
# no doc
Description = None
IFC2X3_OwnerHistory = None
Name = None
ObjectType = None
| class Dotifc2X3_Product_T(object):
description = None
ifc2_x3__owner_history = None
name = None
object_type = None |
'''
###############################################
# ####################################### #
#### ######## Simple Calculator ########## ####
# ####################################### #
###############################################
## ##
##########################################
############ Version 2 #################
##########################################
## ##
'''
'''
The version 2 of SimpleCalc.py adds extra functionality but due to my limited
approach, has to remove to some functions as well, which hope so will be added
along with these new functions in the later version.
This version can tell total number of inputs, their summation and and average,
no matter how many inputs you give it, but as the same time this version unable
to calculate multiple and devision of the numbers.
'''
print("Type 'done' to Quit.")
sum = 0
count = 0
while True:
num = input('Input your number: ')
if num == 'done':
print('goodbye')
break
try:
fnum = float(num)
except:
print('bad input')
continue
sum = sum + fnum
count = count + 1
print('----Total Inputs:', count)
print('----Sum:', sum)
print('----Average:', sum/count)
| """
###############################################
# ####################################### #
#### ######## Simple Calculator ########## ####
# ####################################### #
###############################################
## ##
##########################################
############ Version 2 #################
##########################################
## ##
"""
'\nThe version 2 of SimpleCalc.py adds extra functionality but due to my limited\napproach, has to remove to some functions as well, which hope so will be added\nalong with these new functions in the later version.\nThis version can tell total number of inputs, their summation and and average,\nno matter how many inputs you give it, but as the same time this version unable\nto calculate multiple and devision of the numbers.\n'
print("Type 'done' to Quit.")
sum = 0
count = 0
while True:
num = input('Input your number: ')
if num == 'done':
print('goodbye')
break
try:
fnum = float(num)
except:
print('bad input')
continue
sum = sum + fnum
count = count + 1
print('----Total Inputs:', count)
print('----Sum:', sum)
print('----Average:', sum / count) |
def handle_error_response(resp):
codes = {
-1: FactomAPIError,
-32008: BlockNotFound,
-32009: MissingChainHead,
-32010: ReceiptCreationError,
-32011: RepeatedCommit,
-32600: InvalidRequest,
-32601: MethodNotFound,
-32602: InvalidParams,
-32603: InternalError,
-32700: ParseError,
}
error = resp.json().get('error', {})
message = error.get('message')
code = error.get('code', -1)
data = error.get('data', {})
raise codes[code](message=message, code=code, data=data, response=resp)
class FactomAPIError(Exception):
response = None
data = {}
code = -1
message = "An unknown error occurred"
def __init__(self, message=None, code=None, data={}, response=None):
self.response = response
if message:
self.message = message
if code:
self.code = code
if data:
self.data = data
def __str__(self):
if self.code:
return '{}: {}'.format(self.code, self.message)
return self.message
class BlockNotFound(FactomAPIError):
pass
class MissingChainHead(FactomAPIError):
pass
class ReceiptCreationError(FactomAPIError):
pass
class RepeatedCommit(FactomAPIError):
pass
class InvalidRequest(FactomAPIError):
pass
class MethodNotFound(FactomAPIError):
pass
class InvalidParams(FactomAPIError):
pass
class InternalError(FactomAPIError):
pass
class ParseError(FactomAPIError):
pass
| def handle_error_response(resp):
codes = {-1: FactomAPIError, -32008: BlockNotFound, -32009: MissingChainHead, -32010: ReceiptCreationError, -32011: RepeatedCommit, -32600: InvalidRequest, -32601: MethodNotFound, -32602: InvalidParams, -32603: InternalError, -32700: ParseError}
error = resp.json().get('error', {})
message = error.get('message')
code = error.get('code', -1)
data = error.get('data', {})
raise codes[code](message=message, code=code, data=data, response=resp)
class Factomapierror(Exception):
response = None
data = {}
code = -1
message = 'An unknown error occurred'
def __init__(self, message=None, code=None, data={}, response=None):
self.response = response
if message:
self.message = message
if code:
self.code = code
if data:
self.data = data
def __str__(self):
if self.code:
return '{}: {}'.format(self.code, self.message)
return self.message
class Blocknotfound(FactomAPIError):
pass
class Missingchainhead(FactomAPIError):
pass
class Receiptcreationerror(FactomAPIError):
pass
class Repeatedcommit(FactomAPIError):
pass
class Invalidrequest(FactomAPIError):
pass
class Methodnotfound(FactomAPIError):
pass
class Invalidparams(FactomAPIError):
pass
class Internalerror(FactomAPIError):
pass
class Parseerror(FactomAPIError):
pass |
# Encapsulate the pairs of int multiples to related string monikers
class MultipleMoniker:
mul = 0
mon = ""
def __init__(self, multiple, moniker) -> None:
self.mul = multiple
self.mon = moniker
# Define object to contain methods
class FizzBuzz:
# Define the int to start counting at
start = 1
# Define the max number to count to
maxi = 0
# Define the multiples and the corresponding descriptor terms
mmPair = [MultipleMoniker(3, "Fizz"), MultipleMoniker(5, "Buzz")]
# Define the array that will hold the designation
array = []
def __init__(self, max_int, start = 1) -> None:
self.start = start
self.maxi = max_int
self.init_with_max()
# Generate sequence up to and including maxi
def init_with_max(self, max_i=0):
if max_i != 0 :
self.maxi = max_i
tmp_array = []
for i in range(self.start, self.maxi + 1):
tmp_str = ""
for m in range(len(self.mmPair)):
if i % self.mmPair[m].mul == 0:
tmp_str += self.mmPair[m].mon
if tmp_str == "":
tmp_str += format(i)
tmp_array.append(tmp_str)
#print(f"{i}|:{self.array[i-self.start]}")
self.array = tmp_array
# Generate class STR for printout
def __str__(self):
ret_str = f"FizzBuzz({self.maxi}):"
for i in self.array:
ret_str += i + ", "
return ret_str
def add_multiple_moniker(self, multiple, moniker):
self.mmPair.append(MultipleMoniker(multiple, moniker))
def main():
# Test FizzBuzz Class Init
x1 = 42
x2 = 15
# Calculate sequence & Print Output to terminal
print("TEST_1:")
F1 = FizzBuzz(x1)
print(F1)
print("TEST_2:")
F2 = FizzBuzz(x2)
print(F2)
# Add "Fuzz" as a designator for a multiple of 7
F1.add_multiple_moniker(7, "Fuzz")
F1.init_with_max(105)
print(F1)
if __name__ == "__main__":
main() | class Multiplemoniker:
mul = 0
mon = ''
def __init__(self, multiple, moniker) -> None:
self.mul = multiple
self.mon = moniker
class Fizzbuzz:
start = 1
maxi = 0
mm_pair = [multiple_moniker(3, 'Fizz'), multiple_moniker(5, 'Buzz')]
array = []
def __init__(self, max_int, start=1) -> None:
self.start = start
self.maxi = max_int
self.init_with_max()
def init_with_max(self, max_i=0):
if max_i != 0:
self.maxi = max_i
tmp_array = []
for i in range(self.start, self.maxi + 1):
tmp_str = ''
for m in range(len(self.mmPair)):
if i % self.mmPair[m].mul == 0:
tmp_str += self.mmPair[m].mon
if tmp_str == '':
tmp_str += format(i)
tmp_array.append(tmp_str)
self.array = tmp_array
def __str__(self):
ret_str = f'FizzBuzz({self.maxi}):'
for i in self.array:
ret_str += i + ', '
return ret_str
def add_multiple_moniker(self, multiple, moniker):
self.mmPair.append(multiple_moniker(multiple, moniker))
def main():
x1 = 42
x2 = 15
print('TEST_1:')
f1 = fizz_buzz(x1)
print(F1)
print('TEST_2:')
f2 = fizz_buzz(x2)
print(F2)
F1.add_multiple_moniker(7, 'Fuzz')
F1.init_with_max(105)
print(F1)
if __name__ == '__main__':
main() |
#
# 1265. Print Immutable Linked List in Reverse
#
# Q: https://leetcode.com/problems/print-immutable-linked-list-in-reverse/
# A: https://leetcode.com/problems/print-immutable-linked-list-in-reverse/discuss/436558/Javascript-Python3-C%2B%2B-1-Liners
#
class Solution:
def printLinkedListInReverse(self, head: 'ImmutableListNode') -> None:
if head:
self.printLinkedListInReverse(head.getNext())
head.printValue()
| class Solution:
def print_linked_list_in_reverse(self, head: 'ImmutableListNode') -> None:
if head:
self.printLinkedListInReverse(head.getNext())
head.printValue() |
class Grid:
def __init__(self, grid: [[int]]):
self.grid = grid
self.flashes = 0
self.ticks = 0
self.height = len(grid)
self.width = len(grid[0])
self.flashed_cells: [str] = []
def tick(self):
self.ticks += 1
i = 0
for row in self.grid:
j = 0
for col in row:
self.grid[i][j] += 1
j += 1
i += 1
should_refresh_grid = True
while should_refresh_grid:
should_refresh_grid = False
i = 0
for row in self.grid:
j = 0
for col in row:
if self.grid[i][j] > 9 and not self.is_flashed(j, i):
self.flash(j, i)
should_refresh_grid = True
j += 1
i += 1
for flashed_cell in self.flashed_cells:
x = int(flashed_cell.split(';')[0])
y = int(flashed_cell.split(';')[1])
self.grid[y][x] = 0
self.flashed_cells.clear()
def flash(self, x: int, y: int):
self.flashes += 1
self.mark_flashed_cell(x, y)
for _y in range(-1, 2):
for _x in range(-1, 2):
# if not middle
if (abs(_x) + abs(_y)) != 0:
observing_point_x = x + _x
observing_point_y = y + _y
if observing_point_x >= 0 and observing_point_y >= 0 and observing_point_x < self.width and observing_point_y < self.height:
self.grid[observing_point_y][observing_point_x] += 1
def is_flashed(self, x: int, y :int):
if ';'.join([str(x), str(y)]) in self.flashed_cells:
return True
return False
def mark_flashed_cell(self, x: int, y: int):
if not self.is_flashed(x, y):
self.flashed_cells.append(';'.join([str(x), str(y)]))
@staticmethod
def create_from_lines(lines: [str]):
grid = []
for line in lines:
grid.append([int(number) for number in list(line.strip())])
return Grid(grid)
| class Grid:
def __init__(self, grid: [[int]]):
self.grid = grid
self.flashes = 0
self.ticks = 0
self.height = len(grid)
self.width = len(grid[0])
self.flashed_cells: [str] = []
def tick(self):
self.ticks += 1
i = 0
for row in self.grid:
j = 0
for col in row:
self.grid[i][j] += 1
j += 1
i += 1
should_refresh_grid = True
while should_refresh_grid:
should_refresh_grid = False
i = 0
for row in self.grid:
j = 0
for col in row:
if self.grid[i][j] > 9 and (not self.is_flashed(j, i)):
self.flash(j, i)
should_refresh_grid = True
j += 1
i += 1
for flashed_cell in self.flashed_cells:
x = int(flashed_cell.split(';')[0])
y = int(flashed_cell.split(';')[1])
self.grid[y][x] = 0
self.flashed_cells.clear()
def flash(self, x: int, y: int):
self.flashes += 1
self.mark_flashed_cell(x, y)
for _y in range(-1, 2):
for _x in range(-1, 2):
if abs(_x) + abs(_y) != 0:
observing_point_x = x + _x
observing_point_y = y + _y
if observing_point_x >= 0 and observing_point_y >= 0 and (observing_point_x < self.width) and (observing_point_y < self.height):
self.grid[observing_point_y][observing_point_x] += 1
def is_flashed(self, x: int, y: int):
if ';'.join([str(x), str(y)]) in self.flashed_cells:
return True
return False
def mark_flashed_cell(self, x: int, y: int):
if not self.is_flashed(x, y):
self.flashed_cells.append(';'.join([str(x), str(y)]))
@staticmethod
def create_from_lines(lines: [str]):
grid = []
for line in lines:
grid.append([int(number) for number in list(line.strip())])
return grid(grid) |
#%%
text=open('new.txt', 'r+')
text.write('Hello file')
for i in range(0, 11):
text.write(str(i))
print(text.seek(2))
#%%
#file operations Read & Write
text=open('sampletxt.txt', 'r')
text= text.read()
print(text)
text=text.split(' ')
print(text)
| text = open('new.txt', 'r+')
text.write('Hello file')
for i in range(0, 11):
text.write(str(i))
print(text.seek(2))
text = open('sampletxt.txt', 'r')
text = text.read()
print(text)
text = text.split(' ')
print(text) |
# AUTOGENERATED BY NBDEV! DO NOT EDIT!
__all__ = ["index", "modules", "custom_doc_links", "git_url"]
index = {"load_audio": "00_core.ipynb",
"AudioMono": "00_core.ipynb",
"duration": "00_core.ipynb",
"SpecImage": "00_core.ipynb",
"ArrayAudioBase": "00_core.ipynb",
"ArraySpecBase": "00_core.ipynb",
"ArrayMaskBase": "00_core.ipynb",
"TensorAudio": "00_core.ipynb",
"TensorSpec": "00_core.ipynb",
"TensorMask": "00_core.ipynb",
"Spectify": "00_core.ipynb",
"Decibelify": "00_core.ipynb",
"Mel_Binify_lib": "00_core.ipynb",
"MFCCify": "00_core.ipynb",
"create": "00_core.ipynb",
"encodes": "00_core.ipynb",
"audio2tensor": "00_core.ipynb",
"spec2tensor": "00_core.ipynb",
"Resample": "00_core.ipynb",
"Clip": "00_core.ipynb",
"Normalize": "00_core.ipynb",
"PhaseManager": "00_core.ipynb",
"ResampleSignal": "00b_core.base.ipynb",
"AudioBase": "00b_core.base.ipynb",
"SpecBase": "00b_core.base.ipynb",
"show_batch": "00b_core.base.ipynb",
"time_bins": "01_utils.ipynb",
"stft": "01_utils.ipynb",
"istft": "01_utils.ipynb",
"fill": "01_utils.ipynb",
"randomComplex": "01_utils.ipynb",
"complex2real": "01_utils.ipynb",
"real2complex": "01_utils.ipynb",
"complex_mult": "01_utils.ipynb",
"get_shape": "01_utils.ipynb",
"join_audios": "01_utils.ipynb",
"Mixer": "01_utils.ipynb",
"Unet_Trimmer": "01_utils.ipynb",
"setup_graph": "02_plot.ipynb",
"ColorMeshPlotter": "02_plot.ipynb",
"cmap_dict": "02_plot.ipynb",
"cmap": "02_plot.ipynb",
"pre_plot": "02_plot.ipynb",
"post_plot": "02_plot.ipynb",
"show_audio": "02_plot.ipynb",
"show_spec": "02_plot.ipynb",
"show_mask": "02_plot.ipynb",
"hear_audio": "02_plot.ipynb",
"get_audio_files": "03_data.ipynb",
"AudioBlock": "03_data.ipynb",
"audio_extensions": "03_data.ipynb",
"#fn": "04_Trainer.ipynb",
"fn": "04_Trainer.ipynb",
"pipe": "04_Trainer.ipynb",
"Tensorify": "04_Trainer.ipynb",
"AudioDataset": "04_Trainer.ipynb",
"loss_func": "04_Trainer.ipynb",
"bs": "04_Trainer.ipynb",
"shuffle": "04_Trainer.ipynb",
"workers": "04_Trainer.ipynb",
"seed": "04_Trainer.ipynb",
"dataset": "04_Trainer.ipynb",
"n": "04_Trainer.ipynb",
"train_dl": "04_Trainer.ipynb",
"valid_dl": "04_Trainer.ipynb",
"test_dl": "04_Trainer.ipynb",
"dataiter": "04_Trainer.ipynb",
"data": "04_Trainer.ipynb",
"model": "04_Trainer.ipynb",
"n_epochs": "04_Trainer.ipynb",
"n_samples": "04_Trainer.ipynb",
"n_iter": "04_Trainer.ipynb",
"optimizer": "04_Trainer.ipynb",
"state": "04_Trainer.ipynb",
"safe_div": "05_Masks.ipynb",
"MaskBase": "05_Masks.ipynb",
"MaskBinary": "05_Masks.ipynb",
"MaskcIRM": "05_Masks.ipynb",
"Maskify": "05_Masks.ipynb",
"SiamesePiar": "06_Pipe.ipynb",
"Group": "06_Pipe.ipynb",
"NanFinder": "06_Pipe.ipynb",
"AudioPipe": "06_Pipe.ipynb",
"init_weights": "07_Model.ipynb",
"conv_block": "07_Model.ipynb",
"up_conv": "07_Model.ipynb",
"Recurrent_block": "07_Model.ipynb",
"RRCNN_block": "07_Model.ipynb",
"single_conv": "07_Model.ipynb",
"Attention_block": "07_Model.ipynb",
"U_Net": "07_Model.ipynb"}
modules = ["core.py",
"base.py",
"utils.py",
"plot.py",
"data.py",
"training.py",
"masks.py",
"pipe.py",
"models.py"]
doc_url = "https://holyfiddlex.github.io/speechsep/"
git_url = "https://github.com/holyfiddlex/speechsep/tree/master/"
def custom_doc_links(name): return None
| __all__ = ['index', 'modules', 'custom_doc_links', 'git_url']
index = {'load_audio': '00_core.ipynb', 'AudioMono': '00_core.ipynb', 'duration': '00_core.ipynb', 'SpecImage': '00_core.ipynb', 'ArrayAudioBase': '00_core.ipynb', 'ArraySpecBase': '00_core.ipynb', 'ArrayMaskBase': '00_core.ipynb', 'TensorAudio': '00_core.ipynb', 'TensorSpec': '00_core.ipynb', 'TensorMask': '00_core.ipynb', 'Spectify': '00_core.ipynb', 'Decibelify': '00_core.ipynb', 'Mel_Binify_lib': '00_core.ipynb', 'MFCCify': '00_core.ipynb', 'create': '00_core.ipynb', 'encodes': '00_core.ipynb', 'audio2tensor': '00_core.ipynb', 'spec2tensor': '00_core.ipynb', 'Resample': '00_core.ipynb', 'Clip': '00_core.ipynb', 'Normalize': '00_core.ipynb', 'PhaseManager': '00_core.ipynb', 'ResampleSignal': '00b_core.base.ipynb', 'AudioBase': '00b_core.base.ipynb', 'SpecBase': '00b_core.base.ipynb', 'show_batch': '00b_core.base.ipynb', 'time_bins': '01_utils.ipynb', 'stft': '01_utils.ipynb', 'istft': '01_utils.ipynb', 'fill': '01_utils.ipynb', 'randomComplex': '01_utils.ipynb', 'complex2real': '01_utils.ipynb', 'real2complex': '01_utils.ipynb', 'complex_mult': '01_utils.ipynb', 'get_shape': '01_utils.ipynb', 'join_audios': '01_utils.ipynb', 'Mixer': '01_utils.ipynb', 'Unet_Trimmer': '01_utils.ipynb', 'setup_graph': '02_plot.ipynb', 'ColorMeshPlotter': '02_plot.ipynb', 'cmap_dict': '02_plot.ipynb', 'cmap': '02_plot.ipynb', 'pre_plot': '02_plot.ipynb', 'post_plot': '02_plot.ipynb', 'show_audio': '02_plot.ipynb', 'show_spec': '02_plot.ipynb', 'show_mask': '02_plot.ipynb', 'hear_audio': '02_plot.ipynb', 'get_audio_files': '03_data.ipynb', 'AudioBlock': '03_data.ipynb', 'audio_extensions': '03_data.ipynb', '#fn': '04_Trainer.ipynb', 'fn': '04_Trainer.ipynb', 'pipe': '04_Trainer.ipynb', 'Tensorify': '04_Trainer.ipynb', 'AudioDataset': '04_Trainer.ipynb', 'loss_func': '04_Trainer.ipynb', 'bs': '04_Trainer.ipynb', 'shuffle': '04_Trainer.ipynb', 'workers': '04_Trainer.ipynb', 'seed': '04_Trainer.ipynb', 'dataset': '04_Trainer.ipynb', 'n': '04_Trainer.ipynb', 'train_dl': '04_Trainer.ipynb', 'valid_dl': '04_Trainer.ipynb', 'test_dl': '04_Trainer.ipynb', 'dataiter': '04_Trainer.ipynb', 'data': '04_Trainer.ipynb', 'model': '04_Trainer.ipynb', 'n_epochs': '04_Trainer.ipynb', 'n_samples': '04_Trainer.ipynb', 'n_iter': '04_Trainer.ipynb', 'optimizer': '04_Trainer.ipynb', 'state': '04_Trainer.ipynb', 'safe_div': '05_Masks.ipynb', 'MaskBase': '05_Masks.ipynb', 'MaskBinary': '05_Masks.ipynb', 'MaskcIRM': '05_Masks.ipynb', 'Maskify': '05_Masks.ipynb', 'SiamesePiar': '06_Pipe.ipynb', 'Group': '06_Pipe.ipynb', 'NanFinder': '06_Pipe.ipynb', 'AudioPipe': '06_Pipe.ipynb', 'init_weights': '07_Model.ipynb', 'conv_block': '07_Model.ipynb', 'up_conv': '07_Model.ipynb', 'Recurrent_block': '07_Model.ipynb', 'RRCNN_block': '07_Model.ipynb', 'single_conv': '07_Model.ipynb', 'Attention_block': '07_Model.ipynb', 'U_Net': '07_Model.ipynb'}
modules = ['core.py', 'base.py', 'utils.py', 'plot.py', 'data.py', 'training.py', 'masks.py', 'pipe.py', 'models.py']
doc_url = 'https://holyfiddlex.github.io/speechsep/'
git_url = 'https://github.com/holyfiddlex/speechsep/tree/master/'
def custom_doc_links(name):
return None |
version = "1.0"
version_maj = 1
version_min = 0
| version = '1.0'
version_maj = 1
version_min = 0 |
r = range(5) # Counts from 0 to 4
for i in r:
print(i)
r = range(1,6) # Counts from 1 to 5
for i in r:
print(i)
# Step Value
r = range(1,15,3) # Counts from 1 to 15 with a gap of '3', thereby, counting till '13' only as 16 is not in the range
for i in r:
print(i) | r = range(5)
for i in r:
print(i)
r = range(1, 6)
for i in r:
print(i)
r = range(1, 15, 3)
for i in r:
print(i) |
def sum(*n):
total=0
for n1 in n:
total=total+n1
print("the sum=",total)
sum()
sum(10)
sum(10,20)
sum(10,20,30,40) | def sum(*n):
total = 0
for n1 in n:
total = total + n1
print('the sum=', total)
sum()
sum(10)
sum(10, 20)
sum(10, 20, 30, 40) |
name = 'late_binding'
version = "1.0"
@late()
def tools():
return ["util"]
def commands():
env.PATH.append("{root}/bin")
| name = 'late_binding'
version = '1.0'
@late()
def tools():
return ['util']
def commands():
env.PATH.append('{root}/bin') |
# functions
# i.e., len() where the () designate a function
# functions that are related to str
course = "python programming"
# here we have a kind of function called a "method" which
# comes after a str and designated by a "."
# in Py all everything is an object
# and objects have "functions"
# and "functions" have "methods"
print(course.upper())
print(course)
print(course.capitalize())
print(course.istitle())
print(course.title())
# you can make a new var/str based off of a method applied to another str/var
upper_course = course.upper()
print(upper_course)
lower_course = upper_course.lower()
print(lower_course)
# striping white space
unstriped_course = " The unstriped Python Course"
print(unstriped_course)
striped_course = unstriped_course.strip()
print(striped_course)
# there's also .lstrip and .rstrip for removing text either from l or r
# how to find the index of a character(s)
print(course.find("ra"))
# in this case, "ra" is at the 11 index within the str
# replacing
print(course.replace("python", "Our new Python"),
(course.replace("programming", "Programming Course")))
# in and not in
print(course)
print("py" in course)
# this is true because "py" is in "python"
print("meat balls" not in course)
# this is also true because "meatballs" are not in the str 'course'
| course = 'python programming'
print(course.upper())
print(course)
print(course.capitalize())
print(course.istitle())
print(course.title())
upper_course = course.upper()
print(upper_course)
lower_course = upper_course.lower()
print(lower_course)
unstriped_course = ' The unstriped Python Course'
print(unstriped_course)
striped_course = unstriped_course.strip()
print(striped_course)
print(course.find('ra'))
print(course.replace('python', 'Our new Python'), course.replace('programming', 'Programming Course'))
print(course)
print('py' in course)
print('meat balls' not in course) |
#this is to make change from dollar bills
change=float(input("Enter an amount to make change for :"))
print("Your change is..")
print(int(change//20), "twenties")
change=change % 20
print(int(change//10), "tens")
change=change % 10
print(int(change//5), "fives")
change=change % 5
print(int(change//1), "ones")
change=change % 1
print(int(change//0.25), "quarters")
change=change % 0.25
print(int(change//0.1),"dimes")
change=change % 0.1
print(int(change//0.05), "nickels")
change=change % 0.05
print(int(change//0.01), "pennies")
change=change % 0.01
| change = float(input('Enter an amount to make change for :'))
print('Your change is..')
print(int(change // 20), 'twenties')
change = change % 20
print(int(change // 10), 'tens')
change = change % 10
print(int(change // 5), 'fives')
change = change % 5
print(int(change // 1), 'ones')
change = change % 1
print(int(change // 0.25), 'quarters')
change = change % 0.25
print(int(change // 0.1), 'dimes')
change = change % 0.1
print(int(change // 0.05), 'nickels')
change = change % 0.05
print(int(change // 0.01), 'pennies')
change = change % 0.01 |
def calc_fuel(mass):
fuel = int(mass / 3) - 2
return fuel
with open("input.txt") as infile:
fuel_sum = 0
for line in infile:
mass = int(line.strip())
fuel = calc_fuel(mass)
fuel_sum += fuel
print(fuel_sum)
| def calc_fuel(mass):
fuel = int(mass / 3) - 2
return fuel
with open('input.txt') as infile:
fuel_sum = 0
for line in infile:
mass = int(line.strip())
fuel = calc_fuel(mass)
fuel_sum += fuel
print(fuel_sum) |
def main() -> None:
a, b, c = map(int, input().split())
d = [a, b, c]
d.sort()
print("Yes" if d[1] == b else "No")
if __name__ == "__main__":
main()
| def main() -> None:
(a, b, c) = map(int, input().split())
d = [a, b, c]
d.sort()
print('Yes' if d[1] == b else 'No')
if __name__ == '__main__':
main() |
def sums(target):
ans = 0
sumlist=[]
count = 1
for num in range(target):
sumlist.append(count)
count = count + 1
ans = sum(sumlist)
print(ans)
#print(sumlist)
target = int(input(""))
sums(target)
| def sums(target):
ans = 0
sumlist = []
count = 1
for num in range(target):
sumlist.append(count)
count = count + 1
ans = sum(sumlist)
print(ans)
target = int(input(''))
sums(target) |
# AUTOGENERATED! DO NOT EDIT! File to edit: 00_core.ipynb (unless otherwise specified).
__all__ = ['print_hello']
# Cell
def print_hello(to):
"Print hello to the user"
return f"Hello, {to}!" | __all__ = ['print_hello']
def print_hello(to):
"""Print hello to the user"""
return f'Hello, {to}!' |
'''
Created on Aug 4, 2012
@author: vinnie
'''
class Rotor(object):
def __init__(self, symbols, permutation):
'''
'''
self.states = []
self.inverse_states = []
self.n_symbols = len(symbols)
for i in range(self.n_symbols):
self.states.append({symbols[j]: permutation[(j + i) % self.n_symbols] for j in range(self.n_symbols)})
self.inverse_states.append(
{permutation[(j + i) % self.n_symbols]: symbols[j] for j in range(self.n_symbols)})
self.odometer = 0
return
def state(self):
'''
Get the current encryption state
'''
return self.states[self.odometer]
def inverse_state(self):
'''
Get the current decryption state
'''
return self.inverse_states[self.odometer]
def step(self):
'''
Advance the rotor by one step.
This is equivalent to shifting the offsets
'''
self.odometer = (self.odometer + 1) % self.n_symbols
return
def setOdometer(self, position):
'''
'''
self.odometer = position % self.n_symbols
def permute(self, symbol):
'''
Encrypt a symbol in the current state
'''
return self.states[self.odometer][symbol]
def invert(self, symbol):
'''
Decrypt a symbol in the current state
'''
return self.inverse_states[self.odometer][symbol]
def __str__(self, *args, **kwargs):
output = "Permute\tInvert\n"
for k in self.states[self.odometer].keys():
output += "%s => %s\t%s => %s\n" \
% (str(k), self.states[self.odometer][k],
str(k), self.inverse_states[self.odometer][k])
return output
class Enigma(object):
'''
The Enigma cipher
'''
def __init__(self, rotors, reflector):
'''
'''
self.stecker = {}
self.dec_stecker = {}
self.rotors = rotors # rotors go from left to right
self.reflector = reflector
self.dec_reflector = {reflector[s]: s for s in reflector.keys()}
self.odometer_start = []
def configure(self, stecker, odometer_start):
'''
'''
assert len(odometer_start) == len(self.rotors) - 1
self.stecker = stecker
self.dec_stecker = {stecker[s]: s for s in stecker.keys()}
self.odometer_start = odometer_start
return
def set_rotor_positions(self, rotor_positions):
'''
'''
for r, p in zip(self.rotors, rotor_positions):
r.setOdometer(p)
return
def get_rotor_positions(self):
'''
'''
return [r.odometer for r in self.rotors]
def step_to(self, P):
for i in range(P):
self.step_rotors()
return
def step_rotors(self):
'''
'''
# step the rightmost rotor
self.rotors[0].step()
# step the remaining rotors in an odometer-like fashion
for i in range(len(self.odometer_start)):
if self.rotors[i + 1].odometer == self.odometer_start[i]:
self.rotors[i + 1].step()
return
def translate_rotors(self, c):
'''
'''
for r in self.rotors:
c = r.permute(c)
c = self.reflector[c]
for r in reversed(self.rotors):
c = r.invert(c)
return c
def encrypt(self, str):
'''
'''
enc = ""
for c in str:
e = self.stecker[c]
e = self.translate_rotors(e)
e = self.stecker[e]
self.step_rotors()
enc += e
return enc
def decrypt(self, enc):
'''
The same function is used to both encrypt and decrypt.
'''
return self.encrypt(enc)
def __str__(self, *args, **kwargs):
output = ""
for s in sorted(self.reflector.keys()):
output += "%s => %s | " % (str(s), self.stecker[s])
for r in self.rotors:
output += "%s => %s " % (str(s), r.permute(s))
output += "%s => %s | " % (str(s), r.invert(s))
output += "%s => %s" % (str(s), self.reflector[s])
output += "\n"
return output
| """
Created on Aug 4, 2012
@author: vinnie
"""
class Rotor(object):
def __init__(self, symbols, permutation):
"""
"""
self.states = []
self.inverse_states = []
self.n_symbols = len(symbols)
for i in range(self.n_symbols):
self.states.append({symbols[j]: permutation[(j + i) % self.n_symbols] for j in range(self.n_symbols)})
self.inverse_states.append({permutation[(j + i) % self.n_symbols]: symbols[j] for j in range(self.n_symbols)})
self.odometer = 0
return
def state(self):
"""
Get the current encryption state
"""
return self.states[self.odometer]
def inverse_state(self):
"""
Get the current decryption state
"""
return self.inverse_states[self.odometer]
def step(self):
"""
Advance the rotor by one step.
This is equivalent to shifting the offsets
"""
self.odometer = (self.odometer + 1) % self.n_symbols
return
def set_odometer(self, position):
"""
"""
self.odometer = position % self.n_symbols
def permute(self, symbol):
"""
Encrypt a symbol in the current state
"""
return self.states[self.odometer][symbol]
def invert(self, symbol):
"""
Decrypt a symbol in the current state
"""
return self.inverse_states[self.odometer][symbol]
def __str__(self, *args, **kwargs):
output = 'Permute\tInvert\n'
for k in self.states[self.odometer].keys():
output += '%s => %s\t%s => %s\n' % (str(k), self.states[self.odometer][k], str(k), self.inverse_states[self.odometer][k])
return output
class Enigma(object):
"""
The Enigma cipher
"""
def __init__(self, rotors, reflector):
"""
"""
self.stecker = {}
self.dec_stecker = {}
self.rotors = rotors
self.reflector = reflector
self.dec_reflector = {reflector[s]: s for s in reflector.keys()}
self.odometer_start = []
def configure(self, stecker, odometer_start):
"""
"""
assert len(odometer_start) == len(self.rotors) - 1
self.stecker = stecker
self.dec_stecker = {stecker[s]: s for s in stecker.keys()}
self.odometer_start = odometer_start
return
def set_rotor_positions(self, rotor_positions):
"""
"""
for (r, p) in zip(self.rotors, rotor_positions):
r.setOdometer(p)
return
def get_rotor_positions(self):
"""
"""
return [r.odometer for r in self.rotors]
def step_to(self, P):
for i in range(P):
self.step_rotors()
return
def step_rotors(self):
"""
"""
self.rotors[0].step()
for i in range(len(self.odometer_start)):
if self.rotors[i + 1].odometer == self.odometer_start[i]:
self.rotors[i + 1].step()
return
def translate_rotors(self, c):
"""
"""
for r in self.rotors:
c = r.permute(c)
c = self.reflector[c]
for r in reversed(self.rotors):
c = r.invert(c)
return c
def encrypt(self, str):
"""
"""
enc = ''
for c in str:
e = self.stecker[c]
e = self.translate_rotors(e)
e = self.stecker[e]
self.step_rotors()
enc += e
return enc
def decrypt(self, enc):
"""
The same function is used to both encrypt and decrypt.
"""
return self.encrypt(enc)
def __str__(self, *args, **kwargs):
output = ''
for s in sorted(self.reflector.keys()):
output += '%s => %s | ' % (str(s), self.stecker[s])
for r in self.rotors:
output += '%s => %s ' % (str(s), r.permute(s))
output += '%s => %s | ' % (str(s), r.invert(s))
output += '%s => %s' % (str(s), self.reflector[s])
output += '\n'
return output |
class BasePexelError(Exception):
pass
class EndpointNotExists(BasePexelError):
def __init__(self, end_point, _enum) -> None:
options = _enum.__members__.keys()
self.message = f'Endpoint "{end_point}" not exists. Valid endpoints: {", ".join(options)}'
super().__init__(self.message)
class ParamNotExists(BasePexelError):
def __init__(self, name, _enum, param) -> None:
options = _enum.__members__.keys()
self.message = f'{param} not exists in {name}. Valid params: {", ".join(options)}'
super().__init__(self.message)
class IdNotFound(BasePexelError):
def __init__(self, end_point) -> None:
self.message = f'ID is needed for "{end_point}"'
super().__init__(self.message)
| class Basepexelerror(Exception):
pass
class Endpointnotexists(BasePexelError):
def __init__(self, end_point, _enum) -> None:
options = _enum.__members__.keys()
self.message = f'''Endpoint "{end_point}" not exists. Valid endpoints: {', '.join(options)}'''
super().__init__(self.message)
class Paramnotexists(BasePexelError):
def __init__(self, name, _enum, param) -> None:
options = _enum.__members__.keys()
self.message = f"{param} not exists in {name}. Valid params: {', '.join(options)}"
super().__init__(self.message)
class Idnotfound(BasePexelError):
def __init__(self, end_point) -> None:
self.message = f'ID is needed for "{end_point}"'
super().__init__(self.message) |
#https://www.acmicpc.net/problem/1712
a, b, b2 = map(int, input().split())
if b >= b2:
print(-1)
else:
bx = b2 - b
count = a // bx + 1
print(count) | (a, b, b2) = map(int, input().split())
if b >= b2:
print(-1)
else:
bx = b2 - b
count = a // bx + 1
print(count) |
grade_1 = [9.5,8.5,6.45,21]
grade_1_sum = sum(grade_1)
print(grade_1_sum)
grade_1_len = len(grade_1)
print(grade_1_len)
grade_avg = grade_1_sum/grade_1_len
print(grade_avg)
# create Function
def mean(myList):
the_mean = sum(myList) / len(myList)
return the_mean
print(mean([10,1,1,10]))
def mean_1(value):
if type(value)== dict:
the_mean = sum(value.values())/len(value)
return the_mean
else:
the_mean = sum(value) / len(value)
return the_mean
dic = {"1":10,"2":20}
LIS = [10,20]
print(mean_1(dic))
print(mean_1(LIS))
def mean_2(value):
if isinstance(value , dict):
the_mean = sum(value.values())/len(value)
return the_mean
else:
the_mean = sum(value) / len(value)
return the_mean
dic_1 = {"1":10,"2":20}
LIS_1 = [10,20]
print(mean_2(dic))
print(mean_2(LIS_1))
def foo(temperature):
if temperature > 7:
return "Warm"
else:
return "Cold"
| grade_1 = [9.5, 8.5, 6.45, 21]
grade_1_sum = sum(grade_1)
print(grade_1_sum)
grade_1_len = len(grade_1)
print(grade_1_len)
grade_avg = grade_1_sum / grade_1_len
print(grade_avg)
def mean(myList):
the_mean = sum(myList) / len(myList)
return the_mean
print(mean([10, 1, 1, 10]))
def mean_1(value):
if type(value) == dict:
the_mean = sum(value.values()) / len(value)
return the_mean
else:
the_mean = sum(value) / len(value)
return the_mean
dic = {'1': 10, '2': 20}
lis = [10, 20]
print(mean_1(dic))
print(mean_1(LIS))
def mean_2(value):
if isinstance(value, dict):
the_mean = sum(value.values()) / len(value)
return the_mean
else:
the_mean = sum(value) / len(value)
return the_mean
dic_1 = {'1': 10, '2': 20}
lis_1 = [10, 20]
print(mean_2(dic))
print(mean_2(LIS_1))
def foo(temperature):
if temperature > 7:
return 'Warm'
else:
return 'Cold' |
if 0:
pass
if 1:
pass
else:
pass
if 2:
pass
elif 3:
pass
if 4:
pass
elif 5:
pass
else:
1
| if 0:
pass
if 1:
pass
else:
pass
if 2:
pass
elif 3:
pass
if 4:
pass
elif 5:
pass
else:
1 |
print("Halo")
print("This is my program in vscode ")
name = input("what your name : ")
if name == "Hero":
print("Wow your name {} ? , my name is Hero too, nice to meet you ! ".format(name))
else:
print("Halo {} , nice to meet you friend".format(name))
age = input("how old are you : ")
if age == "21":
print("wow it's same my age 21 too")
else:
print("wow that's great ~") | print('Halo')
print('This is my program in vscode ')
name = input('what your name : ')
if name == 'Hero':
print('Wow your name {} ? , my name is Hero too, nice to meet you ! '.format(name))
else:
print('Halo {} , nice to meet you friend'.format(name))
age = input('how old are you : ')
if age == '21':
print("wow it's same my age 21 too")
else:
print("wow that's great ~") |
def foo(numbers, path, index, cur_val, target):
if index == len(numbers):
return cur_val, path
# No point in continuation
if cur_val > target:
return -1, ""
sol_1 = foo(numbers, path+"1", index+1, cur_val+numbers[index], target)
# Found the solution. Do not continue.
if sol_1[0] == target:
return sol_1
sol_2 = foo(numbers, path+"0", index+1, cur_val, target)
if sol_2[0] == target:
return sol_2
if sol_1[0] == -1 or sol_1[0] > target:
if sol_2[0] == -1 or sol_2[0] > target:
return -1, ""
else:
return sol_2
else:
if sol_2[0] == -1 or sol_2[0] > target or sol_1[0] > sol_2[0]:
return sol_1
else:
return sol_2
while True:
try:
line = list(map(int, input().split()))
N = line[1]
Target = line[0]
numbers = line[2:]
if sum(numbers) <= Target:
print((" ".join(map(str, numbers))) + " sum:{}".format(sum(numbers)))
else:
sol, path = foo(numbers, "", 0, 0, Target)
print(" ".join([str(p) for p, v in zip(numbers, path) if v=="1"]) + " sum:{}".format(sol))
except(EOFError):
break | def foo(numbers, path, index, cur_val, target):
if index == len(numbers):
return (cur_val, path)
if cur_val > target:
return (-1, '')
sol_1 = foo(numbers, path + '1', index + 1, cur_val + numbers[index], target)
if sol_1[0] == target:
return sol_1
sol_2 = foo(numbers, path + '0', index + 1, cur_val, target)
if sol_2[0] == target:
return sol_2
if sol_1[0] == -1 or sol_1[0] > target:
if sol_2[0] == -1 or sol_2[0] > target:
return (-1, '')
else:
return sol_2
elif sol_2[0] == -1 or sol_2[0] > target or sol_1[0] > sol_2[0]:
return sol_1
else:
return sol_2
while True:
try:
line = list(map(int, input().split()))
n = line[1]
target = line[0]
numbers = line[2:]
if sum(numbers) <= Target:
print(' '.join(map(str, numbers)) + ' sum:{}'.format(sum(numbers)))
else:
(sol, path) = foo(numbers, '', 0, 0, Target)
print(' '.join([str(p) for (p, v) in zip(numbers, path) if v == '1']) + ' sum:{}'.format(sol))
except EOFError:
break |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.